⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.24
Server IP:
50.6.168.112
Server:
Linux server-617809.webnetzimbabwe.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.4.10
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib
/
python3.9
/
site-packages
/
dnf
/
__pycache__
/
View File Name :
match_counter.cpython-39.opt-1.pyc
a !cT @ sZ d dl mZ d dl mZ d dl mZ d dlmZ ddddd Zd d ZG dd d eZ dS ) )absolute_import)print_function)unicode_literalsreduce )nameZsummarydescriptionurlc C s" t | }dg|| t| }|S )z, Ordered sset with empty strings prepended. )lensorted)Zssetlengthcurrentl r 5/usr/lib/python3.9/site-packages/dnf/match_counter.py_canonize_string_set" s r c @ sf e Zd ZdZedd Zdd Zdd Zdd Zd d Z dd Z dd Zdd ZdddZ dd ZdS )MatchCounterzMap packages to which of their attributes matched in a search against what values. The mapping is: ``package -> [(key, needle), ... ]``. c s fdd}t t||S )Nc s> | d }| d }t |}|dkr6||kr6dt| S t| S )Nr r r r )getattrWEIGHTS)matchkeyneedleZhaystackpkgr r weight4 s z*MatchCounter._eval_weights.
.weight)summap)r matchesr r r r _eval_weights1 s zMatchCounter._eval_weightsc s fdd}|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 s | | | jfS N)r# r r selfr r get_keyK s z'MatchCounter._key_func.
.get_keyr )r&