Skip to content

Instantly share code, notes, and snippets.

View jason-kane's full-sized avatar

Jason Kane jason-kane

View GitHub Profile
@jason-kane
jason-kane / epollreactor.py
Created August 28, 2015 17:01
hacked up epollreactor for diagnostics
def doPoll(self, timeout):
"""
Poll the poller for new events.
"""
if timeout is None:
timeout = -1 # Wait indefinitely.
try:
# Limit the number of events to the number of io objects we're
# currently tracking (because that's maybe a good heuristic) and
@jason-kane
jason-kane / view.py
Created July 18, 2015 14:29
DRS MyCustomView without params
class MyCustomView(APIView):
"""
This is a custom view that can be anything at all.
It's not using a serializer class, but I can define my own parameters.
Cet exemple démontre l'utilisation de caractères unicode
"""
def get(self, *args, **kwargs):
"""