code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84332
1,151
1,566
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84332:ImportFrom_L20_C0", "label": "from google.net.proto import ProtocolBuffer", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0128, 0.0006, 0, 0.66, 0.0, 141, 0, 1, 0, 0, 141, 0, 0], "semantic": {"name": "google.net.proto", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84332:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84332:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84332:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84332:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84335
37
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_84335:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1963, 0.0093, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84335:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84335:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84335:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84335:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84336
424
704
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84336:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0298, 0.0014, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84336:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84336:Return_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84336:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84336:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84337
3,999
5,411
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84337:ImportFrom_L20_C0", "label": "from google.net.proto import ProtocolBuffer", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0002, 0, 0.66, 0.0, 141, 0, 1, 0, 0, 141, 0, 0], "semantic": {"name": "google.net.proto", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84337:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84337:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84337:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84337:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84339
118
335
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84339:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0627, 0.003, 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_84339:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84339:Expr_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84339:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84339:If_L96_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84340
30
73
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84340:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.2877, 0.0137, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84340:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84340:Expr_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84340:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84340:FunctionDef_L40_C2"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84341
55
167
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84341:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1257, 0.006, 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_84341:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84341:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84341:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84341:If_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84342
17
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84342:Import_L1_C0", "label": "array import array", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0204, 0, 0.66, 0.0, 80, 0, 1, 0, 0, 80, 0, 0], "semantic": {"name": "array", "arg_names": [], "import_names": ["array"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84342:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84342:Expr_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84342:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84342:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84344
5
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_84344:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.7778, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84346
32
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_84346:Expr_L22_C0", "label": "expression", "type": "expression", "loc": [22, 26], "level": 0, "parent": null, "vector": [8, 0, 0.2222, 0.0463, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84346:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84346:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84346:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84346:FunctionDef_L67_C2"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84347
46
162
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84347:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1296, 0.0062, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84347:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84347:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84347:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84347:Assign_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84349
22
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_84349:Expr_L26_C0", "label": "expression", "type": "expression", "loc": [26, 26], "level": 0, "parent": null, "vector": [8, 0, 0.321, 0.0123, 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_84349:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84349:Expr_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84349:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84349:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84351
202
602
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84351:Expr_L26_C0", "label": "expression", "type": "expression", "loc": [26, 38], "level": 0, "parent": null, "vector": [8, 0, 0.0532, 0.0216, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84351:Try_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84351:Import_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84351:Try_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84351:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84352
1
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_84352:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0588, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84353
789
2,399
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84353:Import_L19_C0", "label": "sys import sys", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0079, 0.0004, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84353:ClassDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84353:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84353:ClassDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84353:Assign_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84354
43
122
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84354:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.1393, 0.0082, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84354:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84354:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84354:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84354:Assign_L48_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84355
99
192
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84355:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 30], "level": 0, "parent": null, "vector": [8, 0, 0.1224, 0.0729, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84355:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84355:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84355:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84355:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code...
def _IsColor(color): """Try to determine if color is a hex color string. Labels that look like hex colors will match too, unfortunately.""" if not isinstance(color, basestring): return False color = color.strip('#') if len(color) != 3 and len(color) != 6: return False hex_letters = '0123456789abcdef...
ajibawa-2023/Python-Code-Large/train/row_84356
12
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84356:FunctionDef_L1_C0", "label": "_IsColor", "type": "function", "loc": [1, 13], "level": 0, "parent": null, "vector": [2, 0, 0.5385, 1.0, 0, 0.66, 0.0, 459, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "_IsColor", "arg_names": ["color"], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84356:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84356:Expr_L2_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84356:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84356:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84357
77
171
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84357:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0994, 0.0058, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84357:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84357:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84357:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84357:FunctionDef_L32_C2"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84358
166
412
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84358:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0413, 0.0024, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84358:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84358:Expr_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84358:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84358:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84359
72
178
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84359:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0955, 0.0056, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84359:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84359:Expr_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84359:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84359:FunctionDef_L33_C2"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84360
95
230
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84360:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0783, 0.013, 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_84360:ClassDef_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84360:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84360:ClassDef_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84360:FunctionDef_L89_C2"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84361
257
430
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84361:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0419, 0.007, 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_84361:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84361:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84361:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84361:FunctionDef_L44_C2"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84362
16
50
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84362:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.34, 0.02, 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_84362:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84362:Expr_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84362:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84362:FunctionDef_L30_C2"}, {"f": "ajibawa-2023/Python...
__version__='1.0'
ajibawa-2023/Python-Code-Large/train/row_84363
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84363:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call...
[]
"""Compatibility stuff""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code mus...
ajibawa-2023/Python-Code-Large/train/row_84364
11
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84364:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0208, 0.0208, 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_84364:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84364:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84364:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84364:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" @package antlr3.tree @brief ANTLR3 runtime package, treewizard module A utility module to create ASTs at runtime. See <http://www.antlr.org/wiki/display/~admin/2007/07/02/Exploring+Concept+of+TreeWizard> for an overview. Note that the API of the Python implementation is slightly different. """ # begin[licence] #...
ajibawa-2023/Python-Code-Large/train/row_84365
297
612
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84365:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0065, 0.0114, 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_84365:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84365:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84365:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84365:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code ...
ajibawa-2023/Python-Code-Large/train/row_84367
9
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_84367:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0175, 0.0175, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" @package antlr3.tree @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or...
ajibawa-2023/Python-Code-Large/train/row_84368
842
2,446
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84368:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0014, 0.0025, 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_84368:ClassDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84368:Expr_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84368:ClassDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84368:FunctionDef_L63_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" @package antlr3.dottreegenerator @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary fo...
ajibawa-2023/Python-Code-Large/train/row_84370
78
210
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84370:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0167, 0.0286, 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_84370:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84370:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84370:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84370:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""ANTLR3 exception hierarchy""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source c...
ajibawa-2023/Python-Code-Large/train/row_84371
159
364
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84371:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0027, 0.0027, 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_84371:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84371:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84371:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84371:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code ...
ajibawa-2023/Python-Code-Large/train/row_84372
159
416
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84372:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0024, 0.0024, 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_84372:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84372:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84372:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84372:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code ...
ajibawa-2023/Python-Code-Large/train/row_84373
544
1,452
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84373:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0007, 0.0007, 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_84373:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84373:Expr_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84373:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84373:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code ...
ajibawa-2023/Python-Code-Large/train/row_84374
68
213
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84374:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0047, 0.0047, 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_84374:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84374:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84374:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84374:FunctionDef_L46_C4"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_84375
0
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
""" Common checksum routines (used in multiple localflavor/ cases, for example). """ __all__ = ['luhn',] LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) # sum_of_digits(index * 2) def luhn(candidate): """ Checks a candidate number for validity according to the Luhn algorithm (used in validation of, for ...
ajibawa-2023/Python-Code-Large/train/row_84376
12
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84376:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0909, 0.1364, 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_84376:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84376:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84376:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84376:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"Commonly-used date structures" from google.appengine._internal.django.utils.translation import ugettext_lazy as _ WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu')...
ajibawa-2023/Python-Code-Large/train/row_84377
9
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84377:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0303, 0.0303, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
import imp import os import sys def module_has_submodule(package, module_name): """See if 'module' is in 'package'.""" name = ".".join([package.__name__, module_name]) try: # None indicates a cached miss; see mark_miss() in Python/import.c. return sys.modules[name] is not None except K...
ajibawa-2023/Python-Code-Large/train/row_84378
34
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84378:Import_L1_C0", "label": "imp import imp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0159, 0.0159, 0, 0.66, 0.0, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_names": ["imp"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84378:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84378:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84378:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84378:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" termcolors.py """ color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = dict([(color_names[x], '3%s' % x) for x in range(8)]) background = dict([(color_names[x], '4%s' % x) for x in range(8)]) RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink': '5', 'rever...
ajibawa-2023/Python-Code-Large/train/row_84379
60
198
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84379:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0101, 0.0152, 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_84379:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84379:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84379:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84379:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code...
"""Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threading.) Thread-local objects support the management of thread-local dat...
ajibawa-2023/Python-Code-Large/train/row_84381
65
240
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84381:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 134], "level": 0, "parent": null, "vector": [8, 0, 0.2812, 0.5583, 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_84381:ClassDef_L138_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84381:Assign_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84381:ClassDef_L138_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84381:FunctionDef_L141_C4"}, {"f": "ajibawa-2023/Python...
""" Code used in a couple of places to work with the current thread's environment. Current users include i18n and request prefix handling. """ try: import threading currentThread = threading.currentThread except ImportError: def currentThread(): return "no threading"
ajibawa-2023/Python-Code-Large/train/row_84382
6
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_84382:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.2083, 0.3333, 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_84382:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84382:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84382:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84382:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8...
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print df.format('jS F Y H:i') 7th October 2003 11:39 >>> """ import re import time import calendar from google.appengine._internal.django.utils.date...
ajibawa-2023/Python-Code-Large/train/row_84383
199
286
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84383:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0227, 0.042, 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_84383:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84383:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84383:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84383:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-...
import datetime import time from google.appengine._internal.django.utils.tzinfo import LocalTimezone from google.appengine._internal.django.utils.translation import ungettext, ugettext def timesince(d, now=None): """ Takes two datetime objects and returns the time between d and now as a nicely formatted s...
ajibawa-2023/Python-Code-Large/train/row_84384
35
69
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84384:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84384:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84384:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84384:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84384:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-La...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
ajibawa-2023/Python-Code-Large/train/row_84385
60
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84385:Import_L31_C0", "label": "os import os, sys, time", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.2605, 0.0084, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84385:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84385:Import_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84385:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84385:Import_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
import re import sys import urllib from email.Utils import formatdate from google.appengine._internal.django.utils.encoding import smart_str, force_unicode from google.appengine._internal.django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"') def urlquote(url, safe='/'): "...
ajibawa-2023/Python-Code-Large/train/row_84386
56
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84386:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0077, 0.0077, 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_84386:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84386:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84386:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84386:Return_L18_C4"}, {"f": "ajibawa-2023/Python-Code...
# License for code in this file that was taken from Python 2.5. # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # -------------------------------------------- # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF"), and the Individual or Organization ("Licensee") accessing and # otherwise usin...
ajibawa-2023/Python-Code-Large/train/row_84387
163
367
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84387:FunctionDef_L53_C0", "label": "curry", "type": "function", "loc": [53, 56], "level": 0, "parent": null, "vector": [2, 0, 0.1485, 0.0109, 0, 0.66, 0.0, 553, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "curry", "arg_names": ["_curried_func", "args", "kwargs"], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84387:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84387:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84387:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84387:Return_L55_C8"}, {"f": "ajibawa-2023/Pyth...
""" Utilities for XML generation/parsing. """ from xml.sax.saxutils import XMLGenerator class SimplerXMLGenerator(XMLGenerator): def addQuickElement(self, name, contents=None, attrs=None): "Convenience method for adding an element with no children" if attrs is None: attrs = {} self.startEl...
ajibawa-2023/Python-Code-Large/train/row_84388
11
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84388:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.2143, 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_84388:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84388:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84388:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84388:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# Performance note: I benchmarked this code using a set instead of # a list for the stopwords and was surprised to find that the list # performed /better/ than the set - maybe because it's only a small # list. stopwords = ''' i a an are as at be by for from how in is it of on or that the this to was what when where ''...
ajibawa-2023/Python-Code-Large/train/row_84389
9
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84389:Assign_L6_C0", "label": "stopwords = split()", "type": "assigned_variable", "loc": [6, 32], "level": 0, "parent": null, "vector": [14, 0, 0.4524, 0.6429, 0, 0.66, 0.0, 557, 3, 0, 0, 0, 908, 10, 1], "semantic": {"name": "stopwords", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84389:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84389:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84389:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84389:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ f...
ajibawa-2023/Python-Code-Large/train/row_84391
60
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84391:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0294, 0.0504, 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_84391:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84391:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84391:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84391:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) """ try: import threading except ImportError: import dummy_threading as threading class RWLock: """ Classic implementation of reader-writer lock with preference to writers....
ajibawa-2023/Python-Code-Large/train/row_84392
45
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_84392:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.046, 0.0805, 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_84392:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84392:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84392:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84392:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"Implementation of tzinfo classes for use with datetime.datetime." import time from datetime import timedelta, tzinfo from google.appengine._internal.django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING class FixedOffset(tzinfo): "Fixed offset in minutes east from UTC." def __init__(...
ajibawa-2023/Python-Code-Large/train/row_84393
48
77
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84393:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.013, 0.013, 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_84393:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84393:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84393:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84393:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import decimal import datetime from google.appengine._internal.django.conf import settings from google.appengine._internal.django.utils.translation import get_language, to_locale, check_for_language from google.appengine._internal.django.utils.importlib import import_module from google.appengine._internal.django.utils...
ajibawa-2023/Python-Code-Large/train/row_84394
102
159
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84394:Import_L1_C0", "label": "decimal import decimal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 349, 0, 1, 0, 0, 349, 0, 0], "semantic": {"name": "decimal", "arg_names": [], "import_names": ["decimal"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84394:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84394:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84394:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84394:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
ajibawa-2023/Python-Code-Large/train/row_84395
169
328
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84395:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0122, 0.0213, 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_84395:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84395:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84395:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84395:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import re from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import allow_lazy from google.appengine._internal.django.utils.translation import ugettext_lazy from htmlentitydefs import name2codepoint # Capitalizes the first letter of a stri...
ajibawa-2023/Python-Code-Large/train/row_84396
158
282
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84396:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0035, 0.0035, 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_84396:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84396:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84396:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84396:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code...
import os from os.path import join, normcase, normpath, abspath, isabs, sep from google.appengine._internal.django.utils.encoding import force_unicode # Define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII # characters in it. This isn't necessary on...
ajibawa-2023/Python-Code-Large/train/row_84397
19
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84397:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0222, 0.0222, 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_84397:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84397:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84397:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84397:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', ...
ajibawa-2023/Python-Code-Large/train/row_84398
226
428
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84398:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0047, 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_84398:For_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84398:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84398:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84398:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
ajibawa-2023/Python-Code-Large/train/row_84400
53
349
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84400:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1433, 0.2837, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84400:Try_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84400:Import_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84400:Try_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84400:If_L112_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
ajibawa-2023/Python-Code-Large/train/row_84402
48
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_84402:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0231, 0.0308, 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_84402:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84402:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84402:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84402:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ from google.appengine._internal.django.utils.copycompat import deepcopy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being ei...
ajibawa-2023/Python-Code-Large/train/row_84403
74
153
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84403:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0163, 0.0261, 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_84403:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84403:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84403:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84403:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import itertools # Fallback for Python 2.4, Python 2.5 def product(*args, **kwds): """ Taken from http://docs...
ajibawa-2023/Python-Code-Large/train/row_84404
28
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84404:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84404:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84404:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84404:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84404:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code...
from google.appengine._internal import django import os.path import re def get_svn_revision(path=None): """ Returns the SVN revision in the form SVN-XXXX, where XXXX is the revision number. Returns SVN-unknown if anything goes wrong, such as an unexpected format of internal SVN files. If path...
ajibawa-2023/Python-Code-Large/train/row_84405
21
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84405:ImportFrom_L1_C0", "label": "from google.appengine._internal import django", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0238, 0.0238, 0, 0.66, 0.0, 582, 0, 1, 0, 0, 582, 0, 0], "semantic": {"name": "google.appengine._internal",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84405:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84405:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84405:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84405:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from google.appengine._internal.django.conf import settings from google.appengine._internal.django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''): """ Gets a number (as a number or string), and returns it as a string, using formats definied as a...
ajibawa-2023/Python-Code-Large/train/row_84407
28
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_84407:ImportFrom_L1_C0", "label": "from google.appengine._internal.django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 0, 0.66, 0.0, 434, 0, 1, 0, 0, 434, 0, 0], "semantic": {"name": "google.appengi...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84407:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84407:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84407:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84407:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-La...
"""HTML utilities suitable for global use.""" import re import string from google.appengine._internal.django.utils.safestring import SafeData, mark_safe from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import allow_lazy from google.appe...
ajibawa-2023/Python-Code-Large/train/row_84408
115
189
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84408:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0053, 0.0053, 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_84408:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84408:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84408:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84408:Return_L33_C4"}, {"f": "ajibawa-2023/Python-Code...
# Taken from Python 2.7 with permission from/by the original author. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex'): raise ValueError("'package' not set to a string") dot = len(package) for x in ...
ajibawa-2023/Python-Code-Large/train/row_84409
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_84409:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0278, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84409:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84409:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84409:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84409:If_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Fixes Python 2.4's failure to deepcopy unbound functions. """ import copy import types # Monkeypatch copy's deepcopy registry to handle functions correctly. if (hasattr(copy, '_deepcopy_dispatch') and types.FunctionType not in copy._deepcopy_dispatch): copy._deepcopy_dispatch[types.FunctionType] = copy._deepc...
ajibawa-2023/Python-Code-Large/train/row_84410
6
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84410:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.2143, 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_84410:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84410:Assign_L10_C4"}]
""" The md5 and sha modules are deprecated since Python 2.5, replaced by the hashlib module containing both hash algorithms. Here, we provide a common interface to the md5 and sha constructors, depending on system version. """ import sys if sys.version_info >= (2, 5): import hashlib md5_constructor = hashlib.m...
ajibawa-2023/Python-Code-Large/train/row_84411
14
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_84411:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.15, 0.25, 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_84411:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84411:Import_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84411:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84411:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84...
from types import GeneratorType from google.appengine._internal.django.utils.copycompat import deepcopy class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more th...
ajibawa-2023/Python-Code-Large/train/row_84412
283
473
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84412:ImportFrom_L1_C0", "label": "from types import GeneratorType", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "types", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84412:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84412:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84412:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84412:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from google.appengine._internal.django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u...
ajibawa-2023/Python-Code-Large/train/row_84413
217
372
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84413:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 24], "level": 0, "parent": null, "vector": [8, 0, 0.0336, 0.0645, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84413:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84413:If_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84413:If_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84413:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
# Python's datetime strftime doesn't handle dates before 1900. # These classes override date and datetime to support the formatting of a date # through its full "proleptic Gregorian" date range. # # Based on code submitted to comp.lang.python by Andrew Dalke # # >>> datetime_safe.date(1850, 8, 2).strftime("%Y/%m/%d was...
ajibawa-2023/Python-Code-Large/train/row_84414
56
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_84414:ImportFrom_L10_C0", "label": "from datetime import real_date, real_datetime", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1124, 0.0112, 0, 0.66, 0.0, 426, 0, 2, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84414:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84414:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84414:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84414:Return_L16_C8"}, {"f": "ajibawa-2023/Python-...
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. import warnings from google.appengine._internal.django.conf import settings from google.appe...
ajibawa-2023/Python-Code-Large/train/row_84416
38
72
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84416:Import_L5_C0", "label": "warnings import warnings", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0694, 0.0139, 0, 0.66, 0.0, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warning...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84416:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84416:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84416:If_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84416:Return_L11_C20"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
""" Internationalization support. """ from google.appengine._internal.django.utils.encoding import force_unicode from google.appengine._internal.django.utils.functional import lazy, curry __all__ = ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext', 'ngettext_lazy', 'string_concat', 'activate', 'deactivat...
ajibawa-2023/Python-Code-Large/train/row_84417
55
104
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84417:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0192, 0.0288, 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_84417:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84417:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84417:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84417:ImportFrom_L29_C4"}, {"f": "ajibawa-2023/Python-...
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
ajibawa-2023/Python-Code-Large/train/row_84418
117
228
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84418:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0789, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84418:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84418:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84418:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84418:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python...
import re from google.appengine._internal.django.template import Node, Variable, VariableNode, _render_value_in_context from google.appengine._internal.django.template import TemplateSyntaxError, TokenParser, Library from google.appengine._internal.django.template import TOKEN_TEXT, TOKEN_VAR from google.appengine._in...
ajibawa-2023/Python-Code-Large/train/row_84419
142
274
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84419:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 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_84419:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84419:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84419:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84419:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-...
from google.appengine._internal.django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist from google.appengine._internal.django.template import resolve_variable from google.appengine._internal.django.core.cache import cache from google.appengine._internal.django.utils.encoding import fo...
ajibawa-2023/Python-Code-Large/train/row_84420
33
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84420:ImportFrom_L1_C0", "label": "from google.appengine._internal.django.template import Library, Node, TemplateSyntaxError\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0159, 0.0159, 0, 0.66, 0.0, 411, 0, 5, 0, 0, 411, 0, 0], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84420:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84420:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84420:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84420:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-...
# This module is DEPRECATED! # # You should no longer be using django.template_loader. # # Use django.template.loader instead. from google.appengine._internal.django.template.loader import *
ajibawa-2023/Python-Code-Large/train/row_84421
1
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84421:ImportFrom_L7_C0", "label": "from google.appengine._internal.django.template.loader import *", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 1.0, 0.1429, 0, 0.66, 0.0, 679, 0, 1, 0, 0, 679, 0, 0], "semantic": {"name": "google.appeng...
[]
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ from StringIO import StringIO import decimal import yaml from google.appengine._internal.django.db import models from google.appengine._internal.django.core.serializers.python import Serializer as PythonSerializer from...
ajibawa-2023/Python-Code-Large/train/row_84422
29
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_84422:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0536, 0.0893, 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_84422:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84422:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84422:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84422:Return_L17_C8"}, {"f": "ajibawa-2023/Python-...
""" Serialize data to/from JSON """ import datetime import decimal from StringIO import StringIO from google.appengine._internal.django.core.serializers.python import Serializer as PythonSerializer from google.appengine._internal.django.core.serializers.python import Deserializer as PythonDeserializer from google.app...
ajibawa-2023/Python-Code-Large/train/row_84423
40
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_84423:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0323, 0.0484, 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_84423:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84423:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84423:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84423:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" XML serializer. """ from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.serializers import base from google.appengine._internal.django.db import models, DEFAULT_DB_ALIAS from google.appengine._internal.django.utils.xmlutils import SimplerXMLGenerator from google....
ajibawa-2023/Python-Code-Large/train/row_84424
161
295
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84424:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0068, 0.0102, 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_84424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84424:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84424:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84424:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.serializers import base ...
ajibawa-2023/Python-Code-Large/train/row_84425
80
142
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84425:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0211, 0.0352, 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_84425:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84425:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84425:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84425:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from google.appengine._internal.django.db import models from google.appengine._internal.django.utils.encoding import smart_str, smart_unicode from google.appengine._internal.django.utils import datetime_safe class Seriali...
ajibawa-2023/Python-Code-Large/train/row_84426
82
172
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84426:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0116, 0.0174, 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_84426:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84426:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84426:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84426:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Interfaces for serializing Django objects. Usage:: from google.appengine._internal.django.core import serializers json = serializers.serialize("json", some_query_set) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIAL...
ajibawa-2023/Python-Code-Large/train/row_84427
54
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84427:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0769, 0.1453, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84427:Try_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84427:Import_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84427:Try_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84427:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" A set of request processors that return dictionaries to be merged into a template context. Each function takes the request object as its only parameter and returns a dictionary to add to the context. These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by RequestContext. """ from google.appe...
ajibawa-2023/Python-Code-Large/train/row_84428
54
102
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84428:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0441, 0.0784, 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_84428:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84428:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84428:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84428:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code...
import mimetypes import os import random import time from email import Charset, Encoders from email.MIMEText import MIMEText from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.Header import Header from email.Utils import formatdate, getaddresses, formataddr from google.appengi...
ajibawa-2023/Python-Code-Large/train/row_84429
187
320
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84429:Import_L1_C0", "label": "mimetypes import mimetypes", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 0, 0.66, 0.0, 583, 0, 1, 0, 0, 583, 0, 0], "semantic": {"name": "mimetypes", "arg_names": [], "import_names": ["mime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84429:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84429:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84429:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84429:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Email message and email sending related helper functions. """ import socket # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of # seconds, which slows down the restart of the server. class CachedDnsName(object): def __str__(self): return self.get_fqdn() def get_fqdn(sel...
ajibawa-2023/Python-Code-Large/train/row_84430
10
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84430:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.1053, 0.1579, 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_84430:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84430:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84430:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84430:Return_L12_C8"}, {"f": "ajibawa-2023/Python-...
""" Dummy email backend that does nothing. """ from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def send_messages(self, email_messages): return len(email_messages)
ajibawa-2023/Python-Code-Large/train/row_84431
5
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_84431:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.2222, 0.3333, 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_84431:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84431:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84431:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84431:Return_L9_C8"}]
""" Email backend that writes messages to console instead of sending them. """ import sys import threading from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): self.stream = kwargs.pop('stream', sy...
ajibawa-2023/Python-Code-Large/train/row_84432
27
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84432:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0541, 0.0811, 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_84432:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84432:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84432:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84432:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
"""SMTP email backend class.""" import smtplib import socket import threading from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend from google.appengine._internal.django.core.mail.utils import DNS_NAME from google.appengine._...
ajibawa-2023/Python-Code-Large/train/row_84433
72
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84433:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0092, 0.0092, 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_84433:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84433:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84433:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84433:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""Base email backend class.""" class BaseEmailBackend(object): """ Base class for email backend implementations. Subclasses must at least overwrite send_messages(). """ def __init__(self, fail_silently=False, **kwargs): self.fail_silently = fail_silently def open(self): """Op...
ajibawa-2023/Python-Code-Large/train/row_84434
11
39
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84434:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0256, 0.0256, 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_84434:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84434:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84434:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84434:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# Mail backends shipped with Django.
ajibawa-2023/Python-Code-Large/train/row_84435
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
""" Backend for test environment. """ from google.appengine._internal.django.core import mail from google.appengine._internal.django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): """A email backend for use during test sessions. The test connection stores email messages...
ajibawa-2023/Python-Code-Large/train/row_84436
13
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84436:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0833, 0.125, 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_84436:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84436:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84436:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84436:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os from pprint import pformat from google.appengine._internal.django import http from google.appengine._internal.django.core import signals from google.appengine._internal.django.core.handlers.base import BaseHandler from google.appengine._internal.django.core.urlresolvers import set_script_prefix from google.a...
ajibawa-2023/Python-Code-Large/train/row_84439
136
228
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84439:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0044, 0.0044, 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_84439:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84439:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84439:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84439:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-...
import hotshot, time, os from google.appengine._internal.django.core.handlers.modpython import ModPythonHandler PROFILE_DATA_DIR = "/var/log/cmsprofile" def handler(req): ''' Handler that uses hotshot to store profile data. Stores profile data in PROFILE_DATA_DIR. Since hotshot has no way (that I kn...
ajibawa-2023/Python-Code-Large/train/row_84440
9
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84440:Import_L1_C0", "label": "hotshot import hotshot, time, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 0, 0.66, 0.0, 974, 0, 3, 0, 0, 974, 0, 0], "semantic": {"name": "hotshot", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84440:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84440:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84440:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84440:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from threading import Lock from pprint import pformat try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from google.appengine._internal.django import http from google.appengine._internal.django.core import signals from google.appengine._internal.django.core.handlers import b...
ajibawa-2023/Python-Code-Large/train/row_84442
142
265
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84442:ImportFrom_L1_C0", "label": "from threading import Lock", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0038, 0, 0.66, 0.0, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "threading", "arg_names": [], "import_names": ["Lo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84442:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84442:ImportFrom_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84442:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84442:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from google.appengine._internal.django.dispatch import Signal request_started = Signal() request_finished = Signal() got_request_exception = Signal(providing_args=["request"])
ajibawa-2023/Python-Code-Large/train/row_84444
4
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84444:ImportFrom_L1_C0", "label": "from google.appengine._internal.django.dispatch import Signal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 20, 0, 1, 0, 0, 20, 0, 0], "semantic": {"name": "google.appengine._in...
[]
from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): self.object_list = object_list self.per_pa...
ajibawa-2023/Python-Code-Large/train/row_84445
76
120
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84445:ImportFrom_L1_C0", "label": "from math import ceil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["ceil"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84445:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84445:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84445:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_84445:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-...
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
ajibawa-2023/Python-Code-Large/train/row_84448
7
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84448:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.2292, 0.4167, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84448:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84448:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84448:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84448:ImportFrom_L19_C4"}, {"f": "ajibawa-2023/Python-...
""" Global Django exception and warning classes. """ class DjangoRuntimeWarning(RuntimeWarning): pass class ObjectDoesNotExist(Exception): "The requested object does not exist" silent_variable_failure = True class MultipleObjectsReturned(Exception): "The query returned multiple objects when only one w...
ajibawa-2023/Python-Code-Large/train/row_84450
51
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_84450:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.023, 0.0345, 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_84450:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84450:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84450:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84450:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from optparse import make_option from google.appengine._internal.django.core.management.base import AppCommand from google.appengine._internal.django.core.management.sql import sql_all from google.appengine._internal.django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the CREA...
ajibawa-2023/Python-Code-Large/train/row_84451
10
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84451:ImportFrom_L1_C0", "label": "from optparse import make_option", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84451:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84451:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84451:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84451:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import os from google.appengine._internal.django.core.management.base import NoArgsCommand from optparse import make_option class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--plain', action='store_true', dest='plain', help='Tells Django to use plain Python,...
ajibawa-2023/Python-Code-Large/train/row_84453
35
69
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84453:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 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_84453:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84453:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84453:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84453:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import codecs import os import sys from optparse import make_option from google.appengine._internal.django.core.management.base import BaseCommand, CommandError def has_bom(fn): f = open(fn, 'r') sample = f.read(4) return sample[:3] == '\xef\xbb\xbf' or sample.startswith(codecs.BOM_UTF16_LE) or sample.star...
ajibawa-2023/Python-Code-Large/train/row_84454
40
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_84454:Import_L1_C0", "label": "codecs import codecs", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 220, 0, 1, 0, 0, 220, 0, 0], "semantic": {"name": "codecs", "arg_names": [], "import_names": ["codecs"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_84454:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84454:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_84454:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_84454:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-L...