Skip to content

Instantly share code, notes, and snippets.

View codysoyland's full-sized avatar

Cody Soyland codysoyland

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqRTa4T9FyZtMb3w38MkSWSmlkKJjMPopj8ntILv8TYiLDuT8NJdsw+X1d05W1bX/al30JnVRBu1YMTGJsgv7iExcIdQLA5zHFJw6W6UHRvuBTLC4FU7qz515xHvjJAoBtUhXp0WbFt/KUKnpBoGcOH322/DwoiLs7vpk0gwsAW/gGb/ixCTpAW/VLAKpVwC551KRS/UJw8UE9CSBc2CM/M20EDGqL2zrwBOwZ9fzg2k7yfnvQ+BvwqkBM+kAR69FYSLCmVXKQ6CJI7ACralh19CN86/JpLjNYSfhQ06ipRY9goA2m9ESmlnAFesXzDOaWFn+iKhk5Pv9Nyc8tMtcuQ== csoyland@065.newsctr.ljworld.com
Business.filter({'name__startswith': 'Free State'}).order_by('name').get(
function(businesses) {
$.each(businesses,
function (business) {
console.log(business);
business.profile.get(
function(profile) {
console.log(profile);
}
class BaseTestCase(TestCase):
@contextmanager
def assert_num_queries(self, n):
current_debug = settings.DEBUG
settings.DEBUG = True
current = len(connection.queries)
yield
self.assertEqual(current+n, len(connection.queries), connection.queries[current:])
settings.DEBUG = current_debug
#daniellindsleyrocksdahouse
When Daniel Lindsley calls 1-900 numbers, he doesnt get charged. He holds up the phone and money falls out.
Daniel Lindsley once ate a whole cake before his friends could tell him there was a stripper in it.
Some people like to eat frogs' legs. Daniel Lindsley likes to eat lizard legs. Hence, snakes.
There are no races, only countries of people Daniel Lindsley has beaten to different shades of black and blue.
When Daniel Lindsley was denied an Egg McMuffin at McDonald's because it was 10:35, he roundhouse kicked the store so hard it became a Wendy's.
Daniel Lindsley can't finish a "color by numbers" because his markers are filled with the blood of his victims. Unfortunately, all blood is dark red.
A Daniel Lindsley-delivered Roundhouse Kick is the preferred method of execution in 16 states.
When Daniel Lindsley falls in water, Daniel Lindsley doesn't get wet. Water gets Daniel Lindsley.
import functools
class memoize(object):
def __init__(self, func):
self.func = func
self.cache = {}
def __call__(self, *args):
return self.cache_get(args, lambda: self.func(*args))
def __get__(self, obj, objtype):
return self.cache_get(obj, lambda: self.__class__(functools.partial(self.func, obj)))