403Webshell
Server IP : 65.1.209.187  /  Your IP : 216.73.216.144
Web Server : nginx/1.24.0
System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64
User :  ( 1001)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/botocore/retries/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/botocore/retries/__pycache__/bucket.cpython-312.pyc
�

P��e���L�dZddlZddlZddlmZGd�d�ZGd�d�Zy)zEThis module implements token buckets used for client side throttling.�N)�CapacityNotAvailableErrorc��eZdZd�Zd�Zd�Zy)�Clockc��y�N���selfs �9/usr/lib/python3/dist-packages/botocore/retries/bucket.py�__init__zClock.__init__	s���c�.�tj|�yr)�time�sleep�r
�amounts  rrzClock.sleeps���
�
�6�r
c�*�tj�Sr)rr	s r�current_timezClock.current_times���y�y�{�r
N)�__name__�
__module__�__qualname__rrrrr
rrrs��
��r
rc��eZdZdZefd�Zed��Zejd��Zed��Zed��Z	dd�Z
d�Zd	�Zd
�Z
y)
�TokenBucketg�?c���d|_d|_d|_||_d|_||_t
j�|_t
j|j�|_
||_y)Nr)�
_fill_rate�
_max_capacity�_current_capacity�_clock�_last_timestamp�	_min_rate�	threading�Lock�_lock�	Condition�_new_fill_rate_condition�max_rate)r
r&�clock�min_rates    rrzTokenBucket.__init__s[�����!���!"������#���!����^�^�%��
�(1�(;�(;�D�J�J�(G��%� ��
r
c��|jSr)rr	s rr&zTokenBucket.max_rate!s�����r
c�B�|j5|j�t||j�|_|dk\r||_nd|_t
|j|j
�|_|jj�ddd�y#1swYyxYw)N�)	r%�_refill�maxr rr�minr�notify)r
�values  rr&zTokenBucket.max_rate%s���
�
*�
*�	3�
�L�L�N�!�%����8�D�O���z�%*��"�%&��"�&)��&�&��(:�(:�&�D�"�
�)�)�0�0�2�#	3�	3�	3�s�A?B�Bc��|jSr)rr	s r�max_capacityzTokenBucket.max_capacity:s���!�!�!r
c��|jSr)rr	s r�available_capacityzTokenBucket.available_capacity>s���%�%�%r
c�l�|j5|j||��cddd�S#1swYyxYw)aJAcquire token or return amount of time until next token available.

        If block is True, then this method will block until there's sufficient
        capacity to acquire the desired amount.

        If block is False, then this method will return True is capacity
        was successfully acquired, False otherwise.

        )r�blockN)r%�_acquire)r
rr6s   r�acquirezTokenBucket.acquireBs2���
*�
*�	=��=�=��e�=�<�	=�	=�	=�s�*�3c�`�|j�||jkr|xj|zc_y|s
t��|j|�}|dkDrB|jj|�|j�|j|�}|dkDr�B|xj|zc_y)NTr)r,rr�
_sleep_amountr%�wait)r
rr6�sleep_amounts    rr7zTokenBucket._acquireOs��������T�+�+�+��"�"�f�,�"���/�1�1��-�-�f�5�L���"��-�-�2�2�<�@�����#�1�1�&�9����"�
�"�"�f�,�"�r
c�:�||jz
|jzSr)rrrs  rr:zTokenBucket._sleep_amountfs����/�/�/�4�?�?�B�Br
c��|jj�}|j�||_y|j}||jz
|jz}t|j||z�}||_||_yr)rrrrrr.r)r
�	timestamp�current_capacity�fill_amount�new_capacitys     rr,zTokenBucket._refillisx���K�K�,�,�.�	����'�#,�D� ���1�1�� �4�#7�#7�7�4�?�?�J���4�-�-�/?�+�/M�N��!-���(��r
N)r+T)rrr�	_MIN_RATEr�propertyr&�setterr2r4r8r7r:r,rr
rrrsx���I�1:�	!������_�_�3��3�(�"��"��&��&�=��.C�	)r
r)�__doc__r!r�botocore.exceptionsrrrrr
r�<module>rHs'��K���9���_)�_)r

Youez - 2016 - github.com/yon3zu
LinuXploit