CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
progress.cpython-310.pyc503 linesDownload Raw Back to __pycache__
1o

2��Yi���@s�ddlmZddlZddlZddlZddlmZmZddlm	Z	ddl3mZmZddl
mZddlmZmZddlmZdd	lmZdd4lmZddlmZmZddlmZmZmZdd
lmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1er�ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8m9Z9m:Z:m;Z;ddl<m=Z=ddl>m?Z?ddl@mAZAddlBmCZCddlDmEZEddlFmGZGddlHmIZImJZJddlKmLZLmMZMe+deN�ZOe0d�ZPe"geQfZRe�0de-e!�ZSGdd�de�ZT	 			!		"		#	$	%	&	'	(	"	!d�d�dCdD�ZUGdEdF�dFee!�ZVGdGdH�dHe#eSe&eS�ZWdId!dd"dd#d$d%d&d'd"dJ�d�dNdO�ZXejY	P			d�ddId!dd"dd#d$d%d&d'd"dQ�d�d\d]��ZZejY	P			d�ddId!dd"dd#d$d%d&d'd"dQ�d�d_d]��ZZ	`	P			d�ddId!dd"dd#d$d%d&d'd"dQ�d�dcd]�ZZGddde�dee�Z[Gdfdg�dge[�Z\Gdhdi�die[�Z]Gdjdk�dke[�Z^Gdldm�dme[�Z_Gdndo�doe[�Z`Gdpdq�dqe^�ZaGdrds�dse[�ZbGdtdu�due[�ZcGdvdw�dwe[�ZdGdxdy�dye[�ZeGdzd{�d{e[�ZfGd|d}�d}e[�ZgGd~d�de*�ZheGd�d��d���ZiGd�d��d�e?�Zjekd�k�r�ddllZlddlmZmdd�lnmoZodd�lpmqZqdd�lrmsZsdd�lHmJZJesd�d�d!d��ZreJd�d�d��ZHeH�td�d�d��d�eod��d�eHd�d�d�d��d�ereqd��g	Zudd�lvmwZweweu�Zxe8d!d��Z7eje]�gej�y��e`��Re7d"d����QZzezj{d�d�d��Z|ezj{d�d�d��Z}ezj{d�dd��Z~ezj�s�ezj�e|d�d��ezj�e}d�d��em��d��el��dd��dk�r�ez��e�ex��ezj�r�Wd�dSWd�dS1�s�wYdSdS)��)�annotationsN)�ABC�abstractmethod��deque)�	dataclass�field)�	timedelta)�	RawIOBase�UnsupportedOperation)�ceil)�mmap)�length_hint)�PathLike�stat)�Event�RLock�Thread)�
TracebackType)�
TYPE_CHECKING�Any�BinaryIO�Callable�ContextManager�Deque�Dict�Generic�Iterable�List�Literal�5NamedTuple�NewType�Optional�TextIO�Tuple�Type�TypeVar�Union)�Self�)�filesize�get_console)�Console�Group�
JustifyMethod�RenderableType)�Highlighter)�JupyterMixin)�Live)�ProgressBar)�Spinner)�	StyleType)�Column�Table)�Text�TextType�TaskID�ProgressType�_Ics@eZdZdZd�fdd	�Zddd
�Zddd�Zddd�Z�ZS)�_TrackThreadz)A thread to periodically update progress.�progress�6'Progress'�task_id�'TaskID'�
update_period�floatcs2||_||_||_t�|_d|_t�jdd�dS)NrT)�daemon)r>r@rBr�done�	completed�super�__init__)�selfr>r@rB��	__class__���E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\pip/_vendor/rich/progress.pyrHCsz_TrackThread.__init__�return�NonecCs~|j}|jj}|j}d}|jj}||�s2|jjjr2|j}||kr)||||�|}||�s2|jjjs|jj	|j|jdd�dS)NrT)rF�refresh)7r@r>�advancerBrE�wait�live�8is_startedrF�update)rIr@rQrB�last_completedrRrFrLrLrM�runLs�z_TrackThread.run�'_TrackThread'cC�|��|S�N��start�rIrLrLrM�	__enter__Z�z_TrackThread.__enter__�exc_type�Optional[Type[BaseException]]�exc_val�Optional[BaseException]�exc_tb�Optional[TracebackType]cCs|j��|��dSrZ)rE�set�join�rIr`rbrdrLrLrM�__exit__^s9z_TrackThread.__exit__)r>r?r@rArBrC�rNrO)rNrX�r`rarbrcrdrerNrO)	�__name__�10__module__�__qualname__�__doc__rHrWr^ri�
__classcell__rLrLrJrMr=@s11	12r=�13Working...TF�14�bar.back�bar.complete�bar.finished�	bar.pulse皙�����?�sequence�Iterable[ProgressType]�description�str�total�Optional[float]rF�int�auto_refresh�bool�console�Optional[Console]�	transient�get_time�Optional[Callable[[], float]]�refresh_per_secondrC�styler5�complete_style�finished_style�pulse_stylerB�disable�15show_speedrNc	cs��|rtd�gng}|�t|	|16||d�t|d�tdd�f�t||||||p'd|d��}|�|j|||||
d�Ed	HWd	�d	S1sGwYd	S)17a�Track progress by iterating over a sequence.18 19    You can also track progress of an iterable, which might require that you additionally specify ``total``.20 21    Args:22        sequence (Iterable[ProgressType]): Values you wish to iterate over and track progress.23        description (str, optional): Description of task show next to progress bar. Defaults to "Working".24        total: (float, optional): Total number of steps. Default is len(sequence).25        completed (int, optional): Number of steps completed so far. Defaults to 0.26        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.27        transient: (bool, optional): Clear the progress on exit. Defaults to False.28        console (Console, optional): Console to write to. Default creates internal Console instance.29        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.30        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".31        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".32        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".33        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".34        update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.35        disable (bool, optional): Disable display of progress.36        show_speed (bool, optional): Show speed if total isn't known. Defaults to True.37    Returns:38        Iterable[ProgressType]: An iterable of the values in the sequence.39 40    �([progress.description]{task.description}�r�r�r�r�)r�T)�elapsed_when_finishedrr�rr�r�r�r�r�)r|rFrzrBN)�41TextColumn�extend�	BarColumn�TaskProgressColumn�TimeRemainingColumn�Progress�track)rxrzr|rFrr�r�r�r�r�r�r�r�rBr�r��columnsr>rLrLrMr�hs@�,�����42�"�r�c@seZdZdZ	dQdRd
d�ZdSdd�ZdTdd�ZdUdd�ZdVdd�Ze	dWdd ��Z43dXd"d#�ZdWd$d%�Ze	dYd'd(��Z
e	dYd)d*��ZdWd+d,�ZdWd-d.�ZdWd/d0�ZdZd[d3d4�Zd\d7d8�ZdZd[d9d:�ZdZd]d=d>�Zd^d?d@�Zd_d`dDdE�ZdXdFdG�ZdadJdK�ZdbdNdO�ZdPS)c�_Readerz9A reader that tracks progress while it's being read from.T�handlerr>r?�taskr:�close_handler�rNrOcCs"||_||_||_||_d|_dS�NF)r�r>r�r��_closed)rIr�r>r�r�rLrLrMrH�s4445z_Reader.__init__�	'_Reader'cCs|j��|SrZ)r�r^r]rLrLrMr^�s46z_Reader.__enter__r`rarbrcrdrecC�|��dSrZ)�closerhrLrLrMri��z_Reader.__exit__cCs|SrZrLr]rLrLrM�__iter__��z_Reader.__iter__�bytescCs$t|j�}|jj|jt|�d�|S�N�rQ)�nextr�r>rQr��len)rI�linerLrLrM�__next__�s47z_Reader.__next__cC�|jSrZ)r�r]rLrLrM�closed�sz_Reader.closedr~cC�48|j��SrZ)r��filenor]rLrLrMr���49z_Reader.filenocCr�rZ)r��isattyr]rLrLrMr��r�z_Reader.isattyr{cC�|jjSrZ)r��moder]rLrLrMr���z_Reader.modecCr�rZ)r��namer]rLrLrMr��r�z_Reader.namecCr�rZ)r��readabler]rLrLrMr��r�z_Reader.readablecCr�rZ)r��seekabler]rLrLrMr��r�z_Reader.seekablecC�dSr�rLr]rLrLrM�writable�r�z_Reader.writable������sizecC�&|j�|�}|jj|jt|�d�|Sr�)r��readr>rQr�r�)rIr��blockrLrLrMr���z_Reader.read�b�"Union[bytearray, memoryview, mmap]cCs"|j�|�}|jj|j|d�|Sr�)r��readintor>rQr�)rIr��nrLrLrMr��sz_Reader.readintocCr�r�)r��readliner>rQr�r�)rIr�r�rLrLrMr��r�z_Reader.readline�hint�List[bytes]cCs,|j�|�}|jj|jttt|��d�|Sr�)r��	readlinesr>rQr��sum�mapr�)rIr��linesrLrLrMr�sz_Reader.readlinescCs|jr|j��d|_dS)NT)r�r�r�r�r]rLrLrMr�	s5051z
_Reader.closer�offset�whencecCs$|j�||�}|jj|j|d�|S)N�rF)r��seekr>rUr�)rIr�r��posrLrLrMr�sz_Reader.seekcCr�rZ)r��tellr]rLrLrMr�r�z_Reader.tell�srcC�td��)N�write�r)rIr�rLrLrMr��z
_Reader.writer��
Iterable[Any]cCr�)N�52writelinesr�)rIr�rLrLrMr�r�z_Reader.writelinesN)T)53r�rr>r?r�r:r�r�rNrO)rNr�rk)rNr)rNr��rNr�)rNr~)rNr{)r�)r�r~rNr�)r�r�)r�r~rNr�rj)r)r�r~r�r~rNr~)r�rrNr~)r�r�rNrO)rlrmrnrorHr^rir�r��propertyr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rLrLrLrMr��s8�54
555657585960616263646566r�c@s.eZdZdZddd	�Zdd67d�Zddd�ZdS)�_ReadContextzEA utility class to handle a context for both a reader and a progress.r>r?�readerr<rNrOcCs||_||_dSrZ)r>r�)rIr>r�rLrLrMrH s68z_ReadContext.__init__cCs|j��|j��SrZ)r>r\r�r^r]rLrLrMr^$s6970z_ReadContext.__enter__r`rarbrcrdrecCs|j��|j�|||�dSrZ)r>�stopr�rirhrLrLrMri(s71z_ReadContext.__exit__N)r>r?r�r<rNrO)rNr<rk)rlrmrnrorHr^rirLrLrLrMr�s727374r��75Reading...)rzrr�r�r�r�r�r�r�r�r��filer�ContextManager[BinaryIO]c	Csh|rtd�gng}
|
�t||	|76|d�t�t�f�t|
|||||p"d|d��}|j|||d�}t||�S)aRead bytes from a file while tracking progress.77 78    Args:79        file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.80        total (int): Total number of bytes to read.81        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".82        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.83        transient: (bool, optional): Clear the progress on exit. Defaults to False.84        console (Console, optional): Console to write to. Default creates internal Console instance.85        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.86        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".87        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".88        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".89        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".90        disable (bool, optional): Disable display of progress.91    Returns:92        ContextManager[BinaryIO]: A context manager yielding a progress reader.93 94    r�r�rrr�)r|rz)r�r�r��DownloadColumnr�r��	wrap_filer�)r�r|rzrr�r�r�r�r�r�r�r�r�r�r>r�rLrLrMr�2s0%�����95 96r�r�)r|rzrr�r�r�r�r�r�r�r�r��"Union[str, 'PathLike[str]', bytes]r��"Union[Literal['rt'], Literal['r']]�	buffering�encoding�
Optional[str]�errors�newline�
Optional[int]�ContextManager[TextIO]cC�dSrZrL�r�r�r�r�r�r�r|rzrr�r�r�r�r�r�r�r�r�rLrLrM�opens�r��
Literal['rb']cCr�rZrLr�rLrLrMr��r��r�1Union[Literal['rb'], Literal['rt'], Literal['r']]�7Union[ContextManager[BinaryIO], ContextManager[TextIO]]c97Csr|rtd�gng}|�t|
|||d�t�t�f�t|||	|98||p"d|d��}|j||||||||d�}t||�S)a�Read bytes from a file while tracking progress.99 100    Args:101        path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.102        mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".103        buffering (int): The buffering strategy to use, see :func:`io.open`.104        encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.105        errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.106        newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`107        total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.108        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".109        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.110        transient: (bool, optional): Clear the progress on exit. Defaults to False.111        console (Console, optional): Console to write to. Default creates internal Console instance.112        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.113        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".114        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".115        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".116        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".117        disable (bool, optional): Disable display of progress.118        encoding (str, optional): The encoding to use when reading in text mode.119 120    Returns:121        ContextManager[BinaryIO]: A context manager yielding a progress reader.122 123    r�r�rrr�)r�r�r�r�r�r|rz)r�r�r�r�r�r�r�r�)r�r�r�r�r�r�r|rzrr�r�r�r�r�r�r�r�r�r�r>r�rLrLrMr��sB1�����124�125 126c@sLeZdZUdZdZded<ddd	d127�Zddd
�Zddd�Ze	ddd��Z128dS)�ProgressColumnz3Base class for a widget to use in progress display.Nr}�max_refresh�table_column�Optional[Column]rNrOcCs||_i|_d|_dSrZ)�
_table_column�_renderable_cache�_update_time)rIr�rLrLrMrHs129zProgressColumn.__init__r6cCs|jpt�S)z.Get a table column, used to build tasks table.)r�r6r]rLrLrM�get_table_columnszProgressColumn.get_table_columnr��'Task'r/cCsp|��}|jdur)|js)z130|j|j\}}Wn	tyYn131w||j|kr)|S|�|�}||f|j|j<|S)aCalled by the Progress object to return a renderable for the given task.132 133        Args:134            task (Task): An object containing information regarding the task.135 136        Returns:137            RenderableType: Anything renderable (including str).138        N)r�r�rFr��id�KeyError�render)rIr��current_time�	timestamp�139renderablerLrLrM�__call__	s	�140zProgressColumn.__call__cCr�)z"Should return a renderable object.NrL�rIr�rLrLrMr� szProgressColumn.renderrZ)r�r�rNrO)rNr6�r�r�rNr/)rlrmrnror��__annotations__rHr�rrr�rLrLrLrMr��s141142143r�cs6eZdZdZ	ddd�d�fd	d144�Zddd�Z�ZS)�RenderableColumnz�A column to insert an arbitrary column.145 146    Args:147        renderable (RenderableType, optional): Any renderable. Defaults to empty string.148    �N�r�rr/r�r�c�||_t�j|d�dS�Nr)rrGrH)rIrr�rJrLrMrH,�zRenderableColumn.__init__r�r�rNcCr�rZ)rrrLrLrMr�2szRenderableColumn.render)r)rr/r�r�r�rlrmrnrorHr�rprLrLrJrMr%s��rcsHeZdZdZ					dd�fdd�
Z		dd dd�Zd!dd�Z�ZS)"�
SpinnerColumna�A column with a 'spinner' animation.149 150    Args:151        spinner_name (str, optional): Name of spinner animation. Defaults to "dots".152        style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".153        speed (float, optional): Speed factor of spinner. Defaults to 1.0.154        finished_text (TextType, optional): Text used when task is finished. Defaults to " ".155    �dots�progress.spinner��?� N�spinner_namer{r��Optional[StyleType]�speedrC�
finished_textr9r�r�cs<t|||d�|_t|t�rt�|�n||_t�j|d�dS)N�r�rr)	r4�spinner�156isinstancer{r8�from_markuprrGrH)rIrr�rrr�rJrLrMrH@s��zSpinnerColumn.__init__�
spinner_stylerNrOcCst|||d�|_dS)a-Set a new spinner.157 158        Args:159            spinner_name (str): Spinner name, see python -m rich.spinner.160            spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".161            speed (float, optional): Speed factor of spinner. Defaults to 1.0.162        rN)r4r)rIrrrrLrLrM�set_spinnerPs
zSpinnerColumn.set_spinnerr�r�r/cCs$|jr|j}|S|j�|���}|SrZ)�finishedrrr�r�)rIr��textrLrLrMr�_s����zSpinnerColumn.render)rrrrN)163rr{r�rrrCrr9r�r�)rr)rr{rrrrCrNrOr)rlrmrnrorHrr�rprLrLrJrMr
6s��r
cs8eZdZdZ					dd�fdd�
Zddd�Z�ZS)r�zA column containing text.�none�leftTN�text_formatr{r�r5�justifyr.�markupr��highlighter�Optional[Highlighter]r�r�rNrOcs:||_||_||_||_||_t�j|ptdd�d�dS)NT��no_wrapr)r r!r�r"r#rGrHr6)rIr r�r!r"r#r�rJrLrMrHks	zTextColumn.__init__r�r�r8cCsR|jj|d�}|jrtj||j|jd�}n	t||j|jd�}|jr'|j�|�|S�N�r�)r�r!)	r �formatr"r8rr�r!r#�	highlight)rIr��_textrrLrLrMr�{szTextColumn.render)rrTNN)r r{r�r5r!r.r"r�r#r$r�r�rNrO�r�r�rNr8rrLrLrJrMr�hs�r�cs:eZdZdZ						dd�fdd�
Zddd�Z�ZS)r�aRenders a visual progress bar.164 165    Args:166        bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.167        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".168        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".169        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".170        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".171    �(rsrtrurvN�	bar_widthr�r�r5r�r�r�r�r�rNrOcs0||_||_||_||_||_t�j|d�dSr172)r.r�r�r�r�rGrH)rIr.r�r�r�r�r�rJrLrMrH�s	zBarColumn.__init__r�r�r3cCs^t|jdurtd|j�ndtd|j�|jdurdntd|j�|j|��|j|j|j	|j173d�	S)z&Gets a progress bar widget for a task.Nrr))	r|rF�width�pulse�animation_timer�r�r�r�)r3r|�maxrFr.�startedr�r�r�r�r�rrLrLrMr��s174�zBarColumn.render)r-rsrtrurvN)r.r�r�r5r�r5r�r5r�r5r�r�rNrO)r�r�rNr3rrLrLrJrMr��s�r�c@�eZdZdZd	dd�ZdS)175�TimeElapsedColumnzRenders time elapsed.r�r�rNr8cCsJ|jr|jn|j}|durtddd�Sttdt|��d�}tt|�dd�S)zShow time elapsed.N�-:--:--�progress.elapsed�r�r)�seconds)r�
finished_time�elapsedr8r	r2r~r{)rIr�r;�deltarLrLrMr��s176zTimeElapsedColumn.renderNr,�rlrmrnror�rLrLrLrMr5��r5csLeZdZdZ								d$d%�fdd�
Zed&dd��Zd'd"d#�Z�ZS)(r�aShow task progress as a percentage.177 178    Args:179        text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".180        text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".181        style (StyleType, optional): Style of output. Defaults to "none".182        justify (JustifyMethod, optional): Text justification. Defaults to "left".183        markup (bool, optional): Enable markup. Defaults to True.184        highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.185        table_column (Optional[Column], optional): Table Column to use. Defaults to None.186        show_speed (bool, optional): Show speed if total is unknown. Defaults to False.187    �-[progress.percentage]{task.percentage:>3.0f}%rrrTNFr r{�text_format_no_percentager�r5r!r.r"r�r#r$r�r�r�rNrOc		s(||_||_t�j||||||d�dS)N)r r�r!r"r#r�)r@r�rGrH)	rIr r@r�r!r"r#r�r�rJrLrMrH�s188�zTaskProgressColumn.__init__rr}r8cCsN|dur189tddd�St�t|�gd�d�\}}||}t|d�|�d�dd�S)	z�Render the speed in iterations per second.190 191        Args:192            task (Task): A Task object.193 194        Returns:195            Text: Text object containing the task speed.196        Nrzprogress.percentager8)ru×10³u×10⁶u×10⁹u×10¹²��z.1fz it/s)r8r*�pick_unit_and_suffixr~)�clsr�unit�suffix�197data_speedrLrLrM�render_speed�s198�zTaskProgressColumn.render_speedr�r�cCs�|jdur|jr|�|jp|j�S|jdur|jn|j}|j|d�}|jr0t	j199||j|jd�}n	t	||j|jd�}|j
rB|j
�|�|Sr')r|r�rG�finished_speedrr@r r)r"r8rr�r!r#r*)rIr�r r+rrLrLrMr��s�zTaskProgressColumn.render)r?rrrTNNF)r r{r@r{r�r5r!r.r"r�r#r$r�r�r�r�rNrO)rr}rNr8r,)	rlrmrnrorH�classmethodrGr�rprLrLrJrMr��s�r�cs8eZdZdZdZ			dd�fd200d�
Zddd�Z�ZS)r�aRenders estimated time remaining.201 202    Args:203        compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.204        elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.205    ��?FN�compactr�r�r�r�cs||_||_t�j|d�dSr206)rKr�rGrH)rIrKr�r�rJrLrMrHszTimeRemainingColumn.__init__r�r�rNr8cCs�|jr|jr|j}d}n|j}d}|jdurtd|d�S|dur.t|jr)d|d�Sd|d�Stt|�d�\}}t|d�\}}|jrM|sM|d	�d207|d	��}n
|d�d208|d	�d209|d	��}t||d�S)zShow time remaining.r7zprogress.remainingNrr8z--:--r6�<�02d�:�d)	r�rr:�time_remainingr|r8rK�divmodr~)rIr��	task_timer��minutesr9�hours�	formattedrLrLrMr�s210211zTimeRemainingColumn.render)FFN)rKr�r�r�r�r�r,)rlrmrnror�rHr�rprLrLrJrMr�s�212r�c@r4)213�FileSizeColumnzRenders completed filesize.r�r�rNr8cCst�t|j��}t|dd�S)�Show data completed.zprogress.filesizer8)r*�decimalr~rFr8�rIr��	data_sizerLrLrMr�7szFileSizeColumn.renderNr,r=rLrLrLrMrV4r>rVc@r4)214�TotalFileSizeColumnzRenders total filesize.r�r�rNr8cCs*|jdur
t�t|j��nd}t|dd�S)rWNrzprogress.filesize.totalr8)r|r*rXr~r8rYrLrLrMr�@szTotalFileSizeColumn.renderNr,r=rLrLrLrMr[=r>r[cs.eZdZdZdd�fdd	�
Zddd�Z�ZS)�MofNCompleteColumnaHRenders completed count/total, e.g. '  10/1000'.215 216    Best for bounded tasks with int quantities.217 218    Space pads the completed count so that progress length does not change as task progresses219    past powers of 10.220 221    Args:222        separator (str, optional): Text to separate completed and total values. Defaults to "/".223    �/N�	separatorr{r�r�cr	r224)r^rGrH)rIr^r�rJrLrMrHRszMofNCompleteColumn.__init__r�r�rNr8cCsPt|j�}|jdurt|j�nd}tt|��}t||�d��|j�|��dd�S)zShow completed/total.N�?rO�progress.downloadr8)r~rFr|r�r{r8r^)rIr�rFr|�total_widthrLrLrMr�Vs225�zMofNCompleteColumn.render)r]N)r^r{r�r�r,rrLrLrJrMr\Fsr\cs0eZdZdZ	dd�fd226d�
Zddd�Z�ZS)r�z�Renders file size downloaded and total, e.g. '0.5/2.3 GB'.227 228    Args:229        binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.230    FN�binary_unitsr�r�r�rNrOcr	r231)rbrGrH)rIrbr�rJrLrMrHhrzDownloadColumn.__init__r�r�r8cCs�t|j�}|jdurt|j�n|}|jr t�|gd�d�\}}nt�|gd�d�\}}|dkr1dnd}||}|d|�d	��}|jdurVt|j�}	|	|}232|233d|�d	��}nd234}|�d|�d|��}t|d
d�}
|
S)z.Calculate common unit for completed and total.N)	r��KiB�MiB�GiB�TiB�PiB�EiB�ZiB�YiBi)	r��kB�MB�GB�TB�PB�EB�ZB�YBrAr)rz,.�fr_r]rr`r8)r~rFr|rbr*rBr8)rIr�rF� unit_and_suffix_calculation_baserDrE�	precision�completed_ratio�
completed_strr|�total_ratio�	total_str�download_status�
download_textrLrLrMr�ns2235�236��237238zDownloadColumn.render)FN)rbr�r�r�rNrOr,rrLrLrJrMr�as239�r�c@r4)240�TransferSpeedColumnz&Renders human readable transfer speed.r�r�rNr8cCs@|jp|j}|durtddd�St�t|��}t|�d�dd�S)zShow data transfer speed.Nr_zprogress.data.speedr8z/s)rHrr8r*rXr~)rIr�rrFrLrLrMr��s241zTransferSpeedColumn.renderNr,r=rLrLrLrMr|�r>r|c@s$eZdZUdZded<	ded<dS)�ProgressSamplez$Sample of progress for a given time.rCrrFN)rlrmrnrorrLrLrLrMr}�s242r}c@sXeZdZUdZded<	ded<	ded<	ded	<	d243ed<	dZded
<	dZded<	eed�Z	ded<	edddd�Z244ded<	edddd�Zded<	dZded<	edd�ddd�Z
ded<eded�Zded <	d5d"d#�Zed6d$d%��Zed7d&d'��Zed7d(d)��Zed6d*d+��Zed5d,d-��Zed7d.d/��Zed7d0d1��Zd8d3d4�ZdS)9�Taskz�Information regarding a progress task.245 246    This object should be considered read-only outside of the :class:`~Progress` class.247 248    r:r�r{rzr}r|rCrF�GetTimeCallable�	_get_timeNr:Tr��visible)�default_factoryzDict[str, Any]�fieldsF)�default�init�repr�249start_time�	stop_timerHcCs250tdd�S)NrA)�maxlenrrLrLrLrM�<lambda>�s251z
Task.<lambda>)r�r�r�zDeque[ProgressSample]�	_progress)r�r�r�_lockrNcCs|��S)z(float: Get the current time, in seconds.)r�r]rLrLrMr��r�z
Task.get_timecC�252|jduS)z#bool: Check if the task as started.N)r�r]rLrLrMr3��253zTask.startedcCs|jdurdS|j|jS)zPOptional[float]: Get the number of steps remaining, if a non-None total was set.N�r|rFr]rLrLrM�	remaining�s254zTask.remainingcCs2|jdurdS|jdur|j|jS|��|jS)z]Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.N)r�r�r�r]rLrLrMr;�s255256257zTask.elapsedcCr�)zCheck if the task has finished.N)r:r]rLrLrMr�r�z
Task.finishedcCs.|jsdS|j|jd}tdtd|��}|S)zOfloat: Get progress of task as a percentage. If a None total was set, returns 0��Y@)r|rF�minr2)rIrFrLrLrM�258percentage�s259zTask.percentagecCs�|jdurdS|j�D|j}|s	Wd�dS|dj|dj}|dkr0	Wd�dSt|�}t|�tdd�|D��}||}|Wd�S1sQwYdS)z=Optional[float]: Get the estimated speed in steps per second.Nr�rcs��|]}|jVqdSrZr�)�.0�samplerLrLrM�	<genexpr>��zTask.speed.<locals>.<genexpr>)r�r�r�r�iterr�r�)rIr>�260total_time�
iter_progress�total_completedrrLrLrMr�s"261��$�z262Task.speedcCs:|jrdS|j}|sdS|j}|durdSt||�}|S)zJOptional[float]: Get estimated time to completion, or ``None`` if no data.r�N)rrr�r)rIrr��estimaterLrLrMrPszTask.time_remainingrOcCs|j��d|_d|_dS)zReset progress.N)r��clearr:rHr]rLrLrM�_resets263264zTask._reset)rNrCr�)rNr}rj)rlrmrnrorr:r�r�dictr�r�r�rHr�rr�r�r�r3r�r;rr�rrPr�rLrLrLrMr~�sZ265266�267
r~c@s�eZdZdZddddddddddd�268d�dd�Zed�dd��Zed�d d!��Zed�d#d$��Z	ed�d&d'��Z269ed�d(d)��Zd�d*d+�Zd�d,d-�Z
d�d/d0�Zd�d7d8�Z		9		:	;d�d�dGdH�Z	d�ddIdJ�d�dNdO�Zej	P			d�dddIdQ�d�dZd[��Zej	P			d�dddIdQ�d�d^d[��Z	_	P			d�dddIdQ�d�dbd[�Zd�ddde�Zd�dfdg�Zdddddddh�d�dodp�Zddd9dddq�d�dsdt�Zd�d�dvdw�Zd�dxdy�Zd�d{d|�Zd�d~d�Zd�d�d��Zd�d�d��Z		�	9	d�d�d�d��Zd�d�d��Z dS)�r�a�Renders an auto-updating progress bar(s).270 271    Args:272        console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout.273        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.274        refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.275        speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.276        transient: (bool, optional): Clear the progress on exit. Defaults to False.277        redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.278        redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.279        get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.280        disable (bool, optional): Disable progress display. Defaults to False281        expand (bool, optional): Expand tasks table to fit width. Defaults to False.282    NTrrg>@F)283r�rr��speed_estimate_periodr��redirect_stdout�redirect_stderrr�r��expandr��Union[str, ProgressColumn]r�r�rr�r�rCr�r�r�r�r��Optional[GetTimeCallable]r�r�rNrOc284	Gs�|dksJd��t�|_|p|��|_||_|	|_|285|_i|_td�|_	t286|p)t�||||||jd�|_
|p9|jj|_|jj|_|jj|_dS)Nrzrefresh_per_second must be > 0)r�rr�r�r�r��get_renderable)rr��get_default_columnsr�r�r�r��_tasksr:�_task_indexr2r+r�rSr�r��print�log)rIr�rr�r�r�r�r�r�r�r�r�rLrLrMrH5s(287�	288zProgress.__init__�Tuple[ProgressColumn, ...]cCstd�t�t�t�fS)a�Get the default columns used for a new Progress instance:289           - a text column for the description (TextColumn)290           - the bar itself (BarColumn)291           - a text column showing completion percentage (TextColumn)292           - an estimated-time-remaining column (TimeRemainingColumn)293        If the Progress instance is created without passing a columns argument,294        the default columns defined here will be used.295 296        You can also create a Progress instance using custom columns before297        and/or after the defaults, as in this example:298 299            progress = Progress(300                SpinnerColumn(),301                *Progress.get_default_columns(),302                "Elapsed:",303                TimeElapsedColumn(),304            )305 306        This code shows the creation of a Progress display, containing307        a spinner to the left, the default columns, and a labeled elapsed308        time column.309        r�)r�r�r�r�)rCrLrLrMr�Ys310�zProgress.get_default_columnsr,cCr�rZ)rSr�r]rLrLrMr�xr�zProgress.console�311List[Task]cC�8|j�t|j���Wd�S1swYdS)zGet a list of Task instances.N)r��listr��valuesr]rLrLrM�tasks|�$�zProgress.tasks�List[TaskID]cCr�)zA list of task IDs.N)r�r�r��keysr]rLrLrM�task_ids�r�zProgress.task_idscCsZ|j� |js	Wd�dStdd�|j��D��Wd�S1s&wYdS)z'Check if all tasks have been completed.NTcsr�rZ)r)r�r�rLrLrMr��r�z$Progress.finished.<locals>.<genexpr>)r�r��allr�r]rLrLrMr�s�$�zProgress.finishedcCs|js|jjdd�dSdS)zStart the progress display.T)rPN)r�rSr\r]rLrLrMr\�s�zProgress.startcCs0|j��|jjs|jjs|j��dSdSdS)zStop the progress display.N)rSr�r��is_interactive�312is_jupyterr�r]rLrLrMr��s313�z
Progress.stopr(cCrYrZr[r]rLrLrMr^�r_zProgress.__enter__r`rarbrcrdrecCr�rZ)r�rhrLrLrMri�r�zProgress.__exit__rrqrwrxryr|r}rFr~r@�Optional[TaskID]rzr{rBccs��|dur
tt|��pd}|dur|j|||d�}n|j|||d�|jjrNt|||��}|D]}|V|jd7_q/Wd�dS1sGwYdS|j}	|j	}314|D]
}|V|	|d�|315�qVdS)aCTrack progress by iterating over a sequence.316 317        You can also track progress of an iterable, which might require that you additionally specify ``total``.318 319        Args:320            sequence (Iterable[ProgressType]): Values you want to iterate over and track progress.321            total: (float, optional): Total number of steps. Default is len(sequence).322            completed (int, optional): Number of steps completed so far. Defaults to 0.323            task_id: (TaskID): Task to track. Default is new task.324            description: (str, optional): Description of task, if new task is created.325            update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.326 327        Returns:328            Iterable[ProgressType]: An iterable of values taken from the provided sequence.329        Nr�r))330rCr�add_taskrUrSrr=rFrQrP)rIrxr|rFr@rzrB�track_thread�valuerQrPrLrLrMr��s(��"�331�zProgress.trackr�)r@rzr�rr�cCs�d}|dur	|}n|dur&|j�|j|j}Wd�n1s!wY|dur.td��|dur:|j||d�}n|j||d�t|||dd�S)ajTrack progress file reading from a binary file.332 333        Args:334            file (BinaryIO): A file-like object opened in binary mode.335            total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.336            task_id (TaskID): Task to track. Default is new task.337            description (str, optional): Description of task, if new task is created.338 339        Returns:340            BinaryIO: A readable file-like object in binary mode.341 342        Raises:343            ValueError: When no total value can be extracted from the arguments or the task.344        Nz?unable to get the total number of bytes, please specify 'total'�r|F�r�)r�r�r|�345ValueErrorr�rUr�)rIr�r|r@rz�total_bytesrLrLrMr��s��zProgress.wrap_filer�)r|r@rzr�r�r�r�r�r�r�r�c346Cr�rZrL�347rIr�r�r�r�r�r�r|r@rzrLrLrMr���z
Progress.open�"Union[Literal['r'], Literal['rt']]r#c348Cr�rZrLr�rLrLrMr�r�r�r��Union[BinaryIO, TextIO]cCs�d�t|dd��}349|350dvrtd|����|dk}|351dkr)|dkr)t�dt�d	}n|352d353vr;|dkr5td��|dkr;d	}|d
urDt|�j}|d
urP|j|	|d�}n|j	||d�t354j|d|d�}t|||dd�}
|dvrut355j
|
||||d�S|
S)a#Track progress while reading from a binary file.356 357        Args:358            path (Union[str, PathLike[str]]): The path to the file to read.359            mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".360            buffering (int): The buffering strategy to use, see :func:`io.open`.361            encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.362            errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.363            newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.364            total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.365            task_id (TaskID): Task to track. Default is new task.366            description (str, optional): Description of task, if new task is created.367 368        Returns:369            BinaryIO: A readable file-like object in binary mode.370 371        Raises:372            ValueError: When an invalid mode is given.373        rF)�reverse)�br�rtr�z
invalid mode r)r�zaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be usedr�)r�r�rzcan't have unbuffered text I/ONr��rb)r�Tr�)r�r�)r�r�r��line_buffering)rg�sortedr��warnings�warn�RuntimeWarningr�st_sizer�rU�ior�r��
TextIOWrapper)rIr�r�r�r�r�r�r|r@rz�_moder�r�r�rLrLrMr�s>!�374�r:cCsZ|j� |j|}|jdur|��|_Wd�dSWd�dS1s&wYdS)z�Start a task.375 376        Starts a task (used when calculating elapsed time). You may need to call this manually,377        if you called ``add_task`` with ``start=False``.378 379        Args:380            task_id (TaskID): ID of task.381        N)r�r�r�r�)rIr@r�rLrLrM�382start_taskks	383384�"�zProgress.start_taskcCsT|j�|j|}|��}|jdur||_||_Wd�dS1s#wYdS)z�Stop a task.385 386        This will freeze the elapsed time on the task.387 388        Args:389            task_id (TaskID): ID of task.390        N)r�r�r�r�r�)rIr@r�r�rLrLrM�	stop_taskys391392"�zProgress.stop_task)r|rFrQrzr�rPrQr��Optional[bool]rPr�rcKsH|j��|j|}	|	j}393|dur||	jkr||	_|	��|dur'|	j|7_|dur.||	_|dur5||	_|dur<||	_|	j�|�|	j|394}|�	�}||j395}
|	j}|j}|rk|dj
|
krk|�|rk|dj
|
ks_|dkrw|�t||��|	jdur�|	j|	jkr�|	jdur�|	j|	_Wd�n1s�wY|r�|��dSdS)a�Update information associated with a task.396 397        Args:398            task_id (TaskID): Task id (returned by add_task).399            total (float, optional): Updates task.total if not None.400            completed (float, optional): Updates task.completed if not None.401            advance (float, optional): Add a value to task.completed if not None.402            description (str, optional): Change task description if not None.403            visible (bool, optional): Set visible flag if not None.404            refresh (bool): Force a refresh of progress information. Default is False.405            **fields (Any): Additional data fields required for rendering.406        Nr)r�r�rFr|r�rzr�r�rUr�r�r��popleftr�appendr}r:r;rP)rIr@r|rFrQrzr�rPr�r��completed_start�update_completedr��old_sample_timer�r�rLrLrMrU�sD407408409�410411��"�zProgress.update)r\r|rFr�rzr\c412Ks�|��}|j�8|j|}	|	��|r|nd|	_|dur||	_||	_|dur)||	_|r.||	_|dur5||	_	d|	_413Wd�n1sBwY|��dS)a�Reset a task so completed is 0 and the clock is reset.414 415        Args:416            task_id (TaskID): ID of task.417            start (bool, optional): Start the task after reset. Defaults to True.418            total (float, optional): New total steps in task, or None to use current total. Defaults to None.419            completed (int, optional): Number of steps completed. Defaults to 0.420            visible (bool, optional): Enable display of the task. Defaults to True.421            description (str, optional): Change task description if not None. Defaults to None.422            **fields (str): Additional data fields required for rendering.423        N)r�r�r�r�r�r|rFr�r�rzr:rP)424rIr@r\r|rFr�rzr�r�r�rLrLrM�reset�s"425�zProgress.resetr)c426Cs*|��}|j��|j|}|j}|j|7_|j|}||j}|j}|j}	|r<|dj|kr<|	�|r<|dj|ks0t|�dkrK|	�t|�dksB|�	t427||��|jdurs|j|jkr{|jdur�|j
|_|j|_Wd�dSWd�dSWd�dSWd�dS1s�wYdS)z�Advance task by a number of steps.428 429        Args:430            task_id (TaskID): ID of task.431            advance (float): Number of steps to advance. Default is 1.432        rrAN)r�r�r�rFr�r�r�rr�r�r}r|r:r;rrH)433rIr@rQr�r�r�r�r�r�r�rLrLrMrQ�s8434435436��437438439���"�zProgress.advancecCs$|js|jjr|j��dSdSdS)z*Refresh (render) the progress information.N)r�rSrTrPr]rLrLrMrP440s�zProgress.refreshr/cCst|���}|S)z*Get a renderable for the progress display.)r-�get_renderables)rIrrLrLrMr�szProgress.get_renderable�Iterable[RenderableType]ccs�|�|j�}|VdS)z5Get a number of renderables for the progress display.N)�make_tasks_tabler�)rI�tablerLrLrMr�s�441zProgress.get_renderablesr��Iterable[Task]r7csRdd�|jD�}tj|d|jd��}|D]��jr&|j�fdd�|jD��q|S)z�Get a table to render the Progress display.442 443        Args:444            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.445 446        Returns:447            Table: A table instance.448        css0�|]}t|t�rtdd�n|����VqdS)Tr%N)rr{r6r��copy)r��_columnrLrLrMr�"s���449450�z,Progress.make_tasks_table.<locals>.<genexpr>)rr))�paddingr�c3s.�|]}t|t�r|j�d�n|��VqdS)r(N)rr{r))r��columnr(rLrMr�/s���451�)r�r7�gridr�r��add_row)rIr��
table_columnsr�rLr(rMr�s	�452���453zProgress.make_tasks_tablecCs2|j�|��Wd�S1swYdS)z+Makes the Progress class itself renderable.N)r�r�r]rLrLrM�__rich__:s$�zProgress.__rich__r�c	Ks�|j�2t|j||||||j|jd�}||j|j<|r!|�|j�|j}tt|j�d�|_Wd�n1s8wY|��|S)aAdd a new 'task' to the Progress display.454 455        Args:456            description (str): A description of the task.457            start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,458                you will need to call `start` manually. Defaults to True.459            total (float, optional): Number of total steps in the progress if known.460                Set to None to render a pulsing animation. Defaults to 100.461            completed (int, optional): Number of steps completed so far. Defaults to 0.462            visible (bool, optional): Enable display of the task. Defaults to True.463            **fields (str): Additional data fields required for rendering.464 465        Returns:466            TaskID: An ID you can use when calling `update`.467        )r�r�r�r�r)N)	r�r~r�r�r�r�r:r~rP)	rIrzr\r|rFr�r�r��new_task_indexrLrLrMr�?s&�468�zProgress.add_taskcCs4|j�
|j|=Wd�dS1swYdS)z]Delete a task if it exists.469 470        Args:471            task_id (TaskID): A task ID.472 473        N)r�r�)rIr@rLrLrM�remove_taskjs474"�zProgress.remove_task)r�r�r�r�rr�r�rCr�rCr�r�r�r�r�r�r�r�r�r�r�r�rNrO)rNr�)rNr,)rNr�)rNr�r�rj)rNr(rk)NrNrqrw)rxryr|r}rFr~r@r�rzr{rBrCrNryrZ)475r�rr|r�r@r�rzr{rNr�r�NNN)r�r�r�r�r�r~r�r�r�r�r�r�r|r�r@r�rzr{rNr)r�r�r�r�r�r~r�r�r�r�r�r�r|r�r@r�rzr{rNr#�r�r�NNN)r�r�r�r�r�r~r�r�r�r�r�r�r|r�r@r�rzr{rNr�)r@r:rNrO)r@r:r|r}rFr}rQr}rzr�r�r�rPr�r�rrNrO)r@r:r\r�r|r}rFr~r�r�rzr�r�rrNrO)r))r@r:rQrCrNrO)rNr/)rNr�)r�r�rNr7)Tr�rT)rzr{r\r�r|r}rFr~r�r�r�rrNr:)!rlrmrnrorHrIr�r�r�r�r�rr\r�r^rir�r��typing�overloadr�r�r�rUr�rQrPr�r�r�r�r�r�rLrLrLrMr�%s��$476477478479�0��*�	��	��	�480M481�A�'482483484485486!�+r��__main__)�Panel)�Rule)�Syntax)r7a~def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:487    """Iterate and generate a tuple with a flag for last value."""488    iter_values = iter(values)489    try:490        previous_value = next(iter_values)491    except StopIteration:492        return493    for value in iter_values:494        yield False, previous_value495        previous_value = value496    yield True, previous_value�python)�line_numbersZfoo�barZbaz�1�2�3z:Text may be printed while the progress bars are rendering.z(In fact, [i]any[/i] renderable will workzSuch as [magenta]tables[/]...zPretty printed structures...ZexamplezPretty printed)�typerz	Syntax...zGive it a try!)�cycle)�record)r�r�z[red]DownloadingrAr�z[green]Processingz[yellow]ThinkingrJr�g333333�?g{�G�z�?�d)rqNrTNFNrrrsrtrurvrwFT)"rxryrzr{r|r}rFr~rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5rBrCr�r�r�r�rNry)r�rr|r~rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�r�)&r�r�r�r�r�r~r�r�r�r�r�r�r|r�rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�)&r�r�r�r�r�r~r�r�r�r�r�r�r|r�rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�r�)&r�r�r�r�r�r~r�r�r�r�r�r�r|r�rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�)��497__future__rr�r�r��abcrr�collectionsr�dataclassesrr�datetimer	r498r�mathrr
�operatorr�osrr�	threadingrrr�typesrrrrrrrrrrrrr r!r"r#r$r%r&r'Ztyping_extensionsr(rr*r+r�r,r-r.r/r#r0�jupyterr1rSr2�progress_barr3rr4r�r5r�r6r7rr8r9r~r:r;rCrr<r=r�r�r�r�r�r�r�rr
r�r�r5r�r�rVr[r\r�r|r}r~r�rl�random�time�panelr��ruler��syntaxr�r�Zprogress_renderables�	itertoolsr�Zexamplesr�r>r�Ztask1Ztask2Ztask3rrU�sleep�randintr�r�rLrLrLrM�<module>s�T499*�Ng�A������V*2*H0		1	}500T��501����502503��$��
Aluode/PerceptionLabPortable · CoolFace