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
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_82872
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_82872: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_82872:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82872:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82872:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82872:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" Russian-specific forms helpers """ from __future__ import absolute_import, unicode_literals 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...
ajibawa-2023/Python-Code-Large/train/row_82873
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_82873: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_82873:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82873:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82873:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82873: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_82874
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_82874: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, unicode_literals 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 djang...
ajibawa-2023/Python-Code-Large/train/row_82875
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_82875: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_82875:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82875:Expr_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82875:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82875: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_82876
3
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_82876: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, unicode_literals 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 ...
ajibawa-2023/Python-Code-Large/train/row_82877
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_82877: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_82877:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82877:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82877:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82877: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_82878
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_82878: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', _('Araba')), ('02', _('Albacete')), ('03', _('Alacant')), ('04', _('Almeria')), ('05', _('Avila')), ('06', _('Badajoz')), ('07', _('Illes Balears')), ('08', _('Barcelona')), (...
ajibawa-2023/Python-Code-Large/train/row_82879
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_82879: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 """ from __future__ import unicode_literals 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.translatio...
ajibawa-2023/Python-Code-Large/train/row_82880
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_82880: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_82880:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82880:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82880:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82880:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" FR-specific Form helpers """ from __future__ import absolute_import, unicode_literals 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 CharField, RegexField,...
ajibawa-2023/Python-Code-Large/train/row_82881
31
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82881:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0351, 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...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82881:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82881:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82881:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82881:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- # See the "Code officiel géographique" on the INSEE website <www.insee.fr>. from __future__ import unicode_literals DEPARTMENT_CHOICES = ( # Metropolitan departments ('01', '01 - Ain'), ('02', '02 - Aisne'), ('03', '03 - Allier'), ('04', '04 - Alpes-de-Haute-Provence'), ...
ajibawa-2023/Python-Code-Large/train/row_82882
2
118
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82882:ImportFrom_L4_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0339, 0.0085, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[]
""" 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_82883
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_82883: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_82883:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82883:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82883:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82883: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. """ from __future__ import unicode_literals PROVINCE_CHOICES = ( ('A', 'Azuay'), ('B', 'Bolívar'), ('F', 'Cañar'), ...
ajibawa-2023/Python-Code-Large/train/row_82884
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_82884:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1389, 0.1944, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" South Africa-specific Form helpers """ from __future__ import unicode_literals 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 _ imp...
ajibawa-2023/Python-Code-Large/train/row_82885
29
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82885:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0328, 0.0492, 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_82885:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82885:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82885:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82885:Assign_L21_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_82886
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_82886: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_82887
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_82887: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_82887:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82887:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82887:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82887: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_82888
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_82888: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_82889
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_82889: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.', DeprecationWarning) UKPostcodeField = forms.GBPostcodeField UKCountySelect = forms.GBCountySelect UKNation...
ajibawa-2023/Python-Code-Large/train/row_82890
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_82890: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_82891
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_82891: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. """ from __future__ import unicode_literals MUNICIPALITY_CHOICES = ( ('akaa', "Akaa"), ('alajarvi'...
ajibawa-2023/Python-Code-Large/train/row_82892
3
355
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82892:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0141, 0.0197, 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, unicode_literals 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, RegexFie...
ajibawa-2023/Python-Code-Large/train/row_82893
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_82893: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_82893:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82893:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82893:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82893:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Cod...
""" Kuwait-specific Form helpers """ from __future__ import unicode_literals 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<i...
ajibawa-2023/Python-Code-Large/train/row_82894
33
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_82894:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0308, 0.0462, 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_82894:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82894:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82894:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82894:Assign_L26_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_82895
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_82895: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_82895:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82895:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82895:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82895: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_82896
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_82896: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_82896:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82896:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82896:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82896:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Sources: Irish Counties: http://en.wikipedia.org/wiki/Counties_of_Ireland """ from django.utils.translation import ugettext_lazy as _ IE_COUNTY_CHOICES = ( ('antrim', _('Antrim')), ('armagh', _('Armagh')), ('carlow', _('Carlow')), ('cavan', _('Cavan')), ('clare', _('Clare')), ('cork...
ajibawa-2023/Python-Code-Large/train/row_82897
3
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82897:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0625, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
ajibawa-2023/Python-Code-Large/train/row_82898
76
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_82898: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_82898:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82898:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82898:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82898:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# *-* coding: utf-8 *-* from __future__ import unicode_literals SI_POSTALCODES = [ (1000, 'Ljubljana'), (1215, 'Medvode'), (1216, 'Smlednik'), (1217, 'Vodice'), (1218, 'Komenda'), (1219, 'Laze v Tuhinju'), (1221, 'Motnik'), (1222, 'Trojane'), (1223, 'Blagovica'), (1225, 'Lukovic...
ajibawa-2023/Python-Code-Large/train/row_82899
3
470
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82899:ImportFrom_L2_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0021, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[]
# -*- coding: utf-8 -*- """ Romanian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime from django.contrib.localflavor.ro.ro_counties import COUNTIES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError, Field, RegexField, S...
ajibawa-2023/Python-Code-Large/train/row_82900
111
205
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82900:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0146, 0.0146, 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_82900:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82900:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82900:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82900:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# -*- coding: utf-8 -*- """ A list of Romanian counties as `choices` in a formfield. This exists as a standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals COUNTIES_CHOICES = ( ('AB', 'Alba'), ('AR', 'Arad'), ('AG', 'Argeş'), ('BC', ...
ajibawa-2023/Python-Code-Large/train/row_82901
3
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82901:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0849, 0.1132, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" Polish-specific form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.pl.pl_administrativeunits import ADMINISTRATIVE_UNIT_CHOICES from django.contrib.localflavor.pl.pl_voivodeships import VOIVODESHIP_CHOICES from django.core.validators import EMPTY_V...
ajibawa-2023/Python-Code-Large/train/row_82902
99
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82902:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0092, 0.0138, 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_82902:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82902:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82902:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82902:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Polish voivodeship as in http://en.wikipedia.org/wiki/Poland#Administrative_division """ from django.utils.translation import ugettext_lazy as _ VOIVODESHIP_CHOICES = ( ('lower_silesia', _('Lower Silesia')), ('kuyavia-pomerania', _('Kuyavia-Pomerania')), ('lublin', _('Lublin')), ('lubusz', _('Lubu...
ajibawa-2023/Python-Code-Large/train/row_82903
3
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82903:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0833, 0.125, 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 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ from __future__ import unicode_literals ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', 'Wrocław'), ('jeleniagora', 'Jelenia Góra'), ('legnica', 'Legnica'), ('boleslawiecki', ...
ajibawa-2023/Python-Code-Large/train/row_82904
3
386
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82904:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0078, 0.0078, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" PY-specific Form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.py.py_department import DEPARTMENT_CHOICES, DEPARTMENT_ROMAN_CHOICES from django.forms.fields import Select class PyDepartmentSelect(Select): """ A Select widget with a list of Paraguayan departments as ...
ajibawa-2023/Python-Code-Large/train/row_82905
12
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_82905:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0833, 0.125, 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_82905:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82905:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82905:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82905:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- # http://www.statoids.com/upy.html from __future__ import unicode_literals DEPARTMENT_CHOICES = ( ('AG', 'Alto Paraguay'), ('AA', 'Alto Paraná'), ('AM', 'Amambay'), ('AS', 'Asunción'), ('BQ', 'Boquerón'), ('CG', 'Caaguazú'), ('CZ', 'Caazapá'), ('CY', 'Canindeyú'...
ajibawa-2023/Python-Code-Large/train/row_82906
3
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_82906:ImportFrom_L4_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0217, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "impo...
[]
""" Hong Kong specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import CharField from django.forms import ValidationError from django.utils.encoding import smart_text from django.utils.translation import ugett...
ajibawa-2023/Python-Code-Large/train/row_82907
30
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_82907: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_82907:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82907:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82907:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82907:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import warnings warnings.warn("django.contrib.localflavor is deprecated. " "Use the separate django-localflavor package instead.", DeprecationWarning)
ajibawa-2023/Python-Code-Large/train/row_82908
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82908:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warnings"], "...
[]
# -*- coding: utf-8 -*- """ UY-specific form helpers. """ from __future__ import absolute_import, unicode_literals from django.core.validators import EMPTY_VALUES from django.forms.fields import Select, RegexField from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from dj...
ajibawa-2023/Python-Code-Large/train/row_82909
28
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82909:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0492, 0.0492, 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_82909:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82909:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82909:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82909:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """A list of Urguayan departaments as `choices` in a formfield.""" from __future__ import unicode_literals DEPARTAMENT_CHOICES = ( ('G', 'Artigas'), ('A', 'Canelones'), ('E', 'Cerro Largo'), ('L', 'Colonia'), ('Q', 'Durazno'), ('N', 'Flores'), ('O', 'Florida'), (...
ajibawa-2023/Python-Code-Large/train/row_82910
3
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_82910:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.08, 0.04, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[]
# -*- coding: utf-8 -*- def get_validation_digit(number): """ Calculates the validation digit for the given number. """ sum = 0 dvs = [4, 3, 6, 7, 8, 9, 2] number = str(number) for i in range(0, len(number)): sum = (int(number[-1 - i]) * dvs[i] + sum) % 10 return (10-sum) % 10
ajibawa-2023/Python-Code-Large/train/row_82911
8
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82911:FunctionDef_L3_C0", "label": "get_validation_digit", "type": "function", "loc": [3, 12], "level": 0, "parent": null, "vector": [2, 0, 0.625, 0.8333, 0, 0.66, 0.0, 198, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "get_validation_digit", "arg_names": ["number"], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82911:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82911:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82911:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82911:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- """ PE-specific Form helpers. """ from __future__ import absolute_import, unicode_literals from django.contrib.localflavor.pe.pe_region import REGION_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, Cha...
ajibawa-2023/Python-Code-Large/train/row_82912
37
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82912:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.04, 0.04, 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_82912:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82912:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82912:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82912:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ A list of Peru regions as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals REGION_CHOICES = ( ('AMA', 'Amazonas'), ('ANC', 'Ancash'), ('APU', 'Apurímac'), ...
ajibawa-2023/Python-Code-Large/train/row_82913
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_82913:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.1667, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
""" USA-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select, CharField from django.utils.encoding import smart_text from django.u...
ajibawa-2023/Python-Code-Large/train/row_82914
59
126
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82914:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0159, 0.0238, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82914:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82914:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82914:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82914:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Cod...
from django.utils.translation import ugettext_lazy as _ from django.db.models.fields import CharField from django.contrib.localflavor.us.us_states import STATE_CHOICES from django.contrib.localflavor.us.us_states import USPS_CHOICES class USStateField(CharField): description = _("U.S. state (two uppercase letters...
ajibawa-2023/Python-Code-Large/train/row_82915
26
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_82915:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0278, 0.0278, 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_82915:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82915:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82915:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82915:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" A mapping of state misspellings/abbreviations to normalized abbreviations, and alphabetical lists of US states, territories, military mail regions and non-US states to which the US provides postal service. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ # The...
ajibawa-2023/Python-Code-Large/train/row_82916
10
326
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82916:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0153, 0.0276, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" ID-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re import time from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, Select from django.utils.translation import ugettext_lazy as _ from django.ut...
ajibawa-2023/Python-Code-Large/train/row_82917
97
217
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82917:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0092, 0.0138, 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_82917:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82917:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82917:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82917:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import warnings from django.utils.translation import ugettext_lazy as _ # Reference: http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia # Indonesia does not have an official Province code standard. # I decided to use unambiguous and consistent (some are common) 3-letter codes. warnings.warn( 'There have been...
ajibawa-2023/Python-Code-Large/train/row_82918
5
107
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82918:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warning...
[]
""" Canada-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, CharField, Select from django.utils.encoding import smart_text from django.utils.tran...
ajibawa-2023/Python-Code-Large/train/row_82919
77
148
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82919:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0135, 0.0203, 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_82919:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82919:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82919:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82919:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" An alphabetical list of provinces and territories for use as `choices` in a formfield., and a mapping of province misspellings/abbreviations to normalized abbreviations Source: http://www.canada.gc.ca/othergov/prov_e.html This exists in this standalone file so that it's only imported into memory when explici...
ajibawa-2023/Python-Code-Large/train/row_82920
3
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_82920:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0873, 0.1587, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
""" Swiss-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.ch.ch_states import STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select f...
ajibawa-2023/Python-Code-Large/train/row_82921
68
122
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82921:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0164, 0.0246, 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_82921:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82921:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82921:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82921:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -* from django.utils.translation import ugettext_lazy as _ STATE_CHOICES = ( ('AG', _('Aargau')), ('AI', _('Appenzell Innerrhoden')), ('AR', _('Appenzell Ausserrhoden')), ('BS', _('Basel-Stadt')), ('BL', _('Basel-Land')), ('BE', _('Berne')), ('FR', _('Fribourg')), ('...
ajibawa-2023/Python-Code-Large/train/row_82922
2
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82922:ImportFrom_L2_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0645, 0.0323, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_nam...
[]
""" Norwegian-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re import datetime from django.contrib.localflavor.no.no_municipalities import MUNICIPALITY_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
ajibawa-2023/Python-Code-Large/train/row_82923
51
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_82923: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...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82923:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82923:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82923:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82923:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- """ An alphabetical list of Norwegian municipalities (fylker) fro use as `choices` in a formfield. This exists in this standalone file so that it's on ly imported into memory when explicitly needed. """ from __future__ import unicode_literals MUNICIPALITY_CHOICES = ( ('akershus', 'Akershus...
ajibawa-2023/Python-Code-Large/train/row_82924
3
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82924:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1515, 0.2121, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" Colombian-specific form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.co.co_departments import DEPARTMENT_CHOICES from django.forms.fields import Select class CODepartmentSelect(Select): """ A Select widget that uses a list of Colombian states as its choices. ""...
ajibawa-2023/Python-Code-Large/train/row_82925
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_82925: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_82925:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82925:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82925:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82925:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-...
# -*- coding: utf-8 -*- """ A list of Colombian departaments as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals DEPARTMENT_CHOICES = ( ('AMA', 'Amazonas'), ('ANT', 'Antioquia'), ('ARA',...
ajibawa-2023/Python-Code-Large/train/row_82926
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_82926:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.1556, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" TR-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.tr.tr_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Selec...
ajibawa-2023/Python-Code-Large/train/row_82927
49
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82927:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0211, 0.0316, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82927:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82927:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82927:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82927:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Cod...
# -*- coding: utf-8 -*- """ This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals PROVINCE_CHOICES = ( ('01', ('Adana')), ('02', ('Adıyaman')), ('03', ('Afyonkarahisar')), ('04', ('Ağrı')), ('68', ('Aksaray')),...
ajibawa-2023/Python-Code-Large/train/row_82928
3
90
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82928:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0389, 0.0444, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
from __future__ import unicode_literals import hashlib import os import posixpath import re try: from urllib.parse import unquote, urlsplit, urlunsplit, urldefrag except ImportError: # Python 2 from urllib import unquote from urlparse import urlsplit, urlunsplit, urldefrag from django.conf import setti...
ajibawa-2023/Python-Code-Large/train/row_82929
179
309
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82929:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82929:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82929:ImportFrom_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82929:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82929:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
try: from urllib.parse import urlparse from urllib.request import url2pathname except ImportError: # Python 2 from urllib import url2pathname from urlparse import urlparse from django.conf import settings from django.core.handlers.base import get_path_info from django.core.handlers.wsgi import WSGI...
ajibawa-2023/Python-Code-Large/train/row_82930
47
73
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82930:Try_L1_C0", "label": "try", "type": "try", "loc": [1, 6], "level": 0, "parent": null, "vector": [7, 0, 0.0479, 0.0822, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82930:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82930:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82930:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82930:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import default_storage, Storage, FileSystemStorage from django.utils.datastructures import SortedDict from django.utils.functional import empty, memoize, LazyObject from django.utils.importl...
ajibawa-2023/Python-Code-Large/train/row_82931
163
276
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82931:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 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_82931:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82931:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82931:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82931:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.conf import settings from django.conf.urls.static import static urlpatterns = [] def staticfiles_urlpatterns(prefix=None): """ Helper function to return a URL pattern for serving static files. """ if prefix is None: prefix = settings.STATIC_URL return static(prefix, view='djang...
ajibawa-2023/Python-Code-Large/train/row_82932
9
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_82932:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 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_82932:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82932:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82932:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82932:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from django import template from django.templatetags.static import StaticNode from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() class StaticFilesNode(StaticNode): def url(self, context): path = self.path.resolve(context) return staticfiles_storage.u...
ajibawa-2023/Python-Code-Large/train/row_82933
13
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_82933:ImportFrom_L1_C0", "label": "from django import template", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["temp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82933:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82933:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82933:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82933:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...
import os import fnmatch from django.conf import settings from django.core.exceptions import ImproperlyConfigured def matches_patterns(path, patterns=None): """ Return True or False depending on whether the ``path`` should be ignored (if it matches any pattern in ``ignore_patterns``). """ if patter...
ajibawa-2023/Python-Code-Large/train/row_82934
35
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82934:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0175, 0.0175, 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_82934:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82934:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82934:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82934:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from __future__ import unicode_literals import os from optparse import make_option from django.core.management.base import LabelCommand from django.utils.encoding import smart_text from django.contrib.staticfiles import finders class Command(LabelCommand): help = "Finds the absolute paths for the given static fi...
ajibawa-2023/Python-Code-Large/train/row_82935
22
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82935:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82935:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82935:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82935:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82935:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from __future__ import unicode_literals import os import sys from optparse import make_option from django.core.files.storage import FileSystemStorage from django.core.management.base import CommandError, NoArgsCommand from django.utils.encoding import smart_text from django.utils.datastructures import SortedDict from...
ajibawa-2023/Python-Code-Large/train/row_82936
156
303
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82936:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0033, 0.0033, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82936:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82936:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82936:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82936:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from optparse import make_option from django.conf import settings from django.core.management.commands.runserver import Command as RunserverCommand from django.contrib.staticfiles.handlers import StaticFilesHandler class Command(RunserverCommand): option_list = RunserverCommand.option_list + ( make_optio...
ajibawa-2023/Python-Code-Large/train/row_82937
15
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82937:ImportFrom_L1_C0", "label": "from optparse import make_option", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0345, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82937:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82937:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82937:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82937:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath try: from urllib.parse import unquote except ImportError: # Python 2 from urllib import unquote from django.conf import settings fr...
ajibawa-2023/Python-Code-Large/train/row_82938
20
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_82938:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0682, 0.1136, 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_82938:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82938:ImportFrom_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82938:Try_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82938:ImportFrom_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text = _("...
ajibawa-2023/Python-Code-Large/train/row_82939
23
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_82939:ImportFrom_L1_C0", "label": "from django import forms", "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": ["forms...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82939:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82939:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82939:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82939:ClassDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
from __future__ import unicode_literals from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class FlatPage(models.Model): url = models.CharField...
ajibawa-2023/Python-Code-Large/train/row_82940
22
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82940:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82940:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82940:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82940:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82940:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os from django.conf import settings from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.utils import skipIfCustomUser from django.template import Template, Context, TemplateSyntaxError from django.test import TestCase from django.test.utils import override_settings @overri...
ajibawa-2023/Python-Code-Large/train/row_82941
50
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82941:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0073, 0.0073, 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_82941:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82941:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82941:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82941:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings from django.utils import translation @override_settings...
ajibawa-2023/Python-Code-Large/train/row_82942
54
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_82942:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0102, 0.0102, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82942:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82942:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82942:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82942:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Cod...
from django.conf.urls import patterns, include # special urls for flatpage test cases urlpatterns = patterns('', (r'^flatpage_root', include('django.contrib.flatpages.urls')), (r'^accounts/', include('django.contrib.auth.urls')), )
ajibawa-2023/Python-Code-Large/train/row_82943
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_82943:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, include", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 528, 0, 2, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_names...
[]
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings @override_settings( LOGIN_URL='/...
ajibawa-2023/Python-Code-Large/train/row_82944
85
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_82944:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 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_82944:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82944:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82944:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82944:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase, Client from django.test.utils import override_settings @override_settings( LOGIN_URL='/accounts/login/', MIDDLEWARE_CLASSES=( ...
ajibawa-2023/Python-Code-Large/train/row_82945
50
77
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82945:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82945:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82945:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82945:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82945:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.flatpages.models import FlatPage from django.test import TestCase from django.test.utils import override_settings @override_settings( LOGIN_URL='/...
ajibawa-2023/Python-Code-Large/train/row_82946
68
129
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82946:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0078, 0.0078, 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_82946:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82946:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82946:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82946:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.contrib.flatpages.tests.csrf import * from django.contrib.flatpages.tests.forms import * from django.contrib.flatpages.tests.middleware import * from django.contrib.flatpages.tests.templatetags import * from django.contrib.flatpages.tests.views import *
ajibawa-2023/Python-Code-Large/train/row_82947
5
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82947:ImportFrom_L1_C0", "label": "from django.contrib.flatpages.tests.csrf import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 500, 0, 1, 0, 0, 500, 0, 0], "semantic": {"name": "django.contrib.flatpages.tests...
[]
from django.conf.urls import patterns urlpatterns = patterns('django.contrib.flatpages.views', (r'^(?P<url>.*)$', 'flatpage'), )
ajibawa-2023/Python-Code-Large/train/row_82948
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82948:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 528, 0, 1, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_names": [], "impor...
[]
from django.contrib.flatpages.views import flatpage from django.http import Http404 from django.conf import settings class FlatpageFallbackMiddleware(object): def process_response(self, request, response): if response.status_code != 404: return response # No need to check for a flatpage for non...
ajibawa-2023/Python-Code-Large/train/row_82949
12
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_82949:ImportFrom_L1_C0", "label": "from django.contrib.flatpages.views import flatpage", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 240, 0, 1, 0, 0, 240, 0, 0], "semantic": {"name": "django.contrib.flatpag...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82949:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82949:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82949:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82949:If_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django import template from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import get_current_site register = template.Library() class FlatpageNode(template.Node): def __init__(self, context_name, starts_with=None, user=None): self....
ajibawa-2023/Python-Code-Large/train/row_82950
43
102
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82950:ImportFrom_L1_C0", "label": "from django import template", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0098, 0.0098, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["te...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82950:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82950:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82950:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82950:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-...
from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext_lazy as _ from django.contrib.flatpages.forms import FlatpageForm class FlatPageAdmin(admin.ModelAdmin): form = FlatpageForm fieldsets = ( (None, {'fields': ('url', 'title...
ajibawa-2023/Python-Code-Large/train/row_82951
11
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_82951:ImportFrom_L1_C0", "label": "from django.contrib import admin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 302, 0, 1, 0, 0, 302, 0, 0], "semantic": {"name": "django.contrib", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82951:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82951:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82951:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82951:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import get_current_site from django.core.xheaders import populate_xheaders from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 fr...
ajibawa-2023/Python-Code-Large/train/row_82952
35
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_82952:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0135, 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_82952:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82952:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82952:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82952:If_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# This file intentionally left blank
ajibawa-2023/Python-Code-Large/train/row_82953
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
from __future__ import unicode_literals import os from datetime import date from django.conf import settings from django.contrib.sitemaps import Sitemap, GenericSitemap from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test.utils import override_settings ...
ajibawa-2023/Python-Code-Large/train/row_82954
72
146
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82954:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0068, 0.0068, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82954:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82954:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82954:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82954:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Co...
from __future__ import unicode_literals from datetime import date from django.test.utils import override_settings from .base import SitemapTestsBase class HTTPSSitemapTests(SitemapTestsBase): protocol = 'https' urls = 'django.contrib.sitemaps.tests.urls.https' def test_secure_sitemap_index(self): ...
ajibawa-2023/Python-Code-Large/train/row_82955
29
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82955:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82955:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82955:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82955:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82955:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from __future__ import unicode_literals from django.test.utils import override_settings from .base import TestModel, SitemapTestsBase @override_settings(ABSOLUTE_URL_OVERRIDES={}) class GenericViewsSitemapTests(SitemapTestsBase): def test_generic_sitemap(self): "A minimal generic sitemap can be rendere...
ajibawa-2023/Python-Code-Large/train/row_82956
11
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_82956:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82956:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82956:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82956:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82956:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Cod...
from datetime import datetime from django.conf.urls import patterns, url from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views from django.contrib.auth.models import User from django.views.decorators.cache import cache_page from django.contrib.sitemaps.tests.base import TestModel class ...
ajibawa-2023/Python-Code-Large/train/row_82957
17
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_82957:ImportFrom_L1_C0", "label": "from datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82957:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82957:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82957:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82957:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.conf.urls import patterns from .http import SimpleSitemap class HTTPSSitemap(SimpleSitemap): protocol = 'https' secure_sitemaps = { 'simple': HTTPSSitemap, } urlpatterns = patterns('django.contrib.sitemaps.views', (r'^secure/index\.xml$', 'index', {'sitemaps': secure_sitemaps}), (r'^secu...
ajibawa-2023/Python-Code-Large/train/row_82958
6
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_82958:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 528, 0, 1, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82958:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82958:Assign_L6_C4"}]
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.cache import cache from django.db import models from django.test import TestCase class TestModel(models.Model): "A test model for " name = models.CharField(max_length=100) class Meta: app_lab...
ajibawa-2023/Python-Code-Large/train/row_82959
25
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_82959:ImportFrom_L1_C0", "label": "from django.contrib.auth.models import User", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "django.contrib.auth.models", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82959:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82959:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82959:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82959:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from .flatpages import FlatpagesSitemapTests from .generic import GenericViewsSitemapTests from .http import HTTPSitemapTests from .https import HTTPSSitemapTests, HTTPSDetectionSitemapTests
ajibawa-2023/Python-Code-Large/train/row_82960
4
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82960:ImportFrom_L1_C0", "label": "from flatpages import FlatpagesSitemapTests", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 564, 0, 1, 0, 0, 564, 0, 0], "semantic": {"name": "flatpages", "arg_names": [], "impo...
[]
from __future__ import unicode_literals from django.conf import settings from django.utils.unittest import skipUnless from .base import SitemapTestsBase class FlatpagesSitemapTests(SitemapTestsBase): @skipUnless("django.contrib.flatpages" in settings.INSTALLED_APPS, "django.contrib.flatpages app...
ajibawa-2023/Python-Code-Large/train/row_82961
15
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_82961:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82961:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82961:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82961:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82961:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Cod...
from django.core.management.base import BaseCommand from django.contrib.sitemaps import ping_google class Command(BaseCommand): help = "Ping Google with an updated sitemap, pass optional url of sitemap" def execute(self, *args, **options): if len(args) == 1: sitemap_url = args[0] ...
ajibawa-2023/Python-Code-Large/train/row_82962
9
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82962:ImportFrom_L1_C0", "label": "from django.core.management.base import BaseCommand", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 931, 0, 1, 0, 0, 931, 0, 0], "semantic": {"name": "django.core.management...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82962:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82962:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82962:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82962:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La...
import warnings from django.contrib.sites.models import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.http import Http404 from django.template.response import TemplateResponse from django.utils import six def index(request, sitemaps, ...
ajibawa-2023/Python-Code-Large/train/row_82963
42
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_82963:Import_L1_C0", "label": "warnings import warnings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 358, 0, 1, 0, 0, 358, 0, 0], "semantic": {"name": "warnings", "arg_names": [], "import_names": ["warning...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82963:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82963:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82963:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82963:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
from django.contrib.sites.models import Site from django.core import urlresolvers, paginator from django.core.exceptions import ImproperlyConfigured try: from urllib.parse import urlencode from urllib.request import urlopen except ImportError: # Python 2 from urllib import urlencode, urlopen PING_URL =...
ajibawa-2023/Python-Code-Large/train/row_82964
75
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82964:ImportFrom_L1_C0", "label": "from django.contrib.sites.models import Site", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "django.contrib.sites.models",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82964:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82964:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82964:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82964:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored mes...
ajibawa-2023/Python-Code-Large/train/row_82965
30
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_82965:ImportFrom_L1_C0", "label": "from django.contrib.messages.storage.base import BaseStorage", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0185, 0, 0.66, 0.0, 63, 0, 1, 0, 0, 63, 0, 0], "semantic": {"name": "django.contrib....
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82965:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82965:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82965:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82965:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import json from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import MessageEncoder, MessageDecoder from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, django.contrib.sessions). """ session...
ajibawa-2023/Python-Code-Large/train/row_82966
25
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_82966:Import_L1_C0", "label": "json import json", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82966:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82966:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82966:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82966:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import json from django.conf import settings from django.contrib.messages.storage.base import BaseStorage, Message from django.http import SimpleCookie from django.utils.crypto import salted_hmac, constant_time_compare from django.utils.safestring import SafeData, mark_safe from django.utils import six class Message...
ajibawa-2023/Python-Code-Large/train/row_82967
90
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_82967:Import_L1_C0", "label": "json import json", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0062, 0, 0.66, 0.0, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82967:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82967:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82967:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82967:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from __future__ import unicode_literals from django.conf import settings from django.utils.encoding import force_text, python_2_unicode_compatible from django.contrib.messages import constants, utils LEVEL_TAGS = utils.get_level_tags() @python_2_unicode_compatible class Message(object): """ Represents an a...
ajibawa-2023/Python-Code-Large/train/row_82968
90
184
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82968:ImportFrom_L1_C0", "label": "from __future__ import unicode_literals", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0054, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82968:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82968:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82968:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82968:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_storage(import_path): """ Imports the message storage class described by import_path, where import_path is the full Python path to the class. """ try: ...
ajibawa-2023/Python-Code-Large/train/row_82969
13
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82969:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 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_82969:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82969:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82969:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82969:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.contrib.messages.api import get_messages def messages(request): """ Returns a lazy 'messages' context variable. """ return {'messages': get_messages(request)}
ajibawa-2023/Python-Code-Large/train/row_82970
4
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82970:ImportFrom_L1_C0", "label": "from django.contrib.messages.api import get_messages", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 488, 0, 1, 0, 0, 488, 0, 0], "semantic": {"name": "django.contrib.messages...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82970:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82970:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82970:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82970:Return_L8_C4"}]
# Models module required so tests are discovered.
ajibawa-2023/Python-Code-Large/train/row_82971
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]