mirror of
https://github.com/Findus23/se-simulator.git
synced 2024-09-11 06:33:48 +02:00
de90a78874
thanks to jaytaylor (#2)
16 lines
342 B
Python
Executable file
16 lines
342 B
Python
Executable file
#!/usr/bin/env python
|
|
import utils
|
|
from models import *
|
|
from extra_data import site_colors
|
|
|
|
query = Question.select().order_by(SQL("RAND()"))
|
|
|
|
count = query.count()
|
|
utils.save_question_count(count)
|
|
i = 0
|
|
for question in query:
|
|
question.random = i
|
|
i += 1
|
|
if i % 50 == 0:
|
|
print("{}/{}".format(i, count))
|
|
question.save()
|