This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am bhatman on github. | |
* I am nmbhat (https://keybase.io/nmbhat) on keybase. | |
* I have a public key ASD2Pnndx4qFeBIQQLugyu6rcZsjTVqDi9h8gAX4G3et4Qo | |
To claim this, I am signing this object: |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os.path | |
import sys | |
if len(sys.argv) < 2: | |
print os.getcwd() | |
sys.exit(0) | |
putative_path = os.path.join(os.getcwd(), sys.argv[1]) | |
print os.path.realpath(putative_path) |
This file contains 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
#!/usr/bin/python | |
from multiprocessing.dummy import Pool as ThreadPool | |
# arbitrary. could base this on the number of cores | |
PARALLELISM = 5 | |
pool = ThreadPool(PARALLELISM) | |
def function_to_apply(item): |