+
    €",iÆ)  ã                   ó¼   € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt]P                  t	 ! R R]
4      t ! R R]
4      t ! R R]	4      t ! R R	]4      tRR
 ltR# )zb
Fast cryptographic hash of Python objects, with a special case for fast
hashing of numpy arrays.
Nc                   ó*   a € ] tR t^t o RtR tRtV tR# )Ú_ConsistentSetzTClass used to ensure the hash of Sets is preserved
whatever the order of its items.
c                óš   €  \        V4      V n        R#   \        \        P                  3 d    \        R  T 4       4      T n         R# i ; i)c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5i©N©Úhash)Ú.0Úes   & Ú0/usr/lib/python3/dist-packages/joblib/hashing.pyÚ	<genexpr>Ú*_ConsistentSet.__init__.<locals>.<genexpr>%   s   é € Ð$C±l°¤T¨!§W W³lùs   ‚N)ÚsortedÚ	_sequenceÚ	TypeErrorÚdecimalÚInvalidOperation)ÚselfÚset_sequences   &&r   Ú__init__Ú_ConsistentSet.__init__   sF   € ð		Eô
 $ LÓ1ˆDŽNøÜœ7×3Ñ3Ð4ô 	Eô $Ñ$C±lÓ$CÓDˆD�Nð	Eús   ‚ ”2A
