403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
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 :  /usr/lib/python3/dist-packages/stack_data/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/stack_data/__pycache__/utils.cpython-311.pyc
�

���c��	�d�ddlZddlZddlZddlmZmZmZddlmZmZddl	m
Z
mZmZm
Z
mZmZmZmZddlmZed��Zed��Zdefd	�Zd
e
edeefd�Zd
edejdeeeffd�Zdeede
eeeffd�Zdedefd�Zeed�d�Zdeeefdefd�Zdeeefde
eeeffd�Z deeefdeeeffd�Z!de
edeegefdeeeeffd�Z"Gd�de#��Z$d�Z%d#d!�Z&d"�Z'dS)$�N)�OrderedDict�Counter�defaultdict)�	FrameType�
TracebackType)�Iterator�List�Tuple�Iterable�Callable�Union�TypeVar�Mapping)�ASTText�T�R�
max_lengthc��t|��|krC|t|��z
dz}|t|��z
|z
}|d|�|z||d�z}|S)N�)�len)�seqr�middle�right�lefts     �2/usr/lib/python3/dist-packages/stack_data/utils.py�truncatersc��
�3�x�x�*����c�&�k�k�)�a�/���C��K�K�'�%�/���%�4�%�j�6�!�C�����L�0���J��it�returnc�D�ttj|����S�N)�listr�fromkeys)rs r�unique_in_orderr$s����$�R�(�(�)�)�)r�atok�nodec��t|ttdd����r:t||j��\}}t||jd��\}}||fS|�|d���\\}}\}}||dzfS)z�
    Returns a pair of numbers representing a half open range
    (i.e. suitable as arguments to the `range()` builtin)
    of line numbers of the given AST nodes.
    �
match_case����F)�padded�)�
isinstance�getattr�ast�
line_range�pattern�body�get_text_positions)r%r&�start�_end�_start�end�_s       rr0r0s����$���\�2�6�6�7�7�� ��t�|�4�4���t� ��t�y��}�5�5�����c�z��#�6�6�t�E�6�J�J��
���H�S�!��c�A�g�~�r�lstc#������K�t|���tj|�fd����D]�\}�|rjt����dgt	���z��fd�}t���D]2�|��fd������|���fd���|��fd����3ntjd���t����Ed{V����dS)	Nc����|dkS)N�r))�x�countss �r�<lambda>z"highlight_unique.<locals>.<lambda>/s������Q��r��keyFc�L��	|��}n#t$rYdSwxYwd�|<|S)NT)�
ValueError)�f�i�highlighteds  �r�highlight_indexz)highlight_unique.<locals>.highlight_index4sE��� �����A�A��!� � � ��4�4� ����!%��A���s�
�
�c�.�������Sr!��index��group�items��rr?z"highlight_unique.<locals>.<lambda>=s������D�0A�0A�rc�6������dz��S�Nr,rI)�firstrLrMs���rr?z"highlight_unique.<locals>.<lambda>?s���E�K�K��e�a�i�,H�,H�rc�F��d�ddd�����z
S)Nr*rIrKs��rr?z"highlight_unique.<locals>.<lambda>@s$����U�4�4�R�4�[�->�->�t�-D�-D�(D�rT)r�	itertools�groupbyr"r�set�repeat�zip)r9�	is_commonrGr>rPrLrFrMs   @@@@@r�highlight_uniquerX,sD���������
�S�\�\�F�%�-�c�7N�7N�7N�7N�O�O�O�+�+��	�5��	1���K�K�E� �'�C��J�J�.�K�
�
�
�
�
��E�
�
�
F�
F��'��(A�(A�(A�(A�(A�B�B���$�#�O�$H�$H�$H�$H�$H�$H�I�I�I��� D� D� D� D� D�E�E�E�E�	
F�$�*�4�0�0�K��u�k�*�*�*�*�*�*�*�*�*�*�++�+rr=c��|Sr!r))r=s r�identityrZGs���Hr)�mapperrAc#�fK�tt||����}tjt	|t|����d����D]^\}}t	|�\}}|rt||��Ed{V���*t	|�\}	}
|t|��t|	����V��_dS)Nc��|ddSrOr))�ts rr?z#collapse_repeated.<locals>.<lambda>Os��!�A�$�q�'�rr@)r"�maprRrSrVrX)r9�	collapserr[rA�keyed�is_highlightedrL�original_group�highlighted_group�keyed_groupr8s           r�collapse_repeatedrfKs�������S�#�����E�!*�!2���%�e�,�,�-�-�!�!�"�"�"�	E�	E����-0��K�)��)��	E��6�>�2�2�2�2�2�2�2�2�2�2� �"3�4�N�K���)�D��0�0�$�{�2C�2C�D�D�D�D�D�D�	E�	Er�frame_or_tbc��tt|tjtjf����t|tjf��Sr!)�assert_r-�typesrr�rgs r�is_framerlYs9���J�{�U�_�e�6I�$J�K�K�L�L�L��k�E�O�#5�6�6�6rc#�ZK�|r&|V�t|��r|j}n|j}|�$dSdSr!)rl�f_back�tb_nextrks r�
iter_stackrp^sZ����
�.������K� � �	.�%�,�K�K�%�-�K��.�.�.�.�.rc�N�t|��r	||jfS|j|jfSr!)rl�f_lineno�tb_frame�	tb_linenorks r�frame_and_linenorugs1������;��K�0�0�0��#�[�%:�:�:r�iterable�key_funcc��tt��}|D]&}|||���|���'|S)a�
    Create a dictionary from an iterable such that the keys are the result of evaluating a key function on elements
    of the iterable and the values are lists of elements all of which correspond to the key.

    >>> def si(d): return sorted(d.items())
    >>> si(group_by_key_func("a bb ccc d ee fff".split(), len))
    [(1, ['a', 'd']), (2, ['bb', 'ee']), (3, ['ccc', 'fff'])]
    >>> si(group_by_key_func([-1, 0, 1, 3, 6, 8, 9, 2], lambda x: x % 2))
    [(0, [0, 6, 8, 2]), (1, [-1, 1, 3, 9])]
    )rr"�append)rvrw�resultrMs    r�group_by_key_funcr{nsI����
