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
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87530
25
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_87530:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.3191, 0.0213, 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_87530:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87530:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87530:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87530:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87531
287
555
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87531:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.027, 0.0018, 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_87531:FunctionDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87531:Expr_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87531:FunctionDef_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87531:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87532
82
211
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87532:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0711, 0.0047, 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_87532:ClassDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87532:Expr_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87532:ClassDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87532:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# Copyright 2013 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87533
169
707
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87533:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0212, 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_87533:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87533:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87533:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87533:Return_L38_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright 2013 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87534
18
128
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87534:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1172, 0.0078, 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_87534:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87534:Expr_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87534:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87534:FunctionDef_L21_C2"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87535
105
277
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87535:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0542, 0.0036, 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_87535:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87535:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87535:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87535:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87536
3
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_87536:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.75, 0.05, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87537
3
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_87537:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.7895, 0.0526, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[]
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87538
86
248
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87538:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0605, 0.004, 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_87538:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87538:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87538:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87538:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87539
43
84
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87539:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1786, 0.0119, 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_87539:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87539:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87539:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87539:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87540
24
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87540:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1974, 0.0132, 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_87540:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87540:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87540:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87540:For_L27_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87541
99
235
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87541:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0638, 0.0043, 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_87541:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87541:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87541:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87541:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Co...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87542
75
236
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87542:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0636, 0.0042, 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_87542:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87542:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87542:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87542:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Co...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87544
163
344
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87544:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0538, 0.0233, 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_87544:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87544:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87544:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87544:FunctionDef_L57_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87546
611
1,059
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87546:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0142, 0.0009, 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_87546:ClassDef_L116_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87546:Expr_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87546:ClassDef_L116_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87546:FunctionDef_L120_C4"}, {"f": "ajibawa-2023/Python-C...
# Copyright 2013 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87548
759
1,284
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87548:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0117, 0.0008, 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_87548:FunctionDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87548:Expr_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87548:FunctionDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87548:Assign_L69_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87549
107
229
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87549:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0655, 0.0044, 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_87549:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87549:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87549:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87549:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87550
82
211
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87550:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0711, 0.0047, 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_87550:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87550:If_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87550:If_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87550:Return_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
#!/usr/bin/python # Copyright 2014 Google Inc. All Rights Reserved. # # 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...
ajibawa-2023/Python-Code-Large/train/row_87551
134
232
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87551:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0733, 0.0043, 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_87551:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87551:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87551:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87551:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87552
114
277
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87552:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0542, 0.0036, 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_87552:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87552:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87552:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87552:If_L63_C8"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: utf-8; -*- # Copyright 2014 Google Inc. All Rights Reserved. # # 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 requi...
ajibawa-2023/Python-Code-Large/train/row_87553
28
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_87553:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 16], "level": 0, "parent": null, "vector": [8, 0, 0.1127, 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_87553:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87553:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87553:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87553:Return_L96_C4"}, {"f": "ajibawa-2023/Python-Co...
# Copyright 2013 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87554
103
186
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87554:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0806, 0.0054, 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_87554:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87554:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87554:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87554:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Copyright 2012 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87555
387
655
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87555:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0229, 0.0015, 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_87555:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87555:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87555:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87555:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87556
47
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87556:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.12, 0.008, 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_87556:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87556:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87556:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87556:ClassDef_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""Classes to build sanitized HTML.""" __author__ = 'John Orr (jorr@google.com)' import cgi import re def escape(strg): return cgi.escape(strg, quote=1).replace("'", ''').replace('`', '`') class Node(object): """Base class for the sanitizing module.""" def __init__(self): self._parent...
ajibawa-2023/Python-Code-Large/train/row_87557
166
303
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87557:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0033, 0.0033, 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_87557:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87557:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87557:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87557:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # 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 requir...
ajibawa-2023/Python-Code-Large/train/row_87558
1,150
2,748
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87558:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 116], "level": 0, "parent": null, "vector": [8, 0, 0.024, 0.0368, 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_87558:FunctionDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87558:Assign_L168_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87558:FunctionDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87558:Assign_L169_C4"}, {"f": "ajibawa-2023/Pytho...
# Copyright 2014 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87559
334
546
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87559:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0275, 0.0018, 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_87559:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87559:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87559:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87559:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code...
# Copyright 2013 Google Inc. All Rights Reserved. # # 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 or ...
ajibawa-2023/Python-Code-Large/train/row_87560
188
441
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87560:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.034, 0.0023, 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_87560:ClassDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87560:Expr_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87560:ClassDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87560:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) from guidata.gettext_helpers import do_compile if __name__ == "__main__": do_compile("spyderlib") do_compile("p_pylint", "spyderplugins") do_c...
ajibawa-2023/Python-Code-Large/train/row_87561
5
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_87561:ImportFrom_L7_C0", "label": "from guidata.gettext_helpers import do_compile", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.5833, 0.0833, 0, 0.66, 0.0, 814, 0, 1, 0, 0, 814, 0, 0], "semantic": {"name": "guidata.gettext_helpers", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87561:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87561:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87561:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87561:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87561...
import rope.base.evaluate from rope.base import change, pyobjects, exceptions, pynames, worder, codeanalyze from rope.refactor import sourceutils, importutils, functionutils, suites def create_generate(kind, project, resource, offset): """A factory for creating `Generate` objects `kind` can be 'variable', 'f...
ajibawa-2023/Python-Code-Large/train/row_87562
259
355
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87562:Import_L1_C0", "label": "rope.base.evaluate import rope.base.evaluate", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "rope.base.evaluate", "arg_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87562:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87562:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87562:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87562:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-La...
"""Fix the name of modules This module is useful when you want to rename many of the modules in your project. That can happen specially when you want to change their naming style. For instance:: fixer = FixModuleNames(project) changes = fixer.get_changes(fixer=str.lower) project.do(changes) Here it renames a...
ajibawa-2023/Python-Code-Large/train/row_87563
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_87563:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 17], "level": 0, "parent": null, "vector": [8, 0, 0.1304, 0.2464, 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_87563:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87563:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87563:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87563:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-...
import rope.base.codeanalyze import rope.base.evaluate import rope.base.pyobjects from rope.base import taskhandle, exceptions, worder from rope.contrib import fixsyntax from rope.refactor import occurrences def find_occurrences(project, resource, offset, unsure=False, resources=None, in_hierarch...
ajibawa-2023/Python-Code-Large/train/row_87564
70
110
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87564:Import_L1_C0", "label": "rope.base.codeanalyze import rope.base.codeanalyze", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0091, 0.0091, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "rope.base.codeanalyze", "ar...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87564:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87564:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87564:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87564:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-L...
"""For performing many refactorings as a single command `changestack` module can be used to perform many refactorings on top of each other as one bigger command. It can be used like:: stack = ChangeStack(project, 'my big command') #.. stack.push(refactoring1.get_changes()) #.. stack.push(refactoring2.get_...
ajibawa-2023/Python-Code-Large/train/row_87565
25
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87565:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1923, 0.3654, 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_87565:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87565:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87565:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87565:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-...
import re from rope.base import (exceptions, pynames, resourceobserver, taskhandle, pyobjects, builtins, resources) from rope.refactor import importutils class AutoImport(object): """A class for finding the module that provides a name This class maintains a cache of global names in py...
ajibawa-2023/Python-Code-Large/train/row_87566
144
217
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87566:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 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_87566:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87566:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87566:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87566:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""Finding bad name and attribute accesses `find_errors` function can be used to find possible bad name and attribute accesses. As an example:: errors = find_errors(project, project.get_resource('mod.py')) for error in errors: print '%s: %s' % (error.lineno, error.error) prints possible errors for ``mod.p...
ajibawa-2023/Python-Code-Large/train/row_87567
48
91
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87567:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.2747, 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_87567:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87567:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87567:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87567:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code...
"""rope IDE tools package This package contains modules that can be used in IDEs but do not depend on the UI. So these modules will be used by `rope.ui` modules. """
ajibawa-2023/Python-Code-Large/train/row_87569
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_87569:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.5714, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
"""Provides classes for persisting `PyObject`\s""" import os import re import rope.base.builtins from rope.base import exceptions class PyObjectToTextual(object): """For transforming `PyObject` to textual form This can be used for storing `PyObjects` in files. Use `TextualToPyObject` for converting bac...
ajibawa-2023/Python-Code-Large/train/row_87572
203
285
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87572:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0035, 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_87572:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87572:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87572:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87572:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-La...
import UserDict class ObjectDB(object): def __init__(self, db, validation): self.db = db self.validation = validation self.observers = [] self.files = db.files def validate_files(self): for file in list(self.files): if not self.validation.is_file_valid(fil...
ajibawa-2023/Python-Code-Large/train/row_87573
108
175
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87573:Import_L1_C0", "label": "UserDict import UserDict", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0057, 0.0057, 0, 0.66, 0.0, 351, 0, 1, 0, 0, 351, 0, 0], "semantic": {"name": "UserDict", "arg_names": [], "import_names": ["UserDic...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87573:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87573:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87573:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87573:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
import warnings from rope.base import exceptions, resourceobserver from rope.base.oi import objectdb, memorydb, transform class ObjectInfoManager(object): """Stores object information It uses an instance of `objectdb.ObjectDB` for storing information. """ def __init__(self, project): s...
ajibawa-2023/Python-Code-Large/train/row_87574
174
232
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87574:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0043, 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_87574:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87574:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87574:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87574:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""A module for inferring objects For more information see the documentation in `rope.base.oi` package. """ import rope.base.builtins import rope.base.pynames import rope.base.pyobjects from rope.base import evaluate, utils, arguments _ignore_inferred = utils.ignore_exception( rope.base.pyobjects.IsBeingInferre...
ajibawa-2023/Python-Code-Large/train/row_87575
134
186
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87575:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0188, 0.0323, 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_87575:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87575:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87575:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87575:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code...
import rope.base.ast import rope.base.oi.soi import rope.base.pynames from rope.base import pyobjects, evaluate, astutils, arguments def analyze_module(pycore, pymodule, should_analyze, search_subscopes, followed_calls): """Analyze `pymodule` for static object inference Analyzes scopes for...
ajibawa-2023/Python-Code-Large/train/row_87576
97
136
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87576:Import_L1_C0", "label": "rope.base.ast import rope.base.ast", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0074, 0.0074, 0, 0.66, 0.0, 442, 0, 1, 0, 0, 442, 0, 0], "semantic": {"name": "rope.base.ast", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87576:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87576:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87576:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87576:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
"""Rope object analysis and inference package Rope makes some simplifying assumptions about a python program. It assumes that a program only performs assignments and function calls. Tracking assignments is simple and `PyName` objects handle that. The main problem is function calls. Rope uses these two approaches fo...
ajibawa-2023/Python-Code-Large/train/row_87577
1
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87577:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 38], "level": 0, "parent": null, "vector": [8, 0, 0.5132, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[]
from rope.base.oi import objectdb class MemoryDB(objectdb.FileDict): def __init__(self, project, persist=None): self.project = project self._persist = persist self.files = self self._load_files() self.project.data_files.add_write_hook(self.write) def _load_files(self)...
ajibawa-2023/Python-Code-Large/train/row_87578
67
106
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87578:ImportFrom_L1_C0", "label": "from rope.base.oi import objectdb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0094, 0, 0.66, 0.0, 897, 0, 1, 0, 0, 897, 0, 0], "semantic": {"name": "rope.base.oi", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87578:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87578:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87578:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87578:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
def __rope_start_everything(): import os import sys import socket import cPickle as pickle import marshal import inspect import types import threading class _MessageSender(object): def send_data(self, data): pass class _SocketSender(_MessageSender): ...
ajibawa-2023/Python-Code-Large/train/row_87579
151
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_87579:FunctionDef_L2_C0", "label": "__rope_start_everything", "type": "function", "loc": [2, 206], "level": 0, "parent": null, "vector": [2, 0, 0.4952, 0.9762, 0, 0.66, 0.0, 940, 0, 0, 1, 0, 0, 0, 83], "semantic": {"name": "__rope_start_everything", "arg_names": [], "im...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87579:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87579:Import_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87579:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87579:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import warnings def saveit(func): """A decorator that caches the return value of a function""" name = '_' + func.__name__ def _wrapper(self, *args, **kwds): if not hasattr(self, name): setattr(self, name, func(self, *args, **kwds)) return getattr(self, name) return _wrappe...
ajibawa-2023/Python-Code-Large/train/row_87580
60
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87580:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0128, 0.0128, 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_87580:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87580:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87580:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87580:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from rope.base import exceptions, change, taskhandle class History(object): """A class that holds project history""" def __init__(self, project, maxundos=None): self.project = project self._undo_list = [] self._redo_list = [] self._maxundos = maxundos self._load_histor...
ajibawa-2023/Python-Code-Large/train/row_87582
155
235
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87582:ImportFrom_L1_C0", "label": "from rope.base import exceptions, change, taskhandle", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0043, 0, 0.66, 0.0, 632, 0, 3, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87582:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87582:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87582:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87582:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
"""A few useful functions for using rope as a library""" import os.path import rope.base.project import rope.base.pycore from rope.base import taskhandle def path_to_resource(project, path, type=None): """Get the resource at path You only need to specify `type` if `path` does not exist. It can be eithe...
ajibawa-2023/Python-Code-Large/train/row_87583
42
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_87583:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0154, 0.0154, 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_87583:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87583:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87583:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87583:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import os class ResourceObserver(object): """Provides the interface for observing resources `ResourceObserver`\s can be registered using `Project. add_observer()`. But most of the time `FilteredResourceObserver` should be used. `ResourceObserver`\s report all changes passed to them and they don...
ajibawa-2023/Python-Code-Large/train/row_87584
180
271
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87584:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 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_87584:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87584:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87584:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87584:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import rope.base.builtins import rope.base.pynames import rope.base.pyobjects from rope.base import ast, astutils, exceptions, pyobjects, arguments, worder BadIdentifierError = exceptions.BadIdentifierError def eval_location(pymodule, offset): """Find the pyname at the offset""" return eval_location2(pymodul...
ajibawa-2023/Python-Code-Large/train/row_87585
220
317
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87585:Import_L1_C0", "label": "rope.base.builtins import rope.base.builtins", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 74, 0, 1, 0, 0, 74, 0, 0], "semantic": {"name": "rope.base.builtins", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87585:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87585:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87585:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87585:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import rope.base.pyobjects from rope.base import exceptions, utils class PyName(object): """References to `PyObject`\s inside python programs""" def get_object(self): """Return the `PyObject` object referenced by this `PyName`""" def get_definition_location(self): """Return a (module, li...
ajibawa-2023/Python-Code-Large/train/row_87586
126
199
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87586:Import_L1_C0", "label": "rope.base.pyobjects import rope.base.pyobjects", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.005, 0.005, 0, 0.66, 0.0, 626, 0, 1, 0, 0, 626, 0, 0], "semantic": {"name": "rope.base.pyobjects", "arg_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87586:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87586:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87586:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87586:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
class RopeError(Exception): """Base exception for rope""" class ResourceNotFoundError(RopeError): """Resource not found exception""" class RefactoringError(RopeError): """Errors for performing a refactoring""" class InterruptedTaskError(RopeError): """The task has been interrupted""" class Histo...
ajibawa-2023/Python-Code-Large/train/row_87587
31
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_87587:ClassDef_L1_C0", "label": "RopeError", "type": "class", "loc": [1, 2], "level": 0, "parent": null, "vector": [3, 0, 0.0246, 0.0328, 0, 0.66, 0.0, 367, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "RopeError", "arg_names": [], "import_names": [], "rhs_call_name": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87587:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87587:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87587:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87587:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
import bisect import rope.base.simplify def get_name_at(resource, offset): source_code = resource.read() word_finder = Worder(source_code) return word_finder.get_word_at(offset) class Worder(object): """A class for finding boundaries of words and expressions Note that in these methods, offset ...
ajibawa-2023/Python-Code-Large/train/row_87588
382
509
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87588:Import_L1_C0", "label": "bisect import bisect", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.002, 0.002, 0, 0.66, 0.0, 325, 0, 1, 0, 0, 325, 0, 0], "semantic": {"name": "bisect", "arg_names": [], "import_names": ["bisect"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87588:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87588:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87588:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87588:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L...
"""A module to ease code analysis This module is here to help source code analysis. """ import re from rope.base import codeanalyze, utils @utils.cached(7) def real_code(source): """Simplify `source` for analysis It replaces: * comments with spaces * strs with a new str filled with spaces * im...
ajibawa-2023/Python-Code-Large/train/row_87589
28
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87589:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0455, 0.0727, 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_87589:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87589:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87589:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87589:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code...
import warnings from rope.base import exceptions class TaskHandle(object): def __init__(self, name='Task', interrupts=True): """Construct a TaskHandle If `interrupts` is `False` the task won't be interrupted by calling `TaskHandle.stop()`. """ self.name = name s...
ajibawa-2023/Python-Code-Large/train/row_87590
76
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87590:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 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_87590:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87590:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87590:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87590:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L...
import rope.base.evaluate from rope.base import ast class Arguments(object): """A class for evaluating parameters passed to a function You can use the `create_arguments` factory. It handles implicit first arguments. """ def __init__(self, args, scope): self.args = args self.sco...
ajibawa-2023/Python-Code-Large/train/row_87592
74
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_87592:Import_L1_C0", "label": "rope.base.evaluate import rope.base.evaluate", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0092, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "rope.base.evaluate", "arg_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87592:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87592:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87592:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87592:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import cPickle as pickle import os import shutil import sys import warnings import rope.base.fscommands from rope.base import exceptions, taskhandle, prefs, history, pycore, utils from rope.base.resourceobserver import * from rope.base.resources import File, Folder, _ResourceMatcher class _Project(object): def ...
ajibawa-2023/Python-Code-Large/train/row_87593
281
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_87593:Import_L1_C0", "label": "cPickle import pickle", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0023, 0.0023, 0, 0.66, 0.0, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "cPickle", "arg_names": [], "import_names": ["pickle"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87593:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87593:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87593:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87593:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-...
# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # No...
ajibawa-2023/Python-Code-Large/train/row_87596
19
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87596:FunctionDef_L4_C0", "label": "set_prefs", "type": "function", "loc": [4, 80], "level": 0, "parent": null, "vector": [2, 0, 0.4941, 0.9059, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "set_prefs", "arg_names": ["prefs"], "import_names": [], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87596:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87596:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87596:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87596:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-La...
"""This module trys to support builtin types and functions.""" import inspect import rope.base.evaluate from rope.base import pynames, pyobjects, arguments, utils class BuiltinModule(pyobjects.AbstractModule): def __init__(self, name, pycore=None, initial={}): super(BuiltinModule, self).__init__() ...
ajibawa-2023/Python-Code-Large/train/row_87597
485
728
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87597:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0014, 0.0014, 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_87597:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87597:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87597:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87597:Expr_L11_C8"}, {"f": "ajibawa-2023/Python-Cod...
"""Base rope package This package contains rope core modules that are used by other modules and packages. """ __all__ = ['project', 'libutils', 'exceptions']
ajibawa-2023/Python-Code-Large/train/row_87598
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87598:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.4375, 0.75, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[]
from rope.base import ast def get_name_levels(node): """Return a list of ``(name, level)`` tuples for assigned names The `level` is `None` for simple assignments and is a list of numbers for tuple assignments for example in:: a, (b, c) = x The levels for for `a` is ``[0]``, for `b` is ``[1, 0...
ajibawa-2023/Python-Code-Large/train/row_87599
37
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_87599:ImportFrom_L1_C0", "label": "from rope.base import ast", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 632, 0, 1, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_names": [], "import_names": ["a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87599:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87599:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87599:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87599:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-La...
"""Project file system commands. This modules implements file system operations used by rope. Different version control systems can be supported by implementing the interface provided by `FileSystemCommands` class. See `SubversionCommands` and `MercurialCommands` for example. """ import os import shutil import subp...
ajibawa-2023/Python-Code-Large/train/row_87600
173
267
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87600:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0169, 0.03, 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_87600:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87600:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87600:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87600:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Co...
from rope.base.fscommands import _decode_data from rope.base import ast, exceptions, utils class PyObject(object): def __init__(self, type_): if type_ is None: type_ = self self.type = type_ def get_attributes(self): if self.type is self: return {} ret...
ajibawa-2023/Python-Code-Large/train/row_87601
182
311
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87601:ImportFrom_L1_C0", "label": "from rope.base.fscommands import _decode_data", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 851, 0, 1, 0, 0, 851, 0, 0], "semantic": {"name": "rope.base.fscommands", "arg_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87601:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87601:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87601:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87601:If_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os import sys from rope.base import utils def _stdlib_path(): import inspect return os.path.dirname(inspect.getsourcefile(inspect)) @utils.cached(1) def standard_modules(): return python_modules() | dynload_modules() @utils.cached(1) def python_modules(): result = set() lib_path = _stdli...
ajibawa-2023/Python-Code-Large/train/row_87602
30
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87602:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 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_87602:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87602:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87602:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87602:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import bisect import difflib import sys import warnings import rope.base.oi.doa import rope.base.oi.objectinfo import rope.base.oi.soa from rope.base import ast, exceptions, taskhandle, utils, stdmods from rope.base.exceptions import ModuleNotFoundError from rope.base.pyobjectsdef import PyModule, PyPackage, PyClass i...
ajibawa-2023/Python-Code-Large/train/row_87603
280
407
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87603:Import_L1_C0", "label": "bisect import bisect", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0025, 0.0025, 0, 0.66, 0.0, 325, 0, 1, 0, 0, 325, 0, 0], "semantic": {"name": "bisect", "arg_names": [], "import_names": ["bisect"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87603:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87603:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87603:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87603:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-...
import rope.base.builtins import rope.base.codeanalyze import rope.base.pynames from rope.base import ast, exceptions, utils class Scope(object): def __init__(self, pycore, pyobject, parent_scope): self.pycore = pycore self.pyobject = pyobject self.parent = parent_scope def get_names...
ajibawa-2023/Python-Code-Large/train/row_87604
205
313
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87604:Import_L1_C0", "label": "rope.base.builtins import rope.base.builtins", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 74, 0, 1, 0, 0, 74, 0, 0], "semantic": {"name": "rope.base.builtins", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87604:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87604:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87604:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87604:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
import rope.base.oi.soi from rope.base import pynames from rope.base.pynames import * class AssignedName(pynames.AssignedName): def __init__(self, lineno=None, module=None, pyobject=None): self.lineno = lineno self.module = module self.assignments = [] self.pyobject = _Inferred(se...
ajibawa-2023/Python-Code-Large/train/row_87605
38
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87605:Import_L1_C0", "label": "rope.base.oi.soi import rope.base.oi.soi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 666, 0, 1, 0, 0, 666, 0, 0], "semantic": {"name": "rope.base.oi.soi", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87605:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87605:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87605:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87605:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code...
class Prefs(object): def __init__(self): self.prefs = {} self.callbacks = {} def set(self, key, value): """Set the value of `key` preference to `value`.""" if key in self.callbacks: self.callbacks[key](value) else: self.prefs[key] = value de...
ajibawa-2023/Python-Code-Large/train/row_87606
24
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87606:ClassDef_L1_C0", "label": "Prefs", "type": "class", "loc": [1, 41], "level": 0, "parent": null, "vector": [3, 0, 0.5122, 1.0, 0, 0.66, 0.0, 772, 0, 7, 0, 0, 186, 0, 5], "semantic": {"name": "Prefs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87606:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87606:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87606:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87606:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code...
"""rope, a python refactoring library""" INFO = __doc__ VERSION = '0.9.3' COPYRIGHT = """\ Copyright (C) 2006-2010 Ali Gholami Rudi Copyright (C) 2009-2010 Anton Gritsay This program is free software; you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Softw...
ajibawa-2023/Python-Code-Large/train/row_87608
4
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_87608:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0588, 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...
[]
from rope.base import pynames, evaluate, exceptions, worder from rope.refactor.rename import Rename class LocalToField(object): def __init__(self, project, resource, offset): self.project = project self.pycore = project.pycore self.resource = resource self.offset = offset def...
ajibawa-2023/Python-Code-Large/train/row_87609
30
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_87609:ImportFrom_L1_C0", "label": "from rope.base import pynames, evaluate, exceptions\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.02, 0, 0.66, 0.0, 632, 0, 4, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87609:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87609:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87609:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87609:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code...
import re import rope.base.exceptions import rope.refactor.functionutils from rope.base import (pynames, pyobjects, codeanalyze, taskhandle, evaluate, worder, utils) from rope.base.change import ChangeSet, ChangeContents from rope.refactor import (occurrences, rename, sourceutils, ...
ajibawa-2023/Python-Code-Large/train/row_87610
377
553
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87610:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0018, 0.0018, 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_87610:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87610:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87610:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87610:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code...
import rope.refactor.importutils from rope.base.change import ChangeSet, ChangeContents, MoveResource, CreateFolder class ModuleToPackage(object): def __init__(self, project, resource): self.project = project self.pycore = project.pycore self.resource = resource def get_changes(self)...
ajibawa-2023/Python-Code-Large/train/row_87611
26
32
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87611:Import_L1_C0", "label": "rope.refactor.importutils import rope.refactor.importutils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 488, 0, 1, 0, 0, 488, 0, 0], "semantic": {"name": "rope.refactor.impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87611:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87611:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87611:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87611:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code...
import warnings from rope.base import exceptions, pyobjects, pynames, taskhandle, evaluate, worder, codeanalyze from rope.base.change import ChangeSet, ChangeContents, MoveResource from rope.refactor import occurrences, sourceutils class Rename(object): """A class for performing rename refactoring It can re...
ajibawa-2023/Python-Code-Large/train/row_87612
125
216
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87612:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 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_87612:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87612:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87612:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87612:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import rope.base.exceptions import rope.base.pyobjects from rope.base import taskhandle, evaluate from rope.base.change import (ChangeSet, ChangeContents) from rope.refactor import rename, occurrences, sourceutils, importutils class IntroduceFactory(object): def __init__(self, project, resource, offset): ...
ajibawa-2023/Python-Code-Large/train/row_87613
79
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87613:Import_L1_C0", "label": "rope.base.exceptions import rope.base.exceptions", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 0, 0.66, 0.0, 296, 0, 1, 0, 0, 296, 0, 0], "semantic": {"name": "rope.base.exceptions", "arg_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87613:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87613:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87613:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87613:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
import rope.base.change from rope.base import exceptions, evaluate, worder, codeanalyze from rope.refactor import functionutils, sourceutils, occurrences class IntroduceParameter(object): """Introduce parameter refactoring This refactoring adds a new parameter to a function and replaces references to an ...
ajibawa-2023/Python-Code-Large/train/row_87614
47
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87614:Import_L1_C0", "label": "rope.base.change import rope.base.change", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0105, 0, 0.66, 0.0, 682, 0, 1, 0, 0, 682, 0, 0], "semantic": {"name": "rope.base.change", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87614:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87614:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87614:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87614:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import collections import re import warnings from rope.base import ast, codeanalyze, exceptions def get_patched_ast(source, sorted_children=False): """Adds ``region`` and ``sorted_children`` fields to nodes Adds ``sorted_children`` field only if `sorted_children` is True. """ return patch_ast(ast.p...
ajibawa-2023/Python-Code-Large/train/row_87615
558
732
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87615:Import_L1_C0", "label": "collections import collections", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0014, 0.0014, 0, 0.66, 0.0, 193, 0, 1, 0, 0, 193, 0, 0], "semantic": {"name": "collections", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87615:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87615:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87615:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87615:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from rope.base import pynames, taskhandle, evaluate, exceptions, worder, utils from rope.base.change import ChangeSet, ChangeContents from rope.refactor import sourceutils, occurrences class EncapsulateField(object): def __init__(self, project, resource, offset): self.pycore = project.pycore self...
ajibawa-2023/Python-Code-Large/train/row_87616
136
202
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87616:ImportFrom_L1_C0", "label": "from rope.base import pynames, taskhandle, evaluate\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.005, 0.005, 0, 0.66, 0.0, 632, 0, 6, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87616:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87616:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87616:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87616:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code...
import warnings from rope.base import pyobjects, exceptions, change, evaluate, codeanalyze from rope.refactor import sourceutils, occurrences, rename class MethodObject(object): def __init__(self, project, resource, offset): self.pycore = project.pycore this_pymodule = self.pycore.resource_to_py...
ajibawa-2023/Python-Code-Large/train/row_87617
59
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_87617:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 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_87617:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87617:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87617:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87617:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
import rope.base.exceptions import rope.base.pyobjects from rope.base import worder class DefinitionInfo(object): def __init__(self, function_name, is_method, args_with_defaults, args_arg, keywords_arg): self.function_name = function_name self.is_method = is_method self.a...
ajibawa-2023/Python-Code-Large/train/row_87618
152
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_87618:Import_L1_C0", "label": "rope.base.exceptions import rope.base.exceptions", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 0, 0.66, 0.0, 296, 0, 1, 0, 0, 296, 0, 0], "semantic": {"name": "rope.base.exceptions", "arg_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87618:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87618:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87618:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87618:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
from rope.base import ast, evaluate, builtins, pyobjects from rope.refactor import patchedast, occurrences class Wildcard(object): def get_name(self): """Return the name of this wildcard""" def matches(self, suspect, arg): """Return `True` if `suspect` matches this wildcard""" class Suspec...
ajibawa-2023/Python-Code-Large/train/row_87619
129
176
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87619:ImportFrom_L1_C0", "label": "from rope.base import ast, evaluate, builtins\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0057, 0.0057, 0, 0.66, 0.0, 632, 0, 4, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87619:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87619:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87619:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87619:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L...
import copy import rope.base.exceptions from rope.base import pyobjects, taskhandle, evaluate, worder, codeanalyze, utils from rope.base.change import ChangeContents, ChangeSet from rope.refactor import occurrences, functionutils class ChangeSignature(object): def __init__(self, project, resource, offset): ...
ajibawa-2023/Python-Code-Large/train/row_87620
194
342
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87620:Import_L1_C0", "label": "copy import copy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0029, 0.0029, 0, 0.66, 0.0, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87620:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87620:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87620:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87620:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C...
import warnings from rope.base import change, taskhandle, builtins, ast, codeanalyze from rope.refactor import patchedast, similarfinder, sourceutils from rope.refactor.importutils import module_imports class Restructure(object): """A class to perform python restructurings A restructuring transforms pieces ...
ajibawa-2023/Python-Code-Large/train/row_87621
166
307
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87621:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0033, 0.0033, 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_87621:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87621:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87621:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87621:FunctionDef_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""A module containing classes for move refactoring `create_move()` is a factory for creating move refactoring objects based on inputs. """ from rope.base import pyobjects, codeanalyze, exceptions, pynames, taskhandle, evaluate, worder from rope.base.change import ChangeSet, ChangeContents, MoveResource from rope.ref...
ajibawa-2023/Python-Code-Large/train/row_87622
409
625
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87622:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0056, 0.0096, 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_87622:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87622:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87622:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87622:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import re import rope.base.pynames from rope.base import pynames, pyobjects, codeanalyze, evaluate, exceptions, utils, worder class Finder(object): """For finding occurrences of a name The constructor takes a `filters` argument. It should be a list of functions that take a single argument. For each po...
ajibawa-2023/Python-Code-Large/train/row_87623
210
334
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87623:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.003, 0.003, 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_87623:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87623:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87623:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87623:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from rope.base import ast def find_visible(node, lines): """Return the line which is visible from all `lines`""" root = ast_suite_tree(node) return find_visible_for_suite(root, lines) def find_visible_for_suite(root, lines): if len(lines) == 1: return lines[0] line1 = lines[0] line2 ...
ajibawa-2023/Python-Code-Large/train/row_87624
108
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_87624:ImportFrom_L1_C0", "label": "from rope.base import ast", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.007, 0.007, 0, 0.66, 0.0, 632, 0, 1, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_names": [], "import_names": ["ast...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87624:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87624:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87624:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87624:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import rope.base.pynames from rope.base import ast, utils from rope.refactor.importutils import importinfo from rope.refactor.importutils import actions class ModuleImports(object): def __init__(self, pycore, pymodule, import_filter=None): self.pycore = pycore self.pymodule = pymodule sel...
ajibawa-2023/Python-Code-Large/train/row_87625
329
454
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87625:Import_L1_C0", "label": "rope.base.pynames import rope.base.pynames", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0022, 0.0022, 0, 0.66, 0.0, 903, 0, 1, 0, 0, 903, 0, 0], "semantic": {"name": "rope.base.pynames", "arg_names": []...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87625:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87625:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87625:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87625:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
import os import sys from rope.base import pyobjects, exceptions, stdmods from rope.refactor import occurrences from rope.refactor.importutils import importinfo class ImportInfoVisitor(object): def dispatch(self, import_): try: method_name = 'visit' + import_.import_info.__class__.__name__ ...
ajibawa-2023/Python-Code-Large/train/row_87626
253
359
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87626:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 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_87626:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87626:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87626:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87626:Try_L12_C8"}, {"f": "ajibawa-2023/Python-Code...
"""A package for handling imports This package provides tools for modifying module imports after refactorings or as a separate task. """ import rope.base.evaluate from rope.base.change import ChangeSet, ChangeContents from rope.refactor import occurrences, rename from rope.refactor.importutils import module_imports, ...
ajibawa-2023/Python-Code-Large/train/row_87627
213
299
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87627:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0117, 0.0201, 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_87627:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87627:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87627:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87627:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-...
class ImportStatement(object): """Represent an import in a module `readonly` attribute controls whether this import can be changed by import actions or not. """ def __init__(self, import_info, start_line, end_line, main_statement=None, blank_lines=0): self.start_line = st...
ajibawa-2023/Python-Code-Large/train/row_87628
118
201
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87628:ClassDef_L1_C0", "label": "ImportStatement", "type": "class", "loc": [1, 56], "level": 0, "parent": null, "vector": [3, 0, 0.1418, 0.2786, 0, 0.66, 0.0, 919, 0, 10, 0, 0, 186, 0, 4], "semantic": {"name": "ImportStatement", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87628:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87628:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87628:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87628:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
"""rope refactor package This package contains modules that perform python refactorings. Refactoring classes perform refactorings in 4 steps: 1. Collect some data for performing the refactoring and use them to construct a refactoring class. Like:: renamer = Rename(project, resource, offset) 2. Some refacto...
ajibawa-2023/Python-Code-Large/train/row_87629
4
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87629:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 47], "level": 0, "parent": null, "vector": [8, 0, 0.4364, 0.8545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
from rope.base import ast, codeanalyze def get_indents(lines, lineno): return codeanalyze.count_line_indents(lines.get_line(lineno)) def find_minimum_indents(source_code): result = 80 lines = source_code.split('\n') for line in lines: if line.strip() == '': continue resul...
ajibawa-2023/Python-Code-Large/train/row_87630
68
92
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87630:ImportFrom_L1_C0", "label": "from rope.base import ast, codeanalyze", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0109, 0.0109, 0, 0.66, 0.0, 632, 0, 2, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87630:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87630:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87630:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87630:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-L...
"""This module can be used for finding similar code""" import re import rope.refactor.wildcards from rope.base import codeanalyze, evaluate, exceptions, ast, builtins from rope.refactor import (patchedast, sourceutils, occurrences, wildcards, importutils) class BadNameInCheckError(exceptio...
ajibawa-2023/Python-Code-Large/train/row_87631
256
362
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87631:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0028, 0.0028, 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_87631:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87631:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87631:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87631:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-...
from rope.base import (change, taskhandle, evaluate, exceptions, pyobjects, pynames, ast) from rope.refactor import restructure, sourceutils, similarfinder, importutils class UseFunction(object): """Try to use a function wherever possible""" def __init__(self, project, resource, offset...
ajibawa-2023/Python-Code-Large/train/row_87632
116
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_87632:ImportFrom_L1_C0", "label": "from rope.base import change, taskhandle, evaluate\u2026", "type": "import", "loc": [1, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0088, 0.0117, 0, 0.66, 0.0, 632, 0, 7, 0, 0, 632, 0, 0], "semantic": {"name": "rope.base", "arg_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_87632:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87632:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87632:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87632:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import re from rope.base import ast, codeanalyze from rope.base.change import ChangeSet, ChangeContents from rope.base.exceptions import RefactoringError from rope.refactor import (sourceutils, similarfinder, patchedast, suites, usefunction) # Extract refactoring has lots of special cases....
ajibawa-2023/Python-Code-Large/train/row_87633
529
789
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87633:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0013, 0.0013, 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_87633:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87633:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87633:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87633:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-...
"""This module can be used for performing cross-project refactorings See the "cross-project refactorings" section of ``docs/library.txt`` file. """ from rope.base import resources, project, libutils class MultiProjectRefactoring(object): def __init__(self, refactoring, projects, addpath=True): """Crea...
ajibawa-2023/Python-Code-Large/train/row_87634
46
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87634:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0449, 0.0769, 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_87634:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87634:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87634:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87634:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Co...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Namespace Browser Plugin""" import sys from spyderlib.qt.QtGui import QStackedWidget, QGroupBox, QVBoxLayout from spyderlib.qt.QtCore import Signal ...
ajibawa-2023/Python-Code-Large/train/row_87636
127
203
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87636:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0345, 0.0049, 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_87636:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87636:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87636:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87636:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Console History Plugin""" from spyderlib.qt.QtGui import (QVBoxLayout, QFontDialog, QInputDialog, QToolButton, QMenu, QFo...
ajibawa-2023/Python-Code-Large/train/row_87638
181
277
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87638:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0253, 0.0036, 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_87638:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87638:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87638:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_87638:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Files and Directories Explorer Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyder...
ajibawa-2023/Python-Code-Large/train/row_87639
68
135
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87639:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0074, 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_87639:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87639:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87639:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87639:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Configuration dialog / Preferences""" import os, os.path as osp from spyderlib.baseconfig import _ from spyderlib.config import (get_icon, CONF, CUSTO...
ajibawa-2023/Python-Code-Large/train/row_87640
528
723
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87640:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0097, 0.0014, 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_87640:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87640:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87640:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87640:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Outline Explorer Plugin""" from spyderlib.qt.QtCore import SIGNAL, Signal import sys # For debugging purpose: STDOUT = sys.stdout # Local imports fr...
ajibawa-2023/Python-Code-Large/train/row_87641
65
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_87641:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0642, 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_87641:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87641:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87641:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87641:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Online Help Plugin""" from spyderlib.qt.QtCore import Signal import sys, os.path as osp # For debugging purpose: STDOUT = sys.stdout # Local imp...
ajibawa-2023/Python-Code-Large/train/row_87642
55
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_87642:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0729, 0.0104, 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_87642:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87642:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_87642:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_87642:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large...