[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Anyone know how to make a rate limit generator wrapper for python
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 6
Thread images: 1
File: aqua.jpg (157 KB, 850x1200) Image search: [Google]
aqua.jpg
157 KB, 850x1200
Anyone know how to make a rate limit generator wrapper for python that just sleeps until the next cycle once limits have been reached?

for user in users:
send_email(user)


But since I want to reduce congestion, I want something like

for user in rate_limit(per_min=50, users):
send_email(user)
>>
Please, /g/. I downloaded gentoo like you said

>help me
>>
>>54763213
Who are you quoting?
>>
>>54763244
I am OP. I merely used green text
>to emphasize my plead for helps
>>
>>54763182
a thread that keeps track of seconds passed. before each send_email, check if the number sent is 50. if it is, sleep while seconds != 60

after each 60 seconds reset the counter
>>
>>54763267
Never been into the whole misuse of the quote function, to be honest.
Thread replies: 6
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.