Unnamed: 0
int64 0
10k
| nl
stringlengths 3
2.42k
| code
stringlengths 4
3.76k
|
---|---|---|
700 | from copy import copy into default name space. | from copy import copy |
701 | try, | try : |
702 | call the method self.getvalue, return the result. | return self . getvalue ( ) |
703 | try, | try : |
704 | call the function six.text_type with length of lines as an argument, | width = six . text_type ( len ( six . text_type ( len ( lines ) ) ) ) |
705 | raise an ValidationError with 2 arguments: value under the 'invalid' key of the self.error_messages dictionary and code set to 'invalid'. | raise ValidationError ( self . error_messages [ 'invalid' ] , code = 'invalid' ) |
706 | if self.max_value is not None, | if self . max_value is not None : |
707 | define the function _unpack_ipv4 with an argument ip_str. | def _unpack_ipv4 ( ip_str ) : |
708 | define the method A with an argument self. | def A ( self ) : |
709 | decorator register.filter. | @ register . filter |
710 | from django.utils import six into default name space. | from django . utils import six |
711 | string 'DECIMAL_SEPARATOR', lang and use_l10n set to use_l10n, decimal_pos, result of the function get_format called with 3 arguments: string 'NUMBER_GROUPING', lang and use_l10n as use_l10n, result of the function get_format called with an argument: string 'THOUSAND_SEPARATOR', lang and use_l10n as use_l10n and force_grouping as force_grouping, return the result. define the function localize with 2 arguments value and use_l10n set to None. | def localize ( value , use_l10n = None ) : |
712 | call the method form.add_prefix with an argument self._pk_field.name, | form . data [ form . add_prefix ( self . _pk_field . name ) ] = None |
713 | substitute index for doublecolon_start. | doublecolon_start = index |
714 | if path is not initialized, | if path is None : |
715 | if six.PY2 is true, | if six . PY2 : |
716 | if self.pk_field, | if self . pk_field : |
717 | sum of the result of the function time.time and max_age, substitute it for 'expires' key of the previously returned dictionary. if path is not None, | if path is not None : |
718 | otherwise if field.required is true, | elif field . required : |
719 | derive the class EmailField from the base class CharField class. | class EmailField ( CharField ) : |
720 | self.file_permissions_mode is a tuple containing: file_permissions_mode if file_permissions_mode is not None, | self . file_permissions_mode = ( file_permissions_mode if file_permissions_mode is not None else settings . FILE_UPLOAD_PERMISSIONS ) |
721 | called with an argument text converted into a floating point number. if ValueError, InvalidOperation, TypeError or UnicodeEncodeError exceptions are caught, | except ( ValueError , InvalidOperation , TypeError , UnicodeEncodeError ) : |
722 | if second element of url_fields is false, | if not url_fields [ 1 ] : |
723 | convert args into a list, substitute it for args. | args = list ( args ) |
724 | get the value under the 'extensions' key of the options dictionary, substitute it for extensions. | extensions = options . get ( 'extensions' ) |
725 | if Exception, renamed to e, exception is caught, | except Exception as e : |
726 | join usage and self.help into a string, separated by 2 new line characters, return it. | return '%s\n\n%s' % ( usage , self . help ) |
727 | define the method set_many with self, data, timeout set to DEFAULT_TIMEOUT and version set to None as arguments. | def set_many ( self , data , timeout = DEFAULT_TIMEOUT , version = None ) : |
728 | for every name in MEDIA_TYPES, | for name in MEDIA_TYPES : |
729 | if attrs is true, | if attrs : |
730 | break from the endless loop. | break |
731 | do nothing. | pass |
732 | call the method self.write_migration_files with an argument changes. | self . write_migration_files ( changes ) |
733 | return nothing. | return |
734 | from django.conf import settings into default namespace, | from django . conf import settings |
735 | call the function smart_urlquote with an argument middle, substitute the result for url. | url = smart_urlquote ( middle ) |
736 | define the method utcoffset with 2 arguments self and dt. | def utcoffset ( self , dt ) : |
737 | define function dictitem with s as an argument. | def dictitem ( s ) : |
738 | if not, | else : |
739 | for every sql in custom_sql, | for sql in custom_sql : |
740 | call the method self._prepare_data with an argument data, substitute the result for data. | data = self . _prepare_data ( data ) |
741 | if self.field.empty_label is not None, | if self . field . empty_label is not None : |
742 | value is an instance of ConvertingList class, created with an argument value. | value = ConvertingList ( value ) |
743 | close file file. | file . close ( ) |
744 | return boolean False. | return False |
745 | substitute fields for self.fields. | self . fields = fields |
746 | derive the class InputStreamExhausted from the Exception base class. | class InputStreamExhausted ( Exception ) : |
747 | and unpacked dictionary kwargs. call the function iri_to_uri with an argument redirect_to, substitute the result for the value under the 'Location' key of the self dictionary. | self [ 'Location' ] = iri_to_uri ( redirect_to ) |
748 | if size is not zero, | if size : |
749 | derive the class BaseModelForm from the BaseForm base class. | class BaseModelForm ( BaseForm ) : |
750 | while path is true, | while path : |
751 | define the method render with 4 arguments: self, name, value and attrs set to None. | def render ( self , name , value , attrs = None ) : |
752 | call the function shutil.rmtree with 2 arguments: path_to_remove and onerror set to rmtree_errorhandler. | shutil . rmtree ( path_to_remove , onerror = rmtree_errorhandler ) |
753 | if last element of pieces is true, | if pieces [ - 1 ] : |
754 | with an argument message for 'message', or if not message for 'message' and error.code for 'code' in error.code is true, if not, an empty string for 'code'. return errors. | return errors |
755 | substitute key for result.key. | result . key = key |
756 | call the field.rel.to._meta.get_field method with an field.rel.field_name argument, on the result call the method to_python, | obj_pk = field . rel . to . _meta . get_field ( field . rel . field_name ) . to_python ( field_value ) |
757 | call the BaseConverter function with BASE36_ALPHABET as argument, store the result in base36. | base36 = BaseConverter ( BASE36_ALPHABET ) |
758 | otherwise if token_string starts with COMMENT_TAG_START, | elif token_string . startswith ( COMMENT_TAG_START ) : |
759 | define the method render with an argument self. | def render ( self ) : |
760 | call the method LocaleRegexProvider.__init__ with arguments self and regex. | LocaleRegexProvider . __init__ ( self , regex ) |
761 | property decorator, | @ property |
762 | define the function exec with 3 arguments: _code_, _globs_ set to None and _locs_ set to None. | def exec_ ( _code_ , _globs_ = None , _locs_ = None ) : |
763 | call the method parser.delete_first_token. | parser . delete_first_token ( ) |
764 | call the function func with 2 arguments: unpacked list args and unpacked dictionary kwargs, | return mark_safe ( func ( * args , ** kwargs ) ) |
765 | raise an TypeError exception with an argument string 'other_dict must be a mapping (dictionary-like) object.'. | raise TypeError ( 'other_dict must be a mapping (dictionary-like) object.' ) |
766 | if memo is None, | if memo is None : |
767 | get the value under the value key of a dictionary with 6 entries: boolean True for '2', boolean True for boolean True, | return { '2' : True , True : True , 'True' : True , '3' : False , 'False' : False , False : False } . get ( value , None ) |
768 | for every field in unique_check, if field is contained in form.cleaned_data. create a generator that for every d in row_data, if d has an '_get_pk_val' attribute, | row_data = tuple ( d . _get_pk_val ( ) if hasattr ( d , '_get_pk_val' ) else d for d in row_data ) |
769 | return message. | return message |
770 | return result. | return result |
771 | if return value of the function connection.introspection.table_name_converter called with an arugment: model._meta.db_table is contained in table_names | if connection . introspection . table_name_converter ( model . _meta . db_table ) in table_names : |
772 | define the method __iter__ with an argument self. | def __iter__ ( self ) : |
773 | and unpacked dictionary kwargs. define the method clean with 2 arguments: self and value. | def clean ( self , value ) : |
774 | call the method setlistdefault from the base class of the class QueryDict, with arguments key and default_list, return the result. | return super ( QueryDict , self ) . setlistdefault ( key , default_list ) |
775 | if IOError, renamed to e, exception is caught, | except IOError as e : |
776 | if protocol is not equal to string 'both' and unpack_ipv4 is true, | if protocol != 'both' and unpack_ipv4 : |
777 | "to %s because it doesn't define __str__().", replace %s with string value of klass.__name__. substitute __str__ filed of klass for __unicode__ field of klass. | klass . __unicode__ = klass . __str__ |
778 | substitute hashlib.sha256 for digest. | digest = hashlib . sha256 |
779 | call the method self.add_fallback with an argument default_translation. | self . add_fallback ( default_translation ) |
780 | split first element of hextet into parts by ':', append them to new_ip. | new_ip = hextet [ 0 ] . split ( ':' ) |
781 | if not self._mutable, | if not self . _mutable : |
782 | substitute style_func for self.style_func. | self . style_func = style_func |
783 | for every app_name and model_list in return value of manifest.items function, | for app_name , model_list in manifest . items ( ) : |
784 | set old_method_name attribute of the base object to the result of the function wrapper called with an argument old_method. | setattr ( base , old_method_name , wrapper ( old_method ) ) |
785 | call the method field.widget.value_from_datadict with 3 arguments: self.data, self.files, prefixed_name, substitute the result for data_value. | data_value = field . widget . value_from_datadict ( self . data , self . files , prefixed_name ) |
786 | decrement t by integer 1, | t -= 1 |
787 | return an empty string, | return '' |
788 | if '.' is contained in words or '@' is contained in word or ':' is contained in word, | if '.' in word or '@' in word or ':' in word : |
789 | remove first element of result from self.keyOrder dictionary. | self . keyOrder . remove ( result [ 0 ] ) |
790 | open out_log file in append mode with buffering size of the input buffer, substitute the result for sys.stdout. | sys . stdout = open ( out_log , 'a' , buffering ) |
791 | append string 'max_digits and decimal_places have been guessed, as this database handles decimal fields as float' to field_notes. | field_notes . append ( 'max_digits and decimal_places have been guessed, as this ' 'database handles decimal fields as float' ) |
792 | divide since by seconds, store the floored result in count. | count = since // seconds |
793 | define the method H with an argument self. | def H ( self ) : |
794 | 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 ) : |
795 | error is an instance of ValidationError created with an argument error. | error = ValidationError ( error ) |
796 | substitute the result for connection. get the value under the 'table_name_filter' key of the options dictionary, substitute it for table_name_filter. | table_name_filter = options . get ( 'table_name_filter' ) |
797 | if incremental is true, | if not incremental : |
798 | try, | try : |
799 | if 'class' is contained in attrs, | if 'class' in attrs : |