Skip to content

Instantly share code, notes, and snippets.

@qmaruf
Last active January 24, 2020 05:13
Show Gist options
  • Save qmaruf/84c0f26b82b795a5c8a0633a796a1656 to your computer and use it in GitHub Desktop.
Save qmaruf/84c0f26b82b795a5c8a0633a796a1656 to your computer and use it in GitHub Desktop.
import _pickle as pickle
class Pickle:
def __init__(self):
pass
def save_data(self, data, fpath):
with open(fpath, 'wb') as hndl:
pickle.dump(data, hndl, -1)
def load_data(self, fpath):
with open(fpath, 'rb') as hndl:
return pickle.load(hndl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment