Unnamed: 0
int64 0
10k
| nl
stringlengths 3
2.42k
| code
stringlengths 4
3.76k
|
---|---|---|
5,500 | convert value into an integer. | int ( value ) |
5,501 | define the method has_key with 3 arguments: self, key, and version set to None. | def has_key ( self , key , version = None ) : |
5,502 | define the function fget with 3 arguments: instance, instance_type set to None and name set to fget.__name__. | def fget ( instance , instance_type = None , name = fget . __name__ ) : |
5,503 | define the method _new_instance with 4 arguments: (cls, children set to None, connector set to None and negated set to boolean False. | def _new_instance ( cls , children = None , connector = None , negated = False ) : |
5,504 | find the last index of newline occurrence in self.__starttag_text, subtract it from total length of self.__starttag_text, | offset = ( len ( self . __starttag_text ) - self . __starttag_text . rfind ( "\n" ) ) |
5,505 | define the method write with 4 arguments: self, msg, style_func with None and ending set None. | def write ( self , msg , style_func = None , ending = None ) : |
5,506 | COMMENT_TAG_START is a string '{#'. | COMMENT_TAG_START = '{#' |
5,507 | must be 'as'", where '%s' is replaced with function_name. substitute last element of bits for target_var. | target_var = bits [ - 1 ] |
5,508 | define the method urlencode with 3 arguments: self and safe set to None. | def urlencode ( self , safe = None ) : |
5,509 | from __future__ import unicode_literals into default name space. | from __future__ import unicode_literals |
5,510 | if namespaces is true, | if namespaces : |
5,511 | get the value under formatter key of dictionary under 'formatters' key of self.config dictionary, substitute the result for formatter. | formatter = self . config [ 'formatters' ] [ formatter ] |
5,512 | call the method lookups.appendlist with 2 arguments: pattern.name and a tuple containing 3 elements: bits, p_pattern, | lookups . appendlist ( pattern . name , ( bits , p_pattern , pattern . default_args ) ) |
5,513 | get the value under the 'no_wrap' key of the options dictionary, if it is true, | if options . get ( 'no_wrap' ) : |
5,514 | define the method _get_media with an argument self. | def _get_media ( self ) : |
5,515 | from django.core.management.templates import TemplateCommand into default name space. | from django . core . management . templates import TemplateCommand |
5,516 | if self.require_all_fields is boolean true, | if self . require_all_fields : |
5,517 | required set to required, widget set to widget, label set to label, initial st to initial, help_text set to help_text, unpacked list args, unpacked dictionary kwargs. if self.required is true, | if self . required : |
5,518 | substitute node.source for e.django_template_source. | e . django_template_source = node . source |
5,519 | define the function npath with an argument path. | def npath ( path ) : |
5,520 | for every opening and closing in WRAPPING_PUNCTUATION, | for opening , closing in WRAPPING_PUNCTUATION : |
5,521 | substitute _templatetags_modules for templatetags_modules. | templatetags_modules = _templatetags_modules |
5,522 | and help set to string 'Nominates a database to synchronize. Defaults to the "default" database.'. define the method handle with 2 arguments: self and unpacked dictionary options. | def handle ( self , ** options ) : |
5,523 | return default. | return default |
5,524 | call the load method on the c class instance, with the cookie argument. | c . load ( cookie ) |
5,525 | self._cull_frequency is integer 3. | self . _cull_frequency = 3 |
5,526 | derive the class EntitiesForbidden from the DefusedXmlException base class. | class EntitiesForbidden ( DefusedXmlException ) : |
5,527 | substitute '%s' in a string "Migrations for '%s':" with app_label, append newline to it, | self . stdout . write ( self . style . MIGRATE_HEADING ( "Migrations for '%s':" % app_label ) + "\n" ) |
5,528 | output_transaction is boolean True. | output_transaction = True |
5,529 | do nothing. | pass |
5,530 | value is an instance of ConvertingDict class, created with an argument value. | value = ConvertingDict ( value ) |
5,531 | substitute code for self.code. | self . code = code |
5,532 | define the function get_language. | def get_language ( ) : |
5,533 | if TypeError exception is caught, | except TypeError : |
5,534 | call the function get_supported_language_variant with 2 arguments: lang_code and strict set to strict, return the result. | return get_supported_language_variant ( lang_code , strict = strict ) |
5,535 | if not, | else : |
5,536 | call the method o.isoformat, return the result. | return o . isoformat ( ) |
5,537 | try, | try : |
5,538 | daemonize is boolean True. | daemonize = True |
5,539 | call the method self.as_hidden with an argument only_initial set to boolean True, | return self . as_widget ( ) + self . as_hidden ( only_initial = True ) |
5,540 | call the method extend with refs as argument, on the result call the pending_references.setdefault method with refto and empty list as arguments. | pending_references . setdefault ( refto , [ ] ) . extend ( refs ) |
5,541 | if content is empty, substitute it for an empty string. | content = content or b'' |
5,542 | help is a string 'Discover and run tests in the specified modules or the current directory.'. | help = 'Discover and run tests in the specified modules or the current directory.' |
5,543 | append to errors list a dictionary created with 2 etries, if escape_html is true, return value of the function escape | errors . append ( { 'message' : escape ( message ) if escape_html else message , 'code' : error . code or '' , } ) |
5,544 | append child.data to the inner_text list. | inner_text . append ( child . data ) |
5,545 | import module traceback. | import traceback |
5,546 | define the method __init__ with 4 arguments: self, message, code set to None and params set to None. | def __init__ ( self , message , code = None , params = None ) : |
5,547 | if literal_match is true, | if literal_match : |
5,548 | from django.conf import settings into default name space. | from django . conf import settings |
5,549 | call the method date_value.strftime with an argument input_format, return the result. | return date_value . strftime ( input_format ) |
5,550 | if not, | else : |
5,551 | if self has an attribute 'error_dict', | if hasattr ( self , 'error_dict' ) : |
5,552 | return usage. | return usage |
5,553 | append '-' to generic_lang_code, if supported_code starts with it, | if supported_code . startswith ( generic_lang_code + '-' ) : |
5,554 | define the method save with arguments self, name and content. | def save ( self , name , content ) : |
5,555 | return an string "<IfNode>". | return "<IfNode>" |
5,556 | confirm is a string 'yes'. | confirm = 'yes' |
5,557 | define the method getvalue with an argument self. | def getvalue ( self ) : |
5,558 | for every chunk in return value of the method self.chunks, | for chunk in self . chunks ( ) : |
5,559 | substitute model._default_manager for objects. | objects = model . _default_manager |
5,560 | get the value under the 'id' key of the self.attrs dictionary, substitute it for id_ if the key exists, if not id_ is None. | id_ = self . attrs . get ( 'id' , None ) |
5,561 | if current_len equals truncate_len, | if current_len == truncate_len : |
5,562 | return other_dict. | return other_dict |
5,563 | call the self.convert method with s, self.decimal, self.decimal_digits and self.sign as arguments, assign the result to the neg and value, respectively. | neg , value = self . convert ( s , self . digits , self . decimal_digits , self . sign ) |
5,564 | decrement self.waiting_writers by integer 1, | self . waiting_writers -= 1 |
5,565 | char2number is an dictionary, with 26 elements: 2 for 'a', 2 for 'b', 2 for 'c', 3 for 'd', 3 for 'e', 3 for 'f', 4 for 'g', | char2number = { 'a' : '2' , 'b' : '2' , 'c' : '2' , 'd' : '3' , 'e' : '3' , 'f' : '3' , 'g' : '4' , 'h' : '4' , 'i' : '4' , 'j' : '5' , 'k' : '5' , 'l' : '5' , 'm' : '6' , 'n' : '6' , 'o' : '6' , 'p' : '7' , 'q' : '7' , 'r' : '7' , 's' : '7' , 't' : '8' , 'u' : '8' , 'v' : '8' , 'w' : '9' , 'x' : '9' , 'y' : '9' , 'z' : '9' } |
5,566 | call the method n.getElementsByTagName with string 'natural' as argument, substitute result for keys. | keys = n . getElementsByTagName ( 'natural' ) |
5,567 | delete _urlconfs.value. | del _urlconfs . value |
5,568 | if both cursor and close_connection are true, | if cursor and close_connection : |
5,569 | if filename path doesnt exists, | if not os . path . exists ( filename ) : |
5,570 | from django.template import Template and Context into default name space. | from django . template import Template , Context |
5,571 | call the method self.add_fields with arguments form and i). | self . add_fields ( form , i ) |
5,572 | if not, | else : |
5,573 | call the method HTMLParser.__init__ with 2 arguments: self and strict set to boolean False. | HTMLParser . __init__ ( self , strict = False ) |
5,574 | if submod is true and return value of the function module_has_submodule called with 2 arguments: result of the function: | if submod and not module_has_submodule ( import_module ( parentmod ) , submod ) : |
5,575 | try, | try : |
5,576 | and _, respectively. if file_ is true, | if file_ : |
5,577 | BASE16_ALPHABET is a string '0123456789ABCDEF'. | BASE16_ALPHABET = '0123456789ABCDEF' |
5,578 | from django.conf import settings object to the default name space. | from django . conf import settings |
5,579 | define the messages with an argument self. | def messages ( self ) : |
5,580 | derive the class HttpResponsePermanentRedirect from the HttpResponseRedirectBase base class. | class HttpResponsePermanentRedirect ( HttpResponseRedirectBase ) : |
5,581 | try, | try : |
5,582 | if os.path.exists function with argument name, evaluates to boolean True, | if os . path . exists ( name ) : |
5,583 | raise an BadHeaderError exception with an argument string "Header values can't contain newlines (got %r)", where '%r' is replaced with value. | raise BadHeaderError ( "Header values can't contain newlines (got %r)" % value ) |
5,584 | define the method __ne__ with an argument self. | def __ne__ ( self , other ) : |
5,585 | call the function call_command with 2 arguments: string migrate and unpacked dictionary options. | call_command ( "migrate" , ** options ) |
5,586 | define the method timestamp with an argument self. | def timestamp ( self ) : |
5,587 | if not, | else : |
5,588 | if PY3 field of six is boolean True, | if six . PY3 : |
5,589 | remove element under 'stream' key of kwargs dictionary, substitute the result for value under 'strm' key of kwargs dictionary. | kwargs [ 'strm' ] = kwargs . pop ( 'stream' ) |
5,590 | value under the all_label key of the directory_created dictionary is boolean True. | directory_created [ app_label ] = True |
5,591 | map elements of value through mapping function force_text, substitute the result for value. | value = map ( force_text , value ) |
5,592 | call the method self.create_parser with first and second element of argv, substitute the result for parser. | parser = self . create_parser ( argv [ 0 ] , argv [ 1 ] ) |
5,593 | return an instance of DebugNodeList class. | return DebugNodeList ( ) |
5,594 | substitute empty for self._wrapped. | self . _wrapped = empty |
5,595 | return kwargs. | return kwargs |
5,596 | i is integer 0. | i = 0 |
5,597 | return nothing. | return |
5,598 | raise an TypeError exception with an argument: result of the method illegal_formatting.group called with an argument, | raise TypeError ( "strftime of dates before 1900 does not handle" + illegal_formatting . group ( 0 ) ) |
5,599 | use global variable invalid_var_format_string. | global invalid_var_format_string |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.