From 213c40351df5b6693ba2c80ad063f30bf2e20428 Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 14 Jan 2019 08:38:54 +1000 Subject: [PATCH] only use 10k toots rather than all of them to avoid having Too Many Toots --- functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.py b/functions.py index 6d88243..c21271a 100755 --- a/functions.py +++ b/functions.py @@ -16,7 +16,7 @@ def make_sentence(output): db = sqlite3.connect("toots-copy.db") db.text_factory=str c = db.cursor() - toots = c.execute("SELECT content FROM `toots`").fetchall() + toots = c.execute("SELECT content FROM `toots` ORDER BY RANDOM() LIMIT 10000").fetchall() toots_str = "" for toot in toots: toots_str += "\n{}".format(toot[0])