diff options
author | mh8810@student.uni-lj.si <mh8810@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-12 17:50:52 +0000 |
---|---|---|
committer | mh8810@student.uni-lj.si <mh8810@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-12 17:50:52 +0000 |
commit | 2e4971cb614e578746e94bc14dd4ec87e5d49445 (patch) | |
tree | 7d318156d5b424142ad930be8d0f914b3328e64a /kpov_judge/tasks | |
parent | f6457b0627e54e3291568a612993c4c0c765f430 (diff) |
Random zrebana stevilka za studenta
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@55 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r-- | kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py index fc05b7f..6758e34 100644 --- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py +++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py @@ -102,6 +102,7 @@ def task(IP_NM, DNS_NM, IP_static, DNS_static): return results def gen_params(user_id, params_meta): + import random params = dict() r = random.Random(user_id) # IP_NM, DNS_NM, IP_static, DNS_static) @@ -110,7 +111,11 @@ def gen_params(user_id, params_meta): params['DNS_NM'] = r.choice(dns_servers) params['IP_NM'], params['IP_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2) params['DNS_static'] = r.choice(dns_servers) - return params + count = 0 + while(count<user_id): + params[count]=random.randInt(10000000,99999999) + count=count+1 + return params def task_check(results, params): import re |