summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-01 06:40:12 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-01 06:40:12 +0000
commit7210b74d6241a4264532aaaa2e1d771eaca4e073 (patch)
treef7d9e9c45d5d478a35e6581801f40713552867a3 /kpov_judge
parent9c6ada33b2df7f45a1606139cc702b536fb9dc41 (diff)
Update create_disk_image so it works with the current pymongo
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@350 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rwxr-xr-xkpov_judge/create_disk_images.py2
-rw-r--r--kpov_judge/tasks/basic_network_gcc/task.py12
2 files changed, 8 insertions, 6 deletions
diff --git a/kpov_judge/create_disk_images.py b/kpov_judge/create_disk_images.py
index 3e59ed4..8b357ed 100755
--- a/kpov_judge/create_disk_images.py
+++ b/kpov_judge/create_disk_images.py
@@ -61,7 +61,7 @@ if __name__ == '__main__':
if len(sys.argv) != 1:
print "Usage: {0}"
print "Create the neccessarry disk images"
- db = pymongo.Connection(settings.DB_HOST).kpov
+ db = pymongo.MongoClient(settings.DB_HOST).kpov
try:
db.authenticate(settings.USERNAME, settings.PASSWORD)
except Exception, e:
diff --git a/kpov_judge/tasks/basic_network_gcc/task.py b/kpov_judge/tasks/basic_network_gcc/task.py
index 6aa2144..8311503 100644
--- a/kpov_judge/tasks/basic_network_gcc/task.py
+++ b/kpov_judge/tasks/basic_network_gcc/task.py
@@ -22,9 +22,11 @@ Izvorna koda je namenoma pokvarjena tako, da so vanjo vrinjeni nepotrebni znaki.
Pred prevajanjem jo morate popraviti.
Napišite skripto ali program {P_script} v domačem imeniku uporabnika student, ki:
-- požene {P_executable} z argumentom "{arg_c}" in mu na standardni vhod pripelje vrednost spremenljivke {env_c}
+- požene {P_executable} z argumentom "{arg_c}" in mu na standardni vhod
+ pripelje vrednost spremenljivke {env_c}
- vse, kar {P_executable} izpiše na stderr, spravi v datoteko {out_stderr_c}.
-- vse vrstice, ki jih {P_executable} izpiše na stdout in vsebujejo zaporedje znakov "ma", zapiše v {out_stdout_c}.
+- vse vrstice, ki jih {P_executable} izpiše na stdout in vsebujejo
+ zaporedje znakov "ma", zapiše v {out_stdout_c}.
Lastnik vseh ustvarjenih datotek mora biti uporabnik student.
@@ -176,11 +178,11 @@ def task_check(results, params):
for i in xrange(100):
s_out += chr(32 + ((ord(arg[i % arg_len]) ^ ord(var[i % env_len])) % 64))
r += ord(arg[i % arg_len]) + ord(var[i % env_len]) + i;
- if (i % 20 == 0):
+ if (i % 17 == 0):
s_out += "RAUS\r\n";
- if (i % 31 == 0):
+ if (i % 29 == 0):
s_out += 'ma'
- s_err += chr((r % 32) + ord('A'));
+ s_err += chr((r % 31) + ord('A'));
if (i % 23 == 0):
s_err += "PATACIS\r\n"
retval = r % 16