Unnamed: 0
int64 0
10k
| nl
stringlengths 3
2.42k
| code
stringlengths 4
3.76k
|
---|---|---|
600 | if self.pos is greater than or equal to self.tokens, | if self . pos >= len ( self . tokens ) : |
601 | from __future__ import unicode_literals into default name space. | from __future__ import unicode_literals |
602 | comment_notes is an empty list. | comment_notes = [ ] |
603 | label set to None, initial set to None, help_text set to an empty string, unpacked list args and unpacked dictionary kwargs. call the __init__ method of the base class of the class ChoiceField, called with 7 arguments: required set to required, | super ( ChoiceField , self ) . __init__ ( required = required , widget = widget , label = label , initial = initial , help_text = help_text , * args , ** kwargs ) |
604 | return name. | return name |
605 | substitute the result for timezone. divide timezone by integer 60, substitute the quotient of the division for hour and reminder for minute. | hour , minute = divmod ( timezone , 60 ) |
606 | if settings.TEMPLATE_DEBUG is true and origin is None, | if settings . TEMPLATE_DEBUG and origin is None : |
607 | call the email_message.recipients method, if it evaluates to false, | if not email_message . recipients ( ) : |
608 | define the method _cache with self class instance as an argument. | def _cache ( self ) : |
609 | raise an ValidationError with an argument errors. | raise ValidationError ( errors ) |
610 | define the method reset with an argument self. | def reset ( self ) : |
611 | try, | try : |
612 | if exclude is true and f.name is contained in exclude, | if exclude and f . name in exclude : |
613 | if not, shutdown_message is an empty string. if sys.platform equals string win32', substitute string 'CTRL-BREAK' for quit_command, if not substitute string 'CONTROL-C' for quit_command. | quit_command = 'CTRL-BREAK' if sys . platform == 'win32' else 'CONTROL-C' |
614 | substitute options for self.options. | self . options = options |
615 | call the method connection.check_constraints with an arguments table_names set to table_names. | connection . check_constraints ( table_names = table_names ) |
616 | if self.sep is not contained in signed_value, | if self . sep not in signed_value : |
617 | define the function dumps with 5 arguments: obj, key set to None, salt set to string 'django.core.signing', | def dumps ( obj , key = None , salt = 'django.core.signing' , serializer = JSONSerializer , compress = False ) : |
618 | _iterkeys is a string "keys". | _iterkeys = "keys" |
619 | finally perform, | finally : |
620 | substitute elements of middle from length of opening index to the end, for middle. | middle = middle [ len ( opening ) : ] |
621 | databases is a list containing 2 elements: self.using and None. | databases = [ self . using , None ] |
622 | call the function os.path.expanduser with an argument pythonrc, substitute the result for pythonrc. | pythonrc = os . path . expanduser ( pythonrc ) |
623 | append string '0000' to new_ip. | new_ip . append ( '0000' ) |
624 | and help set to string 'Nominates a database to print the SQL for. Defaults to the "default" database.'. define the method handle_app_config with 3 arguments: self, app_config and unpacked dictionary options. | def handle_app_config ( self , app_config , ** options ) : |
625 | if self.data.hour is greater than inreger 12, | if self . data . hour > 12 : |
626 | derive the class Command from the AppCommand base class. | class Command ( AppCommand ) : |
627 | if not, | else : |
628 | requires_system_checks is boolean False. | requires_system_checks = False |
629 | substitute base for m. | m = base |
630 | call the function getInnerText with argument field_node, on the result call the method strip, use the result as an argument for the | value = field . to_python ( getInnerText ( field_node ) . strip ( ) ) |
631 | substitute level for self.level. | self . level = level |
632 | substitute the resulting list for app_config. if not, | else : |
633 | append string "Field renamed because it wasn't a valid Python identifier." to field_notes. | field_notes . append ( "Field renamed because it wasn't a valid Python identifier." ) |
634 | return res. | return res |
635 | call the method writer.as_string, write the result to file fh. | fh . write ( writer . as_string ( ) ) |
636 | create lambda identity function which returns x for input parameter x, return the function. | return lambda x : x |
637 | register.tag decorator, | @ register . tag |
638 | substitute self.field.widget for widget. | widget = self . field . widget |
639 | call the method self._assert_mutable. | self . _assert_mutable ( ) |
640 | convert locale to lowercase and return it. | return locale . lower ( ) |
641 | if OverflowError or ValueError exceptions are caught, | except ( OverflowError , ValueError ) : |
642 | definition is an empty dictionary, | definition = { } |
643 | append command.xgettext_options to list containing 15 elements: string 'xgettext', string '-d', domain, string '--language=Python', | args = [ 'xgettext' , '-d' , domain , '--language=Python' , '--keyword=gettext_noop' , '--keyword=gettext_lazy' , '--keyword=ngettext_lazy:1,2' , '--keyword=ugettext_noop' , '--keyword=ugettext_lazy' , '--keyword=ungettext_lazy:1,2' , '--keyword=pgettext:1c,2' , '--keyword=npgettext:1c,2,3' , '--keyword=pgettext_lazy:1c,2' , '--keyword=npgettext_lazy:1c,2,3' , '--output=-' ] + command . xgettext_options |
644 | if response is None, | if response is None : |
645 | try, | try : |
646 | default is a an empty list and help is a string '(use multiple --exclude to exclude multiple apps/models).'. call the method parser.add_argument with 6 arguments: string '-n', string '--natural', action is string 'store_true', dest is string 'use_natural_keys', | parser . add_argument ( '-n' , '--natural' , action = 'store_true' , dest = 'use_natural_keys' , default = False , help = 'Use natural keys if they are available (deprecated: use --natural-foreign instead).' ) |
647 | if TemplateDoesNotExist exception is caught, | except TemplateDoesNotExist : |
648 | self.models is an empty set. | self . models = set ( ) |
649 | for every i and tuple containing dirpath and f, in enumerated list of locations, | for i , ( dirpath , f ) in enumerate ( locations ) : |
650 | empty string for 'field', empty string for 'help_text' and html_class_attr for html_class_attr. append last_row to output. | output . append ( last_row ) |
651 | if ValueError exception is caught, | except ValueError : |
652 | if pop_context is true, | if pop_context : |
653 | return self. | return self |
654 | define the method __init__ with 3 arguments: self, offset set to None, name set to None. | def __init__ ( self , offset = None , name = None ) : |
655 | if initial is not None, substitute initial for initial_value, otherwise initial_value is an empty string. | initial_value = initial if initial is not None else '' |
656 | convert arg to an integer, substitute it for p. | p = int ( arg ) |
657 | define the method __init__ wiht 5 arguments: self, META, input_data, upload_handlers and encoding set to None. | def __init__ ( self , META , input_data , upload_handlers , encoding = None ) : |
658 | create dictionary out of the unpacked dictionary options, using defaults.__dict__ as a mapping function, substitute the result for defaults. | defaults = dict ( defaults . __dict__ , ** options ) |
659 | return result. | return result |
660 | call the the method __copy__ from the base class of the class Context, substitute the result for duplicate. | duplicate = super ( Context , self ) . __copy__ ( ) |
661 | call the function format_html with 2 arguments: string '<optgroup label="{0}">' and return value of the function force_text, | output . append ( format_html ( '<optgroup label="{0}">' , force_text ( option_value ) ) ) |
662 | if the value under the 'test_flush' key of the options dictionary exists, | if options . get ( "test_flush" , False ) : |
663 | if basetype equals a string 'text', | if basetype == 'text' : |
664 | register.tag decorator, | @ register . tag |
665 | define the method write_po_file with arguments self, potfile and locale. | def write_po_file ( self , potfile , locale ) : |
666 | define the function mail_managers with subject, message, fails_silently set to boolean False, connection set to None, | def mail_managers ( subject , message , fail_silently = False , connection = None , html_message = None ) : |
667 | for every x is the range of integers from level to the integer 2, in the reversed order, | for x in range ( level , 1 , - 1 ) : |
668 | raise an exception. | raise |
669 | call the function pgettext with an argument 'String to return when truncating text', '%(truncated_text)s...', substitute the result for truncate. | truncate = pgettext ( 'String to return when truncating text' , '%(truncated_text)s...' ) |
670 | from django.conf import settings into default name space. | from django . conf import settings |
671 | join elements of output into a string, separated by newline characters, return it. | return '\n' . join ( output ) |
672 | get the next element of the self._producer iterable, substitute it for output. | output = next ( self . _producer ) |
673 | define the method listdir with arguments self and path. | def listdir ( self , path ) : |
674 | return the result of the method field.widget.value_from_datadict called with 3 arguments: self.data, self.files and prefix. | return field . widget . value_from_datadict ( self . data , self . files , prefix ) |
675 | buffer_ is None. | buffer_ = None |
676 | if t is not None, | if t is not None : |
677 | define the method __iter__ with argument self. | def __iter__ ( self ) : |
678 | substitute self._stream for stream. | stream = self . _stream |
679 | return _cached_filenames. | return _cached_filenames |
680 | update declared_fields dictionary with entry base.declared_fields. | declared_fields . update ( base . declared_fields ) |
681 | call the method self.extra_headers.get with arguments: string 'To' and joined string from self.to elements separated by ', ', | msg [ 'To' ] = self . extra_headers . get ( 'To' , ', ' . join ( self . to ) ) |
682 | define the method with reload with an argument self. | def __str__ ( self ) : |
683 | substitute gettext_noop for ugettext_noop. | ugettext_noop = gettext_noop |
684 | substitute complain for pop. | pop = complain |
685 | otherwise if, type of s doesnt equal to six.text_type, | elif type ( s ) != six . text_type : |
686 | for every item in self.items, | for item in self . items : |
687 | if output is true, | if output : |
688 | from django.utils.datastructures import MultiValueDict into default name space. | from django . utils . datastructures import MultiValueDict |
689 | if field.widget.needs_multipart_form is true, | if field . widget . needs_multipart_form : |
690 | use fourth element of version as a key to get the value from mapping dictionary, append to it fourth element of version converted to string, substitute it for sub. | sub = mapping [ version [ 3 ] ] + str ( version [ 4 ] ) |
691 | substitute the result for exc_value. substitute exc for exc_value.__cause__. | exc_value . __cause__ = exc |
692 | call the os.path.split with argument name, assign the result to the dir_name and file_name respectively. | dir_name , file_name = os . path . split ( name ) |
693 | replace all '%s' from string "%s: %s%s%s" with values of obj, id, self.msg and hint, respectively, return the result. | return "%s: %s%s%s" % ( obj , id , self . msg , hint ) |
694 | if not, | else : |
695 | self.file is a instance of a class TemporaryUploadedFile initialized with arguments: self.file_name, self.content_type, integer 0, | self . file = TemporaryUploadedFile ( self . file_name , self . content_type , 0 , self . charset , self . content_type_extra ) |
696 | where '%s' is replaced with self.__class__.__name__. define the method flush with an argument self. | def flush ( self ) : |
697 | substitute the return value of the method self.object_list.count for self._count. | self . _count = self . object_list . count ( ) |
698 | if last_row doesnt ends with row_ender, | if not last_row . endswith ( row_ender ) : |
699 | return printable representation of self.value. | return repr ( self . value ) |