Skip to content

Instantly share code, notes, and snippets.

View CMGS's full-sized avatar
🎯
Focusing

CMGS CMGS

🎯
Focusing
View GitHub Profile
@CMGS
CMGS / subprcess.py
Created May 25, 2012 03:36
Gevent Subprocess Patch
"""Implementation of the standard :mod:`subprocess` module that spawns greenlets"""
import os
import sys
import errno
import fcntl
_subprocess = __import__('subprocess')
from gevent import socket, select, hub
@CMGS
CMGS / websocket.py
Created May 2, 2012 03:41
websocket hybi3 support with gunicorn and gevent
import collections
import errno
import re
from hashlib import md5, sha1
import base64
from base64 import b64encode, b64decode
import socket
import struct
import logging