-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmain.py
53 lines (45 loc) · 1.48 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from modules import judges
from modules.apiHandler import ApiCaller
from environ import VJ_USER, VJ_PASS, UVA_USER, UVA_PASS, CF_USER, CF_PASS, SPOJ_USER, SPOJ_PASS, \
REFRESH_OFFLINE_PROBLEM_DATA, SUBMISSION_LIMIT
from environ import USE_VJ, USE_UVA, USE_CF, USE_SPOJ, USE_LOJ
'''
Refresh offline data
'''
if REFRESH_OFFLINE_PROBLEM_DATA is True:
apicaller = ApiCaller()
apicaller.refreshUvaProblemList() # run only if you think UVa has added new problems
apicaller = ApiCaller()
apicaller.refreshCfProblemList() # run only if you've solved from CF's newly added problems
apicaller = ApiCaller()
apicaller.refreshLojProblemList() # run only if you've solved from CF's newly added problems
'''
Vjudge Login
'''
if USE_VJ is True:
vjudgeUser = judges.Vjudge(VJ_USER, VJ_PASS)
vjudgeUser.downloadSubmissions()
'''
UVa Login
'''
if USE_UVA is True:
uvaUser = judges.UVA(UVA_USER, UVA_PASS)
uvaUser.submitAll(submitSolvedOnes=False, limitSubmissionCount=SUBMISSION_LIMIT)
'''
CodeForces Login
'''
if USE_CF is True:
cfUser = judges.CF(CF_USER, CF_PASS)
cfUser.submitAll(submitSolvedOnes=False, limitSubmissionCount=SUBMISSION_LIMIT)
'''
LightOJ Login
'''
if USE_LOJ is True:
lojUser = judges.LOJ()
lojUser.submitAll(submitSolvedOnes=False, limitSubmissionCount=SUBMISSION_LIMIT)
'''
SPOJ Login
'''
if USE_SPOJ is True:
SpojUser = judges.SPOJ(SPOJ_USER, SPOJ_PASS)
SpojUser.submitAll(submitSolvedOnes=False, limitSubmissionCount=SUBMISSION_LIMIT)