From 65d4bb84150c76b48e981f699bc0df9c85cce8fc Mon Sep 17 00:00:00 2001 From: Andrej Karpathy Date: Fri, 10 Dec 2021 20:28:34 -0800 Subject: [PATCH] some sleep is good for you --- send_emails.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/send_emails.py b/send_emails.py index 933cd2b..e4df822 100644 --- a/send_emails.py +++ b/send_emails.py @@ -11,6 +11,7 @@ to manually register with sendgrid yourself, get an API key and put it in the fi import os import time +import random import argparse import numpy as np @@ -258,6 +259,8 @@ if __name__ == "__main__": send_email(email, html) num_sent += 1 + # zzz + time.sleep(1 + random.uniform(0, 2)) print("done.") print("sent %d emails" % (num_sent, ))