Á	A
)r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s   ø‡ € ñ÷Eð Eó    r   c                   ó*   a € ] tR t^(t o RtR tRtV tR# )Ú_MyHashz5Class used to hash objects that won't normally picklec                ó   € Wn         R # r   ©Úargs)r   r&   s   &*r   r   Ú_MyHash.__init__+   s   € ØŽ	r!   r%   Nr   r   s   @r   r#   r#   (   s   ø‡ € Ù?÷ð r!   r#   c                   ó2  a € ] tR t^/t o RtRR ltRR ltR tR tR]	P                  3R lt]P                  P                  4       t]]]! ]4      &   ]]]! ]4      &   ]]]! ]4      &   ]]]! ]P&                  4      &   R tR	 t]]]! ]! 4       4      &   R
tV tR# )ÚHasherz½A subclass of pickler, to do cryptographic hashing, rather than
pickling. This is used to produce a unique hash of the given
Python object that is not necessarily cryptographically secure.
c                óº   € \         P                  ! 4       V n        ^p\        P	                  W P                  VR7       \
        P                  ! VRR7      V n        R# )é   )ÚprotocolF)ÚusedforsecurityN)ÚioÚBytesIOÚstreamÚPicklerr   ÚhashlibÚnewÚ_hash)r   Ú	hash_namer,   s   && r   r   ÚHasher.__init__5   s?   € Ü—j’j“lˆŒð ˆÜ×Ñ˜Ÿ{™{°XÐÔ>ä—[’[ ¸EÔBˆŽ
r!   c                óX  €  V P                  V4       T P                  P                  4       pT P                  P                  T4       T'       d   T P                  P                  4       # R#   \        P                   d)   pT;P                  R T: RT: 23,          un        h Rp?ii ; i)zPicklingError while hashing z: N)	ÚdumpÚpickleÚPicklingErrorr&   r0   Úgetvaluer4   ÚupdateÚ	hexdigest)r   ÚobjÚreturn_digestr
   Údumpss   &&&  r   r   ÚHasher.hash>   s„   € ð	Ø�I‰I�cŒNð —‘×$Ñ$Ó&ˆØ�
‰
×Ñ˜%Ô ßØ—:‘:×'Ñ'Ó)Ð)ñ øô ×#Ñ#ô 	Ø�F‹F»sÂAÐFÐHÕH�FØûð	ús   ‚A, Á,B)Â#B$Â$B)c                óä  € \        V\        P                  \        / P                  4      34      '       d¦   \        VR 4      '       d   VP                  P                  pMVP                  pVP                  p\        V4      \        \        4      J d   \        W#P                  4      pM2Vf   \        W#4      pM"VP                  P                  p\        W#V4      p\        P                  W4       R# )Ú__func__N)Ú
isinstanceÚtypesÚ
MethodTypeÚtypeÚpopÚhasattrrC   r   Ú__self__r9   r#   Ú	__class__r1   Úsave)r   r>   Ú	func_nameÚinstÚclss   &&   r   rL   ÚHasher.saveI   s¦   € Ü�cœE×,Ñ,¬d°2·6±6«lÐ;×<Ò<ô �s˜J×'Ò'ØŸL™L×1Ñ1‘	àŸL™L�	Ø—<‘<ˆDÜ�D‹zœT¤&›\Ó)Ü˜i¯©Ó7‘Ø’ä˜iÓ.‘à—l‘l×,Ñ,�Ü˜i¨sÓ3�Ü�‰�TÖr!   c                ól   € \        V\        \        34      '       d   R # \        P	                  W4       R # r   )rD   ÚbytesÚstrr1   Úmemoize)r   r>   s   &&r   rT   ÚHasher.memoize\   s$   € ô
 �cœE¤3˜<×(Ò(ÙÜ�‰˜Ö"r!   Nc                óz  € \        W#R 7      pVR  \        P                  ! W3/ VB  R#   \        P                   d|    \        P                  ! Y3/ TB  \        TRR4      pTR8X  dM   TpTf   TP                  p\        P                  T,          p\        Yv4      '       g   \        YvT4        R#  R#  R# i ; i))ÚnameÚpackrX   r   NÚ__main__)Údictr1   Úsave_globalr9   r:   Úgetattrr   ÚsysÚmodulesrI   Úsetattr)r   r>   rW   rX   ÚkwargsÚmoduleÚmy_nameÚmods   &&&&    r   r[   ÚHasher.save_globalg   s­   € ô ˜4Ô+ˆØ�6ˆNð	/Ü×Ò Ñ4¨VÔ4øÜ×#Ñ#ô 	/Ü×Ò Ñ4¨VÒ4Ü˜S ,°Ó5ˆFØ˜Ô#Ø�Ø’?Ø!Ÿl™l�GÜ—k‘k &Õ)�Ü˜s×,Ò,ô ˜C¨#×.ò -ò $ð	/ús   ‘* ªBB:Â9B:c           
     óæ   €  \         P                  ! V \        \        V4      4      .VO5!   R#   \         d7    \         P                  ! T \        \        R  T 4       4      4      .TO5!    R# i ; i)c              3   ó@   "  € T F  w  r\        V4      V3x € K  	  R # 5ir   r   )r	   ÚkÚvs   &  r   r   Ú)Hasher._batch_setitems.<locals>.<genexpr>”   s   é € Ð!A¹5±4°1¤4¨£7¨A¥,»5ùs   ‚N)r1   Ú_batch_setitemsÚiterr   r   )r   Úitemsr&   s   &&*r   rj   ÚHasher._batch_setitemsˆ   sc   € ð	ô
 ×#Ò# D¬$¬v°e«}Ó*=ÐEÀÖEøÜô 	ô ×#Ò#Ø”dœ6Ñ!A¹5Ó!AÓAÓBðØEI÷ð	ús   ‚+/ ¯=A0Á/A0c                óD   € \         P                  V \        V4      4       R # r   )r1   rL   r   )r   Ú	set_itemss   &&r   Úsave_setÚHasher.save_set—   s   € ä�‰�Tœ>¨)Ó4Ö5r!   )r4   r0   )Úmd5)T)r   r   r   r   r   r   r   rL   rT   ÚstructrX   r[   r1   ÚdispatchÚcopyrG   ÚlenÚobjectr9   r8   rj   rp   Úsetr   r   r   s   @r   r)   r)   /   sž   ø‡ € ñô
Cô	*ò ò&#ð %)¨v¯{©{ô /ð* ×Ñ×$Ñ$Ó&€Hà%€H‰T�#‹YÑà(€H‰T�&‹\Ñà)€H‰T�'‹]Ñà"-€H‰T�&—+‘+ÓÑòò6ð %€H‰T‘#“%‹[×r!   r)   c                   ó4   a € ] tR t^žt o RtRR ltR tRtV tR# )ÚNumpyHasherz1Special case the hasher for when numpy is loaded.c                ó²   € W n         \        P                  WR7       ^ RIpW0n        \        VR4      '       d   VP                  V n        R# \        V n        R# )z¥
Parameters
----------
hash_name: string
    The hash algorithm to be used
coerce_mmap: boolean
    Make no difference between np.memmap and np.ndarray
    objects.
©r5   NÚ	getbuffer)	Úcoerce_mmapr)   r   ÚnumpyÚnprI   r}   Ú
_getbufferÚ
memoryview)r   r5   r~   r€   s   &&& r   r   ÚNumpyHasher.__init__¡   s?   € ð 'ÔÜ�‰˜ˆÔ2ãàŒÜ�2�{×#Ò#Ø Ÿl™lˆDŽOä(ˆDŽOr!   c                óF  € \        WP                  P                  4      '       Edf   VP                  P                  '       EgI   VP
                  R8X  d   VP                  4       pMXVP                  P                  '       d   TpM9VP                  P                  '       d   VP                  pMVP                  4       pV P                  P                  V P                  VP                  V P                  P                  4      4      4       V P                   '       d=   \        WP                  P"                  4      '       d   V P                  P                  pMVP$                  pVRVP                  VP
                  VP&                  33pM€\        WP                  P                  4      '       d\   V P                  P                  RP)                  R4      4       V P                  P                  \*        P,                  ! V4      4       R# \.        P1                  W4       R# )z‡Subclass the save method, to hash ndarray subclass, rather
