This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import base64 | |
import cPickle as pickle | |
import hashlib | |
from functools import wraps | |
class NoopSerializer(object): | |
def serialize(self, obj): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""An example of a cache decorator.""" | |
import json | |
from functools import wraps | |
from redis import StrictRedis | |
redis = StrictRedis() | |
def cached(func): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Json Schema to Django Model | |
""" | |
import json | |
import argparse | |
import logging | |
import os | |
def determine_model_name(model_id=None, filename=None): |