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
a = range(4) del a[::2] print a
ajibawa-2023/Python-Code-Large/train/row_97153
2
3
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_97153:Assign_L1_C0", "label": "a = range()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 816, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_na...
[]
if "a" is "a": print "OK"
ajibawa-2023/Python-Code-Large/train/row_97154
2
2
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_97154:If_L1_C0", "label": "if", "type": "if", "loc": [1, 2], "level": 0, "parent": null, "vector": [4, 0, 0.75, 1.0, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97154:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97154:Expr_L2_C4"}]
print () == (1,) print () == () print (1,) == (1,) print (1,2) == (3,4) print (1,2) == (1,2) print (1,2) == (1,) print (1,2) == (1,2,3) print (1,2,3) == (1,2) print (1,2,3) == (1,2,3) print print () != (1,) print () != () print (1,) != (1,) print (1,2) != (3,4) print (1,2) != (1,2) print (1,2) != (1,) print (1,2) != (1...
ajibawa-2023/Python-Code-Large/train/row_97155
59
59
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_97155:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0169, 0.0169, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
print "1234"[1:3]
ajibawa-2023/Python-Code-Large/train/row_97156
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_97156:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
for i in "skulpt": print i
ajibawa-2023/Python-Code-Large/train/row_97158
0
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"]
[]
[]
def test(): def fnc(): print "OK" fnc() test()
ajibawa-2023/Python-Code-Large/train/row_97160
5
5
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_97160:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 4], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.8, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97160:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97160:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97160:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97160:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Cod...
print {(1,3):'OK'}[(1,3)]
ajibawa-2023/Python-Code-Large/train/row_97161
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_97161:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
def f(): if 1 == 2: yield -1 elif 1 == 1: yield 3 else: yield -1 print list(f())
ajibawa-2023/Python-Code-Large/train/row_97162
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_97162:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 7], "level": 0, "parent": null, "vector": [2, 0, 0.4444, 0.7778, 0, 0.66, 0.0, 899, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97162:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97162:If_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97162:If_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97162:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
print 2 in [1,2,3]
ajibawa-2023/Python-Code-Large/train/row_97163
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_97163:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
x = 2,'OK', print len(x)
ajibawa-2023/Python-Code-Large/train/row_97164
2
2
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_97164:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
print [c for c in "asdf"]
ajibawa-2023/Python-Code-Large/train/row_97165
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_97165:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
s = 'abcd' print s[::-1]
ajibawa-2023/Python-Code-Large/train/row_97166
2
2
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_97166:Assign_L1_C0", "label": "s =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 553, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
print long print long(3.0) print long(3) print type(long(3.0)) print type(long(3))
ajibawa-2023/Python-Code-Large/train/row_97167
5
5
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_97167:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
print ~True print ~False
ajibawa-2023/Python-Code-Large/train/row_97168
2
2
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_97168:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
class Stuff: def __init__(self): self.modes = { 'wee': self.things } self.modes['wee']() def things(self): print "OK" Stuff()
ajibawa-2023/Python-Code-Large/train/row_97169
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_97169:ClassDef_L1_C0", "label": "Stuff", "type": "class", "loc": [1, 8], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.8889, 0, 0.66, 0.0, 710, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "Stuff", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97169:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97169:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97169:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97169:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code...
print float('inf') print float('-inf')
ajibawa-2023/Python-Code-Large/train/row_97170
2
2
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_97170:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
print 2+3
ajibawa-2023/Python-Code-Large/train/row_97171
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_97171:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
print max(3,8,2,6)
ajibawa-2023/Python-Code-Large/train/row_97172
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_97172:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
class X: pass def test(): y = X() test() print "OK"
ajibawa-2023/Python-Code-Large/train/row_97173
5
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_97173:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.25, 0.25, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97173:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97173:Assign_L2_C12"}]
longvalue = 9999999999999L print "%3ld" % 42 print "%d" % 42 print "%d" % 42.0 print "%d" % longvalue print "%07.2f" % 42 print "%07.2F" % 42 print "%(foo)s" % { 'foo': 'bar' } #print "%((foo))s" % { '(foo)': 'bar' } print "%sx" % (103*'a')
ajibawa-2023/Python-Code-Large/train/row_97174
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_97174:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print",...
[]
print str(range(5,0,-3))[:5] print len(range(5,0,-3)) print range(5,0,-3)[0] print range(5,0,-3)[1] print range(5,0,-3)[-1]
ajibawa-2023/Python-Code-Large/train/row_97175
5
5
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_97175:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
print 7 in {1:2,'a':7}
ajibawa-2023/Python-Code-Large/train/row_97176
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_97176:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
def yrange(n): for i in range(n): yield i def zrange(n): for y in yrange(n): yield y print list(zrange(5))
ajibawa-2023/Python-Code-Large/train/row_97177
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_97177:FunctionDef_L1_C0", "label": "yrange", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.2222, 0.3333, 0, 0.66, 0.0, 187, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "yrange", "arg_names": ["n"], "import_names": [], "rhs_call_name": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97177:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97177:For_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97177:For_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97177:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
x = 1 t = 0 while x<=5: t = t+x x = x+1 print t
ajibawa-2023/Python-Code-Large/train/row_97178
6
6
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_97178:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97178:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97178:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97178:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97178:Assign_L5_C4"}]
print str.lower("Hello") x = [4,5,0] list.sort(x) print x
ajibawa-2023/Python-Code-Large/train/row_97179
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_97179:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "an...
[]
def f(): print "in f" return 10 def g(): print "in g" return 20 retval = True def h(): global retval retval = not retval return retval for i in range(3): print f() if h() else g()
ajibawa-2023/Python-Code-Large/train/row_97180
12
17
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_97180:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.1176, 0.1765, 0, 0.66, 0.0, 899, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97180:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97180:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97180:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97180:Return_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
print " hello ".strip() print " hello ".lstrip() print " hello ".rstrip() print " hello ".partition("l") print " hello ".rpartition("l") print " HELlo ".lower() print " heLLO ".upper() print "hi there".split(" ")
ajibawa-2023/Python-Code-Large/train/row_97181
8
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_97181:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.125, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "...
[]
def do(fmt, val): print fmt % val do("%d", 42) do("%x", 42) do("%o", 42) do("%d", 42L) do("%x", 42L) do("%o", 42L) do("%d", 4200000000000L) do("%x", 4200000000000L) do("%o", 4200000000000L) do("%d", 0x4200000000000L) do("%x", 0x4200000000000L) do("%o", 0x4200000000000L) do("%d", 0o4200000000000L) do("%x", 0o4200000...
ajibawa-2023/Python-Code-Large/train/row_97182
2
2
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_97182:FunctionDef_L1_C0", "label": "do", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 245, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "do", "arg_names": ["fmt", "val"], "import_names": [], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97182:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97182:Expr_L2_C4"}]
x = 5 x &= 7 print x
ajibawa-2023/Python-Code-Large/train/row_97183
2
3
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_97183:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
def loc(): pass def gbl(): pass def free(): pass def cell(): pass def gen(): pass def true(): pass def var(): pass def volatile(): pass def package(): loc = 4 gbl = 42 cell = 19 instanceof = gbl * cell static = instanceof print loc, gbl, cell, instanceof, static print true == var print ...
ajibawa-2023/Python-Code-Large/train/row_97184
18
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_97184:FunctionDef_L2_C0", "label": "loc", "type": "function", "loc": [2, 2], "level": 0, "parent": null, "vector": [2, 0, 0.0952, 0.0476, 0, 0.66, 0.0, 822, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "loc", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97184:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97184:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97184:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97184:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Co...
def f(a, b): print a, b f(1, 2) f(*[1, 2]) f(*(1, 2)) def g(a, b, *c): print a, b, c g(1, 2, 3) g(1, 2, 3, 4, 5, 6) g(*[1, 2]) g(*[1, 2, 3, 4]) g(*[1, 2, 3, 4, 5, 6, 7]) g(*(1, 2, 3, 4, 5, 6, 7)) g(1, *[7]) g(1, *[7, 8, 9]) g(1, 2, *(7,)) g(1, 2, 3, *(7, 8, 9))
ajibawa-2023/Python-Code-Large/train/row_97185
17
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_97185:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.075, 0.1, 0, 0.66, 0.0, 899, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": ["a", "b"], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97185:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97185:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97185:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97185:Expr_L9_C4"}]
print {'a':[1,2,3], 'b':(5,6,7), 999: {'ok':1, 'stuff':2}}
ajibawa-2023/Python-Code-Large/train/row_97186
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_97186:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
x=4 x*=3 print x
ajibawa-2023/Python-Code-Large/train/row_97187
2
3
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_97187:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
print str(range(-4,-8))[:5] print len(range(-4,-8))
ajibawa-2023/Python-Code-Large/train/row_97188
2
2
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_97188:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
def test(x,y): print x return y test('a', 1) or test('b', 1) and test('c', 0)
ajibawa-2023/Python-Code-Large/train/row_97189
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_97189:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.75, 0, 0.66, 0.0, 224, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["x", "y"], "import_names": [], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97189:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97189:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97189:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97189:Return_L3_C4"}]
def do(fmt, val): print fmt % val # Some small ints do("%d", 42) do("%d", -42) do("%d", 42L) do("%d", -42L) do("%d", 42.0) do("%#x", 1) do("%#x", 1L) do("%#X", 1) do("%#X", 1L) do("%#x", 1.0) do("%#o", 1) do("%#o", 1L) do("%#o", 0) do("%#o", 0L) do("%o", 0) do("%o", 0L) do("%d", 0) do("%d", 0L) do("%#x", 0) do("%#x...
ajibawa-2023/Python-Code-Large/train/row_97190
2
2
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_97190:FunctionDef_L1_C0", "label": "do", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 245, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "do", "arg_names": ["fmt", "val"], "import_names": [], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97190:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97190:Expr_L2_C4"}]
x = {1:2} del x[1] print len(x)
ajibawa-2023/Python-Code-Large/train/row_97191
2
3
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_97191:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
print "xOK"[1:]
ajibawa-2023/Python-Code-Large/train/row_97192
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_97192:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
x = 'OK' print x[0]
ajibawa-2023/Python-Code-Large/train/row_97193
2
2
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_97193:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
from t279_sub import wee, blorp wee() blorp() from t279_sub import waa as woo woo()
ajibawa-2023/Python-Code-Large/train/row_97194
5
6
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_97194:ImportFrom_L1_C0", "label": "from t279_sub import wee, blorp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 130, 0, 2, 0, 0, 130, 0, 0], "semantic": {"name": "t279_sub", "arg_names": [], "import_names"...
[]
print False or False
ajibawa-2023/Python-Code-Large/train/row_97195
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_97195:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
s = set([1,2,3]) t = set([3,4,5]) s.symmetric_difference_update(t) t.symmetric_difference_update(s) print s print s == t print s == set([1,2,4,5]) print s == set([1,2,3])
ajibawa-2023/Python-Code-Large/train/row_97196
8
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_97196:Assign_L1_C0", "label": "s = set()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.125, 0.125, 0, 0.66, 0.0, 553, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": ...
[]
a = [1,2,3,4,5] print a[::-1]
ajibawa-2023/Python-Code-Large/train/row_97197
2
2
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_97197:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
def domul(a,b): return a*b print domul(10, 123456789876543) print domul(876543234567, 123456789876543) print domul(-876543234567, 123456789876543) print domul(-876543234567, -123456789876543) print domul(876543234567, -123456789876543) print domul(876543234567, 10) print domul(876543234567, -10)
ajibawa-2023/Python-Code-Large/train/row_97198
9
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_97198:FunctionDef_L1_C0", "label": "domul", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.1667, 0.2222, 0, 0.66, 0.0, 945, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "domul", "arg_names": ["a", "b"], "import_names": [], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97198:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97198:Return_L2_C4"}]
# Test that re-setting the value in a dict doesn't mess with its length d = {'foo':2} print len(d), d d['foo'] = 13 print len(d), d
ajibawa-2023/Python-Code-Large/train/row_97199
4
5
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_97199:Assign_L2_C0", "label": "d =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.4, 0.2, 0, 0.66, 0.0, 355, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "d", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
x = [1,2,] print x[1]
ajibawa-2023/Python-Code-Large/train/row_97200
2
2
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_97200:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
a = (1,2,3,4,5,6,7,8) print a[5::-4]
ajibawa-2023/Python-Code-Large/train/row_97201
2
2
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_97201:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
if "a" is not "b": print "OK"
ajibawa-2023/Python-Code-Large/train/row_97202
2
2
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_97202:If_L1_C0", "label": "if", "type": "if", "loc": [1, 2], "level": 0, "parent": null, "vector": [4, 0, 0.75, 1.0, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97202:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97202:Expr_L2_C4"}]
print("X-OK-Y".split("-")[1])
ajibawa-2023/Python-Code-Large/train/row_97203
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_97203:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
import t221_sub print t221_sub.x print t221_sub.f("wee")
ajibawa-2023/Python-Code-Large/train/row_97204
3
3
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_97204:Import_L1_C0", "label": "t221_sub import t221_sub", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 801, 0, 1, 0, 0, 801, 0, 0], "semantic": {"name": "t221_sub", "arg_names": [], "import_names": ["t221_su...
[]
if 0 == 1: print "X" elif 1 == 1: print "OK" else: print "Y"
ajibawa-2023/Python-Code-Large/train/row_97205
5
6
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_97205:If_L1_C0", "label": "if", "type": "if", "loc": [1, 6], "level": 0, "parent": null, "vector": [4, 0, 0.5833, 1.0, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97205:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97205:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97205:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97205:If_L3_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97205:If_...
import pkga.pkgb.modc import pkga.pkgb.modc # only one print print "a name", pkga.__name__ print "a.b name", pkga.pkgb.__name__ print "a.b.c name", pkga.pkgb.modc.__name__ print "stuff", pkga.pkgb.modc.stuff print "things", pkga.pkgb.modc.things
ajibawa-2023/Python-Code-Large/train/row_97206
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_97206:Import_L1_C0", "label": "pkga.pkgb.modc import pkga.pkgb.modc", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 812, 0, 1, 0, 0, 812, 0, 0], "semantic": {"name": "pkga.pkgb.modc", "arg_names": [], "import_n...
[]
def test(): print "OK" x = [1,test,2] x[1]()
ajibawa-2023/Python-Code-Large/train/row_97207
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_97207:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.375, 0.5, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97207:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97207:Expr_L2_C4"}]
print 0xff
ajibawa-2023/Python-Code-Large/train/row_97208
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_97208:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
X = "OK" def test(): print(X) test()
ajibawa-2023/Python-Code-Large/train/row_97209
4
3
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_97209:Assign_L1_C0", "label": "X =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 783, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97209:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97209:Expr_L2_C12"}]
class X: pass x = X() print x.__class__ print str(x.__class__) print repr(x.__class__)
ajibawa-2023/Python-Code-Large/train/row_97210
5
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_97210:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 2], "level": 0, "parent": null, "vector": [3, 0, 0.2143, 0.2857, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "...
[]
def yrange(n): for i in range(n): yield i def creator(): r = yrange(5) print "creator", r.next() return r def caller(): r = creator() for i in r: print "caller", i caller()
ajibawa-2023/Python-Code-Large/train/row_97211
12
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_97211:FunctionDef_L1_C0", "label": "yrange", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.1333, 0.2, 0, 0.66, 0.0, 187, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "yrange", "arg_names": ["n"], "import_names": [], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97211:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97211:For_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97211:For_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97211:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
x=2 x+=3 print x
ajibawa-2023/Python-Code-Large/train/row_97212
2
3
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_97212:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
a = range(30) print a[19::-7]
ajibawa-2023/Python-Code-Large/train/row_97213
2
2
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_97213:Assign_L1_C0", "label": "a = range()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 816, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "...
[]
class A: def __init__(self): print "at0" self.a = 'O' self.b = 'x' def test(self): print "KO" class B(A): def __init__(self): print "at1" A.__init__(self) self.b = 'K' def test(self): print self.a + self.b print "at2" B().test() print "at3"...
ajibawa-2023/Python-Code-Large/train/row_97214
17
17
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_97214:ClassDef_L1_C0", "label": "A", "type": "class", "loc": [1, 7], "level": 0, "parent": null, "vector": [3, 0, 0.2353, 0.4118, 0, 0.66, 0.0, 429, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "A", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97214:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97214:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97214:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97214:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-L...
print type(1) print type(2**10) print type(2**1024) print type("wee")
ajibawa-2023/Python-Code-Large/train/row_97215
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_97215:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "an...
[]
s = set([1,2,3]) t = set([3,4,5]) a = s.symmetric_difference(t) b = t.symmetric_difference(s) print a print a == b print a == set([1,2,4,5])
ajibawa-2023/Python-Code-Large/train/row_97216
7
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_97216:Assign_L1_C0", "label": "s = set()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 553, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
print(abs(-5))
ajibawa-2023/Python-Code-Large/train/row_97217
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_97217:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
class Test: def __init__(self, v): self.value = v def __call__(self): print self.value x = Test('OK') x()
ajibawa-2023/Python-Code-Large/train/row_97218
7
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_97218:ClassDef_L1_C0", "label": "Test", "type": "class", "loc": [1, 5], "level": 0, "parent": null, "vector": [3, 0, 0.4286, 0.7143, 0, 0.66, 0.0, 786, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97218:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97218:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97218:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97218:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code...
def f(l): for i in 1,2,3,4,5: yield l, i a, b = f("a"), f("b") print a.next() print a.next() print b.next() print b.next() print b.next() print a.next() print b.next() print a.next()
ajibawa-2023/Python-Code-Large/train/row_97219
12
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_97219:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.1667, 0.25, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": ["l"], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97219:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97219:For_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97219:For_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97219:Expr_L3_C8"}]
z = lambda x: x print z(4) print z("stuff")
ajibawa-2023/Python-Code-Large/train/row_97220
3
3
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_97220:Assign_L1_C0", "label": "z =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 859, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
a = b,c = 1,2 print a[0] print a[1] print b print c
ajibawa-2023/Python-Code-Large/train/row_97221
5
5
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_97221:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.2, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
print "hello world"
ajibawa-2023/Python-Code-Large/train/row_97222
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_97222:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
def test(t): t = "O"+t print t test("K")
ajibawa-2023/Python-Code-Large/train/row_97223
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_97223:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.75, 0, 0.66, 0.0, 224, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": ["t"], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97223:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97223:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97223:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97223:Expr_L3_C4"}]
print "234".replace("\r\n", "\n")
ajibawa-2023/Python-Code-Large/train/row_97224
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_97224:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
class Stuff: def blah(self, x, y=False): print x,y s = Stuff() s.blah("x",y="OK")
ajibawa-2023/Python-Code-Large/train/row_97225
5
5
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_97225:ClassDef_L1_C0", "label": "Stuff", "type": "class", "loc": [1, 3], "level": 0, "parent": null, "vector": [3, 0, 0.4, 0.6, 0, 0.66, 0.0, 710, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Stuff", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97225:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97225:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97225:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97225:Expr_L3_C8"}]
def test(): print "OK" x = test x()
ajibawa-2023/Python-Code-Large/train/row_97226
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_97226:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.375, 0.5, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97226:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97226:Expr_L2_C4"}]
class Base(object): def myfunc(self): print "Base.myfunc" def stuff(self): print "Base.stuff" self.myfunc() class Derived(Base): def myfunc(self): Base.myfunc(self) print "Derived.myfunc" d = Derived() d.myfunc() b = Derived() b.stuff()
ajibawa-2023/Python-Code-Large/train/row_97227
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_97227:ClassDef_L1_C0", "label": "Base", "type": "class", "loc": [1, 7], "level": 0, "parent": null, "vector": [3, 0, 0.2222, 0.3889, 0, 0.66, 0.0, 56, 0, 2, 0, 0, 186, 0, 3], "semantic": {"name": "Base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97227:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97227:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97227:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97227:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-L...
for i in (1 for x in range(3)): print i
ajibawa-2023/Python-Code-Large/train/row_97228
2
2
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_97228:For_L1_C0", "label": "for i", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.75, 1.0, 0, 0.66, 0.0, 826, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97228:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97228:Expr_L2_C4"}]
def gen(): i = 0 funky() yield 1 i += 1 def funky(): print "cheese" g = gen() print g.next()
ajibawa-2023/Python-Code-Large/train/row_97229
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_97229:FunctionDef_L1_C0", "label": "gen", "type": "function", "loc": [1, 5], "level": 0, "parent": null, "vector": [2, 0, 0.2727, 0.4545, 0, 0.66, 0.0, 728, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "gen", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97229:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97229:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97229:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97229:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
x = {"hi": "there", "yo": "I'm a dawg"} print x.items() print x.keys() print x.values()
ajibawa-2023/Python-Code-Large/train/row_97230
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_97230:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
a = range(17) del a[::3] print a a = range(16) del a[::3] print a a = range(17) del a[::2] print a a = range(16) del a[::2] print a
ajibawa-2023/Python-Code-Large/train/row_97231
8
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_97231:Assign_L1_C0", "label": "a = range()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 816, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_na...
[]
def xyz(): pass print xyz class X: def abc(self): pass print X.abc print X().abc
ajibawa-2023/Python-Code-Large/train/row_97232
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_97232:FunctionDef_L1_C0", "label": "xyz", "type": "function", "loc": [1, 1], "level": 0, "parent": null, "vector": [2, 0, 0.125, 0.125, 0, 0.66, 0.0, 164, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "xyz", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97232:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97232:FunctionDef_L5_C4"}]
# Test the comparison of sets l = [1,2,3,4,1,1] print l s = set(l) print s print '# equal' eq = set(l) print eq print '# forwards' print s.isdisjoint(eq) print s > eq print s.issuperset(eq) print s >= eq print s == eq print s != eq print s.issubset(eq) print s <= eq print s < eq print '# backwards' print eq.isdisjoi...
ajibawa-2023/Python-Code-Large/train/row_97233
27
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_97233:Assign_L2_C0", "label": "l =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0645, 0.0323, 0, 0.66, 0.0, 810, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
print str(range(4))[:5] print len(range(4)) print range(4)[0] print range(4)[1] print range(4)[-1]
ajibawa-2023/Python-Code-Large/train/row_97234
5
5
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_97234:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
print 1|2|3|4|5|6|0x80
ajibawa-2023/Python-Code-Large/train/row_97235
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_97235:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
def f(**kw): print kw f(a=4, b=5)
ajibawa-2023/Python-Code-Large/train/row_97236
3
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_97236:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.375, 0.5, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": ["kw"], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97236:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97236:Expr_L2_C4"}]
for const in (1,2,3): print const def f(): for const in (1,2,3): print const for object in (1,2,3): print object instanceof = 5 void = 6 var = 7 delete = 8 switch = 9 default = 10 catch = 11 print instanceof, void, var, delete, switch, default, catch f()
ajibawa-2023/Python-Code-Large/train/row_97237
16
17
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_97237:For_L1_C0", "label": "for const", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.0882, 0.1176, 0, 0.66, 0.0, 798, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "const", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97237:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97237:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97237:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97237:For_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
x = [1] x.extend([2,3]) print(x[1])
ajibawa-2023/Python-Code-Large/train/row_97238
3
3
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_97238:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
print False and False or False print False or False and False
ajibawa-2023/Python-Code-Large/train/row_97239
2
2
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_97239:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
a = [1,2,3,4,5,6] b = [9,10,11] a[::2] = b print a
ajibawa-2023/Python-Code-Large/train/row_97240
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_97240:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
x = 'OK',1 print x[0]
ajibawa-2023/Python-Code-Large/train/row_97241
2
2
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_97241:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
a = 1,2,3 print a
ajibawa-2023/Python-Code-Large/train/row_97242
2
2
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_97242:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
print [5]*10 print [1,2,3]*4 print (5,)*10 print (1,2,3)*4 print 10*[5] print 4*[1,2,3] print 10*(5,) print 4*(1,2,3)
ajibawa-2023/Python-Code-Large/train/row_97243
8
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_97243:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.125, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "...
[]
s = set([1,2,3]) copy_s = s.copy() new_s = set(s) copy_s.add(42) new_s.add(13) print s print copy_s print new_s
ajibawa-2023/Python-Code-Large/train/row_97244
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_97244:Assign_L1_C0", "label": "s = set()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 553, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
# Test behaviour of min() and max() on lists and tuples l = ['b','a','d','c'] m = ['1','0','4','3'] print l print m print min(l), max(l) print min(m), max(m) print min(l,m), max(l,m) t = tuple(l) u = tuple(m) print t print min(t), max(t) print min(u), max(u) print min(t,u), max(t,u)
ajibawa-2023/Python-Code-Large/train/row_97245
13
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_97245:Assign_L2_C0", "label": "l =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.0714, 0, 0.66, 0.0, 810, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
a = [1,2,3,4,5,6] b = [9,10,11] a[::-2] = b print a
ajibawa-2023/Python-Code-Large/train/row_97246
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_97246:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
x = [0, 1, 2] print x x.insert(2, x.pop(0)) print x
ajibawa-2023/Python-Code-Large/train/row_97247
4
5
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_97247:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.2, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
print [x*y for x in range(10) if x % 2 == 0 for y in range(10)]
ajibawa-2023/Python-Code-Large/train/row_97248
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_97248:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
def f(): a = "dog" print "f", a def g(): a = "cat" print "g", a g() print "f2", a def h(): print "h",a h() f()
ajibawa-2023/Python-Code-Large/train/row_97249
12
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_97249:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 11], "level": 0, "parent": null, "vector": [2, 0, 0.4615, 0.8462, 0, 0.66, 0.0, 899, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_97249:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97249:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97249:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97249:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
for i in range(10): print i
ajibawa-2023/Python-Code-Large/train/row_97250
0
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"]
[]
[]
print "-".join(["O","K"])
ajibawa-2023/Python-Code-Large/train/row_97251
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_97251:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
print 3*7
ajibawa-2023/Python-Code-Large/train/row_97252
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_97252:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[]
a = range(17) del a[::-3] print a a = range(16) del a[::-3] print a a = range(17) del a[::-2] print a a = range(16) del a[::-2] print a
ajibawa-2023/Python-Code-Large/train/row_97253
8
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_97253:Assign_L1_C0", "label": "a = range()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 816, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_na...
[]
z = 0 for x in range(1,4): z += x print z
ajibawa-2023/Python-Code-Large/train/row_97254
3
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_97254:Assign_L1_C0", "label": "z =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 859, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]