than pickling them. Off course, this is a total abuse of
the Pickler class.
ÚHASHEDÚ_HASHED_DTYPEzutf-8N© )rD   r€   ÚndarrayÚdtypeÚ	hasobjectÚshapeÚflattenÚflagsÚc_contiguousÚf_contiguousÚTr4   r<   r�   ÚviewÚuint8r~   ÚmemmaprK   ÚstridesÚencoder9   r@   r)   rL   )r   r>   Úobj_c_contiguousÚklasss   &&  r   rL   ÚNumpyHasher.save¶   se  € ô
 �cŸ7™7Ÿ?™?×+Ó+°C·I±I×4G×4GÑ4Gð �y‰y˜BŒð $'§;¡;£=Ñ Ø—‘×'×'Ð'Ø#&Ñ Ø—‘×'×'Ð'Ø#&§5¡5Ñ ð
 $'§;¡;£=Ð ð �J‰J×Ñ˜dŸo™oÐ.>×.CÑ.CÀDÇGÁGÇMÁMÓ.RÓSÔTð
 ××Ð¤J¨s·G±G·N±N×$CÒ$Cð Ÿ™Ÿ™‘àŸ™�ð
 ˜8 S§Y¡Y°·	±	¸3¿;¹;ÐGÐH‰CÜ˜ŸW™WŸ]™]×+Ò+ð  �J‰J×Ñ˜o×4Ñ4°WÓ=Ô>Ø�J‰J×ÑœfŸlšl¨3Ó/Ô0ÙÜ�‰�DÖr!   )r�   r~   r€   N©rr   F)	r   r   r   r   r   r   rL   r   r   r   s   @r   rz   rz   ž   s   ø‡ € Ù;ô)÷*>ð >r!   rz   c                óÄ   € RpW9  d   \        RP                  W14      4      hR\        P                  9   d   \	        WR7      pM\        VR7      pVP                  V 4      # )a%  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
zAValid options for 'hash_name' are {}. Got hash_name={!r} instead.r   )r5   r~   r|   )rr   Úsha1)Ú
ValueErrorÚformatr]   r^   rz   r)   r   )r>   r5   r~   Úvalid_hash_namesÚhashers   &&&  r   r   r   ÷   s_   € ð 'ÐØÔ(ÜØO×VÑVØ óó
ð 	
ð
 ”#—+‘+ÔÜ yÔJ‰ä )Ô,ˆØ�;‰;�sÓÐr!   r™   )r   r   r2   r.   r9   rs   r]   rE   Ú_Picklerr1   rw   r   r#   r)   rz   r   r‡   r!   r   Ú<module>r¡      sg   ðñó Û Û 	Û Û Û 
Û à
�/‰/€ôE�Vô Eô&ˆfô ôl%ˆWô l%ô^V�&ô Vörr!   