Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
lvestats
/
lib
/
commons
/
__pycache__
[ HOME ]
Exec
Submit
sizeutil.cpython-311.pyc
� ֈ9h] � � � d dl Z dZddd�ddd�dd d�d dd�gZdd d�ddd�ddd�ddd�gZe j Zd� Zd� Zd� Zd� Z d� Z d� Zd� ZdS )� N�shamanl �TB)�value�titlei @�GBi �MB� �KBl J)��Ti ʚ;�Gi@B �Mi� �Kc �D � t | � � }|r t }d}n t }d}|D ]0}| |d k r"t | � � |d z }|d } n�1|r|dk s(|� � � s|dk s|dk s|dk r|st |� � � |� �S |d�|� �S )a� Convert bytes value to human readable format (e.g., 4K 347M 7G) for write it on graphics. Return 2-digit value - float or digital. Depends on original value. The rules are: For graphs: print int if it is an int or it is more then 10 Not for graphs: if it is > 100, or units are B or no units (KB/MB/GB/K/M/G will print as float) >>> convert(12345678, False, True) '11MB' >>> convert(1234567, False, True) '1.2MB' � �Br r � �d z.1f)�float�POWERS_OF_1000_SIZES� BYTE_SIZES� is_integer�int)r �powers_of_1000� for_graph�result� sizes_listr �items ��/builddir/build/BUILDROOT/lve-stats-4.2.13-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/commons/sizeutil.py�convertr s� � � �5�\�\�F�� �)� ����� ���� � ���D��M�!�!��5�\�\�D��M�1�F���M�E��E� "� � &�v��|�|�v�'8�'8�':�':�|��#� � ��s�l�l�e�r�k�k�9�k��f�+�+�&�u�&�&�&��%�%�e�%�%�%� c �$ � t | dd� � S )NF�r ��s_bytess r � convert_bytesr% @ s � ��7�E�5�)�)�)r c �$ � t | dd� � S )NFTr"