This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dask.callbacks import Callback | |
from tqdm.auto import tqdm | |
class TQDMDaskProgressBar(Callback, object): | |
""" | |
A tqdm progress bar for dask. | |
Usage: | |
``` | |
with TQDMDaskProgressBar(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import time | |
import sys | |
if __name__ == "__main__": | |
if len(sys.argv) != 2: | |
exit("need an argument") | |
to_run = sys.argv[1] | |
proc = subprocess.Popen(to_run) | |
print "start process with pid %s" % proc.pid |