
    VhM                         d Z ddlZddlZddlZddlZdi fdej        ej        e                  de	fdZ
 G d d          Z G d d	          ZdS )
z*
Non signal processing related utilities.
    Nattrs	overridesc                    t          j        | j                  j        }g }|!t	          |                                          }|D ]~}d}||v r	||         }n"t          | |          rt          | |          }n3||v r)||         }|j        t           j	        u s||j        k    rd}nd}|r|
                    | d|            | j        j         dd                    |           dS )z
    Return a simple representation string for `obj`.
    If `attrs` is not None, it should be a list of attributes to include.
    NFT=(,))inspect	signature	__class__
parameterslistkeyshasattrgetattrdefault_emptyappend__name__join)	objr   r   params
attrs_reprattrdisplayvalueparams	            R/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/julius/utils.pysimple_reprr      s    s}--8FJ}V[[]]## 1 19dOEES$ 	C&&EE6>>4LE}..%5=2H2HG 	1////000m$>>sxx
';';>>>>    c                   8    e Zd ZdZej        fdZd Zd Zd Z	dS )MarkdownTablea9  
    Simple MarkdownTable generator. The column titles should be large enough
    for the lines content. This will right align everything.

    >>> import io  # we use io purely for test purposes, default is sys.stdout.
    >>> file = io.StringIO()
    >>> table = MarkdownTable(["Item Name", "Price"], file=file)
    >>> table.header(); table.line(["Honey", "5"]); table.line(["Car", "5,000"])
    >>> print(file.getvalue().strip())  # Strip for test purposes
    | Item Name | Price |
    |-----------|-------|
    |     Honey |     5 |
    |       Car | 5,000 |
    c                 "    || _         || _        d S N)columnsfile)selfr%   r&   s      r   __init__zMarkdownTable.__init__:   s    			r    c                 l    | j                             dd                    |          z   dz              d S )N|z|
)r&   writer   )r'   lines     r   _writelnzMarkdownTable._writeln>   s0    	chhtnn,u455555r    c                     |                      d | j        D                        |                      d | j        D                        d S )Nc              3   "   K   | ]
}d | d V  dS ) N .0cols     r   	<genexpr>z'MarkdownTable.header.<locals>.<genexpr>B   s*      99Sj#jjj999999r    c              3   @   K   | ]}d t          |          dz   z  V  dS )-   N)lenr2   s     r   r5   z'MarkdownTable.header.<locals>.<genexpr>C   s1      CCscSXX\*CCCCCCr    )r-   r%   r'   s    r   headerzMarkdownTable.headerA   sN    99DL999999CCdlCCCCCCCCr    c           
          g }t          || j                  D ]M\  }}t          |dt          t	          |                    z             }|                    d|z   dz              N|                     |           d S )N>r0   )zipr%   formatstrr9   r   r-   )r'   r,   outvalr4   s        r   r,   zMarkdownTable.lineE   s{    D$,// 	( 	(HCcCCMM122CJJsSy3''''cr    N)
r   
__module____qualname____doc__sysstdoutr(   r-   r;   r,   r1   r    r   r"   r"   +   si          &)Z    6 6 6D D D    r    r"   c                   $    e Zd ZdZd Zd Zd ZdS )Chronoa  
    Measures ellapsed time, calling `torch.cuda.synchronize` if necessary.
    `Chrono` instances can be used as context managers (e.g. with `with`).
    Upon exit of the block, you can access the duration of the block in seconds
    with the `duration` attribute.

    >>> with Chrono() as chrono:
    ...     _ = sum(range(10_000))
    ...
    >>> print(chrono.duration < 10)  # Should be true unless on a really slow computer.
    True
    c                     d | _         d S r$   )durationr:   s    r   r(   zChrono.__init__Z   s    r    c                 6    t          j                     | _        | S r$   )time_beginr:   s    r   	__enter__zChrono.__enter__]   s    ikkr    c                     dd l }|j                                        r|j                                         t	          j                    | j        z
  | _        d S )Nr   )torchcudais_availablesynchronizerM   rN   rK   )r'   exc_type	exc_valueexc_tracebckrQ   s        r   __exit__zChrono.__exit__a   sM    :""$$ 	%J""$$$	dk1r    N)r   rC   rD   rE   r(   rO   rX   r1   r    r   rI   rI   M   sK             2 2 2 2 2r    rI   )rE   r
   typingtprF   rM   OptionalSequencer@   dictr   r"   rI   r1   r    r   <module>r^      s          



  =A"$? ?BKC(89 ?? ? ? ?<       D2 2 2 2 2 2 2 2 2 2r    