I hereby claim:
- I am jhalcrow on github.
- I am pejoculant (https://keybase.io/pejoculant) on keybase.
- I have a public key ASBaWqVZolipnSF7U5fSeBrVj2RCOrhAldWWPJm14dANdQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import gevent.monkey; gevent.monkey.patch_all() | |
| import gevent.server | |
| from BaseHTTPServer import BaseHTTPRequestHandler | |
| import urllib2 | |
| class DummyHTTPServer(gevent.server.StreamServer): | |
| def handle(self, sock, addr): | |
| handler = DummyHTTPHandler(sock, addr, self) | |
| try: | |
| handler.setup() |
| def virtualenv(): | |
| import site | |
| from os import environ | |
| from os.path import join | |
| from sys import version_info | |
| if 'VIRTUAL_ENV' in environ: | |
| virtual_env = join(environ.get('VIRTUAL_ENV'), | |
| 'lib', | |
| 'python%d.%d' % version_info[:2], |
| # Adapted from http://j2labs.tumblr.com/post/4262756632/speed-tests-for-json-and-cpickle-in-python | |
| import time | |
| import cPickle as pickle | |
| import simplejson | |
| import json | |
| import cjson | |
| import jsonlib | |
| import ujson |