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 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99878 | 70 | 112 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99878:Import_L15_C0", "label": "re import re", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1339, 0.0089, 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_99878:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99878:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99878:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99878:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99879 | 2 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99879:ImportFrom_L15_C0", "label": "from datarow import DataRow", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.8824, 0.0588, 0, 0.66, 0.0, 496, 0, 1, 0, 0, 496, 0, 0], "semantic": {"name": "datarow", "arg_names": [], "import_names": ... | [] |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 ag... | ajibawa-2023/Python-Code-Large/train/row_99880 | 23 | 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_99880:Import_L16_C0", "label": "tempfile import tempfile", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.3077, 0.0192, 0, 0.66, 0.0, 516, 0, 1, 0, 0, 516, 0, 0], "semantic": {"name": "tempfile", "arg_names": [], "import_names": ["temp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99880:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99880:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99880:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99880:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99881 | 140 | 202 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99881:Import_L16_C0", "label": "HTMLParser import HTMLParser", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0792, 0.005, 0, 0.66, 0.0, 217, 0, 1, 0, 0, 217, 0, 0], "semantic": {"name": "HTMLParser", "arg_names": [], "import_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99881:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99881:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99881:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99881:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99882 | 39 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99882:FunctionDef_L22_C0", "label": "encode_basestring", "type": "function", "loc": [22, 36], "level": 0, "parent": null, "vector": [2, 0, 0.4531, 0.2344, 0, 0.66, 0.0, 207, 0, 1, 1, 0, 0, 0, 12], "semantic": {"name": "encode_basestring", "arg_names": ["string"], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99882:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99882:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99882:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99882:Assign_L24_C8"}, {"f": "ajibawa-2023/Pyth... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99883 | 48 | 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_99883:ImportFrom_L16_C0", "label": "from robot import utils", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1524, 0.0095, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["util... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99883:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99883:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99883:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99883:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99884 | 63 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99884:ImportFrom_L15_C0", "label": "from robot.common import Statistics", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1515, 0.0101, 0, 0.66, 0.0, 355, 0, 1, 0, 0, 355, 0, 0], "semantic": {"name": "robot.common", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99884:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99884:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99884:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99884:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99885 | 298 | 486 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99885:Import_L15_C0", "label": "zlib import zlib", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0309, 0.0021, 0, 0.66, 0.0, 373, 0, 1, 0, 0, 373, 0, 0], "semantic": {"name": "zlib", "arg_names": [], "import_names": ["zlib"], "rhs_cal... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99885:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99885:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99885:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99885:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99887 | 128 | 196 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99887:Import_L15_C0", "label": "time import time", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0765, 0.0051, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_cal... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99887:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99887:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99887:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99887:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99888 | 28 | 60 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99888:ImportFrom_L15_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0167, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99888:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99888:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99888:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99888:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99889 | 1 | 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_99889:ImportFrom_L16_C0", "label": "from resultwriter import ResultWriter", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 1.0, 0.0625, 0, 0.66, 0.0, 548, 0, 1, 0, 0, 548, 0, 0], "semantic": {"name": "resultwriter", "arg_names": [], "imp... | [] |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99890 | 6 | 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_99890:ImportFrom_L15_C0", "label": "from robot.output import XmlLogger", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.6, 0.04, 0, 0.66, 0.0, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "robot.output", "arg_names": [], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99890:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99890:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99890:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99890:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99891 | 24 | 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_99891:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 52], "level": 0, "parent": null, "vector": [8, 0, 0.3418, 0.3878, 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_99891:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99891:Expr_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99891:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99891:Expr_L66_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99892 | 0 | 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"] | [] | [] |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99893 | 85 | 171 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99893:Import_L15_C0", "label": "utils import utils", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0877, 0.0058, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["utils"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99893:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99893:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99893:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99893:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99894 | 170 | 280 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99894:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0536, 0.0036, 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_99894:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99894:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99894:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99894:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99895 | 1 | 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_99895:ImportFrom_L15_C0", "label": "from settings import RobotSettings, RebotSettings", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 1.0, 0.0667, 0, 0.66, 0.0, 168, 0, 2, 0, 0, 168, 0, 0], "semantic": {"name": "settings", "arg_names": ... | [] |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99896 | 75 | 137 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99896:ImportFrom_L16_C0", "label": "from robot import utils", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1168, 0.0073, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["util... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99896:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99896:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99896:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99896:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99897 | 117 | 175 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99897:ImportFrom_L15_C0", "label": "from robot import utils", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0857, 0.0057, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["util... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99897:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99897:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99897:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99897:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99898 | 48 | 83 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99898:ImportFrom_L15_C0", "label": "from robot.common.statistics import Statistics", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1807, 0.012, 0, 0.66, 0.0, 471, 0, 1, 0, 0, 471, 0, 0], "semantic": {"name": "robot.common.statistics",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99898:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99898:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99898:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99898:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99899 | 72 | 121 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99899:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.124, 0.0083, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99899:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99899:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99899:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99899:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99900 | 241 | 354 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99900:Import_L15_C0", "label": "os.path import os.path", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0424, 0.0028, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99900:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99900:If_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99900:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99900:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99901 | 28 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99901:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2586, 0.0172, 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_99901:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99901:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99901:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99901:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99902 | 68 | 109 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99902:ImportFrom_L16_C0", "label": "from robot import utils", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1468, 0.0092, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["util... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99902:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99902:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99902:If_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99902:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99903 | 155 | 229 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99903:Import_L15_C0", "label": "inspect import inspect", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0655, 0.0044, 0, 0.66, 0.0, 878, 0, 1, 0, 0, 878, 0, 0], "semantic": {"name": "inspect", "arg_names": [], "import_names": ["inspect... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99903:If_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99903:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99903:If_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99903:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99904 | 19 | 53 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99904:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.3208, 0.0943, 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_99904:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99904:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99904:FunctionDef_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99904:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99905 | 119 | 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_99905:Import_L16_C0", "label": "os import os", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0052, 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_99905:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99905:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99905:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99905:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99906 | 69 | 127 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99906:Import_L19_C0", "label": "os import os", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1496, 0.0079, 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_99906:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99906:ImportFrom_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99906:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99906:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99907 | 28 | 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_99907:Import_L15_C0", "label": "re import re", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 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_99907:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99907:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99907:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99907:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99908 | 20 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99908:ImportFrom_L16_C0", "label": "from output import Output", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.3137, 0.0196, 0, 0.66, 0.0, 886, 0, 1, 0, 0, 886, 0, 0], "semantic": {"name": "output", "arg_names": [], "import_names": ["O... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99908:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99908:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99908:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99908:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_99911 | 8 | 253 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99911:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 237], "level": 0, "parent": null, "vector": [8, 0, 0.502, 0.8735, 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_99911:Try_L241_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99911:Import_L242_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99911:If_L251_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99911:Assign_L252_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_99912 | 8 | 321 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99912:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 305], "level": 0, "parent": null, "vector": [8, 0, 0.5016, 0.9003, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99912:Try_L309_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99912:Import_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99912:If_L319_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99912:Assign_L320_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99913 | 11 | 37 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99913:ImportFrom_L15_C0", "label": "from robot.errors import DataError", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.4054, 0.027, 0, 0.66, 0.0, 299, 0, 1, 0, 0, 299, 0, 0], "semantic": {"name": "robot.errors", "arg_names": [], "impo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99913:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99913:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99913:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99913:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99914 | 11 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99914:ClassDef_L16_C0", "label": "BaseKeyword", "type": "class", "loc": [16, 28], "level": 0, "parent": null, "vector": [3, 0, 0.7857, 0.4643, 0, 0.66, 0.0, 776, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "BaseKeyword", "arg_names": [], "import_names": [], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99914:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99914:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99914:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99914:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99915 | 296 | 421 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99915:Import_L15_C0", "label": "random import random", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0356, 0.0024, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99915:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99915:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99915:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99915:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99916 | 194 | 291 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99916:Import_L15_C0", "label": "re import re", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0515, 0.0034, 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_99916:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99916:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99916:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99916:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99917 | 9 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99917:ImportFrom_L16_C0", "label": "from robot.errors import DataError", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.5161, 0.0323, 0, 0.66, 0.0, 299, 0, 1, 0, 0, 299, 0, 0], "semantic": {"name": "robot.errors", "arg_names": [], "imp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99917:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99917:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99917:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99917:Try_L22_C8"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99918 | 5 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99918:ImportFrom_L16_C0", "label": "from model import BaseTestSuite, BaseTestCase", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.8, 0.05, 0, 0.66, 0.0, 722, 0, 2, 0, 0, 722, 0, 0], "semantic": {"name": "model", "arg_names": [], "impo... | [] |
#!/usr/bin/env python
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_99919 | 33 | 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_99919:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 29], "level": 0, "parent": null, "vector": [8, 0, 0.2554, 0.1304, 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_99919:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99919:ImportFrom_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99919:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99919:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_99920 | 59 | 112 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99920:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 37], "level": 0, "parent": null, "vector": [8, 0, 0.2455, 0.1786, 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_99920:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99920:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99920:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99920:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
# tool2html.py -- Creates HTML version of given tool documentation
#
# First part of this file is Pygments configuration and actual
# documentation generation follows it.
#
# Pygments configuration
#
# This code is from 'external/rst-directive.py' file included in Pygments 0.9
# distribution. F... | ajibawa-2023/Python-Code-Large/train/row_99921 | 50 | 142 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99921:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 49], "level": 0, "parent": null, "vector": [8, 0, 0.2254, 0.2465, 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_99921:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99921:Try_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99921:Try_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99921:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 ag... | ajibawa-2023/Python-Code-Large/train/row_99922 | 111 | 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_99922:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0949, 0.0063, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99922:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99922:Import_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99922:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99922:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/env python
import os
import sys
class ExampleRemoteLibrary:
def count_items_in_directory(self, path):
return len(i for i in os.listdir(path) if not i.startswith('.'))
def strings_should_be_equal(self, str1, str2):
print "Comparing '%s' to '%s'" % (str1, str2)
if str1 != s... | ajibawa-2023/Python-Code-Large/train/row_99923 | 11 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99923:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.05, 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_99923:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99923:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99923:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99923:Return_L10_C8"}, {"f": "ajibawa-2023/Python-Cod... |
import sys
from SimpleXMLRPCServer import SimpleXMLRPCServer
class SimpleLibrary(SimpleXMLRPCServer):
def __init__(self, port=8270):
SimpleXMLRPCServer.__init__(self, ('localhost', int(port)))
self.register_function(self.get_keyword_names)
self.register_function(self.run_keyword)
... | ajibawa-2023/Python-Code-Large/train/row_99924 | 27 | 37 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99924:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 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_99924:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99924:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99924:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99924:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
# Can be used in the test data like ${MyObject()} or ${MyObject(1)}
class MyObject:
def __init__(self, index=''):
self.index = index
def __str__(self):
return '<MyObject%s>' % self.index
UNICODE = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. '
u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!')
LI... | ajibawa-2023/Python-Code-Large/train/row_99925 | 11 | 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_99925:ClassDef_L2_C0", "label": "MyObject", "type": "class", "loc": [2, 6], "level": 0, "parent": null, "vector": [3, 0, 0.25, 0.3125, 0, 0.66, 0.0, 605, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "MyObject", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99925:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99925:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99925:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99925:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code... |
import sys
class RemoteTestLibrary:
_unicode = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. '
u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!')
def get_server_language(self):
lang = sys.platform.startswith('java') and 'jython' or 'python'
return '%s%d%d' % (lang, sys.version_info[0], sys... | ajibawa-2023/Python-Code-Large/train/row_99927 | 182 | 312 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99927:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 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_99927:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99927:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99927:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99927:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
class regular:
ROBOT_LIBRARY_SCOPE = 'TEST SUITE'
"""This is a very regular test library"""
def __init__(self, arg1='hello', arg2='world'):
"""Constructs a new regular test library
See `keyword`
Examples:
| regular | foo | bar |
| regular | | # defaul... | ajibawa-2023/Python-Code-Large/train/row_99929 | 12 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99929:ClassDef_L1_C0", "label": "regular", "type": "class", "loc": [1, 30], "level": 0, "parent": null, "vector": [3, 0, 0.5167, 1.0, 0, 0.66, 0.0, 2, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "regular", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99929:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99929:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99929:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99929:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
class RequiredArgs:
def __init__(self, required, arguments, default="value"):
"""This library always needs two arguments and has one default.
Keyword names are got from the given arguments.
"""
self.__dict__[required] = lambda: None
self.__dict__[arguments] = lambda arg: No... | ajibawa-2023/Python-Code-Large/train/row_99930 | 6 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99930:ClassDef_L1_C0", "label": "RequiredArgs", "type": "class", "loc": [1, 10], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.9091, 0, 0.66, 0.0, 764, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "RequiredArgs", "arg_names": [], "import_names": [], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99930:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99930:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99930:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99930:Expr_L4_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
class new_style_no_init(object):
"""No __init__ on this one."""
def kw(self):
"""The only lonely keyword."""
| ajibawa-2023/Python-Code-Large/train/row_99931 | 4 | 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_99931:ClassDef_L1_C0", "label": "new_style_no_init", "type": "class", "loc": [1, 6], "level": 0, "parent": null, "vector": [3, 0, 0.5833, 1.0, 0, 0.66, 0.0, 886, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "new_style_no_init", "arg_names": [], "import_names": [], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99931:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99931:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99931:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99931:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
class no_arg_init:
def __init__(self):
"""This doc not shown because there are no arguments."""
def keyword(self):
"""A keyword.
See `get hello` for details and *never* run this keyword.
"""
1/0
def get_hello(self, arg):
"""Returns 'Hello `arg`!'.
... | ajibawa-2023/Python-Code-Large/train/row_99932 | 9 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99932:ClassDef_L1_C0", "label": "no_arg_init", "type": "class", "loc": [1, 19], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.95, 0, 0.66, 0.0, 941, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "no_arg_init", "arg_names": [], "import_names": [], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99932:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99932:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99932:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99932:Expr_L4_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
class dynamic:
def get_keyword_names(self):
return ['Keyword 1', 'KW 2']
def run_keyword(self, name, args):
print name, args
def get_keyword_arguments(self, name):
return [ 'arg%d' % (i+1) for i in range(int(name[-1])) ]
def get_keyword_documentation(self, name):
retu... | ajibawa-2023/Python-Code-Large/train/row_99933 | 9 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99933:ClassDef_L1_C0", "label": "dynamic", "type": "class", "loc": [1, 26], "level": 0, "parent": null, "vector": [3, 0, 0.5192, 1.0, 0, 0.66, 0.0, 670, 0, 4, 0, 0, 0, 0, 3], "semantic": {"name": "dynamic", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99933:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99933:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99933:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99933:Return_L4_C8"}, {"f": "ajibawa-2023/Python-Code... |
u"""Module test library.
With some non-ascii stuff:
Hyv\u00E4\u00E4 y\u00F6t\u00E4.
\u0421\u043F\u0430\u0441\u0438\u0431\u043E!
"""
ROBOT_LIBRARY_VERSION = '0.1-alpha'
def keyword():
"""A keyword
See `get hello` for details"""
pass
def get_hello():
"""Get the intialization variables
See `imp... | ajibawa-2023/Python-Code-Large/train/row_99934 | 7 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99934:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1739, 0.3043, 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_99934:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99934:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99934:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99934:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/env python
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_99935 | 112 | 166 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99935:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 30], "level": 0, "parent": null, "vector": [8, 0, 0.1446, 0.0783, 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_99935:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99935:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99935:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99935:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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 req... | ajibawa-2023/Python-Code-Large/train/row_99939 | 111 | 186 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99939:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 39], "level": 0, "parent": null, "vector": [8, 0, 0.1532, 0.1183, 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_99939:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99939:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99939:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99939:Expr_L48_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
"""qs2html.py -- Creates HTML version of Robot Framework Quick Start Guide
Usage: qs2html.py [ cr(eate) | dist | zip ]
create .. Creates the HTML version of the Quick Start Guide.
dist .... Creates the Quick Start Guide and copies it and all its dependencies
under directory named '... | ajibawa-2023/Python-Code-Large/train/row_99941 | 45 | 79 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99941:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 14], "level": 0, "parent": null, "vector": [8, 0, 0.1076, 0.1519, 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_99941:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99941:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99941:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99941:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-... |
import os
import sys
import subprocess
class LoginLibrary:
def __init__(self):
self._sut_path = os.path.join(os.path.dirname(__file__),
'..', 'sut', 'login.py')
self._status = ''
def create_user(self, username, password):
self._run_command('creat... | ajibawa-2023/Python-Code-Large/train/row_99942 | 20 | 33 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99942:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0303, 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_99942:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99942:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99942:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99942:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
def simple_keyword():
"""Log a message"""
print 'You have used the simplest keyword.'
def greet(name):
"""Logs a friendly greeting to person given as argument"""
print 'Hello %s!' % name
def multiply_by_two(number):
"""Returns the given number multiplied by two
The result is always a floa... | ajibawa-2023/Python-Code-Large/train/row_99943 | 12 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99943:FunctionDef_L1_C0", "label": "simple_keyword", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.1, 0.15, 0, 0.66, 0.0, 30, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "simple_keyword", "arg_names": [], "import_names": [], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99943:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99943:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99943:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99943:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
"""pt2html.py -- Creates HTML version of Python Tutorial
Usage: pt2html.py
"""
import sys
import os
import shutil
import time
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'userguide'))
import ug2html # This also initializes docutils and pygments
def create_tutorial():
... | ajibawa-2023/Python-Code-Large/train/row_99944 | 19 | 36 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99944:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99944:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99944:ImportFrom_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99944:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99944:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
"""Usage: lib2html.py [ library | all ]
Libraries:
BuiltIn (bu)
Collections (co)
Dialogs (di)
OperatingSystem (op)
Screenshot (sc)
String (st)
Telnet (te)
"""
import sys
import tempfile
import os
import re
ROOT = os.path.normpath(os.path.join(os.path.abspath(__file__),'..','..',... | ajibawa-2023/Python-Code-Large/train/row_99945 | 28 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99945:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 13], "level": 0, "parent": null, "vector": [8, 0, 0.16, 0.22, 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_99945:For_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99945:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99945:For_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99945:If_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#!/usr/bin/env python
"""ug2html.py -- Creates HTML version of Robot Framework User Guide
Usage: ug2html.py [ cr(eate) | dist | zip ]
create .. Creates the user guide so that it has relative links to images,
library docs, etc. This version is stored in the version control
and distributed with th... | ajibawa-2023/Python-Code-Large/train/row_99946 | 127 | 264 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99946:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0455, 0.072, 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_99946:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99946:Try_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99946:Try_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99946:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#!/usr/bin/env python
"""Usage: check_test_times.py inpath [outpath]
Reads result of a test run from Robot output file and checks that no test
took longer than 3 minutest to execute. If outpath is not given, the
result is written over the original file.
"""
import sys
from robot.output import TestSuite
def check_... | ajibawa-2023/Python-Code-Large/train/row_99947 | 20 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99947:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1618, 0.1765, 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_99947:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99947:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99947:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99947:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
class CheckMultipleItemsLibrary:
def items_should_not_contain(self, value, *items):
"""Checks that none of the given 'items' contains the given 'value'."""
items_containing_value = [ item for item in items if value in item ]
if items_containing_value:
message = "Items '%s' cont... | ajibawa-2023/Python-Code-Large/train/row_99948 | 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_99948:ClassDef_L1_C0", "label": "CheckMultipleItemsLibrary", "type": "class", "loc": [1, 10], "level": 0, "parent": null, "vector": [3, 0, 0.55, 1.0, 0, 0.66, 0.0, 960, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "CheckMultipleItemsLibrary", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99948:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99948:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99948:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99948:Expr_L4_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
"""Robot Framework test library example that calls C code.
This example uses Python's standard `ctypes` module, which requires
that the C code is compiled into a shared library.
It is also possible to execute this file from the command line
to test the C code manually.
"""
from ctypes import CDLL, c_char_p
LIBRARY... | ajibawa-2023/Python-Code-Large/train/row_99949 | 13 | 29 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99949:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1552, 0.2759, 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_99949:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99949:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99949:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99949:If_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from robot import run as run_robot
import cProfile
import pstats
filename = 'robot.profile'
cProfile.run('run_robot("/home/husa/workspace/robotframework/atest/testdata/misc/")', filename)
p = pstats.Stats(filename)
p.strip_dirs().sort_stats(-1).print_stats()
| ajibawa-2023/Python-Code-Large/train/row_99951 | 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_99951:ImportFrom_L1_C0", "label": "from robot import run_robot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "robot", "arg_names": [], "import_names": ["run_robot... | [] |
from os.path import dirname, join
import subprocess
basedir = dirname(__file__)
cmd = ['pybot', '--outputdir', join(basedir, 'results'), join(basedir, 'vacalc')]
pythonpath = '%s:%s' % (join(basedir, 'lib'), join(basedir, '..', 'src'))
subprocess.call(' '.join(cmd), shell=True, env={'PYTHONPATH': pythonpath})
| ajibawa-2023/Python-Code-Large/train/row_99952 | 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_99952:ImportFrom_L1_C0", "label": "from os.path import dirname, join", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": [... | [] |
import os
import sys
import subprocess
import datetime
import tempfile
import vacalc
class VacalcLibrary(object):
def __init__(self):
self._db_file = os.path.join(tempfile.gettempdir(),
'vacalc-atestdb.csv')
def count_vacation(self, startdate, year):
res... | ajibawa-2023/Python-Code-Large/train/row_99953 | 30 | 46 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99953:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 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_99953:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99953:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99953:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99953:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-... |
from __future__ import with_statement
import os
import sys
import csv
import datetime
import tempfile
class VacalcError(Exception): pass
class EmployeeStore(object):
def __init__(self, db_file):
self._db_file = db_file
if self._db_file and os.path.isfile(self._db_file):
self._employ... | ajibawa-2023/Python-Code-Large/train/row_99954 | 95 | 146 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99954:ImportFrom_L1_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0068, 0.0068, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99954:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99954:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99954:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99954:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-... |
VALUE_FROM_VAR_FILE='Expected Value'
| ajibawa-2023/Python-Code-Large/train/row_99955 | 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_99955:Assign_L1_C0", "label": "VALUE_FROM_VAR_FILE =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 246, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VALUE_FROM_VAR_FILE", "arg_names": [], "import_names... | [] |
def this_keyword_is_in_funnylib():
print 'jee'
| ajibawa-2023/Python-Code-Large/train/row_99956 | 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_99956:FunctionDef_L1_C0", "label": "this_keyword_is_in_funnylib", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 708, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "this_keyword_is_in_funnylib", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99956:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99956:Expr_L2_C4"}] |
# Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_99957 | 126 | 295 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99957:ImportFrom_L16_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0542, 0.0034, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99957:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99957:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99957:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99957:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-... |
from Queue import Queue
from threading import Event
try:
from multiprocessing.managers import BaseManager
except ImportError:
class Python26Required(object):
def __call__(self, *args):
raise RuntimeError('Requires Python > 2.6')
def __getattr__(self, name):
raise Runt... | ajibawa-2023/Python-Code-Large/train/row_99958 | 64 | 176 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99958:ImportFrom_L1_C0", "label": "from Queue import Queue", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0057, 0.0057, 0, 0.66, 0.0, 952, 0, 1, 0, 0, 952, 0, 0], "semantic": {"name": "Queue", "arg_names": [], "import_names": ["Queue"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99958:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99958:ImportFrom_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99958:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99958:ClassDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
# -*- python -*-
# ex: set syntax=python:
import os
ROBOT_FRAMEWORK_REPOSITORY = 'http://robotframework.googlecode.com/svn/trunk/'
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
####### BUILDSLAVES
from buildbot.buildslave impo... | ajibawa-2023/Python-Code-Large/train/row_99959 | 48 | 141 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99959:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0071, 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_99959:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99959:FunctionDef_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99959:FunctionDef_L47_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99959:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-... |
from javax.swing import JFrame, JList, JPanel, JLabel, JTextField, JButton, Box, BoxLayout, JTable
from javax.swing.event import ListSelectionListener
from javax.swing.table import AbstractTableModel
from java.awt.event import ActionListener
from java.awt import FlowLayout, BorderLayout, Dimension, Font, Color
class ... | ajibawa-2023/Python-Code-Large/train/row_99963 | 161 | 234 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99963:ImportFrom_L1_C0", "label": "from javax.swing import JFrame, JList, JPanel\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0043, 0, 0.66, 0.0, 828, 0, 9, 0, 0, 828, 0, 0], "semantic": {"name": "javax.swing", "arg_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99963:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99963:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99963:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99963:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C... |
from vacalcapp import VacalcApplication
| ajibawa-2023/Python-Code-Large/train/row_99964 | 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_99964:ImportFrom_L1_C0", "label": "from vacalcapp import VacalcApplication", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 545, 0, 1, 0, 0, 545, 0, 0], "semantic": {"name": "vacalcapp", "arg_names": [], "import_nam... | [] |
#!/usr/bin/env python
"""Packaging script for Robot Framework
Usage: package.py command version_number [release_tag]
Argument 'command' can have one of the following values:
- sdist : create source distribution
- wininst : create Windows installer
- all : create both packages
- version : update on... | ajibawa-2023/Python-Code-Large/train/row_99966 | 138 | 238 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99966:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0798, 0.1387, 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_99966:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99966:Expr_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99966:FunctionDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99966:Expr_L88_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
一阶字典读
'''
def getElement_twolevel(dic, key1, key2):
if dic.has_key(key1):
if dic[key1][0] == 0:
return 0.0
if dic[key1].has_key(key2):
return 1.0 * dic[key1][key2] / dic[key1][0]
return 0.0
'''
一阶字典写
'''
def getElement_onelevel(dic, key):
if dic[0] == 0:
return 0.0
if dic.has_key(key):
return 1.0 ... | ajibawa-2023/Python-Code-Large/train/row_99968 | 24 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99968:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0588, 0.0882, 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_99968:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99968:If_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99968:If_L5_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99968:If_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99... |
'''
prerequisite:
1) allocate the term-id and doc-id;
2) build a language model for each passage (fixed window)
3) get an initialed translation model
'''
from ML import ML
from QueryManager import QueryManager
from Query import Query
from Lexicon import Lexicon
from TranslationModel import TranslationModel
from time i... | ajibawa-2023/Python-Code-Large/train/row_99969 | 195 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99969:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0184, 0.0246, 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_99969:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99969:For_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99969:For_L19_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99969:Assign_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
from os.path import exists, join
from Document import Document
from Lexicon import Lexicon
from config import *
from Query import Query
class QueryManager:
def create(self):
query_id = 0
query_file = open(query_path, 'w')
for i in xrange(doccount):
paper = Document(i)
comment_list = paper.getComments()
... | ajibawa-2023/Python-Code-Large/train/row_99970 | 31 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99970:ImportFrom_L1_C0", "label": "from os.path import exists, join", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99970:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99970:FunctionDef_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99970:FunctionDef_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99970:Assign_L10_C2"}, {"f": "ajibawa-2023/Python-Cod... |
from Lexicon import Lexicon
from ML import ML
from config import *
from TranslationModel import TranslationModel
class OfflineTranslationModel:
'''
compute offline sum P(q|w)*P(w|D)
'''
def create(self):
lexicon = Lexicon()
lexicon.load()
doc_list = []
offline_tm = []
for doc in xrange(doccount):
ml =... | ajibawa-2023/Python-Code-Large/train/row_99971 | 54 | 61 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99971:ImportFrom_L1_C0", "label": "from Lexicon import Lexicon", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 16, 0, 1, 0, 0, 16, 0, 0], "semantic": {"name": "Lexicon", "arg_names": [], "import_names": ["Lex... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99971:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99971:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99971:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99971:FunctionDef_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from config import OfflineTMSingle_path
from os.path import join
class OfflineTMSingle:
def __init__(self, docId):
self.path = join(OfflineTMSingle_path, str(docId))
def load(self):
self.model = {}
f = open(self.path, 'r')
line = f.readlines()[0]
f.close()
items = line.split()
for item in items:
s... | ajibawa-2023/Python-Code-Large/train/row_99972 | 21 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99972:ImportFrom_L1_C0", "label": "from config import OfflineTMSingle_path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99972:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99972:FunctionDef_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99972:FunctionDef_L5_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99972:Assign_L6_C2"}, {"f": "ajibawa-2023/Python-Code... |
import os
from config import *
import logging
class Document:
'''
一篇文档的对象
'''
def __init__(self, docnum):
self.path = os.path.join(datapath, str(docnum))
if not os.path.exists(self.path):
logging.error('Not exists %s' % self.path)
f = open(self.path, 'r')
lines = f.readlines()
f.close()
self.title =... | ajibawa-2023/Python-Code-Large/train/row_99973 | 27 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99973:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 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_99973:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99973:FunctionDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99973:FunctionDef_L6_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99973:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code... |
from os.path import exists, join
from Document import Document
from Lexicon import Lexicon
from config import *
class Query:
'''
for a specific query indexed by its number
'''
def __init__(self, query_id, ans_doc, query):
self.query_id = query_id
self.ans_doc = ans_doc
self.query = query
#query有三个属性,ansdo... | ajibawa-2023/Python-Code-Large/train/row_99974 | 22 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99974:ImportFrom_L1_C0", "label": "from os.path import exists, join", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99974:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99974:Expr_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99974:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99974:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
from config import *
from os.path import exists
from Document import Document
from Lexicon import Lexicon
from os import mkdir,rmdir
import os.path
class ML:
'''Generate collection-wise and document-wise information , namely P(w|C), P(w|D)'''
'''doc是一个字符串形式,字符串字面可以为数字或collection,前者代表文档的ML,后者代表集合的ML'''
def __init__(... | ajibawa-2023/Python-Code-Large/train/row_99975 | 94 | 113 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99975:ImportFrom_L1_C0", "label": "from config import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0088, 0.0088, 0, 0.66, 0.0, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99975:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99975:Expr_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99975:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99975:Expr_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
from Lexicon import Lexicon
from ML import ML
from config import *
from TranslationModel import TranslationModel
from multiprocessing import Pipe, Process
import os
from os.path import join, exists
class OfflineTranslationModel:
'''
compute offline sum P(q|w)*P(w|D)
'''
def create_multi(self, begin, end, doc_list... | ajibawa-2023/Python-Code-Large/train/row_99976 | 74 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99976:ImportFrom_L1_C0", "label": "from Lexicon import Lexicon", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0103, 0.0103, 0, 0.66, 0.0, 16, 0, 1, 0, 0, 16, 0, 0], "semantic": {"name": "Lexicon", "arg_names": [], "import_names": ["Lex... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99976:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99976:Expr_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99976:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99976:FunctionDef_L14_C1"}, {"f": "ajibawa-2023/Python-Code-La... |
from os.path import exists, join
from Document import Document
from Lexicon import Lexicon
from config import *
class TranslationModel:
def load(self, is_filt=False):
self.tm = []
for i in xrange(lexicon_size+1):
self.tm.append({})
tm_file = open(TM_path, 'r')
lines = tm_file.readlines()
tm_file.close()... | ajibawa-2023/Python-Code-Large/train/row_99977 | 107 | 131 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99977:ImportFrom_L1_C0", "label": "from os.path import exists, join", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0076, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99977:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99977:FunctionDef_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99977:FunctionDef_L8_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99977:Assign_L9_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
prerequisite:
1) allocate the term-id and doc-id;
2) build a language model for each passage (fixed window)
3) get an initialed translation model
'''
from ML import ML
from QueryManager import QueryManager
from Query import Query
from Lexicon import Lexicon
from TranslationModel import TranslationModel
from time im... | ajibawa-2023/Python-Code-Large/train/row_99978 | 144 | 175 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99978:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.02, 0.0343, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99978:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99978:For_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99978:For_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99978:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
from os.path import join, exists
from config import *
from Document import Document
class Lexicon:
'''
整个数据集的词典表示
words are 1-indexed.
'''
def create(self):
word_dict = {}
for doc in xrange(doccount):
print 'Processing %d' % doc
paper = Document(doc)
comments = ''
for com in paper.getComments():... | ajibawa-2023/Python-Code-Large/train/row_99979 | 46 | 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_99979:ImportFrom_L1_C0", "label": "from os.path import join, exists", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0159, 0.0159, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99979:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99979:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99979:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99979:FunctionDef_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#预处理之后的原始数据路径
datapath='/mnt/disk1/luyang/paper_new/prunned_data/'
#文档个数
doccount=29353
#alpha=0.2
#beta=0.3
#translation model的截断数,即1个词最多翻译到filter_num个词
filter_num=1000
#词典的路径
lexicon_path='/mnt/disk1/luyang/paper_new/prunned_data/lexicon'
#collection model的路径
collection_path='/mnt/disk1/luyang/paper_new/ML_data/colle... | ajibawa-2023/Python-Code-Large/train/row_99980 | 15 | 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_99980:Assign_L2_C0", "label": "datapath =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0625, 0.0312, 0, 0.66, 0.0, 716, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "datapath", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import sys
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self... | ajibawa-2023/Python-Code-Large/train/row_99981 | 63 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99981:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99981:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99981:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99981:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99981:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | ajibawa-2023/Python-Code-Large/train/row_99982 | 20 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99982:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99982:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99982:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99982:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99982:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | ajibawa-2023/Python-Code-Large/train/row_99983 | 50 | 111 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99983:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99983:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99983:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99983:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99983:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | ajibawa-2023/Python-Code-Large/train/row_99984 | 42 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99984:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99984:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99984:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99984:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99984:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | ajibawa-2023/Python-Code-Large/train/row_99985 | 44 | 114 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99985:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99985:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99985:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99985:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99985:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/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_99986 | 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_99986: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_99986:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99986:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99986:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99986:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python2.6
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | ajibawa-2023/Python-Code-Large/train/row_99987 | 112 | 277 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99987:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 18], "level": 0, "parent": null, "vector": [8, 0, 0.065, 0.0036, 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_99987:FunctionDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99987:Expr_L61_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99987:FunctionDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99987:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
este script parsea los atributos de personajes y ciudades descargando los datos de
la url especificada en URL, y los guarda en formato JSON.
require python 2.7
'''
import urllib2
import re
import json
from __builtin__ import file
URL = r'http://www.gamefaqs.com/sms/588168-where-in-the-world-is-ca... | ajibawa-2023/Python-Code-Large/train/row_99988 | 68 | 127 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99988:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0276, 0.0472, 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_99988:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99988:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99988:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99988:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/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_99989 | 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_99989: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_99989:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99989:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99989:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99989:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Jaime Blasco on 2009-09-15
Uploaed to Labs on 2011-09-26 <--- First contribution :P
License:
Copyright (c) 2009 AlienVault
All rights reserved.
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... | ajibawa-2023/Python-Code-Large/train/row_99990 | 307 | 435 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99990:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 34], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0713, 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_99990:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99990:FunctionDef_L55_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99990:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99990:Assign_L56_C2"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Jaime Blasco on 2009-09-15
Uploaed to Labs on 2011-09-26 <--- First contribution :P
License:
Copyright (c) 2009 AlienVault
All rights reserved.
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... | ajibawa-2023/Python-Code-Large/train/row_99991 | 307 | 435 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99991:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 34], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0713, 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_99991:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99991:FunctionDef_L55_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99991:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_99991:Assign_L56_C2"}, {"f": "ajibawa-2023/Python-... |
'''GTK User Interface code for ClearCutter'''
__author__ = "CP Constantine"
__email__ = "conrad@alienvault.com"
__copyright__ = 'Copyright:Alienvault 2012'
__credits__ = ["Conrad Constantine"]
__version__ = "0.1"
__license__ = "BSD"
__status__ = "Prototype"
__maintainer__ = "CP Constantine"
import gtk, gtk.glade, py... | ajibawa-2023/Python-Code-Large/train/row_99992 | 22 | 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_99992:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0312, 0.0312, 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_99992:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99992:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99992:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99992:Assign_L18_C4"}, {"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.