I hereby claim:
- I am valsdav on github.
- I am valsdav (https://keybase.io/valsdav) on keybase.
- I have a public key ASBY_TBzLQN4P2VX59S150DXCiLE_G9mmrEMrO-Qxdrpqgo
To claim this, I am signing this object:
| import multiprocessing as mp | |
| def multiprocessor_generator(iterable, heavy_processing, input_queue_size=10, output_queue_size=20, nworkers=2): | |
| def gen_to_queue(input_q, iterable): | |
| # This function simply consume our generator and write it to the input queue | |
| for it in iterable: | |
| input_q.put(it) | |
| for _ in range(nworkers): # Once generator is consumed, send end-signal | |
| input_q.put(None) |
I hereby claim:
To claim this, I am signing this object:
| ### UTILITY FUNCTIONS ### | |
| from string import * | |
| import re, string,json | |
| '''This function remove a command like \command{content} | |
| even if it contains nested brakets. If delete_content=False it leaves | |
| the content of the command without the command, otherwise it deletes all''' | |
| def remove_command_greedy(tex,command,delete_content=False): | |
| result='' | |
| tokens = tex.split(command) |