This file contains hidden or 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
from functools import wraps | |
import pickle | |
import traceback | |
import os | |
print("THIS IS ON GITHUB AT:") | |
print("https://gist.github.com/jmetz/93a7bee657efc1826add676ae7f68d3b/") | |
def save_result(func, | |
loader=lambda fname: pickle.load(open(fname, "rb")), |
This file contains hidden or 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
from functools import wraps | |
import pickle | |
import traceback | |
import os | |
def save_result(func, | |
loader=lambda fname: pickle.load(open(fname, "rb")), | |
saver=lambda obj, fname: pickle.dump(obj, open(fname, "wb")), | |
savekey="filename", | |
): |