Unnamed: 0
int64
0
10k
nl
stringlengths
3
2.42k
code
stringlengths
4
3.76k
5,600
template_with_initial is a string '%(initial_text)s: %(initial)s %(clear_template)s<br />%(input_text)s: %(input)s'.
template_with_initial = '%(initial_text)s: %(initial)s %(clear_template)s<br />%(input_text)s: %(input)s'
5,601
define the method discard with 2 arguments: self and item.
def discard ( self , item ) :
5,602
if value is None,
if value is None :
5,603
for every program in programs,
for program in programs :
5,604
call the method self.tag_function with an argument name, return the result.
return self . tag_function ( name )
5,605
if self.verbosity is greater than integer 0,
if self . verbosity > 0 :
5,606
substitute initial for initial_value, if initial is not None, if not, initial_value is an empty string.
initial_value = initial if initial is not None else ''
5,607
call the function smart_text with an argument auto_id, format the result with self.html_name, return it.
return smart_text ( auto_id ) % self . html_name
5,608
from django.conf import settings into default name space.
from django . conf import settings
5,609
call the function iri_to_uri with an argument url, substitute the result for self.url.
self . url = iri_to_uri ( url )
5,610
default_error_messages is an dictionary with an entry: return value of the function _ called with an argument string,
default_error_messages = { 'invalid_choice' : _ ( 'Select a valid choice. %(value)s is not one of the available choices.' ) , }
5,611
call the method self.handle_merge with 2 arguments: loader and conflicts, return the result.
return self . handle_merge ( loader , conflicts )
5,612
substitute greater element between integer 0 and end decremented by one for last.
last = max ( 0 , end - 1 )
5,613
get the value under the 'database' key of the options dictionary,
connection = connections [ options . get ( 'database' ) ]
5,614
call the method self.resolve with an argument value, return the result.
return self . resolve ( value )
5,615
substitute m2m_data for self.m2m_data.
self . m2m_data = m2m_data
5,616
get the value under the 'use_default_ignore_patterns' key of the options dictionary, if it is true,
if options . get ( 'use_default_ignore_patterns' ) :
5,617
append list containing string '--no-wrap' to self.msguniq_options.
self . msguniq_options = self . msguniq_options [ : ] + [ '--no-wrap' ]
5,618
if data is true,
if data :
5,619
call the function get_connection with 2 arguments: backend set to self.email_backend and fail_silently set to boolean True.
return get_connection ( backend = self . email_backend , fail_silently = True )
5,620
return an empty string.
return ''
5,621
call the self.style.HTTP_BAD_REQUEST with an argument msg, substitute it for msg.
msg = self . style . HTTP_BAD_REQUEST ( msg )
5,622
append ext to guessed_filename.
guessed_filename += ext
5,623
if UnicodeError, renamed to e, exception is caught,
except UnicodeError as e :
5,624
write the chunk to the file _file.
_file . write ( chunk )
5,625
call the method Module_six_moves_urllib_request with an argument: string ".moves.urllib_parse" appended to __name__,
sys . modules [ __name__ + ".moves.urllib_parse" ] = sys . modules [ __name__ + ".moves.urllib.parse" ] = Module_six_moves_urllib_parse ( __name__ + ".moves.urllib_parse" )
5,626
define the method __init__ with 15 elements: self, title, link, description, language set to None, author_email set to None,
def __init__ ( self , title , link , description , language = None , author_email = None , author_name = None , author_link = None , subtitle = None , categories = None , feed_url = None , feed_copyright = None , feed_guid = None , ttl = None , ** kwargs ) :
5,627
substitute self.external_entity_ref_handler for parser.ExternalEntityRefHandler.
parser . ExternalEntityRefHandler = self . external_entity_ref_handler
5,628
otherwise cmp_fmts is a list containing cmp_fmt. call the method serializers.get_public_serializer_formats, substitute the result for ser_fmts if ser_fmt is None,
ser_fmts = serializers . get_public_serializer_formats ( ) if ser_fmt is None else [ ser_fmt ]
5,629
try,
try :
5,630
raise an CommandError with an argument string "AppCommand cannot handle app '%s' in legacy mode because it doesn't have a models module.", where '%s' is replaced by app_config.label.
raise CommandError ( "AppCommand cannot handle app '%s' in legacy mode " "because it doesn't have a models module." % app_config . label )
5,631
substitute CheckboxInput for widget.
widget = CheckboxInput
5,632
if TypeError or ValueError exceptions are caught,
except ( ValueError , TypeError ) :
5,633
if self.waiting_writers is not equal to integer 0,
if self . waiting_writers != 0 :
5,634
split str_number by '.', substitute the result for int_part and dec_part, respectively.
int_part , dec_part = str_number . split ( '.' )
5,635
for every basedir in basedirs,
for basedir in basedirs :
5,636
where '%s' is replaced with token.contents. call the method re.split with 2 arguments: raw string ' *, *' and elements of bits from 1 index to in_index index,
loopvars = re . split ( r' *, *' , ' ' . join ( bits [ 1 : in_index ] ) )
5,637
if bits is false,
if not bits :
5,638
define lambda function that returns self.file.flush field, use it as an argument for property function, put the result in flush.
flush = property ( lambda self : self . file . flush )
5,639
if table_name_filter is not None and table_name_filter is callable object,
if table_name_filter is not None and callable ( table_name_filter ) :
5,640
decorator function register.filter with an argument is_safe set to boolean True.
@ register . filter ( is_safe = True )
5,641
if not,
else :
5,642
define the method get with 4 arguments, self class instance, key, default set to None and version set to None.
def get ( self , key , default = None , version = None ) :
5,643
call the method self._reset_dicts with an argument dict_.
self . _reset_dicts ( dict_ )
5,644
return the element at the index index of the tuple containing 3 elements: self.func, self.args and self.kwargs.
return ( self . func , self . args , self . kwargs ) [ index ]
5,645
call the method self.stdout.write with an argument string "Installing %s fixture '%s' from %s.",
self . stdout . write ( "Installing %s fixture '%s' from %s." % ( ser_fmt , fixture_name , humanize ( fixture_dir ) ) )
5,646
raise an StopIteration exception.
raise StopIteration
5,647
return result converted into an integer. define the method w with an argument self.
def w ( self ) :
5,648
call the method parser.parse with an argument tuple with an element string 'endautoescape', substitute the result for nodelist.
nodelist = parser . parse ( ( 'endautoescape' , ) )
5,649
if length of bits is lesser than integer 2,
if len ( bits ) < 2 :
5,650
if related_att is not None,
if related_att is not None :
5,651
append string '.moves' to __name__, use it as an argument to instantiate _MovedItems class, assign it to moves,
moves = sys . modules [ __name__ + ".moves" ] = _MovedItems ( __name__ + ".moves" )
5,652
call the method self.handle_uncaught_exception with request, resolver and return value of the function sys.exec_info as the arguments.
response = self . handle_uncaught_exception ( request , resolver , sys . exc_info ( ) )
5,653
return string "[Didn't have permission to include file]".
return "[Didn't have permission to include file]"
5,654
define the function dictConfig with an argument config.
def dictConfig ( config ) :
5,655
self._errors is an instance of ErrorDict.
self . _errors = ErrorDict ( )
5,656
self.verbose_name_plural is a string 'cache entries'.
self . verbose_name_plural = 'cache entries'
5,657
from django.utils.text import smart_split, unescape_string_literal and get_text_list into default namespace.
from django . utils . text import ( smart_split , unescape_string_literal , get_text_list )
5,658
from django.utils import six into default name space.
from django . utils import six
5,659
format the string '{scheme}://{host}{path}' by replacing scheme with self.scheme, host with return value of the self.get_host method,
current_uri = '{scheme}://{host}{path}' . format ( scheme = self . scheme , host = self . get_host ( ) , path = self . path )
5,660
try,
try :
5,661
if value under the 'microsecond' key of the kw dictionary is true,
if kw [ 'microsecond' ] :
5,662
help is a string 'Prints the SQL statements for resetting sequences for the given app name(s).'.
help = 'Prints the SQL statements for resetting sequences for the given app name(s).'
5,663
if s is an instance of bytes or Promise and s._delegate_bytes is true,
if isinstance ( s , bytes ) or ( isinstance ( s , Promise ) and s . _delegate_bytes ) :
5,664
derive the class StopUpload from the UploadFileException base class.
class StopUpload ( UploadFileException ) :
5,665
label set to return value of the function _ called with an string 'Order', initial set to index incremented by 1, and required as boolean False. if not,
else :
5,666
call the method self.field.bound_data with 2 arguments: self.data and value under the self.name key of the dictionary,
data = self . field . bound_data ( self . data , self . form . initial . get ( self . name , self . field . initial ) )
5,667
return nothing.
return
5,668
if not,
else :
5,669
derive the class DjangoSafeDumper from the SafeDumper base class.
class DjangoSafeDumper ( SafeDumper ) :
5,670
if id_for_label is true,
if id_for_label :
5,671
call the method instance of TerminalIPythonApp class, substitute the result for app.
app = TerminalIPythonApp . instance ( )
5,672
break from the loop execution.
break
5,673
media is an instance of Media class.
media = Media ( )
5,674
raise an ValueError exception with an argument string "make_aware expects a naive datetime, got %s", where '%s' is replaced with value.
raise ValueError ( "make_aware expects a naive datetime, got %s" % value )
5,675
s_len is integer 0.
s_len = 0
5,676
if self.match is None or call to the method self.match_re.search with an argument f, evaluated to true,
if self . match is None or self . match_re . search ( f ) :
5,677
call the os.stat function with argument filename, store the return value in stat.
stat = os . stat ( filename )
5,678
append truncate to text, return the result.
return '%s%s' % ( text , truncate )
5,679
call the function force_bytes with an argument salt, substitute the result for salt.
salt = force_bytes ( salt )
5,680
widget.is_localized is boolean True.
widget . is_localized = True
5,681
if not,
else :
5,682
dest set to string 'domain' and help as a string 'The domain of the message files (default: "django").'. call the method parser.add_argument with 6 arguments: string '--all', string '-a', action as a string'store_true',
parser . add_argument ( '--all' , '-a' , action = 'store_true' , dest = 'all' , default = False , help = 'Updates the message files for all existing locales.' )
5,683
define the method add_arguments with 2 arguments self and parser.
def add_arguments ( self , parser ) :
5,684
set class fields _request_middleware, _view_middleware, _template_response_middleware, _response_middleware and _exception_middleware to None.
self . _request_middleware = self . _view_middleware = self . _template_response_middleware = self . _response_middleware = self . _exception_middleware = None
5,685
child_nodelists is an tuple with an element 'nodelist'.
child_nodelists = ( 'nodelist' , )
5,686
substitute the result for value under the f.name key of data dictionary. if not,
else :
5,687
define the method get_meta with arguments self and table_name.
def get_meta ( self , table_name ) :
5,688
derive the class ValidationError from the Exception base class.
class ValidationError ( Exception ) :
5,689
get shell attribute of the self object, call it and return the result.
return getattr ( self , shell ) ( )
5,690
return boolean True.
return True
5,691
define the function get_serializer_formats.
def get_serializer_formats ( ) :
5,692
try,
try :
5,693
if not,
else :
5,694
return the result. define the method value_from_datadict with 4 arguments: self, data, files and name.
def value_from_datadict ( self , data , files , name ) :
5,695
decorator classmethod,
@ classmethod
5,696
from __future__ import unicode_literals into default name space.
from __future__ import unicode_literals
5,697
append self.pointer to self.backout.
self . backout . append ( self . pointer )
5,698
if context_instance is false,
if not context_instance :
5,699
return a string '%s %s %s' formated with 3 elements: result of the function force_text called with an argument i,
return '%s %s %s' % ( _ ( ', ' ) . join ( force_text ( i ) for i in list_ [ : - 1 ] ) , force_text ( last_word ) , force_text ( list_ [ - 1 ] ) )