Unnamed: 0
int64 0
10k
| nl
stringlengths 3
2.42k
| code
stringlengths 4
3.76k
|
---|---|---|
400 |
call the method __init__ with 2 arguments: unpacked list args and unpacked dictionary kwargs, from the base class of the class ComboField.
|
super ( ComboField , self ) . __init__ ( * args , ** kwargs )
|
401 |
self._post_parse_error is boolen False.
|
self . _post_parse_error = False
|
402 |
return value under key key of dict_ dictionary.
|
return dict_ [ key ]
|
403 |
try,
|
try :
|
404 |
return self.object_list element at index.
|
return self . object_list [ index ]
|
405 |
define initialization method __init__ with self class instance, unpacked list args, unpacked dictionary kwargs as arguments.
|
def __init__ ( self , * args , ** kwargs ) :
|
406 |
position the file pointer at the beginning of self file.
|
self . seek ( 0 )
|
407 |
import module os.
|
import os
|
408 |
call the method apps.get_model with an argument model_identifier.
|
return apps . get_model ( model_identifier )
|
409 |
do nothing.
|
pass
|
410 |
INFO is integer 20.
|
INFO = 20
|
411 |
use the result as an argument for the call to the function mark_safe, return the result. decorator function register.filter with 2 arguments is_safe set to boolean True and needs_autoescape set to boolean True.
|
@ register . filter ( is_safe = True , needs_autoescape = True )
|
412 |
from django.db.migrations.loader import AmbiguityError into default name space.
|
from django . db . migrations . loader import AmbiguityError
|
413 |
contains_nontext is boolean False.
|
contains_nontext = False
|
414 |
for every arg in the result, if arg is an instance of Promise class,
|
if isinstance ( arg , Promise ) :
|
415 |
for every model in app_models,
|
for model in app_models :
|
416 |
from django.core.management.color import no_style into default name space.
|
from django . core . management . color import no_style
|
417 |
call the method message.message, substitute the result for msg.
|
msg = message . message ( )
|
418 |
add model to created_models set.
|
created_models . add ( model )
|
419 |
call the function force_text with an argument val, if the result is not contained in pks,
|
if force_text ( val ) not in pks :
|
420 |
define method GET with self class instance as an argument.
|
def GET ( self ) :
|
421 |
define the method u with an argument self.
|
def u ( self ) :
|
422 |
default set to boolean False, help as a string "Just show what migrations would be made; don't actually write them.". call the method parser.add_argument with 5 arguments: string '--merge', action as a string 'store_true', dest as a string 'merge',
|
parser . add_argument ( '--merge' , action = 'store_true' , dest = 'merge' , default = False , help = "Enable fixing of migration conflicts." )
|
423 |
replace '%s' in string "%s = %s" with key and value under the key key of the user_setting dictionary, append it to the output.
|
output . append ( "%s = %s" % ( key , user_settings [ key ] ) )
|
424 |
substitute the last element of parts for cmp_fmt.
|
cmp_fmt = parts [ - 1 ]
|
425 |
call the function yaml.dump with 4 arguments: self.objects, self.stream, Dumper=DjangoSafeDumper and unpacked dictionary self.options.
|
yaml . dump ( self . objects , self . stream , Dumper = DjangoSafeDumper , ** self . options )
|
426 |
substitute smart_text for smart_unicode.
|
smart_unicode = smart_text
|
427 |
call the BaseCache.__init__ method with self class instance and params as the arguments.
|
BaseCache . __init__ ( self , params )
|
428 |
self._current is None.
|
self . _current = None
|
429 |
where '%s' are replaced with name and param. if not,
|
else :
|
430 |
guid_attrs is an empty dictionary.
|
guid_attrs = { }
|
431 |
if not substitute field.initial for initial. call the method filed.clean with arguments value and initial, substitute the result for value.
|
value = field . clean ( value , initial )
|
432 |
try,
|
try :
|
433 |
if domain is not None,
|
if domain is not None :
|
434 |
and return value of the function f.db_type called with an argument connection set to connection. if f.null is false, append string append "NOT NULL" to field_output, otherwise append "NULL" to field_output.
|
field_output . append ( "%sNULL" % ( "NOT " if not f . null else "" ) )
|
435 |
var_obj is an instance of Variable class, created with an argument var.
|
var_obj = Variable ( var )
|
436 |
return the first element of the return value of the call to the self._det_image_dimensions method.
|
return self . _get_image_dimensions ( ) [ 0 ]
|
437 |
from django.utils import formats into default name space.
|
from django . utils import formats
|
438 |
call the method widget.id_for_label with an argument id_, substitute the result for id_for_label.
|
id_for_label = widget . id_for_label ( id_ )
|
439 |
call the function widget, substitute the result for widget.
|
widget = widget ( )
|
440 |
update defaults dictionary with kwargs.
|
defaults . update ( kwargs )
|
441 |
if six.PY3 is true,
|
if six . PY3 :
|
442 |
append old_app_dir to app_dirs.
|
app_dirs . append ( old_app_dir )
|
443 |
call the method models.signals.post_migrate.send with 5 arguments: sender set to app_config, app_config set to app_config,
|
models . signals . post_migrate . send ( sender = app_config , app_config = app_config , verbosity = verbosity , interactive = interactive , using = db )
|
444 |
call the function force_bytes with an argument password, substitute the result for password.
|
password = force_bytes ( password )
|
445 |
if use_l10n is true, or use_l10n is None and settings.USE_L10N is true,
|
if use_l10n or ( use_l10n is None and settings . USE_L10N ) :
|
446 |
get attribute class_name form the module object, return it.
|
return getattr ( module , class_name )
|
447 |
modify value at the key 'Location' of the dictionary response by applying function request.build_absolute_uri on it.
|
response [ 'Location' ] = request . build_absolute_uri ( response [ 'Location' ] )
|
448 |
if option_label is an instance of list or tuple,
|
if isinstance ( option_label , ( list , tuple ) ) :
|
449 |
derive the class Loader from the BaseLoader base class.
|
class Loader ( BaseLoader ) :
|
450 |
break the loop execution.
|
break
|
451 |
if value has an attribute '__iter__' and value is not an instance of six.text_type,
|
if hasattr ( value , '__iter__' ) and not isinstance ( value , six . text_type ) :
|
452 |
plist is an empty list.
|
plist = [ ]
|
453 |
call the method imatch.group with an argument integer 1, substitute the result for g.
|
g = imatch . group ( 1 )
|
454 |
call the function reloader with wrapped_main_func, args and kwargs as arguments.
|
reloader ( wrapped_main_func , args , kwargs )
|
455 |
call the function initial_value, substitute the result for initial_value.
|
initial_value = initial_value ( )
|
456 |
where '%s' is replaced with app_or_project and extra_files joined into a string, separated by a string ', '. append string '_name' to app_or_project, substitute it for base_name.
|
base_name = '%s_name' % app_or_project
|
457 |
if data is not None,
|
if data is not None :
|
458 |
if old_attr is None,
|
if old_attr is None :
|
459 |
define the method __init__ with 3 arguments: self, tup and hash set to hash.
|
def __init__ ( self , tup , hash = hash ) :
|
460 |
raise an TemplateDoesNotExist exception with an argument string "No template names provided".
|
raise TemplateDoesNotExist ( "No template names provided" )
|
461 |
define the function _parse_date_fmt.
|
def _parse_date_fmt ( ) :
|
462 |
call the get_bytes_from_wsgi function with environ, string 'REDIRECT_URL' and empty strings as arguments, substitute the result for script_url.
|
script_url = get_bytes_from_wsgi ( environ , 'REDIRECT_URL' , '' )
|
463 |
handler is an instance of SimplerXMLGenerator class, created with 2 arguments: outfile and encoding.
|
handler = SimplerXMLGenerator ( outfile , encoding )
|
464 |
call the method self.xml.addQuickElement with an argument string 'None'.
|
self . xml . addQuickElement ( "None" )
|
465 |
"path of at least one fixture in the command line." define the method add_arguments with 2 arguments: self and parser.
|
def add_arguments ( self , parser ) :
|
466 |
raise an exception.
|
raise
|
467 |
if not,
|
else :
|
468 |
return s.
|
return s
|
469 |
and instance of TimeInput class, created with 2 arguments: attrs set to attrs and format set to date_format. call the method __init__ from the base class of the class SplitDateTimeWidget, with 2 arguments: widgets and attrs.
|
super ( SplitDateTimeWidget , self ) . __init__ ( widgets , attrs )
|
470 |
define the method delete_cookie with 4 arguments: self, key, path set to character '/' and domain set to None.
|
def delete_cookie ( self , key , path = '/' , domain = None ) :
|
471 |
from django.template import loader, Context and RequestContext into default name space.
|
from django . template import loader , Context , RequestContext
|
472 |
substitute raw_data for data.
|
data = raw_data
|
473 |
if check_path is true,
|
if check_path :
|
474 |
try,
|
try :
|
475 |
define the function _get_timezone_name with an argument timezone.
|
def _get_timezone_name ( timezone ) :
|
476 |
or with string 'models.' if it is not and field_type. if extra_params is true,
|
if extra_params :
|
477 |
if not self.initial_extra is None. defaults is a dictionary with 4 entries: data for 'data', files for 'files', auto_id for 'auto_id' and prefix for 'prefix'.
|
defaults = { 'data' : data , 'files' : files , 'auto_id' : auto_id , 'prefix' : prefix }
|
478 |
define the method use_argparse with an argument self,
|
def use_argparse ( self ) :
|
479 |
call the method executor.migration_plan wiht return value of te method executor.loader.graph.leaf_nodes as argument, substitute it for plan.
|
plan = executor . migration_plan ( executor . loader . graph . leaf_nodes ( ) )
|
480 |
define the method cfg_convert with 2 arguments: self and value.
|
def cfg_convert ( self , value ) :
|
481 |
substitute first element of parts for view.
|
view = parts [ 0 ]
|
482 |
if second element of sys.version_info is smaller than or equal to integer 1,
|
if sys . version_info [ 1 ] <= 1 :
|
483 |
define the method id_for_label with arguments self, name, field, value, val, choices and none_value.
|
def create_select ( self , name , field , value , val , choices , none_value ) :
|
484 |
with an argument i, for 'prefix' and self.error_class for 'error_class'. if self.is_bound is true,
|
if self . is_bound :
|
485 |
if type of result is ConvertingDict, ConvertingList or ConvertingTuple,
|
if type ( result ) in ( ConvertingDict , ConvertingList , ConvertingTuple ) :
|
486 |
call the method bpython.embed.
|
bpython . embed ( )
|
487 |
call the method self.__text_cast, return the result.
|
return self . __text_cast ( )
|
488 |
call the method validate with an argument value from the base class of the class TypedMultipleChoiceField.
|
super ( TypedMultipleChoiceField , self ) . validate ( value )
|
489 |
call the method self.translate_token with an argument token, append the result to mapped_tokens.
|
mapped_tokens . append ( self . translate_token ( token ) )
|
490 |
if not,
|
else :
|
491 |
call the method logger.addHandler with an argument: h-th element of value under 'handlers' key of self.config dictionary.
|
logger . addHandler ( self . config [ 'handlers' ] [ h ] )
|
492 |
call the function get_tag_uri with 2 arguments: values under 'link' and 'pubdate' keys of item dictionary, substitute the result for unique_id.
|
unique_id = get_tag_uri ( item [ 'link' ] , item [ 'pubdate' ] )
|
493 |
append new_filenames to _cached_filenames.
|
_cached_filenames += new_filenames
|
494 |
self._errors is None.
|
self . _errors = None
|
495 |
return boolean True.
|
return True
|
496 |
substitute idx-th element of self.choices for choice.
|
choice = self . choices [ idx ]
|
497 |
not_found is an empty list.
|
not_found = [ ]
|
498 |
define the function dictsortreversed with 2 arguments value and arg.
|
def dictsortreversed ( value , arg ) :
|
499 |
break from the loop execution.
|
break
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.