[20be63]: / foresight / utils / pickle.py

Download this file

10 lines (7 with data), 199 Bytes

1
2
3
4
5
6
7
8
9
import pickle
import os
def load(path):
return pickle.load(open(path, 'rb'))
def dump(data, path):
os.makedirs(os.path.dirname(path), exist_ok=True)
pickle.dump(data, open(path, 'wb'))