403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/1/cwd/lib/python3.12/site-packages/dnf/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/1/cwd/lib/python3.12/site-packages/dnf/__pycache__/match_counter.cpython-312.pyc
�

�(fT��^�ddlmZddlmZddlmZddlmZddddd	�Zd
�ZGd�de�Z	y
)�)�absolute_import)�print_function)�unicode_literals��reduce����)�name�summary�description�urlc�F�t|�}dg||z
zt|�z}|S)z, Ordered sset with empty strings prepended. �)�len�sorted)�sset�length�current�ls    �6/usr/lib/python3.12/site-packages/dnf/match_counter.py�_canonize_string_setr"s*���$�i�G�	���� �!�F�4�L�0�A��H�c�X�eZdZdZed��Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
d�Z
d�Zy
)�MatchCounterz�Map packages to which of their attributes matched in a search against
    what values.

    The mapping is: ``package -> [(key, needle), ... ]``.

    c�8���fd�}tt||��S)Nc�n��|d}|d}t�|�}|dk(r||k(rdt|zSt|S)Nrrrr
)�getattr�WEIGHTS)�match�key�needle�haystack�pkgs    �r�weightz*MatchCounter._eval_weights.<locals>.weight4sH�����(�C��1�X�F��s�C�(�H��f�}��V�!3��7�3�<�'�'��3�<�r)�sum�map)r%�matchesr&s`  r�
_eval_weightszMatchCounter._eval_weights1s���	 ��3�v�w�'�(�(rc����fd�}|S)a�Get the key function used for sorting matches.

        It is not enough to only look at the matches and order them by the sum
        of their weighted hits. In case this number is the same we have to
        ensure that the same matched needles are next to each other in the
        result.

        Returned function is:
        pkg -> (weights_sum, canonized_needles_set, -distance)

        c�H���j|�|�|jfS�N)r*r)r%�selfs �r�get_keyz'MatchCounter._key_func.<locals>.get_keyKs-����$�$�S�$�s�)�4�4����	�
r�)r.r/s` r�	_key_funczMatchCounter._key_func?s���	��rc�2���rt�fd��D��Sy)z0Return the max count of needles of all packages.c3�R�K�|]}t�j|����� y�wr-)r�matched_needles)�.0r%r.s  �r�	<genexpr>z,MatchCounter._max_needles.<locals>.<genexpr>Ws"�����F��#�s�4�/�/��4�5��s�$'r)�max�r.s`r�_max_needleszMatchCounter._max_needlesTs�����F��F�F�F�rc�J�|j|g�j||f�yr-)�
setdefault�append)r.r%r"r#s    r�addzMatchCounter.addZs������R� �'�'��f�
�6rc�8�|D]}t|�d||����y)N�	)�print�r.r%s  r�dumpzMatchCounter.dump]s���C��c�4��9�-�.�rc�2��t�fd�|�D��S)Nc3�<�K�|]}t�|d����y�w)rN)r)r5�mr%s  �rr6z1MatchCounter.matched_haystacks.<locals>.<genexpr>bs�����9�y�!�7�3��!��%�y�s���setrAs `r�matched_haystackszMatchCounter.matched_haystacksas����9�t�C�y�9�9�9rc�V�g}||D]}|d|vr�|j|d�� |S)Nr)r<)r.r%�result�is    r�matched_keyszMatchCounter.matched_keysds:�����c��A���t�v�~���M�M�!�A�$����
rc�,�td�||D��S)Nc3�&K�|]	}|d���y�w)rNr0)r5rEs  rr6z/MatchCounter.matched_needles.<locals>.<genexpr>ns����+��A�1�Q�4��s�rFrAs  rr4zMatchCounter.matched_needlesms���+��c��+�+�+rNc�`�|r|n|j�}t||j���S)N)r")�keysrr1)r.�reverse�limit_torPs    rrzMatchCounter.sortedps%��#�x�������d���� 0�1�1rc�$��t�fd��d�S)Nc�&��|t�|�zSr-)r)�totalr%r.s  �r�<lambda>z$MatchCounter.total.<locals>.<lambda>us�����T�#�Y��)?rrrr8s`rrUzMatchCounter.totalts����?��q�I�Ir)FN)�__name__�
__module__�__qualname__�__doc__�staticmethodr*r1r9r=rBrHrLr4rrUr0rrrr)sI����)��)��*�7�/�:��,�2�JrrN)
�
__future__rrr�	functoolsrr r�dictrr0rr�<module>r_s=��*'�%�'�����
�	��
�LJ�4�LJr

Youez - 2016 - github.com/yon3zu
LinuXploit