code stringlengths 1 1.49M | file_id stringlengths 42 46 | node_count int64 0 7.38k | total_lines int64 1 20.9k | vector_dim int64 15 15 | vector_labels stringclasses 1
value | nodes stringlengths 2 3.75M | connections stringlengths 2 964k |
|---|---|---|---|---|---|---|---|
#!/usr/bin/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_90859 | 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_90859: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_90859:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90859:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90859:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90859: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_90860 | 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_90860: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_90860:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90860:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90860:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90860:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_90862 | 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_90862: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_90863 | 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_90863: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_90863:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90863:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90863:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90863: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_90864 | 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_90864: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_90864:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90864:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90864:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_90864: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_90865 | 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_90865: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_90865:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90865:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90865:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90865: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_90867 | 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_90867: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_90867:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90867:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90867:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90867: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_90868 | 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_90868: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_90868:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90868:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90868:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90868: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_90870 | 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_90870: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_90870:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90870:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90870:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90870: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_90871 | 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_90871: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_90871:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90871:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90871:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90871: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_90872 | 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_90872: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_90872:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90872:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90872:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90872: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_90874 | 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_90874: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_90874:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90874:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90874:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90874:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_90875 | 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_90875: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_90876 | 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_90876: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_90876:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90876:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90876:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90876: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_90877 | 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_90877: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_90877:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90877:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90877:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90877: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_90878 | 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_90878: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_90878:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90878:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90878:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_90878: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_90879 | 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_90879: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_90879:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90879:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90879:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90879: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_90880 | 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_90880: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_90880:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90880:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90880:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90880: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_90881 | 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_90881: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_90881:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90881:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90881:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90881:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/env python
import logging
from oauth2client.keyring_storage import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run
from httplib2 import Http
import json
from cmislib.model import CmisClient, CmisException
import os, pwd
NETWORK = 'alfresco.com'
SITE = 'alf... | ajibawa-2023/Python-Code-Large/train/row_90884 | 57 | 96 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90884:Import_L2_C0", "label": "logging import logging", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0104, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90884:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90884:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90884:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90884:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#! /usr/bin/env python
import logging
from oauth2client.keyring_storage import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run
from httplib2 import Http
import json
import os, pwd
uid = pwd.getpwuid( os.getuid() )[ 0 ]
storage = Storage("Jeff's Sample Python App", uid... | ajibawa-2023/Python-Code-Large/train/row_90885 | 25 | 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_90885:Import_L2_C0", "label": "logging import logging", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90885:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90885:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90885:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90885:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#! /usr/bin/env python
import logging
from oauth2client.keyring_storage import Storage
from oauth2client.client import flow_from_clientsecrets
from oauth2client.tools import run
from httplib2 import Http
import json
from cmislib.model import CmisClient
import os, pwd
uid = pwd.getpwuid(os.getuid())[0]
storage = Storag... | ajibawa-2023/Python-Code-Large/train/row_90886 | 25 | 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_90886:Import_L2_C0", "label": "logging import logging", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0294, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90886:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90886:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90886:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90886:Expr_L21_C4"}] |
#!/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_90887 | 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_90887: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_90887:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90887:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90887:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90887: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_90888 | 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_90888: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_90888:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90888:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90888:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90888: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_90890 | 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_90890: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_90890:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90890:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90890:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90890: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_90891 | 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_90891: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_90891:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90891:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90891:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90891: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_90892 | 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_90892: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_90892:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90892:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90892:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90892: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_90894 | 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_90894: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_90894:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90894:Import_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90894:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90894: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_90895 | 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_90895: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_90895:Try_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90895:ImportFrom_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90895:Try_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90895:ImportFrom_L38_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_90896 | 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_90896: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_90896:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90896:Import_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90896:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90896: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_90897 | 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_90897: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_90897:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90897:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90897:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90897: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_90898 | 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_90898: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_90898:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90898:Import_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90898:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90898: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_90899 | 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_90899: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_90899:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90899:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90899:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90899:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# 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_90900 | 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_90900: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_90900:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90900:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90900:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90900:Try_L27_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_90901 | 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_90901: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_90901:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90901:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90901:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_90901: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_90902 | 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_90902: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_90902:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90902:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90902:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90902: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_90903 | 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_90903: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_90903:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90903:Expr_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90903:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90903:FunctionDef_L54_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_90904 | 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_90904: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_90904:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90904:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90904:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90904: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_90905 | 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_90905: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_90905:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90905:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90905:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90905: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_90907 | 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_90907: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_90907:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90907:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90907:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90907: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_90908 | 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_90908: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_90908:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90908:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90908:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90908: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_90909 | 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_90909: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_90909:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90909:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90909:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90909: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_90911 | 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_90911: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_90911:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90911:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90911:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90911:Expr_L35_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_90912 | 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_90912: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_90912:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90912:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90912:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90912: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_90913 | 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_90913: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_90913:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90913:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90913:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90913: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_90914 | 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_90914: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_90914:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90914:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90914:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_90914: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_90915 | 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_90915: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_90915:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90915:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90915:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90915: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_90916 | 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_90916: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_90916:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90916:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90916:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90916: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_90917 | 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_90917: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_90917:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90917:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90917:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90917:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
from google.appengine.ext import webapp
from google.appengine.api import memcache
from google.appengine.ext.webapp.util import run_wsgi_app
from versionhandler import VersionHandler
from metrichandler import MetricHandler
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers... | ajibawa-2023/Python-Code-Large/train/row_90920 | 15 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90920:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90920:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90920:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90920:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90920:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod... |
import logging
import pprint
import re
from google.appengine.ext import webapp
from metricentry import MetricEntry
from utils import ip_info
CURRENT_VERSION = "0.6.10"
RX_VERSION_CHUNKER = re.compile(r"\s*DwarfTherapist\s+(\d+)\.(\d+)\.(\d+)\s*")
class VersionHandler(webapp.RequestHandler):
def get(self,... | ajibawa-2023/Python-Code-Large/train/row_90921 | 27 | 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_90921:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90921:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90921:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90921:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90921:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-... |
import logging
import urllib
from xml.etree import ElementTree as ET
from pprint import pformat
xml_to_dict_map = {
'CountryCode': 'country',
'RegionName': 'region_name',
'RegionCode': 'region_code',
'City': 'city'
}
def ip_info(ip):
"""
<?xml version="1.0" encoding="UTF-8"?>
<Respo... | ajibawa-2023/Python-Code-Large/train/row_90922 | 23 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90922:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90922:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90922:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90922:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90922:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code... |
from google.appengine.ext import webapp
import pprint
import logging
class MetricHandler(webapp.RequestHandler):
def get(self, *args):
self.response.headers['Content-Type'] = 'text/html'
info = ip_info("96.253.131.222")
self.response.out.write("Metrics must be posted! %s<br/>%s" % (... | ajibawa-2023/Python-Code-Large/train/row_90923 | 12 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90923:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90923:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90923:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90923:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90923:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
import datetime
from google.appengine.ext import db
class MetricEntry(db.Model):
ip = db.StringProperty()
city = db.StringProperty()
region_code = db.StringProperty()
region_name = db.StringProperty()
country = db.StringProperty()
dt_version_major = db.IntegerProperty()
dt_version... | ajibawa-2023/Python-Code-Large/train/row_90924 | 13 | 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_90924:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90924:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90924:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90924:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90924:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Author: Srinath Avadhanula
# This file is distributed as part of the vim-latex project
# http://vim-latex.sf.net
import re
class Bibliography(dict):
def __init__(self, txt, macros={}):
"""
txt:
a string which represents the entire bibtex entry. A typical
entry is of the f... | ajibawa-2023/Python-Code-Large/train/row_90925 | 114 | 221 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90925:Import_L5_C0", "label": "re import re", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0226, 0.0045, 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_90925:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90925:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90925:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90925:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import string, vim, re, os, glob
# catFile: assigns a local variable retval to the contents of a file {{{
def catFile(filename):
try:
file = open(filename)
lines = ''.join(file.readlines())
file.close()
except:
lines = ''
# escape double quotes and backslashes before quoting the string so
# everything pass... | ajibawa-2023/Python-Code-Large/train/row_90926 | 30 | 52 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90926:Import_L1_C0", "label": "string import string, vim, re\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0192, 0, 0.66, 0.0, 890, 0, 5, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90926:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90926:Try_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90926:Try_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_90926:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
import random, sys, threading, time
from java.util import ArrayList
from no.priv.garshol.duke import ConfigLoader, Processor, Property, DukeConfigException
from no.priv.garshol.duke.utils import ObjectUtils
from no.priv.garshol.duke.matchers import TestFileListener
POPULATION_SIZE = 100
POPULATIONS = 100
def round(n... | ajibawa-2023/Python-Code-Large/train/row_90929 | 209 | 321 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90929:Import_L2_C0", "label": "random import random, sys, threading\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0031, 0, 0.66, 0.0, 715, 0, 4, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90929:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90929:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90929:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90929:For_L15_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
from optparse import OptionParser
import re
import subprocess
import sys
"""
This script generates a release note from the output of git log
between the specified tags.
Options:
--issues Show output the commits with issues associated with them.
--issue-numbers Show outputs issue numbers o... | ajibawa-2023/Python-Code-Large/train/row_90932 | 45 | 107 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90932:ImportFrom_L2_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0187, 0.0093, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90932:If_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90932:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90932:If_L73_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90932:For_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9093... |
import cgi
import datetime
import urllib
import wsgiref.handlers
import random
import datetime
from django.utils import simplejson
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class Score(db.Model):
name=db.StringProperty()
... | ajibawa-2023/Python-Code-Large/train/row_90933 | 75 | 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_90933:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0074, 0.0074, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90933:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90933:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90933:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90933:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
print 'Content-Type: text/plain'
print ''
print 'You probably want /tetris ...'
| ajibawa-2023/Python-Code-Large/train/row_90934 | 3 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90934:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print",... | [] |
import sys, os
import speech
speech.say("Hello, Bryan. Welcome back")
speech.say("Would you like me to turn on the lights?")
| ajibawa-2023/Python-Code-Large/train/row_90935 | 4 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90935:Import_L1_C0", "label": "sys import sys, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os"], "rhs_call_n... | [] |
#!/usr/bin/env python
#==============================================================================
# PyTyle - An on-demand tiling manager
# Copyright (C) 2009-2010 Andrew Gallant <andrew@pytyle.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | ajibawa-2023/Python-Code-Large/train/row_90936 | 8 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90936:Import_L1_C0", "label": "traceback import traceback, sys, time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 423, 0, 3, 0, 0, 423, 0, 0], "semantic": {"name": "traceback", "arg_names": [], "import_nam... | [] |
#==============================================================================
# PyTyle - An on-demand tiling manager
# Copyright (C) 2009-2010 Andrew Gallant <andrew@pytyle.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | ajibawa-2023/Python-Code-Large/train/row_90937 | 11 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90937:Import_L20_C0", "label": "sys import sys", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.3636, 0.0182, 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_90937:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90937:Import_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90937:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90937:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
import ptxcb
from tile import Tile
from container import Container
class ManualTile(Tile):
def __init__(self, monitor):
Tile.__init__(self, monitor)
self.root = None
self.catchall = None
#
# Helper methods
#
def add(self, win):
if (
win.tilable() and s... | ajibawa-2023/Python-Code-Large/train/row_90938 | 574 | 1,019 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90938:Import_L1_C0", "label": "ptxcb import ptxcb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.001, 0.001, 0, 0.66, 0.0, 805, 0, 1, 0, 0, 805, 0, 0], "semantic": {"name": "ptxcb", "arg_names": [], "import_names": ["ptxcb"], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90938:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90938:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90938:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90938:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import ptxcb
class Workspace(object):
WORKSPACES = {}
@staticmethod
def add(wsid):
Desktop.add(wsid)
@staticmethod
def iter_all_monitors():
for wsid in Workspace.WORKSPACES:
for mon in Workspace.WORKSPACES[wsid].iter_monitors():
yield mon
@staticme... | ajibawa-2023/Python-Code-Large/train/row_90939 | 46 | 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_90939:Import_L1_C0", "label": "ptxcb import ptxcb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 0, 0.66, 0.0, 805, 0, 1, 0, 0, 805, 0, 0], "semantic": {"name": "ptxcb", "arg_names": [], "import_names": ["ptxcb"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90939:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90939:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90939:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90939:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
import time
import config
import ptxcb
import state
import tilers
from command import Command
from window import Window
from tile import Tile
class Dispatcher(object):
def __init__(self, event_data):
self._event_data = event_data
self._stop = False
assert 'event' in self._event_data
... | ajibawa-2023/Python-Code-Large/train/row_90940 | 72 | 120 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90940:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90940:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90940:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90940:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90940:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-... |
from tile import Tile
from container import Container
class AutoTile(Tile):
def __init__(self, monitor):
Tile.__init__(self, monitor)
self.store = None
self.cycle_index = 0
#
# Helper methods
#
def add(self, win):
if (
win.tilable() and self.tiling and
... | ajibawa-2023/Python-Code-Large/train/row_90941 | 218 | 322 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90941:ImportFrom_L1_C0", "label": "from tile import Tile", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 0, 0.66, 0.0, 319, 0, 1, 0, 0, 319, 0, 0], "semantic": {"name": "tile", "arg_names": [], "import_names": ["Tile"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90941:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90941:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90941:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90941:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import re
import config
from command import Command
from container import Container
class Tile(object):
queue_tile = set()
@staticmethod
def dispatch(monitor, command):
assert isinstance(command, Command)
tiler = monitor.get_tiler()
if tiler:
if tiler.get_name() == '... | ajibawa-2023/Python-Code-Large/train/row_90942 | 124 | 207 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90942:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0048, 0.0048, 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_90942:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90942:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90942:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90942:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import time
import ptxcb
import config
from command import Command
from window import Window
from monitor import Monitor
from workspace import Workspace
from container import Container
_ACTIVE = None
pointer_grab = False
moving = False
properties = {}
xinerama = ptxcb.connection.xinerama_get_screens()
def init():
... | ajibawa-2023/Python-Code-Large/train/row_90943 | 164 | 272 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90943:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90943:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90943:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90943:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90943:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import math
from pt.tile_auto import AutoTile
class Vertical(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.hsplit = self.get_option('width_factor')
#
# Helper methods
#
def decrement_hsplit(self):
self.hsplit -= self.get_option('step_size'... | ajibawa-2023/Python-Code-Large/train/row_90944 | 82 | 167 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90944:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90944:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90944:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90944:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90944:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import math
from pt.tile_auto import AutoTile
class Center(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.hsplit = self.get_option('width_factor')
self.vsplit = self.get_option('height_factor')
self.columns = self.get_option('columns')
#
# H... | ajibawa-2023/Python-Code-Large/train/row_90945 | 63 | 121 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90945:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90945:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90945:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90945:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90945:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from pt.tile_auto import AutoTile
class Maximal(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
#
# Commands
#
def cmd_tile(self):
AutoTile.cmd_tile(self)
if not self.store.all():
return
# Do master last, in case decorations a... | ajibawa-2023/Python-Code-Large/train/row_90946 | 13 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90946:ImportFrom_L1_C0", "label": "from pt.tile_auto import AutoTile", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 0, 0.66, 0.0, 988, 0, 1, 0, 0, 988, 0, 0], "semantic": {"name": "pt.tile_auto", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90946:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90946:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90946:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90946:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import pt.tile_manual
import cascade
import center
import horizontal
import maximal
import vertical
ManualTile = pt.tile_manual.ManualTile
Cascade = cascade.Cascade
Center = center.Center
Horizontal = horizontal.Horizontal
HorizontalRows = horizontal.HorizontalRows
Maximal = maximal.Maximal
Vertical = vertical.Verti... | ajibawa-2023/Python-Code-Large/train/row_90947 | 14 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90947:Import_L1_C0", "label": "pt.tile_manual import pt.tile_manual", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 744, 0, 1, 0, 0, 744, 0, 0], "semantic": {"name": "pt.tile_manual", "arg_names": [], "import... | [] |
import math
from pt.tile_auto import AutoTile
class Cascade(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.hsplit = self.get_option('width_factor')
self.vsplit = self.get_option('height_factor')
#
# Helper methods
#
def raise_active(self):
... | ajibawa-2023/Python-Code-Large/train/row_90948 | 90 | 164 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90948:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0061, 0.0061, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90948:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90948:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90948:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90948:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import math
from pt.tile_auto import AutoTile
class Horizontal(AutoTile):
def __init__(self, monitor):
AutoTile.__init__(self, monitor)
self.vsplit = self.get_option('height_factor')
#
# Helper methods
#
def decrement_vsplit(self):
self.vsplit -= self.get_option('step_si... | ajibawa-2023/Python-Code-Large/train/row_90949 | 80 | 163 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90949:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0061, 0.0061, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90949:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90949:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90949:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90949:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
class Grid(object):
def __init__(self):
pass
| ajibawa-2023/Python-Code-Large/train/row_90950 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90950:ClassDef_L1_C0", "label": "Grid", "type": "class", "loc": [1, 3], "level": 0, "parent": null, "vector": [3, 0, 0.6667, 1.0, 0, 0.66, 0.0, 690, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "Grid", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90950:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90950:FunctionDef_L2_C4"}] |
# Library imports
import config
import ptxcb
import tilers
# Class imports
from workspace import Workspace
class Monitor(object):
@staticmethod
def add(wsid, xinerama):
for mid, screen in enumerate(xinerama):
new_mon = Monitor(
Workspace.WORKSPACES[wsid],
mi... | ajibawa-2023/Python-Code-Large/train/row_90951 | 139 | 237 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90951:Import_L2_C0", "label": "config import config", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0042, 0, 0.66, 0.0, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["config"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90951:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90951:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90951:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_90951:For_L12_C8"}, {"f": "ajibawa-2023/Python-Code... |
import time
import ptxcb
import config
from workspace import Workspace
class Window(object):
WINDOWS = {}
@staticmethod
def add(wid):
if wid not in Window.WINDOWS:
if Window.manageable(wid):
win = Window(wid)
Window.WINDOWS[wid] = win
... | ajibawa-2023/Python-Code-Large/train/row_90952 | 221 | 363 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90952:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90952:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90952:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90952:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90952:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import ptxcb
import config
from window import BogusWindow
class Container(object):
idinc = 1
active = None
@staticmethod
def manage_focus(win):
if win and win.container:
win.container.borders_activate(win.container.tiler.decor)
elif Container.active:
Container.... | ajibawa-2023/Python-Code-Large/train/row_90953 | 128 | 201 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90953:Import_L1_C0", "label": "ptxcb import ptxcb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.005, 0.005, 0, 0.66, 0.0, 805, 0, 1, 0, 0, 805, 0, 0], "semantic": {"name": "ptxcb", "arg_names": [], "import_names": ["ptxcb"], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90953:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90953:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90953:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90953:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
import xcb.xproto
import ptxcb
import config
class Command:
_cmds = {}
_mods = {
'alt': xcb.xproto.ModMask._1,
'ctrl': xcb.xproto.ModMask.Control,
'shift': xcb.xproto.ModMask.Shift,
'super': xcb.xproto.ModMask._4,
'menu': xcb.xproto.ModMask._3
}
def __init__(se... | ajibawa-2023/Python-Code-Large/train/row_90954 | 56 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90954:Import_L1_C0", "label": "xcb.xproto import xcb.xproto", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0103, 0.0103, 0, 0.66, 0.0, 490, 0, 1, 0, 0, 490, 0, 0], "semantic": {"name": "xcb.xproto", "arg_names": [], "import_names": ["x... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90954:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90954:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90954:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90954:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
import struct
import xcb.xproto, xcb.xcb, xcb.xinerama, xcb.randr
conn = None
setup = None
syms_to_codes = {}
codes_to_syms = {}
def init():
global conn, setup
conn = xcb.xcb.connect()
setup = conn.get_setup()
init_keymap()
def init_keymap():
global setup, syms_to_codes, codes_to_syms
q ... | ajibawa-2023/Python-Code-Large/train/row_90956 | 51 | 108 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90956:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90956:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90956:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90956:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90956:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
import struct
import xcb.xproto
import connection
from atoms import atoms
class Atom:
_cache = {}
@staticmethod
def build_cache():
if Atom._cache:
return
for atom in atoms:
Atom._cache[atom] = connection.get_core().InternAtom(
False,
... | ajibawa-2023/Python-Code-Large/train/row_90957 | 41 | 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_90957:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0119, 0.0119, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90957:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90957:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90957:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90957:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
atoms = {
'_PYTYLE_TYPE': ('ATOM', 32),
'_PYTYLE_TYPE_PLACE_HOLDER': ('ATOM', 32),
'_PYTYLE_TYPE_BORDER': ('ATOM', 32),
'WM_CLASS': ('STRING', 8),
'WM_HINTS': ('WM_HINTS', 32),
'WM_NAME': ('STRING', 8),
'WM_NORMAL_HINTS': ('WM_SIZE_HINTS', 32),
'WM_PROTOCOLS': ('ATOM', 32),
'WM_STAT... | ajibawa-2023/Python-Code-Large/train/row_90958 | 4 | 101 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90958:Assign_L1_C0", "label": "atoms =", "type": "assigned_variable", "loc": [1, 54], "level": 0, "parent": null, "vector": [14, 0, 0.2723, 0.5347, 0, 0.66, 0.0, 715, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "atoms", "arg_names": [], "import_names": [], "rhs_call_name... | [] |
import xcb.xproto
from window import Window
from window import XROOT
from atom import Atom
def dispatch(e):
NotifyModes = {
0: 'Normal', 1: 'Grab', 2: 'Ungrab', 3: 'WhileGrabbed'
}
NotifyDetails = {
0: 'Ancestor', 1: 'Virtual', 2: 'Inferior', 3: 'Nonlinear',
4: 'NonlinearVirtual',... | ajibawa-2023/Python-Code-Large/train/row_90959 | 28 | 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_90959:Import_L1_C0", "label": "xcb.xproto import xcb.xproto", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 0, 0.66, 0.0, 490, 0, 1, 0, 0, 490, 0, 0], "semantic": {"name": "xcb.xproto", "arg_names": [], "import_names": ["x... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90959:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90959:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90959:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90959:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-... |
import struct, traceback, time
import xcb.xproto, xcb.xcb
import connection
from atom import Atom
from events import events
class Window(object):
queue = []
@staticmethod
def exec_queue():
for tup in Window.queue:
tup[0](*tup[1:])
Window.queue = []
def __init__(self, wid... | ajibawa-2023/Python-Code-Large/train/row_90960 | 283 | 650 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90960:Import_L1_C0", "label": "struct import struct, traceback, time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0015, 0.0015, 0, 0.66, 0.0, 399, 0, 3, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90960:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90960:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90960:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90960:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-... |
import atom
import connection
import event
import keysyms
import window
Atom = atom.Atom
BlankWindow = window.BlankWindow
LineWindow = window.LineWindow
RootWindow = window.RootWindow
Window = window.Window
keysyms = keysyms.keysyms
atoms = atoms.atoms
XROOT = window.XROOT
| ajibawa-2023/Python-Code-Large/train/row_90961 | 13 | 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_90961:Import_L1_C0", "label": "atom import atom", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 833, 0, 1, 0, 0, 833, 0, 0], "semantic": {"name": "atom", "arg_names": [], "import_names": ["atom"], "rhs_call_n... | [] |
keysyms = {
'VoidSymbol': 0xffffff,
'BackSpace': 0xff08,
'Tab': 0xff09,
'Linefeed': 0xff0a,
'Clear': 0xff0b,
'Return': 0xff0d,
'Pause': 0xff13,
'Scroll_Lock': 0xff14,
'Sys_Req': 0xff15,
'Escape': 0xff1b,
'Delete': 0xffff,
'Multi_key': 0xff20,
'Codeinput': 0xff37,
... | ajibawa-2023/Python-Code-Large/train/row_90962 | 1 | 2,007 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90962:Assign_L1_C0", "label": "keysyms =", "type": "assigned_variable", "loc": [1, 2007], "level": 0, "parent": null, "vector": [14, 0, 0.5002, 1.0, 0, 0.66, 0.0, 226, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "keysyms", "arg_names": [], "import_names": [], "rhs_call_n... | [] |
events = {
'KeyPressEvent': 2,
'KeyReleaseEvent': 3,
'ButtonPressEvent': 4,
'ButtonReleaseEvent': 5,
'MotionNotifyEvent': 6,
'EnterNotifyEvent': 7,
'LeaveNotifyEvent': 8,
'FocusInEvent': 9,
'FocusOutEvent': 10,
'KeymapNotifyEvent': 11,
'ExposeEvent': 12,
'GraphicsExposure... | ajibawa-2023/Python-Code-Large/train/row_90963 | 1 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90963:Assign_L1_C0", "label": "events =", "type": "assigned_variable", "loc": [1, 35], "level": 0, "parent": null, "vector": [14, 0, 0.5143, 1.0, 0, 0.66, 0.0, 830, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "events", "arg_names": [], "import_names": [], "rhs_call_name"... | [] |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_90964 | 42 | 101 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90964:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1881, 0.0891, 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_90964:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90964:Expr_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90964:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90964:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code... |
# Removes duplicate nicknames (issue99).
#
# To run this script:
# - Make sure App Engine library (incl. yaml) is in PYTHONPATH.
# - Make sure that the remote API is included in app.yaml.
# - Run "tools/appengine_console.py APP_ID".
# - Import this module.
# - update_accounts.run() updates accounts.
# - Use the o... | ajibawa-2023/Python-Code-Large/train/row_90965 | 36 | 62 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90965:ImportFrom_L13_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.2097, 0.0161, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90965:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90965:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90965:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90965:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Custom A... | ajibawa-2023/Python-Code-Large/train/row_90966 | 29 | 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_90966:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0217, 0.0217, 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_90966:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90966:Assign_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90966:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90966:Return_L14_C2"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 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 writing, ... | ajibawa-2023/Python-Code-Large/train/row_90967 | 27 | 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_90967:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2381, 0.0159, 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_90967:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90967:Expr_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90967:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90967:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
# Copyright 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 ... | ajibawa-2023/Python-Code-Large/train/row_90970 | 66 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90970:Import_L16_C0", "label": "code import code", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1345, 0.0084, 0, 0.66, 0.0, 44, 0, 1, 0, 0, 44, 0, 0], "semantic": {"name": "code", "arg_names": [], "import_names": ["code"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90970:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90970:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90970:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90970:If_L40_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2008-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_90972 | 3 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90972:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.5357, 0.0357, 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 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 writing, ... | ajibawa-2023/Python-Code-Large/train/row_90973 | 28 | 83 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90973:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1807, 0.012, 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_90973:Try_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90973:Assign_L68_C4"}] |
# 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 or agreed to in writi... | ajibawa-2023/Python-Code-Large/train/row_90974 | 31 | 85 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90974:Import_L15_C0", "label": "difflib import difflib", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1765, 0.0118, 0, 0.66, 0.0, 866, 0, 1, 0, 0, 866, 0, 0], "semantic": {"name": "difflib", "arg_names": [], "import_names": ["difflib... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90974:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90974:Expr_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90974:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90974:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2013 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 writing, ... | ajibawa-2023/Python-Code-Large/train/row_90975 | 91 | 243 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90975:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 37], "level": 0, "parent": null, "vector": [8, 0, 0.107, 0.0947, 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_90975:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90975:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90975:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90975:Assign_L66_C2"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_90977 | 90 | 163 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90977:Import_L15_C0", "label": "md5 import md5", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.092, 0.0061, 0, 0.66, 0.0, 604, 0, 1, 0, 0, 604, 0, 0], "semantic": {"name": "md5", "arg_names": [], "import_names": ["md5"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_90977:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90977:Assign_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90977:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90977:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_90978 | 216 | 696 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90978:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 43], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0417, 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_90978:FunctionDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90978:Expr_L93_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90978:FunctionDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90978:Assign_L105_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_90979 | 147 | 260 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_90979:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0654, 0.0192, 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_90979:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90979:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_90979:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_90979:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.