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
class DummyUser(object): def get_and_delete_messages(self): pass class NeedsUserObject(object): def process_request(self, request): request.user = DummyUser()
ajibawa-2023/Python-Code-Large/train/row_96821
5
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96821:ClassDef_L1_C0", "label": "DummyUser", "type": "class", "loc": [1, 4], "level": 0, "parent": null, "vector": [3, 0, 0.2778, 0.4444, 0, 0.66, 0.0, 248, 0, 1, 0, 0, 186, 0, 0], "semantic": {"name": "DummyUser", "arg_names": [], "import_names": [], "rhs_call_name": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96821:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96821:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96821:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96821:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Co...
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from itertools import chain, imap from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, partial, soft_unicode, escape, miss...
ajibawa-2023/Python-Code-Large/train/row_96822
270
548
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96822:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0109, 0.0164, 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_96822:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96822:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96822:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96822:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: utf-8 -*- """ jinja2.bccache ~~~~~~~~~~~~~~ This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much. Situations whe...
ajibawa-2023/Python-Code-Large/train/row_96823
131
301
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96823:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 16], "level": 0, "parent": null, "vector": [8, 0, 0.0299, 0.0498, 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_96823:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96823:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96823:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96823:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from cStringIO import StringIO from itertools import chain from copy import deepcopy from jinja2 import nodes from j...
ajibawa-2023/Python-Code-Large/train/row_96824
1,063
1,649
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96824:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0036, 0.0055, 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_96824:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96824:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96824:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96824:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
# -*- coding: utf-8 -*- """ jinja2.meta ~~~~~~~~~~~ This module implements various functions that exposes information about templates that might be interesting for various kinds of applications. :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details. :license: BSD, see LICENSE fo...
ajibawa-2023/Python-Code-Large/train/row_96825
36
102
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96825:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0637, 0.098, 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_96825:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96825:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96825:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96825:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ jinja2.testsuite.tests ~~~~~~~~~~~~~~~~~~~~~~ Who tests the tests? :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Markup, Environment env = Environm...
ajibawa-2023/Python-Code-Large/train/row_96827
32
93
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96827:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0645, 0.0968, 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_96827:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96827:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96827:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96827:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~ Tests the debug system. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import sys import unittest from jinja2.testsuite import JinjaTestCase, filesystem_loader from jinja2 import E...
ajibawa-2023/Python-Code-Large/train/row_96828
22
60
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96828:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.15, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96828:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96828:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96828:If_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96828:FunctionDef_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# -*- coding: utf-8 -*- """ jinja2.testsuite.doctests ~~~~~~~~~~~~~~~~~~~~~~~~~ The doctests. Collects all tests we want to test from the Jinja modules. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest import doctest def suite(): f...
ajibawa-2023/Python-Code-Large/train/row_96829
16
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96829:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 11], "level": 0, "parent": null, "vector": [8, 0, 0.2241, 0.3448, 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_96829:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96829:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96829:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96829:Assign_L19_C4"}, {"f": "ajibawa-2023/Pytho...
# -*- coding: utf-8 -*- """ jinja2.testsuite.utils ~~~~~~~~~~~~~~~~~~~~~~ Tests utilities jinja uses. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import gc import unittest import pickle from jinja2.testsuite import JinjaTestCase from jinja2.utils imp...
ajibawa-2023/Python-Code-Large/train/row_96830
46
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96830:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0732, 0.1098, 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_96830:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96830:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96830:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96830:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.testsuite.ext ~~~~~~~~~~~~~~~~~~~~ Tests for the extensions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment, DictLoader...
ajibawa-2023/Python-Code-Large/train/row_96831
179
455
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96831:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0132, 0.0198, 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_96831:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96831:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96831:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96831:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ jinja2.testsuite.inheritance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the template inheritance feature. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Env...
ajibawa-2023/Python-Code-Large/train/row_96832
55
227
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96832:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0264, 0.0396, 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_96832:ClassDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96832:FunctionDef_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96832:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96832:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.testsuite.core_tags ~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the core tags like for and if. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment...
ajibawa-2023/Python-Code-Large/train/row_96833
103
285
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96833:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0211, 0.0316, 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_96833:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96833:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96833:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96833:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.testsuite.filters ~~~~~~~~~~~~~~~~~~~~~~~~ Tests for the jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Markup, Environment en...
ajibawa-2023/Python-Code-Large/train/row_96835
156
356
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96835:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0169, 0.0253, 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_96835:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96835:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96835:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96835:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.testsuite.loader ~~~~~~~~~~~~~~~~~~~~~~~ Test the loaders. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import tempfile import shutil import unittest from jinja2.testsuite import JinjaTestCase, dic...
ajibawa-2023/Python-Code-Large/train/row_96837
107
190
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96837:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0316, 0.0474, 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_96837:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96837:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96837:FunctionDef_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96837:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
ajibawa-2023/Python-Code-Large/train/row_96841
452
910
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96841:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0088, 0.0143, 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_96841:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96841:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96841:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96841:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from jinja2.runtime import Undefined try: from collections import Mapping as MappingType ...
ajibawa-2023/Python-Code-Large/train/row_96842
67
161
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96842:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0373, 0.0559, 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_96842:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96842:ImportFrom_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96842:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96842:Import_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
ajibawa-2023/Python-Code-Large/train/row_96844
31
68
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96844:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 18], "level": 0, "parent": null, "vector": [8, 0, 0.1471, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96844:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96844:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96844:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96844:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
ajibawa-2023/Python-Code-Large/train/row_96846
2
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_96846:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.2812, 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.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
ajibawa-2023/Python-Code-Large/train/row_96847
117
361
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96847:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0222, 0.036, 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_96847:Try_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96847:ImportFrom_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96847:Try_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96847:ImportFrom_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import gc import unittest from jinja2._markupsafe import Markup, escape, escape_silent class MarkupTestCase(unittest.TestCase): def test_markup_operations(self): # adding two strings should escape the unsafe one unsafe = '<script type="application/x-some-script">alert("foo");</script>' sa...
ajibawa-2023/Python-Code-Large/train/row_96848
36
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96848:Import_L1_C0", "label": "gc import gc", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0125, 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_96848:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96848:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96848:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96848:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ Highlevel implementation of the Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ HTML_ENTITIES = { 'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 1...
ajibawa-2023/Python-Code-Large/train/row_96849
2
267
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96849:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0225, 0.0337, 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._markupsafe._bundle ~~~~~~~~~~~~~~~~~~~~~~~~~~ This script pulls in markupsafe from a source folder and bundles it with Jinja2. It does not pull in the speedups module though. :copyright: Copyright 2010 by the Jinja team, see AUTHORS. :license: BSD, see ...
ajibawa-2023/Python-Code-Large/train/row_96850
29
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96850:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.2245, 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_96850:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96850:For_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96850:For_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96850:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re from itertools import imap __all__ = ['Markup', 'soft_unicode', 'escape', 'escape_silent'] _striptags_re = re.compile...
ajibawa-2023/Python-Code-Large/train/row_96851
110
225
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96851:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0267, 0.04, 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_96851:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96851:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96851:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96851:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- 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_96852
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_96852: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_96852:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96852:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96852:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96852: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_96853
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_96853: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_96853:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96853:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96853:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96853: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_96856
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_96856: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_96856:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96856:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96856:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96856: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_96858
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_96858: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_96859
419
1,009
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96859:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0059, 0.0089, 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_96859:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96859:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96859:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96859:Assign_L29_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_96860
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_96860: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_96861
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_96861: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_96861:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96861:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96861:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96861: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_96862
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_96862: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_96862:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96862:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96862:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96862: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_96863
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_96863: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_96863:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96863:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96863:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96863:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-...
from google.appengine.ext.remote_api import handler from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app import logging import re MY_SECRET_KEY = 'mytopsecret' cookie_re = re.compile('^"([^:]+):.*"$') class ApiCallHandler(handler.ApiCallHandler): def CheckIsAdmin(s...
ajibawa-2023/Python-Code-Large/train/row_96864
16
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96864:ImportFrom_L1_C0", "label": "from google.appengine.ext.remote_api import handler", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 61, 0, 1, 0, 0, 61, 0, 0], "semantic": {"name": "google.appengine.ext.rem...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96864:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96864:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96864:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96864:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-05-22 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted,...
ajibawa-2023/Python-Code-Large/train/row_96866
128
224
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96866:ImportFrom_L33_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.1473, 0.0045, 0, 0.66, 0.0, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96866:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96866:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96866:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96866:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/python # -*- coding: utf-8 -* location_map_br = { 1: { 'name': 'São Paulo'.decode('utf-8'), 'lat': -23.55, 'long': -46.64, 'radius': 294200, }, 2: { 'name': 'Rio De Janeiro', 'lat': -22.90, 'long': -43.21, 'radius': 294200, ...
ajibawa-2023/Python-Code-Large/train/row_96867
1
172
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96867:Assign_L3_C0", "label": "location_map_br =", "type": "assigned_variable", "loc": [3, 172], "level": 0, "parent": null, "vector": [14, 0, 0.5087, 0.9884, 0, 0.66, 0.0, 918, 0, 0, 0, 0, 0, 6, 7], "semantic": {"name": "location_map_br", "arg_names": [], "import_names...
[]
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ajibawa-2023/Python-Code-Large/train/row_96868
112
287
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96868:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0627, 0.0035, 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_96868:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96868:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96868:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96868:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ engineauth.models ==================================== Auth related models. :copyright: 2011 by Rodrigo Moraes. :license: Apache Sotware License, see LICENSE for details. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. ...
ajibawa-2023/Python-Code-Large/train/row_96869
174
480
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96869:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0156, 0.025, 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_96869:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96869:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96869:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96869:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-...
from engineauth import utils try: from appengine_config import engineauth as user_config except ImportError: user_config = None default_config = { 'base_uri': '/auth', 'login_uri': '/login', 'success_uri': '/', 'secret_key': 'CHANGE_TO_A_SECRET_KEY', # We add this here for testing only 'use...
ajibawa-2023/Python-Code-Large/train/row_96871
10
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96871:ImportFrom_L1_C0", "label": "from engineauth import utils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0161, 0.0161, 0, 0.66, 0.0, 882, 0, 1, 0, 0, 882, 0, 0], "semantic": {"name": "engineauth", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96871:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96871:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96871:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96871:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
def load_config(default_values, user_values): if user_values is None: return default_values config = {} for k, v in user_values.items(): if k in default_values: if isinstance(v, dict): cloned = user_values[k].copy() for key, value in default_valu...
ajibawa-2023/Python-Code-Large/train/row_96872
24
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96872:FunctionDef_L3_C0", "label": "load_config", "type": "function", "loc": [3, 23], "level": 0, "parent": null, "vector": [2, 0, 0.4194, 0.6774, 0, 0.66, 0.0, 914, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "load_config", "arg_names": ["default_values", "user_values"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96872:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96872:If_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96872:If_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96872:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth2 import OAuth2Strategy class FacebookStrategy(OAuth2Strategy): @property def options(self): return { 'provider': 'facebook', 'site_uri': 'https://graph.facebo...
ajibawa-2023/Python-Code-Large/train/row_96873
15
74
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96873:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0135, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96873:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96873:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96873:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96873:Return_L11_C8"}, {"f": "ajibawa-2023/Python-C...
from __future__ import absolute_import from engineauth import models from engineauth.strategies.base import BaseStrategy from google.appengine.api import users __author__ = 'kyle.finley@gmail.com (Kyle Finley)' def _abstract(): raise NotImplementedError('You need to override this function') class AppEngineOp...
ajibawa-2023/Python-Code-Large/train/row_96874
26
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_96874:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0189, 0.0189, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96874:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96874:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96874:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96874:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-...
from __future__ import absolute_import from apiclient.oauth import FlowThreeLegged from engineauth.strategies.base import BaseStrategy import httplib2 import cPickle as pickle __author__ = 'kyle.finley@gmail.com (Kyle Finley)' def _abstract(): raise NotImplementedError('You need to override this function') cla...
ajibawa-2023/Python-Code-Large/train/row_96875
35
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96875:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0128, 0.0128, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96875:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96875:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96875:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96875:Expr_L17_C8"}, {"f": "ajibawa-2023/Python-Co...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth2 import OAuth2Strategy class GithubStrategy(OAuth2Strategy): @property def options(self): return { 'provider': 'github', 'site_uri': 'https://api.github.comm'...
ajibawa-2023/Python-Code-Large/train/row_96876
15
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96876:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0133, 0.0133, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96876:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96876:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96876:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96876:Return_L11_C8"}, {"f": "ajibawa-2023/Python-C...
from __future__ import absolute_import from apiclient.discovery import build from engineauth.models import User from engineauth.strategies.oauth2 import OAuth2Strategy from google.appengine.api import memcache import httplib2 class GoogleStrategy(OAuth2Strategy): @property def options(self): return ...
ajibawa-2023/Python-Code-Large/train/row_96877
20
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_96877:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96877:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96877:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96877:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96877:Return_L14_C8"}, {"f": "ajibawa-2023/Python-...
""" engineauth.strategies.password ============================ OAuth2 Authentication Strategy :copyright: (c) 2011 Kyle Finley. :license: Apache Sotware License, see LICENSE for details. :copyright: (c) 2010 Google Inc. :license: Apache Software License, see LICENSE for details. """ from ...
ajibawa-2023/Python-Code-Large/train/row_96879
31
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96879:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0845, 0.1549, 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_96879:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96879:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96879:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96879:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-...
""" engineauth.strategies.oauth2 ============================ OAuth2 Authentication Strategy :copyright: (c) 2011 Kyle Finley. :license: Apache Sotware License, see LICENSE for details. :copyright: (c) 2010 Google Inc. :license: Apache Software License, see LICENSE for details. """ from __...
ajibawa-2023/Python-Code-Large/train/row_96880
38
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96880:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0845, 0.1549, 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_96880:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96880:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96880:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96880:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Co...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth import OAuthStrategy class TwitterStrategy(OAuthStrategy): @property def options(self): return { 'provider': 'twitter', 'request_token_uri': 'https://api.twi...
ajibawa-2023/Python-Code-Large/train/row_96882
16
77
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96882:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96882:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96882:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96882:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96882:Return_L12_C8"}, {"f": "ajibawa-2023/Python-C...
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth import OAuthStrategy class LinkedInStrategy(OAuthStrategy): @property def options(self): return { 'provider': 'linkedin', 'request_token_uri': 'https://api.l...
ajibawa-2023/Python-Code-Large/train/row_96883
18
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96883:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0128, 0.0128, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96883:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96883:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96883:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96883:Return_L12_C8"}, {"f": "ajibawa-2023/Python-C...
from exceptions import Exception class ValidationError(Exception): pass class NotSupportedError(Exception): pass
ajibawa-2023/Python-Code-Large/train/row_96884
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96884:ImportFrom_L1_C0", "label": "from exceptions import Exception", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 63, 0, 1, 0, 0, 63, 0, 0], "semantic": {"name": "exceptions", "arg_names": [], "import_names": [...
[]
class Address(object): """ Address used in a payment gateway transaction. """ def __init__(self, first_name=None, last_name=None, company=None, address1=None, address2=None, city=None, state_province=None, postal_code=None, country=None, phone=None, fax=None): ...
ajibawa-2023/Python-Code-Large/train/row_96885
59
153
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96885:ClassDef_L1_C0", "label": "Address", "type": "class", "loc": [1, 54], "level": 0, "parent": null, "vector": [3, 0, 0.1797, 0.3529, 0, 0.66, 0.0, 149, 0, 2, 0, 0, 186, 0, 3], "semantic": {"name": "Address", "arg_names": [], "import_names": [], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96885:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96885:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96885:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96885:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
""" Abstract interfacing with online payment gateways. """
ajibawa-2023/Python-Code-Large/train/row_96886
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96886:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
from base import AbstractGateway, GatewayRequest, GatewayResponse import urllib from quix.pay.transaction import CreditCard class AimGateway(AbstractGateway): """ Interface to the Authorize.Net Advanced Integration Method (AIM) payment gateway. The authentication login and password corresponds t...
ajibawa-2023/Python-Code-Large/train/row_96887
135
403
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96887:ImportFrom_L1_C0", "label": "from base import AbstractGateway, GatewayRequest, GatewayResponse", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0025, 0.0025, 0, 0.66, 0.0, 47, 0, 3, 0, 0, 47, 0, 0], "semantic": {"name": "base", "ar...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96887:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96887:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96887:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96887:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from base import AbstractGateway from authorizenet import AimGateway from quix.pay.transaction import CreditCard class AimEmulationGateway(AimGateway): """ Interface to the QuantamGateway using Authorize.Net Emulation. The QuantamGateway provides a basic emulation mode of the Authorize.Net paymen...
ajibawa-2023/Python-Code-Large/train/row_96888
10
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_96888:ImportFrom_L1_C0", "label": "from base import AbstractGateway", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["A...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96888:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96888:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96888:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96888:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import base from xml.etree import ElementTree class XmlMessengerGateway(base.Gateway): test_url = 'https://dev.psigate.com:7989/Messenger/XMLMessenger' live_url = 'https://secure.psigate.com:7934/Messenger/XMLMessenger' def authorize(self, card, amount, order_num=None, description=None): """ Submi...
ajibawa-2023/Python-Code-Large/train/row_96889
49
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_96889:Import_L1_C0", "label": "base import base", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.012, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["base"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96889:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96889:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96889:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96889:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from exceptions import NotImplementedError import urllib2 from quix.pay.transaction import CreditCard class AbstractGateway(object): """ Abstract class for interfacing with payment gateways. """ test_mode = False request_timeout = 30 use_test_url = False use_test_mode = False @pr...
ajibawa-2023/Python-Code-Large/train/row_96890
67
212
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96890:ImportFrom_L1_C0", "label": "from exceptions import NotImplementedError", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 0, 0.66, 0.0, 63, 0, 1, 0, 0, 63, 0, 0], "semantic": {"name": "exceptions", "arg_names": [], "im...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96890:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96890:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96890:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96890:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
def gateway_factory(name): if name == 'AimGateway': import authorizenet return authorizenet.AimGateway() if name == 'AimEmulationGateway': import quantam return quantam.AimEmulationGateway() if name == 'XmlMessengerGateway': import psigate return psigate.XmlMe...
ajibawa-2023/Python-Code-Large/train/row_96891
10
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_96891:FunctionDef_L1_C0", "label": "gateway_factory", "type": "function", "loc": [1, 10], "level": 0, "parent": null, "vector": [2, 0, 0.55, 1.0, 0, 0.66, 0.0, 97, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "gateway_factory", "arg_names": ["name"], "import_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96891:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96891:If_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96891:If_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96891:Import_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
""" Python module namespace for Quixotix Software, LLC """ try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
ajibawa-2023/Python-Code-Large/train/row_96892
6
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_96892:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 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_96892:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96892:Import_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96892:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96892:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_968...
#USE_I18N = True # Valid languages ''' LANGUAGES = ( ('en', _('English')), ('fr', _('French')), ('zh_TW', _('Chinese')), ('pt_BR', _('Brazilian')), ('pt', _('Portuguese')), ('es', _('Spanish')), ('es_AR', _('Argentinean Spanish')), ('sv', _('Swedish')), ('is', _('I...
ajibawa-2023/Python-Code-Large/train/row_96893
3
50
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96893:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 39], "level": 0, "parent": null, "vector": [8, 0, 0.43, 0.72, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
import urllib2, urllib API_SSL_SERVER="https://api-secure.recaptcha.net" API_SERVER="http://api.recaptcha.net" VERIFY_SERVER="api-verify.recaptcha.net" class RecaptchaResponse(object): def __init__(self, is_valid, error_code=None): self.is_valid = is_valid self.error_code = error_code def displayh...
ajibawa-2023/Python-Code-Large/train/row_96894
34
106
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96894:Import_L1_C0", "label": "urllib2 import urllib2, urllib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0094, 0, 0.66, 0.0, 345, 0, 2, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["ur...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96894:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96894:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96894:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96894:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code...
# -*- coding: utf-8 -*- from datetime import datetime from webapp2_extras.i18n import lazy_gettext as _ from webapp2_extras import i18n from webapp2_extras import i18n from webapp2_extras.i18n import lazy_gettext as _ import datetime from datetime import date, datetime, time from babel.dates import format_date, format...
ajibawa-2023/Python-Code-Large/train/row_96895
139
246
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96895:ImportFrom_L2_C0", "label": "from datetime import datetime", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0041, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96895:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96895:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96895:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96895:Return_L19_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python from google.appengine.ext import webapp from google.appengine.api import users import google.appengine.ext.webapp.util class LoginRequiredHandler(webapp.RequestHandler): def get(self): continue_url, = self.request.get('continue',allow_multiple=True) self.redirect(users.create...
ajibawa-2023/Python-Code-Large/train/row_96896
8
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96896:ImportFrom_L3_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0833, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96896:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96896:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96896:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96896:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code...
"""Tests for eventloop.py.""" import logging import os import time import unittest from google.appengine.api import apiproxy_stub_map from google.appengine.datastore import datastore_rpc from . import eventloop from . import test_utils class EventLoopTests(test_utils.NDBTest): def setUp(self): super(EventLoo...
ajibawa-2023/Python-Code-Large/train/row_96899
131
156
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96899:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0064, 0.0064, 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_96899:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96899:FunctionDef_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96899:FunctionDef_L16_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96899:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Co...
"""Higher-level Query wrapper. There are perhaps too many query APIs in the world. The fundamental API here overloads the 6 comparisons operators to represent filters on property values, and supports AND and OR operations (implemented as functions -- Python's 'and' and 'or' operators cannot be overloaded, and the '&'...
ajibawa-2023/Python-Code-Large/train/row_96900
758
1,575
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96900:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 123], "level": 0, "parent": null, "vector": [8, 0, 0.0394, 0.0781, 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_96900:FunctionDef_L163_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96900:Expr_L164_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96900:FunctionDef_L163_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96900:Assign_L165_C2"}, {"f": "ajibawa-2023/Python-...
"""A torture test to ferret out problems with multi-threading.""" import sys import threading from . import tasklets from . import context def main(): num = 10 try: num = int(sys.argv[1]) except Exception: pass threads = [] for i in range(num): t = threading.Thread(target=one_thread, args=(i, ...
ajibawa-2023/Python-Code-Large/train/row_96901
25
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96901:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0238, 0.0238, 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_96901:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96901:Assign_L11_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96901:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96901:Try_L12_C2"}, {"f": "ajibawa-2023/Python-Code-...
"""An event loop. This event loop should handle both asynchronous App Engine RPC objects (specifically urlfetch, memcache and datastore RPC objects) and arbitrary callback functions with an optional time delay. Normally, event loops are singleton objects, though there is no enforcement of this requirement. The API h...
ajibawa-2023/Python-Code-Large/train/row_96902
176
286
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96902:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.021, 0.0385, 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_96902:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96902:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96902:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96902:FunctionDef_L33_C2"}, {"f": "ajibawa-2023/Python-Code-...
"""Tests for stats.py.""" import datetime import os import unittest from google.appengine.api import datastore from . import stats from . import test_utils class StatsTests(test_utils.NDBTest): def setUp(self): """Setup test infrastructure.""" super(StatsTests, self).setUp() self.PopulateStatEntitie...
ajibawa-2023/Python-Code-Large/train/row_96903
186
334
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96903:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.003, 0.003, 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_96903:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96903:FunctionDef_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96903:FunctionDef_L15_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96903:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Co...
"""Polymorphic models and queries. The standard NDB Model class only supports 'functional polymorphism'. That is, you can create a subclass of Model, and then subclass that class, as many generations as necessary, and those classes will share all the same properties and behaviors of their base classes. However, subcl...
ajibawa-2023/Python-Code-Large/train/row_96905
69
245
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96905:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 16], "level": 0, "parent": null, "vector": [8, 0, 0.0347, 0.0653, 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_96905:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96905:Expr_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96905:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96905:FunctionDef_L41_C2"}, {"f": "ajibawa-2023/Python-Code-...
"""Tests for query.py.""" import datetime import unittest from google.appengine.api import datastore_errors from google.appengine.api import users from . import model from . import query from . import tasklets from . import test_utils class QueryTests(test_utils.NDBTest): def setUp(self): super(QueryTests, ...
ajibawa-2023/Python-Code-Large/train/row_96906
819
1,049
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96906:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.001, 0.001, 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_96906:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96906:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96906:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96906:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Co...
"""Tests for key.py.""" import base64 import pickle import unittest from google.appengine.api import datastore_errors from google.appengine.api import datastore_types from google.appengine.datastore import entity_pb from . import eventloop from . import key from . import model from . import tasklets from . import te...
ajibawa-2023/Python-Code-Large/train/row_96907
310
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_96907:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0023, 0.0023, 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_96907:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96907:FunctionDef_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96907:FunctionDef_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96907:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-...
"""Model and Property classes and associated stuff. A model class represents the structure of entities stored in the datastore. Applications define model classes to indicate the structure of their entities, then instantiate those model classes to create entities. All model classes must inherit (directly or indirectl...
ajibawa-2023/Python-Code-Large/train/row_96908
1,309
3,029
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96908:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 279], "level": 0, "parent": null, "vector": [8, 0, 0.0462, 0.0921, 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_96908:ClassDef_L320_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96908:Expr_L321_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96908:ClassDef_L327_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96908:Expr_L328_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
"""Some tests for datastore_rpc.py.""" import unittest from google.appengine.api import apiproxy_stub_map from google.appengine.datastore import datastore_rpc from . import model from . import test_utils class PendingTests(test_utils.NDBTest): """Tests for the 'pending RPC' management.""" def testBasicSetup1(...
ajibawa-2023/Python-Code-Large/train/row_96910
64
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_96910:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.012, 0.012, 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_96910:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96910:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96910:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96910:FunctionDef_L15_C2"}, {"f": "ajibawa-2023/Python-Code-...
"""The Key class, and associated utilities. A Key encapsulates the following pieces of information, which together uniquely designate a (possible) entity in the App Engine datastore: - an application id (a string) - a namespace (a string) - a list of one or more (kind, id) pairs where kind is a string and id is eit...
ajibawa-2023/Python-Code-Large/train/row_96911
348
771
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96911:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 69], "level": 0, "parent": null, "vector": [8, 0, 0.0454, 0.0895, 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_96911:ClassDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96911:Expr_L89_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96911:ClassDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96911:Assign_L190_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
"""Low-level utilities used internally by NDB. These are not meant for use by code outside NDB. """ import logging import os import sys import threading __all__ = [] DEBUG = True # Set to False for some speedups def logging_debug(*args): # NOTE: If you want to see debug messages, set the logging level # manu...
ajibawa-2023/Python-Code-Large/train/row_96912
103
161
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96912:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0155, 0.0248, 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_96912:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96912:If_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96912:If_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96912:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
"""Tests for model.py.""" import datetime import difflib import os import pickle import re import unittest from google.appengine.api import datastore_errors from google.appengine.api import datastore_types from google.appengine.api import memcache from google.appengine.api import namespace_manager from google.appengi...
ajibawa-2023/Python-Code-Large/train/row_96913
2,153
3,301
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96913:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0003, 0.0003, 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_96913:ClassDef_L406_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96913:FunctionDef_L408_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96913:FunctionDef_L408_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96913:Expr_L409_C4"}, {"f": "ajibawa-2023/Pytho...
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
ajibawa-2023/Python-Code-Large/train/row_96914
23
65
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96914:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2308, 0.0154, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96914:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96914:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96914:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96914:FunctionDef_L41_C2"}, {"f": "ajibawa-2023/Python-Code-...
"""Tests for metadata.py.""" import unittest from google.appengine.api import namespace_manager from . import metadata from . import model from . import test_utils class MetadataTests(test_utils.NDBTest): def setUp(self): super(MetadataTests, self).setUp() class Foo(model.Model): name = model.Stri...
ajibawa-2023/Python-Code-Large/train/row_96915
85
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_96915:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0093, 0.0093, 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_96915:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96915:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96915:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96915:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Co...
"""NDB -- A new datastore API for the Google App Engine Python runtime.""" __version__ = '0.9.5+' __all__ = [] from tasklets import * __all__ += tasklets.__all__ from model import * # This implies key.* __all__ += model.__all__ from query import * __all__ += query.__all__ from context import * __all__ += context...
ajibawa-2023/Python-Code-Large/train/row_96916
7
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96916:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
"""Tests for polymodel.py. See issue 35. http://goo.gl/iHkCm """ import pickle import unittest from google.appengine.api import namespace_manager from google.appengine.api import datastore_types from . import polymodel from . import model from . import test_utils PolyModel = polymodel.PolyModel class PolyModel...
ajibawa-2023/Python-Code-Large/train/row_96917
188
313
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96917:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.008, 0.0128, 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_96917:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96917:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96917:FunctionDef_L22_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_96917:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Co...
"""Models and helper functions for access to app's datastore metadata. These entities cannot be created by users, but are created as results of __namespace__, __kind__ and __property__ metadata queries. A simplified API is also offered: ndb.metadata.get_namespaces(): A list of namespace names. ndb.metadata.get_k...
ajibawa-2023/Python-Code-Large/train/row_96921
102
271
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96921:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0369, 0.0701, 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_96921:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96921:Expr_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96921:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96921:Assign_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
VERSION = '1.5.30'
ajibawa-2023/Python-Code-Large/train/row_96922
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96922:Assign_L1_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_name": ...
[]
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import with_statement import os from google.appengine.api.users import is_current_user_admin, \ UserNotFoundError import time import cgi import geo.geotypes import main from main import Ad import captcha import facebookconf from google.appengine import api ...
ajibawa-2023/Python-Code-Large/train/row_96924
108
424
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96924:ImportFrom_L3_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0071, 0.0024, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96924:ClassDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96924:FunctionDef_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96924:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96924:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python import imageshack import sys if __name__ == "__main__": if len(sys.argv)!=3: print "Usage upload.py <devkey> <filename/url>" sys.exit(1) u = imageshack.Uploader(sys.argv[1]) try: if sys.argv[2].startswith("http://"): print u.uploadURL(sys.argv[2]...
ajibawa-2023/Python-Code-Large/train/row_96925
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96925:Import_L1_C0", "label": "imageshack import imageshack", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 115, 0, 1, 0, 0, 115, 0, 0], "semantic": {"name": "imageshack", "arg_names": [], "import_names": ["i...
[]
#!/usr/bin/env python import yfrog import sys if __name__ == "__main__": if len(sys.argv)<4: print "Usage upload.py <username> <password> <filename/url> [<text>] [<source>]" sys.exit(1) u = yfrog.Uploader() if len(sys.argv)>=5: msg = sys.argv[4] else: msg = None if...
ajibawa-2023/Python-Code-Large/train/row_96926
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96926:Import_L1_C0", "label": "yfrog import yfrog", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "yfrog", "arg_names": [], "import_names": ["yfrog"], "rhs_ca...
[]
#!/usr/bin/env python ''' Client API library to upload images and videos to yfrog.com Using Yfrog public API, as described here: http://yfrog.com/api.php ''' import urllib2_file import urllib2 import socket from mimetypes import guess_type from xml.dom.minidom import parseString from os.path import exists API_UR...
ajibawa-2023/Python-Code-Large/train/row_96928
100
216
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96928:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0301, 0.037, 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_96928:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96928:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96928:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96928:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
''' yfrog api ''' from upload import *
ajibawa-2023/Python-Code-Large/train/row_96929
2
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96929:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python ''' Client API library to upload images and videos to imageshack.us Using "Unified upload API" as described here: http://reg.imageshack.us/content.php?page=developerpublic ''' import urllib2_file import urllib2 import socket import httplib from mimetypes import guess_type from xml.dom.minido...
ajibawa-2023/Python-Code-Large/train/row_96931
123
252
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96931:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0258, 0.0317, 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_96931:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96931:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96931:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96931:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python ''' Client API library for chuncked video uploading to imageshack.us Using "Streaming upload API" as described here: http://code.google.com/p/imageshackapi/wiki/StreamingAPI ''' import os import urllib import httplib import urllib2 from urlparse import urlparse from os.path import exists fro...
ajibawa-2023/Python-Code-Large/train/row_96932
107
176
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96932:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0369, 0.0455, 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_96932:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96932:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96932:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96932:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
''' imageshack api ''' from upload import * from chuncked_upload import Uploader as ChunkedUploader
ajibawa-2023/Python-Code-Large/train/row_96933
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96933:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[]
""" Trivia game for talkers and MU*s TODO: * Pickle scores in case connection is lost and game can restart gracefully """ import os from time import sleep import random import sys import cPickle import unicodedata from lyntin import exported from lyntin.modules import modutils #Number of credits to hand out #...
ajibawa-2023/Python-Code-Large/train/row_96935
202
303
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96935:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0165, 0.0297, 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_96935:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96935:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96935:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96935:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from django.db import models class Hotel(models.Model): name = models.CharField(max_length=100) country = models.CharField(max_length=100) address = models.CharField(max_length=200) rooms_empty = models.IntegerField(max_length=100) discription = models.CharField(max_length=200) #pictures = mo...
ajibawa-2023/Python-Code-Large/train/row_96936
9
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_96936:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96936:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96936:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96936:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96936:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.test import TestCase # Create your tests here.
ajibawa-2023/Python-Code-Large/train/row_96937
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_96937:ImportFrom_L1_C0", "label": "from django.test import TestCase", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 944, 0, 1, 0, 0, 944, 0, 0], "semantic": {"name": "django.test", "arg_names": [], "import_na...
[]
__author__ = 'esraa' from django.conf.urls import patterns, include, url from search import views #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', #url(r'^$', 'final_project.views.index'), url(r'^hotel_list/$', views.hotel_list ,name ='hotel_list' ) #url(r'^search/...
ajibawa-2023/Python-Code-Large/train/row_96938
4
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96938:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_...
[]
from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from search.models import Hotel def hotel_list(request): hotel_info = Hotel.objects.raw("SELECT * from hotel") hotel_data = { "hotel_detail" : hotel_info } print hot...
ajibawa-2023/Python-Code-Large/train/row_96939
9
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96939:ImportFrom_L1_C0", "label": "from django.shortcuts import render", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_names": [], "i...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96939:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96939:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96939:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96939:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.contrib import admin # Register your models here.
ajibawa-2023/Python-Code-Large/train/row_96940
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_96940:ImportFrom_L1_C0", "label": "from django.contrib import admin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 302, 0, 1, 0, 0, 302, 0, 0], "semantic": {"name": "django.contrib", "arg_names": [], "import...
[]
from django.db import models # Create your models here. class SearchForm(models.Model): country_name = models.CharField(max_length=100) date_start = models.DateField(null=True) date_end = models.DateField(null=True) address_hotel = models.CharField(max_length=200) hotel_name = models.CharField(max...
ajibawa-2023/Python-Code-Large/train/row_96941
10
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96941:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96941:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96941:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96941:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96941:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
__author__ = 'esraa' from django import forms class roomsform(forms.Form): country = forms.CharField(max_length=100) date_checkin = forms.DateField() date_checkout = forms.DateField()
ajibawa-2023/Python-Code-Large/train/row_96942
6
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96942:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96942:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96942:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96942:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96942:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.test import TestCase # Create your tests here.
ajibawa-2023/Python-Code-Large/train/row_96943
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_96943:ImportFrom_L1_C0", "label": "from django.test import TestCase", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 944, 0, 1, 0, 0, 944, 0, 0], "semantic": {"name": "django.test", "arg_names": [], "import_na...
[]
__author__ = 'esraa' from django.conf.urls import patterns, include, url from searchform import views #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', #url(r'^$', 'final_project.views.index'), # url(r'^/searchroom/search_list/$', views.search_list ,name ='search_list' ), ...
ajibawa-2023/Python-Code-Large/train/row_96944
4
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96944:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_...
[]
from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from searchform.models import SearchForm from searchform.forms import roomsform def search_list(request): rooms_info = SearchForm.objects.raw("SELECT id, hotel_name, address_hotel, countr...
ajibawa-2023/Python-Code-Large/train/row_96945
19
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_96945:ImportFrom_L1_C0", "label": "from django.shortcuts import render", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_names": [], "i...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_96945:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96945:Assign_L8_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96945:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96945:Assign_L9_C5"}, {"f": "ajibawa-2023/Python-Code-L...
from django.contrib import admin # Register your models here.
ajibawa-2023/Python-Code-Large/train/row_96946
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_96946:ImportFrom_L1_C0", "label": "from django.contrib import admin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 302, 0, 1, 0, 0, 302, 0, 0], "semantic": {"name": "django.contrib", "arg_names": [], "import...
[]