Skip to content

Instantly share code, notes, and snippets.


Tim Sloan timsloan

View GitHub Profile
# -*- coding: utf-8 -*-
Based on
Recreated by Haisheng HU <> on Jun 3, 2012
Updated by Simon Bächler for Foundation on May 23, 2013
#!/usr/bin/env python
Use pip to get a list of local packages to check against one or more package
indexes for updated versions.
import pip
import sys
import xmlrpclib
from cStringIO import StringIO
from distutils.version import StrictVersion, LooseVersion
"""Multisite - individual site for request"""
from django.conf import settings
from threading import local
def make_tls_property(default=None):
"""Creates a class-wide instance property with a thread-specific value."""
class TLSProperty(object):
def __init__(self):
self.local = local()
timsloan /
Created Jul 28, 2011 — forked from fredoliveira/
Game mechanics deck from SCVNGR. More info:

1. Achievement

Definition: A virtual or physical representation of having accomplished something. These are often viewed as rewards in and of themselves.

Example: a badge, a level, a reward, points, really anything defined as a reward can be a reward.

2. Appointment Dynamic

Definition: A dynamic in which to succeed, one must return at a predefined time to take some action. Appointment dynamics are often deeply related to interval based reward schedules or avoidance dyanmics.

You can’t perform that action at this time.