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
# -*- coding: utf-8 -*- """ markupsafe._native ~~~~~~~~~~~~~~~~~~ Native Python implementation the C module is not compiled. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from jinja2._markupsafe import Markup def escape(s): """Convert the characters...
ajibawa-2023/Python-Code-Large/train/row_86830
17
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86830:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1333, 0.2, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86830:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86830:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86830:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86830:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- """ jinja2.loaders ~~~~~~~~~~~~~~ Jinja loader classes. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import weakref from types import ModuleType from os import path try: from hashlib import sha1 except Imp...
ajibawa-2023/Python-Code-Large/train/row_86831
195
450
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86831:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0133, 0.02, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86831:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86831:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86831:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86831:ImportFrom_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ class TemplateError(Exception): """Baseclass for all template errors.""" def __init__(self, message=None): i...
ajibawa-2023/Python-Code-Large/train/row_86834
69
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86834:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.042, 0.0629, 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_86834:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86834:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86834:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86834:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. Nutshell -------- Here a small example of a Jinja2 template:: {% ...
ajibawa-2023/Python-Code-Large/train/row_86836
11
69
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86836:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 28], "level": 0, "parent": null, "vector": [8, 0, 0.2174, 0.3913, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import imap, groupby from jinja2....
ajibawa-2023/Python-Code-Large/train/row_86837
285
799
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86837:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0075, 0.0113, 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_86837:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86837:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86837:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86837:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: utf-8 -*- """ jinja2.defaults ~~~~~~~~~~~~~~~ Jinja default filters and tags. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner # defaults for the parser / lexer BLOCK_START_STRING ...
ajibawa-2023/Python-Code-Large/train/row_86838
16
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_86838:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.15, 0.225, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[]
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
ajibawa-2023/Python-Code-Large/train/row_86839
66
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86839:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0615, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86839:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86839:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86839:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86839:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.utils impo...
ajibawa-2023/Python-Code-Large/train/row_86840
643
896
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86840:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0067, 0.01, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86840:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86840:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86840:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86840:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
ajibawa-2023/Python-Code-Large/train/row_86841
44
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86841:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.069, 0.1034, 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_86841:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86841:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86841:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86841:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-...
from jinja2 import Environment env = Environment(extensions=['jinja2.ext.i18n']) env.globals['gettext'] = { 'Hello %(user)s!': 'Hallo %(user)s!' }.__getitem__ env.globals['ngettext'] = lambda s, p, n: { '%(count)s user': '%(count)d Benutzer', '%(count)s users': '%(count)d Benutzer' }[n == 1 and s or p] pri...
ajibawa-2023/Python-Code-Large/train/row_86842
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86842:ImportFrom_L1_C0", "label": "from jinja2 import Environment", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 436, 0, 1, 0, 0, 436, 0, 0], "semantic": {"name": "jinja2", "arg_names": [], "import_names": ["Envir...
[]
from jinja2 import Environment from jinja2.loaders import FileSystemLoader env = Environment(loader=FileSystemLoader('templates')) tmpl = env.get_template('broken.html') print tmpl.render(seq=[3, 2, 4, 5, 3, 2, 0, 2, 1])
ajibawa-2023/Python-Code-Large/train/row_86843
5
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86843:ImportFrom_L1_C0", "label": "from jinja2 import Environment", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 436, 0, 1, 0, 0, 436, 0, 0], "semantic": {"name": "jinja2", "arg_names": [], "import_names": [...
[]
from __pypy__ import tproxy def make_proxy(obj, proxy): if tproxy is None: return proxy def operation_handler(operation, *args, **kwargs): if operation in ('__getattribute__', '__getattr__'): return getattr(proxy, args[0]) elif operation == '__setattr__': proxy....
ajibawa-2023/Python-Code-Large/train/row_86844
11
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86844:ImportFrom_L1_C0", "label": "from __pypy__ import tproxy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 683, 0, 1, 0, 0, 683, 0, 0], "semantic": {"name": "__pypy__", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86844:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86844:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86844:If_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86844:Return_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
from jinja2 import Environment from jinja2.loaders import DictLoader env = Environment(loader=DictLoader({ 'child.html': u'''\ {% extends master_layout or 'master.html' %} {% include helpers = 'helpers.html' %} {% macro get_the_answer() %}42{% endmacro %} {% title = 'Hello World' %} {% block body %} {{ get_the_ans...
ajibawa-2023/Python-Code-Large/train/row_86845
5
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86845:ImportFrom_L1_C0", "label": "from jinja2 import Environment", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 436, 0, 1, 0, 0, 436, 0, 0], "semantic": {"name": "jinja2", "arg_names": [], "import_names": ["E...
[]
from jinja2 import Environment env = Environment(line_statement_prefix="#", variable_start_string="${", variable_end_string="}") print env.from_string("""\ <ul> # for item in range(10) <li class="${loop.cycle('odd', 'even')}">${item}</li> # endfor </ul>\ """).render()
ajibawa-2023/Python-Code-Large/train/row_86846
1
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_86846:ImportFrom_L1_C0", "label": "from jinja2 import Environment", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 436, 0, 1, 0, 0, 436, 0, 0], "semantic": {"name": "jinja2", "arg_names": [], "import_names": [...
[]
from jinja2 import Environment from jinja2.loaders import DictLoader env = Environment(loader=DictLoader({ 'a': '''[A[{% block body %}{% endblock %}]]''', 'b': '''{% extends 'a' %}{% block body %}[B]{% endblock %}''', 'c': '''{% extends 'b' %}{% block body %}###{{ super() }}###{% endblock %}''' })) print env.get_te...
ajibawa-2023/Python-Code-Large/train/row_86847
4
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_86847:ImportFrom_L1_C0", "label": "from jinja2 import Environment", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 436, 0, 1, 0, 0, 436, 0, 0], "semantic": {"name": "jinja2", "arg_names": [], "import_names": [...
[]
# -*- coding: utf-8 -*- """ RealWorldish Benchmark ~~~~~~~~~~~~~~~~~~~~~~ A more real-world benchmark of Jinja2. Like the other benchmark in the Jinja2 repository this has no real-world usefulnes (despite the name). Just go away and ignore it. NOW! :copyright: (c) 2009 by the Jinja Team. ...
ajibawa-2023/Python-Code-Large/train/row_86848
65
112
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86848:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0625, 0.0982, 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_86848:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86848:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86848:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86848:ImportFrom_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- from rwbench import ROOT from os.path import join from django.conf import settings settings.configure( TEMPLATE_DIRS=(join(ROOT, 'django'),), TEMPLATE_LOADERS=( ('django.template.loaders.cached.Loader', ( 'django.template.loaders.filesystem.Loader', )), ) ...
ajibawa-2023/Python-Code-Large/train/row_86849
83
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_86849:ImportFrom_L2_C0", "label": "from rwbench import ROOT", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0148, 0.0074, 0, 0.66, 0.0, 384, 0, 1, 0, 0, 384, 0, 0], "semantic": {"name": "rwbench", "arg_names": [], "import_names": ["ROOT...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86849:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86849:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86849:If_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86849:Return_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
try: from cProfile import Profile except ImportError: from profile import Profile from pstats import Stats from jinja2 import Environment as JinjaEnvironment context = { 'page_title': 'mitsuhiko\'s benchmark', 'table': [dict(a=1,b=2,c=3,d=4,e=5,f=6,g=7,h=8,i=9,j=10) for x in range(1000)] } source = ""...
ajibawa-2023/Python-Code-Large/train/row_86850
14
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_86850:Try_L1_C0", "label": "try", "type": "try", "loc": [1, 4], "level": 0, "parent": null, "vector": [7, 0, 0.0481, 0.0769, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86850:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86850:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86850:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86850:ImportFrom_L4_C4"}]
"""\ This benchmark compares some python templating engines with Jinja 2 so that we get a picture of how fast Jinja 2 is for a semi real world template. If a template engine is not installed the test is skipped.\ """ import sys import cgi from timeit import Timer from jinja2 import Environment as JinjaEnvi...
ajibawa-2023/Python-Code-Large/train/row_86851
86
433
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86851:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0069, 0.0115, 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_86851:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86851:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86851:Try_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86851:ImportFrom_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""Compatibility stuff""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 mus...
ajibawa-2023/Python-Code-Large/train/row_86853
11
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86853:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0208, 0.0208, 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_86853:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86853:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86853:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86853:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" @package antlr3.tree @brief ANTLR3 runtime package, treewizard module A utility module to create ASTs at runtime. See <http://www.antlr.org/wiki/display/~admin/2007/07/02/Exploring+Concept+of+TreeWizard> for an overview. Note that the API of the Python implementation is slightly different. """ # begin[licence] #...
ajibawa-2023/Python-Code-Large/train/row_86854
297
612
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86854:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0065, 0.0114, 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_86854:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86854:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86854:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86854:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
ajibawa-2023/Python-Code-Large/train/row_86856
117
289
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86856:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86856:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86856:FunctionDef_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86856:FunctionDef_L41_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86856:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
ajibawa-2023/Python-Code-Large/train/row_86857
9
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86857:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0175, 0.0175, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" @package antlr3.tree @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or...
ajibawa-2023/Python-Code-Large/train/row_86858
842
2,448
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86858:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0014, 0.0025, 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_86858:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86858:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86858:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86858:FunctionDef_L65_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" @package antlr3.dottreegenerator @brief ANTLR3 runtime package, tree module This module contains all support classes for AST construction and tree parsers. """ # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary fo...
ajibawa-2023/Python-Code-Large/train/row_86860
78
210
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86860:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0167, 0.0286, 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_86860:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86860:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86860:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86860:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""ANTLR3 exception hierarchy""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 c...
ajibawa-2023/Python-Code-Large/train/row_86861
159
364
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86861:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0027, 0.0027, 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_86861:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86861:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86861:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86861:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
ajibawa-2023/Python-Code-Large/train/row_86862
159
416
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86862:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0024, 0.0024, 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_86862:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86862:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86862:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86862:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
ajibawa-2023/Python-Code-Large/train/row_86863
544
1,452
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86863:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0007, 0.0007, 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_86863:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86863:Expr_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86863:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86863:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # 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 ...
ajibawa-2023/Python-Code-Large/train/row_86864
68
213
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86864:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0047, 0.0047, 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_86864:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86864:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86864:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86864:FunctionDef_L46_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ webapp2_extras.sessions_ndb =========================== Extended sessions stored in datastore using the ndb library. App Engine-specific modules were moved to webapp2_extras.appengine. This module is here for compatibility purposes. :copyright: 2011 by tipfy.org. ...
ajibawa-2023/Python-Code-Large/train/row_86866
4
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86866:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.6, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
# -*- coding: utf-8 -*- """ webapp2_extras.users ==================== Helpers for google.appengine.api.users. App Engine-specific modules were moved to webapp2_extras.appengine. This module is here for compatibility purposes. :copyright: 2011 tipfy.org. :license: Apache Sotware License, s...
ajibawa-2023/Python-Code-Large/train/row_86867
4
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86867:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.6, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
# -*- coding: utf-8 -*- """ webapp2_extras.auth =================== Utilities for authentication and authorization. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import logging import time import webapp2 from webapp2_extras import security from web...
ajibawa-2023/Python-Code-Large/train/row_86868
217
644
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86868:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0093, 0.014, 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_86868:ClassDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86868:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86868:ClassDef_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86868:Expr_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# -*- coding: utf-8 -*- """ webapp2_extras.routes ===================== Extra route classes for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import re import urllib from webob import exc import webapp2 class MultiRoute(object): """B...
ajibawa-2023/Python-Code-Large/train/row_86869
132
353
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86869:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.017, 0.0255, 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_86869:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86869:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86869:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86869:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras.json =================== JSON helpers for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import import base64 import urllib try: # Preference for installed libra...
ajibawa-2023/Python-Code-Large/train/row_86870
29
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_86870:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0556, 0.0833, 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_86870:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86870:Import_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86870:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86870:Try_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
# -*- coding: utf-8 -*- """ webapp2_extras.sessions ======================= Lightweight but flexible session support for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import re import webapp2 from webapp2_extras import securecookie from we...
ajibawa-2023/Python-Code-Large/train/row_86872
148
476
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86872:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0126, 0.0189, 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_86872:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86872:Expr_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86872:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86872:Assign_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras.local_app ~~~~~~~~~~~~~~~~~~~~~~~~ This module is deprecated. The functionality is now available directly in webapp2. Previously it implemented a WSGIApplication adapted for threaded environments. :copyright: 2011 by tipfy.org. :license: Apac...
ajibawa-2023/Python-Code-Large/train/row_86873
5
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86873:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.3333, 0.5417, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
# -*- coding: utf-8 -*- """ webapp2_extras.local ~~~~~~~~~~~~~~~~~~~~ This module implements thread-local utilities. This implementation comes from werkzeug.local. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ try: ...
ajibawa-2023/Python-Code-Large/train/row_86874
134
231
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86874:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0303, 0.0476, 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_86874:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86874:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86874:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86874:Try_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
# -*- coding: utf-8 -*- """ webapp2_extras.config ===================== Configuration object for webapp2. This module is deprecated. See :class:`webapp2.WSGIApplication.config`. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ impor...
ajibawa-2023/Python-Code-Large/train/row_86875
71
228
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86875:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0307, 0.0482, 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_86875:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86875:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86875:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86875:Assign_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.sessions_ndb ===================================== Extended sessions stored in datastore using the ndb library. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import ...
ajibawa-2023/Python-Code-Large/train/row_86876
56
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86876:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0513, 0.0769, 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_86876:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86876:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86876:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86876:ImportFrom_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.users ============================== Helpers for google.appengine.api.users. :copyright: 2011 tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from google.appengine.api import users def login_required(handler_method): ...
ajibawa-2023/Python-Code-Large/train/row_86877
24
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86877:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0857, 0.1286, 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_86877:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86877:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86877:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86877:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.auth.models ==================================== Auth related models. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import time try: from ndb import model except ImportError: # pragma: no cove...
ajibawa-2023/Python-Code-Large/train/row_86878
123
416
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86878:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0144, 0.0216, 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_86878:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86878:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86878:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86878:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.auth ============================= Authentication and authorization utilities. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """
ajibawa-2023/Python-Code-Large/train/row_86879
1
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86879:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.6, 0.9, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":...
[]
# -*- coding: utf-8 -*- """ webapp2_extras.appengine ======================== App Engine-specific modules. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """
ajibawa-2023/Python-Code-Large/train/row_86880
1
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86880:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.6, 0.9, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":...
[]
# -*- coding: utf-8 -*- """ webapp2_extras.appengine.sessions_memcache ========================================== Extended sessions stored in memcache. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from google.appengine.api import memcache from weba...
ajibawa-2023/Python-Code-Large/train/row_86881
19
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86881:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1765, 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_86881:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86881:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86881:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86881:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ webapp2_extras.mako =================== Mako template support for webapp2. Learn more about Mako: http://www.makotemplates.org/ :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import fro...
ajibawa-2023/Python-Code-Large/train/row_86882
31
136
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86882:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0515, 0.0809, 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_86882:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86882:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86882:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86882:Assign_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras ============== Extra modules for webapp2. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """
ajibawa-2023/Python-Code-Large/train/row_86883
1
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86883:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.6, 0.9, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation":...
[]
# -*- coding: utf-8 -*- """ webapp2_extras.jinja2 ===================== Jinja2 template support for webapp2. Learn more about Jinja2: http://jinja.pocoo.org/ :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ import absolute_import i...
ajibawa-2023/Python-Code-Large/train/row_86884
50
230
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86884:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0478, 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_86884:ClassDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86884:Expr_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86884:ClassDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86884:Assign_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ webapp2_extras.i18n =================== Internationalization support for webapp2. Several ideas borrowed from tipfy.i18n and Flask-Babel. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ import datetime import gettext as...
ajibawa-2023/Python-Code-Large/train/row_86885
267
915
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86885:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0077, 0.012, 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_86885:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86885:Import_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86885:ClassDef_L90_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86885:Expr_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
# -*- coding: utf-8 -*- """ webapp2_extras.security ======================= Security related helpers such as secure password hashing tools and a random token generator. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. :co...
ajibawa-2023/Python-Code-Large/train/row_86886
64
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86886:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0344, 0.055, 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_86886:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86886:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86886:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86886:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: utf-8 -*- """ webapp2_extras.sessions_memcache ================================ Extended sessions stored in memcache. App Engine-specific modules were moved to webapp2_extras.appengine. This module is here for compatibility purposes. :copyright: 2011 by tipfy.org. :license: ...
ajibawa-2023/Python-Code-Large/train/row_86887
4
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86887:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.6, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
"""Native adapter for serving CherryPy via its builtin server.""" import logging import sys import cherrypy from cherrypy._cpcompat import BytesIO from cherrypy._cperror import format_exc, bare_error from cherrypy.lib import httputil from cherrypy import wsgiserver class NativeGateway(wsgiserver.Gateway): ...
ajibawa-2023/Python-Code-Large/train/row_86888
87
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86888:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0067, 0.0067, 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_86888:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86888:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86888:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86888:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Cod...
import os import sys import time import warnings import cherrypy from cherrypy._cpcompat import basestring, copykeys, ntob, unicodestr from cherrypy._cpcompat import SimpleCookie, CookieError, py3k from cherrypy import _cpreqbody, _cpconfig from cherrypy._cperror import format_exc, bare_error from cherrypy.lib import...
ajibawa-2023/Python-Code-Large/train/row_86889
415
956
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86889:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.001, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86889:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86889:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86889:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86889:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Simple config ============= Although CherryPy uses the :mod:`Python logging module <logging>`, it does so behind the scenes so that simple logging is simple, but complicated logging is still possible. "Simple" logging means that you can log to the screen (i.e. console/stdout) or to a file, and that you can easily ...
ajibawa-2023/Python-Code-Large/train/row_86890
192
440
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86890:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 100], "level": 0, "parent": null, "vector": [8, 0, 0.1148, 0.2273, 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_86890:ClassDef_L115_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86890:Expr_L116_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86890:ClassDef_L115_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86890:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-C...
# This is a backport of Python-2.4's threading.local() implementation """Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threa...
ajibawa-2023/Python-Code-Large/train/row_86891
63
239
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86891:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 136], "level": 0, "parent": null, "vector": [8, 0, 0.2908, 0.5607, 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_86891:ClassDef_L140_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86891:Assign_L141_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86891:ClassDef_L140_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86891:FunctionDef_L143_C4"}, {"f": "ajibawa-2023/Python...
"""WSGI server interface (see PEP 333). This adds some CP-specific bits to the framework-agnostic wsgiserver package. """ import sys import cherrypy from cherrypy import wsgiserver class CPWSGIServer(wsgiserver.CherryPyWSGIServer): """Wrapper for wsgiserver.CherryPyWSGIServer. wsgiserver has been design...
ajibawa-2023/Python-Code-Large/train/row_86892
29
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_86892:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0317, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86892:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86892:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86892:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86892:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Tutorial - Multiple objects This tutorial shows you how to create a site structure through multiple possibly nested request handler objects. """ import cherrypy class HomePage: def index(self): return ''' <p>Hi, this is the home page! Check out the other fun stuff on this sit...
ajibawa-2023/Python-Code-Large/train/row_86893
28
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86893:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0357, 0.0612, 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_86893:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86893:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86893:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86893:Return_L13_C8"}, {"f": "ajibawa-2023/Python-...
""" Tutorial: HTTP errors HTTPError is used to return an error response to the client. CherryPy has lots of options regarding how such errors are logged, displayed, and formatted. """ import os localDir = os.path.dirname(__file__) curpath = os.path.normpath(os.path.join(os.getcwd(), localDir)) import cherrypy cl...
ajibawa-2023/Python-Code-Large/train/row_86894
28
81
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86894:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0617, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86894:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86894:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86894:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86894:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod...
""" Tutorial - Hello World The most basic (working) CherryPy application possible. """ # Import CherryPy global namespace import cherrypy class HelloWorld: """ Sample request handler class. """ def index(self): # CherryPy will call this method for the root URI ("/") and send # its return val...
ajibawa-2023/Python-Code-Large/train/row_86895
12
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_86895:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0857, 0.1429, 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_86895:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86895:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86895:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86895:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-...
''' Bonus Tutorial: Using SQLObject This is a silly little contacts manager application intended to demonstrate how to use SQLObject from within a CherryPy2 project. It also shows how to use inline Cheetah templates. SQLObject is an Object/Relational Mapper that allows you to access data stored in an RDBMS in a pytho...
ajibawa-2023/Python-Code-Large/train/row_86896
47
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_86896:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0952, 0.1845, 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_86896:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86896:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86896:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86896:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Tutorial: File upload and download Uploads ------- When a client uploads a file to a CherryPy application, it's placed on disk immediately. CherryPy will pass it to your exposed method as an argument (see "myFile" below); that arg will have a "file" attribute, which is a handle to the temporary uploaded file. If...
ajibawa-2023/Python-Code-Large/train/row_86897
27
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_86897:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 41], "level": 0, "parent": null, "vector": [8, 0, 0.1963, 0.3832, 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_86897:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86897:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86897:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86897:Return_L54_C8"}, {"f": "ajibawa-2023/Python-...
""" Bonus Tutorial: Using generators to return result bodies Instead of returning a complete result string, you can use the yield statement to return one result part after another. This may be convenient in situations where using a template package like CherryPy or Cheetah would be overkill, and messy string concatena...
ajibawa-2023/Python-Code-Large/train/row_86898
20
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86898:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0957, 0.1702, 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_86898:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86898:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86898:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86898:Return_L16_C8"}, {"f": "ajibawa-2023/Python-...
""" Tutorial - The default method Request handler objects can implement a method called "default" that is called when no other suitable method/object could be found. Essentially, if CherryPy2 can't find a matching request handler object for the given request URI, it will use the default method of the object located de...
ajibawa-2023/Python-Code-Large/train/row_86899
21
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86899:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 17], "level": 0, "parent": null, "vector": [8, 0, 0.1406, 0.2656, 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_86899:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86899:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86899:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86899:Return_L28_C8"}, {"f": "ajibawa-2023/Python-...
""" Tutorial - Multiple methods This tutorial shows you how to link to other methods of your request handler. """ import cherrypy class HelloWorld: def index(self): # Let's link to another method here. return 'We have an <a href="showMessage">important message</a> for you!' index.exposed...
ajibawa-2023/Python-Code-Large/train/row_86900
14
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_86900:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1094, 0.1875, 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_86900:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86900:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86900:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86900:Return_L14_C8"}, {"f": "ajibawa-2023/Python-...
""" Tutorial - Passing variables This tutorial shows you how to pass GET/POST variables to methods. """ import cherrypy class WelcomePage: def index(self): # Ask for the user's name. return ''' <form action="greetUser" method="GET"> What is your name? <input ...
ajibawa-2023/Python-Code-Large/train/row_86901
18
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86901:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0566, 0.0943, 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_86901:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86901:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86901:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86901:Return_L14_C8"}, {"f": "ajibawa-2023/Python-...
""" Tutorial - Sessions Storing session data in CherryPy applications is very easy: cherrypy provides a dictionary called "session" that represents the session data for the current user. If you use RAM based sessions, you can store any kind of object into that dictionary; otherwise, you are limited to objects that can...
ajibawa-2023/Python-Code-Large/train/row_86902
14
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86902:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1136, 0.2045, 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_86902:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86902:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86902:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86902:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Cod...
# This is used in test_config to test unrepr of "from A import B" thing2 = object()
ajibawa-2023/Python-Code-Large/train/row_86903
1
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_86903:Assign_L3_C0", "label": "thing2 = object()", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.3333, 0, 0.66, 0.0, 699, 3, 0, 0, 0, 186, 10, 1], "semantic": {"name": "thing2", "arg_names": [], "import_names": [], "rhs...
[]
""" Tutorial - Object inheritance You are free to derive your request handler classes from any base class you wish. In most real-world applications, you will probably want to create a central base class used for all your pages, which takes care of things like printing a common page header and footer. """ import cherr...
ajibawa-2023/Python-Code-Large/train/row_86904
25
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_86904:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0542, 0.0964, 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_86904:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86904:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86904:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86904:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Cod...
""" Configuration system for CherryPy. Configuration in CherryPy is implemented via dictionaries. Keys are strings which name the mapped value, which may be of any type. Architecture ------------ CherryPy Requests are part of an Application, which runs in a global context, and configuration data may apply to any of...
ajibawa-2023/Python-Code-Large/train/row_86905
98
295
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86905:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 119], "level": 0, "parent": null, "vector": [8, 0, 0.2034, 0.4034, 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_86905:FunctionDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86905:Expr_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86905:FunctionDef_L128_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86905:If_L134_C4"}, {"f": "ajibawa-2023/Python-Code...
"""CherryPy tools. A "tool" is any helper, adapted to CP. Tools are usually designed to be used in a variety of ways (although some may only offer one if they choose): Library calls All tools are callables that can be used wherever needed. The arguments are straightforward and should be detail...
ajibawa-2023/Python-Code-Large/train/row_86906
247
510
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86906:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0235, 0.0451, 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_86906:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86906:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86906:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86906:Import_L34_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Starting in CherryPy 3.1, cherrypy.server is implemented as an :ref:`Engine Plugin<plugins>`. It's an instance of :class:`cherrypy._cpserver.Server`, which is a subclass of :class:`cherrypy.process.servers.ServerAdapter`. The ``ServerAdapter`` class is designed to control other servers, as well. Multiple servers/p...
ajibawa-2023/Python-Code-Large/train/row_86907
181
427
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86907:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 112], "level": 0, "parent": null, "vector": [8, 0, 0.1323, 0.2623, 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_86907:ClassDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86907:Expr_L119_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86907:ClassDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86907:FunctionDef_L132_C4"}, {"f": "ajibawa-2023/Python-C...
"""Windows service. Requires pywin32.""" import os import win32api import win32con import win32event import win32service import win32serviceutil from cherrypy.process import wspbus, plugins class ConsoleCtrlHandler(plugins.SimplePlugin): """A WSPBus plugin for handling Win32 console events (like Ctrl-C).""" ...
ajibawa-2023/Python-Code-Large/train/row_86908
104
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86908:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0057, 0.0057, 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_86908:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86908:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86908:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86908:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""Site services for use with a Web Site Process Bus.""" import os import re import signal as _signal import sys import time import threading from cherrypy._cpcompat import basestring, get_daemon, get_thread_ident, ntob, set # _module__file__base is used by Autoreload to make # absolute any filenames retrieved from ...
ajibawa-2023/Python-Code-Large/train/row_86909
379
683
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86909:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0015, 0.0015, 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_86909:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86909:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86909:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86909:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""An implementation of the Web Site Process Bus. This module is completely standalone, depending only on the stdlib. Web Site Process Bus -------------------- A Bus object is used to contain and manage site-wide behavior: daemonization, HTTP server start/stop, process reload, signal handling, drop privileges, PID f...
ajibawa-2023/Python-Code-Large/train/row_86910
210
432
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86910:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 61], "level": 0, "parent": null, "vector": [8, 0, 0.0718, 0.1412, 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_86910:ClassDef_L81_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86910:Expr_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86910:ClassDef_L81_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86910:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""Site container for an HTTP server. A Web Site Process Bus object is used to connect applications, servers, and frameworks with site-wide services such as daemonization, process reload, signal handling, drop privileges, PID file management, logging for all of these, and many more. The 'plugins' module defines a few...
ajibawa-2023/Python-Code-Large/train/row_86911
3
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86911:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.4286, 0.7857, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
"""<MyProject>, a CherryPy application. Use this as a base for creating new CherryPy applications. When you want to make a new app, copy and paste this folder to some other location (maybe site-packages) and rename it to the name of your project, then tweak as desired. Even before any tweaking, this should serve a fe...
ajibawa-2023/Python-Code-Large/train/row_86912
21
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86912:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 13], "level": 0, "parent": null, "vector": [8, 0, 0.1148, 0.2131, 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_86912:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86912:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86912:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86912:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Cod...
"""Native adapter for serving CherryPy via mod_python Basic usage: ########################################## # Application in a module called myapp.py ########################################## import cherrypy class Root: @cherrypy.expose def index(self): return 'Hi there, Ho there, Hey there' # ...
ajibawa-2023/Python-Code-Large/train/row_86913
172
344
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86913:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 56], "level": 0, "parent": null, "vector": [8, 0, 0.0828, 0.1628, 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_86913:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86913:ImportFrom_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86913:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86913:Assign_L75_C4"}, {"f": "ajibawa-2023/Pytho...
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. The de...
ajibawa-2023/Python-Code-Large/train/row_86914
315
636
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86914:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0086, 0.0157, 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_86914:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86914:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86914:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86914:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""Exception classes for CherryPy. CherryPy provides (and uses) exceptions for declaring that the HTTP response should be a status other than the default "200 OK". You can ``raise`` them like normal Python exceptions. You can also call them and they will raise themselves; this means you can set an :class:`HTTPError<ch...
ajibawa-2023/Python-Code-Large/train/row_86915
181
556
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86915:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 105], "level": 0, "parent": null, "vector": [8, 0, 0.0953, 0.1888, 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_86915:ClassDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86915:Expr_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86915:ClassDef_L119_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86915:Expr_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""WSGI interface (see PEP 333 and 3333). Note that WSGI environ keys and values are 'native strings'; that is, whatever the type of "" is. For Python 2, that's a byte string; for Python 3, it's a unicode string. But PEP 3333 says: "even if Python's str type is actually Unicode "under the hood", the content of native ...
ajibawa-2023/Python-Code-Large/train/row_86916
223
408
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86916:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.011, 0.0196, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86916:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86916:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86916:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86916:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code...
"""Manage HTTP servers with CherryPy.""" import warnings import cherrypy from cherrypy.lib import attributes from cherrypy._cpcompat import basestring, py3k # We import * because we want to export check_port # et al as attributes of this module. from cherrypy.process.servers import * class Server(ServerAdapter): ...
ajibawa-2023/Python-Code-Large/train/row_86917
111
205
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86917:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86917:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86917:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86917:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86917:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""Compatibility code for using CherryPy with various versions of Python. CherryPy 3.2 is compatible with Python versions 2.3+. This module provides a useful abstraction over the differences between Python versions, sometimes by preferring a newer idiom, sometimes an older one, and sometimes a custom one. In particul...
ajibawa-2023/Python-Code-Large/train/row_86918
185
318
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86918:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0283, 0.0535, 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_86918:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86918:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86918:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86918:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
import os import warnings import cherrypy from cherrypy._cpcompat import iteritems, copykeys, builtins class Checker(object): """A checker for CherryPy sites and their mounted applications. When this object is called at engine startup, it executes each of its own methods whose names start with ``che...
ajibawa-2023/Python-Code-Large/train/row_86919
188
327
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86919:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86919:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86919:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86919:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86919:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
"""CherryPy is a pythonic, object-oriented HTTP framework. CherryPy consists of not one, but four separate API layers. The APPLICATION LAYER is the simplest. CherryPy applications are written as a tree of classes and methods, where each branch in the tree corresponds to a branch in the URL path. Each method is a 'pa...
ajibawa-2023/Python-Code-Large/train/row_86920
261
624
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86920:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 58], "level": 0, "parent": null, "vector": [8, 0, 0.0473, 0.0929, 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_86920:Try_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86920:ImportFrom_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86920:Try_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86920:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
"""Request body processing for CherryPy. .. versionadded:: 3.2 Application authors have complete control over the parsing of HTTP request entities. In short, :attr:`cherrypy.request.body<cherrypy._cprequest.Request.body>` is now always set to an instance of :class:`RequestBody<cherrypy._cpreqbody.RequestBody>`, and *...
ajibawa-2023/Python-Code-Large/train/row_86921
444
965
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86921:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 102], "level": 0, "parent": null, "vector": [8, 0, 0.0534, 0.1057, 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_86921:Try_L104_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86921:ImportFrom_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86921:Try_L104_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86921:Assign_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""CherryPy Application and Tree objects.""" import os import sys import cherrypy from cherrypy._cpcompat import ntou, py3k from cherrypy import _cpconfig, _cplogging, _cprequest, _cpwsgi, tools from cherrypy.lib import httputil class Application(object): """A CherryPy Application. Servers and gateways...
ajibawa-2023/Python-Code-Large/train/row_86922
146
290
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86922:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0034, 0.0034, 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_86922:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86922:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86922:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86922:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""A library for integrating Python's builtin ``ssl`` library with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set ``CherryPyWSGIServer.ssl_adapter`` to an instance of ``BuiltinSSLAdapter``. """ try: import ssl except ImportError: ssl = None try: from _pyio imp...
ajibawa-2023/Python-Code-Large/train/row_86923
47
91
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86923:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.044, 0.0769, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86923:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86923:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86923:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86923:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('...
ajibawa-2023/Python-Code-Large/train/row_86924
1,036
2,040
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86924:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 69], "level": 0, "parent": null, "vector": [8, 0, 0.0172, 0.0338, 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_86924:Try_L81_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86924:Import_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86924:Try_L81_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86924:Import_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
__all__ = ['HTTPRequest', 'HTTPConnection', 'HTTPServer', 'SizeCheckWrapper', 'KnownLengthRFile', 'ChunkedRFile', 'MaxSizeExceeded', 'NoSSLError', 'FatalSSLAlert', 'WorkerThread', 'ThreadPool', 'SSLAdapter', 'CherryPyWSGIServer', 'Gateway', 'WSGIGateway', 'WSGIGate...
ajibawa-2023/Python-Code-Large/train/row_86927
5
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86927:Assign_L1_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [1, 7], "level": 0, "parent": null, "vector": [14, 0, 0.2857, 0.5, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86927:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86927:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86927:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86927:Expr_L14_C4"}]
import cherrypy from cherrypy.lib import httpauth def check_auth(users, encrypt=None, realm=None): """If an authorization header contains credentials, return True, else False.""" request = cherrypy.serving.request if 'authorization' in request.headers: # make sure the provided credentials are corr...
ajibawa-2023/Python-Code-Large/train/row_86928
37
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86928:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherryp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86928:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86928:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86928:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86928:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import struct import time import cherrypy from cherrypy._cpcompat import basestring, BytesIO, ntob, set, unicodestr from cherrypy.lib import file_generator from cherrypy.lib import set_vary_header def decode(encoding=None, default_encoding='utf-8'): """Replace or extend the list of charsets used to decode a requ...
ajibawa-2023/Python-Code-Large/train/row_86929
229
388
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86929:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0026, 0.0026, 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_86929:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86929:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86929:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86929:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code...
"""Profiler tools for CherryPy. CherryPy users ============== You can profile any of your pages as follows:: from cherrypy.lib import profiler class Root: p = profile.Profiler("/path/to/profile/dir") def index(self): self.p.run(self._index) index.exposed = Tr...
ajibawa-2023/Python-Code-Large/train/row_86930
108
208
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86930:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 34], "level": 0, "parent": null, "vector": [8, 0, 0.0841, 0.1635, 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_86930:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86930:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86930:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86930:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code...
import gc import inspect import os import sys import time try: import objgraph except ImportError: objgraph = None import cherrypy from cherrypy import _cprequest, _cpwsgi from cherrypy.process.plugins import SimplePlugin class ReferrerTree(object): """An object which gathers all referrers of an object...
ajibawa-2023/Python-Code-Large/train/row_86931
138
214
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86931:Import_L1_C0", "label": "gc import gc", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 0, 0.66, 0.0, 92, 0, 1, 0, 0, 92, 0, 0], "semantic": {"name": "gc", "arg_names": [], "import_names": ["gc"], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86931:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86931:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86931:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86931:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
# This file is part of CherryPy <http://www.cherrypy.org/> # -*- coding: utf-8 -*- # vim:ts=4:sw=4:expandtab:fileencoding=utf-8 __doc__ = """An implementation of the server-side of HTTP Digest Access Authentication, which is described in :rfc:`2617`. Example usage, using the built-in get_ha1_dict_plain function which...
ajibawa-2023/Python-Code-Large/train/row_86932
154
365
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86932:Assign_L5_C0", "label": "__doc__ =", "type": "assigned_variable", "loc": [5, 19], "level": 0, "parent": null, "vector": [14, 0, 0.0329, 0.0411, 0, 0.66, 0.0, 155, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__doc__", "arg_names": [], "import_names": [], "rhs_call_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86932:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86932:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86932:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86932:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import sys import cherrypy from cherrypy._cpcompat import basestring, ntou, json, json_encode, json_decode def json_processor(entity): """Read application/json data into request.json.""" if not entity.headers.get(ntou("Content-Length"), ntou("")): raise cherrypy.HTTPError(411) body = entity.fp...
ajibawa-2023/Python-Code-Large/train/row_86933
37
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86933:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86933:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86933:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86933:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86933:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""HTTP library functions. This module contains functions for building an HTTP application framework: any one, not just one whose name starts with "Ch". ;) If you reference any modules from some popular framework inside *this* module, FuManChu will personally hang you up by your thumbs and submit you to a public canin...
ajibawa-2023/Python-Code-Large/train/row_86934
267
506
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86934:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0089, 0.0158, 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_86934:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86934:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86934:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86934:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code...
import warnings warnings.warn('cherrypy.lib.http has been deprecated and will be removed ' 'in CherryPy 3.3 use cherrypy.lib.httputil instead.', DeprecationWarning) from cherrypy.lib.httputil import *
ajibawa-2023/Python-Code-Large/train/row_86935
3
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86935:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warning...
[]
"""Session implementation for CherryPy. You need to edit your config file to use sessions. Here's an example:: [/] tools.sessions.on = True tools.sessions.storage_type = "file" tools.sessions.storage_path = "/home/site/sessions" tools.sessions.timeout = 60 This sets the session to be stored in fi...
ajibawa-2023/Python-Code-Large/train/row_86936
448
871
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86936:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 85], "level": 0, "parent": null, "vector": [8, 0, 0.0494, 0.0976, 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_86936:ClassDef_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86936:Expr_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86936:ClassDef_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86936:Assign_L105_C4"}, {"f": "ajibawa-2023/Python-Code-L...
"""Functions for builtin CherryPy tools.""" import logging import re import cherrypy from cherrypy._cpcompat import basestring, ntob, md5, set from cherrypy.lib import httputil as _httputil # Conditional HTTP request support # def validate_etags(autotags=False, debug=False):...
ajibawa-2023/Python-Code-Large/train/row_86937
343
617
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86937:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0016, 0.0016, 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_86937:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86937:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86937:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86937:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code...
try: from io import UnsupportedOperation except ImportError: UnsupportedOperation = object() import logging import mimetypes mimetypes.init() mimetypes.types_map['.dwg']='image/x-dwg' mimetypes.types_map['.ico']='image/x-icon' mimetypes.types_map['.bz2']='application/x-bzip2' mimetypes.types_map['.gz']='applica...
ajibawa-2023/Python-Code-Large/train/row_86938
201
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_86938:Try_L1_C0", "label": "try", "type": "try", "loc": [1, 4], "level": 0, "parent": null, "vector": [7, 0, 0.0069, 0.011, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snip...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86938:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86938:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86938:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86938:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""Generic configuration system using unrepr. Configuration data may be supplied as a Python dictionary, as a filename, or as an open file object. When you supply a filename or file, Python's builtin ConfigParser is used (with some extensions). Namespaces ---------- Configuration keys are separated into namespaces b...
ajibawa-2023/Python-Code-Large/train/row_86939
278
485
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86939:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0206, 0.0392, 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_86939:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86939:ImportFrom_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86939:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86939:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large...