Files
witness-fracture/.venv/lib/python3.12/site-packages/tqdm/__pycache__/std.cpython-312.pyc
T

591 lines
63 KiB
Plaintext
Raw Normal View History

2025-06-23 17:55:02 -05:00
Ë
y»Yhuàãó®—dZddlZddlmZmZddlmZddlmZmZm Z ddl
m Z ddl m Z ddl
mZdd lmZd
d lmZd
d lmZmZmZmZmZmZmZmZmZmZmZmZd
Z gd¢Z!Gd„de"«Z#Gd„de$«Z%Gd„de&«Z'Gd„de'e(«Z)Gd„de'e*«Z+Gd„de'e,«Z-d„Z.Gd„de/«Z0Gd„de/«Z1Gd „d!e/«Z2Gd"„d#e«Z3d$„Z4y)%z¼
Customisable progressbar decorator for iterators.
Includes a default `range` iterator printing to `stderr`.
Usage:
>>> from tqdm import trange, tqdm
>>> for i in trange(10):
... ...
éN)Ú OrderedDictÚ defaultdict)Úcontextmanager)ÚdatetimeÚ timedeltaÚtimezone)ÚNumber)Útime)Úwarn)ÚWeakSeté)ÚTMonitor) ÚCallbackIOWrapperÚ
ComparableÚDisableOnWriteErrorÚ
FormatReplaceÚSimpleTextIOWrapperÚ _is_asciiÚ_screen_shape_wrapperÚ_supports_unicodeÚ
_term_move_upÚdisp_lenÚ disp_trimÚenvwrapz*https://github.com/tqdm/tqdm#contributions)ÚtqdmÚtrangeÚ
TqdmTypeErrorÚ TqdmKeyErrorÚ TqdmWarningÚTqdmExperimentalWarningÚTqdmDeprecationWarningÚTqdmMonitorWarningcó —eZdZy)rN©Ú__name__Ú
__module__Ú __qualname__©óúQ/mnt/c/fieldcraft/witness-fracture/.venv/lib/python3.12/site-packages/tqdm/std.pyrr ó„Ør)rcó —eZdZy)rNr$r(r)r*rr$r+r)rcó$‡—eZdZdZdˆfd„ ZˆxZS)rzqbase class for all tqdm warnings.
Used for non-external-code-breaking errors, such as garbled printing.
có°•—|�@|d|jjzdzt|«j«zdz«yt ‰|�|g|¢­i|¤Žy)Nú
ú: )Ú __class__r%ÚstrÚrstripÚsuperÚ__init__)ÚselfÚmsgÚfp_writeÚaÚkr1s €r*r5zTqdmWarning.__init__-sRø€Ø Ð Ù �T˜DŸN™N×3Ñ3Ñ3°dÑ:¼SÀ»X¿_¹_Ó=NÑNÐQUÑUÕ Vä ‰GÑ ˜SÐ * 1Ò *¨Ó *r)©N)r%r&r'Ú__doc__r5Ú
__classcell__)r1s@r*rr(sø„ñ÷+ñ+r)rcó—eZdZdZy)r z(beta feature, unstable API and behaviourN©r%r&r'r<r(r)r*r r 4s„Ù2Ør)r có —eZdZy)r!Nr$r(r)r*r!r!9s„àr)r!có—eZdZdZy)r"z>tqdm monitor errors which do not affect external functionalityNr?r(r)r*r"r">s„ÙHØr)r"cóJ— ddlm}||i|¤ŽS#ttf$rYywxYw)zthreading RLockr©ÚRLockN)Ú threadingrDÚ ImportErrorÚOSError)ÚargsÚkwargsrDs r*ÚTRLockrJCs1€ð
Ý#Ù�dÐ%˜fÑ%Ð%øÜ œÐ !ò
Ù ð
ús ‚
�"¡"có\—eZdZdZe«Zd„Zd„Zd„Zd„Z d„Z
e d„«Z e d„«Z
y )
ÚTqdmDefaultWriteLockaš
Provide a default write lock for thread and multiprocessing safety.
Works only on platforms supporting `fork` (so Windows is excluded).
You must initialise a `tqdm` or `TqdmDefaultWriteLock` instance
before forking in order for the write lock to work.
On Windows, you need to supply the lock from the parent to the children as
an argument to joblib or the parallelism lib you use.
có—t|«}|j}|�|j«|j«|j|jfD�cgc]}|€Œ|‘Œ c}|_|�|j
«yycc}wr;)ÚtypeÚth_lockÚacquireÚcreate_mp_lockÚmp_lockÚlocksÚrelease)r6ÚclsÚ root_lockÚlks r*r5zTqdmDefaultWriteLock.__init__Zst€ô�4‹jˆØ—K‘Kˆ Ø Ð Ø × Ñ Ô Ø ×ÑÔØ$'§K¡K°·±Ð#=ÖP˜RÀÁ’bÒPˆŒ
Ø Ð Ø × Ñ Õ ð !ùòQs ÁA<ÁA<cóJ—|jD]}|j|i|¤ŽŒyr;)rSrP)r6r9r:Úlocks r*rPzTqdmDefaultWriteLock.acquirefs(€Ø—J‘Jò "ˆDØ ˆD�L‰L˜!Ð !˜qÓ !ñ "r)cóR—|jddd…D]}|j«Œy)Néÿÿÿÿ)rSrT)r6rYs r*rTzTqdmDefaultWriteLock.releasejs'€Ø—J‘J™t ˜tÑ$ò ˆDØ �L‰L�Nñ r)có$—|j«yr;)rP©r6s r*Ú __enter__zTqdmDefaultWriteLock.__enter__nó €Ø � ‰ �r)có$—|j«yr;)rT)r6Úexcs r*Ú__exit__zTqdmDefaultWriteLock.__exit__qr_r)có|—t|d«s ddlm}|«|_yy#tt
f$r
d|_YywxYw)NrRrrC)ÚhasattrÚmultiprocessingrDrRrFrG)rUrDs r*rQz#TqdmDefaultWriteLock.create_mp_lockts?€ä�s˜IÔ&ð
#Ý1Ù#›g�• ð'øô ¤Ð)ò
#Ø"�– ð
#ús Ž"¢;º;cóD—t|d«sJ‚tdtd¬«y)NrOz!create_th_lock not needed anymoreé©Ú
stacklevel)rdr r!©rUs r*Úcreate_th_lockz#TqdmDefaultWriteLock.create_th_lock}s!€ä�s˜IÔ&Ð&Ð&Ü Ð
0Ô2HÐUVÖWr)N)r%r&r'r<rJrOr5rPrTr^rbÚ classmethodrQrkr(r)r*rLrLLsS„ññ‹h€Gò
 ò"òòòðñ#óð#ðñXóñXr)rLc óÄ—eZdZdZdZddj eeeddd«««zZ dZ
d Z d
Z d d d
ddddddœZ
de dfd„Zed„«Zej"d„«Zd„Zy)ÚBara‘
`str.format`-able bar with format specifiers: `[width][type]`
- `width`
+ unspecified (default): use `self.default_len`
+ `int >= 0`: overrides `self.default_len`
+ `int < 0`: subtract from `self.default_len`
- `type`
+ `a`: ascii (`charset=self.ASCII` override)
+ `u`: unicode (`charset=self.UTF` override)
+ `b`: blank (`charset=" "` override)
z 123456789#ú Úi�%i‡%r[z zz[38;2;%d;%d;%dmzzzzzzzz)ÚBLACKÚREDÚGREENÚYELLOWÚBLUEÚMAGENTAÚCYANÚWHITEé
Ncó´—d|cxkrdks*ntdtd¬«tdtd|««}|dkDsJ‚||_||_||_||_y)Nrr
zclamping frac to range [0, 1]rgrh)r rÚmaxÚminÚfracÚ default_lenÚcharsetÚcolour)r6r}r~rr€s r*r5z Bar.__init__™sU€Ø�DŒ~˜AŒ~Ü Ð0´+È!Õ LÜ�qœ#˜a ›,Ó'ˆDؘQŠÐˆØˆŒ Ø&ˆÔ؈Œ ؈� r)có—|jSr;)Ú_colourr]s r*r€z
Bar.colour£s €à�|‰|Ðr)c óÌ—|sd|_y |j«|jvr#|j|j«|_y|ddk(r?t|«dk(r1|jt d„|dd|dd|ddfD««z|_yt ‚#t tf$r<td|›d d
j|j«›d �td ¬
«d|_YywxYw)Nrú#éc3ó4K—|]}t|d«–—Œy­w)éN)Úint)Ú.0Úis r*ú <genexpr>zBar.colour.<locals>.<genexpr>°sèø€ò7NØ#$”C˜˜2—Jñ7Nùs‚r
éézUnknown colour (z"); valid choices: [hex (#00ff00), ú, ú]rgrh) r‚ÚupperÚCOLOURSÚlenÚ
COLOUR_RGBÚtupleÚKeyErrorÚAttributeErrorr Újoinr)r6Úvalues r*r€z
Bar.colour§sÚ€áØˆDŒLØ ð Ø�{‰{‹} § ¡ Ñ,Ø#Ÿ|™|¨E¯K©K«MÑ:�• Ø�q‘˜S’¤S¨£Z°1¢_Ø#Ÿ™´ñ7NØ).¨q°¨°U¸1¸Q°ZÀÀqÈÀÐ(Lô7Nó2Nñ N�• ô�øÜœ.Ð)ò Ý Ú˜Ÿ ™  $§,¡,Õ/ð1ä¨õ
,ð ˆDŽLð  úsŒ>BÁ ABÂBÂAC#Ã"C#cóR—|ro|dj«} |j|j|jdœ|}|dd}|r t
|«}|dkr5||jz
}n%|j}n|j
}|j}t|«dz
}tt
|j|z|z«|«\}}|d|z}||kr|||z|d||z
dz
zz}|jr|j|z|jzS|S#t$r|j
}YŒâwxYw)Nr[)r9ÚuÚbrr
)
ÚlowerÚASCIIÚUTFÚBLANKr•rrˆr~r’Údivmodr}r€Ú COLOUR_RESET) r6Ú format_specÚ_typerÚN_BARSÚnsymsÚ
bar_lengthÚfrac_bar_lengthÚress r*Ú
__format__zBar.__format__ºs9€Ù Ø ‘O×)Ñ)Ó+ˆEð
/Ø $§
¡
°·±ÀÇ
Á
ÑKÈEÑR�ð*¨#¨2Ð.� Ùܘ[Ó)�ؘA’:ؘd×.Ñ.Ñ.‘Fà×)Ñ)‘à—l‘lˆGØ×%Ñ%ˆFä�G“ ˜qÑ ˆÜ&,¬S°·±¸VÑ1CÀeÑ1KÓ-LÈeÓ&TÑ#ˆ
�Oà�b‰k˜JÑ&ˆØ ˜Ò ؘ Ñ0Ñ0°7¸1±:ÀÈ*ÑATÐWXÑAXÑ3YÑYˆCØ8<¿ º ˆt�{‰{˜SÑ  4×#4Ñ#4Ñ4ÐLÈÐLøô)ò
'ØŸ,™,’ð
'ús—'DÄD&Ä%D&)r%r&r'r<r�r—ÚmapÚchrÚrangeržrŸr¡r“r‘r5Úpropertyr€Úsetterr©r(r)r*rnrnƒsš„ñ ð
€EØ
�—‘™#˜c¡5¨°¸Ó#<Ó=Ó>Ñ
>€CØ €EØ€LØ&€JØ"¨:À
Ø#¨ZÀJØ!¨Jñ8€Gð*,°SÀóðñóðð ‡]�]ñ óð ó$Mr)rncó —eZdZdZdd„Zdd„Zy)ÚEMAa[
Exponential moving average: smoothing to give progressively lower
weights to older values.
Parameters
----------
smoothing : float, optional
Smoothing factor in range [0, 1], [default: 0.3].
Increase to give more weight to recent values.
Ranges from 0 (yields old value) to 1 (yields new value).
có.—||_d|_d|_y)Nr©ÚalphaÚlastÚcalls)r6Ú smoothings r*r5z EMA.__init__âs€ØˆŒ
؈Œ ؈�
r)Ncó—d|jz
}|�9|j|z||jzz|_|xjdz
c_|jr|jd||jzz
z S|jS)zk
Parameters
----------
x : float
New value to include in EMA.
r
r²)r6ÚxÚbetas r*Ú__call__z EMA.__call__çsl€ð�4—:‘:‰~ˆØ ˆ=ØŸ
™
 Q™¨°· ± Ñ)9Ñ9ˆDŒIØ �JŠJ˜!‰O�JØ7;·z²zˆt�y‰y˜A ¨¯
©
Ñ 2Ñ2Ñ3ÐPÀtÇyÁyÐPr))ç333333Ó?r;)r%r&r'r<r5rºr(r)r*r°r°Ös„ñ
óô
Qr)r°c
ó—eZdZdZdZdZe«Zed/d„«Z ed„«Z
ed„«Z ed„«Z e d0d„«Z
d „Zed1d
„«Zed „«Zed2d „«Zeed3d
„««Zed„«Zed„«Zed„«Zeddeeeeedœ¬« d4d„«Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#e$d„«Z%d„Z&d „Z'd5d!„Z(d"„Z)d6d#„Z*d7d$„Z+d%„Z,d1d&„Z-d8d'„Z.d8d(„Z/d8d)„Z0d9d*„Z1d+„Z2e$d,„«Z3d:d-„Z4eed8d.„««Z5y);rad
Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.
Parameters
----------
iterable : iterable, optional
Iterable to decorate with a progressbar.
Leave blank to manually manage the updates.
desc : str, optional
Prefix for the progressbar.
total : int or float, optional
The number of expected iterations. If unspecified,
len(iterable) is used if possible. If float("inf") or as a last
resort, only basic progress statistics are displayed
(no ETA, no progressbar).
If `gui` is True and this parameter needs subsequent updating,
specify an initial arbitrary large positive number,
e.g. 9e9.
leave : bool, optional
If [default: True], keeps all traces of the progressbar
upon termination of iteration.
If `None`, will leave only if `position` is `0`.
file : `io.TextIOWrapper` or `io.StringIO`, optional
Specifies where to output the progress messages
(default: sys.stderr). Uses `file.write(str)` and `file.flush()`
methods. For encoding, see `write_bytes`.
ncols : int, optional
The width of the entire output message. If specified,
dynamically resizes the progressbar to stay within this bound.
If unspecified, attempts to use environment width. The
fallback is a meter width of 10 and no limit for the counter and
statistics. If 0, will not print any meter (only stats).
mininterval : float, optional
Minimum progress display update interval [default: 0.1] seconds.
maxinterval : float, optional
Maximum progress display update interval [default: 10] seconds.
Automatically adjusts `miniters` to correspond to `mininterval`
after long display update lag. Only works if `dynamic_miniters`
or monitor thread is enabled.
miniters : int or float, optional
Minimum progress display update interval, in iterations.
If 0 and `dynamic_miniters`, will automatically adjust to equal
`mininterval` (more CPU efficient, good for tight loops).
If > 0, will skip display of specified number of iterations.
Tweak this and `mininterval` to get very efficient loops.
If your progress is erratic with both fast and slow iterations
(network, skipping items, etc) you should set miniters=1.
ascii : bool or str, optional
If unspecified or False, use unicode (smooth blocks) to fill
the meter. The fallback is to use ASCII characters " 123456789#".
disable : bool, optional
Whether to disable the entire progressbar wrapper
[default: False]. If set to None, disable on non-TTY.
unit : str, optional
String that will be used to define the unit of each iteration
[default: it].
unit_scale : bool or int or float, optional
If 1 or True, the number of iterations will be reduced/scaled
automatically and a metric prefix following the
International System of Units standard will be added
(kilo, mega, etc.) [default: False]. If any other non-zero
number, will scale `total` and `n`.
dynamic_ncols : bool, optional
If set, constantly alters `ncols` and `nrows` to the
environment (allowing for window resizes) [default: False].
smoothing : float, optional
Exponential moving average smoothing factor for speed estimates
(ignored in GUI mode). Ranges from 0 (average speed) to 1
(current/instantaneous speed) [default: 0.3].
bar_format : str, optional
Specify a custom bar string formatting. May impact performance.
[default: '{l_bar}{bar}{r_bar}'], where
l_bar='{desc}: {percentage:3.0f}%|' and
r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
'{rate_fmt}{postfix}]'
Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
rate, rate_fmt, rate_noinv, rate_noinv_fmt,
rate_inv, rate_inv_fmt, postfix, unit_divisor,
remaining, remaining_s, eta.
Note that a trailing ": " is automatically removed after {desc}
if the latter is empty.
initial : int or float, optional
The initial counter value. Useful when restarting a progress
bar [default: 0]. If using float, consider specifying `{n:.3f}`
or similar in `bar_format`, or specifying `unit_scale`.
position : int, optional
Specify the line offset to print this bar (starting from 0)
Automatic if unspecified.
Useful to manage multiple bars at once (eg, from threads).
postfix : dict or *, optional
Specify additional stats to display at the end of the bar.
Calls `set_postfix(**postfix)` if possible (dict).
unit_divisor : float, optional
[default: 1000], ignored unless `unit_scale` is True.
write_bytes : bool, optional
Whether to write bytes. If (default: False) will write unicode.
lock_args : tuple, optional
Passed to `refresh` for intermediate output
(initialisation, iterating, and updating).
nrows : int, optional
The screen height. If specified, hides nested bars outside this
bound. If unspecified, attempts to use environment height.
The fallback is 20.
colour : str, optional
Bar colour (e.g. 'green', '#00ff00').
delay : float, optional
Don't display until [default: 0] seconds have elapsed.
gui : bool, optional
WARNING: internal parameter - do not use.
Use tqdm.gui.tqdm(...) instead. If set, will attempt to use
matplotlib animations for a graphical output [default: False].
Returns
-------
out : decorated iterator.
ryNcóÀ—dD]R}t|«dkr=t|«dkr$t|«dkr |d›|›|›�cS|d›|›|›�cS|d›|›|›�cS||z}ŒT|d›d |›�S)
a×
Formats a number (greater than unity) with SI Order of Magnitude
prefixes.
Parameters
----------
num : float
Number ( >= 1) to format.
suffix : str, optional
Post-postfix [default: ''].
divisor : float, optional
Divisor between prefixes [default: 1000].
Returns
-------
out : str
Number with Order of Magnitude SI unit postfix.
)rpr:ÚMÚGÚTÚPÚEÚZg<�@gÍÌÌÌÌüX@g=
×£pý#@z1.2fz2.1fú3.0fz3.1fÚY)Úabs)ÚnumÚsuffixÚdivisorÚunits r*Ú
format_sizeofztqdm.format_sizeofrs”€ð(<ò ˆDÜ�3‹x˜%ÒÜ�s“8˜eÒ#ܘ3“x %Ò'Ø"% d ¨D¨6°&°Ð:Ò:Ø! $˜Z¨ v¨f¨XÐ6Ò6ؘd˜ D 6¨&¨Ð2Ò2Ø �7‰N‰Cð ð�d�˜1˜V˜HÐ%Ð%r)có€—tt|«d«\}}t|d«\}}|r
|d›d|d›d|d›�S|d›d|d›�S)zé
Formats a number of seconds as a clock time, [H:]MM:SS
Parameters
----------
t : int
Number of seconds.
Returns
-------
out : str
[H:]MM:SS
é<Údú:Ú02d)r rˆ)ÚtÚminsÚsÚhÚms r*Úformat_intervalztqdm.format_interval�s[€ôœ˜Q› Ó$‰ˆˆaÜ�d˜BÓ‰ˆˆ1Ù+,�!�A��a˜˜#�w˜a  #˜wÐ'ÐD°Q°s°G¸1¸Q¸s¸GÐ2DÐDr)có–—|d›jdd«jdd«}t|«}t|«t|«kr|S|S)zì
Intelligent scientific notation (.3g).
Parameters
----------
n : int or float or Numeric
A Number.
Returns
-------
out : str
Formatted number.
z.3gze+0ze+ze-0ze-)Úreplacer2r’)ÚnÚfs r*Ú
format_numztqdm.format_num£sI€ð�ˆg× Ñ ˜u dÓ +× 3Ñ 3°E¸4Ó @ˆÜ �‹FˆÜ˜“FœS ›V’OˆqÐ*¨Ð*r)c󇇇‡—|Št‰dd„«Š‰tjtjfvrBttjdd„««ttjdd„««ˆˆfd„ŠdgŠˆˆfd„}|S)zã
Manage the printing and in-place updating of a line of characters.
Note that if the string is longer than a line, then in-place
updating may not work (it will print a new line at each refresh).
Úflushcó—yr;r(r(r)r*ú<lambda>z%tqdm.status_printer.<locals>.<lambda>¾ó�r)có—yr;r(r(r)r*rßz%tqdm.status_printer.<locals>.<lambda>Àràr)có—yr;r(r(r)r*rßz%tqdm.status_printer.<locals>.<lambda>Áràr)cóH•—‰jt|««‰«yr;)Úwriter2)rÓÚfpÚfp_flushs €€r*r8z%tqdm.status_printer.<locals>.fp_writeÃsø€Ø �H‰H”S˜“VÔ Ù �Jr)rcóh•—t|«}‰d|zdt‰d|z
d«zz«|‰d<y)Nú
ror)rr{)rÓÚlen_sr8Úlast_lens €€r*Ú print_statusz)tqdm.status_printer.<locals>.print_statusÉs;ø€Ü˜Q“KˆEÙ �T˜A‘X ¤s¨8°A©;¸Ñ+>ÀÓ'BÑ!BÑCÔ D؈H�QŠKr))ÚgetattrÚsysÚstderrÚstdout)Úfilerërårær8rês @@@@r*Ústatus_printerztqdm.status_printer¶srû€ðˆÜ˜2˜w© Ó5ˆØ
”#—*‘*œcŸj™jÐ)Ñ )Ø 6ŒG”C—J‘J ©Ó 6Ô 8Ø 6ŒG”C—J‘J ©Ó 6Ô 8õ ð�3ˆõ ð
Ðr)c ó´—|r
||dzk\rd}|r|dvr|r||z}||z}|r||z}d}tj|«}|€
|r|| z
|z }|rd|z nd}tj}|r|r||«n|d›nd|zdz}|r|r||«n|d›ndd z|z}|r|dkDr|n|}|r||| ¬
«}|�
||| ¬
«nd}nt|«}|� t|«nd} |
rd |
znd }
|r
|r||z
|z nd
}|rtj|«nd} |r#|r!t j «t|¬«zn#t jd
tj«}|r|dddk(}|r|n|dz}nd }d|›d|›d|›d|›d |›|
›d� }id|“d|“d|“d|“d|“d|“d|“d|xsd “d|“d|r|dkDr|n|“d |“d!|“d"|“d#|“d$|“d%|
“d&| “|
|||||d'œ¥|¥}|�r*||z }|d(z}||d)›d*�z
}|d
k(r |dd+|ddzS|j|¬,«| r'|j|¬-«|s| jd.d «} nd/} t«} | j d6d0| i|¤Ž}!| j"s|!St%||rtd|t'|!«z
«nd1|d2urt$j(n|xst$j*|
¬3«} t-| j.«st-| «r t| «} | j d6d0| i|¤Ž}"|r t1|"|«S|"S| rŸ|d4z
}|j|d
¬5«t«} | j d6d0| i|¤Ž}!| j"s|!St%d
|rtd|t'|!«z
«nd1t$j2|
¬3«} | j d6d0| i|¤Ž}"|r t1|"|«S|"S|r|dznd ›|›|›d|›d |›|
›d� S#t$rY�ŒÚwxYw#t$rt
j}Y�Œ‰wxYw)7aÆ
Return a string-based progress bar given some parameters
Parameters
----------
n : int or float
Number of finished iterations.
total : int or float
The expected total number of iterations. If meaningless (None),
only basic progress statistics are displayed (no ETA).
elapsed : float
Number of seconds passed since start.
ncols : int, optional
The width of the entire output message. If specified,
dynamically resizes `{bar}` to stay within this bound
[default: None]. If `0`, will not print any bar (only stats).
The fallback is `{bar:10}`.
prefix : str, optional
Prefix message (included in total width) [default: ''].
Use as {desc} in bar_format string.
ascii : bool, optional or str, optional
If not set, use unicode (smooth blocks) to fill the meter
[default: False]. The fallback is to use ASCII characters
" 123456789#".
unit : str, optional
The iteration unit [default: 'it'].
unit_scale : bool or int or float, optional
If 1 or True, the number of iterations will be printed with an
appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
[default: False]. If any other non-zero number, will scale
`total` and `n`.
rate : float, optional
Manual override for iteration rate.
If [default: None], uses n/elapsed.
bar_format : str, optional
Specify a custom bar string formatting. May impact performance.
[default: '{l_bar}{bar}{r_bar}'], where
l_bar='{desc}: {percentage:3.0f}%|' and
r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
'{rate_fmt}{postfix}]'
Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
rate, rate_fmt, rate_noinv, rate_noinv_fmt,
rate_inv, rate_inv_fmt, postfix, unit_divisor,
remaining, remaining_s, eta.
Note that a trailing ": " is automatically removed after {desc}
if the latter is empty.
postfix : *, optional
Similar to `prefix`, but placed at the end
(e.g. for additional stats).
Note: postfix is usually a string (not a dict) for this method,
and will if possible be set to postfix = ', ' + postfix.
However other types are supported (#382).
unit_divisor : float, optional
[default: 1000], ignored unless `unit_scale` is True.
initial : int or float, optional
The initial counter value [default: 0].
colour : str, optional
Bar colour (e.g. 'green', '#00ff00').
Returns
-------
out : Formatted meter and stats, ready to display.
gà?N)Tr
Fr
z5.2fú?z/szs/)rÉrŽrpr)Úsecondséþÿÿÿr0z| ú/z [ú<r�rÙÚn_fmtÚtotalÚ total_fmtÚelapsedÚ elapsed_sÚncolsÚdescrÊÚrateÚrate_fmtÚ
rate_noinvÚrate_noinv_fmtÚrate_invÚ rate_inv_fmtÚpostfixÚ unit_divisor)r€Ú remainingÚ remaining_sÚl_barÚr_barÚetaédrÄz%|r[)r )Ú
percentagez{desc}: z{l_bar}{bar}{r_bar}ÚbarryT)rr€ú|)r r
r()rrÖrËr2Ú TypeErrorrÚnowrÚ
fromtimestamprÚutcÚ
OverflowErrorr{ÚupdaterØrÚformatÚ
format_calledrnrr�ržrrrrŸ)#rÙrùrûrýÚprefixÚasciirÊÚ
unit_scalerÿÚ
bar_formatrrÚinitialr€Ú extra_kwargsÚ elapsed_strÚinv_raterËrrrrørúrÚ
remaining_strÚeta_dtÚbool_prefix_colon_alreadyr r
Ú format_dictr}r
Úfull_barÚnobarr¨s# r*Ú format_meterztqdm.format_meterÐsD€ñL �Q˜5 3™;Ò'؈Eñ ˜*¨IÑ5ÙØ˜Ñ#�Ø
�‰OˆAÙØ˜
Ñ"�؈Jä×*Ñ*¨7Ó3ˆ ð ˆ<™Gؘ‘K 7Ñ*ˆDÙ#�1�t’8¨ˆÜ×*Ñ*ˆ
á!ñ3=™=¨Ô.ÀTÈ$ÁKØ'*¨dñ3Ø59ñ:ˆññ)3‰]˜8Ô
$¸8ÀD¹/Ø  Dñ)à+/ñ0ˆ ñ$,°¸1² ‘<À.ˆá Ù! !¨\Ô:ˆEØFKÐFW™
 e°\ÕBÐ]`‰I䘓FˆEØ&+Ð&7œ˜Eœ
¸SˆIð Ù(/�d˜W’n°RˆGñ+/±5�U˜Q‘Y $Ò&¸aˆ Ù;?œ×,Ñ,¨YÔ7ÀSˆ
ð "á¡%ô—l‘l“n¤y¸Ô'CÒCÜ-5×-CÑ-CÀAÄxÇ|Á|Ó-Tð
ñ à)/°°¨¸Ñ)<Ð %Ù7‘F¸VÀd¹]‰EàˆEà�U�G˜1˜Y˜K r¨+¨°a¸
°ÀbÈÈ
ÐSZÐR[Ð[\Ð]ˆðà �ðà˜Uðà$+¨Uðà4?Àðð
�{ðð%0°ðð
�Uð ð# F¢L¨bð ð39¸$ð ð
¡¨X¸ª\‘H¸tð ð
˜ð
ð #/°ð
ð
˜nðð/9¸(ðð
˜Lðð
�wðð!/° ððà&°yØ U°6òððˆ ò" à�u‘9ˆDØ ™ˆJà ˜
 4Ð(¨Ð+Ñ +ˆEà˜ŠzؘS˜b�z E¨!¨" IÑ-Ð-à × Ñ  UÐ Ô +ÙØ×"Ñ"¨jÐ"Ô9ñØ!+×!3Ñ!3°JÀÓ!C‘Jà2�
ä$“ˆHØ%�J×%Ñ%ÑB¨(ÐB°kÑBˆEØ×)Ò)Ø� ô˜4Ù>Cœ3˜q %¬(°5«/Ñ"9Ô:ÈØ05¸±
¤3§9¢9À5ÒCSÌCÏGÉGØ"(ô*ˆHô˜X×-Ñ-Ô.´9¸ZÔ3HÜ  ›_�
Ø#�*×#Ñ#Ñ@¨Ð@°KÑ@ˆCÙ,1”9˜S %Ó(Ð :°sÐ :á
à �S‰LˆEØ × Ñ  U°qÐ Ô 9Ü$“ˆHØ%�J×%Ñ%ÑB¨(ÐB°kÑBˆEØ×)Ò)Ø� ܘ1Ù>Cœ3˜q %¬(°5«/Ñ"9Ô:ÈÜ#&§9¡9°Vô=ˆHð$�*×#Ñ#Ñ@¨Ð@°KÑ@ˆCÙ,1”9˜S %Ó(Ð :°sÐ :ñ+1˜ š
°bÐ9Ø�g˜d˜V 2 k ]°"°X°J¸w¸iÀqðJð
Køôuò Ú ð ûôò "Ü—\‘\‹Fð "ús%Ã N*ÄA N:Î* N7Î6N7Î:OÏOcóÄ—tj|«}|j«5|jj |«|j
rB|j �|j j«s t||j
«|_ddd«|S#t$r/}tdt|«ztd¬«d|_Yd}~Œ=d}~wwxYw#1swY|SxYw)Nz>tqdm:disabling monitor support (monitor_interval = 0) due to:
rgrhr)
ÚobjectÚ__new__Úget_lockÚ
_instancesÚaddÚmonitor_intervalÚmonitorÚreportrÚ Exceptionr r2r")rUÚ_Ú__ÚinstanceÚes r*r)z tqdm.__new__—s€Ü—>‘> #Ó&ˆØ
�\‰\‹^ñ -Ø �N‰N× Ñ ˜xÔ (à×#Ò#¨¯©Ð)<Ø03· ± ×0BÑ0BÔ0Dð-Ü"*¨3°×0DÑ0DÓ"E�C”K÷
-ðˆøô !ò-Üð=Ü?BÀ1»vñFä+¸õ;ð,-�C×(Ñ(ûð -ú÷ -ðˆús0¦ACÁ5B CÂ#%C
ÃCÃ
CÃCÃCc óô—|jD�chc]'}||ur!t|d«rt|j«’Œ)}}t t t
t|«dz««j|««Scc}w)zSkips specified instance.Úposr
) r+rdrÆr6r|Úsetr¬r’Ú
difference)rUr3ÚinstÚ positionss r*Ú
_get_free_posztqdm._get_free_pos§so€ð03¯~©~öG tØ HÑ,´¸¸uÔ1Eô˜Ÿ™•]ðGˆ ðGä”3”uœS ›^¨aÑ/Ó0Ó1×<Ñ<¸YÓGÓHÐHùòGs�,A5c󘇗|j5 |jj|«|jsq|j
xsddz
Št
tˆfd„|j««}|r:t|d„¬«}|jd¬«t|j«|_ ddd«y#t$rYŒ‘wxYw#1swYyxYw) a5
Remove from list and reposition another unfixed bar
to fill the new gap.
This means that by default (where all nested bars are unfixed),
order is not maintained but screen flicker/blank space is minimised.
(tqdm<=4.44.1 moved ALL subsequent unfixed bars up.)
ér
có>•—t|d«xr‰|jkS)Nr6)rdr6)rŠr´s €r*rßz&tqdm._decr_instances.<locals>.<lambda>Äsø€œg a¨Ó/ÒA°D¸A¿E¹E±M€r)có—|jSr;©r6)rŠs r*rßz&tqdm._decr_instances.<locals>.<lambda>Ès
€¸¿¹€r))ÚkeyT©ÚnolockN) Ú_lockr+Úremover•ÚguiÚnrowsÚlistÚfilterr|ÚclearrÆr6)rUr3Ú instancesr9r´s @r*Ú_decr_instancesztqdm._decr_instances®s¹ø€ð�Y‰Yñ 1ð
Ø—‘×%Ñ% hÔ/ð —<’<Ø Ÿ™Ò,¨"°Ñ1�ä ¤ÛAØ—N‘Nó"$ó%� ñܘy©oÔ>�DØ—J‘J d�JÔ+Ü" 8§<¡<Ó0�D”H÷% 1ð 1øôò
ñð
ú÷ 1ð 1ús.ŽC�B1«A=CÂ1 B=Â:CÂ<B=Â=CÃC cóÀ—|�|ntj}|j||¬«5|j|«|j|«ddd«y#1swYyxYw)z5Print a message via tqdm (without overlap with bars).N)rðrC)rírïÚexternal_write_moderä)rUrÓrðÚendrCrås r*räz
tqdm.writeÌsR€ðÐ%‰T¬3¯:©:ˆØ
×
$Ñ
$¨$°vÐ
$Ó
>ñ à �H‰H�QŒKØ �H‰H�SŒM÷ ÷ ñ ús ¨#AÁAc#óK—|�|ntj} |s|j«j«g}t |dg«D]`}t |d«sŒ|j |k(std„||j fD««sŒ>|jd¬«|j|«Œbd–—|D]}|jd¬«Œ |s|jj«yy#|s|jj«wwxYw­w)z€
Disable tqdm within context and refresh tqdm when exits.
Useful when writing to standard output stream
Nr+Ústart_tc3ó`K—|]&}|tjtjfv–—Œ(y­wr;)rírïrî)r‰rÚs r*r‹z+tqdm.external_write_mode.<locals>.<genexpr>çs+èø€òFNØ:;˜œcŸj™j¬#¯*©*Ð5Ô5ñFNùs‚,.TrB)
rírïr*rPrìrdråÚallrJÚappendÚrefreshrDrT)rUrðrCråÚ inst_clearedr9s r*rNztqdm.external_write_modeÕs÷èø€ðÐ%‰T¬3¯:©:ˆð $ÙØ— ‘ “×&Ñ&Ô(àˆLÜ  \°2Ó6ò
.�ô˜4 Õ+°·±¸B²Ä#ñFNØ@BÀDÇGÁG¸}ôFNõCNà—J‘J d�JÔ+Ø ×'Ñ'¨Õ-ð
.ó
à$ò
*�Ø— ‘  D� Õ)ñ
*ñØ— ‘ ×!Ñ!Õ#ðø‘6Ø— ‘ ×!Ñ!Õ#ðüs)‚D˜>C&Á-C&ÂAC&ÃDÃ&DÄDcó—||_y)zSet the global lock.N)rD)rUrYs r*Úset_lockz
tqdm.set_lockós €ðˆ� r)cóP—t|d«st«|_|jS)z7Get the global lock. Construct it if it does not exist.rD)rdrLrDrjs r*r*z
tqdm.get_lockøs"€ô�s˜GÔ$Ü,Ó.ˆCŒIØ�y‰yÐr)c 󘇇‡
‡‡—ddlm}m}ddlm}ddlmŠ
 |«5|dt¬«ddlm }ddd«d \}} dd
l m Š dd
lm}ddlm}  ddlm}
 ddlm} ‰j1«Š‰j3dd«gŠdˆ
ˆˆˆˆfd„ } | «‰
_| «|_| d«‰
_| d«|_| «|_| «| _| d«|_| d«|_| d«| _� | «|_| � | «| _| «|
_| d«|
_| d«|
_|�|�| «|_| «|_y‰�
| «‰_yy#1swY�Œ>xYw#t$rd}Y�ŒOwxYw#t$r> dd
l
m Šn2#t$r& dd lm}dd l m}||fŠn#t$rdŠYnwxYwYnwxYwY�Œ�wxYw#t$r% ddlm} m}n#t$r ddlm} m}YnwxYwY�Œ±wxYw#t$r
ddlm}
Y�ŒÀwxYw#t$r ddlm} n#t$rd} YnwxYwY�ŒâwxYw)ae
Registers the current `tqdm` class with
pandas.core.
( frame.DataFrame
| series.Series
| groupby.(generic.)DataFrameGroupBy
| groupby.(generic.)SeriesGroupBy
).progress_apply
A new instance will be created every time `progress_apply` is called,
and each instance will automatically `close()` upon completion.
Parameters
----------
tqdm_kwargs : arguments for the tqdm instance
Examples
--------
>>> import pandas as pd
>>> import numpy as np
>>> from tqdm import tqdm
>>> from tqdm.gui import tqdm as tqdm_gui
>>>
>>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
>>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc
>>> # Now you can use `progress_apply` instead of `apply`
>>> df.groupby(0).progress_apply(lambda x: x**2)
References
----------
<https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python>
r)Úcatch_warningsÚ simplefilter)Ú DataFrame)ÚSeriesÚignore)Úcategory)ÚPanelN©NN)Ú_Rolling_and_Expanding)Ú Expanding)ÚRolling)Ú
SeriesGroupBy)ÚDataFrameGroupBy)rgrf)ÚGroupBy)Ú PanelGroupByÚ deprecated_tc󕇗ˆˆˆˆˆˆfd„}|S)Nc󿕇‡—‰jdt|dd««}|€u‰
dk(r
|j}nct|‰ «r t |«}nK‰
� t|‰
«s=|j dd«}|dk(rd}n|dk(rd }|j|j |z}‰ d� ‰ dŠd‰ d<n
‰ dd|i‰¤ŽŠt |«dkDr:td
t‰jd tjj«¬ « dd
l m
} |‰«Šˆˆfd„} t|‰
«|fi|¤Ž‰j#«S#t$r|j}YŒJwxYw#t $rYŒPwxYw#‰j#«wxYw)aT
Parameters
----------
df : (DataFrame|Series)[GroupBy]
Data (may be grouped).
func : function
To be applied on the (grouped) data.
**kwargs : optional
Transmitted to `df.apply()`.
rùÚngroupsNÚapplymapÚaxisrÚindexÚcolumnsr
zŒExcept func, normal arguments are intentionally not supported by `(DataFrame|Series|GroupBy).progress_apply`. Use keyword arguments instead.rä©r8)Úis_builtin_funcc󆕗‰j‰jr‰j‰jkrdnd¬«‰|i|¤ŽS)Nr
r)rÙ)rrùrÙ)rHrIÚfuncrÑs €€r*ÚwrapperzDtqdm.pandas.<locals>.inner_generator.<locals>.inner.<locals>.wrapperŠs9ø€ð
—H‘H¨¯ª°1·3±3¸¿¹²=™qÀa�HÔHÙ Ð0¨Ñ0Ð0r)r()ÚpoprìÚsizeÚ
isinstancer’ÚgetÚshaper!rårírîräÚpandas.core.commonrsrFÚ_is_builtin_funcrÚclose)ÚdfrurHrIrùrorsrvrÑr^rcrUrjÚ df_functionÚ tqdm_kwargss ` @€€€€€€r*Úinnerz3tqdm.pandas.<locals>.inner_generator.<locals>.innerRswú€ð$Ÿ™¨´¸¸YÈÓ1MÓN�Ø�=Ø" jÒ0Ø "§¡™Ü# B¨Ô/Ü # B£™Ø0Ð8Ü(¨Ð-CÔDà%Ÿz™z¨&°!Ó4˜Ø 7š?Ø#$™DØ! YÒ.Ø#$˜Dà "§¡¨2¯8©8°D©>Ñ 9˜ð  ‘?Ð.Ø$ Q™�AØ&*�L ’OáÑ7 %Ð7¨;Ñ7�Aä�t“9˜q’=ä*ð:ô")¨¯©¨w¼¿
¹
×8HÑ8HÓ!Iõ Kð:ÝBðÙ*¨4Ó0�Dõ
1ðØ3œ7 2 {Ó3°GÑF¸vÑFà—G‘G•Iøô+#ò:Ø&(×&9Ñ&9’Oð:ûô!òÙðûð"—G‘G•Iús0Ã;D4ÄEÄEÄ4E Å E Å EÅEÅE0r()r€r‚r^rcrUrjr�s` €€€€€r*Úinner_generatorz$tqdm.pandas.<locals>.inner_generatorQsù€÷E
ñE
ðNˆLr)rªrnÚ aggregateÚ transform)Úapply)Úwarningsr[r\Úpandas.core.framer]Úpandas.core.seriesr^Ú
FutureWarningÚpandasrarFÚpandas.core.window.rollingrcÚpandas.core.windowÚpandas.core.window.expandingrdreÚpandas.core.groupby.genericrfrgÚpandas.core.groupby.groupbyÚpandas.core.groupbyrhriÚcopyrwÚprogress_applyÚ progress_mapÚprogress_applymapÚprogress_aggregateÚprogress_transform)rUr�r[r\r]rarerdrfrgrhrirƒr^rcrjs`` @@@r*r‹z tqdm.pandasÿskü€÷F :å/Ý-ð ÙÓ!ñ
)Ù˜X´
Õ>Ý(÷
)ð
(ш�ð 2Ý Ið PÝ AÝ Dð  4Ý ;ð $Ý @ð"×&Ñ&Ó(ˆ Ø#Ÿ™¨¸Ó=Ð>ˆ ÷H ñH ñX!0Ó 1ˆÔÙ'6Ó'8ˆ
Ô$Ù-¨eÓ4ˆÔÙ%4°UÓ%;ˆ
Ô"á#2Ó#4ˆ Ô Ù*9Ó*;ÐÔ'Ù&5°jÓ&Aˆ Ô#Ù!0°Ó!7ˆ ÔÙ(7¸Ó(>ÐÔ%à Ð Ù#2Ó#4ˆEÔ Ø Ð #Ù*9Ó*;ˆLÔ 'á!0Ó!2ˆÔÙ%4°[Ó%AˆÔ"Ù%4°[Ó%AˆÔ"à Ð  9Ð#8Ù%4Ó%6ˆGÔ "Ù'6Ó'8ˆIÕ $Ø
#Ð
/Ù4CÓ4EÐ "Õ 1ð0÷[
)ñ
)ûôò Ø‹Eð ûô
ò 2ð
2ÞEøÜò
2ð2ÝFÝBØ-4°iÐ-?Ñ*øÜ"ò2Ø-1Ò*ð2üð 
2ýð 2ûôò Pð
PßWÐWøÜò
PßOÑOð
Pýð Pûôò 4ß 3Ð 3ð 4ûô
ò $ð
$Þ<øÜò
$Ø#’ ð
$ýð $úsÿ›F¢E3·FÁFÁ GÁH
Á H#Å3E=Å8FÆ FÆFÆ GÆF#Æ"GÆ# GÆ-F>Æ=GÆ> G Ç GÇ G Ç GÇGÇGÇGÇGÇ H
Ç&G/Ç.H
Ç/HÈH
ÈHÈH
È H
È
H ÈH È# I È-H4È3I È4 IÈ?I ÉIÉI ÉI ÚTQDM_T)rùrýÚminitersÚpositionrG)Ú is_methodÚtypesc óJ—|€tj}|rt|t|dd«xsd¬«}t ||¬«}| €t |d«r|j
«sd} |€|� t|«}|td«k(rd}| rj||_ | |_ |j5|j|«|_|j j#|«ddd«||_||_||_y|r˜d|_ |j5|j|«|_|j j#|«ddd«d |vr0t+d
t|d tjj,«¬ «‚t/d
t1|«z«‚|�|€"|tjtj2fvs|r9|rt5«}|r+||«\}}nt5«}|r||«\}}|€|}|€|}| €d} d}nd}|€d}|€d}|
€ t7|« }
|r|
durt9|
«s t1|«}|€d}||_ |xsd|_||_||_||_||_||_ ||_!||_"| |_#||_$|
|_%| |_ | |_&|
|_'||_(||_)||_*||_+||_,||_-||_.t_|«|_0t_|«|_1t_|«|_2||_3d|_4||_5tl|_7|r |jpdddi|¤Ž||_9||_|j5|€|j|«n| |_ddd«|sA|ju|j<«|_;|dkr|jy|jT¬«|jo«|_=|jz|_>y#ttf$rd}Y�ŒwwxYw#1swY�ŒxYw#1swY�ŒÇxYw#t$r
||_4YŒìwxYw#1swYŒ»xYw)zsee tqdm.tqdm for argumentsNÚencodingzutf-8)rž)Ú
tqdm_instanceÚisattyTÚinfÚnestedzQ`nested` is deprecated and automated.