�
�F��,�,���x�x��~�~��%�%�d�+�+�+�+��Mrc�"�eZdZdZd�Zd�ZeZdS)�cached_propertyz�
    A property that is only computed once per instance and then replaces itself
    with an ordinary attribute. Deleting the attribute resets the property.

    Based on https://github.com/pydanny/cached-property/blob/master/cached_property.py
    c�,�|j|_||_dSr!)�__doc__�func)�selfr�s  r�__init__zcached_property.__init__�s���|�����	�	�	rc�`�|�|S|�|��x}|j|jj<|Sr!)r��__dict__�__name__)r��obj�_cls�values    r�cached_property_wrapperz'cached_property.cached_property_wrapper�s1���;��K�37�9�9�S�>�>�A����T�Y�/�0��rN)r��
__module__�__qualname__rr�r��__get__r)rrr}r}�s=��������������&�G�G�Grr}c	���ddl}ddlm}G�fd�dt|d������}|d���}	|�|||��}n#t
$r|}YnwxYw|���S)Nr)�get_lexer_by_namec�"���eZdZ��fd�Z�xZS)�'_pygmented_with_ranges.<locals>.MyLexerc3����K�d�t���|��D]?\}}t�fd��D����r|j}�t	|��z
�||fV��@dS)Nrc3�>�K�|]\}}|�cxko|kncV��dSr!r))�.0r4r7�lengths   �r�	<genexpr>zE_pygmented_with_ranges.<locals>.MyLexer.get_tokens.<locals>.<genexpr>�sC�����F�F����u��,�,�,�,��,�,�,�,�F�F�F�F�F�Fr)�super�
get_tokens�any�
ExecutingNoder)r��text�ttyper�r��	__class__�rangess    @��rr�z2_pygmented_with_ranges.<locals>.MyLexer.get_tokens�s��������F� %��� 2� 2�4� 8� 8�
#�
#���u��F�F�F�F�v�F�F�F�F�F�0�!�/�E��#�e�*�*�$���U�l�"�"�"�"�	
#�
#r)r�r�r�r��
__classcell__)r�r�s@�r�MyLexerr��s>��������	#�	#�	#�	#�	#�	#�	#�	#�	#�	#rr��python3F)�stripnl)�pygments�pygments.lexersr��type�	highlight�	Exception�
splitlines)�	formatter�coder�r�r�r��lexerrFs  `     r�_pygmented_with_rangesr��s�����O�O�O�1�1�1�1�1�1�#�#�#�#�#�#�#�$�(�(��3�3�4�4�#�#�#�
�G�E�"�"�"�E���(�(��u�i�@�@�����������������!�!�#�#�#s�A�A&�%A&�c�V�|s&t|t��rt|��}|�dSr!)r-�str�AssertionError)�	condition�errors  rriri�s8�����e�S�!�!�	*�"�5�)�)�E����rc�^�	t|��S#dt|��jzcYSxYw)Nz<unprintable %s object>)r�r�r�)r�s r�some_strr��s8��@��5�z�z���@�(�4��;�;�+?�?�?�?�?���s��,)r�)(r/rRrj�collectionsrrrrr�typingrr	r
rrr
rr�	asttokensrrr�intrr$�ASTr0�boolrXrZrfrlrprur{�objectr}r�rir�r)rr�<module>r�s0��
�
�
�
���������9�9�9�9�9�9�9�9�9�9�*�*�*�*�*�*�*�*���������������������
�������G�C�L�L���G�C�L�L���c�����*����*��Q��*�*�*�*��W��C�G���c�3�h������+�$�q�'�+�h�u�Q��W�~�&>�+�+�+�+�6
��
�a�
�
�
�
�19�h�E�E�E�E�E�7�%�	�=� 8�9�7�d�7�7�7�7�
.�E�)�]�":�;�.���y�Zg�Og�Ih�@i�.�.�.�.�;�%�	�=�(@�"A�;�e�I�WZ�N�F[�;�;�;�;������x���Q��7G��G�TU�W[�\]�W^�T^�L_�����$&�&�&�&�&�f�&�&�&�,$�$�$�,����@�@�@�@�@r

Youez - 2016 - github.com/yon3zu
LinuXploit