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
import goog.json strd = goog.json.serialize({ 'a': 45, 'b': [ 1, 2, 3, 4, { 'c': "stuff", 'd': "things", }], 'xyzzy': False, 'blorp': True }) print strd print goog.json.unsafeParse(strd) print goog.json.serialize(goog.json.unsafeParse(strd)) == strd
ajibawa-2023/Python-Code-Large/train/row_89114
5
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_89114:Import_L1_C0", "label": "goog.json import goog.json", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 575, 0, 1, 0, 0, 575, 0, 0], "semantic": {"name": "goog.json", "arg_names": [], "import_names": ["goog...
[]
import goog.math as gm K = 10000 def main(): print gm.clamp(408, 10, 100) print gm.modulo(-10, 3) print gm.lerp(0, 14, 0.25) a = 14 b = 14.0001 print gm.nearlyEquals(a, b) print gm.nearlyEquals(a, b, 0.01) print gm.standardAngle(480) print gm.toRadians(170) print gm.toDegrees(2...
ajibawa-2023/Python-Code-Large/train/row_89115
34
50
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_89115:Import_L1_C0", "label": "goog.math import gm", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.02, 0, 0.66, 0.0, 190, 0, 1, 0, 0, 190, 0, 0], "semantic": {"name": "goog.math", "arg_names": [], "import_names": ["gm"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89115:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89115:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89115:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89115:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
x = 3.14e159
ajibawa-2023/Python-Code-Large/train/row_89116
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_89116:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
x = -15921590215012591L
ajibawa-2023/Python-Code-Large/train/row_89117
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"]
[]
[]
(-124561-1) & 0200000000
ajibawa-2023/Python-Code-Large/train/row_89118
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"]
[]
[]
x = 314159.
ajibawa-2023/Python-Code-Large/train/row_89119
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_89119:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
x = "doesn't "shrink", does it"
ajibawa-2023/Python-Code-Large/train/row_89120
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"]
[]
[]
0xdeadc0de & 012345
ajibawa-2023/Python-Code-Large/train/row_89121
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"]
[]
[]
-1*1/1+1*1//1 - ---1**1
ajibawa-2023/Python-Code-Large/train/row_89123
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_89123: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, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
x = 3E123
ajibawa-2023/Python-Code-Large/train/row_89124
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_89124:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
x = 3e14159
ajibawa-2023/Python-Code-Large/train/row_89125
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_89125:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
0xff <= 255
ajibawa-2023/Python-Code-Large/train/row_89126
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_89126: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, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
import sys, time x = sys.modules['time'].time()
ajibawa-2023/Python-Code-Large/train/row_89127
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_89127:Import_L1_C0", "label": "sys import sys, time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "time"], "rhs_ca...
[]
x+y = 3e-1230
ajibawa-2023/Python-Code-Large/train/row_89128
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 d01v_(a=1, *k, **w): pass
ajibawa-2023/Python-Code-Large/train/row_89129
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_89129:FunctionDef_L1_C0", "label": "d01v_", "type": "function", "loc": [1, 1], "level": 0, "parent": null, "vector": [2, 0, 1.0, 1.0, 0, 0.66, 0.0, 498, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "d01v_", "arg_names": ["a", "k", "w"], "import_names": [], "rhs_call_name"...
[]
0b01 <= 255
ajibawa-2023/Python-Code-Large/train/row_89130
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_89130: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, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
y = ur"abc" + Ur"ABC" + uR"ABC" + UR"ABC"
ajibawa-2023/Python-Code-Large/train/row_89131
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"]
[]
[]
x = .314159
ajibawa-2023/Python-Code-Large/train/row_89132
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_89132:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
def k(x): x += 2 x += 5
ajibawa-2023/Python-Code-Large/train/row_89134
1
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_89134:FunctionDef_L1_C0", "label": "k", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "k", "arg_names": ["x"], "import_names": [], "rhs_call_name": "", "annotation...
[]
@staticmethod def foo(x,y): pass
ajibawa-2023/Python-Code-Large/train/row_89135
1
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_89135:FunctionDef_L2_C0", "label": "foo", "type": "function", "loc": [2, 2], "level": 0, "parent": null, "vector": [2, 0, 1.0, 0.5, 0, 0.66, 0.0, 528, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "foo", "arg_names": ["x", "y"], "import_names": [], "rhs_call_name": "", "an...
[]
if 1 < 1 > 1 == 1 >= 5 <= 0x15 <= 0x12 != 1 and 5 in 1 not in 1 is 1 or 5 is not 1: pass
ajibawa-2023/Python-Code-Large/train/row_89136
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_89136:If_L1_C0", "label": "if", "type": "if", "loc": [1, 1], "level": 0, "parent": null, "vector": [4, 0, 1.0, 1.0, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "i...
[]
x = 1//1*1/5*12%0x12
ajibawa-2023/Python-Code-Large/train/row_89137
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_89137:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
0xFF & 0x15 | 1234
ajibawa-2023/Python-Code-Large/train/row_89138
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_89138: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, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
x = 1 << 1 >> 5
ajibawa-2023/Python-Code-Large/train/row_89139
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_89139:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
a = r'''this is some more stuff
ajibawa-2023/Python-Code-Large/train/row_89140
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"]
[]
[]
x = u'abc' + U'ABC'
ajibawa-2023/Python-Code-Large/train/row_89141
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_89141:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
x = 0xfffffffffff
ajibawa-2023/Python-Code-Large/train/row_89142
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_89142:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
0xdeadbeef != -1
ajibawa-2023/Python-Code-Large/train/row_89143
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_89143: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, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
2134568 != 01231515
ajibawa-2023/Python-Code-Large/train/row_89144
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"]
[]
[]
wee = """this is some stuff and
ajibawa-2023/Python-Code-Large/train/row_89145
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 d22(a, b, c=2, d=2, *k): pass
ajibawa-2023/Python-Code-Large/train/row_89146
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_89146:FunctionDef_L1_C0", "label": "d22", "type": "function", "loc": [1, 1], "level": 0, "parent": null, "vector": [2, 0, 1.0, 1.0, 0, 0.66, 0.0, 755, 0, 5, 0, 0, 0, 0, 0], "semantic": {"name": "d22", "arg_names": ["a", "b", "c", "d", "k"], "import_names": [], "rhs_call...
[]
~1 ^ 1 & 1 |1 ^ -1
ajibawa-2023/Python-Code-Large/train/row_89147
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_89147: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, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
0o123 <= 0123
ajibawa-2023/Python-Code-Large/train/row_89148
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"]
[]
[]
x = ur'abc' + Ur'ABC' + uR'ABC' + UR'ABC'
ajibawa-2023/Python-Code-Large/train/row_89149
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"]
[]
[]
x = '"'; y = "'"
ajibawa-2023/Python-Code-Large/train/row_89150
2
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_89150:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
1 + 1
ajibawa-2023/Python-Code-Large/train/row_89151
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_89151: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, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
x = 123141242151251616110l
ajibawa-2023/Python-Code-Large/train/row_89152
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"]
[]
[]
x = ''; y = ""
ajibawa-2023/Python-Code-Large/train/row_89153
2
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_89153:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
x = 1 - y + 15 - 01 + 0x124 + z + a[5]
ajibawa-2023/Python-Code-Large/train/row_89154
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"]
[]
[]
01234567 > ~0x15
ajibawa-2023/Python-Code-Large/train/row_89155
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"]
[]
[]
x = 3.14159
ajibawa-2023/Python-Code-Large/train/row_89156
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_89156:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
def f(): if True: if False: x =3 y = 4 return return 19
ajibawa-2023/Python-Code-Large/train/row_89157
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_89157:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 7], "level": 0, "parent": null, "vector": [2, 0, 0.5714, 1.0, 0, 0.66, 0.0, 899, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89157:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89157:If_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89157:If_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89157:If_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89...
x = 0L
ajibawa-2023/Python-Code-Large/train/row_89158
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 make_tree(item, depth): if not depth: return item, None, None item2 = item + item depth -= 1 return item, make_tree(item2 - 1, depth), make_tree(item2, depth) def check_tree(node): item, left, right = node if not left: return item return item + check_tree(left) - check_tree(right) def ...
ajibawa-2023/Python-Code-Large/train/row_89159
23
32
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_89159:FunctionDef_L1_C0", "label": "make_tree", "type": "function", "loc": [1, 5], "level": 0, "parent": null, "vector": [2, 0, 0.0938, 0.1562, 0, 0.66, 0.0, 92, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "make_tree", "arg_names": ["item", "depth"], "import_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89159:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89159:If_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89159:If_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89159:Return_L2_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
import sys def main(): cout = sys.stdout.write size = 4000 xr_size = range(size) xr_iter = range(50) bit = 128 byte_acc = 0 cout("P4\n%d %d\n" % (size, size)) size = float(size) for y in xr_size: fy = 2j * y / size - 1j for x in xr_size: z = 0j ...
ajibawa-2023/Python-Code-Large/train/row_89160
27
39
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_89160:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 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_89160:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89160:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89160:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89160:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-L...
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_89161
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_89161: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_89161:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89161:Expr_L2_C4"}]
x = [0, 1, 2] print x x.insert(2, x.pop(0)) print x
ajibawa-2023/Python-Code-Large/train/row_89162
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_89162: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...
[]
x = ('OK',) print(x[0])
ajibawa-2023/Python-Code-Large/train/row_89163
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_89163: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...
[]
import pkga.pkgb.modc as c_me print c_me.stuff print c_me.things
ajibawa-2023/Python-Code-Large/train/row_89164
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_89164:Import_L1_C0", "label": "pkga.pkgb.modc import c_me", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 812, 0, 1, 0, 0, 812, 0, 0], "semantic": {"name": "pkga.pkgb.modc", "arg_names": [], "import_names": ["c_m...
[]
x=4 x|=1 print x
ajibawa-2023/Python-Code-Large/train/row_89165
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_89165: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...
[]
# Test the comparison of sets l = [1,2,3,4,1,1] print l s = set(l) print s # Test the comparison of sets print '# self' print '# forwards' print s.isdisjoint(s) print s > s print s.issuperset(s) print s >= s print s == s print s != s print s.issubset(s) print s <= s print s < s print '# backwards' print s.isdisjoint(...
ajibawa-2023/Python-Code-Large/train/row_89166
25
29
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_89166:Assign_L2_C0", "label": "l =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.069, 0.0345, 0, 0.66, 0.0, 810, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "an...
[]
print("O"+"K")
ajibawa-2023/Python-Code-Large/train/row_89167
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_89167: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...
[]
if None is None: print "OK"
ajibawa-2023/Python-Code-Large/train/row_89168
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_89168: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_89168:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89168:Expr_L2_C4"}]
def f(): y = 0 while y == 0: y += 1 yield y for i in f(): print i
ajibawa-2023/Python-Code-Large/train/row_89169
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_89169:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 5], "level": 0, "parent": null, "vector": [2, 0, 0.375, 0.625, 0, 0.66, 0.0, 899, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89169:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89169:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89169:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89169:While_L3_C4"}, {"f": "ajibawa-2023/Python-Code-La...
print False or False
ajibawa-2023/Python-Code-Large/train/row_89170
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_89170: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...
[]
class C: def __init__(self, data): self.data = data def pr(self): print self.data C("OK").pr()
ajibawa-2023/Python-Code-Large/train/row_89171
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_89171:ClassDef_L1_C0", "label": "C", "type": "class", "loc": [1, 5], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.8333, 0, 0.66, 0.0, 619, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""},...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89171:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89171:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89171:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89171:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code...
if not "?" in "xyz": print "OK"
ajibawa-2023/Python-Code-Large/train/row_89172
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"]
[]
[]
a = b,c = 1,2 print a[0] print a[1] print b print c
ajibawa-2023/Python-Code-Large/train/row_89173
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_89173: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...
[]
x = 'OK',1 print x[0]
ajibawa-2023/Python-Code-Large/train/row_89174
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_89174: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...
[]
if 0 == 1: print "X" else: print "OK"
ajibawa-2023/Python-Code-Large/train/row_89175
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_89175:If_L1_C0", "label": "if", "type": "if", "loc": [1, 4], "level": 0, "parent": null, "vector": [4, 0, 0.625, 1.0, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89175:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89175:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89175:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89175:Expr_L4_C4"}]
class O(object): pass class F(O): pass class E(O): pass class D(O): pass class C(D,F): pass class B(D,E): pass class A(B,C): pass print A.__bases__ print A.__mro__
ajibawa-2023/Python-Code-Large/train/row_89176
9
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_89176:ClassDef_L1_C0", "label": "O", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.1, 0.1, 0, 0.66, 0.0, 720, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "O", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, ...
[]
print 3*7
ajibawa-2023/Python-Code-Large/train/row_89177
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_89177: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 long print long(3.0) print long(3) print type(long(3.0)) print type(long(3))
ajibawa-2023/Python-Code-Large/train/row_89178
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_89178: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 [1,2,3].index(3)
ajibawa-2023/Python-Code-Large/train/row_89179
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_89179:Expr_L1_C0", "label": "index()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 780, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "index", "anno...
[]
print slice(1)
ajibawa-2023/Python-Code-Large/train/row_89180
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_89180: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...
[]
def wee(waa, woo=True, wii=False): print waa, woo, wii wee("OK")
ajibawa-2023/Python-Code-Large/train/row_89181
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_89181:FunctionDef_L1_C0", "label": "wee", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.6667, 0, 0.66, 0.0, 48, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "wee", "arg_names": ["waa", "woo", "wii"], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89181:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89181:Expr_L2_C4"}]
def test(x,y): return x+y r = test(3,5) print r
ajibawa-2023/Python-Code-Large/train/row_89182
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_89182: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, 2, 1, 0, 0, 0, 0], "semantic": {"name": "test", "arg_names": ["x", "y"], "import_names": [], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89182:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89182:Return_L2_C4"}]
class X: x = 4 x = X() stuff = x.x print stuff things = X.x print things
ajibawa-2023/Python-Code-Large/train/row_89183
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_89183:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 2], "level": 0, "parent": null, "vector": [3, 0, 0.1875, 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_89183:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89183:Assign_L2_C4"}]
# Tests the list functions. l = [1,1,2,3,5,8,13,21] print l print l.count(1) print l.reverse() print l print l.count(1) print l.count(0) print l.count(3) print l.index(5) print l.remove(5) print l.remove(1) print l.count(1) print l
ajibawa-2023/Python-Code-Large/train/row_89184
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_89184: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...
[]
def a(): x = "OK" print x del x print "after" a()
ajibawa-2023/Python-Code-Large/train/row_89185
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_89185:FunctionDef_L1_C0", "label": "a", "type": "function", "loc": [1, 5], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.8333, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89185:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89185:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89185:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89185:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
class X: pass print repr(X()) print str(X())
ajibawa-2023/Python-Code-Large/train/row_89186
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_89186:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "...
[]
print [x*y for x in range(10) if x % 2 == 0 for y in range(10)]
ajibawa-2023/Python-Code-Large/train/row_89187
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_89187: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...
[]
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_89188
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_89188: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...
[]
print 0xff
ajibawa-2023/Python-Code-Large/train/row_89189
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_89189: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 print list(yrange(5))
ajibawa-2023/Python-Code-Large/train/row_89190
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_89190:FunctionDef_L1_C0", "label": "yrange", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.75, 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_89190:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89190:For_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89190:For_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89190:Expr_L3_C8"}]
# to avoid constant-izing in python compiler def doadd(a,b): return a+b def dosub(a,b): return a-b print doadd(123, 12345678987654321) print doadd(-123, 12345678987654321) print doadd(-123, -12345678987654321) print doadd(123, -12345678987654321) print dosub(123, 12345678987654321) print dosub(12345678987654321...
ajibawa-2023/Python-Code-Large/train/row_89191
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_89191:FunctionDef_L2_C0", "label": "doadd", "type": "function", "loc": [2, 3], "level": 0, "parent": null, "vector": [2, 0, 0.1923, 0.1538, 0, 0.66, 0.0, 313, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "doadd", "arg_names": ["a", "b"], "import_names": [], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89191:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89191:Return_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89191:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89191:Return_L5_C4"}]
# multiple instances of generator at the same time def genmaker(a, b): z = a*b def gen(y): for i in range(4): yield i,a,b,y,z return gen(a*a*b*b) g1 = genmaker(3, 4) g2 = genmaker(4, 5) print g1.next() print g2.next() print g1.next() print g2.next() print g1.next() print g2.next() pr...
ajibawa-2023/Python-Code-Large/train/row_89192
16
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_89192:FunctionDef_L4_C0", "label": "genmaker", "type": "function", "loc": [4, 9], "level": 0, "parent": null, "vector": [2, 0, 0.3095, 0.2857, 0, 0.66, 0.0, 808, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "genmaker", "arg_names": ["a", "b"], "import_names": [], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89192:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89192:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89192:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89192:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-C...
print ord(chr(128))
ajibawa-2023/Python-Code-Large/train/row_89193
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_89193: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...
[]
print str(range(-4,-8))[:5] print len(range(-4,-8))
ajibawa-2023/Python-Code-Large/train/row_89194
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_89194: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...
[]
class O(object): pass class A(O): pass class B(O): pass class C(O): pass class D(O): pass class E(O): pass class K1(A,B,C): pass class K2(D,B,E): pass class K3(D,A): pass class Z(K1,K2,K3): pass print K1.__mro__ print K2.__mro__ print K3.__mro__ print Z.__mro__
ajibawa-2023/Python-Code-Large/train/row_89195
14
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_89195:ClassDef_L1_C0", "label": "O", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 720, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "O", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":...
[]
x = 1 n = 0 while x < 10: x = x + 1 if n == 2: continue n = n + 1 print n
ajibawa-2023/Python-Code-Large/train/row_89196
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_89196:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.125, 0.125, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89196:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89196:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89196:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89196:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8...
xyzy = [100,101,102,103,104,105,106,107] del xyzy print xyzy
ajibawa-2023/Python-Code-Large/train/row_89197
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_89197:Assign_L1_C0", "label": "xyzy =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 100, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "xyzy", "arg_names": [], "import_names": [], "rhs_call_name": ...
[]
class O(object): pass class F(O): pass class E(O): pass class D(O): pass class C(D,F): pass class B(E,D): pass class A(B,C): pass print A.__mro__
ajibawa-2023/Python-Code-Large/train/row_89198
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_89198:ClassDef_L1_C0", "label": "O", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.125, 0.125, 0, 0.66, 0.0, 720, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "O", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "...
[]
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_89199
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_89199: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 str(range(-8,-4))[:5] print len(range(-8,-4)) print range(-8,-4)[0] print range(-8,-4)[1] print range(-8,-4)[-1]
ajibawa-2023/Python-Code-Large/train/row_89200
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_89200: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 "a\0b".replace("\0", "c")
ajibawa-2023/Python-Code-Large/train/row_89201
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_89201: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...
[]
def func(): return "dog" def wee(): assert 1 != 2 assert "dog" == func() wee()
ajibawa-2023/Python-Code-Large/train/row_89202
4
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_89202:FunctionDef_L1_C0", "label": "func", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.2143, 0.2857, 0, 0.66, 0.0, 856, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "func", "arg_names": [], "import_names": [], "rhs_call_name": "", "an...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89202:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89202:Return_L2_C4"}]
def test(): def fnc(): print "OK" print fnc() test()
ajibawa-2023/Python-Code-Large/train/row_89203
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_89203: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, 3], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89203:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89203:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89203:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89203:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Cod...
# 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_89204
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_89204: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...
[]
print [x*y for x in range(1,10) for y in range(1,x) if y%2 == 0]
ajibawa-2023/Python-Code-Large/train/row_89205
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_89205: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...
[]
x=4 x*=3 print x
ajibawa-2023/Python-Code-Large/train/row_89206
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_89206: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...
[]
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_89207
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_89207: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_89207:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89207:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89207:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89207:Expr_L3_C8"}]
print 3,4,5
ajibawa-2023/Python-Code-Large/train/row_89208
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_89208: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, 3, 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_89209
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_89209: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...
[]
for i in (1 for x in range(3)): print i
ajibawa-2023/Python-Code-Large/train/row_89210
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_89210: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_89210:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89210:Expr_L2_C4"}]
# Test the behaviour of sets l = [1,2,3,4,1,1] print l s = set(l) # Test the addition and removal of items print len(s), s s.add(100) print len(s), s s.discard(2) print len(s), s
ajibawa-2023/Python-Code-Large/train/row_89211
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_89211:Assign_L2_C0", "label": "l =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 810, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
class X: pass x = X() print getattr(x, 'wee', 14) print getattr(X, 'doggy', 'OK')
ajibawa-2023/Python-Code-Large/train/row_89212
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_89212: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": ""}, ...
[]
x = ["hello"] y = list(x) x[0] = "hi" print y[0]
ajibawa-2023/Python-Code-Large/train/row_89213
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_89213: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, 5, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
class Stuff: def __init__(self): self.x = lambda: self.things() def things(self): print "OK" y = Stuff() y.x()
ajibawa-2023/Python-Code-Large/train/row_89214
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_89214:ClassDef_L1_C0", "label": "Stuff", "type": "class", "loc": [1, 5], "level": 0, "parent": null, "vector": [3, 0, 0.4286, 0.7143, 0, 0.66, 0.0, 710, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "Stuff", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_89214:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89214:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89214:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89214:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code...
x = [] x.append(x) print({x:'OK'}[x])
ajibawa-2023/Python-Code-Large/train/row_89215
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_89215: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...
[]