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
from App.Proxys import * data = SimBiController( name = 'Walking', controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), ControlParams( joint = 'pelvis_torso', kp = 200.0, kd = 30.0, tauMax = 10000.0, scale = ( 1...
ajibawa-2023/Python-Code-Large/train/row_4141
2
209
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4141:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0048, 0.0048, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
''' Created on 2009-09-09 @author: beaudoin ''' from App.Proxys import * data = SimBiController( name = 'Running', startingState = 0, controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), Contr...
ajibawa-2023/Python-Code-Large/train/row_4142
3
215
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4142:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.014, 0.0233, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[]
from App.Proxys import * data = SimBiController( name = 'Running', controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), ControlParams( joint = 'pelvis_torso', kp = 1000.0, kd = 100.0, tauMax = 10000.0, scale = (...
ajibawa-2023/Python-Code-Large/train/row_4143
2
207
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4143:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0048, 0.0048, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 300.0, kd = 100.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0, ...
ajibawa-2023/Python-Code-Large/train/row_4144
2
283
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4144:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0035, 0.0035, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
''' Created on 2009-09-09 @author: beaudoin ''' from App.Proxys import * data = SimBiController( name = 'Walking', startingState = 0, controlParamsList = [ ControlParams( joint = 'root', kp = 3000, kd = 300, tauMax = 10000, scale = ( 1, 0.2, 1 ) ), ControlParams( join...
ajibawa-2023/Python-Code-Large/train/row_4145
3
201
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4145:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0149, 0.0249, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4146
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4146:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = WalkController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 500.0, kd = 50.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0, 1....
ajibawa-2023/Python-Code-Large/train/row_4147
2
281
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4147:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4148
2
273
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4148:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4149
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4149:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4150
2
273
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4150:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4151
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4151:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4152
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4152:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4153
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4153:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4154
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4154:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4155
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4155:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4156
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4156:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4157
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4157:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4158
2
281
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4158:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4159
2
279
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4159:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4160
2
289
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4160:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0035, 0.0035, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4161
2
309
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4161:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4162
2
287
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4162:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0035, 0.0035, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
ajibawa-2023/Python-Code-Large/train/row_4163
2
344
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4163:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0029, 0.0029, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"...
[]
''' Created on 2009-08-28 @author: beaudoin ''' from os import path meshDir = path.join( path.dirname(__file__), "Meshes" ) blue = ( 0.5, 0.6, 0.8, 1 ) green = ( 0.5, 0.8, 0.6, 1 ) red = ( 0.892, 0.716, 0.602, 1 ) gray = ( 0.5, 0.5, 0.5, 1 ) from App.Proxys import * data = Character( ...
ajibawa-2023/Python-Code-Large/train/row_4164
9
322
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4164:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0093, 0.0155, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 2009-08-28 @author: beaudoin ''' import PyUtils import Core, wx File = "Jumping" #File = "Running" #File = "SideRunning" #File = "JumpWalk" #File = "Walking" #File = "Turning" #PyUtils.load( "RigidBodies.FlatGround" ) PyUtils.load( "RigidBodies.FiniteFlatGround" ) PyUtils.loadMany( ...
ajibawa-2023/Python-Code-Large/train/row_4165
10
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4165:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1304, 0.2174, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 2009-11-26 @author: beaudoin ''' import PyUtils import Core, wx import Controllers PyUtils.load( "RigidBodies.FiniteFlatGround" ) PyUtils.loadMany( "RigidBodies.DodgeBall", 5 ) character = PyUtils.load( "Characters.BipV3" ) character.computeMass(); controller = Controllers.DanceControl...
ajibawa-2023/Python-Code-Large/train/row_4166
17
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4166:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0968, 0.1613, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 2009-08-28 @author: beaudoin This file is just a proxy to indicate which one is the desire framework for typical applications ''' import BipFramework
ajibawa-2023/Python-Code-Large/train/row_4167
2
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4167:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.4444, 0.7778, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 2009-11-23 @author: beaudoin ''' import PyUtils PyUtils.load( "RigidBodies.FiniteFlatGround" )
ajibawa-2023/Python-Code-Large/train/row_4168
3
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4168:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.3333, 0.5556, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 2009-11-26 @author: beaudoin ''' import PyUtils import Core, wx import Controllers PyUtils.load( "RigidBodies.FiniteFlatGround" ) PyUtils.loadMany( "RigidBodies.DodgeBall", 5 ) character = PyUtils.load( "Characters.BipV3" ) character.loadReducedStateFromFile( "Data/Characters/BipV3/Contro...
ajibawa-2023/Python-Code-Large/train/row_4169
18
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4169:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.1852, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
from App.UtilFuncs import fancify print fancify( """Character( root = ArticulatedRigidBody( name = "pelvis", meshes = [ (path.join(meshDir, "pelvis_2_b.obj"), colourDark), (path.join(meshDir, "pelvis_2_s.obj"), colourLight) ], mass = 12...
ajibawa-2023/Python-Code-Large/train/row_4170
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4170:ImportFrom_L1_C0", "label": "from App.UtilFuncs import fancify", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 725, 0, 1, 0, 0, 725, 0, 0], "semantic": {"name": "App.UtilFuncs", "arg_names": [], "import_names"...
[]
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
ajibawa-2023/Python-Code-Large/train/row_4171
63
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_4171:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4171:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4171:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4171:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4171:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
ajibawa-2023/Python-Code-Large/train/row_4172
42
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4172:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4172:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4172:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4172:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4172:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
ajibawa-2023/Python-Code-Large/train/row_4173
50
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4173:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 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_4173:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4173:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4173:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4173:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
ajibawa-2023/Python-Code-Large/train/row_4174
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4174:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 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_4174:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4174:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4174:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4174:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_41...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
ajibawa-2023/Python-Code-Large/train/row_4175
44
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4175:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4175:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4175:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4175:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4175:Assign_L71_C2"}, {"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_4176
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_4176: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...
[]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
ajibawa-2023/Python-Code-Large/train/row_4177
15
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4177:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4177:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4177:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4177:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4177:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
ajibawa-2023/Python-Code-Large/train/row_4178
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4178:For_L3_C0", "label": "for i", "type": "for", "loc": [3, 4], "level": 0, "parent": null, "vector": [6, 0, 0.7, 0.4, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snipp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4178:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4178:Expr_L4_C4"}]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
ajibawa-2023/Python-Code-Large/train/row_4179
15
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4179:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4179:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4179:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4179:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4179:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
ajibawa-2023/Python-Code-Large/train/row_4180
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4180:For_L3_C0", "label": "for i", "type": "for", "loc": [3, 4], "level": 0, "parent": null, "vector": [6, 0, 0.7, 0.4, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snipp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4180:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4180:Expr_L4_C4"}]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
ajibawa-2023/Python-Code-Large/train/row_4181
15
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4181:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4181:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4181:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4181:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4181:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
ajibawa-2023/Python-Code-Large/train/row_4182
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4182:For_L3_C0", "label": "for i", "type": "for", "loc": [3, 4], "level": 0, "parent": null, "vector": [6, 0, 0.7, 0.4, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snipp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4182:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4182:Expr_L4_C4"}]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
ajibawa-2023/Python-Code-Large/train/row_4183
15
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4183:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4183:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4183:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4183:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4183:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
ajibawa-2023/Python-Code-Large/train/row_4184
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4184:For_L3_C0", "label": "for i", "type": "for", "loc": [3, 4], "level": 0, "parent": null, "vector": [6, 0, 0.7, 0.4, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snipp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4184:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4184:Expr_L4_C4"}]
import pbkdf2 def hx(s): return s.encode('hex').upper() vectors=pbkdf2.PBKDF2_tests for i in range(len(vectors)): args, res = vectors[i] print print '******************************************************************' print 'UNIT %d'%i wu = list(pbkdf2.workunits(*args)) if len(wu) != 1: ...
ajibawa-2023/Python-Code-Large/train/row_4185
38
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4185:Import_L1_C0", "label": "pbkdf2 import pbkdf2", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0175, 0.0175, 0, 0.66, 0.0, 872, 0, 1, 0, 0, 872, 0, 0], "semantic": {"name": "pbkdf2", "arg_names": [], "import_names": ["pbkdf2"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4185:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4185:Return_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4185:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4185:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
# Generate a couple of 672-bit test vectors to feed through the HashBlock from hashlib import sha1 import random random.seed(12345) datalen_bits=672 datalen=datalen_bits/8 def mkhdata(): return ''.join([chr(random.randint(0,255)) for x in range(datalen)]) def hx(s): return s.encode('hex') def cenc(s): ...
ajibawa-2023/Python-Code-Large/train/row_4186
26
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4186:ImportFrom_L3_C0", "label": "from hashlib import sha1", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.075, 0.025, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "hashlib", "arg_names": [], "import_names": ["sha1"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4186:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4186:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4186:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4186:Return_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Created on 21-03-2011 @author: maciek ''' def formatString(format, **kwargs): ''' ''' if not format: return '' for arg in kwargs.keys(): format = format.replace("{" + arg + "}", "##" + arg + "##") format = format.replace ("{", "{{") format = format.replace("}", "}}") for...
ajibawa-2023/Python-Code-Large/train/row_4188
15
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4188:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1304, 0.2174, 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_4188:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4188:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4188:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4188:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
''' Created on 21-03-2011 @author: maciek ''' from IndexGenerator import IndexGenerator from optparse import OptionParser import os import tempfile import shutil import logging logging.basicConfig(level = logging.DEBUG) parser = OptionParser() parser.add_option('-n', '--app-name', action='store', dest='appName', hel...
ajibawa-2023/Python-Code-Large/train/row_4189
69
88
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4189:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0341, 0.0568, 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_4189:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4189:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4189:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4189:If_L28_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4189:If_L...
''' Created on 21-03-2011 @author: maciek ''' from formater import formatString import os class IndexGenerator(object): ''' Generates Index.html for iOS app OTA distribution ''' basePath = os.path.dirname(__file__) templateFile = os.path.join(basePath,"templates/index.tmpl") releaseUrls = "" ...
ajibawa-2023/Python-Code-Large/train/row_4190
31
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4190:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0526, 0.0877, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4190:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4190:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4190:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4190:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.0' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 1.0 ''' try: import json except ImportError: import simplejson as json import time import hmac import uuid import base64 import urllib impo...
ajibawa-2023/Python-Code-Large/train/row_4191
206
353
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4191:Assign_L4_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0113, 0.0028, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4191:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4191:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4191:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4191:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.04' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 2. ''' try: import json except ImportError: import simplejson as json import time import urllib import urllib2 import logging def _obj_ho...
ajibawa-2023/Python-Code-Large/train/row_4192
134
199
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4192:Assign_L4_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0201, 0.005, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4192:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4192:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4192:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4192:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.04' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 2. ''' try: import json except ImportError: import simplejson as json import time import urllib import urllib2 import logging def _obj_ho...
ajibawa-2023/Python-Code-Large/train/row_4195
134
199
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4195:Assign_L4_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0201, 0.005, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4195:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4195:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4195:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4195:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
#!/usr/bin/env python # -*- coding: utf-8 -*- APP_KEY = 'hidden' APP_SECRET = 'hidden'
ajibawa-2023/Python-Code-Large/train/row_4198
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4198:Assign_L4_C0", "label": "APP_KEY =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.8, 0.2, 0, 0.66, 0.0, 912, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "APP_KEY", "arg_names": [], "import_names": [], "rhs_call_name": "...
[]
# mako/pygen.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for generating and formatting literal Python code.""" import re, string from StringIO ...
ajibawa-2023/Python-Code-Large/train/row_4200
132
285
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4200:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0246, 0.0035, 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_4200:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4200:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4200:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4200:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code...
# mako/lookup.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import os, stat, posixpath, re from mako import exceptions, util from mako.template import Template...
ajibawa-2023/Python-Code-Large/train/row_4201
102
331
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4201:Import_L7_C0", "label": "os import os, stat, posixpath\u2026", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0211, 0.003, 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_4201:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4201:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4201:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4201:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
# mako/parsetree.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """defines the parse tree components for Mako templates.""" from mako import exceptions, ast, u...
ajibawa-2023/Python-Code-Large/train/row_4203
252
565
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4203:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0124, 0.0018, 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_4203:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4203:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4203:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4203:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# ext/autohandler.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """adds autohandler functionality to Mako templates. requires that the TemplateLookup class is...
ajibawa-2023/Python-Code-Large/train/row_4204
26
65
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4204:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 26], "level": 0, "parent": null, "vector": [8, 0, 0.2538, 0.3077, 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_4204:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4204:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4204:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4204:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# ext/preprocessors.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """preprocessing functions, used with the 'preprocessor' argument on Template, TemplateLooku...
ajibawa-2023/Python-Code-Large/train/row_4205
5
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_4205:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 8], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4205:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4205:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4205:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4205:Return_L19_C4"}]
# ext/babelplugin.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """gettext message extraction via Babel: http://babel.edgewall.org/""" from StringIO import Str...
ajibawa-2023/Python-Code-Large/train/row_4206
69
132
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4206:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.053, 0.0076, 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_4206:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4206:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4206:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4206:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# ext/pygmentplugin.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re try: set except NameError: from sets import Set as set from pygments.lexer...
ajibawa-2023/Python-Code-Large/train/row_4207
34
107
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4207:Import_L7_C0", "label": "re import re", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0654, 0.0093, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4207:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4207:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4207:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4207:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_42...
# ext/turbogears.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, inspect from mako.lookup import TemplateLookup from mako.template import Template cl...
ajibawa-2023/Python-Code-Large/train/row_4208
34
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4208:Import_L7_C0", "label": "re import re, inspect", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0179, 0, 0.66, 0.0, 540, 0, 2, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re", "inspect"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4208:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4208:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4208:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4208:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# mako/codegen.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides functionality for rendering a parsetree constructing into module source code.""" impo...
ajibawa-2023/Python-Code-Large/train/row_4209
525
1,051
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4209:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0067, 0.001, 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_4209:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4209:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4209:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4209:If_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# mako/ast.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for analyzing expressions and blocks of Python code, as well as generating Python from A...
ajibawa-2023/Python-Code-Large/train/row_4211
78
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4211:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0524, 0.014, 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_4211:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4211:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4211:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4211:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# mako/exceptions.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """exception classes""" import traceback, sys, re from mako import util class MakoException(E...
ajibawa-2023/Python-Code-Large/train/row_4213
134
307
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4213:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0228, 0.0033, 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_4213:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4213:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4213:If_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4213:Return_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
# mako/__init__.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __version__ = '0.5.0'
ajibawa-2023/Python-Code-Large/train/row_4214
1
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4214:Assign_L8_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.8889, 0.1111, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs...
[]
# mako/template.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Template class, a facade for parsing, generating and executing template strings, ...
ajibawa-2023/Python-Code-Large/train/row_4215
192
542
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4215:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0138, 0.0037, 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_4215:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4215:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4215:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4215:FunctionDef_L132_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# mako/filters.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, urllib, htmlentitydefs, codecs from StringIO import StringIO from mako import util xm...
ajibawa-2023/Python-Code-Large/train/row_4216
81
188
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4216:Import_L8_C0", "label": "re import re, urllib, htmlentitydefs\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0426, 0.0053, 0, 0.66, 0.0, 540, 0, 4, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4216:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4216:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4216:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4216:Return_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# mako/_ast_util.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
ajibawa-2023/Python-Code-Large/train/row_4217
540
839
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4217:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 32], "level": 0, "parent": null, "vector": [8, 0, 0.0232, 0.031, 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_4217:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4217:Expr_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4217:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4217:Return_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# mako/cache.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import exceptions cache = None class BeakerMissing(object): def get_cache(self, name...
ajibawa-2023/Python-Code-Large/train/row_4218
49
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4218:ImportFrom_L7_C0", "label": "from mako import exceptions", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0565, 0.0081, 0, 0.66, 0.0, 682, 0, 1, 0, 0, 682, 0, 0], "semantic": {"name": "mako", "arg_names": [], "import_names": ["excep...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4218:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4218:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4218:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4218:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import os import web import uuid from mako.lookup import TemplateLookup from mako import exceptions __author__ = 'Michael Liao' class emptyobject(object): def __getattr__(self, attr): return '' def __setattr__(self, attr, value): ...
ajibawa-2023/Python-Code-Large/train/row_4219
72
108
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4219:Import_L4_C0", "label": "logging import logging", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.0093, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4219:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4219:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4219:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4219:Return_L17_C8"}, {"f": "ajibawa-2023/Python-Code...
from pandas.io.data import DataReader from pandas.io.data import DataFrame import matplotlib.pyplot as plt import matplotlib.ticker as ticker from datetime import datetime from datetime import timedelta import pandas as pd import numpy as np import urllib import codecs import csv import os import glob import json impo...
ajibawa-2023/Python-Code-Large/train/row_4220
60
89
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4220:ImportFrom_L1_C0", "label": "from pandas.io.data import DataReader", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0112, 0.0112, 0, 0.66, 0.0, 190, 0, 1, 0, 0, 190, 0, 0], "semantic": {"name": "pandas.io.data", "arg_names": [], "im...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4220:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4220:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4220:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4220:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import csv import numpy as np from pandas import DataFrame import pandas as pd # all digits are decreased by 1 len_total = 280 len_freq = 7 len_body = 5 len_star = 2 freq_body = [] freq_star = [] relation_body = np.zeros(shape=(50,50)) relation_star = np.zeros(shape=(11,11)) def rel_body(firstC...
ajibawa-2023/Python-Code-Large/train/row_4221
35
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4221:Import_L1_C0", "label": "csv import csv", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 312, 0, 1, 0, 0, 312, 0, 0], "semantic": {"name": "csv", "arg_names": [], "import_names": ["csv"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4221:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4221:Assign_L21_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4221:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4221:If_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
import sys, string, re, Queue arith = ['sub', 'div', 'mod', 'cmple', 'add', 'mul', 'cmpeq', 'cmplt'] operators = ['-', '/', '%', '<=', '+', '*', '==', '<'] arith1 = ['neg'] targets = [] local_size = 0; # get operand def getOperand(t, sline, access_local): #GP if sline[t] == 'GP': print '(char*)global', ...
ajibawa-2023/Python-Code-Large/train/row_4222
152
255
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4222:Import_L1_C0", "label": "sys import sys, string, re\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0039, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4222:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4222:If_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4222:If_L16_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_4222:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
#!/usr/bin/python2.5 import pacparser pacparser.init() pacparser.parse_pac("wpad.dat") proxy = pacparser.find_proxy("http://www.manugarg.com") print proxy pacparser.cleanup() # Or simply, print pacparser.just_find_proxy("wpad.dat", "http://www2.manugarg.com")
ajibawa-2023/Python-Code-Large/train/row_4224
7
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4224:Import_L3_C0", "label": "pacparser import pacparser", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0833, 0, 0.66, 0.0, 892, 0, 1, 0, 0, 892, 0, 0], "semantic": {"name": "pacparser", "arg_names": [], "import_names": ["pacpars...
[]
# Copyright (C) 2007 Manu Garg. # Author: Manu Garg <manugarg@gmail.com> # # pacparser is a library that provides methods to parse proxy auto-config # (PAC) files. Please read README file included with this package for more # information about this library. # # pacparser is free software; you can redistribute it and/or...
ajibawa-2023/Python-Code-Large/train/row_4225
70
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4225:Expr_L22_C0", "label": "expression", "type": "expression", "loc": [22, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1715, 0.0292, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4225:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4225:Expr_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4225:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4225:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
import shutil import sys from distutils import sysconfig def main(): if sys.platform == 'win32': shutil.rmtree('%s\\pacparser' % sysconfig.get_python_lib(), ignore_errors=True) shutil.copytree('pacparser', '%s\\pacparser' % sysconfig.get_python_lib()) else: print 'This script should b...
ajibawa-2023/Python-Code-Large/train/row_4226
10
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4226:Import_L1_C0", "label": "shutil import shutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4226:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4226:If_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4226:If_L6_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_4226:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4226...
# Copyright (C) 2007 Manu Garg. # Author: Manu Garg <manugarg@gmail.com> # # pacparser is a library that provides methods to parse proxy auto-config # (PAC) files. Please read README file included with this package for more # information about this library. # # pacparser is free software; you can redistribute it...
ajibawa-2023/Python-Code-Large/train/row_4227
15
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_4227:Expr_L23_C0", "label": "expression", "type": "expression", "loc": [23, 27], "level": 0, "parent": null, "vector": [8, 0, 0.4032, 0.0806, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4227:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4227:If_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4227:If_L37_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_4227:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
# Copyright (C) 2007 Manu Garg. # Author: Manu Garg <manugarg@gmail.com> # # pacparser is a library that provides methods to parse proxy auto-config # (PAC) files. Please read README file included with this package for more # information about this library. # # pacparser is free software; you can redistribute it and/or...
ajibawa-2023/Python-Code-Large/train/row_4228
47
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4228:Import_L23_C0", "label": "getopt import getopt", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.2644, 0.0115, 0, 0.66, 0.0, 588, 0, 1, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4228:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4228:Assign_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4228:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4228:If_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
import cherrypy import sqlite3 import Common import os import time import hashlib from postmarkup import render_bbcode localdir = os.path.dirname(__file__) absdir = os.path.join(os.getcwd(), localdir) class User(Common.Template): def index (self): return self.default() index.exposed = True ...
ajibawa-2023/Python-Code-Large/train/row_4229
169
224
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4229:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0045, 0.0045, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4229:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4229:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4229:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4229:Return_L17_C2"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: UTF-8 -*- """ Post Markup Author: Will McGugan (http://www.willmcgugan.com) """ __version__ = "1.1.4" import re from urllib import quote, unquote, quote_plus, urlencode from urlparse import urlparse, urlunparse pygments_available = True try: from pygments import highlight from ...
ajibawa-2023/Python-Code-Large/train/row_4230
790
1,477
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4230:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.003, 0.0027, 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_4230:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4230:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4230:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4230:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import cherrypy import sqlite3 import time from postmarkup import render_bbcode import Common class PrivateMessage(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # This function handles basically everything. If no ID is given, it ...
ajibawa-2023/Python-Code-Large/train/row_4231
90
164
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4231:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0061, 0.0061, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4231:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4231:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4231:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4231:Return_L12_C2"}, {"f": "ajibawa-2023/Python-Code-...
import sqlite3 import getpass # Create the connection connection = sqlite3.connect("forum.db") cursor = connection.cursor() with open("dump.sql", "w") as f: for line in connection.iterdump(): f.write("%s\n" % line)
ajibawa-2023/Python-Code-Large/train/row_4232
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4232:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4232:For_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4232:Expr_L10_C8"}]
import cherrypy import sqlite3 import time import Common class Post(Common.Template): def index(self): return self.default() index.exposed = True # This function allows users to create new posts. It requres the thread_id # argument. If Reply is set, it takes the user name and content from # the given post....
ajibawa-2023/Python-Code-Large/train/row_4233
95
161
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4233:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0062, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4233:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4233:FunctionDef_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4233:FunctionDef_L8_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4233:Return_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
import cherrypy import sqlite3 import time from postmarkup import render_bbcode import Common class Thread(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # Default function displays a given thread. def default(self, id = None): ...
ajibawa-2023/Python-Code-Large/train/row_4234
173
325
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4234:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4234:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4234:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4234:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4234:Return_L12_C2"}, {"f": "ajibawa-2023/Python-Code-...
import cherrypy import sqlite3 import os.path import hashlib # Import our modules import Common import Subforum import Thread import Post import User import Search import Structure import PrivateMessage # root_dir is used by the config file root_dir = os.path.dirname(os.path.abspath(__file__)) # connect to the datab...
ajibawa-2023/Python-Code-Large/train/row_4235
67
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4235:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.009, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4235:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4235:Assign_L21_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4235:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4235:FunctionDef_L26_C1"}, {"f": "ajibawa-2023/Python-Code...
import sqlite3 import getpass import hashlib # Create the connection connection = sqlite3.connect("forum.db") cursor = connection.cursor() # Restore the dump install_dump = open('install.sql', 'r') cursor.executescript(install_dump.read()) install_dump.close() # Add an administrator account cursor.exec...
ajibawa-2023/Python-Code-Large/train/row_4236
30
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4236:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4236:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4236:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4236:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4236:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4236:...
import cherrypy import sqlite3 import time import Common class Subforum(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # The default view displays a given subforum. If no ID is given, it # displays the root subforum def default(se...
ajibawa-2023/Python-Code-Large/train/row_4237
70
139
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4237:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0072, 0.0072, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4237:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4237:FunctionDef_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4237:FunctionDef_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4237:Return_L10_C2"}, {"f": "ajibawa-2023/Python-Code-La...
import cherrypy import sqlite3 import time import re # central base class that other pages inherit class Template: # header includes the logo and login/register form def header(self, title=None): if title: title = "%s - %s" % (title,self.getForumName()) else: title = "%s" % self.getForumName() out = ''' ...
ajibawa-2023/Python-Code-Large/train/row_4238
161
373
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4238:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0027, 0.0027, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4238:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4238:FunctionDef_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4238:FunctionDef_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4238:If_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
import cherrypy import sqlite3 import time import Common from postmarkup import render_bbcode class Search(Common.Template): def index(self): return self.default() index.exposed = True def default(self, q = None): # if the user didn't search for anything if q is None or q == '': # return an error ...
ajibawa-2023/Python-Code-Large/train/row_4239
53
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_4239:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0118, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4239:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4239:FunctionDef_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4239:FunctionDef_L10_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4239:Return_L11_C2"}, {"f": "ajibawa-2023/Python-Code-...
import cherrypy import sqlite3 import time import Common # restructure the forum class Structure(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # This function is the default view for the restructure view and shows the # subforum t...
ajibawa-2023/Python-Code-Large/train/row_4240
201
455
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4240:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0022, 0.0022, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4240:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4240:FunctionDef_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4240:FunctionDef_L10_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4240:Return_L11_C2"}, {"f": "ajibawa-2023/Python-Code-...
import sqlite3 as sql conn = sql.connect('sample.db') curs = conn.cursor() # Create Item table curs.execute('''create table item (id integer primary key, itemno text unique, scancode text, descr text, price real)''') curs.execute("insert into item values\ (NULL,0001,32187645,...
ajibawa-2023/Python-Code-Large/train/row_4241
19
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4241:Import_L1_C0", "label": "sqlite3 import sql", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0278, 0.0278, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sql"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4241:For_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4241:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4241:For_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4241:Expr_L35_C4"}]
""" Tutorial - Multiple objects This tutorial shows you how to create a site structure through multiple possibly nested request handler objects. """ import cherrypy class HomePage: def index(self): return ''' <p>Hi, this is the home page! Check out the other fun stuff on this sit...
ajibawa-2023/Python-Code-Large/train/row_4243
28
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_4243:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0357, 0.0612, 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_4243:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4243:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4243:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4243:Return_L13_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Tutorial: HTTP errors HTTPError is used to return an error response to the client. CherryPy has lots of options regarding how such errors are logged, displayed, and formatted. """ import os localDir = os.path.dirname(__file__) curpath = os.path.normpath(os.path.join(os.getcwd(), localDir)) import cherrypy cl...
ajibawa-2023/Python-Code-Large/train/row_4244
28
81
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4244:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0617, 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_4244:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4244:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4244:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4244:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-La...
""" Tutorial - Hello World The most basic (working) CherryPy application possible. """ # Import CherryPy global namespace import cherrypy class HelloWorld: """ Sample request handler class. """ def index(self): # CherryPy will call this method for the root URI ("/") and send # its return val...
ajibawa-2023/Python-Code-Large/train/row_4245
12
35
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4245:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0857, 0.1429, 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_4245:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4245:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4245:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4245:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
''' Bonus Tutorial: Using SQLObject This is a silly little contacts manager application intended to demonstrate how to use SQLObject from within a CherryPy2 project. It also shows how to use inline Cheetah templates. SQLObject is an Object/Relational Mapper that allows you to access data stored in an RDBMS in a pytho...
ajibawa-2023/Python-Code-Large/train/row_4246
47
168
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4246:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0952, 0.1845, 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_4246:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4246:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4246:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4246:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Tutorial: File upload and download Uploads ------- When a client uploads a file to a CherryPy application, it's placed on disk immediately. CherryPy will pass it to your exposed method as an argument (see "myFile" below); that arg will have a "file" attribute, which is a handle to the temporary uploaded file. If...
ajibawa-2023/Python-Code-Large/train/row_4247
27
107
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4247:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 41], "level": 0, "parent": null, "vector": [8, 0, 0.1963, 0.3832, 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_4247:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4247:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4247:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4247:Return_L54_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Bonus Tutorial: Using generators to return result bodies Instead of returning a complete result string, you can use the yield statement to return one result part after another. This may be convenient in situations where using a template package like CherryPy or Cheetah would be overkill, and messy string concatena...
ajibawa-2023/Python-Code-Large/train/row_4248
20
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_4248:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0957, 0.1702, 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_4248:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4248:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4248:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4248:Return_L16_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Tutorial - The default method Request handler objects can implement a method called "default" that is called when no other suitable method/object could be found. Essentially, if CherryPy2 can't find a matching request handler object for the given request URI, it will use the default method of the object located de...
ajibawa-2023/Python-Code-Large/train/row_4249
21
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_4249:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 17], "level": 0, "parent": null, "vector": [8, 0, 0.1406, 0.2656, 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_4249:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4249:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4249:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4249:Return_L28_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Tutorial - Multiple methods This tutorial shows you how to link to other methods of your request handler. """ import cherrypy class HelloWorld: def index(self): # Let's link to another method here. return 'We have an <a href="showMessage">important message</a> for you!' index.exposed...
ajibawa-2023/Python-Code-Large/train/row_4250
14
32
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4250:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1094, 0.1875, 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_4250:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4250:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4250:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4250:Return_L14_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Tutorial - Passing variables This tutorial shows you how to pass GET/POST variables to methods. """ import cherrypy class WelcomePage: def index(self): # Ask for the user's name. return ''' <form action="greetUser" method="GET"> What is your name? <input ...
ajibawa-2023/Python-Code-Large/train/row_4251
18
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4251:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0566, 0.0943, 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_4251:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4251:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4251:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4251:Return_L14_C8"}, {"f": "ajibawa-2023/Python-Code...