Skip to content

Instantly share code, notes, and snippets.

@Seagor
Created July 17, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Seagor/fcc92cf3842b051e1266 to your computer and use it in GitHub Desktop.
Save Seagor/fcc92cf3842b051e1266 to your computer and use it in GitHub Desktop.
#!/bin/sh
"exec" "twxec" "-e" "rand_ints()" "$0" "$@"
import random
import gevent
def rand_ints():
while True:
value = random.randint({{number minval}}, {{number maxval}} + 1)
yield {"value": value}
gevent.sleep({{number delay}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment