Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
botocore /
retries /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
__init__.py
121
B
-rw-r--r--
adaptive.py
4.03
KB
-rw-r--r--
base.py
814
B
-rw-r--r--
bucket.py
3.93
KB
-rw-r--r--
quota.py
1.92
KB
-rw-r--r--
special.py
1.57
KB
-rw-r--r--
standard.py
19.19
KB
-rw-r--r--
throttling.py
1.75
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : quota.py
"""Retry quota implementation. """ import threading class RetryQuota(object): INITIAL_CAPACITY = 500 def __init__(self, initial_capacity=INITIAL_CAPACITY, lock=None): self._max_capacity = initial_capacity self._available_capacity = initial_capacity if lock is None: lock = threading.Lock() self._lock = lock def acquire(self, capacity_amount): """Attempt to aquire a certain amount of capacity. If there's not sufficient amount of capacity available, ``False`` is returned. Otherwise, ``True`` is returned, which indicates that capacity was successfully allocated. """ # The acquire() is only called when we encounter a retryable # response so we aren't worried about locking the entire method. with self._lock: if capacity_amount > self._available_capacity: return False self._available_capacity -= capacity_amount return True def release(self, capacity_amount): """Release capacity back to the retry quota. The capacity being released will be truncated if necessary to ensure the max capacity is never exceeded. """ # Implementation note: The release() method is called as part # of the "after-call" event, which means it gets invoked for # every API call. In the common case where the request is # successful and we're at full capacity, we can avoid locking. # We can't exceed max capacity so there's no work we have to do. if self._max_capacity == self._available_capacity: return with self._lock: amount = min( self._max_capacity - self._available_capacity, capacity_amount ) self._available_capacity += amount @property def available_capacity(self): return self._available_capacity
Close