Dataset Preview Go to dataset viewer
title (string)text (string)
return [ globalpath ] + list ( settings . LOCALE PATHS )
for the call to the function upath , get the directory name of the resulting system path , join the result and string 'locale ' , into a valid file path , substitute it for globalpath . append settings.LOCALE_PATHS converted into a list to a list containing an element globalpath , return it .
return False
return boolean False .
self . cache [ key ] = pickled
substitute pickled for value under the key key of self._cache dictionary .
return is in stance ( other , self . class ) and ( self . limit value == other . limit value ) and ( self . message == other . message ) and ( self . code == other . code )
if other is an instance of self.__class__ and , self.limit_value equals to other.limit_value , and self.message equals to other.message ,
all = [ STR_ ]
__all__ is an list containing string 'SelectDateWidget ' .
else :
if not ,
def init ( self , subject ) :
define the function next_space_index with 2 arguments : self and subject .
def get ( self , key , default = None , version = None ) :
define the method get with 4 arguments , self class instance , key , default set to None and version set to None .
if self . can delete and self . should delete form ( form ) :
if self.can_delete is true and call to the function self._should_delete_form with an argument form evaluates to true ,
from . html parser import HTMLParser , HTMLParseError
from .html_parser import HTMLParser and HTMLParseError into default name space .
else :
if not ,
def base set ( self , mode , key , value , timeout = DEFAULT TIMEOUT ) :
define the protected method _base_set with 4 arguments , self class instance , key , value and timeout set to DEFAULT_TIMEOUT .
return False
return boolean False .
if retval :
if retval is true ,
import os
import module os .
class InvalidPage ( Exception ) :
derive the class InvalidPage from the Exception base class .
from django . core . mail . utils import CachedDnsName , DNS NAME
from django.core.mail.utils import CachedDnsName and DNS_NAME into default name space .
else :
if it does append it to targets list . if not ,
from django . core . exceptions import ImproperlyConfigured , DjangoRuntimeWarning
from django.core.exceptions import ImproperlyConfigured and DjangoRuntimeWarning into default name space .
if p >= NUM_ :
if p is greater or equal to integer 0 ,
value = datetime safe . new date ( value )
call the method datetime_safe.new_date with an argument value , substitute the result for value .
has bz2 = True
has_bz2 is boolean True .
memo = { }
memo is an empty dictionary .
block context . push ( self . name , push )
call the method block_context.push with 2 arguments : self.name and push .
yield d
yield d .
abspathu = abspath
substitute abspath for abspathu .
raise ValueError ( " STR_ " " STR_ " % klass . name )
raise the exception ValueError , with string as argument , `` @ python_2_unicode_compatible can not be applied '' ,
return self . cast ( ) == other
call the method self.__cast , if the result equals other , return boolean True , otherwise return boolean False .
result = super ( DateTimeField , self ) . to python ( value )
call the method to_python with an argument value from the base class of the DateTimeField class , substitute the result for result .
def all locale paths ( ) :
define the function all_locale_paths .
return metaclass ( cls . name , cls . bases , or ig vars )
return an instance of metaclass class , created with 3 arguments : cls.__name__ , cls.__bases__ and orig_vars .
yield parse boundary stream ( sub stream , NUM_ )
call the function parse_boundary_stream with 2 arguments : sub_stream and integer 1024 , yield the result as the return value of the generator .
pass
do nothing .
context . render context . push ( )
call the method context.render_context.push .
pass
do nothing .
if default is None :
if _default is None ,
elif t . token type == TOKEN VAR :
otherwise if t.token_type equals TOKEN_VAR ,
def get supported language variant ( lang code , strict = False ) :
define the function get_supported_language_variant with 2 arguments : lang_code and strict set to boolean False .
def resolve context ( self , context ) :
define the method resolve_context with 2 arguments : self and context .
want unicode = True
want_unicode is boolean True .
doy = self . year days [ self . data . month ] + self . data . day
append self.data.day to the value under the self.data.month key of the self.year_days dictionary , substitute the result for doy .
if locales :
if locales is true ,
continue
skip this loop iteration .
if STR_ in cc :
for every el in split string cc_delim_re , with delimiter being the value of dictionary response under the key 'Cache-Control ' . if cc contains item 'max-age ' ,
guessed filename += ext
append ext to guessed_filename .
self . add local translations ( )
call the method self._add_local_translations .
in t part gd =
int_part_gd is an empty string .
if self . verbosity > NUM_ :
if self.verbosity is greater than integer 0 ,
if not var or in var :
if var is false or whitespaces are contained in var ,
try :
try ,
if cache choices is not None :
if cache_choices is not None ,
if is relation :
if is_relation ,
try :
try ,
sys . stderr = open ( err log , STR_ , buffering )
open err_log file in append mode with buffering size of the input buffer , substitute the result for sys.stderr .
class Choice ( list ) :
' ' for 's ' , ' x ' for 'S ' , ' x ' for ' W ' , ' ! ' for ' W ' and None for ' Z ' . derive the class Choice from list base class .
@ register . tag
register.tag decorator ,
choice input class = None
choice_input_class is None .
field notes = [ ]
field_notes is an empty list .
t = s . split ( = , NUM_ )
split string s once , with '= ' as delimiter , substitute the result for t .
elif template tuple is None :
otherwise if template_tuple is None ,
try :
try ,
return in t ( str ( value ) [ - arg ] )
convert value into a string , take character at the negative arg index , convert it into an integer , return it .
if default is not RAISE ERROR :
if default is true and RAISE_ERROR is false ,
if answer ! = " STR_ " :
if answer equals a string ' y ' ,
else :
where ' % s ' are replaced with name and param . if not ,
result = super ( ChoiceField , self ) . deepcopy ( memo )
call the method __deepcopy__ from the base class of the class ChoiceField , with an argument memo , substitute the result for result .
httpd = httpd cls ( server address , WSGIRequestHandler , ipv6 = ipv6 )
call the httpd_cls function with 4 arguments : server_address , WSGIRequestHandler and ipv6 set to ipv6 , substitute the result for httpd .
result = self . configurator . convert ( value )
call the method self.configurator.convert with an argument value , substitute the result for result .
for ch , escaped in in put iter :
for every ch and escaped in input_iter ,
if in valid apps :
if invalid_apps in not empty ,
pass
do nothing .
else :
if not ,
func code = " STR_ "
_func_code is a string `` __code__ '' .
data = method ( self , * args , ** kwargs )
call the function method with 3 arguments : self , unpacked list args and unpacked dictionary kwargs , substitute the result for data .
if var . endswith ( STR_ ) :
if var ends with ' . ' ,
def add local translations ( self ) :
define the method _add_local_translations with an argument self .
finally :
finally perform ,
elif not base url . endswith ( / ) :
otherwise if base_url does not ends with '/ ' character ,
code list . append ( foreground [ v ] )
append value under the key v of foreground dictionary to code_list .
def ipython pre 100 ( self ) :
define the method _ipython_pre_100 with an argument self .
def newobj ( cls , * args ) :
define the method __newobj__ with 2 arguments cls and unpacked list args .
obj dict [ STR_ ] = dict ( ( k , self . getlist ( k ) ) for k in self )
value under '_data ' key of obj_dict is a dictionary created with tuples containing 2 elements : k and result of the function ,
@ property
property decorator ,
self . reason phrase = reason
substitute reason for self.reason_phrase .
for obj in queryset . iterator ( ) :
for every obj in result of the method queryset.iterator ,
pad = b = * ( - len ( s ) % NUM_ )
calculate negative length of s , by modulus integer 4 , use the result as the number of '= ' characters to be stored in pad .
def deepcopy ( self , memo ) :
define the method __deepcopy__ with 2 arguments : self and memo .
class Input ( Widget ) :
derive the class Input from the Widget base class .
def receive data chunk ( self , raw data , start ) :
self.charset and self.content_type_extra . define the method receive_data_chunk with arguments : self , raw_data and start .
except ( LookupError , TypeError ) :
if LookupError or TypeError exceptions are caught ,
content length = NUM_
content_length is integer 0 .
from future import unicode literals
from __future__ import unicode_literals into default name space .
@ property
property decorator .
known models = [ ]
known_models is an empty list .
except KeyError :
if KeyError exception is caught ,
class FileField ( Field ) :
derive the class FileField from the base class Field class .
def has previous ( self ) :
define the method has_previous with an argument self .
arg vals . append ( mark safe ( arg ) )
call the function mark_safe with an argument arg , append it to arg_vals .
key = self . make key ( key , version = version )
call the method self.make_key with key and version set to version as arguments , substitute the result for key .
self . stdout . write ( " STR_ " % plural form line )
replace ' % s ' in string `` copying plural forms : % s\n '' with plural_form_line , write it to self.stdout .
End of preview (truncated to 100 rows)

No dataset card yet

Contribute a Dataset Card