Esempio n. 1
0
import json
from pathlib import Path
from shutil import move

from function import run

if __name__ == '__main__':
    if not Path("problem-models-old.json").exists() and Path(
            "problem-models.json").exists():
        move("problem-models.json", "problem-models-old.json")
    results = run(None, True)
    with open("problem-models.json", "w") as f:
        json.dump(results, f)
Esempio n. 2
0
# -*- coding: utf-8 -*-
from function import run

run(0)

Esempio n. 3
0
import json
from pathlib import Path
from shutil import move

from function import run, login

if __name__ == '__main__':
    if not Path("problem-models-old.json").exists() and Path("problem-models.json").exists():
        move("problem-models.json", "problem-models-old.json")
    session = login(None, None)  # set your credential before use. Do not commit it!
    results = run(None, True, session)
    with open("problem-models.json", "w") as f:
        json.dump(results, f)
Esempio n. 4
0
import json
from shutil import move

from function import run, all_contests


if __name__ == '__main__':
    move("problem-models.json", "problem-models-old.json")
    results = run(all_contests(), True)
    with open("problem-models.json", "w") as f:
        json.dump(results, f)
Esempio n. 5
0
# -*- coding: utf-8 -*-
from function import run

run(1)

Esempio n. 6
0
import json
from pathlib import Path

from function import run, login

if __name__ == '__main__':
    session = login(None, None)  # set your credential before use. Do not commit it!
    results = run(None, [], False, session)
    object_dir = "standings/"
    for contest_id, result in results:
        object_key = object_dir + contest_id + ".json"
        with Path(object_key).open("w") as f:
            json.dump(result, f, indent=4)