Skip to content

Instantly share code, notes, and snippets.

View swilcox's full-sized avatar
🎙️

Steven Wilcox swilcox

🎙️
View GitHub Profile
import redis
from django.conf import settings
from django.core.signals import request_finished
try:
from eventlet.corolocal import local
except ImportError:
from threading import local
@swilcox
swilcox / horn.py
Created October 10, 2011 20:05
horn
if brakes.abs_engaged:
horn.volume += 500
@swilcox
swilcox / clarion_utils.py
Created September 19, 2011 18:36
python code to convert a standard date to a clarion date
import datetime
CLARION_DAY_ZERO = datetime.date(1800,12,28) #this is the important date to work with!
def date_to_clarion_date(input_date):
"""
this is evil because I'm not checking jack...