What mongoexport's error code 7 does mean? - mongoexport

Where can I find Unix error codes for mongoexport CLI?
I'm getting code 7 (instead of expected 0) and an empty string instead of a JSON response. Nothing really about that in the docs.

Let say we have mongoexport like:
mongoexport --db some_db --collection some_collection --query 'query' --fields some_id,some_other_field --jsonArray
where query is {some_id: {$in: #{Poison.encode!(some_ids)}}...
The problem is if more than ~13_000 ids are supplied to the $in operator inside the query parameter, mongoexport will blow up with error code 7 while exporting JSON... I wish they document this somewhere.

Related

Query InfluxDB with a Flux string throws Syntax Error

I inserted the below into my influxdb bucket named test.
t0921 name="A",population=93215,date_mod="2004-5-29"
t0922 name="B",population=23719,date_mod="2004-7-6"
t0923 name="C",population=43817,date_mod="2004-8-12"
Ran the following command... just as the documentation says
influx query 'from(bucket:"test")|> range(start:-24h)'
...Got the error
Syntax Error
Have been trying for hours but still cannot figure out. Could anyone help me what I am doing wrong?
I am new to this Flux language and been reading documentation but maybe I am missing something.

Doesn’t look like a character based (Bytes Are All You Need) model (DeepSpeech)

I have been following DeepSpeech documentation in order to build my own scorer. After implementing this blocks of code
cd data/lm
python3 generate_lm.py --input_txt vocabulary.txt --output_dir .
–top_k 1500 --kenlm_bins path/to/kenlm/build/bin/
–arpa_order 3 --max_arpa_memory “50%” --arpa_prune “0|0|1”
–binary_a_bits 255 --binary_q_bits 8 --binary_type trie
curl -LO http://github.com/mozilla/DeepSpeech/releases/…
tar xvf native_client.*.tar.xz
./generate_scorer_package --alphabet …/alphabet.txt --lm lm.binary --vocab vocab-1500.txt
–package kenlm.scorer --default_alpha 0.931289039105002 --default_beta 1.1834137581510284
I get the following errors:
Doesn’t look like a character based (Bytes Are All You Need) model.
–force_bytes_output_mode was not specified, using value infered from vocabulary contents: false
Error: Can’t parse scorer file, invalid header. Try updating your scorer file.
Error loading language model file: Invalid magic in trie header.
I want to mention that I use a different alphabet that also contains other characters besides english characters.
This error is usually encountered with non-English alphabets. You can overcome the error by using the --force_bytes_output_mode parameter when calling generate_scorer_package. I pushed a change to the PlayBook this morning which covers this error.

:erlang.list_to_atom("roster") error when accessing mnesia table

I am trying get mnesia table info from elixir shell.
I have tried to convert the string to atom.
String.to_atom("roster")
I have tried to pass string as list ["roster"]
command -
:ejabberd_admin.mnesia_table_info("roster")
error
ArgumentError
:erlang.list_to_atom("roster")
Erlang expects a charlist there, not a binary. Use single quotes:
:ejabberd_admin.mnesia_table_info('roster')
Also: Kernel.to_charlist/1, ~c/2.
Documentation on charlists on official site.
Example:
iex(1)> :erlang.list_to_atom("roster")
** (ArgumentError) argument error
:erlang.list_to_atom("roster")
iex(1)> :erlang.list_to_atom('roster')
:roster

Error when converting form Python 2. to Python 3

can you help me to convert this to python 3.5 ? I tried but it don't work. I did the following steps:
I change the package md5 to hashlib
I change all the id = md5.new("%s"%str(clf.get_params())).hexdigest() to id = hashlib.md5(("%s"%str(clf.get_params())).encode('utf-8') ).hexdigest()
but I still have somme problems when I put a directory to these parameters
save_preds="",
save_params=""
save_test_only=""
clf_name="XX"
I have the folowing error when I put something in thise parameters:
TypeError: a bytes-like object is required, not 'str'
Please see the code here:
blend_proba.py
Thanks,
cdk
Replacing
clf_name="XX"
by
clf_name=b"XX"
would convert the strings into objects of type bytes. Whether those changes will be enough, I honestly have no idea.

Idl readcol function, using delimeter without syntax error

Im trying to use idl to read a file, so im using the readcol command. However, in my file i use | as a delimiter, but continually get syntax errors. Heres my latest attempt:
readcol,'kcorrins.txt',uband, gband, rband, iband, zband, $
ubanderr, gbanerr, rbanderr, ibanderr, zbanderr, adjredshift, $
SKIPLINE=1, DELIMITER=|
could someone post an example of the proper syntax for using the delimiter in this way?
You need to quote the delimiter:
readcol,'kcorrins.txt',uband, gband, rband, iband, zband, $
ubanderr, gbanerr, rbanderr, ibanderr, zbanderr, adjredshift, $
SKIPLINE=1, DELIMITER='|'

Resources