Skip to content

Instantly share code, notes, and snippets.

is_crackle_worthy = lambda n: n % 3 == 0
is_pop_worthy = lambda n: n % 5 == 0
for i in range(1, 100 + 1):
should_crackle = is_crackle_worthy(i)
should_pop = is_pop_worthy(i)
if should_crackle & should_pop:
print('{:03d}.....CracklePop'.format(i))
import datetime
import simplejson as json
import subprocess
def setClipboardData(data):
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE)
p.stdin.write(data.encode('utf-8'))
p.stdin.close()
retcode = p.wait()
# -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.utils.cache import patch_response_headers
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page, never_cache
from django.views.decorators.csrf import csrf_exempt
class NeverCacheMixin(object):
@method_decorator(never_cache)