code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 70 MAX_CLAUS = 300 MAX_VARS = 40 MAX_VARS_POR_CLAUS = 10 f = open("hard_big.in",'w') clausulas=open("hard_big_tamanios",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) clausulas.write(str(c)+"\n") v = randint(1,MAX_VA...
ajibawa-2023/Python-Code-Large/train/row_97706
23
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97706:ImportFrom_L2_C0", "label": "from random import randint", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0333, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["ran...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97706:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97706:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97706:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97706:Expr_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
ajibawa-2023/Python-Code-Large/train/row_97707
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97707:Assign_L3_C0", "label": "files =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 1 MAX_CLAUS = 300 MAX_VARS = 300 MAX_VARS_POR_CLAUS = 3 f = open("hard.in",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) v = randint(1,MAX_VARS) f.write("%d %d\r\n"%(c,v)) for j in xrange(c): l = randint(1,randin...
ajibawa-2023/Python-Code-Large/train/row_97708
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97708:ImportFrom_L2_C0", "label": "from random import randint", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.037, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["rand...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97708:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97708:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97708:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97708:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('instance80_24/data.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for x in todo if x] tabu=[int(x.sp...
ajibawa-2023/Python-Code-Large/train/row_97709
16
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97709:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0455, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impo...
[]
#! /usr/bin/python files=["constructiva_big.out","busq_local_big.out","tabu_big.out"] f=open("data_big.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
ajibawa-2023/Python-Code-Large/train/row_97710
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97710:Assign_L3_C0", "label": "files =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('data_big.dat') tam=open('hard_big_tamanios') todo=fin.read().strip().split('\n') #xs=tam.read().split() constru=[int(x.split()[0]) for x in todo if x] local=[int(x.split()[1]) for x in todo if x] xs=tabu=[int(x.split()[2]) for x in todo if x] title("Comp...
ajibawa-2023/Python-Code-Large/train/row_97712
17
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97712:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impor...
[]
#!/usr/bin/env python from matplotlib.pyplot import * files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] data = "\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]) todo=data.strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split(...
ajibawa-2023/Python-Code-Large/train/row_97713
19
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97713:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impor...
[]
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
ajibawa-2023/Python-Code-Large/train/row_97714
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97714:Assign_L3_C0", "label": "files =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
#!/usr/bin/env python from matplotlib.pyplot import * files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] data = "\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]) todo=data.strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split(...
ajibawa-2023/Python-Code-Large/train/row_97715
19
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97715:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impor...
[]
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
ajibawa-2023/Python-Code-Large/train/row_97716
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97716:Assign_L3_C0", "label": "files =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('p_iter1.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] ys=[int(x.split()[1]) for x in todo if x] #title("Cantidad de operaciones de $matching$") xlabel("MAX_ITER") ylabel("clausulas ...
ajibawa-2023/Python-Code-Large/train/row_97718
11
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97718:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.0556, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impo...
[]
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('p_iter1.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] ys=[int(x.split()[1]) for x in todo if x] #title("Cantidad de operaciones de $matching$") xlabel("MAX_ITER") ylabel("clausulas ...
ajibawa-2023/Python-Code-Large/train/row_97719
11
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97719:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.0556, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impo...
[]
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 1 MAX_CLAUS = 300 MAX_VARS = 300 MAX_VARS_POR_CLAUS = 3 f = open("hard.in",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) v = randint(1,MAX_VARS) f.write("%d %d\r\n"%(c,v)) for j in xrange(c): l = randint(1,randin...
ajibawa-2023/Python-Code-Large/train/row_97720
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97720:ImportFrom_L2_C0", "label": "from random import randint", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.037, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["rand...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97720:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97720:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97720:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97720:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('data_tiempos.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for ...
ajibawa-2023/Python-Code-Large/train/row_97721
16
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97721:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impor...
[]
#! /usr/bin/python #files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] #f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])])) files=["exacto.log","constructiva.log","busq_local.log","tabu.log"] f=open("data_tiempos.dat",'w').wr...
ajibawa-2023/Python-Code-Large/train/row_97722
2
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97722:Assign_L6_C0", "label": "files =", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.8571, 0.1429, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('data_tiempos.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for ...
ajibawa-2023/Python-Code-Large/train/row_97723
16
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97723:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impor...
[]
#! /usr/bin/python #files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] #f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])])) files=["exacto.log","constructiva.log","busq_local.log","tabu.log"] f=open("data_tiempos.dat",'w').wr...
ajibawa-2023/Python-Code-Large/train/row_97724
2
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97724:Assign_L6_C0", "label": "files =", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.8571, 0.1429, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
ajibawa-2023/Python-Code-Large/train/row_97725
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97725:Assign_L3_C0", "label": "files =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
#! /usr/bin/python files=["constructiva_big.out","busq_local_big.out","tabu_big.out"] f=open("data_big.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
ajibawa-2023/Python-Code-Large/train/row_97726
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97726:Assign_L3_C0", "label": "files =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 598, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": ""...
[]
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('data_big.dat') tam=open('hard_big_tamanios') todo=fin.read().strip().split('\n') #xs=tam.read().split() constru=[int(x.split()[0]) for x in todo if x] local=[int(x.split()[1]) for x in todo if x] xs=tabu=[int(x.split()[2]) for x in todo if x] title("Comp...
ajibawa-2023/Python-Code-Large/train/row_97727
17
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97727:ImportFrom_L2_C0", "label": "from matplotlib.pyplot import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "impor...
[]
from random import randint def mprint(m): return '\n'.join(map(lambda x:''.join([el and '#' or '_' for el in x]),m)) fout=open('test_sanos.in','w') for n in range(6,40): for caso in range(10): M=[[0]*n for el in range(n)] ks=[] for cuad in range(randint(5,2*n)): ki=randint(2,n/4+1) if ki%2==1: ki+=rand...
ajibawa-2023/Python-Code-Large/train/row_97728
26
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97728:ImportFrom_L1_C0", "label": "from random import randint", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["ran...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97728:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97728:Return_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97728:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97728:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
#!/usr/bin/env python import getopt,sys import subprocess from random import random,randint,seed from math import sqrt seed(123) # defino el seed para hacer el experimento reproducible def runtest(li,args): # abro ./domino con parametros args fp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIP...
ajibawa-2023/Python-Code-Large/train/row_97729
45
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97729:Import_L1_C0", "label": "getopt import getopt, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 588, 0, 2, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97729:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97729:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97729:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97729:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python import getopt,sys import subprocess from random import random,randint,seed from math import sqrt def runtest(li,args): # abro ./domino con parametros args fp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for caso,p in li: fp.stdin.write(str(l...
ajibawa-2023/Python-Code-Large/train/row_97730
32
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97730:Import_L1_C0", "label": "getopt import getopt, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0244, 0, 0.66, 0.0, 588, 0, 2, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97730:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97730:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97730:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97730:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Larg...
from math import cos,pi,sqrt def pretty(m): #funcion que imprime una matriz print '\n'.join([' '.join(map(str,line)) for line in m]) def productoria(li): return reduce(lambda x,y:x*y, li, 1) def sano(n): #algoritmo magico :D return int(round(productoria([sqrt(sqrt(4*cos(pi*j/(n+1))**2+4*cos(pi*k/(n+1))**2)) for...
ajibawa-2023/Python-Code-Large/train/row_97731
44
72
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97731:ImportFrom_L1_C0", "label": "from math import cos, pi, sqrt", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0139, 0.0139, 0, 0.66, 0.0, 526, 0, 3, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97731:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97731:Expr_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97731:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97731:Return_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import getopt,sys import subprocess from random import random,randint,seed from math import sqrt def runtest(li,args): # abro ./domino con parametros args fp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for caso,p in li: fp.stdin.write(str(l...
ajibawa-2023/Python-Code-Large/train/row_97732
32
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97732:Import_L1_C0", "label": "getopt import getopt, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0244, 0, 0.66, 0.0, 588, 0, 2, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97732:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97732:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97732:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97732:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python import getopt,sys import subprocess from random import randint,seed from math import sqrt def runtest(li,args): # abro ./amigos con parametros: time 0.1 3 fp=subprocess.Popen(['./intervalos']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for i in li: fp.stdin.write(str(le...
ajibawa-2023/Python-Code-Large/train/row_97733
17
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97733:Import_L1_C0", "label": "getopt import getopt, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 588, 0, 2, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97733:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97733:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97733:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97733:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Larg...
f=open('Tp1Ej1.in') while True: li=map(float,f.readline().rsplit()) if li[0]<0: break li.pop(0) li.sort() mi,count=li.pop(0)+1,1 for x in li: if x>mi: count+=1 mi=x+1 print count
ajibawa-2023/Python-Code-Large/train/row_97734
11
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97734:Assign_L1_C0", "label": "f = open()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 899, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97734:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97734:Assign_L3_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97734:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97734:If_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9...
#!/usr/bin/env python import getopt,sys import subprocess from random import randint,seed from math import sqrt def runtest(li,args): # abro ./amigos con parametros: time 0.1 3 fp=subprocess.Popen(['./intervalos']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for i in li: fp.stdin.write(str(le...
ajibawa-2023/Python-Code-Large/train/row_97735
17
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97735:Import_L1_C0", "label": "getopt import getopt, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 588, 0, 2, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97735:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97735:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97735:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97735:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python import random import sys for i in range(1): tanda = random.randint(15,30) for i in range(tanda): if i == 0 : sys.stdout.write('%d' % tanda) sys.stdout.write(' %d' % random.randint(-20,10)) sys.stdout.write("\n")
ajibawa-2023/Python-Code-Large/train/row_97740
9
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97740:Import_L3_C0", "label": "random import random", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97740:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97740:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97740:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97740:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9774...
#!/usr/bin/python import random import sys for i in range(1): tanda = random.randint(15,30) for i in range(tanda): if i == 0 : sys.stdout.write('%d' % tanda) sys.stdout.write(' %d' % random.randint(-20,10)) sys.stdout.write("\n")
ajibawa-2023/Python-Code-Large/train/row_97741
9
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97741:Import_L3_C0", "label": "random import random", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97741:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97741:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97741:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97741:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9774...
#!/usr/bin/python #este es el grafo de ejemplo que me genera la matris # 0 -> 3 # 1 -> 3 # 2 -> 3 # 4 -> 3 # 2 - > 5 adjacencyMatix = [ [0,0,0,1,0,0] , \ [0,0,0,1,0,0] , \ [0,0,0,1,0,0] , \ [1,1,1,0,1,0] , \ [0,0,0,1,0,0] , \ [0,0,1,0,0,0] ] stations = [0] def nodeIsConnected(node,parent...
ajibawa-2023/Python-Code-Large/train/row_97742
8
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97742:FunctionDef_L1_C0", "label": "nodeIsConnected", "type": "function", "loc": [1, 15], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.9375, 0, 0.66, 0.0, 292, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "nodeIsConnected", "arg_names": ["node", "parent"], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97742:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97742:If_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97742:If_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97742:Return_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#! /usr/bin/env python import math def distancia(a,b): return math.sqrt((int(b[0])-int(a[0]))**2 + (int(b[1])-int(a[1]))**2 ) fo = open("testej2.in", "r") primeraLinea = fo.readline().split() #Trato la entrada n = int(primeraLinea[0]) k = int(primeraLinea[1]) puntos = [] # este es mi arreglo de puntos no se to...
ajibawa-2023/Python-Code-Large/train/row_97743
44
84
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97743:Import_L2_C0", "label": "math import math", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0238, 0.0119, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97743:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97743:Return_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97743:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97743:If_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#!/usr/bin/python #este es el grafo de ejemplo que me genera la matris # 0 -> 3 # 1 -> 3 # 2 -> 3 # 4 -> 3 # 2 - > 5 adjacencyMatix = [ [0,0,0,1,0,0] , \ [0,0,0,1,0,0] , \ [0,0,0,1,0,0] , \ [1,1,1,0,1,0] , \ [0,0,0,1,0,0] , \ [0,0,1,0,0,0] ] stations = [0] def nodeIsConnected(node,parent...
ajibawa-2023/Python-Code-Large/train/row_97744
8
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97744:FunctionDef_L1_C0", "label": "nodeIsConnected", "type": "function", "loc": [1, 15], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.9375, 0, 0.66, 0.0, 292, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "nodeIsConnected", "arg_names": ["node", "parent"], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97744:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97744:If_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97744:If_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97744:Return_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#! /usr/bin/env python import math def distancia(a,b): return math.sqrt((int(b[0])-int(a[0]))**2 + (int(b[1])-int(a[1]))**2 ) fo = open("testej2.in", "r") primeraLinea = fo.readline().split() #Trato la entrada n = int(primeraLinea[0]) k = int(primeraLinea[1]) puntos = [] # este es mi arreglo de puntos no se to...
ajibawa-2023/Python-Code-Large/train/row_97745
44
84
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97745:Import_L2_C0", "label": "math import math", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0238, 0.0119, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97745:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97745:Return_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97745:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97745:If_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#! /usr/bin/env python from random import randint #defino el nombre de cada archivo fo = open("testej2.in", "wb") n = randint(100,3000) #cantidad de pueblos k = randint(50,1000) #cantidad de entradas #primer linea la cantidad de pueblos y centrales fo.write( str(n) + " " + str(k) +"\n") #para cada pueblo genero su c...
ajibawa-2023/Python-Code-Large/train/row_97746
11
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97746:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0476, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["ran...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97746:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97746:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97746:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97746:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#! /usr/bin/env python from random import randint #defino el nombre de cada archivo fo = open("testej2.in", "wb") n = randint(100,3000) #cantidad de pueblos k = randint(50,1000) #cantidad de entradas #primer linea la cantidad de pueblos y centrales fo.write( str(n) + " " + str(k) +"\n") #para cada pueblo genero su c...
ajibawa-2023/Python-Code-Large/train/row_97747
11
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97747:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0476, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["ran...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97747:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97747:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97747:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97747:Assign_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/python import random import sys import string import os import time print sys.getrecursionlimit() sys.setrecursionlimit(5000) print sys.getrecursionlimit() #sys.exit() #filas n = 10 #columnas m = 10 DEBUG=0 def debug(s): if DEBUG : print s # las fichas se numeran asi en sus coordenadas # 2 # 1 3 ...
ajibawa-2023/Python-Code-Large/train/row_97748
168
261
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97748:Import_L3_C0", "label": "random import random", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0038, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97748:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97748:If_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97748:If_L19_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97748:Expr_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
#!/usr/bin/python import random import sys import string import os import time print sys.getrecursionlimit() sys.setrecursionlimit(5000) print sys.getrecursionlimit() #sys.exit() #filas n = 10 #columnas m = 10 DEBUG=0 def debug(s): if DEBUG : print s # las fichas se numeran asi en sus coordenadas # 2 # 1 3 ...
ajibawa-2023/Python-Code-Large/train/row_97749
168
261
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97749:Import_L3_C0", "label": "random import random", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0038, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97749:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97749:If_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97749:If_L19_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97749:Expr_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
#! /usr/bin/env python from random import randint #defino el nombre del unico archivo con varias instancias fo = open("ej1/1.in", "wb") #genero m instancias del problema for j in range(randint(1,100)): #obtengo un random para la cantidad de camiones n = randint(1,200) D = randint(1,200) # formato D n d1....dn ...
ajibawa-2023/Python-Code-Large/train/row_97750
12
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97750:ImportFrom_L2_C0", "label": "from random import randint", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["rand...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97750:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97750:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97750:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97750:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
#! /usr/bin/env python from random import randint #defino el nombre de cada archivo fo = open("ej2/" + "testej2.txt", "wb") for j in range(200): #obtengo un random para la cantidad de joyas n = randint(1,100000) #primer linea la cantidad de joyas n fo.write( str(n) + "\n") #para cada joya genero un di ti rando...
ajibawa-2023/Python-Code-Large/train/row_97751
11
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97751:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.05, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["randint...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97751:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97751:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97751:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97751:Expr_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9...
#! /usr/bin/env python from random import randint #defino el nombre de cada archivo fo = open("ej3/1.in", "wb") #obtengo cantidad de filas, columnas y colores n = randint(2,6) m = randint(2,6) c = randint(1,8) #primer linea filas,columnas y colores fo.write( str(n) + " " + str(m) + " " + str(c) + "\n") #para cad...
ajibawa-2023/Python-Code-Large/train/row_97752
13
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97752:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1304, 0.0435, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["ran...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97752:For_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97752:Assign_L17_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97752:For_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97752:Assign_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#! /usr/bin/env python from random import randint #defino el nombre de cada archivo fo = open("ej2/" + "testej2.txt", "wb") for j in range(200): #obtengo un random para la cantidad de joyas n = randint(1,100000) #primer linea la cantidad de joyas n fo.write( str(n) + "\n") #para cada joya genero un di ti rando...
ajibawa-2023/Python-Code-Large/train/row_97753
11
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97753:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.05, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["randint...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97753:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97753:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97753:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97753:Expr_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9...
#! /usr/bin/env python from random import randint #defino el nombre del unico archivo con varias instancias fo = open("ej1/1.in", "wb") #genero m instancias del problema for j in range(randint(1,100)): #obtengo un random para la cantidad de camiones n = randint(1,200) D = randint(1,200) # formato D n d1....dn ...
ajibawa-2023/Python-Code-Large/train/row_97754
12
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97754:ImportFrom_L2_C0", "label": "from random import randint", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["rand...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97754:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97754:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97754:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97754:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
#! /usr/bin/env python from random import randint #defino el nombre de cada archivo fo = open("ej3/1.in", "wb") #obtengo cantidad de filas, columnas y colores n = randint(2,6) m = randint(2,6) c = randint(1,8) #primer linea filas,columnas y colores fo.write( str(n) + " " + str(m) + " " + str(c) + "\n") #para cad...
ajibawa-2023/Python-Code-Large/train/row_97755
13
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97755:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1304, 0.0435, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["ran...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97755:For_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97755:Assign_L17_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97755:For_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97755:Assign_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#! /usr/bin/env python import numpy as np; import re; # regexp import matplotlib.pyplot as mp; ################################################################ # Airfoil : load profile of a wing # # Reads a file whose lines contain coordinates of points, # separated by an empty line. # Every line not containing a cou...
ajibawa-2023/Python-Code-Large/train/row_97756
88
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97756:Import_L3_C0", "label": "numpy import np", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.024, 0.008, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97756:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97756:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97756:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97756:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Co...
#! /usr/bin/env python import numpy as np; import re; # regexp import matplotlib.pyplot as mp; ################################################################ # Airfoil : load profile of a wing # # Reads a file whose lines contain coordinates of points, # separated by an empty line. # Every line not containing a cou...
ajibawa-2023/Python-Code-Large/train/row_97757
88
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97757:Import_L3_C0", "label": "numpy import np", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.024, 0.008, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97757:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97757:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97757:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97757:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Co...
import numpy as np import matplotlib.pyplot as mp import load_foil as lf #------------------------------------------------------------------------# # INTEGRAL METHODS # #------------------------------------------------------------------------# def rectangle_metho...
ajibawa-2023/Python-Code-Large/train/row_97758
86
122
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97758:Import_L1_C0", "label": "numpy import np", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0082, 0.0082, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97758:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97758:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97758:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97758:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python from sys import platform requires = {} try: from setuptools import setup if not platform.startswith('java'): requires = { 'install_requires': ['robotframework', 'paramiko >= 1.8.0'], } except ImportError: from distutils.core import setup from os.path i...
ajibawa-2023/Python-Code-Large/train/row_97759
13
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97759:ImportFrom_L3_C0", "label": "from sys import platform", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0638, 0.0213, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["platform...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97759:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97759:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97759:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97759:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
ajibawa-2023/Python-Code-Large/train/row_97760
107
178
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97760:Try_L15_C0", "label": "try", "type": "try", "loc": [15, 22], "level": 0, "parent": null, "vector": [7, 0, 0.1039, 0.0449, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97760:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97760:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97760:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97760:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
ajibawa-2023/Python-Code-Large/train/row_97761
4
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97761:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.05, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97761:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97761:ImportFrom_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97761:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97761:ImportFrom_L20_C4"}]
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
ajibawa-2023/Python-Code-Large/train/row_97762
119
196
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97762:Import_L14_C0", "label": "time import time", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0051, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97762:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97762:Import_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97762:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97762:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from robot import utils class ConfigurationException(Exception): """Raised when creating, updating or accessing a Configuration entry fails. """ pass class Configuration(object): """A simple configuration class. Configuration is defined with keyword arguments, in which the value must be an ...
ajibawa-2023/Python-Code-Large/train/row_97763
62
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97763:ImportFrom_L1_C0", "label": "from robot import utils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["utils"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97763:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97763:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97763:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97763:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
VERSION = '2.0.2'
ajibawa-2023/Python-Code-Large/train/row_97764
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97764:Assign_L1_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_name": ...
[]
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
ajibawa-2023/Python-Code-Large/train/row_97767
2
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97767:ImportFrom_L15_C0", "label": "from library import SSHLibrary", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.9375, 0.0625, 0, 0.66, 0.0, 860, 0, 1, 0, 0, 860, 0, 0], "semantic": {"name": "library", "arg_names": [], "import_names...
[]
#!/usr/bin/env python import sys import os from robot.libdoc import libdoc ROOT = os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..')) sys.path.insert(0, os.path.join(ROOT, 'src')) if __name__ == '__main__': ipath = os.path.join(ROOT, 'src', 'SSHLibrary') opath = os.path.join(ROOT, 'doc', '...
ajibawa-2023/Python-Code-Large/train/row_97768
11
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97768:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97768:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97768:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97768:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97768:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
import math class LineGeometry: def abscurve(self, p1, p2, p3): (x1,y1), (x2,y2), (x3,y3) = p1, p2, p3 a, b, c = self.line2d_in_general_form(p1, p3) if a == b == 0: return 0 return abs((a*x2+b*y2+c)/math.sqrt(a**2+b**2)) def line2d_in_general_form(self, p1, p2): """Ax...
ajibawa-2023/Python-Code-Large/train/row_97770
21
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97770:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97770:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97770:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97770:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97770:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
import thread import weakref import time import gobject class Timer: def alarmIn(self, delay, instance, action, *args): gobject.timeout_add(int(delay*1000), self.delayed_response, delay, weakref.ref(instance), action, args) #thread.start_new(self.delayed_response, ...
ajibawa-2023/Python-Code-Large/train/row_97771
16
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97771:Import_L1_C0", "label": "thread import thread", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 260, 0, 1, 0, 0, 260, 0, 0], "semantic": {"name": "thread", "arg_names": [], "import_names": ["thread"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97771:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97771:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97771:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97771:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-...
import weakref class Control(object): def isOutlet(self, connectionpoint, outlet): if hasattr(connectionpoint, 'attachment'): if repr(connectionpoint.attachment) == outlet: return True if hasattr(connectionpoint, 'tag'): if connectionpoint.tag == outlet: ...
ajibawa-2023/Python-Code-Large/train/row_97772
86
134
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97772:Import_L1_C0", "label": "weakref import weakref", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 0, 0.66, 0.0, 708, 0, 1, 0, 0, 708, 0, 0], "semantic": {"name": "weakref", "arg_names": [], "import_names": ["weakref"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97772:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97772:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97772:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97772:If_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pickle import new import StringIO import pattern.crossref def code(*args, **kwargs): return new.code(*args, **kwargs) def function(*args, **kwargs): return new.function(*args, **kwargs) class PluggablePickler(pickle.Pickler): def __init__(self, *args): pickle.Pickler.__init__(self, *arg...
ajibawa-2023/Python-Code-Large/train/row_97773
51
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97773:Import_L1_C0", "label": "pickle import pickle", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0118, 0, 0.66, 0.0, 848, 0, 1, 0, 0, 848, 0, 0], "semantic": {"name": "pickle", "arg_names": [], "import_names": ["pickle"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97773:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97773:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97773:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97773:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code...
"""A package of useful stuff."""
ajibawa-2023/Python-Code-Large/train/row_97774
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97774:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
"""Allows easy run-time tracing of references to objects. Each 'sink' deploys an 'xref' dictionary attribute which is updated whenever CrossReferences to the object are created and destroyed. By reading the current value of 'xref', one can tell which objects are referring the given object via the cross- reference mecha...
ajibawa-2023/Python-Code-Large/train/row_97775
40
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97775:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0526, 0.0877, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97775:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97775:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97775:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97775:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Cod...
import os, imp import plugins.foolish import gobject class CodeBase(object): EDITOR = plugins.foolish.FoolishEditor() EDITOR_ARGS = [] ROOT = os.getcwd() TMPDIR = os.path.join(ROOT, "tmp") components = { } class NullComponent(object): def selected(self, *args): pass class EditSes...
ajibawa-2023/Python-Code-Large/train/row_97776
42
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97776:Import_L1_C0", "label": "os import os, imp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0147, 0.0147, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "imp"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97776:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97776:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97776:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97776:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from pattern.circuit import Control class entry(Control): def please(self, event): page = "" for c in ["1", "2", "3", "4", "5"]: bridge = self.acquireInterface(event, c) if bridge is not None: page += str(bridge.pull(*event.data)) return page
ajibawa-2023/Python-Code-Large/train/row_97777
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97777:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97777:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97777:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97777:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97777:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def incoming(self, event): temporal, node = event.data if temporal == "post": bridge = self.acquireInterface(event, "output") if bridge is not None: bridge.push(event.trail.operands.pop())
ajibawa-2023/Python-Code-Large/train/row_97778
8
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97778:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97778:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97778:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97778:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97778:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def incoming(self, event): destination, message = event.data bridge = self.acquireInterface(event, "users") if bridge is not None: users = bridge.pull() for username in self.getUserList(event, destination): connection = users.get(username, N...
ajibawa-2023/Python-Code-Large/train/row_97779
17
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97779:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97779:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97779:FunctionDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97779:FunctionDef_L6_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97779:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def please(self, event): bridge = self.acquireInterface(event, "contents") if bridge is not None: bridge.trail.key = event.shape.key return bridge.pull()
ajibawa-2023/Python-Code-Large/train/row_97780
7
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97780:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97780:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97780:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97780:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97780:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def incoming(self, event): username, = event.data bridge = self.acquireInterface(event, "left:20%") if bridge is not None: bridge.push("leave", username) bridge = self.acquireInterface(event, "left:80%") if bridge is not None: bridge.push("p...
ajibawa-2023/Python-Code-Large/train/row_97781
10
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97781:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97781:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97781:FunctionDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97781:FunctionDef_L6_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97781:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code...
class entry: def incoming(self, event): for item in event.data: print item
ajibawa-2023/Python-Code-Large/train/row_97782
4
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97782:ClassDef_L1_C0", "label": "entry", "type": "class", "loc": [1, 4], "level": 0, "parent": null, "vector": [3, 0, 0.625, 1.0, 0, 0.66, 0.0, 812, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97782:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97782:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97782:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97782:For_L3_C8"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): def please(self, event): bridge = self.acquireInterface(event, "from") if bridge is not None: return bridge.pull(event.trail.key)
ajibawa-2023/Python-Code-Large/train/row_97783
6
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97783:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97783:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97783:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97783:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97783:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
class entry(object): VERBS = ["Edit Content"] PAGE = "<html><body>Hi There</body></html>" def __init__(self): self.page = self.PAGE def realize(self, event): self.realized = event if hasattr(event.shape, 'page'): self.page = event.shape.page d...
ajibawa-2023/Python-Code-Large/train/row_97784
39
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97784:ClassDef_L2_C0", "label": "entry", "type": "class", "loc": [2, 48], "level": 0, "parent": null, "vector": [3, 0, 0.5102, 0.9592, 0, 0.66, 0.0, 812, 0, 5, 0, 0, 186, 0, 27], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "an...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97784:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97784:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97784:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97784:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
class entry: class rvalue: def __init__(self, v): self._v = v def get(self): return self._v def incoming(self, event): temporal, node = event.data if temporal == "post": event.trail.operands.append(self.rvalue(node.literal))
ajibawa-2023/Python-Code-Large/train/row_97785
10
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97785:ClassDef_L1_C0", "label": "entry", "type": "class", "loc": [1, 8], "level": 0, "parent": null, "vector": [3, 0, 0.5625, 1.0, 0, 0.66, 0.0, 812, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97785:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97785:ClassDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97785:ClassDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97785:FunctionDef_L3_C8"}, {"f": "ajibawa-2023/Python-Code-...
from pattern.circuit import Control import re class entry(Control): MULTIPART = re.compile('Content-Disposition: form-data; name="(.*)"\r\n([^\0]*)', re.MULTILINE) def incoming(self, event): ct = event.trail.headers["content-type"] cl = int(event.trail.headers["content-length"]) reque...
ajibawa-2023/Python-Code-Large/train/row_97786
34
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97786:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0233, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97786:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97786:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97786:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97786:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): class User(object): pass def __init__(self): self.users = { } def realize(self, event): self.updated(event) def incoming(self, event): action, user = event.data if action == "enter": self.enter(event, user) elif action == "leave": ...
ajibawa-2023/Python-Code-Large/train/row_97787
29
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97787:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0222, 0.0222, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97787:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97787:ClassDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97787:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97787:FunctionDef_L9_C1"}, {"f": "ajibawa-2023/Python-Code-...
from pattern.circuit import Control class entry(Control): def incoming(self, event): temporal, node = event.data bridge = self.acquireInterface(event, node.value()) if bridge is not None: bridge.push(temporal, node)
ajibawa-2023/Python-Code-Large/train/row_97788
7
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97788:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97788:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97788:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97788:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97788:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def realize(self, event): if not hasattr(event.shape, "label"): event.shape.label = "Update" def please(self, event): key, = event.data label = event.shape.label return '<a class="wikilet_update" hre...
ajibawa-2023/Python-Code-Large/train/row_97789
9
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97789:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97789:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97789:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97789:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97789:If_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
class entry(object): VERBS = ["Clear"] def incoming(self, event): child = self.fetch(event) data = event.data if len(data) == 1: data = data[0] event.window.manipulate(child, lambda x: setattr(x, 'caption', str(data))) def realize(self, event): child = self.fetch(...
ajibawa-2023/Python-Code-Large/train/row_97790
19
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97790:ClassDef_L2_C0", "label": "entry", "type": "class", "loc": [2, 24], "level": 0, "parent": null, "vector": [3, 0, 0.5417, 0.9583, 0, 0.66, 0.0, 812, 0, 4, 0, 0, 186, 0, 12], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "an...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97790:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97790:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97790:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97790:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): def incoming(self, event): cmd = event.data[0] elements = cmd.split() if elements: cmdname = elements[0].lower() bridge = self.acquireInterface(event, cmdname) if bridge is not None: ...
ajibawa-2023/Python-Code-Large/train/row_97791
10
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97791:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97791:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97791:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97791:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97791:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def incoming(self, event): print event.data bridge = self.acquireInterface(event, "left:50%") if bridge is not None: command = ":" + event.trail.username + \ "!localhost PRIVMSG " + \ " ".join(event.data[0]) destination = event.data[0]...
ajibawa-2023/Python-Code-Large/train/row_97792
9
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97792:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97792:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97792:FunctionDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97792:FunctionDef_L6_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97792:Expr_L7_C2"}, {"f": "ajibawa-2023/Python-Code-L...
from pattern.circuit import Control class entry(Control): DEFAULT_REPLY = ":%(username)s!%(user)s PART :%(channel)s\r\n" def incoming(self, event): channel = event.data[0][0] username = event.trail.username self.onPart(event, channel.split(","), username) #event.trail.wfile.w...
ajibawa-2023/Python-Code-Large/train/row_97793
11
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97793:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97793:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97793:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97793:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97793:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
class entry: class lvalue: def __init__(self, scope, rname): self._scope = scope self._rname = rname def get(self): return self._scope.get(self._rname, None) def set(self, value): self._scope[self._rname] = value def incoming(self, ev...
ajibawa-2023/Python-Code-Large/train/row_97794
13
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97794:ClassDef_L1_C0", "label": "entry", "type": "class", "loc": [1, 15], "level": 0, "parent": null, "vector": [3, 0, 0.5333, 1.0, 0, 0.66, 0.0, 812, 0, 4, 0, 0, 0, 0, 3], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97794:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97794:ClassDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97794:ClassDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97794:FunctionDef_L4_C8"}, {"f": "ajibawa-2023/Python-Code-...
class entry: class rvalue: def __init__(self, v): self._v = v def get(self): return self._v def __repr__(self): return "|%r|" % self._v def incoming(self, event): temporal, node = event.data if temporal == "post": p2 = event.trail.operands.pop() ...
ajibawa-2023/Python-Code-Large/train/row_97795
14
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97795:ClassDef_L1_C0", "label": "entry", "type": "class", "loc": [1, 12], "level": 0, "parent": null, "vector": [3, 0, 0.5417, 1.0, 0, 0.66, 0.0, 812, 0, 4, 0, 0, 0, 0, 6], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97795:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97795:ClassDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97795:ClassDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97795:FunctionDef_L3_C8"}, {"f": "ajibawa-2023/Python-Code-...
from pattern.circuit import Control class entry(Control): DEFAULT_REPLY = ":localhost guest2171 :- information. Thank you for using freenode!\r\n:localhost 376 guest2171 :End of /MOTD command.\r\n" def incoming(self, event): event.trail.wfile.write(self.DEFAULT_REPLY)
ajibawa-2023/Python-Code-Large/train/row_97796
5
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97796:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97796:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97796:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97796:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97796:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): def incoming(self, event): temporal, node = event.data bridge = self.acquireInterface(event, "out") if temporal == event.shape.temporal: bridge.push(node)
ajibawa-2023/Python-Code-Large/train/row_97798
7
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97798:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97798:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97798:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97798:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97798:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def incoming(self, event): for out in ["1", "2"]: bridge = self.acquireInterface(event, out) if bridge is not None: bridge.push(*event.data)
ajibawa-2023/Python-Code-Large/train/row_97799
7
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97799:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97799:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97799:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97799:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97799:For_L6_C8"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): def incoming(self, event): root, = event.data bridge = self.acquireInterface(event, "out") if bridge is not None: bridge.push(self.walk(root)) def walk(self, root): return "(" + "\n".join([root.value()]...
ajibawa-2023/Python-Code-Large/train/row_97800
9
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97800:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97800:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97800:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97800:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97800:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): VERBS = ["Push"] def verb(self, event): inbridge = self.acquireInterface(event, "in") outbridge = self.acquireInterface(event, "out") if inbridge is not None and outbridge is not None: outbridge.push(inbridge.pull())
ajibawa-2023/Python-Code-Large/train/row_97801
8
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97801:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97801:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97801:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97801:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97801:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): def incoming(self, event): root, = event.data self.walk(event, root) def walk(self, event, root): self.visit(event, "pre", root) for child in root.childNodes(): self.walk(event, child) se...
ajibawa-2023/Python-Code-Large/train/row_97802
14
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97802:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97802:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97802:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97802:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97802:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def incoming(self, event): bridge = self.acquireInterface(event, "out") if bridge is not None: bridge.push(event.data[0].value())
ajibawa-2023/Python-Code-Large/train/row_97803
6
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97803:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97803:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97803:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97803:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97803:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
class entry: def incoming(self, event): temporal, node = event.data if temporal == "post": r = event.trail.operands.pop() l = event.trail.operands.pop() l.set(r.get())
ajibawa-2023/Python-Code-Large/train/row_97804
7
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97804:ClassDef_L1_C0", "label": "entry", "type": "class", "loc": [1, 7], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.875, 0, 0.66, 0.0, 812, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97804:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97804:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97804:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97804:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control import weakref, gobject import os.path, posixpath, urllib import BaseHTTPServer, SimpleHTTPServer class SimpleHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def get_root_path(self): s = self.server if s is not None and hasattr(s, 'getRootPath'):...
ajibawa-2023/Python-Code-Large/train/row_97805
59
88
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97805:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0114, 0.0114, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97805:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97805:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97805:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97805:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
class entry: def incoming(self, event): event.trail.operands = [] event.trail.vars = { }
ajibawa-2023/Python-Code-Large/train/row_97806
4
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97806:ClassDef_L1_C0", "label": "entry", "type": "class", "loc": [1, 4], "level": 0, "parent": null, "vector": [3, 0, 0.625, 1.0, 0, 0.66, 0.0, 812, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "entry", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97806:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97806:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97806:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97806:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): VERBS = ["Go"] def verb(self, event): bridge = self.acquireInterface(event, "go") if bridge is not None: bridge.push()
ajibawa-2023/Python-Code-Large/train/row_97807
7
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97807:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97807:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97807:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97807:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97807:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): JOIN_MSG = ":%(username)s!%(user)s JOIN :%(channel)s" NAMES_RPL = ":%(servername)s 353 %(username)s = %(channel)s :%(userlist)s\r\n:%(servername)s 366 %(username)s %(channel)s :End of /NAMES list.\r\n" def incoming(self, event): channels ...
ajibawa-2023/Python-Code-Large/train/row_97808
20
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97808:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97808:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97808:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97808:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97808:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from pattern.circuit import Control class entry(Control): def incoming(self, event): path, = event.data print path while path and path[0] == '/': path = path[1:] if path == "": path = "index.html" bridge = self.acquireInterface(event, path) if bridge is not None...
ajibawa-2023/Python-Code-Large/train/row_97809
15
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97809:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97809:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97809:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97809:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97809:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
import pattern.circuit import SocketServer import gobject import weakref, time, socket, select class entry(pattern.circuit.Control): class EchoRequest(SocketServer.StreamRequestHandler): def handle(self): self.server.notify("on", self) self.line = "" gobject.io_add_watch(self.rfile, gobject.IO_IN | gobje...
ajibawa-2023/Python-Code-Large/train/row_97810
71
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97810:Import_L1_C0", "label": "pattern.circuit import pattern.circuit", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0102, 0.0102, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97810:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97810:ClassDef_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97810:ClassDef_L8_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_97810:FunctionDef_L9_C2"}, {"f": "ajibawa-2023/Python-Code-...
from pattern.circuit import Control class entry(Control): DEFAULT_REPLY = ":%(servername)s 375 %(username)s\r\n:%(servername)s 372 %(username)s :- information. Thank you for using freenode!\r\n:%(servername)s 376 %(username)s :End of /MOTD command.\r\n" def incoming(self, event): event.trail.userna...
ajibawa-2023/Python-Code-Large/train/row_97811
9
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97811:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97811:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97811:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97811:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97811:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from pattern.circuit import Control class entry(Control): class Variable(object): def __init__(self): self.name = None def __init__(self): self.var = self.Variable() def please(self, event): outlet = self.acquireOutlet(event, "nam...
ajibawa-2023/Python-Code-Large/train/row_97812
12
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97812:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97812:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97812:ClassDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97812:ClassDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97812:FunctionDef_L7_C8"}, {"f": "ajibawa-2023/Python-Code-...
from pattern.circuit import Control class entry(Control): def incoming(self, event): username = event.trail.username self.onQuit(event, username) event.trail.release() def onQuit(self, event, username): bridge = self.acquireInterface(event, "onQuit") if bridge is not ...
ajibawa-2023/Python-Code-Large/train/row_97813
10
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97813:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97813:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97813:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97813:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97813:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
from pattern.circuit import Control class entry(Control): def realize(self, event): if not hasattr(event.shape, "key"): event.shape.key = "default" def please(self, event): bridge = self.acquireInterface(event, "bottom:50%") if bridge is None: return "No st...
ajibawa-2023/Python-Code-Large/train/row_97815
10
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97815:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97815:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97815:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97815:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97815:If_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
from pattern.circuit import Control class entry(Control): def please(self, event): key, = event.data bridge = self.acquireInterface(event, "storage") if bridge is None: return "No storage." else: return bridge.pull().get(key, "Key not found.")
ajibawa-2023/Python-Code-Large/train/row_97816
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_97816:ImportFrom_L1_C0", "label": "from pattern.circuit import Control", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "pattern.circuit", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97816:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97816:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97816:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97816:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...