$10 GRAYBYTE WORDPRESS FILE MANAGER $25

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 91.108.106.35 | ADMIN IP 216.73.216.215
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python311/lib/python3.11/site-packages/rich/__pycache__/

HOME
Current File : /opt/alt/python311/lib/python3.11/site-packages/rich/__pycache__//_ratio.cpython-311.pyc
�

��;fS���ddlZddlmZddlmZddlmZmZmZm	Z	ej
dkrddlmZnddlmZGd�de��Z
d	ed
e	e
deefd�Zd	ed
eedeedeedeef
d�Z	dd	ed
eedeeedeefd�ZedkraddlmZeGd�d����Zededdd��eddd��eddd��g��Zeee����dSdS)�N)�Fraction)�ceil)�cast�List�Optional�Sequence)��)�Protocolc�J�eZdZUdZdZeeed<dZeed<dZ	eed<dS)�Edgez1Any object that defines an edge (such as Layout).N�size��ratio�minimum_size)
�__name__�
__module__�__qualname__�__doc__rr�int�__annotations__rr���>/opt/alt/python311/lib/python3.11/site-packages/rich/_ratio.pyr
r
sI�������;�;��D�(�3�-�����E�3�N�N�N��L�#�����rr
�total�edges�returnc�@�d�|D��}t}d|vr�d�tt||����D��}|td�|D����z
}|dkrd�t||��D��S||td�|D������}|D]$\}}||jz|jkr|j||<n8�%|d��}	|D](\}}t
||jz|	zd��\}
}	|
||<�)nd|v��ttt|��S)	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.
    c� �g|]}|jpd��S�N)r)�.0�edges  r�
<listcomp>z!ratio_resolve.<locals>.<listcomp>%s��3�3�3�T�d�i��4�3�3�3rNc�&�g|]\}\}}|�
||f��Sr r)r!�indexrr"s    rr#z!ratio_resolve.<locals>.<listcomp>,s1��
�
�
�#��|��d��|��D�M��|�|rc3�K�|]}|pdV��	dS)rNr)r!rs  r�	<genexpr>z ratio_resolve.<locals>.<genexpr>2s&����<�<�d��	��<�<�<�<�<�<rrc�.�g|]\}}|�	|jpdn|��S)Nr)r)r!rr"s   rr#z!ratio_resolve.<locals>.<listcomp>5s;������D�$�.2�\�$�#�(�q��t���rc3�.K�|]\}}|jpdV��dS)rN)r)r!�_r"s   rr'z ratio_resolve.<locals>.<genexpr>;s,����K�K���D�D�J�O�!�K�K�K�K�K�Krr)
r�	enumerate�zip�sumrr�divmodrrr)rr�sizes�	_Fraction�flexible_edges�	remaining�portionr%r"�	remainderrs           r�
ratio_resolver5s���"
4�3�U�3�3�3�E��I��%�-�-�
�
�'0��U�E�1B�1B�'C�'C�
�
�
���C�<�<�e�<�<�<�<�<�<�	���>�>���"%�e�U�"3�"3����
�
�)��s�K�K�N�K�K�K�K�K�
�
��
*�
	�
	�K�E�4����#�t�'8�8�8�#�0��e����9�"�	�!���I�-�
$�
$���t�"(��4�:�)=�	�)I�1�"M�"M���i�#��e����E�%�-�-�H��S�	�5�!�!�!r�ratios�maximums�valuesc�T�d�t||��D��}t|��}|s
|dd�S|}g}|j}t|||��D]U\}}	}
|rB|dkr<t|	t	||z|z����}||
|z
��||z}||z}�J||
���V|S)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.
    c� �g|]\}}|r|nd��S�rr)r!r�_maxs   rr#z ratio_reduce.<locals>.<listcomp>_s%��
L�
L�
L�{�u�d�t�"�e�e��
L�
L�
LrNr)r,r-�append�min�round)rr6r7r8�total_ratio�total_remaining�resultr=r�maximum�value�distributeds            r�ratio_reducerFQs���M�
L�c�&�(�6K�6K�
L�
L�
L�F��f�+�+�K����a�a�a�y���O��F�
�]�F�!$�V�X�v�!>�!>�����w���	�[�1�_�_��g�u�U�_�-D�{�-R�'S�'S�T�T�K��F�5�;�&�'�'�'��{�*�O��5� �K�K��F�5�M�M�M�M��Mr�minimumsc�p�|rd�t||��D��}t|��}|dks
Jd���|}g}|j}|�dgt|��z}n|}t||��D]F\}}	|dkr$t	|	t||z|z����}
n|}
||
��||z}||
z}�G|S)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.
    c� �g|]\}}|r|nd��Sr;r)r!r�_mins   rr#z$ratio_distribute.<locals>.<listcomp>s%��P�P�P�;�5�$�4�&�%�%�Q�P�P�PrrzSum of ratios must be > 0)r,r-r=�len�maxr)rr6rGr@rA�distributed_totalr=�	_minimumsr�minimumrEs           r�ratio_distributerPqs����Q�P�P�#�f�h�:O�:O�P�P�P���f�+�+�K���?�?�?�7�?�?�?��O�#%��
