Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / eval.rst
Last active April 8, 2024 03:13
評価制度の無い評価制度
@esehara
esehara / simpleoptiontype.py
Created July 30, 2013 04:30
Option型のPython的実装
# -*- coding: utf-8 -*-
class SimpleOption(object):
NOTHING = False
SOME = True
def __init__(self, is_some, value=None):
@abahgat
abahgat / gae-memcache-decorator.py
Last active January 22, 2021 00:43
A Python decorator to cache method results using memcache on Google AppEngine
import functools
import logging
from google.appengine.api import memcache
def cached(time=1200):
"""
Decorator that caches the result of a method for the specified time in seconds.
Use it as: