Skip to content

Instantly share code, notes, and snippets.

View neta79's full-sized avatar

Andrea Gronchi neta79

View GitHub Profile
@neta79
neta79 / LICENSE.txt
Created April 20, 2018 11:29 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@neta79
neta79 / gist:3943d55ca7eedf716ed6
Created January 23, 2015 13:01
Use multiprocessing worker with Tornado IOLoop
import time
from concurrent.futures import ProcessPoolExecutor
from tornado.ioloop import IOLoop
from tornado import gen
def f(a, b, c, blah=None):
print "got %s %s %s and %s" % (a, b, c, blah)
time.sleep(5)
return "hey there"