Unnamed: 0
int64
0
10k
nl
stringlengths
3
2.42k
code
stringlengths
4
3.76k
5,300
call the method self.items, for every field and errors in the result.
for field , errors in self . items ( ) :
5,301
if not,
else :
5,302
try,
try :
5,303
return value.
return value
5,304
if app_label is not contained in executor.loader.migrated_apps,
if app_label not in executor . loader . migrated_apps :
5,305
for every i and line in enumerated iterable table_output,
for i , line in enumerate ( table_output ) :
5,306
call the msg.attach with an argument body_msg.
msg . attach ( body_msg )
5,307
define the method management_form with an argument self.
def management_form ( self ) :
5,308
from __future__ import unicode_literals into default name space.
from __future__ import unicode_literals
5,309
call the function EmailMultiAlternatives with settings.EMAIL_SUBJECT_PREFIX and subject converted to strings and concatenated,
mail = EmailMultiAlternatives ( '%s%s' % ( settings . EMAIL_SUBJECT_PREFIX , subject ) , message , settings . SERVER_EMAIL , [ a [ 1 ] for a in settings . ADMINS ] , connection = connection )
5,310
call the function force_text with first element of choice as an argument, substitute the result for self.choice_value.
self . choice_value = force_text ( choice [ 0 ] )
5,311
substitute table for self.db_table.
self . db_table = table
5,312
if data has an 'temporary_file_path' attribute,
if hasattr ( data , 'temporary_file_path' ) :
5,313
call the self.read method with argument chunk_size, substitute the result for data.
data = self . read ( chunk_size )
5,314
insert '.' to digits at negative exponent index.
digits . insert ( - exponent , '.' )
5,315
delete self entry under the key key.
del self [ key ]
5,316
substitute msg for body_msg.
body_msg = msg
5,317
update attrs dictionary with entry: self.max_length converted into a string for 'maxlength'.
attrs . update ( { 'maxlength' : str ( self . max_length ) } )
5,318
call the function save_m2m.
save_m2m ( )
5,319
call the method parser.add_argument with 6 arguments: string '--locale', string '-l', default as an empty list,
parser . add_argument ( '--locale' , '-l' , default = [ ] , dest = 'locale' , action = 'append' , help = 'Creates or updates the message files for the given locale(s) (e.g. pt_BR). ' 'Can be used multiple times.' )
5,320
make basedir directory,
os . makedirs ( basedir )
5,321
call the executor.loader.get_migration_by_prefix with app_label and migration_name with arguments, substitute the result fr migration.
migration = executor . loader . get_migration_by_prefix ( app_label , migration_name )
5,322
call the method constant_re.match with first element of parts as an argument, substitute the result for cmatch.
cmatch = constant_re . match ( parts [ 0 ] )
5,323
define the method validate_host with 2 arguments: host and allowed_hosts.
def validate_host ( host , allowed_hosts ) :
5,324
method lru_cache.lru_cache with an argument maxsize set to None, as a decorator,
@ lru_cache . lru_cache ( maxsize = None )
5,325
from wsgiref import simple_server into default name space.
from wsgiref import simple_server
5,326
call the method self.template.resolve with an argument context, substitute the result for template.
template = self . template . resolve ( context )
5,327
call the function escapejs with an argument value, return the result.
return escapejs ( value )
5,328
result is a list containing an empty string.
result = [ '' ]
5,329
call the method field_stream.read with an argument: over_bytes subtracted from integer 4, substitute the result for over_chunk.
over_chunk = field_stream . read ( 4 - over_bytes )
5,330
call the function six.reraise with 3 arguments: ImportError, instance of ImportError class created with an argument msg,
six . reraise ( ImportError , ImportError ( msg ) , sys . exc_info ( ) [ 2 ] )
5,331
call the method cursor.execute with string "DELETE FROM %s WHERE cache_key = %%s" as argument,
cursor . execute ( "DELETE FROM %s " "WHERE cache_key = %%s" % table , [ key ] )
5,332
code is a string 'min_value'
code = 'min_value'
5,333
call the function self._key_to_file with key and version as arguments, substitute it for fname.
fname = self . _key_to_file ( key , version )
5,334
optimizer is an instance of MigrationOptimizer class.
optimizer = MigrationOptimizer ( )
5,335
return new_class.
return new_class
5,336
for every f in filters,
for f in filters :
5,337
return boolean False.
return False
5,338
load_template_source.is_usable is boolean True.
load_template_source . is_usable = True
5,339
define the function _check_test_runner with app_config set to None and kwargs dictionary as arguments.
def _check_test_runner ( app_configs = None , ** kwargs ) :
5,340
substitute context for block.context.
block . context = context
5,341
self.bad_cookies is an empty set.
self . bad_cookies = set ( )
5,342
if offset is lesser than integer 0, sign is set to '-', otherwise sign is '+',
sign = '-' if offset < 0 else '+'
5,343
months is a tuple with 12 elements: strings 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov' and 'Dec'.
months = ( 'Jan' , 'Feb' , 'Mar' , 'Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' , )
5,344
dest as a string 'keep_pot', default as boolean False and help as a string "Keep .pot file after making messages. Useful when debugging." define the method handle with 3 arguments: self, unpacked list args and unpacked dictionary options.
def handle ( self , * args , ** options ) :
5,345
do nothing.
pass
5,346
substitute key for value under the KEY key of the oldroot dictionary.
oldroot [ KEY ] = key
5,347
call the translation.get_language_bidi function, substitute the result for the value under the 'LANGUAGE_BIDI' key of the context_extras dictionary.
context_extras [ 'LANGUAGE_BIDI' ] = translation . get_language_bidi ( )
5,348
define the method validate with 2 arguments: self and value.
def validate ( self , value ) :
5,349
call the method __new__ from the base class of the class MediaDefiningClass, called with 4 arguments: mcs, name, bases and attrs.
new_class = ( super ( MediaDefiningClass , mcs ) . __new__ ( mcs , name , bases , attrs ) )
5,350
do nothing.
pass
5,351
convert to k and v to strings for every k and v in return value of the response.item method, response_headers is a list containing all the above iteration elements.
response_headers = [ ( str ( k ) , str ( v ) ) for k , v in response . items ( ) ]
5,352
call the method self.get_resolved_arguments with an argument context, substitute the result for resolved_args and resolved_kwargs.
resolved_args , resolved_kwargs = self . get_resolved_arguments ( context )
5,353
for every key in self.keyOrder,
for key in self . keyOrder :
5,354
from django.utils import six into default name space.
from django . utils import six
5,355
substitute instance._meta for opts.
opts = instance . _meta
5,356
import module os.
import os
5,357
if option is contained in options,
if option in options :
5,358
verbosity set to verbosity, interactive set to interactive and using set to db. call the method models.signals.post_syncdb.send with 6 arguments: sender set to app_config.models_module,
models . signals . post_syncdb . send ( sender = app_config . models_module , app = app_config . models_module , created_models = created_models , verbosity = verbosity , interactive = interactive , db = db )
5,359
call the method router.get_migratable_models with arguments app_config and connection.alias.
app_models = router . get_migratable_models ( app_config , connection . alias )
5,360
try,
try :
5,361
call the function _ with an argument string 'Ensure this value is greater than or equal to %(limit_value)s.', substitute the result for message.
message = _ ( 'Ensure this value is greater than or equal to %(limit_value)s.' )
5,362
return nothing.
return
5,363
otherwise if bmatch is true,
elif bmatch :
5,364
if first and second elements of value are contained in self.empty_values,
if value [ 0 ] in self . empty_values and value [ 1 ] in self . empty_values :
5,365
for every loader in template_source_loaders,
for loader in template_source_loaders :
5,366
concatenate var_name, VARIABLE_ATTRIBUTE_SEPARATOR and fourth element of bits, use the result as an argument for the call the method,
expression = parser . compile_filter ( var_name + VARIABLE_ATTRIBUTE_SEPARATOR + bits [ 3 ] )
5,367
covert to uppercase language elements from (p+1)-th index to the end, append it to the previous result, return it. if not,
else :
5,368
return string 'form'.
return 'form'
5,369
unique_check is a list with elements field, for every field in unique_check if field is not equal to self.fk.name.
unique_check = [ field for field in unique_check if field != self . fk . name ]
5,370
raise an v exception.
raise v
5,371
call the method self._populate.
self . _populate ( )
5,372
formated with t.contents, filemsg and t.lineno. otherwise if t.token_type equals TOKEN_VAR,
elif t . token_type == TOKEN_VAR :
5,373
if not,
else :
5,374
define the method __contains__ with self and key as arguments.
def __contains__ ( self , key ) :
5,375
substitute the result for result. try,
try :
5,376
if end is None
if end is None :
5,377
if os has an attribute 'chmod',
if hasattr ( os , 'chmod' ) :
5,378
sum length of self.quertset and integer 1 if self.field.empty_label is not None, or integer 0 if not, return the result.
return ( len ( self . queryset ) + ( 1 if self . field . empty_label is not None else 0 ) )
5,379
renderer is None.
renderer = None
5,380
create a list out of fist end_text_pos text elemnts, substitue it for out.
out = text [ : end_text_pos ]
5,381
call the method field._get_val_from_obj with obj argument, substitute the result for value.
value = field . _get_val_from_obj ( obj )
5,382
split msgs by newline characters, for every line in result,
for line in msgs . split ( '\n' ) :
5,383
define the method get_many with self class instance, keys and version defaulting to None as arguments.
def get_many ( self , keys , version = None ) :
5,384
try,
try :
5,385
split p into two parts at the first ':', use the second element of the result to format string ' _(%s) ', write it to out.
out . write ( ' %s ' % p . split ( ':' , 1 ) [ 1 ] )
5,386
url is a property of the class, lambda function is getter attribute with an argument self and return value is the value under the 'Location' key of the self dictionary.
url = property ( lambda self : self [ 'Location' ] )
5,387
if fist and second element of sys.version_info equals to integer 3 and 2, respectively,
if sys . version_info [ : 2 ] == ( 3 , 2 ) :
5,388
call the method signals.got_request_exception.send with the sender set to the type of this class, and request set to request as the arguments.
signals . got_request_exception . send ( sender = self . __class__ , request = request )
5,389
call the self.compile_messages with locations as argument,
self . compile_messages ( locations )
5,390
return self.id.
return self . id
5,391
call the function import_string with backend if exists or settings.EMAIL_BACKEND if not, store the result into klass.
klass = import_string ( backend or settings . EMAIL_BACKEND )
5,392
if other_dict doesnt have an '__getitem__' attribute,
if not hasattr ( other_dict , '__getitem__' ) :
5,393
join hidden_fields elements into a string, without separation, substitute the result for str_hidden.
str_hidden = '' . join ( hidden_fields )
5,394
compatibility is a string 'compatibility'.
compatibility = 'compatibility'
5,395
return None.
return None
5,396
define the method widget_attrs with arguments self and widget.
def widget_attrs ( self , widget ) :
5,397
call the function locks.unlock with fd as argument.
locks . unlock ( fd )
5,398
requires_system_checks is boolean False.
requires_system_checks = False
5,399
if values is None,
values = [ ]