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-2012 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_88864 | 32 | 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_88864:ImportFrom_L15_C0", "label": "from operator import itemgetter", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0167, 0, 0.66, 0.0, 616, 0, 1, 0, 0, 616, 0, 0], "semantic": {"name": "operator", "arg_names": [], "import_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88864:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88864:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88864:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88864:Return_L24_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2012 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_88865 | 24 | 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_88865:ImportFrom_L15_C0", "label": "from robot.output.xmllogger import XmlLogger", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.283, 0.0189, 0, 0.66, 0.0, 793, 0, 1, 0, 0, 793, 0, 0], "semantic": {"name": "robot.output.xmllogger", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88865:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88865:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88865:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88865:Expr_L26_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2008-2012 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_88866 | 63 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88866:ImportFrom_L15_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1304, 0.0087, 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_88866:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88866:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88866:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88866:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2012 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_88867 | 85 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88867:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.102, 0.0068, 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_88867:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88867:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88867:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88867:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2008-2012 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_88868 | 11 | 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_88868:ImportFrom_L15_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0333, 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_88868:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88868:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88868:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88868:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2008-2012 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_88869 | 21 | 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_88869:ImportFrom_L15_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.3261, 0.0217, 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_88869:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88869:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88869:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88869:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2008-2012 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_88870 | 7 | 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_88870:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.6296, 0.1852, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [] |
# Copyright 2008-2012 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_88871 | 3 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88871:Try_L15_C0", "label": "try", "type": "try", "loc": [15, 18], "level": 0, "parent": null, "vector": [7, 0, 0.9167, 0.2222, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88871:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88871:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88871:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88871:ImportFrom_L18_C4"}] |
#!/usr/bin/env python
# Copyright 2008-2012 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_88872 | 32 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88872:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 28], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.1333, 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_88872:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88872:ImportFrom_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88872:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88872:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
# Copyright 2008-2012 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_88873 | 54 | 103 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88873:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 36], "level": 0, "parent": null, "vector": [8, 0, 0.2573, 0.1942, 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_88873:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88873:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88873:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88873:Assign_L48_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_88874 | 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_88874: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_88874:FunctionDef_L75_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88874:Try_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88874:Try_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88874:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
# Copyright 2008-2012 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_88875 | 126 | 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_88875:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0852, 0.0057, 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_88875:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88875:Import_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88875:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88875:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
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_88876 | 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_88876: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_88876:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88876:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88876:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88876: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_88877 | 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_88877: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_88877:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88877:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88877:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88877: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_88879 | 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_88879: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_88879:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88879:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88879:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88879:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
# Copyright 2008-2012 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_88880 | 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_88880: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_88880:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88880:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88880:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88880:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/env python
# Copyright 2008-2012 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_88883 | 115 | 190 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88883:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 39], "level": 0, "parent": null, "vector": [8, 0, 0.1474, 0.1211, 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_88883:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88883:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88883:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88883: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_88885 | 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_88885: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_88885:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88885:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88885:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88885: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_88886 | 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_88886: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_88886:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88886:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88886:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88886: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_88887 | 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_88887: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_88887:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88887:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88887:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88887: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_88888 | 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_88888: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_88888:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88888:ImportFrom_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88888:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88888: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)
XML (xm)
"""
import sys
import os
import re
ROOT = os.path.normpath(os.path.join(os.path.abspath(__file__),'..','..','..')... | ajibawa-2023/Python-Code-Large/train/row_88889 | 25 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88889:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 14], "level": 0, "parent": null, "vector": [8, 0, 0.1771, 0.25, 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_88889:For_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88889:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88889:For_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88889:If_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
#!/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_88890 | 127 | 265 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88890:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0453, 0.0717, 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_88890:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88890:Try_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88890:Try_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88890:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
#! /usr/bin/env python
"""generate.py -- Generate Robot Framework API documentation
usage: generate.py
This script creates API documentation from both Python and Java source code
included in `src/python and `src/java`, respectively. Python autodocs are
created in `doc/api/autodoc` and Javadocs in `doc/api/_static/ja... | ajibawa-2023/Python-Code-Large/train/row_88891 | 41 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88891:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 14], "level": 0, "parent": null, "vector": [8, 0, 0.1214, 0.1714, 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_88891:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88891:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88891:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88891:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/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.result import ExecutionResult
def c... | ajibawa-2023/Python-Code-Large/train/row_88892 | 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_88892: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_88892:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88892:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88892:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88892: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_88893 | 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_88893: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_88893:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88893:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88893:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88893: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_88894 | 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_88894: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_88894:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88894:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88894:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88894: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_88896 | 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_88896: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... | [] |
VALUE_FROM_VAR_FILE='Expected Value'
| ajibawa-2023/Python-Code-Large/train/row_88897 | 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_88897: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_88898 | 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_88898: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_88898:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88898:Expr_L2_C4"}] |
# Copyright 2008-2012 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_88899 | 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_88899: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_88899:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88899:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88899:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88899: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_88900 | 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_88900: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_88900:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88900:ImportFrom_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88900:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88900:ClassDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
#!/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_88903 | 161 | 273 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88903:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0696, 0.1209, 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_88903:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88903:Expr_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88903:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88903:Expr_L95_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_88904 | 133 | 305 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88904:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88904:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88904:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88904:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88904:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_88905 | 189 | 572 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88905:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0297, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88905:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88905:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88905:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88905:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_88907 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88907:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 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_88907:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88907:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88907:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88907:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88908 | 214 | 544 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88908:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0303, 0.0074, 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_88908:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88908:Import_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88908:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88908:Try_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_88909 | 90 | 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_88909:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0711, 0.004, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88909:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88909:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88909:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88909:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_88910 | 155 | 366 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88910:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0451, 0.0765, 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_88910:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88910:Import_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88910:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88910:Try_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88912 | 348 | 953 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88912:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0173, 0.0042, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88912:Try_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88912:ImportFrom_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88912:Try_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88912:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88913 | 37 | 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_88913:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1504, 0.0442, 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_88913:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88913:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88913:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88913:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88914 | 38 | 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_88914:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1848, 0.0543, 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_88914:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88914:Import_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88914:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88914:Try_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88915 | 55 | 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_88915:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1491, 0.0439, 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_88915:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88915:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88915:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88915:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88916 | 374 | 940 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88916:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 20], "level": 0, "parent": null, "vector": [8, 0, 0.0186, 0.0064, 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_88916:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88916:Expr_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88916:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88916:FunctionDef_L54_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_88917 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88917:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88917:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88917:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88917:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88917:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88918 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88918:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88918:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88918:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88918:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88918:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88919 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88919:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88919:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88919:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88919:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88919:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88920 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88920:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88920:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88920:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88920:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88920:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88922 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88922:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88922:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88922:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88922:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88922:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88924 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88924:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88924:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88924:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88924:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88924:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88925 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88925:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88925:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88925:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88925:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88925:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_88926 | 145 | 366 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88926:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0546, 0.0191, 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_88926:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88926:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88926:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88926:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_88927 | 49 | 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_88927:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.0439, 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_88927:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88927:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88927:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88927:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_88928 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88928:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88928:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88928:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88928:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88928:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_88930 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88930:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88930:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88930:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88930:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88930:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_88931 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88931:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88931:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88931:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88931:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_88931:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_88932 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88932:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88932:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88932:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88932:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88932:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_88933 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88933:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88933:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88933:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88933:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88933:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_88934 | 9 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88934:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88934:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88934:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88934:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88934:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_88936 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88936:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88936:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88936:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88936:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_88936:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_88937 | 218 | 605 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88937:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88937:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88937:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88937:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88937:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_88938 | 133 | 305 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88938:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88938:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88938:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88938:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88938:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_88940 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88940:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88940:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88940:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88940:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88940:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_88941 | 9 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88941:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88941:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88941:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88941:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88941:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_88942 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88942:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88942:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88942:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88942:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88942:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_88944 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88944:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88944:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88944:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88944:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88944:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88945 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88945:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88945:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88945:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88945:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88945:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88946 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88946:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88946:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88946:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88946:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88946:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88947 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88947:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88947:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88947:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88947:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88947:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_88949 | 86 | 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_88949:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88949:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88949:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88949:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88949:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88950 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88950:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88950:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88950:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88950:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88950:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_88952 | 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_88952:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88953 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88953:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88953:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88953:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88953:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88953:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_88954 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88954:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88954:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88954:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88954:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_88954:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_88955 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88955:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88955:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88955:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88955:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88955:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88957 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88957:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88957:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88957:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88957:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88957:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_88958 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88958:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88958:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88958:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88958:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88958:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88960 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88960:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88960:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88960:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88960:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88960:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88961 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88961:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88961:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88961:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88961:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88961:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88962 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88962:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88962:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88962:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88962:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88962:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_88964 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88964:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88964:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88964:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88964:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88964:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_88965 | 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_88965:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88966 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88966:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88966:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88966:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88966:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88966:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_88967 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88967:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88967:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88967:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88967:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88967:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_88968 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88968:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88968:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88968:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88968:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_88968:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_88969 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88969:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 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_88969:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88969:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88969:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88969:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_88970 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88970:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88970:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88970:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88970:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88970:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_88971 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88971:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88971:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88971:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88971:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88971:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementat... | ajibawa-2023/Python-Code-Large/train/row_88974 | 119 | 313 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88974:Expr_L46_C0", "label": "expression", "type": "expression", "loc": [46, 47], "level": 0, "parent": null, "vector": [8, 0, 0.1486, 0.0064, 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_88974:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88974:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88974:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88974:Try_L61_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
#This script is not really portable. It's just to automate some manual steps I usually do when releasing.
#It might evolve into someting more robust but for now it's ok for me.
import os
import shutil
def run(cmd):
print("\nRunning command: " + cmd)
if os.system(cmd) == 0: print("\nWarning, command failed... | ajibawa-2023/Python-Code-Large/train/row_88975 | 12 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88975:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.2105, 0.0526, 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_88975:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88975:Expr_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88975:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88975:If_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#This script is not really portable. It's just to automate some manual steps I usually do when releasing.
#It might evolve into someting more robust but for now it's ok for me.
import os
def run(cmd):
print("\nRunning command: " + cmd)
assert os.system(cmd) == 0, "\nCommand failed: " + cmd
ant_cmd = 'an... | ajibawa-2023/Python-Code-Large/train/row_88976 | 56 | 84 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88976:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0119, 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_88976:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88976:Expr_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88976:If_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88976:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
import shutil
import os
import os.path
def run(cmd):
print("\nRunning command: " + cmd)
assert os.system(cmd) == 0, "\nCommand failed: " + cmd
def go(work_dir):
os.chdir(work_dir)
assert os.path.exists('maven')
print("Copying maven-metdata.xml files...")
shutil.copy('maven/repo... | ajibawa-2023/Python-Code-Large/train/row_88977 | 20 | 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_88977:Import_L1_C0", "label": "shutil import shutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88977:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88977:Expr_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88977:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88977:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88978 | 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 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88979 | 96 | 157 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88979:Import_L19_C0", "label": "tarfile import tarfile", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.121, 0.0064, 0, 0.66, 0.0, 223, 0, 1, 0, 0, 223, 0, 0], "semantic": {"name": "tarfile", "arg_names": [], "import_names": ["tarfile"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88979:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88979:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88979:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88979:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88980 | 202 | 289 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88980:Import_L15_C0", "label": "numpy import n", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0519, 0.0035, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["n"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88980:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88980:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88980:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88980:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88981 | 191 | 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_88981:ImportFrom_L15_C0", "label": "from python_util.data import *", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0515, 0.0034, 0, 0.66, 0.0, 260, 0, 1, 0, 0, 260, 0, 0], "semantic": {"name": "python_util.data", "arg_names": [], "imp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88981:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88981:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88981:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88981:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88982 | 27 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88982:ImportFrom_L15_C0", "label": "from python_util.gpumodel import *", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2778, 0.0185, 0, 0.66, 0.0, 658, 0, 1, 0, 0, 658, 0, 0], "semantic": {"name": "python_util.gpumodel", "arg_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88982:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88982:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88982:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88982:Return_L21_C4"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88984 | 141 | 183 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88984:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0055, 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_88984:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88984:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88984:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88984:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88986 | 57 | 94 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88986:Import_L15_C0", "label": "re import re", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1596, 0.0106, 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_88986:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88986:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88986:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88986:If_L28_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | ajibawa-2023/Python-Code-Large/train/row_88988 | 126 | 194 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88988:Import_L15_C0", "label": "numpy import n", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0773, 0.0052, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["n"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88988:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88988:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88988:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_88988:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.