only use 10k toots rather than all of them to avoid having Too Many Toots
This commit is contained in:
parent
a218e07022
commit
213c40351d
|
@ -16,7 +16,7 @@ def make_sentence(output):
|
||||||
db = sqlite3.connect("toots-copy.db")
|
db = sqlite3.connect("toots-copy.db")
|
||||||
db.text_factory=str
|
db.text_factory=str
|
||||||
c = db.cursor()
|
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 = ""
|
toots_str = ""
|
||||||
for toot in toots:
|
for toot in toots:
|
||||||
toots_str += "\n{}".format(toot[0])
|
toots_str += "\n{}".format(toot[0])
|
||||||
|
|
Loading…
Reference in New Issue