403Webshell
Server IP : 167.99.254.82  /  Your IP : 216.73.216.188
Web Server : Apache
System : Linux host.techisquad.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : pawluxera ( 1011)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/botocore/retries/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/botocore/retries/__pycache__/bucket.cpython-310.pyc
o

.&�a��@sDdZddlZddlZddlmZGdd�de�ZGdd�de�ZdS)zEThis module implements token buckets used for client side throttling.�N)�CapacityNotAvailableErrorc@s$eZdZdd�Zdd�Zdd�ZdS)�ClockcCsdS�N���selfrr�9/usr/lib/python3/dist-packages/botocore/retries/bucket.py�__init__	szClock.__init__cCst�|�dSr)�time�sleep�r�amountrrrrszClock.sleepcCst��Sr)r
rrrr�current_timeszClock.current_timeN)�__name__�
__module__�__qualname__r	rrrrrrrsrc@speZdZdZefdd�Zedd��Zejdd��Zedd��Zed	d
��Z	dd
d�Z
dd�Zdd�Zdd�Z
dS)�TokenBucketg�?cCsFd|_d|_d|_||_d|_||_t��|_t�	|j�|_
||_dS)Nr)�
_fill_rate�
_max_capacity�_current_capacity�_clock�_last_timestamp�	_min_rate�	threading�Lock�_lock�	Condition�_new_fill_rate_condition�max_rate)rr�clock�min_raterrrr	s

zTokenBucket.__init__cC�|jSr)rrrrrr"�zTokenBucket.max_ratecCsr|j�,|��t||j�|_|dkr||_nd|_t|j|j�|_|j��Wd�dS1s2wYdS)N�)	r�_refill�maxrrr�minr�notify)r�valuerrrr&s�"�cCr!r)rrrrr�max_capacity<r"zTokenBucket.max_capacitycCr!r)rrrrr�available_capacity@r"zTokenBucket.available_capacityr#TcCs8|j�|j||d�Wd�S1swYdS)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)rr
r+rrr�acquireDs
$�zTokenBucket.acquirecCsx|��||jkr|j|8_dS|st��|�|�}|dkr3|j�|�|��|�|�}|dks |j|8_dS)NTr)r$rr�
_sleep_amountr�wait)rr
r+�sleep_amountrrrr,Qs


�
zTokenBucket._acquirecCs||j|jSr)rrrrrrr.hszTokenBucket._sleep_amountcCsT|j��}|jdur||_dS|j}||j|j}t|j||�}||_||_dSr)rrrrrr&r)r�	timestamp�current_capacity�fill_amount�new_capacityrrrr$ks


zTokenBucket._refillN)r#T)rrr�	_MIN_RATEr	�propertyr�setterr)r*r-r,r.r$rrrrrs





r)�__doc__r
r�botocore.exceptionsr�objectrrrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit