This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### work | |
| import typing as t | |
| import asyncio | |
| RateResult = t.Callable[..., t.Coroutine[t.Any, t.Any, None]] | |
| def rate_limit_builder(count_limit: int, time_period: int) -> RateResult: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys, time, threading | |
| test_dict = {i: None for i in range(1000)} | |
| ITERS = 1_000_000 | |
| def reader(d, expression): | |
| keys = list(d.keys()) | |
| n = len(keys) | |
| for i in range(ITERS): | |
| if expression: |
OlderNewer