Created
September 20, 2012 17:41
-
-
Save saml/3757292 to your computer and use it in GitHub Desktop.
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
import os | |
import random | |
RANDOM_INTS_PATH='random-ints.txt' | |
LIMIT=1000000000000000 | |
if not os.path.exists(RANDOM_INTS_PATH): | |
os.mkfifo(RANDOM_INTS_PATH) | |
with open(RANDOM_INTS_PATH, 'w') as f: | |
for x in xrange(LIMIT): | |
f.write(str(random.randrange(LIMIT))) | |
f.write('\n') | |
#while read x; do echo "$x"; done < random-ints.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment