Dataset Viewer
Auto-converted to Parquet Duplicate
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
if False: # set to True to insert test data store(store.product.id > 0).delete() store(store.category.id > 0).delete() if len(store(store.product.id > 0).select()) == 0: fantasy_id = store.category.insert(name='Fantasy', description='Fantasy books', small_image='testdata/hp1.jpg') hp1 = ...
ajibawa-2023/Python-Code-Large/train/row_0
17
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_0:If_L1_C0", "label": "if", "type": "if", "loc": [1, 20], "level": 0, "parent": null, "vector": [4, 0, 0.525, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 19], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "i...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_0:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_0:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_0:If_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_0:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_0:If_L1_C0", "t": "ajib...
UNDEFINED = -1 if request.env.web2py_runtime_gae: # if running on Google App Engine store = DAL('gae') # connect to Google BigTable session.connect(request, response, db=store) # and store sessions and tickets there else: store = DAL("sqlite://store.db") store.define...
ajibawa-2023/Python-Code-Large/train/row_1
38
154
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1:Assign_L1_C0", "label": "UNDEFINED =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0065, 0.0065, 0, 0.66, 0.0, 67, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "UNDEFINED", "arg_names": [], "import_names": [], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1:If_L4_C0", "t": "aj...
# import re # delimiter to use between words in URL URL_DELIMITER = '-' def pretty_url(id, name): """Create pretty URL from record name and ID """ return '%s%s%d' % (' '.join(re.sub('[^\w ]+', '', name).split()).replace(' ', URL_DELIMITER), URL_DELIMITER, id) def pretty_id(url): """Extract id fr...
ajibawa-2023/Python-Code-Large/train/row_2
17
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_2:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2:...
########################################################### ### make sure administrator is on localhost ############################################################ import os, socket, datetime,copy import gluon.contenttype import gluon.fileutils ### crytical --- make a copy of the environment global_env=copy.copy(glo...
ajibawa-2023/Python-Code-Large/train/row_3
152
208
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3:Import_L6_C0", "label": "os import os, socket, datetime\u2026", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0288, 0.0048, 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_3:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3:Assign_L14_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3:If_L18_C0",...
"\nif not session.cart:\n # instantiate new cart\n session.cart, session.balance = [], 0\nsess(...TRUNCATED)
ajibawa-2023/Python-Code-Large/train/row_4
95
148
15
"[\"cat_id\", \"level\", \"center\", \"span\", \"parent_depth\", \"parent_weight\", \"sibling_index\(...TRUNCATED)
"[{\"id\": \"ajibawa-2023/Python-Code-Large/train/row_4:If_L2_C0\", \"label\": \"if\", \"type\": \"i(...TRUNCATED)
"[{\"f\": \"ajibawa-2023/Python-Code-Large/train/row_4:If_L2_C0\", \"t\": \"ajibawa-2023/Python-Code(...TRUNCATED)
"###########################################################\n### make sure administrator is on loca(...TRUNCATED)
ajibawa-2023/Python-Code-Large/train/row_5
140
180
15
"[\"cat_id\", \"level\", \"center\", \"span\", \"parent_depth\", \"parent_weight\", \"sibling_index\(...TRUNCATED)
"[{\"id\": \"ajibawa-2023/Python-Code-Large/train/row_5:Import_L5_C0\", \"label\": \"os import os\",(...TRUNCATED)
"[{\"f\": \"ajibawa-2023/Python-Code-Large/train/row_5:If_L9_C0\", \"t\": \"ajibawa-2023/Python-Code(...TRUNCATED)
"#!/usr/bin/python2.4\n#\n# Copyright 2007 The Python-Twitter Developers\n#\n# Licensed under the Ap(...TRUNCATED)
ajibawa-2023/Python-Code-Large/train/row_6
19
73
15
"[\"cat_id\", \"level\", \"center\", \"span\", \"parent_depth\", \"parent_weight\", \"sibling_index\(...TRUNCATED)
"[{\"id\": \"ajibawa-2023/Python-Code-Large/train/row_6:Expr_L17_C0\", \"label\": \"expression\", \"(...TRUNCATED)
"[{\"f\": \"ajibawa-2023/Python-Code-Large/train/row_6:FunctionDef_L52_C0\", \"t\": \"ajibawa-2023/P(...TRUNCATED)
"#!/usr/bin/python2.4\n#\n# Copyright 2007 The Python-Twitter Developers\n#\n# Licensed under the Ap(...TRUNCATED)
ajibawa-2023/Python-Code-Large/train/row_7
53
91
15
"[\"cat_id\", \"level\", \"center\", \"span\", \"parent_depth\", \"parent_weight\", \"sibling_index\(...TRUNCATED)
"[{\"id\": \"ajibawa-2023/Python-Code-Large/train/row_7:Import_L18_C0\", \"label\": \"os import os\"(...TRUNCATED)
"[{\"f\": \"ajibawa-2023/Python-Code-Large/train/row_7:Try_L22_C0\", \"t\": \"ajibawa-2023/Python-Co(...TRUNCATED)
"\"\"\"Implementation of JSONEncoder\n\"\"\"\nimport re\n\ntry:\n from simplejson._speedups impor(...TRUNCATED)
ajibawa-2023/Python-Code-Large/train/row_8
230
434
15
"[\"cat_id\", \"level\", \"center\", \"span\", \"parent_depth\", \"parent_weight\", \"sibling_index\(...TRUNCATED)
"[{\"id\": \"ajibawa-2023/Python-Code-Large/train/row_8:Expr_L1_C0\", \"label\": \"expression\", \"t(...TRUNCATED)
"[{\"f\": \"ajibawa-2023/Python-Code-Large/train/row_8:Try_L5_C0\", \"t\": \"ajibawa-2023/Python-Cod(...TRUNCATED)
"r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-(...TRUNCATED)
ajibawa-2023/Python-Code-Large/train/row_10
41
316
15
"[\"cat_id\", \"level\", \"center\", \"span\", \"parent_depth\", \"parent_weight\", \"sibling_index\(...TRUNCATED)
"[{\"id\": \"ajibawa-2023/Python-Code-Large/train/row_10:Expr_L1_C0\", \"label\": \"expression\", \"(...TRUNCATED)
"[{\"f\": \"ajibawa-2023/Python-Code-Large/train/row_10:FunctionDef_L120_C0\", \"t\": \"ajibawa-2023(...TRUNCATED)
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
514