�
%�F����C�#�f�+�+�%�	�	��	��f�i�0�0�'�'���w���?�?��g�t�E�O�,C�k�,Q�'R�'R�S�S�K�K�)�K���{�����u����;�&����r�__main__)�	dataclassc�F�eZdZUdZeeed<dZeed<dZeed<dS)�ENrrrr)	rrrrrrrrrrrrrTrT�sC�������"��h�s�m�"�"�"���s������c�����rrT�nrr )�sys�	fractionsr�mathr�typingrrrr�version_infor�typing_extensionsr
rr5rFrPr�dataclassesrRrT�resolved�printr-rrr�<module>r_s;��
�
�
�
�������������1�1�1�1�1�1�1�1�1�1�1�1���v����������*�*�*�*�*�*������8����:"��:"�X�d�^�:"��S�	�:"�:"�:"�:"�z����S�	��-1�#�Y��@D�S�	��	�#�Y�����BDH�!�!��!��S�	�!�-5�d�3�i�-@�!�	�#�Y�!�!�!�!�H�z���%�%�%�%�%�%����������Y��
�}�S�1�1�T�1�a�=�=�!�!�D�!�Q�-�-���4��A���"O�P�P�H�	�E�#�#�h�-�-�������r

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
8 May 2024 6.33 PM
root / root
0755
__init__.cpython-311.pyc
7.275 KB
8 May 2024 6.33 PM
root / root
0644
__main__.cpython-311.pyc
11.141 KB
8 May 2024 6.33 PM
root / root
0644
_cell_widths.cpython-311.pyc
7.68 KB
8 May 2024 6.33 PM
root / root
0644
_emoji_codes.cpython-311.pyc
203.613 KB
8 May 2024 6.33 PM
root / root
0644
_emoji_replace.cpython-311.pyc
1.867 KB
8 May 2024 6.33 PM
root / root
0644
_export_format.cpython-311.pyc
2.276 KB
8 May 2024 6.33 PM
root / root
0644
_extension.cpython-311.pyc
0.575 KB
8 May 2024 6.33 PM
root / root
0644
_fileno.cpython-311.pyc
0.933 KB
8 May 2024 6.33 PM
root / root
0644
_inspect.cpython-311.pyc
13.833 KB
8 May 2024 6.33 PM
root / root
0644
_log_render.cpython-311.pyc
4.624 KB
8 May 2024 6.33 PM
root / root
0644
_loop.cpython-311.pyc
2.044 KB
8 May 2024 6.33 PM
root / root
0644
_null_file.cpython-311.pyc
4.055 KB
8 May 2024 6.33 PM
root / root
0644
_palettes.cpython-311.pyc
5.106 KB
8 May 2024 6.33 PM
root / root
0644
_pick.cpython-311.pyc
0.756 KB
8 May 2024 6.33 PM
root / root
0644
_ratio.cpython-311.pyc
7.713 KB
8 May 2024 6.33 PM
root / root
0644
_spinners.cpython-311.pyc
13.342 KB
8 May 2024 6.33 PM
root / root
0644
_stack.cpython-311.pyc
1.082 KB
8 May 2024 6.33 PM
root / root
0644
_timer.cpython-311.pyc
0.938 KB
8 May 2024 6.33 PM
root / root
0644
_win32_console.cpython-311.pyc
29.407 KB
8 May 2024 6.33 PM
root / root
0644
_windows.cpython-311.pyc
2.719 KB
8 May 2024 6.33 PM
root / root
0644
_windows_renderer.cpython-311.pyc
3.882 KB
8 May 2024 6.33 PM
root / root
0644
_wrap.cpython-311.pyc
3.745 KB
8 May 2024 6.33 PM
root / root
0644
abc.cpython-311.pyc
1.849 KB
8 May 2024 6.33 PM
root / root
0644
align.cpython-311.pyc
13.085 KB
8 May 2024 6.33 PM
root / root
0644
ansi.cpython-311.pyc
10.232 KB
8 May 2024 6.33 PM
root / root
0644
bar.cpython-311.pyc
4.421 KB
8 May 2024 6.33 PM
root / root
0644
box.cpython-311.pyc
12.618 KB
8 May 2024 6.33 PM
root / root
0644
cells.cpython-311.pyc
6.465 KB
8 May 2024 6.33 PM
root / root
0644
color.cpython-311.pyc
27.132 KB
8 May 2024 6.33 PM
root / root
0644
color_triplet.cpython-311.pyc
1.81 KB
8 May 2024 6.33 PM
root / root
0644
columns.cpython-311.pyc
10.375 KB
8 May 2024 6.33 PM
root / root
0644
console.cpython-311.pyc
120.66 KB
8 May 2024 6.33 PM
root / root
0644
constrain.cpython-311.pyc
2.388 KB
8 May 2024 6.33 PM
root / root
0644
containers.cpython-311.pyc
10.538 KB
8 May 2024 6.33 PM
root / root
0644
control.cpython-311.pyc
11.575 KB
8 May 2024 6.33 PM
root / root
0644
default_styles.cpython-311.pyc
12.25 KB
8 May 2024 6.33 PM
root / root
0644
diagnose.cpython-311.pyc
1.711 KB
8 May 2024 6.33 PM
root / root
0644
emoji.cpython-311.pyc
4.631 KB
8 May 2024 6.33 PM
root / root
0644
errors.cpython-311.pyc
2.255 KB
8 May 2024 6.33 PM
root / root
0644
file_proxy.cpython-311.pyc
3.919 KB
8 May 2024 6.33 PM
root / root
0644
filesize.cpython-311.pyc
3.204 KB
8 May 2024 6.33 PM
root / root
0644
highlighter.cpython-311.pyc
10.711 KB
8 May 2024 6.33 PM
root / root
0644
json.cpython-311.pyc
6.359 KB
8 May 2024 6.33 PM
root / root
0644
jupyter.cpython-311.pyc
6.223 KB
8 May 2024 6.33 PM
root / root
0644
layout.cpython-311.pyc
22.698 KB
8 May 2024 6.33 PM
root / root
0644
live.cpython-311.pyc
20.778 KB
8 May 2024 6.33 PM
root / root
0644
live_render.cpython-311.pyc
4.993 KB
8 May 2024 6.33 PM
root / root
0644
logging.cpython-311.pyc
14.145 KB
8 May 2024 6.33 PM
root / root
0644
markdown.cpython-311.pyc
39.483 KB
8 May 2024 6.33 PM
root / root
0644
markup.cpython-311.pyc
10.467 KB
8 May 2024 6.33 PM
root / root
0644
measure.cpython-311.pyc
7.081 KB
8 May 2024 6.33 PM
root / root
0644
padding.cpython-311.pyc
7.28 KB
8 May 2024 6.33 PM
root / root
0644
pager.cpython-311.pyc
2.173 KB
8 May 2024 6.33 PM
root / root
0644
palette.cpython-311.pyc
5.748 KB
8 May 2024 6.33 PM
root / root
0644
panel.cpython-311.pyc
12.511 KB
8 May 2024 6.33 PM
root / root
0644
pretty.cpython-311.pyc
43.406 KB
8 May 2024 6.33 PM
root / root
0644
progress.cpython-311.pyc
80.697 KB
8 May 2024 6.33 PM
root / root
0644
progress_bar.cpython-311.pyc
10.734 KB
8 May 2024 6.33 PM
root / root
0644
prompt.cpython-311.pyc
15.969 KB
8 May 2024 6.33 PM
root / root
0644
protocol.cpython-311.pyc
2.016 KB
8 May 2024 6.33 PM
root / root
0644
region.cpython-311.pyc
0.624 KB
8 May 2024 6.33 PM
root / root
0644
repr.cpython-311.pyc
7.412 KB
8 May 2024 6.33 PM
root / root
0644
rule.cpython-311.pyc
6.966 KB
8 May 2024 6.33 PM
root / root
0644
scope.cpython-311.pyc
4.218 KB
8 May 2024 6.33 PM
root / root
0644
screen.cpython-311.pyc
2.678 KB
8 May 2024 6.33 PM
root / root
0644
segment.cpython-311.pyc
30.809 KB
8 May 2024 6.33 PM
root / root
0644
spinner.cpython-311.pyc
6.699 KB
8 May 2024 6.33 PM
root / root
0644
status.cpython-311.pyc
6.58 KB
8 May 2024 6.33 PM
root / root
0644
style.cpython-311.pyc
34.354 KB
8 May 2024 6.33 PM
root / root
0644
styled.cpython-311.pyc
2.339 KB
8 May 2024 6.33 PM
root / root
0644
syntax.cpython-311.pyc
41.886 KB
8 May 2024 6.33 PM
root / root
0644
table.cpython-311.pyc
47.602 KB
8 May 2024 6.33 PM
root / root
0644
terminal_theme.cpython-311.pyc
3.599 KB
8 May 2024 6.33 PM
root / root
0644
text.cpython-311.pyc
65.528 KB
8 May 2024 6.33 PM
root / root
0644
theme.cpython-311.pyc
7.113 KB
8 May 2024 6.33 PM
root / root
0644
themes.cpython-311.pyc
0.327 KB
8 May 2024 6.33 PM
root / root
0644
traceback.cpython-311.pyc
33.689 KB
8 May 2024 6.33 PM
root / root
0644
tree.cpython-311.pyc
12.154 KB
8 May 2024 6.33 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF