code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Founda...
ajibawa-2023/Python-Code-Large/train/row_82521
68
152
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82521:ImportFrom_L23_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.1513, 0.0066, 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_82521:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82521:Assign_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82521:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82521:If_L39_C1"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
ajibawa-2023/Python-Code-Large/train/row_82522
68
107
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82522:Import_L24_C0", "label": "model import model", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.2243, 0.0093, 0, 0.66, 0.0, 722, 0, 1, 0, 0, 722, 0, 0], "semantic": {"name": "model", "arg_names": [], "import_names": ["model"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82522:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82522:FunctionDef_L32_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82522:FunctionDef_L32_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82522:Assign_L33_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) Copyright 2008 Alberto Gimeno <gimenete at gmail dot com> # # This file is part of "debug_mode_on". # # "debug_mode_on" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free So...
ajibawa-2023/Python-Code-Large/train/row_82524
86
157
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82524:Import_L23_C0", "label": "model import model", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.1465, 0.0064, 0, 0.66, 0.0, 722, 0, 1, 0, 0, 722, 0, 0], "semantic": {"name": "model", "arg_names": [], "import_names": ["model"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82524:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82524:FunctionDef_L30_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82524:FunctionDef_L30_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82524:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
ajibawa-2023/Python-Code-Large/train/row_82525
7
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82525:ImportFrom_L23_C0", "label": "from handlers.BaseHandler import *", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.697, 0.0303, 0, 0.66, 0.0, 437, 0, 1, 0, 0, 437, 0, 0], "semantic": {"name": "handlers.BaseHandler", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82525:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82525:FunctionDef_L27_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82525:FunctionDef_L27_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82525:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
ajibawa-2023/Python-Code-Large/train/row_82526
8
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82526:ImportFrom_L23_C0", "label": "from handlers.BaseHandler import *", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.697, 0.0303, 0, 0.66, 0.0, 437, 0, 1, 0, 0, 437, 0, 0], "semantic": {"name": "handlers.BaseHandler", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82526:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82526:FunctionDef_L27_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82526:FunctionDef_L27_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82526:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) Copyright 2008 Alberto Gimeno <gimenete at gmail dot com> # # This file is part of "debug_mode_on". # # "debug_mode_on" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # t...
ajibawa-2023/Python-Code-Large/train/row_82527
5
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_82527:ImportFrom_L23_C0", "label": "from handlers.BaseHandler import *", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.7931, 0.0345, 0, 0.66, 0.0, 437, 0, 1, 0, 0, 437, 0, 0], "semantic": {"name": "handlers.BaseHandler", "arg_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82527:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82527:FunctionDef_L27_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82527:FunctionDef_L27_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82527:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (C) Copyright 2008 Alberto Gimeno <gimenete at gmail dot com> # (C) Copyright 2008 Ignacio Andreu <plunchete at gmail dot com> # (C) Copyright 2008 Néstor Salceda <nestor.salceda at gmail dot com> # # This file is part of "debug_mode_on". # # "debug_mode_on" is free soft...
ajibawa-2023/Python-Code-Large/train/row_82528
22
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_82528:ImportFrom_L25_C0", "label": "from handlers.BaseHandler import *", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.4717, 0.0189, 0, 0.66, 0.0, 437, 0, 1, 0, 0, 437, 0, 0], "semantic": {"name": "handlers.BaseHandler", "arg_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82528:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82528:FunctionDef_L29_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82528:FunctionDef_L29_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82528:Assign_L30_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
ajibawa-2023/Python-Code-Large/train/row_82529
85
134
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82529:ImportFrom_L23_C0", "label": "from handlers.MainPage import *", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.1716, 0.0075, 0, 0.66, 0.0, 49, 0, 1, 0, 0, 49, 0, 0], "semantic": {"name": "handlers.MainPage", "arg_names": [], "imp...
[]
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
ajibawa-2023/Python-Code-Large/train/row_82530
264
380
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82530:ImportFrom_L24_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0632, 0.0026, 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_82530:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82530:FunctionDef_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82530:FunctionDef_L31_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82530:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
ajibawa-2023/Python-Code-Large/train/row_82531
14
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_82531:ImportFrom_L24_C0", "label": "from handlers.BaseHandler import *", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.48, 0.02, 0, 0.66, 0.0, 437, 0, 1, 0, 0, 437, 0, 0], "semantic": {"name": "handlers.BaseHandler", "arg_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82531:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82531:FunctionDef_L28_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82531:FunctionDef_L28_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82531:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-...
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ import sys from itertools import chain, imap from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, partial, soft_unicode, e...
ajibawa-2023/Python-Code-Large/train/row_82532
268
544
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82532:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.011, 0.0165, 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_82532:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82532:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82532:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82532:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code...
# -*- 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_82533
449
901
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82533:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0089, 0.0144, 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_82533:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82533:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82533:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82533:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# -*- 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_82535
1,058
1,640
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82535:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0037, 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_82535:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82535:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82535:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82535:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
# -*- 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_82536
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_82536: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_82536:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82536:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82536:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82536:Assign_L26_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_82539
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_82539: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_82539:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82539:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82539:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82539:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- 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_82540
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_82540: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_82540:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82540:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82540:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82540:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- 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_82541
196
449
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82541:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0134, 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_82541:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82541:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82541:Try_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82541:ImportFrom_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- 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 # nose, nothing here to test __test__ = False number_r...
ajibawa-2023/Python-Code-Large/train/row_82542
60
146
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82542:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0411, 0.0616, 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_82542:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82542:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82542:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82542:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# -*- 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_82543
262
717
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82543:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0084, 0.0126, 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_82543:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82543:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82543:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82543:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code...
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_82544
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_82544: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_82544:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82544:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82544:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82544:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
# -*- 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_82545
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_82545: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_82545:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82545:For_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82545:For_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82545:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# -*- 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_82546
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_82546: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_82546:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82546:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82546:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82546:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- 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_82547
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_82547: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_82547:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82547:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82547:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82547:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- 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_82548
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_82548: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.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_82549
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_82549: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_82549:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82549:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82549:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82549:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- 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_82550
103
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_82550:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0295, 0.048, 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_82550:Try_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82550:ImportFrom_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82550:Try_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82550:ImportFrom_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- 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_82551
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_82551: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_82551:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82551:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82551:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82551:FunctionDef_L19_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 from gettext import gettext as _ ##ADDD # defaults for...
ajibawa-2023/Python-Code-Large/train/row_82552
17
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82552:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1463, 0.2195, 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._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_82553
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_82553: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_82553:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82553:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82553:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82553:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
# -*- 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_82554
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_82554: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 ~~~~~~ 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_82555
13
73
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82555:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 28], "level": 0, "parent": null, "vector": [8, 0, 0.2055, 0.3699, 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_82555:Try_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82555:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82555:Try_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82555:Assign_L34_C4"}]
# -*- 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_82558
121
280
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82558:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 16], "level": 0, "parent": null, "vector": [8, 0, 0.0321, 0.0536, 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_82558:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82558:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82558:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82558:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
ajibawa-2023/Python-Code-Large/train/row_82559
5
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82559:Assign_L24_C0", "label": "DEFAULT_LOCALE =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.8571, 0.0357, 0, 0.66, 0.0, 335, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DEFAULT_LOCALE", "arg_names": [], "import_names"...
[]
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
ajibawa-2023/Python-Code-Large/train/row_82560
134
258
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82560:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 26], "level": 0, "parent": null, "vector": [8, 0, 0.0523, 0.1008, 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_82560:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82560:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82560:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82560:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
ajibawa-2023/Python-Code-Large/train/row_82561
252
482
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82561:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 26], "level": 0, "parent": null, "vector": [8, 0, 0.028, 0.0539, 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_82561:ClassDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82561:Expr_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82561:ClassDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82561:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
ajibawa-2023/Python-Code-Large/train/row_82562
14
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82562:FunctionDef_L22_C0", "label": "loadProperties", "type": "function", "loc": [22, 37], "level": 0, "parent": null, "vector": [2, 0, 0.7973, 0.4324, 0, 0.66, 0.0, 366, 0, 1, 1, 0, 0, 0, 11], "semantic": {"name": "loadProperties", "arg_names": ["fileName"], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82562:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82562:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82562:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82562:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Co...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
ajibawa-2023/Python-Code-Large/train/row_82563
27
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82563:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 26], "level": 0, "parent": null, "vector": [8, 0, 0.1776, 0.3421, 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_82563:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82563:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82563:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82563:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
ajibawa-2023/Python-Code-Large/train/row_82564
31
97
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82564:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 26], "level": 0, "parent": null, "vector": [8, 0, 0.1392, 0.268, 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_82564:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82564:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82564:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82564:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation...
ajibawa-2023/Python-Code-Large/train/row_82565
57
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82565:Import_L22_C0", "label": "model import model", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.2018, 0.0092, 0, 0.66, 0.0, 722, 0, 1, 0, 0, 722, 0, 0], "semantic": {"name": "model", "arg_names": [], "import_names": ["model"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82565:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82565:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82565:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82565:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python version = "1.7" version_info = (1,7,0,"rc-2") __revision__ = "$Rev: 72 $" """ Python-Markdown =============== Converts Markdown to HTML. Basic usage as a module: import markdown md = Markdown() html = md.convert(your_text_string) See http://www.freewisdom.org/projects/python-mark...
ajibawa-2023/Python-Code-Large/train/row_82566
891
1,930
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82566:Assign_L3_C0", "label": "version =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0016, 0.0005, 0, 0.66, 0.0, 623, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "version", "arg_names": [], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82566:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82566:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82566:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82566:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software ...
ajibawa-2023/Python-Code-Large/train/row_82567
19
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_82567:Import_L23_C0", "label": "wsgiref.handlers import wsgiref.handlers", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.4694, 0.0204, 0, 0.66, 0.0, 709, 0, 1, 0, 0, 709, 0, 0], "semantic": {"name": "wsgiref.handlers", "arg_names": []...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82567:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82567:FunctionDef_L33_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82567:FunctionDef_L33_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82567:Expr_L34_C2"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python import struct from StringIO import StringIO from google.appengine.api import images def resize(image, maxwidth, maxheight): imageinfo = getimageinfo(image) width = float(imageinfo[1]) height = float(imageinfo[2]) ratio = width / height dwidth = maxheight * ratio dheight = ma...
ajibawa-2023/Python-Code-Large/train/row_82568
54
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_82568:Import_L2_C0", "label": "struct import struct", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.026, 0.013, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82568:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82568:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82568:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82568:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-L...
import simplejson import cgi class JSONFilter(object): def __init__(self, app, mime_type='text/x-json'): self.app = app self.mime_type = mime_type def __call__(self, environ, start_response): # Read JSON POST input to jsonfilter.json if matching mime type response = {...
ajibawa-2023/Python-Code-Large/train/row_82569
31
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_82569:Import_L1_C0", "label": "simplejson import simplejson", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 386, 0, 1, 0, 0, 386, 0, 0], "semantic": {"name": "simplejson", "arg_names": [], "import_names": ["sim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82569:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82569:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82569:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82569:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Implementation of JSONDecoder """ import re import sys from simplejson.scanner import Scanner, pattern try: from simplejson import _speedups except: _speedups = None FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): import struct import sys _BYTES = '7FF800...
ajibawa-2023/Python-Code-Large/train/row_82570
177
331
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82570:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.006, 0.0091, 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_82570:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82570:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82570:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82570:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
""" Iterator based sre token scanner """ import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN from re import VERBOSE, MULTILINE, DOTALL import re __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL) class Scanner(object): def __init__(self, lexic...
ajibawa-2023/Python-Code-Large/train/row_82571
47
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82571:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0312, 0.0469, 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_82571:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82571:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82571:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82571:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-...
""" Implementation of JSONEncoder """ import re try: from simplejson import _speedups except ImportError: _speedups = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"/]|[^\ -~])') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '...
ajibawa-2023/Python-Code-Large/train/row_82572
199
376
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82572:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0053, 0.008, 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_82572:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82572:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82572:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82572:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/python # -*- coding: utf-8 -*- ## # (C) Copyright 2011 Jose Blanco <jose.blanco[a]vikuit.com> # (C) Copyright 2011 Jose Carrasco <jose.carrasco[a]vikuit.com> # # This file is part of "vikuit". # # "vikuit" is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
ajibawa-2023/Python-Code-Large/train/row_82574
282
391
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82574:ImportFrom_L24_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0614, 0.0026, 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_82574:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82574:Assign_L29_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82574:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82574:Assign_L30_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#! /usr/bin/env python __revision__ = "$Id: setup.py,v 1.30 2005/06/14 01:20:22 akuchling Exp $" from distutils import core from distutils.core import Extension from distutils.command.build_ext import build_ext import os, sys if sys.version[0:1] == '1': raise RuntimeError, ("The Python Cryptography Toolkit requi...
ajibawa-2023/Python-Code-Large/train/row_82576
33
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_82576:ImportFrom_L1_C0", "label": "from distutils import core", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0094, 0, 0.66, 0.0, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "distutils", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82576:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82576:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82576:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82576:For_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""Miscellaneous modules Contains useful modules that don't belong into any of the other Crypto.* subpackages. Crypto.Util.number Number-theoretic functions (primality testing, etc.) Crypto.Util.randpool Random number generation Crypto.Util.RFC1751 Converts between 128-bit keys and human-readable ...
ajibawa-2023/Python-Code-Large/train/row_82582
3
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82582:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.375, 0.6875, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
import time from Crypto.Util import number # Test of prime-generation speed # This randfunc is deterministic, so we should always find the same primes. chars = ''.join(map(chr, range(255, 0, -1))) def randfunc (N): s = '' while len(s)<N: s += chars return s[:N] def main (): for i in range(12...
ajibawa-2023/Python-Code-Large/train/row_82583
16
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_82583:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0417, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82583:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82583:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82583:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82583:While_L11_C4"}, {"f": "ajibawa-2023/Python-Code-...
"""Secret-key encryption algorithms. Secret-key encryption algorithms transform plaintext in some way that is dependent on a key, producing ciphertext. This transformation can easily be reversed, if (and, hopefully, only if) one knows the key. The encryption modules here all support the interface described in PEP 272...
ajibawa-2023/Python-Code-Large/train/row_82584
3
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82584:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 24], "level": 0, "parent": null, "vector": [8, 0, 0.3788, 0.7273, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
"""Cryptographic protocols Implements various cryptographic protocols. (Don't expect to find network protocols here.) Crypto.Protocol.AllOrNothing Transforms a message into a set of message blocks, such that the blocks can be recombined to get the mess...
ajibawa-2023/Python-Code-Large/train/row_82587
3
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_82587:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 14], "level": 0, "parent": null, "vector": [8, 0, 0.4706, 0.7647, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
#! /usr/bin/env python __revision__ = "$Id: setup.py,v 1.30 2005/06/14 01:20:22 akuchling Exp $" from distutils import core from distutils.core import Extension from distutils.command.build_ext import build_ext import os, sys if sys.version[0:1] == '1': raise RuntimeError, ("The Python Cryptography Toolkit requi...
ajibawa-2023/Python-Code-Large/train/row_82588
33
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_82588:ImportFrom_L1_C0", "label": "from distutils import core", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0094, 0, 0.66, 0.0, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "distutils", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82588:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82588:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82588:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82588:For_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# # Test script for the Python Cryptography Toolkit. # __revision__ = "$Id: test.py,v 1.7 2002/07/11 14:31:19 akuchling Exp $" import os, sys # Add the build directory to the front of sys.path from distutils.util import get_platform s = "build/lib.%s-%.3s" % (get_platform(), sys.version) s = os.path.join(os.getcwd(...
ajibawa-2023/Python-Code-Large/train/row_82589
25
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82589:Assign_L5_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1316, 0.0263, 0, 0.66, 0.0, 809, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82589:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82589:Expr_L22_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82589:If_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82589:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82...
"""Public-key encryption and signature algorithms. Public-key encryption uses two different keys, one for encryption and one for decryption. The encryption key can be made public, and the decryption key is kept private. Many public-key algorithms can also be used to sign messages, and some can *only* be used for sig...
ajibawa-2023/Python-Code-Large/train/row_82594
3
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_82594:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 13], "level": 0, "parent": null, "vector": [8, 0, 0.4118, 0.7647, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
#!/usr/bin/env python # Script to time fast and slow RSA operations # Contributed by Joris Bontje. import time, pprint from Crypto.PublicKey import * from Crypto.Util.randpool import RandomPool from Crypto.Util import number pool = RandomPool() pool.stir() KEYSIZE=2048 COUNT=5 fasttime=0 slowtime=0 for x in range(C...
ajibawa-2023/Python-Code-Large/train/row_82596
34
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82596:Import_L6_C0", "label": "time import time, pprint", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0208, 0, 0.66, 0.0, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "ppri...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82596:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82596:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82596:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82596:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python # Script to time fast and slow RSA operations # Contributed by Joris Bontje. import time, pprint from Crypto.PublicKey import * from Crypto.Util.randpool import RandomPool from Crypto.Util import number pool = RandomPool() pool.stir() KEYSIZE=2048 COUNT=5 fasttime=0 slowtime=0 for x in range(C...
ajibawa-2023/Python-Code-Large/train/row_82597
34
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82597:Import_L6_C0", "label": "time import time, pprint", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0208, 0, 0.66, 0.0, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "ppri...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82597:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82597:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82597:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82597:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
# Just use the MD5 module from the Python standard library __revision__ = "$Id: MD5.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $" from md5 import * import md5 if hasattr(md5, 'digestsize'): digest_size = digestsize del digestsize del md5
ajibawa-2023/Python-Code-Large/train/row_82598
5
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82598:Assign_L4_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.3077, 0.0769, 0, 0.66, 0.0, 809, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82598:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82598:Assign_L10_C4"}]
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. This is just a copy of the Python 2.2 HMAC module, modified to work when used on versions of Python before 2.2. """ __revision__ = "$Id: HMAC.py,v 1.5 2002/07/25 17:19:02 z3p Exp $" import strin...
ajibawa-2023/Python-Code-Large/train/row_82599
51
108
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82599:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.037, 0.0648, 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_82599:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82599:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82599:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82599:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code...
# Just use the SHA module from the Python standard library __revision__ = "$Id: SHA.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $" from sha import * import sha if hasattr(sha, 'digestsize'): digest_size = digestsize del digestsize del sha
ajibawa-2023/Python-Code-Large/train/row_82600
5
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82600:Assign_L4_C0", "label": "__revision__ =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.3636, 0.0909, 0, 0.66, 0.0, 809, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__revision__", "arg_names": [], "import_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82600:If_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82600:Assign_L9_C4"}]
"""Hashing algorithms Hash functions take arbitrary strings as input, and produce an output of fixed size that is dependent on the input; it should never be possible to derive the input data given only the hash function's output. Hash functions can be used simply as a checksum, or, in association with a public-key al...
ajibawa-2023/Python-Code-Large/train/row_82601
3
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_82601:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 20], "level": 0, "parent": null, "vector": [8, 0, 0.4375, 0.8333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
"""Python Cryptography Toolkit A collection of cryptographic modules implementing various algorithms and protocols. Subpackages: Crypto.Cipher Secret-key encryption algorithms (AES, DES, ARC4) Crypto.Hash Hashing algorithms (MD5, SHA, HMAC) Crypto.Protocol Cryptographic protocols ...
ajibawa-2023/Python-Code-Large/train/row_82602
4
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82602:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 18], "level": 0, "parent": null, "vector": [8, 0, 0.4, 0.68, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[]
# # testdata.py : Test data for the various algorithms # # Part of the Python Cryptography Toolkit # # Distribute and use freely; there are no restrictions on further # dissemination and usage except those imposed by the laws of your # country of residence. This software is provided "as is" without # warranty of fitn...
ajibawa-2023/Python-Code-Large/train/row_82603
36
681
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82603:Assign_L19_C0", "label": "md2 =", "type": "assigned_variable", "loc": [19, 29], "level": 0, "parent": null, "vector": [14, 0, 0.0352, 0.0162, 0, 0.66, 0.0, 922, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "md2", "arg_names": [], "import_names": [], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82603:For_L412_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82603:Expr_L413_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82603:For_L414_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82603:Expr_L415_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
import cgi import urllib import time import random import urlparse import hmac import binascii VERSION = '1.0' # Hi Blaine! HTTP_METHOD = 'GET' SIGNATURE_METHOD = 'PLAINTEXT' # Generic exception class class OAuthError(RuntimeError): def __init__(self, message='OAuth error occured.'): self.message = messag...
ajibawa-2023/Python-Code-Large/train/row_82604
293
538
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82604:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0019, 0.0019, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82604:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82604:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82604:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82604: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_82606
125
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82606:ImportFrom_L33_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.1514, 0.0046, 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_82606:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82606:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82606:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82606:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/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_82607
125
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82607:ImportFrom_L33_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.1514, 0.0046, 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_82607:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82607:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82607:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82607:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Co...
from .resolver import resolver from django.utils.importlib import import_module def __repr__(self): return '<%s, %s, %s, %s>' % (self.alias, self.col, self.field.name, self.field.model.__name__) from django.db.models.sql.where import Constraint Constraint.__repr__ = __repr__ # TODO: manipulate a copy of ...
ajibawa-2023/Python-Code-Large/train/row_82610
28
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82610:ImportFrom_L1_C0", "label": "from resolver import resolver", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0192, 0, 0.66, 0.0, 594, 0, 1, 0, 0, 594, 0, 0], "semantic": {"name": "resolver", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82610:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82610:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82610:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82610:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Co...
from django.db import models from django.test import TestCase from .api import register_index from .lookups import StandardLookup from .resolver import resolver from djangotoolbox.fields import ListField from datetime import datetime import re class ForeignIndexed2(models.Model): name_fi2 = models.CharField(max_le...
ajibawa-2023/Python-Code-Large/train/row_82612
133
266
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82612:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0038, 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_82612:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82612:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82612:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82612:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.db import models from djangotoolbox.fields import ListField from copy import deepcopy import re regex = type(re.compile('')) class LookupDoesNotExist(Exception): pass class LookupBase(type): def __new__(cls, name, bases, attrs): new_cls = type.__new__(cls, name, bases, attrs) if n...
ajibawa-2023/Python-Code-Large/train/row_82613
175
266
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82613:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0038, 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_82613:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82613:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82613:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82613:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-...
from django.conf import settings from django.utils.importlib import import_module def merge_dicts(d1, d2): '''Update dictionary recursively. If values for a given key exist in both dictionaries and are dict-like they are merged.''' for k, v in d2.iteritems(): # Try to merge the values as if they wer...
ajibawa-2023/Python-Code-Large/train/row_82614
35
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82614:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82614:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82614:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82614:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82614:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
def autodiscover(): from autoload import autodiscover as auto_discover auto_discover('dbindexes') def load_indexes(): from django.conf import settings from django.utils.importlib import import_module for name in getattr(settings, 'DB_INDEX_MODULES', ()): import_module(name)
ajibawa-2023/Python-Code-Large/train/row_82616
8
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_82616:FunctionDef_L1_C0", "label": "autodiscover", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.2, 0.3, 0, 0.66, 0.0, 798, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "autodiscover", "arg_names": [], "import_names": [], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82616:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82616:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82616:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82616:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code...
from .lookups import LookupDoesNotExist, ExtraFieldLookup from . import lookups as lookups_module from .resolver import resolver import inspect # TODO: add possibility to add lookup modules def create_lookup(lookup_def): for _, cls in inspect.getmembers(lookups_module): if inspect.isclass(cls) and issubcla...
ajibawa-2023/Python-Code-Large/train/row_82617
19
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82617:ImportFrom_L1_C0", "label": "from lookups import LookupDoesNotExist, ExtraFieldLookup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 602, 0, 2, 0, 0, 602, 0, 0], "semantic": {"name": "lookups", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82617:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82617:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82617:For_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82617:If_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82619
27
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_82619:Assign_L18_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.2432, 0.0135, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82619:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82619:FunctionDef_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82619:FunctionDef_L29_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_82619:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82620
49
134
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82620:Assign_L18_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.1343, 0.0075, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82620:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82620:Expr_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82620:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82620:Return_L33_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82622
141
318
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82622:Assign_L18_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.0566, 0.0031, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82622:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82622:Expr_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82622:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82622:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82623
141
318
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82623:Assign_L18_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.0566, 0.0031, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82623:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82623:Expr_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82623:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82623:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82625
49
134
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82625:Assign_L18_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.1343, 0.0075, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82625:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82625:Expr_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82625:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82625:Return_L33_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82626
27
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_82626:Assign_L18_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.2432, 0.0135, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82626:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82626:FunctionDef_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82626:FunctionDef_L29_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_82626:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82627
10
59
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82627:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 18], "level": 0, "parent": null, "vector": [8, 0, 0.3051, 0.0169, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[]
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82628
23
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82628:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 18], "level": 0, "parent": null, "vector": [8, 0, 0.3273, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82628:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82628:Expr_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82628:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82628:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Implementation of JSONEncoder """ # NOTE(kgibbs): This line must be added to make this file work under # Python 2.2, which is commonly used at Google. from __future__ import generators # NOTE(kgibbs): End changes. import re # this should match any kind of infinity INFCHARS = re.compile(r'[infINF]') ESCAPE = re.com...
ajibawa-2023/Python-Code-Large/train/row_82630
151
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_82630:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0066, 0.01, 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_82630:For_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82630:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82630:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82630:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import simplejson import cgi class JSONFilter(object): def __init__(self, app, mime_type='text/x-json'): self.app = app self.mime_type = mime_type def __call__(self, environ, start_response): # Read JSON POST input to jsonfilter.json if matching mime type response = {'status': ...
ajibawa-2023/Python-Code-Large/train/row_82631
31
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_82631:Import_L1_C0", "label": "simplejson import simplejson", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 386, 0, 1, 0, 0, 386, 0, 0], "semantic": {"name": "simplejson", "arg_names": [], "import_names": ["sim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82631:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82631:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82631:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82631:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Implementation of JSONDecoder """ import re from scanner import Scanner, pattern FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): import struct import sys _BYTES = '7FF80000000000007FF0000000000000'.decode('hex') if sys.byteorder != 'big': # NOTE(kgibbs): These lines m...
ajibawa-2023/Python-Code-Large/train/row_82632
147
277
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82632:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0072, 0.0108, 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_82632:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82632:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82632:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82632:Import_L12_C4"}, {"f": "ajibawa-2023/Python-Co...
r""" A simple, fast, extensible JSON encoder and decoder JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. simplejson exposes an API familiar to uses of the standard library marshal and pickle modules. Encoding b...
ajibawa-2023/Python-Code-Large/train/row_82633
41
221
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82633:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 73], "level": 0, "parent": null, "vector": [8, 0, 0.1674, 0.3303, 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_82633:FunctionDef_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82633:Expr_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82633:FunctionDef_L83_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82633:If_L112_C4"}, {"f": "ajibawa-2023/Python-Code-La...
""" Iterator based sre token scanner """ # NOTE(kgibbs): This line must be added to make this file work under # Python 2.2, which is commonly used at Google. from __future__ import generators # NOTE(kgibbs): End changes. import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN from re i...
ajibawa-2023/Python-Code-Large/train/row_82634
52
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82634:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0263, 0.0395, 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_82634:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82634:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82634:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82634:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-...
import cgi import urllib import time import random import urlparse import hmac import base64 VERSION = '1.0' # Hi Blaine! HTTP_METHOD = 'GET' SIGNATURE_METHOD = 'PLAINTEXT' # Generic exception class class OAuthError(RuntimeError): def __init__(self, message='OAuth error occured.'): self.message = message ...
ajibawa-2023/Python-Code-Large/train/row_82635
281
523
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82635:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0019, 0.0019, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82635:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82635:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82635:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82635:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # # Copyright (C) 2007, 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
ajibawa-2023/Python-Code-Large/train/row_82636
23
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82636:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 18], "level": 0, "parent": null, "vector": [8, 0, 0.3273, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82636:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82636:Expr_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82636:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82636:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
ajibawa-2023/Python-Code-Large/train/row_82638
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82638:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82638:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82638:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82638:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82638:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8...
import mimetypes import os import urlparse try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.files.uploadedfile import UploadedFile from d...
ajibawa-2023/Python-Code-Large/train/row_82639
125
207
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82639:Import_L1_C0", "label": "mimetypes import mimetypes", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0048, 0.0048, 0, 0.66, 0.0, 583, 0, 1, 0, 0, 583, 0, 0], "semantic": {"name": "mimetypes", "arg_names": [], "import_names": ["mime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82639:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82639:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82639:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82639:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# Initialize Django. from djangoappengine import main from django.utils.importlib import import_module from django.conf import settings # Load all models.py to ensure signal handling installation or index # loading of some apps. for app in settings.INSTALLED_APPS: try: import_module('%s.models' % app) ...
ajibawa-2023/Python-Code-Large/train/row_82640
11
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_82640:ImportFrom_L2_C0", "label": "from djangoappengine import main", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0476, 0, 0.66, 0.0, 683, 0, 1, 0, 0, 683, 0, 0], "semantic": {"name": "djangoappengine", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82640:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82640:Try_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82640:Try_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82640:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82640...
from mapreduce import mapper_pipeline from mapreduce import mapreduce_pipeline def _convert_func_to_string(func): return '%s.%s' % (func.__module__, func.__name__) def _convert_model_to_string(model): return '%s.%s' % (model.__module__, model.__name__) def DjangoModelMapreduce(model, ...
ajibawa-2023/Python-Code-Large/train/row_82642
32
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82642:ImportFrom_L1_C0", "label": "from mapreduce import mapper_pipeline", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0104, 0.0104, 0, 0.66, 0.0, 420, 0, 1, 0, 0, 420, 0, 0], "semantic": {"name": "mapreduce", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82642:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82642:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82642:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82642:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# Initialize Django from djangoappengine import main from google.appengine.ext.appstats.ui import app as application, main if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_82643
4
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82643:ImportFrom_L2_C0", "label": "from djangoappengine import main", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.125, 0, 0.66, 0.0, 683, 0, 1, 0, 0, 683, 0, 0], "semantic": {"name": "djangoappengine", "arg_names": [], "import_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82643:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82643:Expr_L8_C4"}]
# Initialize Django. from djangoappengine import main from google.appengine.ext.appstats.ui import app as application
ajibawa-2023/Python-Code-Large/train/row_82644
2
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_82644:ImportFrom_L2_C0", "label": "from djangoappengine import main", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.25, 0, 0.66, 0.0, 683, 0, 1, 0, 0, 683, 0, 0], "semantic": {"name": "djangoappengine", "arg_names": [], "import_nam...
[]
from django.db import models from djangotoolbox.fields import BlobField from ..db.db_settings import get_indexes class EmailModel(models.Model): email = models.EmailField() number = models.IntegerField(null=True) class DateTimeModel(models.Model): datetime = models.DateTimeField() datetime_auto_no...
ajibawa-2023/Python-Code-Large/train/row_82645
60
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_82645:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0098, 0.0098, 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_82645:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82645:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82645:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82645:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from .test_backend import BackendTest from .test_field_db_conversion import FieldDBConversionTest from .test_field_options import FieldOptionsTest from .test_filter import FilterTest from .test_keys import KeysTest from .test_mapreduce import DjangoModelInputReaderTest, DjangoModelIteratorTest from .test_not_return_set...
ajibawa-2023/Python-Code-Large/train/row_82646
9
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_82646:ImportFrom_L1_C0", "label": "from test_backend import BackendTest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 623, 0, 1, 0, 0, 623, 0, 0], "semantic": {"name": "test_backend", "arg_names": [], "impo...
[]
# Initialize App Engine SDK if necessary. try: from google.appengine.api import apiproxy_stub_map except ImportError: from .boot import setup_env setup_env() from djangoappengine.utils import on_production_server, have_appserver DEBUG = not on_production_server TEMPLATE_DEBUG = DEBUG ROOT_URLCONF = 'url...
ajibawa-2023/Python-Code-Large/train/row_82648
22
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_82648:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.0519, 0.0649, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82648:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82648:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82648:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82648:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# Python 2.5 CGI handler. import os import sys from djangoappengine.main import application from google.appengine.ext.webapp.util import run_wsgi_app from djangoappengine.boot import setup_logging, env_ext from django.conf import settings path_backup = None def real_main(): # Reset path and environment variabl...
ajibawa-2023/Python-Code-Large/train/row_82649
55
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_82649:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.026, 0.013, 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_82649:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82649:Try_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82649:Try_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82649:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import os import sys # Add parent folder to sys.path, so we can import boot. # App Engine causes main.py to be reloaded if an exception gets raised # on the first request of a main.py instance, so don't add project_dir # multiple times. project_dir = os.path.abspath( os.path.dirname(os.path.dirname(os.path.dirnam...
ajibawa-2023/Python-Code-Large/train/row_82650
47
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82650:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0118, 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_82650:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82650:While_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82650:While_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82650:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
from django.core.management import execute_from_command_line from django.core.management.base import BaseCommand class Command(BaseCommand): help = "Runs a command with access to the remote App Engine production " \ "server (e.g. manage.py remote shell)." args = "remotecommand" def run_from_ar...
ajibawa-2023/Python-Code-Large/train/row_82652
14
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82652:ImportFrom_L1_C0", "label": "from django.core.management import execute_from_command_line", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.m...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82652:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82652:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82652:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82652:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import logging import time import sys from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand from ...boot import PROJECT_DIR from ...utils import appconfig PRE_DEPLOY_COMMANDS = () if 'mediagenerator' in settings.INSTALLED_APPS: PRE_D...
ajibawa-2023/Python-Code-Large/train/row_82653
48
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_82653:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0135, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82653:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82653:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82653:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82653:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-...