svetlin-mladenov / fcache Goto Github PK View Code? Open in Web Editor NEW 1.0 2.0 0.0 12 KB fcache caches the result of function calls to memory or disk. Saves you the pain of recomputing slow functions over and over again. fcache works well with numpy arrays, pandas dataframes and inside ipython notebooks. License: Other Python 100.00% python cache caching memoization memoize memoize-decorator memoization-library Introduction ยท People ยท Discuss
Optimize hashing by piping the output of StablePickler directly to sha1 instead of storing it in memory first
Limit cache size Currently the cache can grow indefinitely. It would be every useful if it was limited to some reasonable capacity.
Hashing fails for objects of local classes def test_bound_method(): class Test: def __init__(self): self.n = 0 def inc(self): self.n += 1 def get(self): return self.n obj = Test() fun = fcache(obj.get) assert fun() == 0 This code will fail despite the fact that Test is not being persisted on disk. Test is used just to compute the Hash of Test().get
Vue.js ๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
javascript JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Machine learning Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Facebook We are working to build community through open source technology. NB: members must have two-factor auth.