code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j N Y' DATETIME_FORMAT = "j N Y, G:i:s" TIME_FORMAT = 'G:i:s' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'd-m-Y' SHORT_DATETIME_FORMAT = 'd-m-Y G:i:s' FIRST_DAY_OF_WEEK = 1 #M...
[ [ 14, 0, 0.1163, 0.0233, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1395, 0.0233, 0, 0.66, 0.0769, 146, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1628, 0.0233, 0, 0...
[ "DATE_FORMAT = 'j N Y'", "DATETIME_FORMAT = \"j N Y, G:i:s\"", "TIME_FORMAT = 'G:i:s'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'j F'", "SHORT_DATE_FORMAT = 'd-m-Y'", "SHORT_DATETIME_FORMAT = 'd-m-Y G:i:s'", "FIRST_DAY_OF_WEEK = 1 #Monday", "DATE_INPUT_FORMATS = (\n '%d-%m-%y', '%d/%m/%y...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = r'j \de F \de Y' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = r'j \de F \de Y \a \le\s G:i' YEAR_MONTH_FORMAT = r'F \de\l Y' MONTH_DAY_FORMAT = r'j \de F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd...
[ [ 14, 0, 0.1667, 0.0333, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2, 0.0333, 0, 0.66, 0.0769, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2333, 0.0333, 0, 0.66...
[ "DATE_FORMAT = r'j \\de F \\de Y'", "TIME_FORMAT = 'G:i:s'", "DATETIME_FORMAT = r'j \\de F \\de Y \\a \\le\\s G:i'", "YEAR_MONTH_FORMAT = r'F \\de\\l Y'", "MONTH_DAY_FORMAT = r'j \\de F'", "SHORT_DATE_FORMAT = 'd/m/Y'", "SHORT_DATETIME_FORMAT = 'd/m/Y G:i'", "FIRST_DAY_OF_WEEK = 1 # Monday", "DATE_I...
DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATETIME_FORMAT = 'd.m.Y H:i' FIRST_DAY_OF_WEEK = 1 # Monday DATE_INPUT_FORMATS = ( '%Y-%m-%d', '%j.%m.%Y', '%j.%m.%y', # '2006-10-25', '25.10.2006', '25.10...
[ [ 14, 0, 0.0294, 0.0294, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0588, 0.0294, 0, 0.66, 0.0769, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0882, 0.0294, 0, 0...
[ "DATE_FORMAT = 'j. F Y'", "TIME_FORMAT = 'H:i'", "DATETIME_FORMAT = 'j. F Y H:i'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'j. F'", "SHORT_DATE_FORMAT = 'd.m.Y'", "SHORT_DATETIME_FORMAT = 'd.m.Y H:i'", "FIRST_DAY_OF_WEEK = 1 # Monday", "DATE_INPUT_FORMATS = (\n '%Y-%m-%d', '%j.%m.%Y', '%...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'd F Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = # MONTH_DAY_FORMAT = SHORT_DATE_FORMAT = 'j M Y' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS = # TI...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.5, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.5556, 0.0556, 0, 0.66...
[ "DATE_FORMAT = 'd F Y'", "TIME_FORMAT = 'g:i:s A'", "SHORT_DATE_FORMAT = 'j M Y'" ]
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'j M, Y' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS = ...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.1667, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4444, 0.0556, 0, 0...
[ "DATE_FORMAT = 'd F Y'", "TIME_FORMAT = 'H:i:s'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'j F'", "SHORT_DATE_FORMAT = 'j M, Y'", "DECIMAL_SEPARATOR = ','", "THOUSAND_SEPARATOR = '.'" ]
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j F Y' TIME_FORMAT = 'h:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'j M Y' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS = #...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.3333, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.5, 0.0556, 0, 0.66...
[ "DATE_FORMAT = 'j F Y'", "TIME_FORMAT = 'h:i:s A'", "MONTH_DAY_FORMAT = 'j F'", "SHORT_DATE_FORMAT = 'j M Y'" ]
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j בF Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j בF Y H:i:s' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j בF' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s' # FIRST_DAY_OF_WEEK = ...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.125, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0....
[ "DATE_FORMAT = 'j בF Y'", "TIME_FORMAT = 'H:i:s'", "DATETIME_FORMAT = 'j בF Y H:i:s'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'j בF'", "SHORT_DATE_FORMAT = 'd/m/Y'", "SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s'", "DECIMAL_SEPARATOR = '.'", "THOUSAND_SEPARATOR = ','" ]
DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'd.m.Y' SHORT_DATETIME_FORMAT = 'd.m.Y H:i' FIRST_DAY_OF_WEEK = 1 # Monday DATE_INPUT_FORMATS = ( '%Y-%m-%d', '%j.%m.%Y', '%j.%m.%y', # '2006-10-25', '25.10.2006', '25.10...
[ [ 14, 0, 0.0294, 0.0294, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0588, 0.0294, 0, 0.66, 0.0769, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0882, 0.0294, 0, 0...
[ "DATE_FORMAT = 'j. F Y'", "TIME_FORMAT = 'H:i'", "DATETIME_FORMAT = 'j. F Y H:i'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'j. F'", "SHORT_DATE_FORMAT = 'd.m.Y'", "SHORT_DATETIME_FORMAT = 'd.m.Y H:i'", "FIRST_DAY_OF_WEEK = 1 # Monday", "DATE_INPUT_FORMATS = (\n '%Y-%m-%d', '%j.%m.%Y', '%...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'd F Y H:i:s' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'd F' SHORT_DATE_FORMAT = 'd M Y' SHORT_DATETIME_FORMAT = 'd M Y H:i:s' FIRST_DAY_OF_WEEK = 1 # P...
[ [ 14, 0, 0.1562, 0.0312, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1875, 0.0312, 0, 0.66, 0.0769, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2188, 0.0312, 0, 0...
[ "DATE_FORMAT = 'd F Y'", "TIME_FORMAT = 'H:i:s'", "DATETIME_FORMAT = 'd F Y H:i:s'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'd F'", "SHORT_DATE_FORMAT = 'd M Y'", "SHORT_DATETIME_FORMAT = 'd M Y H:i:s'", "FIRST_DAY_OF_WEEK = 1 # Pazartesi", "DATE_INPUT_FORMATS = (\n '%d/%m/%Y', '%d/%m/%...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'j.n.Y' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS =...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.1667, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.4444, 0.0556, 0, 0...
[ "DATE_FORMAT = 'j. F Y'", "TIME_FORMAT = 'H:i:s'", "YEAR_MONTH_FORMAT = 'F Y'", "MONTH_DAY_FORMAT = 'j. F'", "SHORT_DATE_FORMAT = 'j.n.Y'", "DECIMAL_SEPARATOR = ','", "THOUSAND_SEPARATOR = '.'" ]
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'd. F Y' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'j. M. Y' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS = ...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.2, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.5, 0.0556, 0, 0.66, ...
[ "DATE_FORMAT = 'd. F Y'", "TIME_FORMAT = 'H:i:s'", "MONTH_DAY_FORMAT = 'j. F'", "SHORT_DATE_FORMAT = 'j. M. Y'", "DECIMAL_SEPARATOR = ','", "THOUSAND_SEPARATOR = '.'" ]
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'Y년 n월 j일' TIME_FORMAT = 'A g:i:s' DATETIME_FORMAT = 'Y년 n월 j일 g:i:s A' YEAR_MONTH_FORMAT = 'Y년 F월' MONTH_DAY_FORMAT = 'F월 j일' SHORT_DATE_FORMAT = 'Y-n-j.' SHORT_DATETIME_FORMAT = 'Y-n-j H:i' # FIRST_DAY_...
[ [ 14, 0, 0.1136, 0.0227, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1364, 0.0227, 0, 0.66, 0.0833, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.1591, 0.0227, 0, 0...
[ "DATE_FORMAT = 'Y년 n월 j일'", "TIME_FORMAT = 'A g:i:s'", "DATETIME_FORMAT = 'Y년 n월 j일 g:i:s A'", "YEAR_MONTH_FORMAT = 'Y년 F월'", "MONTH_DAY_FORMAT = 'F월 j일'", "SHORT_DATE_FORMAT = 'Y-n-j.'", "SHORT_DATETIME_FORMAT = 'Y-n-j H:i'", "DATE_INPUT_FORMATS = (\n '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j. N Y.' TIME_FORMAT = 'G:i' DATETIME_FORMAT = 'j. N. Y. G:i T' YEAR_MONTH_FORMAT = 'F Y.' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'Y M j' # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_I...
[ [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0, 843, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3333, 0.0556, 0, 0.66, 0.1429, 662, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.3889, 0.0556, 0, 0...
[ "DATE_FORMAT = 'j. N Y.'", "TIME_FORMAT = 'G:i'", "DATETIME_FORMAT = 'j. N. Y. G:i T'", "YEAR_MONTH_FORMAT = 'F Y.'", "MONTH_DAY_FORMAT = 'j. F'", "SHORT_DATE_FORMAT = 'Y M j'", "DECIMAL_SEPARATOR = ','", "THOUSAND_SEPARATOR = '.'" ]
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.81, ...
[ "from django.core.management import execute_manager", "try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')), # Uncomment the admin/doc line below to enable a...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.7188, 0.625, 0, 0.66, 1, 990, 3, 1, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('',\n # Example:\n # (r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')),\n\n # Uncomment the admin/doc line below to enable admin documentation:\n # (r'^admin/doc/', include('django.contrib.admindocs.urls')),\n\n # Un...
# Django settings for {{ project_name }} project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. ...
[ [ 14, 0, 0.0312, 0.0104, 0, 0.66, 0, 309, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.0417, 0.0104, 0, 0.66, 0.0556, 7, 2, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0729, 0.0312, 0, 0.6...
[ "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n # ('Your Name', 'your_email@domain.com'),\n)", "MANAGERS = ADMINS", "DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': '', ...
from django.conf.urls.defaults import * urlpatterns = patterns('django.views', (r'^(?P<content_type_id>\d+)/(?P<object_id>.*)/$', 'defaults.shortcut'), )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('django.views',\n (r'^(?P<content_type_id>\\d+)/(?P<object_id>.*)/$', 'defaults.shortcut'),\n)" ]
from django.core.urlresolvers import RegexURLPattern, RegexURLResolver from django.core.exceptions import ImproperlyConfigured __all__ = ['handler404', 'handler500', 'include', 'patterns', 'url'] handler404 = 'django.views.defaults.page_not_found' handler500 = 'django.views.defaults.server_error' def include(arg, na...
[ [ 1, 0, 0.0238, 0.0238, 0, 0.66, 0, 749, 0, 2, 0, 0, 749, 0, 0 ], [ 1, 0, 0.0476, 0.0238, 0, 0.66, 0.1429, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 14, 0, 0.0952, 0.0238, 0, ...
[ "from django.core.urlresolvers import RegexURLPattern, RegexURLResolver", "from django.core.exceptions import ImproperlyConfigured", "__all__ = ['handler404', 'handler500', 'include', 'patterns', 'url']", "handler404 = 'django.views.defaults.page_not_found'", "handler500 = 'django.views.defaults.server_erro...
from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^setlang/$', 'django.views.i18n.set_language'), )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('',\n (r'^setlang/$', 'django.views.i18n.set_language'),\n)" ]
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
[ [ 14, 0, 0.0115, 0.0019, 0, 0.66, 0, 651, 9, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0229, 0.0019, 0, 0.66, 0.0087, 309, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.0248, 0.0019, 0, 0...
[ "gettext_noop = lambda s: s", "DEBUG = False", "TEMPLATE_DEBUG = False", "DEBUG_PROPAGATE_EXCEPTIONS = False", "USE_ETAGS = False", "ADMINS = ()", "INTERNAL_IPS = ()", "TIME_ZONE = 'America/Chicago'", "LANGUAGE_CODE = 'en-us'", "LANGUAGES = (\n ('ar', gettext_noop('Arabic')),\n ('bg', gettex...
from django.db import models # Create your models here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ] ]
[ "from django.db import models" ]
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
[ [ 8, 0, 0.1522, 0.2609, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3478, 0.0435, 0, 0.66, 0.3333, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.5435, 0.2609, 0, 0.66...
[ "\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_a...
# Create your views here.
[]
[]
""" Parser and utilities for the smart 'if' tag """ import operator # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) class TokenBase(object): """ Ba...
[ [ 8, 0, 0.0097, 0.0146, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0194, 0.0049, 0, 0.66, 0.1, 616, 0, 1, 0, 0, 616, 0, 0 ], [ 3, 0, 0.1286, 0.1456, 0, 0.66, ...
[ "\"\"\"\nParser and utilities for the smart 'if' tag\n\"\"\"", "import operator", "class TokenBase(object):\n \"\"\"\n Base class for operators and literals, mainly for debugging and for throwing\n syntax errors.\n \"\"\"\n id = None # node/token type name\n value = None # used by literals\n ...
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ from django.core.exceptions import ImproperlyConfigured from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader, get_template_from_str...
[ [ 8, 0, 0.0424, 0.0678, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1017, 0.0169, 0, 0.66, 0.1667, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.1186, 0.0169, 0, 0.66...
[ "\"\"\"\nWrapper class that takes a list of template loaders as an argument and attempts\nto load templates from them in order, caching the result.\n\"\"\"", "from django.core.exceptions import ImproperlyConfigured", "from django.template import TemplateDoesNotExist", "from django.template.loader import BaseL...
# Wrapper for loading templates from eggs via pkg_resources.resource_string. try: from pkg_resources import resource_string except ImportError: resource_string = None from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader from django.conf import settings class Loader(B...
[ [ 7, 0, 0.1154, 0.1026, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.1026, 0.0256, 1, 0.34, 0, 947, 0, 1, 0, 0, 947, 0, 0 ], [ 14, 1, 0.1538, 0.0256, 1, 0.34, ...
[ "try:\n from pkg_resources import resource_string\nexcept ImportError:\n resource_string = None", " from pkg_resources import resource_string", " resource_string = None", "from django.template import TemplateDoesNotExist", "from django.template.loader import BaseLoader", "from django.conf impo...
""" Wrapper for loading templates from "templates" directories in INSTALLED_APPS packages. """ import os import sys from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils....
[ [ 1, 0, 0.0196, 0.0196, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0392, 0.0196, 0, 0.66, 0.1111, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0784, 0.0196, 0, ...
[ "import os", "import sys", "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.template import TemplateDoesNotExist", "from django.template.loader import BaseLoader", "from django.utils._os import safe_join", "from django.utils.importlib import i...
""" Wrapper for loading templates from the filesystem. """ from django.conf import settings from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils._os import safe_join class Loader(BaseLoader): is_usable = True def get_template_sources(self, template_...
[ [ 8, 0, 0.0328, 0.0492, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.082, 0.0164, 0, 0.66, 0.125, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0984, 0.0164, 0, 0.66, ...
[ "\"\"\"\nWrapper for loading templates from the filesystem.\n\"\"\"", "from django.conf import settings", "from django.template import TemplateDoesNotExist", "from django.template.loader import BaseLoader", "from django.utils._os import safe_join", "class Loader(BaseLoader):\n is_usable = True\n\n d...
from django.template import TemplateSyntaxError, TemplateDoesNotExist, Variable from django.template import Library, Node, TextNode from django.template.loader import get_template from django.conf import settings from django.utils.safestring import mark_safe register = Library() BLOCK_CONTEXT_KEY = 'block_context' c...
[ [ 1, 0, 0.0046, 0.0046, 0, 0.66, 0, 213, 0, 3, 0, 0, 213, 0, 0 ], [ 1, 0, 0.0092, 0.0046, 0, 0.66, 0.0556, 213, 0, 3, 0, 0, 213, 0, 0 ], [ 1, 0, 0.0138, 0.0046, 0, ...
[ "from django.template import TemplateSyntaxError, TemplateDoesNotExist, Variable", "from django.template import Library, Node, TextNode", "from django.template.loader import get_template", "from django.conf import settings", "from django.utils.safestring import mark_safe", "register = Library()", "BLOCK...
""" Extra HTML Widget classes """ import time import datetime import re from django.forms.widgets import Widget, Select from django.utils import datetime_safe from django.utils.dates import MONTHS from django.utils.safestring import mark_safe from django.utils.formats import get_format from django.conf import setting...
[ [ 8, 0, 0.0142, 0.0213, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0355, 0.0071, 0, 0.66, 0.0769, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0426, 0.0071, 0, 0.66...
[ "\"\"\"\nExtra HTML Widget classes\n\"\"\"", "import time", "import datetime", "import re", "from django.forms.widgets import Widget, Select", "from django.utils import datetime_safe", "from django.utils.dates import MONTHS", "from django.utils.safestring import mark_safe", "from django.utils.format...
from widgets import *
[ [ 1, 0, 1, 1, 0, 0.66, 0, 178, 0, 1, 0, 0, 178, 0, 0 ] ]
[ "from widgets import *" ]
from django.utils.html import conditional_escape from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.safestring import mark_safe # Import ValidationError so that it can be imported from this # module to maintain backwards compatibility. from django.core.exceptions import ValidationError d...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 535, 0, 1, 0, 0, 535, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.1667, 96, 0, 2, 0, 0, 96, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0.6...
[ "from django.utils.html import conditional_escape", "from django.utils.encoding import StrAndUnicode, force_unicode", "from django.utils.safestring import mark_safe", "from django.core.exceptions import ValidationError", "def flatatt(attrs):\n \"\"\"\n Convert a dictionary of attributes to a single st...
""" HTML Widget classes """ import django.utils.copycompat as copy from itertools import chain from django.conf import settings from django.utils.datastructures import MultiValueDict, MergeDict from django.utils.html import escape, conditional_escape from django.utils.translation import ugettext from django.utils.enco...
[ [ 8, 0, 0.0025, 0.0038, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0064, 0.0013, 0, 0.66, 0.025, 125, 0, 1, 0, 0, 125, 0, 0 ], [ 1, 0, 0.0076, 0.0013, 0, 0.66,...
[ "\"\"\"\nHTML Widget classes\n\"\"\"", "import django.utils.copycompat as copy", "from itertools import chain", "from django.conf import settings", "from django.utils.datastructures import MultiValueDict, MergeDict", "from django.utils.html import escape, conditional_escape", "from django.utils.translat...
""" Django validation and HTML form handling. TODO: Default value for field Field labels Nestable Forms FatalValidationError -- short-circuits all other validators on a form ValidationWarning "This form field requires foo.js" and form.js_includes() """ from django.core.exceptions import Valida...
[ [ 8, 0, 0.3529, 0.6471, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7647, 0.0588, 0, 0.66, 0.2, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.8235, 0.0588, 0, 0.66, ...
[ "\"\"\"\nDjango validation and HTML form handling.\n\nTODO:\n Default value for field\n Field labels\n Nestable Forms\n FatalValidationError -- short-circuits all other validators on a form", "from django.core.exceptions import ValidationError", "from widgets import *", "from fields import *", "...
VERSION = (1, 2, 5, 'final', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': version = '%s %...
[ [ 14, 0, 0.0625, 0.0625, 0, 0.66, 0, 557, 0, 0, 0, 0, 0, 8, 0 ], [ 2, 0, 0.5938, 0.875, 0, 0.66, 1, 75, 0, 0, 1, 0, 0, 0, 1 ], [ 14, 1, 0.25, 0.0625, 1, 0.56, 0...
[ "VERSION = (1, 2, 5, 'final', 0)", "def get_version():\n version = '%s.%s' % (VERSION[0], VERSION[1])\n if VERSION[2]:\n version = '%s.%s' % (version, VERSION[2])\n if VERSION[3:] == ('alpha', 0):\n version = '%s pre-alpha' % version\n else:\n if VERSION[3] != 'final':", " ve...
from django.dispatch import Signal class_prepared = Signal(providing_args=["class"]) pre_init = Signal(providing_args=["instance", "args", "kwargs"]) post_init = Signal(providing_args=["instance"]) pre_save = Signal(providing_args=["instance", "raw"]) post_save = Signal(providing_args=["instance", "raw", "created"])...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 14, 0, 0.1875, 0.0625, 0, 0.66, 0.1111, 564, 3, 1, 0, 0, 592, 10, 1 ], [ 14, 0, 0.3125, 0.0625, 0, ...
[ "from django.dispatch import Signal", "class_prepared = Signal(providing_args=[\"class\"])", "pre_init = Signal(providing_args=[\"instance\", \"args\", \"kwargs\"])", "post_init = Signal(providing_args=[\"instance\"])", "pre_save = Signal(providing_args=[\"instance\", \"raw\"])", "post_save = Signal(provi...
from datetime import datetime from django.utils import tree from django.utils.copycompat import deepcopy class ExpressionNode(tree.Node): """ Base class for all query expressions. """ # Arithmetic connectors ADD = '+' SUB = '-' MUL = '*' DIV = '/' MOD = '%%' # This is a quoted % o...
[ [ 1, 0, 0.0088, 0.0088, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0265, 0.0088, 0, 0.66, 0.25, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.0354, 0.0088, 0, 0....
[ "from datetime import datetime", "from django.utils import tree", "from django.utils.copycompat import deepcopy", "class ExpressionNode(tree.Node):\n \"\"\"\n Base class for all query expressions.\n \"\"\"\n # Arithmetic connectors\n ADD = '+'\n SUB = '-'\n MUL = '*'", " \"\"\"\n ...
from django.core.exceptions import FieldError from django.db import connections from django.db.backends.util import truncate_name from django.db.models.sql.constants import * from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sq...
[ [ 1, 0, 0.001, 0.001, 0, 0.66, 0, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.002, 0.001, 0, 0.66, 0.0714, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0031, 0.001, 0, 0.66, ...
[ "from django.core.exceptions import FieldError", "from django.db import connections", "from django.db.backends.util import truncate_name", "from django.db.models.sql.constants import *", "from django.db.models.sql.datastructures import EmptyResultSet", "from django.db.models.sql.expressions import SQLEval...
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.sql.constants import * from django.db.models.sql.datastructures import Date from django.db.models.sql.expressions import SQLEval...
[ [ 8, 0, 0.0094, 0.0142, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0236, 0.0047, 0, 0.66, 0.0769, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.0283, 0.0047, 0, 0.66...
[ "\"\"\"\nQuery subclasses which provide extra functionality beyond simple data retrieval.\n\"\"\"", "from django.core.exceptions import FieldError", "from django.db import connections", "from django.db.models.sql.constants import *", "from django.db.models.sql.datastructures import Date", "from django.db....
from django.core.exceptions import FieldError from django.db.models.fields import FieldDoesNotExist from django.db.models.sql.constants import LOOKUP_SEP class SQLEvaluator(object): def __init__(self, expression, query, allow_joins=True): self.expression = expression self.opts = query.get_meta() ...
[ [ 1, 0, 0.0115, 0.0115, 0, 0.66, 0, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.023, 0.0115, 0, 0.66, 0.3333, 5, 0, 1, 0, 0, 5, 0, 0 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66,...
[ "from django.core.exceptions import FieldError", "from django.db.models.fields import FieldDoesNotExist", "from django.db.models.sql.constants import LOOKUP_SEP", "class SQLEvaluator(object):\n def __init__(self, expression, query, allow_joins=True):\n self.expression = expression\n self.opts...
import re # Valid query types (a dictionary is used for speedy lookups). QUERY_TERMS = dict([(x, None) for x in ( 'exact', 'iexact', 'contains', 'icontains', 'gt', 'gte', 'lt', 'lte', 'in', 'startswith', 'istartswith', 'endswith', 'iendswith', 'range', 'year', 'month', 'day', 'week_day', 'isnull', 'search'...
[ [ 1, 0, 0.027, 0.027, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.1622, 0.1351, 0, 0.66, 0.0714, 857, 3, 1, 0, 0, 827, 10, 1 ], [ 14, 0, 0.3243, 0.027, 0, ...
[ "import re", "QUERY_TERMS = dict([(x, None) for x in (\n 'exact', 'iexact', 'contains', 'icontains', 'gt', 'gte', 'lt', 'lte', 'in',\n 'startswith', 'istartswith', 'endswith', 'iendswith', 'range', 'year',\n 'month', 'day', 'week_day', 'isnull', 'search', 'regex', 'iregex',\n )])", "GET_ITERATOR_CHU...
""" Classes to represent the default SQL aggregate functions """ class AggregateField(object): """An internal field mockup used to identify aggregates in the data-conversion parts of the database backend. """ def __init__(self, internal_type): self.internal_type = internal_type def get_int...
[ [ 8, 0, 0.0156, 0.0234, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.0703, 0.0703, 0, 0.66, 0.0909, 733, 0, 2, 0, 0, 186, 0, 0 ], [ 8, 1, 0.0547, 0.0234, 1, 0.62...
[ "\"\"\"\nClasses to represent the default SQL aggregate functions\n\"\"\"", "class AggregateField(object):\n \"\"\"An internal field mockup used to identify aggregates in the\n data-conversion parts of the database backend.\n \"\"\"\n def __init__(self, internal_type):\n self.internal_type = in...
""" Code to manage the creation and SQL rendering of 'where' constraints. """ import datetime from itertools import repeat from django.utils import tree from django.db.models.fields import Field from django.db.models.query_utils import QueryWrapper from datastructures import EmptyResultSet, FullResultSet # Connection...
[ [ 8, 0, 0.0058, 0.0087, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0116, 0.0029, 0, 0.66, 0.0714, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0145, 0.0029, 0, 0.66...
[ "\"\"\"\nCode to manage the creation and SQL rendering of 'where' constraints.\n\"\"\"", "import datetime", "from itertools import repeat", "from django.utils import tree", "from django.db.models.fields import Field", "from django.db.models.query_utils import QueryWrapper", "from datastructures import E...
from query import * from subqueries import * from where import AND, OR from datastructures import EmptyResultSet __all__ = ['Query', 'AND', 'OR', 'EmptyResultSet']
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 546, 0, 1, 0, 0, 546, 0, 0 ], [ 1, 0, 0.2857, 0.1429, 0, 0.66, 0.25, 401, 0, 1, 0, 0, 401, 0, 0 ], [ 1, 0, 0.4286, 0.1429, 0, 0....
[ "from query import *", "from subqueries import *", "from where import AND, OR", "from datastructures import EmptyResultSet", "__all__ = ['Query', 'AND', 'OR', 'EmptyResultSet']" ]
""" Useful auxilliary data structures for query construction. Not useful outside the SQL domain. """ class EmptyResultSet(Exception): pass class FullResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was att...
[ [ 8, 0, 0.0543, 0.087, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1413, 0.0435, 0, 0.66, 0.1667, 855, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.2065, 0.0435, 0, 0.66,...
[ "\"\"\"\nUseful auxilliary data structures for query construction. Not useful outside\nthe SQL domain.\n\"\"\"", "class EmptyResultSet(Exception):\n pass", "class FullResultSet(Exception):\n pass", "class MultiJoin(Exception):\n \"\"\"\n Used by join construction code to indicate the point at whic...
import datetime import os import django.utils.copycompat as copy from django.conf import settings from django.db.models.fields import Field from django.core.files.base import File, ContentFile from django.core.files.storage import default_storage from django.core.files.images import ImageFile, get_image_dimensions fr...
[ [ 1, 0, 0.0026, 0.0026, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0051, 0.0026, 0, 0.66, 0.05, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0103, 0.0026, 0, 0....
[ "import datetime", "import os", "import django.utils.copycompat as copy", "from django.conf import settings", "from django.db.models.fields import Field", "from django.core.files.base import File, ContentFile", "from django.core.files.storage import default_storage", "from django.core.files.images imp...
""" Field-like classes that aren't really fields. It's easier to use objects that have the same attributes as fields sometimes (avoids a lot of special casing). """ from django.db.models import fields class OrderWrt(fields.IntegerField): """ A proxy for the _order database field that is used when Meta.ord...
[ [ 8, 0, 0.1471, 0.2353, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3529, 0.0588, 0, 0.66, 0.5, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 3, 0, 0.7353, 0.5882, 0, 0.66, ...
[ "\"\"\"\nField-like classes that aren't really fields. It's easier to use objects that\nhave the same attributes as fields sometimes (avoids a lot of special casing).\n\"\"\"", "from django.db.models import fields", "class OrderWrt(fields.IntegerField):\n \"\"\"\n A proxy for the _order database field tha...
from django.conf import settings from django.db import connection, router, transaction from django.db.backends import util from django.db.models import signals, get_model from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist) from dja...
[ [ 1, 0, 0.0008, 0.0008, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0017, 0.0008, 0, 0.66, 0.0323, 40, 0, 3, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0025, 0.0008, 0, 0....
[ "from django.conf import settings", "from django.db import connection, router, transaction", "from django.db.backends import util", "from django.db.models import signals, get_model", "from django.db.models.fields import (AutoField, Field, IntegerField,\n PositiveIntegerField, PositiveSmallIntegerField, F...
""" Convenience routines for creating non-trivial Field subclasses, as well as backwards compatibility utilities. Add SubfieldBase as the __metaclass__ for your Field subclass, implement to_python() and the other necessary methods and everything will work seamlessly. """ from inspect import getargspec from warnings i...
[ [ 8, 0, 0.0342, 0.0598, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0769, 0.0085, 0, 0.66, 0.125, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.0855, 0.0085, 0, 0.66,...
[ "\"\"\"\nConvenience routines for creating non-trivial Field subclasses, as well as\nbackwards compatibility utilities.\n\nAdd SubfieldBase as the __metaclass__ for your Field subclass, implement\nto_python() and the other necessary methods and everything will work seamlessly.\n\"\"\"", "from inspect import getar...
"Utilities for loading models and the modules that contain them." from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule im...
[ [ 8, 0, 0.0044, 0.0044, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0132, 0.0044, 0, 0.66, 0.05, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0176, 0.0044, 0, 0.66, ...
[ "\"Utilities for loading models and the modules that contain them.\"", "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.utils.datastructures import SortedDict", "from django.utils.importlib import import_module", "from django.utils.module_loading ...
""" Classes to represent the definitions of aggregate functions. """ class Aggregate(object): """ Default Aggregate definition. """ def __init__(self, lookup, **extra): """Instantiate a new aggregate. * lookup is the field on which the aggregate operates. * extra is a diction...
[ [ 8, 0, 0.0299, 0.0448, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.3806, 0.6269, 0, 0.66, 0.125, 451, 0, 3, 0, 0, 186, 0, 4 ], [ 8, 1, 0.1045, 0.0448, 1, 0.77,...
[ "\"\"\"\nClasses to represent the definitions of aggregate functions.\n\"\"\"", "class Aggregate(object):\n \"\"\"\n Default Aggregate definition.\n \"\"\"\n def __init__(self, lookup, **extra):\n \"\"\"Instantiate a new aggregate.\n\n * lookup is the field on which the aggregate operat...
import re from bisect import bisect from django.conf import settings from django.db.models.related import RelatedObject from django.db.models.fields.related import ManyToManyRel from django.db.models.fields import AutoField, FieldDoesNotExist from django.db.models.fields.proxy import OrderWrt from django.db.models.loa...
[ [ 1, 0, 0.002, 0.002, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0041, 0.002, 0, 0.66, 0.0769, 325, 0, 1, 0, 0, 325, 0, 0 ], [ 1, 0, 0.0082, 0.002, 0, 0.66...
[ "import re", "from bisect import bisect", "from django.conf import settings", "from django.db.models.related import RelatedObject", "from django.db.models.fields.related import ManyToManyRel", "from django.db.models.fields import AutoField, FieldDoesNotExist", "from django.db.models.fields.proxy import ...
class BoundRelatedObject(object): def __init__(self, related_object, field_mapping, original): self.relation = related_object self.field_mappings = field_mapping[related_object.name] def template_name(self): raise NotImplementedError def __repr__(self): return repr(self.__d...
[ [ 3, 0, 0.11, 0.2, 0, 0.66, 0, 875, 0, 3, 0, 0, 186, 0, 1 ], [ 2, 1, 0.06, 0.06, 1, 0.93, 0, 555, 0, 4, 0, 0, 0, 0, 0 ], [ 14, 2, 0.06, 0.02, 2, 0, 0, 255, ...
[ "class BoundRelatedObject(object):\n def __init__(self, related_object, field_mapping, original):\n self.relation = related_object\n self.field_mappings = field_mapping[related_object.name]\n\n def template_name(self):\n raise NotImplementedError", " def __init__(self, related_object...
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.db import connection from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models from django.db.models.query import Q from django.db.models.expressions import F fro...
[ [ 1, 0, 0.0303, 0.0303, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0606, 0.0303, 0, 0.66, 0.0667, 160, 0, 2, 0, 0, 160, 0, 0 ], [ 1, 0, 0.0909, 0.0303, 0, ...
[ "from django.conf import settings", "from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured", "from django.db import connection", "from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models", "from django.db.models.query import Q", "from django.db.m...
from django.utils import copycompat as copy from django.conf import settings from django.db import router from django.db.models.query import QuerySet, EmptyQuerySet, insert_query, RawQuerySet from django.db.models import signals from django.db.models.fields import FieldDoesNotExist def ensure_default_manager(sender, ...
[ [ 1, 0, 0.0046, 0.0046, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.0093, 0.0046, 0, 0.66, 0.1, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0139, 0.0046, 0, 0.6...
[ "from django.utils import copycompat as copy", "from django.conf import settings", "from django.db import router", "from django.db.models.query import QuerySet, EmptyQuerySet, insert_query, RawQuerySet", "from django.db.models import signals", "from django.db.models.fields import FieldDoesNotExist", "de...
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ import weakref from django.utils.copycompat import deepcopy from django.u...
[ [ 8, 0, 0.0144, 0.0252, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0324, 0.0036, 0, 0.66, 0.0769, 708, 0, 1, 0, 0, 708, 0, 0 ], [ 1, 0, 0.036, 0.0036, 0, 0.66,...
[ "\"\"\"\nVarious data structures used in query construction.\n\nFactored out from django.db.models.query to avoid making the main module very\nlarge and/or so that they can be used by other modules without getting into\ncircular import difficulties.\n\"\"\"", "import weakref", "from django.utils.copycompat impo...
""" This module implements a transaction manager that can be used to define transaction handling in a request or view function. It is used by transaction control middleware and decorators. The transaction manager can be in managed or in auto state. Auto state means the system is using a commit-on-save strategy (actual...
[ [ 8, 0, 0.0199, 0.037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.047, 0.0114, 0, 0.66, 0.0385, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0456, 0.0028, 1, 0.93, ...
[ "\"\"\"\nThis module implements a transaction manager that can be used to define\ntransaction handling in a request or view function. It is used by transaction\ncontrol middleware and decorators.\n\nThe transaction manager can be in managed or in auto state. Auto state means the\nsystem is using a commit-on-save st...
from django.db.backends.postgresql.introspection import DatabaseIntrospection as PostgresDatabaseIntrospection class DatabaseIntrospection(PostgresDatabaseIntrospection): def get_relations(self, cursor, table_name): """ Returns a dictionary of {field_index: (field_index_other_table, other_table)} ...
[ [ 1, 0, 0.0476, 0.0476, 0, 0.66, 0, 789, 0, 1, 0, 0, 789, 0, 0 ], [ 3, 0, 0.5714, 0.9048, 0, 0.66, 1, 77, 0, 1, 0, 0, 531, 0, 2 ], [ 2, 1, 0.619, 0.8095, 1, 0.87, ...
[ "from django.db.backends.postgresql.introspection import DatabaseIntrospection as PostgresDatabaseIntrospection", "class DatabaseIntrospection(PostgresDatabaseIntrospection):\n\n def get_relations(self, cursor, table_name):\n \"\"\"\n Returns a dictionary of {field_index: (field_index_other_table...
from django.db.backends import BaseDatabaseIntrospection from MySQLdb import ProgrammingError, OperationalError from MySQLdb.constants import FIELD_TYPE import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseI...
[ [ 1, 0, 0.0102, 0.0102, 0, 0.66, 0, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 1, 0, 0.0204, 0.0102, 0, 0.66, 0.2, 838, 0, 2, 0, 0, 838, 0, 0 ], [ 1, 0, 0.0306, 0.0102, 0, 0.6...
[ "from django.db.backends import BaseDatabaseIntrospection", "from MySQLdb import ProgrammingError, OperationalError", "from MySQLdb.constants import FIELD_TYPE", "import re", "foreign_key_re = re.compile(r\"\\sCONSTRAINT `[^`]*` FOREIGN KEY \\(`([^`]*)`\\) REFERENCES `([^`]*)` \\(`([^`]*)`\\)\")", "class ...
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def resolve_columns(self, row, fields=()): values = [] index_extra_select = len(self.query.extra_select.keys()) for value, field in map(None, row[index_extra_select:], fields): if (field and field...
[ [ 1, 0, 0.037, 0.037, 0, 0.66, 0, 841, 0, 1, 0, 0, 841, 0, 0 ], [ 3, 0, 0.2778, 0.3704, 0, 0.66, 0.1667, 718, 0, 1, 0, 0, 749, 0, 7 ], [ 2, 1, 0.2963, 0.3333, 1, 0....
[ "from django.db.models.sql import compiler", "class SQLCompiler(compiler.SQLCompiler):\n def resolve_columns(self, row, fields=()):\n values = []\n index_extra_select = len(self.query.extra_select.keys())\n for value, field in map(None, row[index_extra_select:], fields):\n if (f...
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'mysql' def runshell(self): settings_dict = self.connection.settings_dict args = [self.executable_name] db = settings_dict['OPTIONS'].get('db', settings_d...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.05, 0.025, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1, 0.025, 0, 0.66, ...
[ "import os", "import sys", "from django.db.backends import BaseDatabaseClient", "class DatabaseClient(BaseDatabaseClient):\n executable_name = 'mysql'\n\n def runshell(self):\n settings_dict = self.connection.settings_dict\n args = [self.executable_name]\n db = settings_dict['OPTION...
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
[ [ 1, 0, 0.0154, 0.0154, 0, 0.66, 0, 340, 0, 1, 0, 0, 340, 0, 0 ], [ 3, 0, 0.5231, 0.9692, 0, 0.66, 1, 625, 0, 3, 0, 0, 484, 0, 21 ], [ 14, 1, 0.2923, 0.3538, 1, 0.5...
[ "from django.db.backends.creation import BaseDatabaseCreation", "class DatabaseCreation(BaseDatabaseCreation):\n # This dictionary maps Field objects to their associated MySQL column\n # types, as strings. Column-type strings can contain format strings; they'll\n # be interpolated against the values of F...
from django.db.backends import BaseDatabaseValidation class DatabaseValidation(BaseDatabaseValidation): def validate_field(self, errors, opts, f): """ There are some field length restrictions for MySQL: - Prior to version 5.0.3, character fields could not exceed 255 characters in...
[ [ 1, 0, 0.0385, 0.0385, 0, 0.66, 0, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 3, 0, 0.5577, 0.9231, 0, 0.66, 1, 249, 0, 1, 0, 0, 818, 0, 5 ], [ 2, 1, 0.5769, 0.8846, 1, 0.96,...
[ "from django.db.backends import BaseDatabaseValidation", "class DatabaseValidation(BaseDatabaseValidation):\n def validate_field(self, errors, opts, f):\n \"\"\"\n There are some field length restrictions for MySQL:\n\n - Prior to version 5.0.3, character fields could not exceed 255\n ...
from django.dispatch import Signal connection_created = Signal(providing_args=["connection"])
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, 1, 848, 3, 1, 0, 0, 592, 10, 1 ] ]
[ "from django.dispatch import Signal", "connection_created = Signal(providing_args=[\"connection\"])" ]
""" Dummy database backend for Django. Django uses this if the database ENGINE setting is empty (None or empty string). Each of these API functions, except connection.close(), raises ImproperlyConfigured. """ from django.core.exceptions import ImproperlyConfigured from django.db.backends import * from django.db.back...
[ [ 8, 0, 0.0804, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1786, 0.0179, 0, 0.66, 0.0909, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.1964, 0.0179, 0, 0.66...
[ "\"\"\"\nDummy database backend for Django.\n\nDjango uses this if the database ENGINE setting is empty (None or empty string).\n\nEach of these API functions, except connection.close(), raises\nImproperlyConfigured.\n\"\"\"", "from django.core.exceptions import ImproperlyConfigured", "from django.db.backends i...
from django.db.backends import BaseDatabaseIntrospection class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', 20: 'BigIntegerField', 21: 'SmallIntegerField', 23: 'IntegerField', 25: 'T...
[ [ 1, 0, 0.0114, 0.0114, 0, 0.66, 0, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 3, 0, 0.5114, 0.9659, 0, 0.66, 1, 77, 0, 4, 0, 0, 41, 0, 10 ], [ 14, 1, 0.1477, 0.1932, 1, 0.74,...
[ "from django.db.backends import BaseDatabaseIntrospection", "class DatabaseIntrospection(BaseDatabaseIntrospection):\n # Maps type codes to Django Field types.\n data_types_reverse = {\n 16: 'BooleanField',\n 20: 'BigIntegerField',\n 21: 'SmallIntegerField',\n 23: 'IntegerField',...
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'psql' def runshell(self): settings_dict = self.connection.settings_dict args = [self.executable_name] if settings_dict['USER']: args += ["-U"...
[ [ 1, 0, 0.0435, 0.0435, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.087, 0.0435, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1739, 0.0435, 0, 0...
[ "import os", "import sys", "from django.db.backends import BaseDatabaseClient", "class DatabaseClient(BaseDatabaseClient):\n executable_name = 'psql'\n\n def runshell(self):\n settings_dict = self.connection.settings_dict\n args = [self.executable_name]\n if settings_dict['USER']:\n...
import re from django.db.backends import BaseDatabaseOperations # This DatabaseOperations class lives in here instead of base.py because it's # used by both the 'postgresql' and 'postgresql_psycopg2' backends. class DatabaseOperations(BaseDatabaseOperations): def __init__(self, connection): super(Databas...
[ [ 1, 0, 0.0056, 0.0056, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0168, 0.0056, 0, 0.66, 0.5, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 3, 0, 0.5223, 0.9609, 0, 0.6...
[ "import re", "from django.db.backends import BaseDatabaseOperations", "class DatabaseOperations(BaseDatabaseOperations):\n def __init__(self, connection):\n super(DatabaseOperations, self).__init__()\n self._postgres_version = None\n self.connection = connection\n\n def _get_postgres_...
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated PostgreSQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__...
[ [ 1, 0, 0.0133, 0.0133, 0, 0.66, 0, 340, 0, 1, 0, 0, 340, 0, 0 ], [ 3, 0, 0.52, 0.9733, 0, 0.66, 1, 625, 0, 3, 0, 0, 484, 0, 17 ], [ 14, 1, 0.2533, 0.3067, 1, 0.98,...
[ "from django.db.backends.creation import BaseDatabaseCreation", "class DatabaseCreation(BaseDatabaseCreation):\n # This dictionary maps Field objects to their associated PostgreSQL column\n # types, as strings. Column-type strings can contain format strings; they'll\n # be interpolated against the values...
""" Extracts the version of the PostgreSQL server. """ import re # This reg-exp is intentionally fairly flexible here. # Needs to be able to handle stuff like: # PostgreSQL 8.3.6 # EnterpriseDB 8.3 # PostgreSQL 8.3 beta4 # PostgreSQL 8.4beta1 VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?') def _parse_v...
[ [ 8, 0, 0.0645, 0.0968, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1613, 0.0323, 0, 0.66, 0.25, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.4194, 0.0323, 0, 0.66,...
[ "\"\"\"\nExtracts the version of the PostgreSQL server.\n\"\"\"", "import re", "VERSION_RE = re.compile(r'\\S+ (\\d+)\\.(\\d+)\\.?(\\d+)?')", "def _parse_version(text):\n \"Internal parsing method. Factored out for testing purposes.\"\n major, major2, minor = VERSION_RE.search(text).groups()\n try:\n...
import datetime import decimal from time import time from django.utils.hashcompat import md5_constructor class CursorDebugWrapper(object): def __init__(self, cursor, db): self.cursor = cursor self.db = db # Instance of a BaseDatabaseWrapper subclass def execute(self, sql, params=()): ...
[ [ 1, 0, 0.0078, 0.0078, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0156, 0.0078, 0, 0.66, 0.0769, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.0234, 0.0078, 0, ...
[ "import datetime", "import decimal", "from time import time", "from django.utils.hashcompat import md5_constructor", "class CursorDebugWrapper(object):\n def __init__(self, cursor, db):\n self.cursor = cursor\n self.db = db # Instance of a BaseDatabaseWrapper subclass\n\n def execute(sel...
import re from django.db.backends import BaseDatabaseIntrospection # This light wrapper "fakes" a dictionary interface, because some SQLite data # types include variables in them -- e.g. "varchar(30)" -- and can't be matched # as a simple dictionary lookup. class FlexibleFieldLookupDict: # Maps SQL types to Django...
[ [ 1, 0, 0.0071, 0.0071, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0142, 0.0071, 0, 0.66, 0.3333, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 3, 0, 0.1631, 0.234, 0, 0...
[ "import re", "from django.db.backends import BaseDatabaseIntrospection", "class FlexibleFieldLookupDict:\n # Maps SQL types to Django Field types. Some of the SQL types have multiple\n # entries here because SQLite allows for anything and doesn't normalize the\n # field type; it uses whatever was given...
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'sqlite3' def runshell(self): args = [self.executable_name, self.connection.settings_dict['NAME']] if os.name == 'nt': sys.exit(os.sys...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.25, 0.0625, 0, 0.6...
[ "import os", "import sys", "from django.db.backends import BaseDatabaseClient", "class DatabaseClient(BaseDatabaseClient):\n executable_name = 'sqlite3'\n\n def runshell(self):\n args = [self.executable_name,\n self.connection.settings_dict['NAME']]\n if os.name == 'nt':\n ...
import decimal from threading import local from django.db import DEFAULT_DB_ALIAS from django.db.backends import util from django.utils import datetime_safe from django.utils.importlib import import_module class BaseDatabaseWrapper(local): """ Represents a database connection. """ ops = None def ...
[ [ 1, 0, 0.0017, 0.0017, 0, 0.66, 0, 349, 0, 1, 0, 0, 349, 0, 0 ], [ 1, 0, 0.0034, 0.0017, 0, 0.66, 0.0909, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0068, 0.0017, 0, 0....
[ "import decimal", "from threading import local", "from django.db import DEFAULT_DB_ALIAS", "from django.db.backends import util", "from django.utils import datetime_safe", "from django.utils.importlib import import_module", "class BaseDatabaseWrapper(local):\n \"\"\"\n Represents a database connec...
from django.db.backends import BaseDatabaseIntrospection import cx_Oracle import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type objects to Django Field types. data_types_re...
[ [ 1, 0, 0.0083, 0.0083, 0, 0.66, 0, 981, 0, 1, 0, 0, 981, 0, 0 ], [ 1, 0, 0.0165, 0.0083, 0, 0.66, 0.25, 554, 0, 1, 0, 0, 554, 0, 0 ], [ 1, 0, 0.0248, 0.0083, 0, 0....
[ "from django.db.backends import BaseDatabaseIntrospection", "import cx_Oracle", "import re", "foreign_key_re = re.compile(r\"\\sCONSTRAINT `[^`]*` FOREIGN KEY \\(`([^`]*)`\\) REFERENCES `([^`]*)` \\(`([^`]*)`\\)\")", "class DatabaseIntrospection(BaseDatabaseIntrospection):\n # Maps type objects to Django...
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def resolve_columns(self, row, fields=()): # If this query has limit/offset information, then we expect the # first column to be an extra "_RN" column that we need to throw # away. if self.query.high...
[ [ 1, 0, 0.0152, 0.0152, 0, 0.66, 0, 841, 0, 1, 0, 0, 841, 0, 0 ], [ 3, 0, 0.4091, 0.7121, 0, 0.66, 0.1667, 718, 0, 2, 0, 0, 749, 0, 11 ], [ 2, 1, 0.1742, 0.2121, 1, ...
[ "from django.db.models.sql import compiler", "class SQLCompiler(compiler.SQLCompiler):\n def resolve_columns(self, row, fields=()):\n # If this query has limit/offset information, then we expect the\n # first column to be an extra \"_RN\" column that we need to throw\n # away.\n if ...
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'sqlplus' def runshell(self): conn_string = self.connection._connect_string() args = [self.executable_name, "-L", conn_string] if os.name == 'nt': ...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.25, 0.0625, 0, 0.6...
[ "import os", "import sys", "from django.db.backends import BaseDatabaseClient", "class DatabaseClient(BaseDatabaseClient):\n executable_name = 'sqlplus'\n\n def runshell(self):\n conn_string = self.connection._connect_string()\n args = [self.executable_name, \"-L\", conn_string]\n i...
from django.conf import settings from django.core import signals from django.core.exceptions import ImproperlyConfigured from django.db.utils import ConnectionHandler, ConnectionRouter, load_backend, DEFAULT_DB_ALIAS, \ DatabaseError, IntegrityError from django.utils.functional import curry ...
[ [ 1, 0, 0.0097, 0.0097, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0194, 0.0097, 0, 0.66, 0.0556, 913, 0, 1, 0, 0, 913, 0, 0 ], [ 1, 0, 0.0291, 0.0097, 0, ...
[ "from django.conf import settings", "from django.core import signals", "from django.core.exceptions import ImproperlyConfigured", "from django.db.utils import ConnectionHandler, ConnectionRouter, load_backend, DEFAULT_DB_ALIAS, \\\n DatabaseError, IntegrityError", "from django.uti...
import re import unittest from urlparse import urlsplit, urlunsplit from xml.dom.minidom import parseString, Node from django.conf import settings from django.core import mail from django.core.management import call_command from django.core.urlresolvers import clear_url_caches from django.db import transaction, connec...
[ [ 1, 0, 0.0018, 0.0018, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0036, 0.0018, 0, 0.66, 0.0303, 88, 0, 1, 0, 0, 88, 0, 0 ], [ 1, 0, 0.0054, 0.0018, 0, 0....
[ "import re", "import unittest", "from urlparse import urlsplit, urlunsplit", "from xml.dom.minidom import parseString, Node", "from django.conf import settings", "from django.core import mail", "from django.core.management import call_command", "from django.core.urlresolvers import clear_url_caches", ...
from django.dispatch import Signal template_rendered = Signal(providing_args=["template", "context"])
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 548, 0, 1, 0, 0, 548, 0, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, 1, 139, 3, 1, 0, 0, 592, 10, 1 ] ]
[ "from django.dispatch import Signal", "template_rendered = Signal(providing_args=[\"template\", \"context\"])" ]
import sys import time import os import warnings from django.conf import settings from django.core import mail from django.core.mail.backends import locmem from django.test import signals from django.template import Template from django.utils.translation import deactivate class Approximate(object): def __init__(s...
[ [ 1, 0, 0.0081, 0.0081, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0161, 0.0081, 0, 0.66, 0.0588, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0242, 0.0081, 0, ...
[ "import sys", "import time", "import os", "import warnings", "from django.conf import settings", "from django.core import mail", "from django.core.mail.backends import locmem", "from django.test import signals", "from django.template import Template", "from django.utils.translation import deactiva...
""" Django Unit Test and Doctest framework. """ from django.test.client import Client from django.test.testcases import TestCase, TransactionTestCase from django.test.utils import Approximate
[ [ 8, 0, 0.2857, 0.4286, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7143, 0.1429, 0, 0.66, 0.3333, 479, 0, 1, 0, 0, 479, 0, 0 ], [ 1, 0, 0.8571, 0.1429, 0, 0.66...
[ "\"\"\"\nDjango Unit Test and Doctest framework.\n\"\"\"", "from django.test.client import Client", "from django.test.testcases import TestCase, TransactionTestCase", "from django.test.utils import Approximate" ]
import sys, os from setuptools import setup, find_packages import argparse long_description = open('README.txt').read() setup_args = dict( name="argparse", version=argparse.__version__, description='Python command-line parsing library', long_description=long_description, author="Steven Bethard"...
[ [ 1, 0, 0.0222, 0.0222, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0.2, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.1111, 0.0222, 0, 0.6...
[ "import sys, os", "from setuptools import setup, find_packages", "import argparse", "long_description = open('README.txt').read()", "setup_args = dict(\n name=\"argparse\",\n version=argparse.__version__,\n description='Python command-line parsing library',\n long_description=long_description,\n...
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
[ [ 8, 0, 0.0138, 0.0254, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0271, 0.0004, 0, 0.66, 0.0222, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0311, 0.0076, 0, 0.66...
[ "\"\"\"Command-line parsing library\n\nThis module is an optparse-inspired command-line parsing library that:\n\n - handles both optional and positional arguments\n - produces highly informative usage messages\n - supports parsers that dispatch to sub-parsers", "__version__ = '1.2.1'", "__all__ = [\n ...
from collections import MutableMapping from webob.compat import ( iteritems_, string_types, ) from webob.multidict import MultiDict __all__ = ['ResponseHeaders', 'EnvironHeaders'] class ResponseHeaders(MultiDict): """ Dictionary view on the response headerlist. Keys are normalized for ...
[ [ 1, 0, 0.0063, 0.0063, 0, 0.66, 0, 193, 0, 1, 0, 0, 193, 0, 0 ], [ 1, 0, 0.0222, 0.0253, 0, 0.66, 0.1111, 218, 0, 2, 0, 0, 218, 0, 0 ], [ 1, 0, 0.038, 0.0063, 0, 0...
[ "from collections import MutableMapping", "from webob.compat import (\n iteritems_,\n string_types,\n )", "from webob.multidict import MultiDict", "__all__ = ['ResponseHeaders', 'EnvironHeaders']", "class ResponseHeaders(MultiDict):\n \"\"\"\n Dictionary view on the response headerlist.\n...
# code stolen from "six" import sys import types # True if we are running on Python 3. PY3 = sys.version_info[0] == 3 if PY3: # pragma: no cover string_types = str, integer_types = int, class_types = type, text_type = str long = int else: string_types = basestring, integer_types = (int, l...
[ [ 1, 0, 0.0229, 0.0076, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0305, 0.0076, 0, 0.66, 0.0833, 209, 0, 1, 0, 0, 209, 0, 0 ], [ 14, 0, 0.0534, 0.0076, 0, ...
[ "import sys", "import types", "PY3 = sys.version_info[0] == 3", "if PY3: # pragma: no cover\n string_types = str,\n integer_types = int,\n class_types = type,\n text_type = str\n long = int\nelse:\n string_types = basestring,", " string_types = str,", " integer_types = int,", " ...
import collections from datetime import ( date, datetime, timedelta, ) import re import string import time from webob.compat import ( PY3, text_type, bytes_, text_, native_, string_types, ) __all__ = ['Cookie'] _marker = object() class RequestCookies(collections.MutableM...
[ [ 1, 0, 0.0027, 0.0027, 0, 0.66, 0, 193, 0, 1, 0, 0, 193, 0, 0 ], [ 1, 0, 0.0135, 0.0135, 0, 0.66, 0.0189, 426, 0, 3, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0216, 0.0027, 0, ...
[ "import collections", "from datetime import (\n date,\n datetime,\n timedelta,\n )", "import re", "import string", "import time", "from webob.compat import (\n PY3,\n text_type,\n bytes_,\n text_,\n native_,\n string_types,\n )", "__all__ = ['Cookie']", "_marker = obje...
""" Decorators to wrap functions to make them WSGI applications. The main decorator :class:`wsgify` turns a function into a WSGI application (while also allowing normal calling of the method with an instantiated request). """ from webob.compat import ( bytes_, text_type, ) from webob.request import Reque...
[ [ 8, 0, 0.0134, 0.0234, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0351, 0.0134, 0, 0.66, 0.1429, 218, 0, 2, 0, 0, 218, 0, 0 ], [ 1, 0, 0.0468, 0.0033, 0, 0.66...
[ "\"\"\"\nDecorators to wrap functions to make them WSGI applications.\n\nThe main decorator :class:`wsgify` turns a function into a WSGI\napplication (while also allowing normal calling of the method with an\ninstantiated request).\n\"\"\"", "from webob.compat import (\n bytes_,\n text_type,\n )", "fro...
import errno import sys import re try: import httplib except ImportError: # pragma: no cover import http.client as httplib from webob.compat import url_quote import socket from webob import exc from webob.compat import PY3 __all__ = ['send_request_app', 'SendRequest'] class SendRequest: """ Sends the...
[ [ 1, 0, 0.0055, 0.0055, 0, 0.66, 0, 546, 0, 1, 0, 0, 546, 0, 0 ], [ 1, 0, 0.011, 0.0055, 0, 0.66, 0.0833, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0165, 0.0055, 0, 0...
[ "import errno", "import sys", "import re", "try:\n import httplib\nexcept ImportError: # pragma: no cover\n import http.client as httplib", " import httplib", " import http.client as httplib", "from webob.compat import url_quote", "import socket", "from webob import exc", "from webob.c...
# (c) 2005 Ian Bicking and contributors; written for Paste # (http://pythonpaste.org) Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ Gives a multi-value dictionary object (MultiDict) plus several wrappers """ from collections import MutableMapping import binascii import warnin...
[ [ 8, 0, 0.0098, 0.0059, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0138, 0.002, 0, 0.66, 0.0909, 193, 0, 1, 0, 0, 193, 0, 0 ], [ 1, 0, 0.0177, 0.002, 0, 0.66, ...
[ "\"\"\"\nGives a multi-value dictionary object (MultiDict) plus several wrappers\n\"\"\"", "from collections import MutableMapping", "import binascii", "import warnings", "from webob.compat import (\n PY3,\n iteritems_,\n itervalues_,\n url_encode,\n )", "__all__ = ['MultiDict', 'NestedMult...
import mimetypes import os from webob import exc from webob.dec import wsgify from webob.response import Response __all__ = [ 'FileApp', 'DirectoryApp', ] mimetypes._winreg = None # do not load mimetypes from windows registry mimetypes.add_type('text/javascript', '.js') # stdlib default is application/x-javascri...
[ [ 1, 0, 0.006, 0.006, 0, 0.66, 0, 583, 0, 1, 0, 0, 583, 0, 0 ], [ 1, 0, 0.0119, 0.006, 0, 0.66, 0.0833, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0238, 0.006, 0, 0.66...
[ "import mimetypes", "import os", "from webob import exc", "from webob.dec import wsgify", "from webob.response import Response", "__all__ = [\n 'FileApp', 'DirectoryApp',\n]", "mimetypes._winreg = None # do not load mimetypes from windows registry", "mimetypes.add_type('text/javascript', '.js') # s...
import binascii import cgi import io import os import re import sys import tempfile import mimetypes try: import simplejson as json except ImportError: import json import warnings from webob.acceptparse import ( AcceptLanguage, AcceptCharset, MIMEAccept, MIMENilAccept, NoAccept, accept_...
[ [ 1, 0, 0.0006, 0.0006, 0, 0.66, 0, 984, 0, 1, 0, 0, 984, 0, 0 ], [ 1, 0, 0.0012, 0.0006, 0, 0.66, 0.0238, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0017, 0.0006, 0, ...
[ "import binascii", "import cgi", "import io", "import os", "import re", "import sys", "import tempfile", "import mimetypes", "try:\n import simplejson as json\nexcept ImportError:\n import json", " import simplejson as json", " import json", "import warnings", "from webob.acceptp...
from base64 import b64encode from datetime import ( datetime, timedelta, ) from hashlib import md5 import re import struct import zlib try: import simplejson as json except ImportError: import json from webob.byterange import ContentRange from webob.cachecontrol import ( CacheControl, seri...
[ [ 1, 0, 0.0008, 0.0008, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.0027, 0.0031, 0, 0.66, 0.0345, 426, 0, 2, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0046, 0.0008, 0, ...
[ "from base64 import b64encode", "from datetime import (\n datetime,\n timedelta,\n )", "from hashlib import md5", "import re", "import struct", "import zlib", "try:\n import simplejson as json\nexcept ImportError:\n import json", " import simplejson as json", " import json", "...
""" Represents the Cache-Control header """ import re class UpdateDict(dict): """ Dict that has a callback on all updates """ # these are declared as class attributes so that # we don't need to override constructor just to # set some defaults updated = None updated_args = None def ...
[ [ 8, 0, 0.0087, 0.0131, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0175, 0.0044, 0, 0.66, 0.125, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 3, 0, 0.1376, 0.2271, 0, 0.66,...
[ "\"\"\"\nRepresents the Cache-Control header\n\"\"\"", "import re", "class UpdateDict(dict):\n \"\"\"\n Dict that has a callback on all updates\n \"\"\"\n # these are declared as class attributes so that\n # we don't need to override constructor just to\n # set some defaults\n updated = Non...
import warnings from webob.compat import ( escape, string_types, text_, text_type, ) from webob.headers import _trans_key def html_escape(s): """HTML-escape a string or object This converts any non-string objects passed into it to strings (actually, using ``unicode()``). All values ...
[ [ 1, 0, 0.0076, 0.0076, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0417, 0.0455, 0, 0.66, 0.1429, 218, 0, 4, 0, 0, 218, 0, 0 ], [ 1, 0, 0.0758, 0.0076, 0, ...
[ "import warnings", "from webob.compat import (\n escape,\n string_types,\n text_,\n text_type,\n )", "from webob.headers import _trans_key", "def html_escape(s):\n \"\"\"HTML-escape a string or object\n\n This converts any non-string objects passed into it to strings\n (actually, using...
from datetime import ( date, datetime, ) import re from webob.byterange import ( ContentRange, Range, ) from webob.compat import ( PY3, text_type, ) from webob.datetime_utils import ( parse_date, serialize_date, ) from webob.util import ( header_docstring, wa...
[ [ 1, 0, 0.0074, 0.0118, 0, 0.66, 0, 426, 0, 2, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0177, 0.0029, 0, 0.66, 0.0278, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.028, 0.0118, 0, 0...
[ "from datetime import (\n date,\n datetime,\n )", "import re", "from webob.byterange import (\n ContentRange,\n Range,\n )", "from webob.compat import (\n PY3,\n text_type,\n )", "from webob.datetime_utils import (\n parse_date,\n serialize_date,\n )", "from webob.util ...
""" Parses a variety of ``Accept-*`` headers. These headers generally take the form of:: value1; q=0.5, value2; q=0 Where the ``q`` parameter is optional. In theory other parameters exists, but this ignores them. """ import re from webob.headers import _trans_name as header_to_key from webob.util import ( ...
[ [ 8, 0, 0.0162, 0.0295, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0354, 0.0029, 0, 0.66, 0.0714, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0413, 0.0029, 0, 0.66...
[ "\"\"\"\nParses a variety of ``Accept-*`` headers.\n\nThese headers generally take the form of::\n\n value1; q=0.5, value2; q=0\n\nWhere the ``q`` parameter is optional. In theory other parameters", "import re", "from webob.headers import _trans_name as header_to_key", "from webob.util import (\n heade...
import calendar from datetime import ( date, datetime, timedelta, tzinfo, ) from email.utils import ( formatdate, mktime_tz, parsedate_tz, ) import time from webob.compat import ( integer_types, long, native_, text_type, ) __all__ = [ 'UTC', 'timedelta_to...
[ [ 1, 0, 0.0085, 0.0085, 0, 0.66, 0, 917, 0, 1, 0, 0, 917, 0, 0 ], [ 1, 0, 0.047, 0.0513, 0, 0.66, 0.05, 426, 0, 4, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1026, 0.0427, 0, 0.6...
[ "import calendar", "from datetime import (\n date,\n datetime,\n timedelta,\n tzinfo,\n )", "from email.utils import (\n formatdate,\n mktime_tz,\n parsedate_tz,\n )", "import time", "from webob.compat import (\n integer_types,\n long,\n native_,\n text_type,\n )", ...
""" Does parsing of ETag-related headers: If-None-Matches, If-Matches Also If-Range parsing """ from webob.datetime_utils import ( parse_date, serialize_date, ) from webob.descriptors import _rx_etag from webob.util import ( header_docstring, warn_deprecation, ) __all__ = ['AnyETag', 'NoETag...
[ [ 8, 0, 0.0159, 0.0265, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.045, 0.0212, 0, 0.66, 0.0714, 676, 0, 2, 0, 0, 676, 0, 0 ], [ 1, 0, 0.0582, 0.0053, 0, 0.66,...
[ "\"\"\"\nDoes parsing of ETag-related headers: If-None-Matches, If-Matches\n\nAlso If-Range parsing\n\"\"\"", "from webob.datetime_utils import (\n parse_date,\n serialize_date,\n )", "from webob.descriptors import _rx_etag", "from webob.util import (\n header_docstring,\n warn_deprecation,\n ...
from webob.datetime_utils import * from webob.request import * from webob.response import * from webob.util import html_escape __all__ = [ 'Request', 'LegacyRequest', 'Response', 'UTC', 'day', 'week', 'hour', 'minute', 'second', 'month', 'year', 'html_escape' ] BaseRequest.ResponseClass = Response __version_...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 676, 0, 1, 0, 0, 676, 0, 0 ], [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0.1667, 900, 0, 1, 0, 0, 900, 0, 0 ], [ 1, 0, 0.2308, 0.0769, 0, ...
[ "from webob.datetime_utils import *", "from webob.request import *", "from webob.response import *", "from webob.util import html_escape", "__all__ = [\n 'Request', 'LegacyRequest', 'Response', 'UTC', 'day', 'week', 'hour',\n 'minute', 'second', 'month', 'year', 'html_escape'\n]", "BaseRequest.Respo...