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
"Implementation of tzinfo classes for use with datetime.datetime." import time from datetime import timedelta, tzinfo from django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING # Python's doc say: "A tzinfo subclass must have an __init__() method that can # be called with no arguments". Fixe...
ajibawa-2023/Python-Code-Large/train/row_86046
53
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86046:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0102, 0.0102, 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_86046:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86046:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86046:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86046:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-...
import decimal import datetime from django.conf import settings from django.utils import dateformat, numberformat, datetime_safe from django.utils.importlib import import_module from django.utils.encoding import smart_str from django.utils.functional import lazy from django.utils.safestring import mark_safe from djang...
ajibawa-2023/Python-Code-Large/train/row_86047
113
190
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86047:Import_L1_C0", "label": "decimal import decimal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0053, 0.0053, 0, 0.66, 0.0, 349, 0, 1, 0, 0, 349, 0, 0], "semantic": {"name": "decimal", "arg_names": [], "import_names": ["decimal"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86047:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86047:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86047:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86047:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
ajibawa-2023/Python-Code-Large/train/row_86048
174
338
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86048:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0118, 0.0207, 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_86048:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86048:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86048:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86048:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import HTMLParser as _HTMLParser import re import sys current_version = sys.version_info use_workaround = ( (current_version < (2, 7, 3)) or (current_version >= (3, 0) and current_version < (3, 2, 3)) ) if not use_workaround: HTMLParser = _HTMLParser.HTMLParser else: class HTMLParser(_HTMLParser.HTML...
ajibawa-2023/Python-Code-Large/train/row_86049
76
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_86049:Import_L1_C0", "label": "HTMLParser import _HTMLParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 217, 0, 1, 0, 0, 217, 0, 0], "semantic": {"name": "HTMLParser", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86049:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86049:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86049:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86049:ClassDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
import re import unicodedata import warnings from gzip import GzipFile from htmlentitydefs import name2codepoint try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.utils.encoding import force_unicode from django.utils.functional import allow_lazy, SimpleLazyObjec...
ajibawa-2023/Python-Code-Large/train/row_86050
205
382
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86050:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0026, 0.0026, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86050:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86050:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86050:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86050:ImportFrom_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import os import stat from os.path import join, normcase, normpath, abspath, isabs, sep from django.utils.encoding import force_unicode try: WindowsError = WindowsError except NameError: class WindowsError(Exception): pass # Define our own abspath function that can handle joining # unicode paths to a...
ajibawa-2023/Python-Code-Large/train/row_86051
30
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_86051:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0135, 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_86051:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86051:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86051:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86051:ClassDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
import logging import traceback from django.conf import settings from django.core import mail from django.views.debug import ExceptionReporter, get_exception_reporter_filter # Make sure a NullHandler is available # This was added in Python 2.7/3.2 try: from logging import NullHandler except ImportError: class...
ajibawa-2023/Python-Code-Large/train/row_86052
55
105
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86052:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0095, 0.0095, 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_86052:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86052:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86052:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86052:ClassDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""Implementation of JSONEncoder """ import re c_encode_basestring_ascii = None c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', ...
ajibawa-2023/Python-Code-Large/train/row_86053
226
428
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86053:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0047, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86053:For_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86053:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86053:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86053:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
ajibawa-2023/Python-Code-Large/train/row_86055
55
353
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86055:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1416, 0.2805, 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_86055:Try_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86055:Import_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86055:Try_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86055:If_L112_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
ajibawa-2023/Python-Code-Large/train/row_86057
48
65
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86057:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0231, 0.0308, 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_86057:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86057:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86057:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86057:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ import copy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or other Node instances. """ # S...
ajibawa-2023/Python-Code-Large/train/row_86058
74
153
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86058:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0163, 0.0261, 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_86058:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86058:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86058:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86058:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import __builtin__ import itertools import warnings # Fallback for Python 2.5 def product(*args, **kwds): """ ...
ajibawa-2023/Python-Code-Large/train/row_86059
26
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_86059:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86059:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86059:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86059:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86059:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code...
import django import re def get_svn_revision(path=None): """ Returns the SVN revision in the form SVN-XXXX, where XXXX is the revision number. Returns SVN-unknown if anything goes wrong, such as an unexpected format of internal SVN files. If path is provided, it should be a directory whose SV...
ajibawa-2023/Python-Code-Large/train/row_86060
20
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_86060:Import_L1_C0", "label": "django import django", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0244, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["django"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86060:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86060:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86060:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86060:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from django.conf import settings from django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep='', force_grouping=False): """ Gets a number (as a number or string), and returns it as a string, using formats defined as arguments: * ...
ajibawa-2023/Python-Code-Large/train/row_86062
30
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_86062:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.02, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86062:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86062:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86062:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86062:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-La...
"""Utilities for writing code that runs on Python 2 and 3""" import operator import sys import types __author__ = "Benjamin Peterson <benjamin@python.org>" __version__ = "1.2.0" # True if we are running on Python 3. PY3 = sys.version_info[0] == 3 if PY3: string_types = str, integer_types = int, class_t...
ajibawa-2023/Python-Code-Large/train/row_86064
221
382
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86064:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0026, 0.0026, 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_86064:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86064:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86064:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86064:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributers. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the So...
ajibawa-2023/Python-Code-Large/train/row_86065
105
199
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86065:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0603, 0.1156, 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_86065:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86065:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86065:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86065:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""Timezone helper functions. This module uses pytz when it's available and fallbacks when it isn't. """ from datetime import datetime, timedelta, tzinfo from threading import local import time as _time try: import pytz except ImportError: pytz = None from django.conf import settings __all__ = [ 'utc',...
ajibawa-2023/Python-Code-Large/train/row_86066
123
282
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86066:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0089, 0.0142, 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_86066:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86066:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86066:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86066:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""HTML utilities suitable for global use.""" import re import string import urllib import urlparse from django.utils.safestring import SafeData, mark_safe from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy from django.utils.text import normalize_newlines # Conf...
ajibawa-2023/Python-Code-Large/train/row_86067
140
230
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86067:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0043, 0.0043, 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_86067:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86067:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86067:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86067:Return_L36_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Django's standard crypto functions and utilities. """ import hmac import struct import hashlib import binascii import operator import time # Use the system PRNG if possible import random try: random = random.SystemRandom() using_sysrandom = True except NotImplementedError: import warnings warnings...
ajibawa-2023/Python-Code-Large/train/row_86068
71
158
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86068:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0127, 0.019, 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_86068:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86068:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86068:Try_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86068:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError def clean_ipv6_address(ip_str, unpack_ipv4=False, error_message="This is not a valid IP...
ajibawa-2023/Python-Code-Large/train/row_86069
106
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_86069:ImportFrom_L4_C0", "label": "from django.core.exceptions import ValidationError", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.015, 0.0037, 0, 0.66, 0.0, 160, 0, 1, 0, 0, 160, 0, 0], "semantic": {"name": "django.core.exceptions",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86069:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86069:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86069:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86069:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-La...
# Taken from Python 2.7 with permission from/by the original author. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex'): raise ValueError("'package' not set to a string") dot = len(package) for x in ...
ajibawa-2023/Python-Code-Large/train/row_86070
19
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86070:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0278, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86070:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86070:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86070:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86070:If_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""Functions to parse datetime objects.""" # We're using regular expressions rather than time.strptime because: # - They provide both validation and parsing. # - They're more flexible for datetimes. # - The date/datetime/time constructors produce friendlier error messages. import datetime import re from django.utils....
ajibawa-2023/Python-Code-Large/train/row_86071
41
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_86071:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0118, 0.0118, 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_86071:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86071:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86071:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86071:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code...
""" Fixes Python 2.4's failure to deepcopy unbound functions. """ import copy import types import warnings warnings.warn("django.utils.copycompat is deprecated; use the native copy module instead", PendingDeprecationWarning) # Monkeypatch copy's deepcopy registry to handle functions correctly. if (hasa...
ajibawa-2023/Python-Code-Large/train/row_86072
8
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86072:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.1667, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86072:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86072:Assign_L14_C4"}]
""" The md5 and sha modules are deprecated since Python 2.5, replaced by the hashlib module containing both hash algorithms. Here, we provide a common interface to the md5 and sha constructors, depending on system version. """ import warnings warnings.warn("django.utils.hashcompat is deprecated; use hashlib instead", ...
ajibawa-2023/Python-Code-Large/train/row_86073
8
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86073:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
import copy from types import GeneratorType class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than one of the given dictionaries, only the first occurrenc...
ajibawa-2023/Python-Code-Large/train/row_86074
297
508
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86074:Import_L1_C0", "label": "copy import copy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.002, 0.002, 0, 0.66, 0.0, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86074:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86074:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86074:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86074:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u"A group Weblog by the shar...
ajibawa-2023/Python-Code-Large/train/row_86075
223
381
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86075:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 24], "level": 0, "parent": null, "vector": [8, 0, 0.0328, 0.063, 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_86075:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86075:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86075:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86075:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Co...
# Python's datetime strftime doesn't handle dates before 1900. # These classes override date and datetime to support the formatting of a date # through its full "proleptic Gregorian" date range. # # Based on code submitted to comp.lang.python by Andrew Dalke # # >>> datetime_safe.date(1850, 8, 2).strftime("%Y/%m/%d was...
ajibawa-2023/Python-Code-Large/train/row_86076
56
89
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86076:ImportFrom_L10_C0", "label": "from datetime import real_date, real_datetime", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1124, 0.0112, 0, 0.66, 0.0, 426, 0, 2, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86076:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86076:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86076:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86076:Return_L16_C8"}, {"f": "ajibawa-2023/Python-...
"""Translation helper functions.""" import locale import os import re import sys import gettext as gettext_module from threading import local try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.utils.importlib import import_module from django.utils.safestring imp...
ajibawa-2023/Python-Code-Large/train/row_86077
378
606
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86077:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0017, 0.0017, 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_86077:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86077:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86077:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86077:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. from django.conf import settings from django.utils.encoding import force_unicode from django...
ajibawa-2023/Python-Code-Large/train/row_86078
37
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86078:ImportFrom_L5_C0", "label": "from django.conf import settings", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0794, 0.0159, 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_86078:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86078:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86078:If_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_86078:Return_L10_C20"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
""" Internationalization support. """ import warnings from os import path from django.utils.encoding import force_unicode from django.utils.functional import lazy from django.utils.importlib import import_module __all__ = [ 'activate', 'deactivate', 'override', 'deactivate_all', 'get_language', 'get_languag...
ajibawa-2023/Python-Code-Large/train/row_86079
86
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86079:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0121, 0.0182, 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_86079:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86079:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86079:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86079:FunctionDef_L46_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
ajibawa-2023/Python-Code-Large/train/row_86080
130
252
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86080:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0377, 0.0714, 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_86080:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86080:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86080:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86080:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python...
from django.conf import settings from django.contrib.sites.models import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import HttpResponse, Http404 from django.template import loader, TemplateDoesNotExist, RequestContext from django.utils import feedgenera...
ajibawa-2023/Python-Code-Large/train/row_86081
92
186
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86081:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0054, 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_86081:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86081:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86081:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86081:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" Czech-specific form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.cz.cz_regions import REGION_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Select, RegexField, Field from django.utils...
ajibawa-2023/Python-Code-Large/train/row_86082
66
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86082:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0134, 0.0201, 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_86082:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86082:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86082:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86082:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Czech regions, translations get from http://www.crwflags.com/fotw/Flags/cz-re.html """ from django.utils.translation import ugettext_lazy as _ REGION_CHOICES = ( ('PR', _('Prague')), ('CE', _('Central Bohemian Region')), ('SO', _('South Bohemian Region')), ('PI', _('Pilsen Region')), ('CA', _(...
ajibawa-2023/Python-Code-Large/train/row_86083
3
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86083:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0909, 0.1364, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" India-specific Form helpers. """ from __future__ import absolute_import import re from django.contrib.localflavor.in_.in_states import STATES_NORMALIZED, STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, CharF...
ajibawa-2023/Python-Code-Large/train/row_86084
46
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86084:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0174, 0.0261, 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_86084:ClassDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86084:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86084:ClassDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86084:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Cod...
""" A mapping of state misspellings/abbreviations to normalized abbreviations, and an alphabetical list of states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ STATE_CHOICES = ( ('KA', 'Karnataka'), ('AP', 'Andhra Pr...
ajibawa-2023/Python-Code-Large/train/row_86085
3
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86085:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0301, 0.0526, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j. F Y H:i:s' YEAR_MONTH...
ajibawa-2023/Python-Code-Large/train/row_86086
14
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86086:Assign_L7_C0", "label": "DATE_FORMAT =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.1628, 0.0233, 0, 0.66, 0.0, 843, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DATE_FORMAT", "arg_names": [], "import_names": [], "rh...
[]
""" NL-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.nl.nl_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, Select from django.utils.encoding i...
ajibawa-2023/Python-Code-Large/train/row_86087
52
104
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86087:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0192, 0.0288, 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_86087:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86087:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86087:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86087:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.utils.translation import ugettext_lazy as _ PROVINCE_CHOICES = ( ('DR', _('Drenthe')), ('FL', _('Flevoland')), ('FR', _('Friesland')), ('GL', _('Gelderland')), ('GR', _('Groningen')), ('LB', _('Limburg')), ('NB', _('Noord-Brabant')), ('NH', _('Noord-Holland')), ('OV', _(...
ajibawa-2023/Python-Code-Large/train/row_86088
2
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_86088:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
from __future__ import absolute_import import datetime from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALI...
ajibawa-2023/Python-Code-Large/train/row_86089
49
101
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86089:ImportFrom_L1_C0", "label": "from __future__ import absolute_import", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0099, 0.0099, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86089:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86089:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86089:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86089:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ Macedonian municipalities per the reorganization from 2004. """ from django.utils.translation import ugettext_lazy as _ MK_MUNICIPALITIES = ( ('AD', _(u'Aerodrom')), ('AR', _(u'Aračinovo')), ('BR', _(u'Berovo')), ('TL', _(u'Bitola')), ('BG', _(u'Bogdanci')), ('VJ', _...
ajibawa-2023/Python-Code-Large/train/row_86090
3
92
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86090:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0326, 0.0326, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
from django.db.models.fields import CharField from django.utils.translation import ugettext_lazy as _ from django.contrib.localflavor.mk.mk_choices import MK_MUNICIPALITIES from django.contrib.localflavor.mk.forms import (UMCNField as UMCNFormField, MKIdentityCardNumberField as MKIdentityCardNumberFormField) cla...
ajibawa-2023/Python-Code-Large/train/row_86091
28
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86091:ImportFrom_L1_C0", "label": "from django.db.models.fields import CharField", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0227, 0, 0.66, 0.0, 5, 0, 1, 0, 0, 5, 0, 0], "semantic": {"name": "django.db.models.fields", "arg_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86091:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86091:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86091:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86091:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Iceland specific form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.is_.is_postalcodes import IS_POSTALCODES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField from django.forms.widgets import Se...
ajibawa-2023/Python-Code-Large/train/row_86092
44
86
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86092:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0233, 0.0349, 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_86092:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86092:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86092:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86092:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- IS_POSTALCODES = ( ('101', u'101 Reykjavík'), ('103', u'103 Reykjavík'), ('104', u'104 Reykjavík'), ('105', u'105 Reykjavík'), ('107', u'107 Reykjavík'), ('108', u'108 Reykjavík'), ('109', u'109 Reykjavík'), ('110', u'110 Reykjavík'), ('111', u'111 Reykjavík'...
ajibawa-2023/Python-Code-Large/train/row_86093
1
151
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86093:Assign_L3_C0", "label": "IS_POSTALCODES =", "type": "assigned_variable", "loc": [3, 151], "level": 0, "parent": null, "vector": [14, 0, 0.5099, 0.9868, 0, 0.66, 0.0, 247, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "IS_POSTALCODES", "arg_names": [], "import_names":...
[]
# -*- coding: utf-8 -*- """ Swedish specific Form helpers """ from __future__ import absolute_import import re from django import forms from django.utils.translation import ugettext_lazy as _ from django.core.validators import EMPTY_VALUES from django.contrib.localflavor.se.se_counties import COUNTY_CHOICES from djan...
ajibawa-2023/Python-Code-Large/train/row_86094
56
161
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86094:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0186, 0.0186, 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_86094:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86094:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86094:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86094:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ An alphabetical list of Swedish counties, sorted by codes. http://en.wikipedia.org/wiki/Counties_of_Sweden This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from django.utils.translation import ugettext_lazy as _ COUNTY_CHOICES = ( ...
ajibawa-2023/Python-Code-Large/train/row_86095
3
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86095:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 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...
[]
import datetime def id_number_checksum(gd): """ Calculates a Swedish ID number checksum, using the "Luhn"-algoritm """ n = s = 0 for c in (gd['year'] + gd['month'] + gd['day'] + gd['serial']): tmp = ((n % 2) and 1 or 2) * int(c) if tmp > 9: tmp = sum([int(i) for i i...
ajibawa-2023/Python-Code-Large/train/row_86096
35
83
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86096:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.012, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86096:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86096:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86096:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86096:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" IT-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.it.it_province import PROVINCE_CHOICES from django.contrib.localflavor.it.it_region import REGION_CHOICES from django.contrib.localflavor.it.util import ssn_check_digit, vat_number_check_digit from djang...
ajibawa-2023/Python-Code-Large/train/row_86097
50
88
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86097:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0227, 0.0341, 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_86097:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86097:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86097:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86097:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -* REGION_CHOICES = ( ('ABR', 'Abruzzo'), ('BAS', 'Basilicata'), ('CAL', 'Calabria'), ('CAM', 'Campania'), ('EMR', 'Emilia-Romagna'), ('FVG', 'Friuli-Venezia Giulia'), ('LAZ', 'Lazio'), ('LIG', 'Liguria'), ('LOM', 'Lombardia'), ('MAR', 'Marche'), ('MOL', ...
ajibawa-2023/Python-Code-Large/train/row_86098
1
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_86098:Assign_L3_C0", "label": "REGION_CHOICES =", "type": "assigned_variable", "loc": [3, 24], "level": 0, "parent": null, "vector": [14, 0, 0.5625, 0.9167, 0, 0.66, 0.0, 868, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "REGION_CHOICES", "arg_names": [], "import_names": ...
[]
from django.utils.encoding import smart_str, smart_unicode def ssn_check_digit(value): "Calculate Italian social security number check digit." ssn_even_chars = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': ...
ajibawa-2023/Python-Code-Large/train/row_86099
21
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86099:ImportFrom_L1_C0", "label": "from django.utils.encoding import smart_str, smart_unicode", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0227, 0, 0.66, 0.0, 96, 0, 2, 0, 0, 96, 0, 0], "semantic": {"name": "django.utils.enco...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86099:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86099:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86099:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86099:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -* PROVINCE_CHOICES = ( ('AG', 'Agrigento'), ('AL', 'Alessandria'), ('AN', 'Ancona'), ('AO', 'Aosta'), ('AR', 'Arezzo'), ('AP', 'Ascoli Piceno'), ('AT', 'Asti'), ('AV', 'Avellino'), ('BA', 'Bari'), ('BT', 'Barletta-Andria-Trani'), # active starting from 2009 ...
ajibawa-2023/Python-Code-Large/train/row_86100
1
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86100:Assign_L3_C0", "label": "PROVINCE_CHOICES =", "type": "assigned_variable", "loc": [3, 114], "level": 0, "parent": null, "vector": [14, 0, 0.5132, 0.9825, 0, 0.66, 0.0, 540, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "PROVINCE_CHOICES", "arg_names": [], "import_nam...
[]
""" GB-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.gb.gb_regions import GB_NATIONS_CHOICES, GB_REGION_CHOICES from django.forms.fields import CharField, Select from django.forms import ValidationError from django.utils.translation import ugettext_lazy as...
ajibawa-2023/Python-Code-Large/train/row_86101
30
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_86101:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0364, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86101:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86101:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86101:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86101:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Sources: English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales Scottish regions: http://...
ajibawa-2023/Python-Code-Large/train/row_86102
8
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_86102:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0412, 0.0722, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" JP-specific Form helpers """ from __future__ import absolute_import from django.contrib.localflavor.jp.jp_prefectures import JP_PREFECTURES from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ class JPPostalCodeField(RegexField): """ A form field tha...
ajibawa-2023/Python-Code-Large/train/row_86103
18
39
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86103:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0513, 0.0769, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86103:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86103:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86103:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86103:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.utils.translation import ugettext_lazy JP_PREFECTURES = ( ('hokkaido', ugettext_lazy('Hokkaido'),), ('aomori', ugettext_lazy('Aomori'),), ('iwate', ugettext_lazy('Iwate'),), ('miyagi', ugettext_lazy('Miyagi'),), ('akita', ugettext_lazy('Akita'),), ('yamagata', ugettext_lazy('Yamagat...
ajibawa-2023/Python-Code-Large/train/row_86104
2
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86104:ImportFrom_L1_C0", "label": "from django.utils.translation import ugettext_lazy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translatio...
[]
""" Chile specific form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.cl.cl_regions import REGION_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, Select from django.utils.translation impo...
ajibawa-2023/Python-Code-Large/train/row_86105
51
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_86105:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0206, 0.0309, 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_86105:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86105:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86105:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86105:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ A list of Chilean regions as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ REGION_CHOICES = ( ('RM', u'Región Metropolitana de Santiago'), ('I', u'Región de Tarapacá'), ('II', u'Región de Ant...
ajibawa-2023/Python-Code-Large/train/row_86106
2
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_86106:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.18, 0.24, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[]
""" AT-specific Form helpers """ import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.translation import ugettext_lazy as _ re_ssn = re.compile(r'^\d{4} \d{6}') class ATZipCodeField(RegexField)...
ajibawa-2023/Python-Code-Large/train/row_86107
32
69
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86107:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.029, 0.0435, 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_86107:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86107:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86107:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86107:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -* from django.utils.translation import ugettext_lazy as _ STATE_CHOICES = ( ('BL', _('Burgenland')), ('KA', _('Carinthia')), ('NO', _('Lower Austria')), ('OO', _('Upper Austria')), ('SA', _('Salzburg')), ('ST', _('Styria')), ('TI', _('Tyrol')), ('VO', _('Vorarlberg'...
ajibawa-2023/Python-Code-Large/train/row_86108
2
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86108:ImportFrom_L2_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0714, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
""" DE-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.de.de_states import STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.tran...
ajibawa-2023/Python-Code-Large/train/row_86109
48
88
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86109:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0227, 0.0341, 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_86109:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86109:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86109:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86109:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -* from django.utils.translation import ugettext_lazy as _ STATE_CHOICES = ( ('BW', _('Baden-Wuerttemberg')), ('BY', _('Bavaria')), ('BE', _('Berlin')), ('BB', _('Brandenburg')), ('HB', _('Bremen')), ('HH', _('Hamburg')), ('HE', _('Hessen')), ('MV', _('Mecklenburg-We...
ajibawa-2023/Python-Code-Large/train/row_86110
2
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_86110:ImportFrom_L2_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0476, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
""" Australian-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.au.au_states import STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.ut...
ajibawa-2023/Python-Code-Large/train/row_86111
31
60
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86111:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0333, 0.05, 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_86111:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86111:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86111:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86111:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import CharField from django.contrib.localflavor.au.au_states import STATE_CHOICES from django.contrib.localflavor.au import forms class AUStateField(CharField): description = _("Australian State") def __init__(self, *args,...
ajibawa-2023/Python-Code-Large/train/row_86112
28
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86112:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0233, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86112:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86112:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86112:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86112:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" An alphabetical list of states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ STATE_CHOICES = ( ('ACT', 'Australian Capital Territory'), ('NSW', 'New South Wales'), ('NT', 'Northern Territory'), ('QLD', 'Q...
ajibawa-2023/Python-Code-Large/train/row_86113
2
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_86113:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2059, 0.3529, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" PT-specific Form helpers """ import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ phone_digits_re = re.compile(r'^...
ajibawa-2023/Python-Code-Large/train/row_86114
28
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_86114:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0625, 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_86114:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86114:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86114:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86114:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- """ HR-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.hr.hr_choices import ( HR_LICENSE_PLATE_PREFIX_CHOICES, HR_COUNTY_CHOICES, HR_PHONE_NUMBER_PREFIX_CHOICES) from django.core.validators import EMPTY_VALUES from django.forms...
ajibawa-2023/Python-Code-Large/train/row_86115
118
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_86115:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0107, 0.0107, 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_86115:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86115:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86115:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86115:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ Sources: Croatian Counties: http://en.wikipedia.org/wiki/ISO_3166-2:HR Croatia doesn't have official abbreviations for counties. The ones provided are in common use. """ from django.utils.translation import ugettext_lazy as _ HR_COUNTY_CHOICES = ( ('GZG', _('Grad Zagreb')),...
ajibawa-2023/Python-Code-Large/train/row_86116
7
110
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86116:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0455, 0.0636, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
# -*- coding: utf-8 -*- """ AR-specific Form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Selec...
ajibawa-2023/Python-Code-Large/train/row_86117
64
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86117:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0256, 0.0256, 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_86117:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86117:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86117:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86117:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ A list of Argentinean provinces and autonomous cities as `choices` in a formfield. From http://www.argentina.gov.ar/argentina/portal/paginas.dhtml?pagina=425 This exists in this standalone file so that it's only imported into memory when explicitly needed. """ PROVINCE_CHOICES = ( ('B'...
ajibawa-2023/Python-Code-Large/train/row_86118
2
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86118:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1528, 0.2222, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
# -*- coding: utf-8 -*- """ BR-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.br.br_states import STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, CharF...
ajibawa-2023/Python-Code-Large/train/row_86119
96
166
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86119:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0181, 0.0181, 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_86119:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86119:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86119:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86119:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- """ An alphabetical list of Brazilian states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ STATE_CHOICES = ( ('AC', 'Acre'), ('AL', 'Alagoas'), ('AP', u'Amapá'), ('AM', 'Amazonas'), ...
ajibawa-2023/Python-Code-Large/train/row_86120
2
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_86120:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1216, 0.1622, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" Slovak-specific form helpers """ from __future__ import absolute_import from django.contrib.localflavor.sk.sk_districts import DISTRICT_CHOICES from django.contrib.localflavor.sk.sk_regions import REGION_CHOICES from django.forms.fields import Select, RegexField from django.utils.translation import ugettext_lazy ...
ajibawa-2023/Python-Code-Large/train/row_86121
23
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86121:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0435, 0.0652, 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_86121:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86121:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86121:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86121:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Slovak districts according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska """ from django.utils.translation import ugettext_lazy as _ DISTRICT_CHOICES = ( ('BB', _('Banska Bystrica')), ('BS', _('Banska Stiavnica')), ('BJ', _('Bardejov')), ('BN', _('Banovce nad Bebravo...
ajibawa-2023/Python-Code-Large/train/row_86122
3
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_86122:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.023, 0.0345, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
""" Slovak regions according to http://sk.wikipedia.org/wiki/Administrat%C3%ADvne_%C4%8Dlenenie_Slovenska """ from django.utils.translation import ugettext_lazy as _ REGION_CHOICES = ( ('BB', _('Banska Bystrica region')), ('BA', _('Bratislava region')), ('KE', _('Kosice region')), ('NR', _('Nitra regi...
ajibawa-2023/Python-Code-Large/train/row_86123
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_86123:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.1875, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
# -*- coding: utf-8 -*- """ A list of Mexican states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from django.utils.translation import ugettext_lazy as _ # All 31 states, plus the `Distrito Federal`. STATE_CHOICES = ( ...
ajibawa-2023/Python-Code-Large/train/row_86125
3
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_86125:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.1333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import CharField from django.contrib.localflavor.mx.mx_states import STATE_CHOICES from django.contrib.localflavor.mx.forms import (MXRFCField as MXRFCFormField, MXZipCodeField as MXZipCodeFormField, MXCURPField as MXCURPFormField...
ajibawa-2023/Python-Code-Large/train/row_86126
41
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86126:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86126:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86126:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86126:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86126:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Russian-specific forms helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.ru.ru_regions import RU_COUNTY_CHOICES, RU_REGIONS_CHOICES from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy as _ phone_digits_re = re.compile(r...
ajibawa-2023/Python-Code-Large/train/row_86127
30
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86127:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0299, 0.0448, 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_86127:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86127:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86127:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86127:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- encoding: utf-8 -*- """ Sources: http://ru.wikipedia.org/wiki/Коды_субъектов_Российской_Федерации http://ru.wikipedia.org/wiki/Федеральные_округа_Российской_Федерации """ from django.utils.translation import ugettext_lazy as _ RU_COUNTY_CHOICES = ( ("Central Federal County", _("Central Federal County...
ajibawa-2023/Python-Code-Large/train/row_86128
4
104
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86128:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0385, 0.0481, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
# -*- coding: utf-8 -*- """ Chinese-specific form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.cn.cn_provinces import CN_PROVINCE_CHOICES from django.forms import ValidationError from django.forms.fields import CharField, RegexField, Select from django.utils.translatio...
ajibawa-2023/Python-Code-Large/train/row_86129
69
214
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86129:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0187, 0.014, 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_86129:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86129:Expr_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86129:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86129:FunctionDef_L72_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ An alphabetical list of provinces for use as `choices` in a formfield. Reference: http://en.wikipedia.org/wiki/ISO_3166-2:CN http://en.wikipedia.org/wiki/Province_%28China%29 http://en.wikipedia.org/wiki/Direct-controlled_municipality http://en.wikipedia.org/wiki/Autonomous_regions_of_Chin...
ajibawa-2023/Python-Code-Large/train/row_86130
2
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_86130:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.1837, 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 -*- """ Spanish-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.es.es_provinces import PROVINCE_CHOICES from django.contrib.localflavor.es.es_regions import REGION_CHOICES from django.core.validators import EMPTY_VALUES from django.forms ...
ajibawa-2023/Python-Code-Large/train/row_86131
77
189
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86131:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0159, 0.0159, 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_86131:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86131:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86131:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86131:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ REGION_CHOICES = ( ('AN', _('Andalusia')), ('AR', _('Aragon')), ('O', _('Principality of Asturias')), ('IB', _('Balearic Islands')), ('PV', _('Basque Country')), ('CN', _('Canary Islands')), ('S', _('Cantabria')...
ajibawa-2023/Python-Code-Large/train/row_86132
2
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86132:ImportFrom_L2_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_name...
[]
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ PROVINCE_CHOICES = ( ('01', _('Arava')), ('02', _('Albacete')), ('03', _('Alacant')), ('04', _('Almeria')), ('05', _('Avila')), ('06', _('Badajoz')), ('07', _('Illes Balears')), ('08', _('Barcelona')), (...
ajibawa-2023/Python-Code-Large/train/row_86133
2
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86133:ImportFrom_L2_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0172, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
""" Israeli-specific form helpers """ import re from django.core.exceptions import ValidationError from django.core.validators import EMPTY_VALUES from django.forms.fields import RegexField, Field, EMPTY_VALUES from django.utils.checksums import luhn from django.utils.translation import ugettext_lazy as _ # Israeli I...
ajibawa-2023/Python-Code-Large/train/row_86134
29
66
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86134:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0303, 0.0455, 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_86134:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86134:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86134:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86134:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" FR-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.fr.fr_department import DEPARTMENT_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.ut...
ajibawa-2023/Python-Code-Large/train/row_86135
29
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86135:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.037, 0.0556, 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_86135:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86135:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86135:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86135:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- # See the "Code officiel géographique" on the INSEE website <www.insee.fr>. DEPARTMENT_CHOICES = ( # Metropolitan departments ('01', u'01 - Ain'), ('02', u'02 - Aisne'), ('03', u'03 - Allier'), ('04', u'04 - Alpes-de-Haute-Provence'), ('05', u'05 - Hautes-Alpes'), (...
ajibawa-2023/Python-Code-Large/train/row_86136
1
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86136:Assign_L5_C0", "label": "DEPARTMENT_CHOICES =", "type": "assigned_variable", "loc": [5, 117], "level": 0, "parent": null, "vector": [14, 0, 0.5214, 0.9658, 0, 0.66, 0.0, 545, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "DEPARTMENT_CHOICES", "arg_names": [], "import...
[]
""" Ecuador-specific form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.ec.ec_provinces import PROVINCE_CHOICES from django.forms.fields import Select class ECProvinceSelect(Select): """ A Select widget that uses a list of Ecuador provinces as its choices. """ de...
ajibawa-2023/Python-Code-Large/train/row_86137
8
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86137:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "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": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86137:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86137:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86137:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86137:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ A list of Ecuador departaments as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ PROVINCE_CHOICES = ( ('A', u'Azuay'), ('B', u'Bolívar'), ('F', u'Cañar'), ('C', u'Carchi'), ('H', u'Chimbor...
ajibawa-2023/Python-Code-Large/train/row_86138
2
35
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86138:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.2, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
""" South Africa-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import CharField, RegexField from django.utils.checksums import luhn from django.utils.translation import gettext as _ import re from datetime import date id_re ...
ajibawa-2023/Python-Code-Large/train/row_86139
28
60
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86139:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0333, 0.05, 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_86139:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86139:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86139:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86139:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.utils.translation import gettext_lazy as _ PROVINCE_CHOICES = ( ('EC', _('Eastern Cape')), ('FS', _('Free State')), ('GP', _('Gauteng')), ('KN', _('KwaZulu-Natal')), ('LP', _('Limpopo')), ('MP', _('Mpumalanga')), ('NC', _('Northern Cape')), ('NW', _('North West')), ('WC'...
ajibawa-2023/Python-Code-Large/train/row_86140
2
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_86140:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
""" Belgium-specific Form helpers """ from __future__ import absolute_import from django.contrib.localflavor.be.be_provinces import PROVINCE_CHOICES from django.contrib.localflavor.be.be_regions import REGION_CHOICES from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy...
ajibawa-2023/Python-Code-Large/train/row_86141
24
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86141:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0282, 0.0423, 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_86141:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86141:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86141:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86141:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.utils.translation import ugettext_lazy as _ # ISO codes PROVINCE_CHOICES = ( ('VAN', _('Antwerp')), ('BRU', _('Brussels')), ('VOV', _('East Flanders')), ('VBR', _('Flemish Brabant')), ('WHT', _('Hainaut')), ('WLG', _('Liege')), ('VLI', _('Limburg')), ('WLX', _('Luxembourg'))...
ajibawa-2023/Python-Code-Large/train/row_86142
2
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_86142:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
from django.utils.translation import ugettext_lazy as _ # ISO codes REGION_CHOICES = ( ('BRU', _('Brussels Capital Region')), ('VLG', _('Flemish Region')), ('WAL', _('Wallonia')) )
ajibawa-2023/Python-Code-Large/train/row_86143
2
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_86143:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_names...
[]
from django.contrib.localflavor.gb import forms import warnings warnings.warn( 'The "UK" prefix for United Kingdom has been deprecated in favour of the ' 'GB code. Please use the new GB-prefixed names.', PendingDeprecationWarning) UKPostcodeField = forms.GBPostcodeField UKCountySelect = forms.GBCountySelect U...
ajibawa-2023/Python-Code-Large/train/row_86144
6
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_86144:ImportFrom_L1_C0", "label": "from django.contrib.localflavor.gb import forms", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 708, 0, 1, 0, 0, 708, 0, 0], "semantic": {"name": "django.contrib.localflavor.gb", ...
[]
from django.contrib.localflavor.gb.gb_regions import ( ENGLAND_REGION_CHOICES, NORTHERN_IRELAND_REGION_CHOICES, WALES_REGION_CHOICES, SCOTTISH_REGION_CHOICES, GB_NATIONS_CHOICES, GB_REGION_CHOICES) import warnings warnings.warn( 'The "UK" prefix for United Kingdom has been deprecated in favour of the '...
ajibawa-2023/Python-Code-Large/train/row_86145
5
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86145:ImportFrom_L1_C0", "label": "from django.contrib.localflavor.gb.gb_regions import ENGLAND_REGION_CHOICES, NORTHERN_IRELAND_REGION_CHOICES, WALES_REGION_CHOICES\u2026", "type": "import", "loc": [1, 4], "level": 0, "parent": null, "vector": [1, 0, 0.2083, 0.3333, 0,...
[]
# -*- coding: utf-8 -*- """ An alphabetical list of Finnish municipalities for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ MUNICIPALITY_CHOICES = ( ('akaa', u"Akaa"), ('alajarvi', u"Alajärvi"), ('alavieska', u"Alav...
ajibawa-2023/Python-Code-Large/train/row_86146
2
353
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86146:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0142, 0.0198, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" FI-specific Form helpers """ from __future__ import absolute_import import re from django.contrib.localflavor.fi.fi_municipalities import MUNICIPALITY_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from dj...
ajibawa-2023/Python-Code-Large/train/row_86147
29
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_86147:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0364, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86147:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86147:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86147:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86147:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Cod...
""" Kuwait-specific Form helpers """ import re from datetime import date from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field from django.utils.translation import gettext as _ id_re = re.compile(r'^(?P<initial>\d{1})(?P<yy>\d\d)(?P<mm>\d\d)(?P<...
ajibawa-2023/Python-Code-Large/train/row_86148
32
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_86148:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0317, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86148:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86148:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86148:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86148:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django import forms DEFAULT_DATE_INPUT_FORMATS = ( '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06' '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006' '%B %d %Y', '%B %d, %Y', ...
ajibawa-2023/Python-Code-Large/train/row_86149
18
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_86149:ImportFrom_L1_C0", "label": "from django import forms", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0208, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["forms...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_86149:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86149:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86149:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86149:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" UK-specific Form helpers """ from __future__ import absolute_import from django.contrib.localflavor.ie.ie_counties import IE_COUNTY_CHOICES from django.forms.fields import Select class IECountySelect(Select): """ A Select widget that uses a list of Irish Counties as its choices. """ def __init__...
ajibawa-2023/Python-Code-Large/train/row_86150
8
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_86150:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.1875, 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_86150:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86150:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_86150:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_86150:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-...