Skip to content

Instantly share code, notes, and snippets.

View aaristov's full-sized avatar

Andrey Aristov aaristov

View GitHub Profile
@mminer
mminer / cachedecorator.py
Created January 12, 2015 23:57
An example of a Python decorator to simplify caching a function's result.
"""An example of a cache decorator."""
import json
from functools import wraps
from redis import StrictRedis
redis = StrictRedis()
def cached(func):
@luispedro
luispedro / readroi.py
Last active December 16, 2020 07:50
Read ImageJ's ROI files
# UPDATE IN 2020
# You almost always will want to use the version at
# https://github.com/luispedro/imread, which is
# up-to-date and works with Python 3
# Copyright: Luis Pedro Coelho <[email protected]>, 2012