/usr/local/lib/python3.6/site-packages/joblib/__pycache__
NameSizeModeActions
backports.cpython-36.pyc25550644editdlrm
compressor.cpython-36.pyc166160644editdlrm
disk.cpython-36.pyc30500644editdlrm
executor.cpython-36.pyc31660644editdlrm
format_stack.cpython-36.pyc8440644editdlrm
func_inspect.cpython-36.pyc87290644editdlrm
hashing.cpython-36.pyc62650644editdlrm
logger.cpython-36.pyc39600644editdlrm
memory.cpython-36.pyc288340644editdlrm
my_exceptions.cpython-36.pyc11300644editdlrm
numpy_pickle.cpython-36.pyc155640644editdlrm
numpy_pickle_compat.cpython-36.pyc70520644editdlrm
numpy_pickle_utils.cpython-36.pyc65160644editdlrm
parallel.cpython-36.pyc324160644editdlrm
pool.cpython-36.pyc124350644editdlrm
testing.cpython-36.pyc20370644editdlrm
_cloudpickle_wrapper.cpython-36.pyc5430644editdlrm
_dask.cpython-36.pyc105280644editdlrm
_deprecated_format_stack.cpython-36.pyc82160644editdlrm
_deprecated_my_exceptions.cpython-36.pyc27510644editdlrm
_memmapping_reducer.cpython-36.pyc161240644editdlrm
_multiprocessing_helpers.cpython-36.pyc12100644editdlrm
_parallel_backends.cpython-36.pyc196710644editdlrm
_store_backends.cpython-36.pyc139460644editdlrm
_utils.cpython-36.pyc11260644editdlrm
__init__.cpython-36.pyc45380644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/joblib/__pycache__/hashing.cpython-36.pyc (6265B)
3 Eg()@sdZddlZddlZddlZddlZddlZddlZddlZejZ Gddde Z Gddde Z Gddde Z Gd d d e Zdd dZdS)zb Fast cryptographic hash of Python objects, with a special case for fast hashing of numpy arrays. Nc@seZdZdZddZdS)_ConsistentSetza Class used to ensure the hash of Sets is preserved whatever the order of its items. c CsByt||_Wn.ttjfk r<tdd|D|_YnXdS)Ncss|]}t|VqdS)N)hash).0er8/usr/local/lib/python3.6/site-packages/joblib/hashing.py %sz*_ConsistentSet.__init__..)sorted _sequence TypeErrordecimalInvalidOperation)selfZ set_sequencerrr__init__sz_ConsistentSet.__init__N)__name__ __module__ __qualname____doc__rrrrrrsrc@seZdZdZddZdS)_MyHashz7 Class used to hash objects that won't normally pickle cGs ||_dS)N)args)rrrrrr+sz_MyHash.__init__N)rrrrrrrrrr(src@seZdZdZdddZdddZdd Zd d Zd ej fd dZ e j j Z e e ee<e e ee<e e ee <e e eej<ddZddZee ee<d S)HasherzW A subclass of pickler, to do cryptographic hashing, rather than pickling. md5cCs0tj|_d}tj||j|dtj||_dS)N)protocol)ioBytesIOstreamPicklerrhashlibnew_hash)r hash_namerrrrr4s zHasher.__init__TcCsvy|j|Wn>tjk rL}z |jd||ff7_WYdd}~XnX|jj}|jj||rr|jjSdS)Nz"PicklingError while hashing %r: %r) dumppickle PicklingErrorrrgetvaluer update hexdigest)robjZ return_digestrdumpsrrrr=s  z Hasher.hashcCst|tjtijfr|t|dr*|jj}n|j}|j}t|tt krTt ||j}n(|dkrht ||}n|jj }t |||}t j ||dS)N__func__) isinstancetypes MethodTypetypepophasattrr*r__self__r#r __class__rsave)rr( func_nameinstclsrrrr3Hs    z Hasher.savecCs"t|ttfrdStj||dS)N)r+bytesstrrmemoize)rr(rrrr9[szHasher.memoizeNc Cst||d}|d=ytj||f|Wnltjk rtj||f|t|dd}|dkr|}|dkrn|j}tj|}t ||st |||YnXdS)N)namepackr;r__main__) dictr save_globalr#r$getattrrsysmodulesr0setattr)rr(r:r;kwargsmoduleZmy_namemodrrrr>fs    zHasher.save_globalc CsPytj|tt|Wn2tk rJtj|ttdd|DYnXdS)Ncss|]\}}t||fVqdS)N)r)rkvrrrrsz)Hasher._batch_setitems..)r_batch_setitemsiterr r )ritemsrrrrHs zHasher._batch_setitemscCstj|t|dS)N)rr3r)rZ set_itemsrrrsave_setszHasher.save_set)r)T)rrrrrrr3r9structr;r>rdispatchcopyr.lenobjectr#r"rHrKsetrrrrr/s      rc@s"eZdZdZd ddZddZdS) NumpyHasherz7 Special case the hasher for when numpy is loaded. rFcCs@||_tj||dddl}||_t|dr6|j|_nt|_dS)a Parameters ---------- hash_name: string The hash algorithm to be used coerce_mmap: boolean Make no difference between np.memmap and np.ndarray objects. )r!rN getbuffer) coerce_mmaprrnumpynpr0rS _getbuffer memoryview)rr!rTrVrrrrs   zNumpyHasher.__init__cCst||jjr|jj r|jfkr,|j}n&|jjr:|}n|jj rJ|j }n|j}|j j |j |j|jj|jrt||jjr|jj}n|j}|d|j|j|jff}n6t||jjr|j j djd|j j tj|dStj||dS)z Subclass the save method, to hash ndarray subclass, rather than pickling them. Off course, this is a total abuse of the Pickler class. ZHASHEDZ _HASHED_DTYPEzutf-8N)r+rVZndarrayZdtypeZ hasobjectshapeflattenflags c_contiguous f_contiguousTr r&rWviewZuint8rTZmemmapr2stridesencoder#r)rr3)rr(Zobj_c_contiguousklassrrrr3s&   zNumpyHasher.saveN)rF)rrrrrr3rrrrrRs rRrFcCsHd}||krtdj||dtjkr4t||d}n t|d}|j|S)al Quick calculation of a hash to identify uniquely Python objects containing numpy arrays. Parameters ----------- hash_name: 'md5' or 'sha1' Hashing algorithm used. sha1 is supposedly safer, but md5 is faster. coerce_mmap: boolean Make no difference between np.memmap and np.ndarray rsha1zAValid options for 'hash_name' are {}. Got hash_name={!r} instead.rU)r!rT)r!)rrc) ValueErrorformatr@rArRrr)r(r!rTZvalid_hash_namesZhasherrrrrs    r)rF)rr#rr@r,rLrr _PicklerrrPrrrrRrrrrrskZ