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 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_80789 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80789:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 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_80789:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80789:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80789:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80789:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80790 | 7 | 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_80790:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 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_80790:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80790:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80790:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80790:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80792 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80792:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 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_80792:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80792:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80792:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80792:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80793 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80793:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 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_80793:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80793:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80793:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80793:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80794 | 46 | 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_80794:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 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_80794:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80794:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80794:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80794:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80795 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80795:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80796 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80796:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 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_80796:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80796:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80796:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80796:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_80798 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80798:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 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_80798:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80798:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80798:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80798:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80799 | 114 | 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_80799:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 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_80799:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80799:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80799:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80799:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80800 | 7 | 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_80800:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 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_80800:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80800:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80800:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80800:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80801 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80801:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 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_80801:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80801:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80801:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80801:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80803 | 55 | 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_80803:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80803:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80803:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80803:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80803:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80805 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80805:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 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_80805:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80805:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80805:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80805:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_80806 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80806:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80806:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80806:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80806:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80806:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_80807 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80807:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_80808 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80808:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 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_80808:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80808:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80808:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80808:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_80809 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80809:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 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_80809:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80809:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80809:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80809:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_80810 | 43 | 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_80810:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 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_80810:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80810:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80810:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80810:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_80812 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80812:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 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_80812:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80812:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80812:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80812:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_80813 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80813:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80813:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80813:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80813:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80813:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_80814 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80814:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80814:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80814:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80814:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80814:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_80815 | 10 | 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_80815:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 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_80815:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80815:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80815:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80815:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_80816 | 9 | 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_80816:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80816:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80816:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80816:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80816:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_80818 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80818:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 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_80818:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80818:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80818:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80818:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
# coding: utf-8
import copy
from ala_classes import SyntaxTreeNode, Token, TokenType, GlobalSymbolTable, LocalSymbolTable, TypeEnum, Type, AlaTypeCheckerError, AlaTypeError, AlaBuiltinRedefineError, AlaBuiltinFunArgumentsError, AlaGeneralSemanticError
class SemanticAnalyzer(object):
PRODUCTIONS_WITH_EXT... | ajibawa-2023/Python-Code-Large/train/row_80819 | 247 | 397 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80819:Import_L3_C0", "label": "copy import copy", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0025, 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_80819:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80819:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80819:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80819:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
from semantic_analyzer import SemanticAnalyzer | ajibawa-2023/Python-Code-Large/train/row_80820 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80820:ImportFrom_L1_C0", "label": "from semantic_analyzer import SemanticAnalyzer", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 668, 0, 1, 0, 0, 668, 0, 0], "semantic": {"name": "semantic_analyzer", "arg_names": ... | [] |
# coding: utf-8
from ala_classes import SyntaxTreeNode, Token, TokenType
class SyntaxTreeOptimizer(object):
NON_COLLAPSABLE_PRODUCTIONS = ['start', 'print_expr', 'funcall_arguments', ]
NON_DELETABLE_PRODUCTIONS = ['funcall_arguments', ]
__changed = None
tree = None
def __init__(self... | ajibawa-2023/Python-Code-Large/train/row_80821 | 77 | 102 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80821:ImportFrom_L3_C0", "label": "from ala_classes import SyntaxTreeNode, Token, TokenType", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0098, 0, 0.66, 0.0, 60, 0, 3, 0, 0, 60, 0, 0], "semantic": {"name": "ala_classes", "arg_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80821:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80821:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80821:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80821:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# coding: utf-8
from xml.dom.minidom import *
from ala_classes import AlaGrammarTableError
class ACT:
N = 0
S = 1
R = 2
G = 3
ACC = 4
class ParserAction(object):
type = None
value = None
def __init__(self, type, value):
self.type = type
self.va... | ajibawa-2023/Python-Code-Large/train/row_80822 | 78 | 120 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80822:ImportFrom_L3_C0", "label": "from xml.dom.minidom import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.0083, 0, 0.66, 0.0, 770, 0, 1, 0, 0, 770, 0, 0], "semantic": {"name": "xml.dom.minidom", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80822:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80822:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80822:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80822:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
from parser_ import Parser
from grammar_table import GrammarTable
from syntax_tree_optimizer import SyntaxTreeOptimizer | ajibawa-2023/Python-Code-Large/train/row_80823 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80823:ImportFrom_L1_C0", "label": "from parser_ import Parser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 453, 0, 1, 0, 0, 453, 0, 0], "semantic": {"name": "parser_", "arg_names": [], "import_names": ["Pa... | [] |
#coding=utf8
from grammar_table import GrammarTable, ACT
from ala_classes import AlaGeneralSyntaxError, AlaGrammarTableError, AlaParserError, SyntaxTreeNode, Token
class Parser(object):
__tokens = None
__curr = None
__curr_token = None
__stack = None
__grammar = None
def __ini... | ajibawa-2023/Python-Code-Large/train/row_80824 | 47 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80824:ImportFrom_L3_C0", "label": "from grammar_table import GrammarTable, ACT", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0441, 0.0147, 0, 0.66, 0.0, 941, 0, 2, 0, 0, 941, 0, 0], "semantic": {"name": "grammar_table", "arg_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80824:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80824:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80824:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80824:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
# -*- coding: utf-8 -*-
import sys
import codecs
def setup_console(sys_enc="utf-8"):
reload(sys)
try:
if sys.platform.startswith("win"):
import ctypes
enc = "cp%d" % ctypes.windll.kernel32.GetOEMCP()
else:
enc = (sys.stdout.encoding if sys.stdout... | ajibawa-2023/Python-Code-Large/train/row_80825 | 14 | 25 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80825:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.08, 0.04, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80825:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80825:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80825:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80825:Try_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
# coding: utf8
# TODO: ОБЯЗАТЕЛЬНО: List of Int
import os
import subprocess
from coding_console_fix import setup_console
from ala_classes import SyntaxTreeNode
from ala_classes import Token, TokenType as T
from ala_classes import AlaCodeGeneratorException, AlaNotImplementedException, AlaFunctionException
fr... | ajibawa-2023/Python-Code-Large/train/row_80826 | 501 | 712 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80826:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.007, 0.0014, 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_80826:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80826:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80826:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80826:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-... |
START_CODE = \
r"""
format PE console
entry start
include '{0}win32ax.inc'
section '.data' data readable writable
True equ 1
False equ 0
true db 'True', 0
false db 'False', 0
new_line db 0ah, 0dh, 0
format_str db '%s ', 0
format_int db '%d ', 0
input_str db '%s', 0
... | ajibawa-2023/Python-Code-Large/train/row_80827 | 41 | 361 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80827:Assign_L1_C0", "label": "START_CODE =", "type": "assigned_variable", "loc": [1, 24], "level": 0, "parent": null, "vector": [14, 0, 0.0346, 0.0665, 0, 0.66, 0.0, 355, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "START_CODE", "arg_names": [], "import_names": [], "rhs... | [] |
# coding: utf-8
import os
import sys
from ala_classes import TokenType as T, Token
from scanner import PythonScanner
if __name__ == "__main__":
input_file_name = sys.argv[1]
output_file_name = sys.argv[2]
try:
input_file = open(input_file_name, 'r')
except IOError:
print... | ajibawa-2023/Python-Code-Large/train/row_80828 | 18 | 25 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80828:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.12, 0.04, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80828:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80828:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80828:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80828:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
arr = [5, 3, 2, 6, 11, 1, 0, -1]
length = 8
sorted = False
while not sorted:
sorted = True
end = length - 1
for i in range(end):
if arr[i] > arr[i + 1]:
temp = arr[i]
arr[i] = arr[i + 1]
arr[i + 1] = temp
sorted = False
for i in range(len... | ajibawa-2023/Python-Code-Large/train/row_80829 | 14 | 15 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80829:Assign_L1_C0", "label": "arr =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80829:While_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80829:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80829:While_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80829:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
# coding: utf-8
import sys
from ala_classes import TokenType as T, Token
from scanner import PythonScanner
from parser_ import Parser, SyntaxTreeOptimizer
from semantic_analyzer import SemanticAnalyzer
from codegen.codegen import CodeGenerator
from ala_classes.exceptions import *
import lib.color_console as... | ajibawa-2023/Python-Code-Large/train/row_80830 | 114 | 148 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80830:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0203, 0.0068, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80830:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80830:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80830:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80830:Return_L18_C4"}, {"f": "ajibawa-2023/Python-Co... |
a = 5
b = False
if (a > b):
print "a > b"
| ajibawa-2023/Python-Code-Large/train/row_80831 | 4 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80831:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.2, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80831:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80831:Expr_L5_C4"}] |
a = 0
print a
a += 3
print a
a *= 2
print a
a /= 2
print a
a = (a + 1 - (3 + 15) / 2) * 5
print a | ajibawa-2023/Python-Code-Large/train/row_80832 | 7 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80832:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1, 0.1, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
str = "str"
a = 5
b = 1
t = True
f = False
print str, a, b, t, f, a + 5, a - b, t and f,
| ajibawa-2023/Python-Code-Large/train/row_80833 | 6 | 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_80833:Assign_L1_C0", "label": "str =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.125, 0.125, 0, 0.66, 0.0, 52, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "str", "arg_names": [], "import_names": [], "rhs_call_name": "", "... | [] |
a = 0
while a < 5:
print a
a += 1
for a in range(5):
print a
for a in range(0, 5):
print a
for a in range(0, 5, 1):
print a
| ajibawa-2023/Python-Code-Large/train/row_80834 | 9 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80834:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80834:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80834:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80834:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80834:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_808... |
a = 5
b = 3
с = a and not b
| ajibawa-2023/Python-Code-Large/train/row_80835 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80835:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
str = "123"
str = raw_input() | ajibawa-2023/Python-Code-Large/train/row_80836 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80836:Assign_L1_C0", "label": "str =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 52, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "str", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [] |
arr = [0, 1, 2, 3, 4, 5]
arr[7] = 5
| ajibawa-2023/Python-Code-Large/train/row_80837 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80837:Assign_L1_C0", "label": "arr =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [] |
t = True
print not t | ajibawa-2023/Python-Code-Large/train/row_80838 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80838:Assign_L1_C0", "label": "t =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 15, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [] |
str0 = "str0"
print str0
str1 = raw_input("Input string: ")
print str1
str2 = raw_input()
print str2 | ajibawa-2023/Python-Code-Large/train/row_80839 | 6 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80839:Assign_L1_C0", "label": "str0 =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 417, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "str0", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
a = 2
print a[7] | ajibawa-2023/Python-Code-Large/train/row_80840 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80840:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
ar = [1, 2, 3, 4, 5]
a = 1
print ar[a]
| ajibawa-2023/Python-Code-Large/train/row_80841 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80841:Assign_L1_C0", "label": "ar =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 940, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "ar", "arg_names": [], "import_names": [], "rhs_call_name": "", ... | [] |
x = 5
x = 1 > 2 | ajibawa-2023/Python-Code-Large/train/row_80842 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80842:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
a = 100
b = 0
print a / b
| ajibawa-2023/Python-Code-Large/train/row_80843 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80843:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
arr = []
| ajibawa-2023/Python-Code-Large/train/row_80844 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80844:Assign_L1_C0", "label": "arr =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [] |
arr = [1, 3, "4"]
| ajibawa-2023/Python-Code-Large/train/row_80845 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80845:Assign_L1_C0", "label": "arr =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [] |
a = 5
a = "str" | ajibawa-2023/Python-Code-Large/train/row_80846 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80846:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
# 0 1 2
for i in range(3):
print i
# 1
if True:
print 1
name = raw_input("Enter name:")
print "Hello,"
print name | ajibawa-2023/Python-Code-Large/train/row_80847 | 7 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80847:For_L2_C0", "label": "for i", "type": "for", "loc": [2, 3], "level": 0, "parent": null, "vector": [6, 0, 0.2778, 0.2222, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""},... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80847:For_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80847:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80847:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80847:Expr_L6_C4"}] |
a = 5
a = raw_input()
| ajibawa-2023/Python-Code-Large/train/row_80848 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80848:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
a = input("Enter first number")
b = input("Enter second number")
c = input("Enter third number")
if a >= b and a >= c:
print a
else:
if b >= c:
print b
else:
print c
| ajibawa-2023/Python-Code-Large/train/row_80849 | 8 | 13 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80849:Assign_L1_C0", "label": "a = input()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 930, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80849:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80849:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80849:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80849:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80849:If_... |
a = 5
print b
print a | ajibawa-2023/Python-Code-Large/train/row_80850 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80850:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
a = 3
a += 1
a *= 2
a /= 4
print a | ajibawa-2023/Python-Code-Large/train/row_80851 | 2 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80851:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.2, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
ar = [5]
print ar
| ajibawa-2023/Python-Code-Large/train/row_80852 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80852:Assign_L1_C0", "label": "ar =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 940, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "ar", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
x = 5 + 3 - 5 / 2
print x | ajibawa-2023/Python-Code-Large/train/row_80853 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80853:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
a = input("Enter first number")
b = input("Enter second number")
if a >= b:
print a
else:
print b
| ajibawa-2023/Python-Code-Large/train/row_80854 | 5 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80854:Assign_L1_C0", "label": "a = input()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 930, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80854:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80854:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80854:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80854:Expr_L6_C4"}] |
a = 5
b = 8;
print a
| ajibawa-2023/Python-Code-Large/train/row_80855 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80855:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
# coding: utf8
from scanner_test import scanner_test
def start_test():
scanner_test()
| ajibawa-2023/Python-Code-Large/train/row_80856 | 3 | 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_80856:ImportFrom_L3_C0", "label": "from scanner_test import scanner_test", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.4286, 0.1429, 0, 0.66, 0.0, 520, 0, 1, 0, 0, 520, 0, 0], "semantic": {"name": "scanner_test", "arg_names": [], "imp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80856:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80856:Expr_L7_C4"}] |
# coding: utf8
# Модуль тестирует значимые для кода токены
import os
from ala_classes import TokenType
from scanner import PythonScanner
true_tokens = {
'instructions': ['while', 'if', 'elif', 'else', 'for', 'in', 'print', 'pass', 'break'],
'values': ['True', 'False', # bool values
... | ajibawa-2023/Python-Code-Large/train/row_80857 | 17 | 44 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80857:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1136, 0.0227, 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_80857:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80857:For_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80857:For_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80857:For_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
from scanner_test import scanner_test | ajibawa-2023/Python-Code-Large/train/row_80858 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80858:ImportFrom_L1_C0", "label": "from scanner_test import scanner_test", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 520, 0, 1, 0, 0, 520, 0, 0], "semantic": {"name": "scanner_test", "arg_names": [], "import_na... | [] |
#coding=utf8
from scanner import Scanner
from ala_classes import TokenType as T, Token, AlaGeneralLexicalError
class PythonScanner(Scanner):
def get_all_tokens(self):
try:
token = Token(T.NONE)
prev_token = None
tabs = 0
prev_tabs = 0
... | ajibawa-2023/Python-Code-Large/train/row_80859 | 176 | 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_80859:ImportFrom_L3_C0", "label": "from scanner import Scanner", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0121, 0.004, 0, 0.66, 0.0, 802, 0, 1, 0, 0, 802, 0, 0], "semantic": {"name": "scanner", "arg_names": [], "import_names": ["Sc... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80859:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80859:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80859:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80859:Try_L10_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
#coding=utf8
from ala_classes import TokenType as T, Token, AlaUnknownTokenError
class Scanner(object):
file = None
text = None
tokens = None
caret_position = None
empty_lines_mapping = None
#INTERFACE
def __init__(self, f):
"""
Абстрактный лексический ... | ajibawa-2023/Python-Code-Large/train/row_80860 | 47 | 77 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80860:ImportFrom_L3_C0", "label": "from ala_classes import T, Token, AlaUnknownTokenError", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.039, 0.013, 0, 0.66, 0.0, 60, 0, 3, 0, 0, 60, 0, 0], "semantic": {"name": "ala_classes", "arg_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80860:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80860:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80860:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80860:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from python_scanner import PythonScanner | ajibawa-2023/Python-Code-Large/train/row_80861 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80861:ImportFrom_L1_C0", "label": "from python_scanner import PythonScanner", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 71, 0, 1, 0, 0, 71, 0, 0], "semantic": {"name": "python_scanner", "arg_names": [], "import... | [] |
# coding: utf-8
TYPE_SIZE_TABLE = {
'BOOL': 1, # 1 bit
'INT': 32, # 32 bit == 4 byte
'STRING': 1, # len(str)
'LIST_INT': 32, # len(list) * 32 bit
'LIST_BOOL': 1, # len(list)
'LIST_STING': 1, # summ all len(str) in list
}
class TypeEnum():
UNKNOWN = 0
... | ajibawa-2023/Python-Code-Large/train/row_80862 | 21 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80862:Assign_L3_C0", "label": "TYPE_SIZE_TABLE =", "type": "assigned_variable", "loc": [3, 10], "level": 0, "parent": null, "vector": [14, 0, 0.1354, 0.1667, 0, 0.66, 0.0, 580, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "TYPE_SIZE_TABLE", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80862:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80862:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80862:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80862:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# coding: utf-8
class SymbolTable(object):
pass
class GlobalSymbolTable(SymbolTable):
__table = None
__node_mapping = None
def __init__(self):
self.__table = {}
self.__node_mapping = {}
def __repr__(self):
return str(self.__table)
def __getitem__(... | ajibawa-2023/Python-Code-Large/train/row_80863 | 38 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80863:ClassDef_L4_C0", "label": "SymbolTable", "type": "class", "loc": [4, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0763, 0.0339, 0, 0.66, 0.0, 533, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "SymbolTable", "arg_names": [], "import_names": [], "rhs_call_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80863:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80863:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80863:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80863:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
# coding: utf-8
class AlaError(Exception):
line_number = None
def __init__(self, message, line_number=None):
self.message = message
self.line_number = line_number
def __str__(self):
return self.message
# Scanner errors
class AlaGeneralLexicalError(AlaError):
... | ajibawa-2023/Python-Code-Large/train/row_80864 | 20 | 72 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80864:ClassDef_L4_C0", "label": "AlaError", "type": "class", "loc": [4, 12], "level": 0, "parent": null, "vector": [3, 0, 0.1111, 0.125, 0, 0.66, 0.0, 956, 0, 2, 0, 0, 645, 0, 0], "semantic": {"name": "AlaError", "arg_names": [], "import_names": [], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80864:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80864:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80864:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80864:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
# coding: utf-8
class TokenType:
# Служебные токены
PARSER_EOF = -8 # Служебный EOF для парсера
ERROR = -7 # Ошибка
NONE = -6 # Не токен
EOI = -5 # Конец потока
TAB = -4 # Отступ, служебный токен сканера
# Токены форматирования
NEW_LINE = -3 # Конец строки
TAB... | ajibawa-2023/Python-Code-Large/train/row_80865 | 78 | 173 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80865:ClassDef_L4_C0", "label": "TokenType", "type": "class", "loc": [4, 69], "level": 0, "parent": null, "vector": [3, 0, 0.211, 0.3815, 0, 0.66, 0.0, 437, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TokenType", "arg_names": [], "import_names": [], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80865:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80865:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80865:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80865:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# coding: utf-8
class SyntaxTreeNode(object):
TAB = "=-"
production = None
parent = None
parts = None
local_symbol_table = None
variable_type = None
line = None
def __init__(self, production, parts, line=None):
self.production = production
self.parent = N... | ajibawa-2023/Python-Code-Large/train/row_80866 | 23 | 39 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80866:ClassDef_L4_C0", "label": "SyntaxTreeNode", "type": "class", "loc": [4, 39], "level": 0, "parent": null, "vector": [3, 0, 0.5513, 0.9231, 0, 0.66, 0.0, 444, 0, 4, 0, 0, 186, 0, 6], "semantic": {"name": "SyntaxTreeNode", "arg_names": [], "import_names": [], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80866:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80866:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80866:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80866:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# coding: utf-8
from exceptions import *
from my_token import TokenType, Token
from syntax_tree_node import SyntaxTreeNode
from symbol_table import GlobalSymbolTable, LocalSymbolTable
from type import TypeEnum, Type | ajibawa-2023/Python-Code-Large/train/row_80867 | 5 | 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_80867:ImportFrom_L3_C0", "label": "from exceptions import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.4286, 0.1429, 0, 0.66, 0.0, 63, 0, 1, 0, 0, 63, 0, 0], "semantic": {"name": "exceptions", "arg_names": [], "import_names": ["*"]... | [] |
"""
Colors text in console mode application (win32).
Uses ctypes and Win32 methods SetConsoleTextAttribute and
GetConsoleScreenBufferInfo.
$Id: color_console.py 534 2009-05-10 04:00:59Z andre $
"""
from ctypes import windll, Structure, c_short, c_ushort, byref
SHORT = c_short
WORD = c_ushort
class ... | ajibawa-2023/Python-Code-Large/train/row_80868 | 47 | 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_80868:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0595, 0.1071, 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_80868:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80868:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80868:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80868:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_80869 | 51 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80869:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80869:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80869:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80869:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80869:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
'''
Module which prompts the user for translations and saves them.
TODO: implement
@author: Rodrigo Damazio
'''
class Translator(object):
'''
classdocs
'''
def __init__(self, language):
'''
Constructor
'''
self._language = language
def Translate(self, string_names):
print string_names | ajibawa-2023/Python-Code-Large/train/row_80870 | 8 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80870:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80870:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80870:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80870:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80870:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
'''
Module which brings history information about files from Mercurial.
@author: Rodrigo Damazio
'''
import re
import subprocess
REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')
def _GetOutputLines(args):
'''
Runs an external process and returns its output as a list of lines.
@param args: the argume... | ajibawa-2023/Python-Code-Large/train/row_80871 | 38 | 94 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80871:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80871:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80871:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80871:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80871:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
Module which parses a string XML file.
@author: Rodrigo Damazio
'''
from xml.parsers.expat import ParserCreate
import re
#import xml.etree.ElementTree as ET
class StringsParser(object):
'''
Parser for string XML files.
This object is not thread-safe and should be used for parsing a single file at
a time... | ajibawa-2023/Python-Code-Large/train/row_80872 | 54 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80872:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80872:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80872:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80872:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80872:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
'''
Entry point for My Tracks i18n tool.
@author: Rodrigo Damazio
'''
import mytracks.files
import mytracks.translate
import mytracks.validate
import sys
def Usage():
print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0]
print 'Commands are:'
print ' cleanup'
print ' translate'
p... | ajibawa-2023/Python-Code-Large/train/row_80873 | 58 | 96 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80873:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80873:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80873:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80873:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80873:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Module which compares languague files to the master file and detects
issues.
@author: Rodrigo Damazio
'''
import os
from mytracks.parser import StringsParser
import mytracks.history
class Validator(object):
def __init__(self, languages):
'''
Builds a strings file validator.
Params:
@para... | ajibawa-2023/Python-Code-Large/train/row_80874 | 65 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80874:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80874:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80874:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80874:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_80874:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
'''
Module for dealing with resource files (but not their contents).
@author: Rodrigo Damazio
'''
import os.path
from glob import glob
import re
MYTRACKS_RES_DIR = 'MyTracks/res'
ANDROID_MASTER_VALUES = 'values'
ANDROID_VALUES_MASK = 'values-*'
def GetMyTracksDir():
'''
Returns the directory in which the MyTrac... | ajibawa-2023/Python-Code-Large/train/row_80875 | 25 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80875:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80875:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80875:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80875:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80875:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code... |
from __future__ import print_function, unicode_literals, division
import os
import sys
if sys.version < '3':
str = unicode
def match(needle, haystack):
"""
Command-T-style string matching.
"""
score = 1
j = 0
last_match = 0
needle = needle.lower()
haystack = haystack.lower()
... | ajibawa-2023/Python-Code-Large/train/row_80876 | 32 | 57 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80876:ImportFrom_L1_C0", "label": "from __future__ import print_function, unicode_literals, division", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0175, 0.0175, 0, 0.66, 0.0, 777, 0, 3, 0, 0, 777, 0, 0], "semantic": {"name": "__future... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80876:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80876:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80876:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80876:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
import re
import itertools
import wifi.subprocess_compat as subprocess
from pbkdf2 import PBKDF2
from wifi.utils import ensure_file_exists
from wifi.exceptions import ConnectionError
def configuration(cell, passkey=None):
"""
Returns a dictionary of configuration options for cell
Asks for a password if ... | ajibawa-2023/Python-Code-Large/train/row_80877 | 99 | 204 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80877:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 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_80877:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80877:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80877:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80877:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
class ConnectionError(Exception):
pass
class InterfaceError(Exception):
pass
| ajibawa-2023/Python-Code-Large/train/row_80878 | 2 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80878:ClassDef_L1_C0", "label": "ConnectionError", "type": "class", "loc": [1, 2], "level": 0, "parent": null, "vector": [3, 0, 0.25, 0.3333, 0, 0.66, 0.0, 236, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "ConnectionError", "arg_names": [], "import_names": [], "rhs_cal... | [] |
from wifi.scan import Cell
from wifi.scheme import Scheme
| ajibawa-2023/Python-Code-Large/train/row_80879 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80879:ImportFrom_L1_C0", "label": "from wifi.scan import Cell", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 618, 0, 1, 0, 0, 618, 0, 0], "semantic": {"name": "wifi.scan", "arg_names": [], "import_names": ["Cell"]... | [] |
"""
Python 2.6 doesn't provide subprocess.check_output or subprocess.check_call
"""
from subprocess import *
try:
check_output
except NameError:
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/li... | ajibawa-2023/Python-Code-Large/train/row_80880 | 23 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80880:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0317, 0.0476, 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_80880:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80880:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80880:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80880:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from __future__ import division
import re
import textwrap
import wifi.subprocess_compat as subprocess
from wifi.utils import db2dbm
from wifi.exceptions import InterfaceError
class Cell(object):
"""
Presents a Python interface to the output of iwlist.
"""
def __init__(self):
self.bitrates =... | ajibawa-2023/Python-Code-Large/train/row_80881 | 78 | 150 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80881:ImportFrom_L1_C0", "label": "from __future__ import division", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0067, 0.0067, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80881:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80881:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80881:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80881:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | ajibawa-2023/Python-Code-Large/train/row_80882 | 11 | 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_80882:ImportFrom_L2_C0", "label": "from setuptools import setup", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0192, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80882:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80882:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80882:Try_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80882:Import_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
from setuptools import setup
import os
__doc__ = """
Command line tool and library wrappers around iwlist and
/etc/network/interfaces.
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'setuptools',
'pbkdf2',
]
try:
im... | ajibawa-2023/Python-Code-Large/train/row_80883 | 11 | 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_80883:ImportFrom_L2_C0", "label": "from setuptools import setup", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0192, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80883:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80883:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80883:Try_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80883:Import_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_2:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
cUtemperSceenImagen=None
screen = None
def __init__(self, s... | ajibawa-2023/Python-Code-Large/train/row_80884 | 47 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80884:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0147, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80884:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80884:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80884:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80884:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python3
#Copyright (c) 2010 Dimitris Leventeas <mydimle@gmail.com>
#Permission is hereby granted, free of charge, to any person
#obtaining a copy of this software and associated documentation
#files (the "Software"), to deal in the Software without
#restriction, including without limitation the rights ... | ajibawa-2023/Python-Code-Large/train/row_80886 | 40 | 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_80886:ImportFrom_L26_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3059, 0.0118, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80886:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80886:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80886:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80886:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time, datetime
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_0:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
Sombra_Color = (120,120,120)
Letra_top = None
... | ajibawa-2023/Python-Code-Large/train/row_80887 | 117 | 158 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80887:Import_L4_C0", "label": "time import time, datetime", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0253, 0.0063, 0, 0.66, 0.0, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "d... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80887:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80887:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80887:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80887:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
### BEGIN LICENSE
#Copyright (c) 2009 Eugene Kaznacheev <qetzal@gmail.com>
#Copyright (c) 2013 Joshua Tasker <jtasker@gmail.com>
#Permission is hereby granted, free of charge, to any person
#obtaining a copy of this software and associated documentation
#files (the "Software")... | ajibawa-2023/Python-Code-Large/train/row_80888 | 524 | 1,053 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80888:Expr_L29_C0", "label": "expression", "type": "expression", "loc": [29, 29], "level": 0, "parent": null, "vector": [8, 0, 0.0275, 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_80888:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80888:ImportFrom_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80888:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80888:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
import socket
import datetime
import utemper_ipAddress
import psutil
class cScreen_5:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
cUt... | ajibawa-2023/Python-Code-Large/train/row_80890 | 64 | 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_80890:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0109, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80890:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80890:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80890:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80890:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xively
import datetime
import time
from utemper_public import *
class calssReport:
old_time = 0
time_lastUpdate = 0
oldValores=[-1,-1,-1,-1]
inicio = 0
# Variables personales
FEED_ID="1844265561"
API_KEY="3QTvK8CwHnYoJmHsp2OiVdrwE1NE... | ajibawa-2023/Python-Code-Large/train/row_80891 | 53 | 75 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80891:Import_L4_C0", "label": "xively import xively", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0533, 0.0133, 0, 0.66, 0.0, 442, 0, 1, 0, 0, 442, 0, 0], "semantic": {"name": "xively", "arg_names": [], "import_names": ["xively"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80891:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80891:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80891:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80891:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
#import RPi.GPIO as GPIO
import time, os
import utemper_tiempo
from utemper_public import *
import utemper_screen
import utemper_check_estados
import utemper_InterfaceServer
import utemper_check_temperatura
import utemper_report
import utemper_Scan_Ips
import utemper_ldr
#import utemper_wifi
... | ajibawa-2023/Python-Code-Large/train/row_80892 | 45 | 66 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80892:Import_L5_C0", "label": "time import time, os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0758, 0.0152, 0, 0.66, 0.0, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "os"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80892:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80892:Assign_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80892:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80892:Assign_L25_C1"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
import sys
import time, os
import shutil
import os.path
# -----------
# Constantes
# -----------
LOGS_DEBUG_LEVEL= -1
LOGS_FILE= "/var/utemp/logs.log"
# gris \033[91m
LOGS_COLORES= ['\033[94m','\033[0m', '\033[92m', '\033[93m','\033[91m','\033[93m']
LOGS_ENDC ='\033[0m'
def log(nivel, text):
... | ajibawa-2023/Python-Code-Large/train/row_80893 | 126 | 192 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80893:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0052, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80893:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80893:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80893:If_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_80893:Return_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import os
from pygame.locals import *
from utemper_public import *
import utemper_screen_image
class cScreen_1:
pantalla=0
carpeta_img = "img/dia/"
letra_color = (0,0,0)
Letra_temp2 = None
cUtemperSceenImagen=None
screen = None
... | ajibawa-2023/Python-Code-Large/train/row_80894 | 48 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80894:Import_L4_C0", "label": "pygame import pygame", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0571, 0.0143, 0, 0.66, 0.0, 87, 0, 1, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygame"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80894:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80894:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80894:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80894:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import urllib, urllib2, time
import xml.etree.ElementTree as ET
import socket
import os, os.path
import subprocess
from uuid import getnode as get_mac
from utemper_public import *
class cInterfaceServer:
folder_send_files = "config/send/"
maxTimeSendStatus = 5
maxTimeSendFromServer... | ajibawa-2023/Python-Code-Large/train/row_80895 | 118 | 161 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80895:Import_L3_C0", "label": "urllib import urllib, urllib2, time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0186, 0.0062, 0, 0.66, 0.0, 614, 0, 3, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80895:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80895:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80895:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80895:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import urllib2, time
import glob, os
import xml.etree.ElementTree as ET
from utemper_public import *
class eltiempo:
# tiempo
WOEID=0
CONF_FILE= "config/utemper.conf"
WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0'
lastTimeTiempo = 0
#temp:
temp = False
lastTimeTemp = 0
sens... | ajibawa-2023/Python-Code-Large/train/row_80896 | 101 | 132 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_80896:Import_L3_C0", "label": "urllib2 import urllib2, time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0076, 0, 0.66, 0.0, 345, 0, 2, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urll... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_80896:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80896:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_80896:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_80896:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.