Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergii Nechuiviter Sklavit

  • DataRobot Inc
  • Kyiv, Ukraine
View GitHub Profile
@wassname
wassname / tqdm_dask_progressbar.py
Last active Jun 1, 2020
TQDMDaskProgressBar: tqdm for dask 1.2.2
View tqdm_dask_progressbar.py
from dask.callbacks import Callback
from tqdm.auto import tqdm
class TQDMDaskProgressBar(Callback, object):
"""
A tqdm progress bar for dask.
Usage:
```
with TQDMDaskProgressBar():
@International
International / subproccess_example.py
Created Sep 9, 2011
python subprocess pid/kill example
View subproccess_example.py
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