Skip to content

Instantly share code, notes, and snippets.

View Vuntsova's full-sized avatar
🎯
Focusing

Emiliya Vuntsova

🎯
Focusing
View GitHub Profile
class Tuple(tuple):
def __getattr__(self, name):
def _int(val):
try:
return int(val)
except ValueError:
return False
if not name.startswith('_') or not _int(name[1:]):
raise AttributeError("'tuple' object has no attribute '%s'" % name)
from django.http import HttpResponseForbidden
from django.http import JsonResponse
from pusher import Pusher
class PusherAuthStrategy:
def __init__(self, namespace):
self.namespace = namespace
{
"category_name": "General",
"todos": [
{
"task": "My TODO Task",
"due_on": null,
"status": "pending",
"description": null
},
{