Unnamed: 0
int64 0
10k
| nl
stringlengths 3
2.42k
| code
stringlengths 4
3.76k
|
---|---|---|
5,400 | params is a list with second element of source as a element. | params = [ source [ 1 ] ] |
5,401 | remove entry under the 'formfield_callback' key of the attrs dictionary, if it exists substitute if for formfield_callback, | formfield_callback = attrs . pop ( 'formfield_callback' , None ) |
5,402 | singular is an empty list. | singular = [ ] |
5,403 | substitute third element of row list for expires. | expires = row [ 2 ] |
5,404 | call the method os.path.abspath with an argument dirpath, join the result and dirname into a file path, inset it at the beggining of self.locale_paths. | self . locale_paths . insert ( 0 , os . path . join ( os . path . abspath ( dirpath ) , dirname ) ) |
5,405 | table2model with an argument table_name. call the function table2model with an argument table_name, append the result to known_models. | known_models . append ( table2model ( table_name ) ) |
5,406 | otherwise if name is not None and compile_function is not None, | elif name is not None and compile_function is not None : |
5,407 | return value. | return value |
5,408 | substitute value under idx key of dictionary d for d. | d = d [ idx ] |
5,409 | call the function original_urlencode with 2 arguments: list with 2 elements: result of the function force_str with an argument k, | return original_urlencode ( [ ( force_str ( k ) , [ force_str ( i ) for i in v ] if isinstance ( v , ( list , tuple ) ) else force_str ( v ) ) for k , v in query ] , doseq ) |
5,410 | split second element of hextet into parts by ':', append them to new_ip. | new_ip += hextet [ 1 ] . split ( ':' ) |
5,411 | append self.pointer to self.backout. | self . backout . append ( self . pointer ) |
5,412 | call the function escape with an argument output. | return escape ( output ) |
5,413 | replace hextets list from the best_doublecolon_start index to best_doublecolon_end index with an empty string. | hextets [ best_doublecolon_start : best_doublecolon_end ] = [ '' ] |
5,414 | from __future__ import unicode_literals into default name space. | from __future__ import unicode_literals |
5,415 | and unpacked dictionary kwargs. join into a string permitted_methods, separated by string ', ', substitute it for value under the 'Allow' key of the self dictionary. | self [ 'Allow' ] = ', ' . join ( permitted_methods ) |
5,416 | from django.utils import six into default name space. | from django . utils import six |
5,417 | define the function b64_decode with an argument s. | def b64_decode ( s ) : |
5,418 | if http_cookies.CookieError exception is caught, | except http_cookies . CookieError : |
5,419 | return nodelist. | return nodelist |
5,420 | define the method _get_closed with argument self. | def _get_closed ( self ) : |
5,421 | substitute self.closed for close. | close = self . closed |
5,422 | call the self._delete method with argument fname. | self . _delete ( fname ) |
5,423 | instantiate RelatedObject class with 3 arguments: cls.fk.rel.to, cls.model and cls.fk, | return RelatedObject ( cls . fk . rel . to , cls . model , cls . fk ) . get_accessor_name ( ) . replace ( '+' , '' ) |
5,424 | import module decimal. | import decimal |
5,425 | call the method self._is_expired with argument f, invert the boolean result and return it. | return not self . _is_expired ( f ) |
5,426 | call the method settings.configure. | settings . configure ( ) |
5,427 | use it and the re.I as the input arguments for function re.compile, put the result in the self.interesting. evaluate function tag.lower, without the arguments, put the result in the self.cdata_tag. | self . cdata_tag = tag . lower ( ) |
5,428 | substitute TemplateSyntaxError for error_class. | error_class = TemplateSyntaxError |
5,429 | define the method z with an argument self. | def z ( self ) : |
5,430 | substitute the result for final_attrs. call the method self.is_checked, if it evaluates to true, | if self . is_checked ( ) : |
5,431 | call the function format_html with 2 arguments: string '<ul class="errorlist">{0}</ul>', and return value of the function, | return format_html ( '<ul class="errorlist">{0}</ul>' , format_html_join ( '' , '<li>{0}{1}</li>' , ( ( k , force_text ( v ) ) for k , v in self . items ( ) ) ) ) |
5,432 | delete entry under the attr key of the attrs dictionary. | del attrs [ attr ] |
5,433 | if not, | else : |
5,434 | substitute val for self._encoding. | self . _encoding = val |
5,435 | try, | try : |
5,436 | substitute next_item for sublist_item. | sublist_item = next_item |
5,437 | post is a string '<could not parse>'. | post = '<could not parse>' |
5,438 | call the callback function with request and dictionary argument param_dict as the arguments, substitute it for response. | response = callback ( request , ** param_dict ) |
5,439 | raise a CommandError exception, with string "No migrations present for: %s" as argument, substitute '%s' in previous string with, | raise CommandError ( "No migrations present for: %s" % ( ", " . join ( invalid_apps ) ) ) |
5,440 | return None. | return None |
5,441 | join elements of parts into a string, separated with '.', substitute it for name. | name = '.' . join ( parts ) |
5,442 | call the method parser.add_argument with 3 arguments: string 'args', nargs set to argparse.REMAINDER and help as a string 'Various KEY=val options.' | parser . add_argument ( 'args' , nargs = argparse . REMAINDER , help = 'Various KEY=val options.' ) |
5,443 | return an empty list. | return [ ] |
5,444 | convert timeout into an integer. | timeout = int ( timeout ) |
5,445 | for value of dictionary response under the key 'Last-Modified'. if call to the function response.has_header with 'Expires' as argument returns boolean False, | if not response . has_header ( 'Expires' ) : |
5,446 | derive the class MultiWidget from the Widget base class. | class MultiWidget ( Widget ) : |
5,447 | add plan_node to the shown set. | shown . add ( plan_node ) |
5,448 | if value under the 'description' key of the item dictionary is not None, | if item [ 'description' ] is not None : |
5,449 | trimmed is boolean False. | trimmed = False |
5,450 | from django.apps import apps into default name space. | from django . apps import apps |
5,451 | if function form.has_changed evaluates to false, | if not form . has_changed ( ) : |
5,452 | raise an exception, | raise |
5,453 | if file object has an attribute 'mode', | if hasattr ( file , 'mode' ) : |
5,454 | call the function new_method_proxy with an argument operator.setitem, substitute the result for __setitem__. | __setitem__ = new_method_proxy ( operator . setitem ) |
5,455 | call the method self.regex.search with an argument path, substitute the result for match. | match = self . regex . search ( path ) |
5,456 | try, | try : |
5,457 | call the method timezone.make_naive with arguments: expires, timezone.utc, substitute the result for expires. | expires = timezone . make_naive ( expires , timezone . utc ) |
5,458 | called with an argument final_attrs, return the result. property decorator, | @ property |
5,459 | property decorator, | @ property |
5,460 | import module warnings. | import warnings |
5,461 | sites is an empty list. | sites = [ ] |
5,462 | call the method parser.invalid_block_tag with 3 arguments: endblock, 'endblock' and acceptable_endblocks. | parser . invalid_block_tag ( endblock , 'endblock' , acceptable_endblocks ) |
5,463 | extend self.program list with self.program_options, string '-o', | args = [ self . program ] + self . program_options + [ '-o' , npath ( base_path + '.mo' ) , npath ( base_path + '.po' ) ] |
5,464 | append f.name to exclude. | exclude . append ( f . name ) |
5,465 | substitute self for result.parent. | result . parent = self |
5,466 | set field interesting for this class instance to interesting_cdata from module _html_parser. | self . interesting = _html_parser . interesting_cdata |
5,467 | context_extras is an empty dictionary. | context_extras = { } |
5,468 | call the method self.empty_variable with an argument token, | self . empty_variable ( token ) |
5,469 | substitute self._options for client.behaviors. | client . behaviors = self . _options |
5,470 | return self.content | return self . content |
5,471 | if words is not empty and length is smaller than or equal to integer 0, | if words and length <= 0 : |
5,472 | raise an ValidationError with 2 arguments: value under the 'invalid_list' key of the self.error_messages dictionary and code set to 'invalid_list'. | raise ValidationError ( self . error_messages [ 'invalid_list' ] , code = 'invalid_list' ) |
5,473 | instantiate a class Group with 2 arguments: string "%%(%s)s" formated with param, and None, append it to result. | result . append ( Group ( ( ( "%%(%s)s" % param ) , None ) ) ) |
5,474 | call the function v with an argument value. | v ( value ) |
5,475 | yield string "# Feel free to rename the models, but don't rename db_table values or field names." as the result. | yield "# Feel free to rename the models, but don't rename db_table values or field names." |
5,476 | if not, | else : |
5,477 | define the method tag with an argument self. | def tag ( self ) : |
5,478 | if not, | else : |
5,479 | define the method render with 2 arguments: self and context. | def render ( self , context ) : |
5,480 | if i is greater than or equal to length of subject. | if i >= len ( subject ) : |
5,481 | define the method __init__ with arguments self and request defaulting to None. | def __init__ ( self , request = None ) : |
5,482 | call the method self._iteritems, for every k and v in the result, | for k , v in self . _iteritems ( ) : |
5,483 | call the function django.get_version, return the result. | return django . get_version ( ) |
5,484 | import module os. | import os |
5,485 | if mimetype is not None raise an error. | assert mimetype is None |
5,486 | call the function new_method_proxy with an argument operator.getitem, substitute the result for __getitem__. | __getitem__ = new_method_proxy ( operator . getitem ) |
5,487 | if self.argv, without the first element is contained in a tuple with 2 entries: a list containing a string '--help', | elif self . argv [ 1 : ] in ( [ '--help' ] , [ '-h' ] ) : |
5,488 | increment int_part_gd by thousand_sep. | int_part_gd += thousand_sep |
5,489 | raise an ValueError with an argument string "attempted relative import beyond top-level package". | raise ValueError ( "attempted relative import beyond top-level package" ) |
5,490 | call the method self.validate_name with arguments project_name and string "project". | self . validate_name ( project_name , "project" ) |
5,491 | i is integer 366. | i = 366 |
5,492 | and help as a string 'Specify the app label(s) to create migrations for.'. call the method parser.add_argument with 5 arguments: string '--dry-run', action as a string 'store_true', dest as string 'dry_run', | parser . add_argument ( '--dry-run' , action = 'store_true' , dest = 'dry_run' , default = False , help = "Just show what migrations would be made; don't actually write them." ) |
5,493 | call the method parser.add_option with an argument opt. | parser . add_option ( opt ) |
5,494 | raise an CommandError exception with an argument string, "Incompatible values of 'leave_locale_alone' " | raise CommandError ( "Incompatible values of 'leave_locale_alone' " "(%s) and 'can_import_settings' (%s) command " "options." % ( self . leave_locale_alone , self . can_import_settings ) ) |
5,495 | modified_code is None. | modified_code = None |
5,496 | and unpacked dictionary kwargs. python_2_unicode_compatible decorator, | @ python_2_unicode_compatible |
5,497 | otherwise, value under the 'max_digits' key of the field_params is integer 10. if sixth element of row is not None, substitute it for value under the 'decimal_places' key of the field_params, | field_params [ 'decimal_places' ] = row [ 5 ] if row [ 5 ] is not None else 5 |
5,498 | call the method notifier.stop. | notifier . stop ( ) |
5,499 | try, | try : |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.