code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1234
43
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1234:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.2656, 0.3542, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1234:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1234:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1234:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1234:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1236
25
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1236:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 21], "level": 0, "parent": null, "vector": [2, 0, 0.2687, 0.1045, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1236:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1236:Assign_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1236:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1236:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1237
43
97
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1237:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2423, 0.3093, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1237:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1237:Assign_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1237:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1237:Assign_L45_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
ajibawa-2023/Python-Code-Large/train/row_1239
16
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1239:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1324, 0.0147, 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_1239:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1239:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1239:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1239:Return_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
ajibawa-2023/Python-Code-Large/train/row_1240
16
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1240:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1324, 0.0147, 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_1240:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1240:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1240:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1240:Return_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
ajibawa-2023/Python-Code-Large/train/row_1241
9
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1241:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 18], "level": 0, "parent": null, "vector": [8, 0, 0.4091, 0.303, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1241:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1241:If_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1241:If_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1241:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
ajibawa-2023/Python-Code-Large/train/row_1242
9
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1242:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 18], "level": 0, "parent": null, "vector": [8, 0, 0.4091, 0.303, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1242:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1242:If_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1242:If_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1242:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import commands """Copy Special exercise """ #...
ajibawa-2023/Python-Code-Large/train/row_1243
21
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1243:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0185, 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_1243:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1243:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1243:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1243:If_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import commands """Copy Special exercise """ #...
ajibawa-2023/Python-Code-Large/train/row_1244
21
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1244:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0185, 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_1244:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1244:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1244:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1244:If_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import os import re import sys import urllib """Logpuzzle exercise Given an apache logfile, ...
ajibawa-2023/Python-Code-Large/train/row_1245
23
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1245:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1475, 0.0164, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1245:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1245:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1245:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1245:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import os import re import sys import urllib """Logpuzzle exercise Given an apache logfile, ...
ajibawa-2023/Python-Code-Large/train/row_1246
23
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1246:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1475, 0.0164, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1246:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1246:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1246:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1246:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python def remove_adjacent(nums): result = [] for num in nums: if len(result) == 0 or num != result[-1]: result.append(num) return result def linear_merge(list1, list2): result = [] while len(list1) and len(list2): if list1[0] < list2[0]: result.append(list1.pop(0)) else: ...
ajibawa-2023/Python-Code-Large/train/row_1251
30
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1251:FunctionDef_L2_C0", "label": "remove_adjacent", "type": "function", "loc": [2, 7], "level": 0, "parent": null, "vector": [2, 0, 0.1071, 0.1429, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1251:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1251:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1251:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1251:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python import sys def words(filename): count = {} input_file = open(filename, 'r') for line in input_file: words = line.split() for word in words: word = word.lower() if not word in count: count[word] = 1 else: count[word] = count[word] + 1 input_file...
ajibawa-2023/Python-Code-Large/train/row_1252
42
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1252:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0645, 0.0161, 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_1252:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1252:Assign_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1252:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1252:Assign_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python def remove_adjacent(nums): result = [] for num in nums: if len(result) == 0 or num != result[-1]: result.append(num) return result def linear_merge(list1, list2): result = [] while len(list1) and len(list2): if list1[0] < list2[0]: result.append(list1.pop(0)) else: ...
ajibawa-2023/Python-Code-Large/train/row_1254
30
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1254:FunctionDef_L2_C0", "label": "remove_adjacent", "type": "function", "loc": [2, 7], "level": 0, "parent": null, "vector": [2, 0, 0.1071, 0.1429, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1254:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1254:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1254:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1254:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python import sys def words(filename): count = {} input_file = open(filename, 'r') for line in input_file: words = line.split() for word in words: word = word.lower() if not word in count: count[word] = 1 else: count[word] = count[word] + 1 input_file...
ajibawa-2023/Python-Code-Large/train/row_1255
42
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1255:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0645, 0.0161, 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_1255:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1255:Assign_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1255:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1255:Assign_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1261
30
72
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1261:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 25], "level": 0, "parent": null, "vector": [2, 0, 0.2778, 0.1528, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1261:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1261:If_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1261:If_L16_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1261:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1262
38
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1262:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2398, 0.3061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1262:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1262:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1262:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1262:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1264
30
72
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1264:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 25], "level": 0, "parent": null, "vector": [2, 0, 0.2778, 0.1528, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1264:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1264:If_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1264:If_L16_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1264:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1265
38
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1265:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2398, 0.3061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1265:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1265:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1265:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1265:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1268
41
99
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1268:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.2576, 0.3434, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1268:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1268:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1268:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1268:Assign_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1272
26
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1272:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 22], "level": 0, "parent": null, "vector": [2, 0, 0.2643, 0.1143, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1272:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1272:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1272:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1272:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1273
42
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1273:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2398, 0.3061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1273:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1273:Assign_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1273:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1273:Assign_L46_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1274
41
99
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1274:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.2576, 0.3434, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1274:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1274:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1274:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1274:Assign_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1276
26
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1276:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 22], "level": 0, "parent": null, "vector": [2, 0, 0.2643, 0.1143, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1276:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1276:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1276:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1276:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1277
42
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1277:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2398, 0.3061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1277:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1277:Assign_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1277:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1277:Assign_L46_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1283
42
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1283:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 38], "level": 0, "parent": null, "vector": [2, 0, 0.3118, 0.2824, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1283:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1283:Assign_L17_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1283:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1283:If_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1286
42
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1286:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 38], "level": 0, "parent": null, "vector": [2, 0, 0.3118, 0.2824, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1286:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1286:Assign_L17_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1286:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1286:If_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1303
35
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1303:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 26], "level": 0, "parent": null, "vector": [2, 0, 0.2562, 0.15, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1303:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1303:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1303:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1303:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1304
39
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1304:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.3191, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1304:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1304:Assign_L48_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1304:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1304:Assign_L49_C3"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1306
35
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1306:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 26], "level": 0, "parent": null, "vector": [2, 0, 0.2562, 0.15, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1306:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1306:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1306:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1306:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1307
39
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1307:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.3191, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1307:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1307:Assign_L48_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1307:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1307:Assign_L49_C3"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1313
30
72
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1313:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 25], "level": 0, "parent": null, "vector": [2, 0, 0.2778, 0.1528, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1313:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1313:If_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1313:If_L16_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1313:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1314
38
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1314:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2398, 0.3061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1314:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1314:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1314:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1314:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1316
30
72
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1316:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 25], "level": 0, "parent": null, "vector": [2, 0, 0.2778, 0.1528, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1316:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1316:If_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1316:If_L16_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1316:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1317
38
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1317:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.2398, 0.3061, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1317:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1317:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1317:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1317:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1320
17
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1320:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.3592, 0.4789, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1320:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1320:Expr_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1320:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1320:Return_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python import sys print "hello world!"
ajibawa-2023/Python-Code-Large/train/row_1321
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1321:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "",...
[]
#!/usr/bin/python # D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_adjacent(nums): arr=[] for n in nums: if n not in arr: arr.appen...
ajibawa-2023/Python-Code-Large/train/row_1325
23
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1325:FunctionDef_L7_C0", "label": "remove_adjacent", "type": "function", "loc": [7, 12], "level": 0, "parent": null, "vector": [2, 0, 0.1939, 0.1224, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1325:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1325:Assign_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1325:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1325:For_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python import sys print "hello world!"
ajibawa-2023/Python-Code-Large/train/row_1326
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1326:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "",...
[]
#!/usr/bin/python import sys def read_and_count(filename): words_map={} file=open(filename, 'r') for str in file: arr=str.split() for s in arr: s=s.lower(); if s not in words_map: words_map[s] = 1 else: words_map[s] +=1 file.close() return words_map # def print_w...
ajibawa-2023/Python-Code-Large/train/row_1327
39
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1327:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0577, 0.0192, 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_1327:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1327:Assign_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1327:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1327:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1328
17
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1328:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.3592, 0.4789, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1328:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1328:Expr_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1328:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1328:Return_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_adjacent(nums): arr=[] for n in nums: if n not in arr: arr.appen...
ajibawa-2023/Python-Code-Large/train/row_1330
23
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1330:FunctionDef_L7_C0", "label": "remove_adjacent", "type": "function", "loc": [7, 12], "level": 0, "parent": null, "vector": [2, 0, 0.1939, 0.1224, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1330:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1330:Assign_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1330:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1330:For_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python import sys def read_and_count(filename): words_map={} file=open(filename, 'r') for str in file: arr=str.split() for s in arr: s=s.lower(); if s not in words_map: words_map[s] = 1 else: words_map[s] +=1 file.close() return words_map # def print_w...
ajibawa-2023/Python-Code-Large/train/row_1331
39
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1331:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0577, 0.0192, 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_1331:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1331:Assign_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1331:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1331:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1334
17
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1334:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.3592, 0.4789, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1334:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1334:Expr_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1334:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1334:Return_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1338
19
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1338:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 17], "level": 0, "parent": null, "vector": [2, 0, 0.254, 0.0476, 0, 0.66, 0.0, 855, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1338:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1338:Return_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1338:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1338:Return_L26_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1339
16
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1339:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.3456, 0.4412, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1339:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1339:If_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1339:If_L53_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1339:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Mimic pyquick exercise -- optional extra exercise. Google's Python Class Read in the ...
ajibawa-2023/Python-Code-Large/train/row_1340
17
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1340:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 42], "level": 0, "parent": null, "vector": [8, 0, 0.3592, 0.4789, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1340:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1340:Expr_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1340:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1340:Return_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
ajibawa-2023/Python-Code-Large/train/row_1342
19
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1342:FunctionDef_L15_C0", "label": "remove_adjacent", "type": "function", "loc": [15, 17], "level": 0, "parent": null, "vector": [2, 0, 0.254, 0.0476, 0, 0.66, 0.0, 855, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1342:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1342:Return_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1342:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1342:Return_L26_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
ajibawa-2023/Python-Code-Large/train/row_1343
16
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1343:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 38], "level": 0, "parent": null, "vector": [8, 0, 0.3456, 0.4412, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1343:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1343:If_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1343:If_L53_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1343:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
ajibawa-2023/Python-Code-Large/train/row_1345
16
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1345:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1324, 0.0147, 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_1345:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1345:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1345:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1345:Return_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
ajibawa-2023/Python-Code-Large/train/row_1346
16
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1346:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1324, 0.0147, 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_1346:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1346:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1346:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1346:Return_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
ajibawa-2023/Python-Code-Large/train/row_1347
9
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1347:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 18], "level": 0, "parent": null, "vector": [8, 0, 0.4091, 0.303, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1347:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1347:If_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1347:If_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1347:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
ajibawa-2023/Python-Code-Large/train/row_1348
9
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1348:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 18], "level": 0, "parent": null, "vector": [8, 0, 0.4091, 0.303, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1348:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1348:If_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1348:If_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1348:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import commands """Copy Special exercise """ #...
ajibawa-2023/Python-Code-Large/train/row_1349
21
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1349:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0185, 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_1349:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1349:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1349:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1349:If_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re import os import shutil import commands """Copy Special exercise """ #...
ajibawa-2023/Python-Code-Large/train/row_1350
21
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1350:Import_L9_C0", "label": "sys import sys", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0185, 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_1350:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1350:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1350:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1350:If_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import os import re import sys import urllib """Logpuzzle exercise Given an apache logfile, ...
ajibawa-2023/Python-Code-Large/train/row_1351
23
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1351:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1475, 0.0164, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1351:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1351:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1351:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1351:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import os import re import sys import urllib """Logpuzzle exercise Given an apache logfile, ...
ajibawa-2023/Python-Code-Large/train/row_1352
23
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1352:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1475, 0.0164, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1352:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1352:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1352:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1352:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python -tt # D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_adjacent(nums): array = [] for num in nums: if num not in array: ...
ajibawa-2023/Python-Code-Large/train/row_1357
24
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_1357:FunctionDef_L7_C0", "label": "remove_adjacent", "type": "function", "loc": [7, 12], "level": 0, "parent": null, "vector": [2, 0, 0.19, 0.12, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1357:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1357:Assign_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1357:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1357:For_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python -tt import sys # Define print_words(filename) and print_top(filename) functions. # You could write a helper utility function that reads a file # and builds and returns a word/count dict for it. # Then print_words() and print_top() can just call the utility function. def word_count_dict(filename):...
ajibawa-2023/Python-Code-Large/train/row_1358
39
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1358:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0156, 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_1358:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1358:Assign_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1358:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1358:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python -tt # D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_adjacent(nums): array = [] for num in nums: if num not in array: ...
ajibawa-2023/Python-Code-Large/train/row_1360
24
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_1360:FunctionDef_L7_C0", "label": "remove_adjacent", "type": "function", "loc": [7, 12], "level": 0, "parent": null, "vector": [2, 0, 0.19, 0.12, 0, 0.66, 0.0, 855, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "remove_adjacent", "arg_names": ["nums"], "import_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1360:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1360:Assign_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1360:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1360:For_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python -tt import sys # Define print_words(filename) and print_top(filename) functions. # You could write a helper utility function that reads a file # and builds and returns a word/count dict for it. # Then print_words() and print_top() can just call the utility function. def word_count_dict(filename):...
ajibawa-2023/Python-Code-Large/train/row_1361
39
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1361:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0156, 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_1361:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1361:Assign_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1361:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1361:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python # -*- encoding:utf8 -*- # protoc-gen-erl # Google's Protocol Buffers project, ported to lua. # https://code.google.com/p/protoc-gen-lua/ # # Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com # All rights reserved. # # Use, modification and distribution are subject to the "New BSD License" #...
ajibawa-2023/Python-Code-Large/train/row_1363
295
450
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1363:Import_L13_C0", "label": "sys import sys", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0289, 0.0022, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1363:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1363:Import_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1363:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1363:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1363:...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_1364
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1364:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1364:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1364:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1364:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1364:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
ajibawa-2023/Python-Code-Large/train/row_1365
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1365:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1365:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1365:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1365:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1365:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_1366
8
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_1366:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1366:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1366:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1366:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1366:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
ajibawa-2023/Python-Code-Large/train/row_1367
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1367:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1367:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1367:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1367:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1367:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
ajibawa-2023/Python-Code-Large/train/row_1368
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1368:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1368:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1368:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1368:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1368:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
ajibawa-2023/Python-Code-Large/train/row_1369
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1369:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1369:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1369:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1369:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1369:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python import os def main(): lists = [ "ISODrivers/Galaxy/galaxy.prx", "ISODrivers/March33/march33.prx", "ISODrivers/March33/march33_620.prx", "ISODrivers/Inferno/inferno.prx", "Popcorn/popcorn.prx", "Satelite/satelite.prx", "Stargate/stargate.prx", "SystemControl/systemctrl.prx", ...
ajibawa-2023/Python-Code-Large/train/row_1370
10
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1370:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1370:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1370:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1370:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1370:For_L20_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import os, gzip, StringIO gzip.time = FakeTime() def create_gzip(input, output): f_in=open(input, 'rb') temp=StringIO.StringIO() f=gzip.GzipFile(fileobj=temp, mode='wb') f.writelines(f_in) f.close() f_in.close() fout=open(out...
ajibawa-2023/Python-Code-Large/train/row_1371
30
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1371:ClassDef_L3_C0", "label": "FakeTime", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0909, 0.0682, 0, 0.66, 0.0, 425, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "FakeTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1371:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1371:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1371:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1371:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python from hashlib import * import sys, struct def sha512(psid): if len(psid) != 16: return "".encode() for i in range(512): psid = sha1(psid).digest() return psid def get_psid(str): if len(str) != 32: return "".encode() b = "".encode() for i in range(0, len(str), 2): b += struct.pack('B...
ajibawa-2023/Python-Code-Large/train/row_1372
31
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1372:ImportFrom_L3_C0", "label": "from hashlib import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0652, 0.0217, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "hashlib", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1372:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1372:If_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1372:If_L7_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1372:Return_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_13...
#!/usr/bin/python import sys, hashlib def toNID(name): hashstr = hashlib.sha1(name.encode()).hexdigest().upper() return "0x" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2] if __name__ == "__main__": assert(toNID("sceKernelCpuSuspendIntr") == "0x092968F4") for name in sys.argv[1:]: print ("%s: %s"...
ajibawa-2023/Python-Code-Large/train/row_1373
7
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_1373:Import_L3_C0", "label": "sys import sys, hashlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "hashlib...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1373:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1373:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1373:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1373:Return_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python """ pspbtcnf_editor: An script that add modules from pspbtcnf """ import sys, os, re from getopt import * from struct import * BTCNF_MAGIC=0x0F803001 verbose = False def print_usage(): print ("%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]" %(os.path...
ajibawa-2023/Python-Code-Large/train/row_1374
107
182
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1374:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.022, 0.0165, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1374:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1374:Expr_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1374:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1374:Assign_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import sys, os, struct, gzip, hashlib, StringIO gzip.time = FakeTime() def binary_replace(data, newdata, offset): return data[0:offset] + newdata + data[offset+len(newdata):] def prx_compress(output, hdr, input, mod_name="", mod_a...
ajibawa-2023/Python-Code-Large/train/row_1375
56
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1375:ClassDef_L3_C0", "label": "FakeTime", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0488, 0.0366, 0, 0.66, 0.0, 425, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "FakeTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1375:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1375:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1375:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1375:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
ajibawa-2023/Python-Code-Large/train/row_1376
10
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_1376:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[]
#!/bin/env python import xml.dom.minidom as dom import sys import struct WEAP_NUM = 780 struct_fmt = "<H BBHBBBB 8B8B8b8b8b8b8H bbBBBB" def pack_weapon(dict): l = [] l.append(dict['drain']) l.append(dict['shotRepeat']) l.append(dict['multi']) l.append(dict['weapAni']) l.append(dict['max']) l.append(dict['tx...
ajibawa-2023/Python-Code-Large/train/row_1377
167
233
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1377:Import_L3_C0", "label": "xml.dom.minidom import dom", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0129, 0.0043, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 770, 0, 0], "semantic": {"name": "xml.dom.minidom", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1377:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1377:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1377:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1377:Expr_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.1.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
ajibawa-2023/Python-Code-Large/train/row_1378
90
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1378:ImportFrom_L13_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0788, 0.0061, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1378:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1378:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1378:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1378:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import socket port = 54321 #host = "137.138.196.188" host="0.0.0.0" UDPsock=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Accepte les datagrammes UDP sur le port depuis tous les expediteurs UDPsock.bind((host, port)) #UDPsock.connect(('137.138.196.188',port)) print "Ecoute sur port", port while 1: data, addr =...
ajibawa-2023/Python-Code-Large/train/row_1379
11
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1379:Import_L1_C0", "label": "socket import socket", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1379:While_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1379:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1379:While_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1379:If_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
import socket,time port = 54321 #host = "localhost" host = "192.168.0.9" #host = "137.138.196.188" #host="128.141.140.144" UDPsock=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #s.bind(("", port)) while ( 1 ): commande = raw_input("Commande? ") UDPsock.sendto(commande,(host, port)) print "envoie commande...
ajibawa-2023/Python-Code-Large/train/row_1380
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_1380:Import_L1_C0", "label": "socket import socket, time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 687, 0, 2, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1380:While_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1380:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1380:While_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1380:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_1381
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1381:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1381:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1381:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1381:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1381:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
ajibawa-2023/Python-Code-Large/train/row_1382
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1382:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1382:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1382:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1382:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1382:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_1383
8
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_1383:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1383:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1383:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1383:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1383:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
ajibawa-2023/Python-Code-Large/train/row_1384
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1384:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1384:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1384:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1384:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1384:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
ajibawa-2023/Python-Code-Large/train/row_1385
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1385:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1385:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1385:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1385:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1385:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
ajibawa-2023/Python-Code-Large/train/row_1386
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1386:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1386:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1386:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1386:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1386:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
# # Secret Labs' Regular Expression Engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@pythonware.com). # # Portions of this engine have been dev...
ajibawa-2023/Python-Code-Large/train/row_1388
242
703
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1388:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 217], "level": 0, "parent": null, "vector": [8, 0, 0.1657, 0.2873, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1388:FunctionDef_L233_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1388:Expr_L235_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1388:FunctionDef_L233_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1388:Return_L237_C4"}, {"f": "ajibawa-2023/Python-Code...
# # Secret Labs' Regular Expression Engine core module # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@pythonware.com). # # Portions of this engine h...
ajibawa-2023/Python-Code-Large/train/row_1389
2,422
4,125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1389:Import_L16_C0", "label": "string import string", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0002, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1389:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1389:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1389:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1389:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code...
# # Secret Labs' Regular Expression Engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@pythonware.com). # # Portions of this engine have been dev...
ajibawa-2023/Python-Code-Large/train/row_1390
231
685
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1390:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 217], "level": 0, "parent": null, "vector": [8, 0, 0.1701, 0.2949, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1390:FunctionDef_L233_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1390:Expr_L235_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1390:FunctionDef_L233_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1390:Return_L237_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python import os import sys from distutils.core import setup, Extension MAJOR, MINOR = sys.version_info[:2] BASE_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_BASE = 'Python%i' % MAJOR DOCS_DIR = os.path.join(BASE_DIR, 'docs') setup( name='regex', version='2014.12.24', description...
ajibawa-2023/Python-Code-Large/train/row_1391
8
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1391:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0577, 0.0192, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[]
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
ajibawa-2023/Python-Code-Large/train/row_1392
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1392:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1392:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1392:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1392:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1392:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Zdenko Podobný # Author: Zdenko Podobný # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
ajibawa-2023/Python-Code-Large/train/row_1395
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_1395:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "an...
[]
''' Created on Feb 3, 2013 @author: bawey ''' import cpoo_tools as tools import cv import cv2 import numpy as np import sys import tesseract from cpoo_tools import show_wait image = cv.LoadImage( sys.argv[1] ) image = tools.split_channels( image ) resized = cv.CreateImage( ( ( int )( image.width * ( 640.0 / image...
ajibawa-2023/Python-Code-Large/train/row_1396
33
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1396:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0588, 0.098, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1396:For_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1396:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1396:For_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1396:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
import cv2 import cv import sys import cpoo_tools as tools import numpy as np image = cv.LoadImage( sys.argv[1] ) # tools.grow_region(image) # TODO: set radius dynamically img = cv.CreateImage( cv.GetSize( image ), image.depth, image.nChannels ) img = tools.split_channels( image ) img = tools.array2cv( cv2.Gaussian...
ajibawa-2023/Python-Code-Large/train/row_1397
22
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_1397:Import_L1_C0", "label": "cv2 import cv2", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 896, 0, 1, 0, 0, 896, 0, 0], "semantic": {"name": "cv2", "arg_names": [], "import_names": ["cv2"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1397:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1397:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1397:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1397:Assign_L20_C4"}]
"""OCR in Python using the Tesseract engine from Google http://code.google.com/p/pytesser/ by Michael J.T. O'Kelly V 0.0.1, 3/10/07""" import Image import subprocess import util import errors tesseract_exe_name = 'tesseract' # Name of executable to be called at command line scratch_image_name = "temp.bmp...
ajibawa-2023/Python-Code-Large/train/row_1398
32
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1398:Import_L1_C0", "label": "Image import Image", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 0, 0.66, 0.0, 721, 0, 1, 0, 0, 721, 0, 0], "semantic": {"name": "Image", "arg_names": [], "import_names": ["Image"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1398:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1398:Expr_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1398:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1398:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/...
import cv2 import cv import sys import cpoo_tools as tools import pylab import numpy as np img = cv.LoadImage(sys.argv[1]) #img = cv.LoadImage("meat/rgb.png") # eig_image = cv.CreateMat(img.rows, img.cols, cv2.CV_32FC1) # temp_image = cv.CreateMat(img.rows, img.cols, cv2.CV_32FC1) # for (x,y) in cv.GoodFeaturesToTrack...
ajibawa-2023/Python-Code-Large/train/row_1399
48
153
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1399:Import_L1_C0", "label": "cv2 import cv2", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0065, 0, 0.66, 0.0, 896, 0, 1, 0, 0, 896, 0, 0], "semantic": {"name": "cv2", "arg_names": [], "import_names": ["cv2"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1399:For_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1399:For_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1399:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_1399:Assign_L44_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1399...
import cv import cv2 import numpy as np import collections def extract( image, region ): histogram = dict() imgcp = cv.CreateImage( cv.GetSize( image ), image.depth, image.nChannels ) cv.Copy( image, imgcp ) for pixel in region: color = imgcp[pixel[1], pixel[0]] if color not in histogra...
ajibawa-2023/Python-Code-Large/train/row_1400
298
449
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1400:Import_L1_C0", "label": "cv import cv", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0022, 0.0022, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1400:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1400:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1400:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1400:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import tesseract import sys api = tesseract.TessBaseAPI() api.Init(".","eng",tesseract.OEM_DEFAULT) api.SetVariable("tessedit_char_whitelist", "0123456789\.\:") api.SetPageSegMode(tesseract.PSM_AUTO) mImgFile = sys.argv[1] mBuffer=open(mImgFile,"rb").read() result = tesseract.ProcessPagesBuffer(mBuffer,len(mBuffer),a...
ajibawa-2023/Python-Code-Large/train/row_1401
10
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1401:Import_L1_C0", "label": "tesseract import tesseract", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 332, 0, 1, 0, 0, 332, 0, 0], "semantic": {"name": "tesseract", "arg_names": [], "import_names": ["tesse...
[]
"""Utility functions for processing images for delivery to Tesseract""" import os def image_to_scratch(im, scratch_image_name): """Saves image in memory to scratch file. .bmp format will be read correctly by Tesseract""" im.save(scratch_image_name, dpi=(200,200)) def retrieve_text(scratch_text_name_root):...
ajibawa-2023/Python-Code-Large/train/row_1402
15
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_1402:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1402:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1402:Expr_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1402:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1402:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import cv2 import numpy as np img = cv2.imread('meat/551054_346968652052693_986626722_n.jpg') h = np.zeros((300,256,3)) bins = np.arange(256).reshape(256,1) color = [ (255,0,0),(0,255,0),(0,0,255) ] for ch, col in enumerate(color): hist_item = cv2.calcHist([img],[ch],None,[256],[0,255]) cv2.normalize(hist_i...
ajibawa-2023/Python-Code-Large/train/row_1404
15
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1404:Import_L1_C0", "label": "cv2 import cv2", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 896, 0, 1, 0, 0, 896, 0, 0], "semantic": {"name": "cv2", "arg_names": [], "import_names": ["cv2"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1404:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1404:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1404:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1404:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1404:...
from PIL import Image import ImageEnhance from pytesser import * from urllib import urlretrieve import sys im = Image.open(sys.argv[1]) nx, ny = im.size im2 = im.resize((int(nx*5), int(ny*5)), Image.BICUBIC) im2.save("temp2.png") enh = ImageEnhance.Contrast(im) enh.enhance(1.3).show("30% more contrast") imgx = Im...
ajibawa-2023/Python-Code-Large/train/row_1405
25
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1405:ImportFrom_L1_C0", "label": "from PIL import Image", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 556, 0, 1, 0, 0, 556, 0, 0], "semantic": {"name": "PIL", "arg_names": [], "import_names": ["Image"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1405:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1405:For_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1405:For_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1405:If_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1405:If_...