Unnamed: 0
int64
0
10k
nl
stringlengths
3
2.42k
code
stringlengths
4
3.76k
5,700
decrement end by one.
end -= 1
5,701
do nothing.
pass
5,702
do nothing.
pass
5,703
if self.silent is true,
if self . silent :
5,704
if attribute '_client' of the self object is None,
if getattr ( self , '_client' , None ) is None :
5,705
self._populated is boolean True.
self . _populated = True
5,706
call the method migration.ancestry.index with an argument common_ancestor, increment the result by one,
migration . branch = migration . ancestry [ ( migration . ancestry . index ( common_ancestor ) + 1 ) : ]
5,707
call the method nodelist.render with an argument, an instance of Context class, use the result as an argument for the creation of,
return VerbatimNode ( nodelist . render ( Context ( ) ) )
5,708
from django.utils import six into default name space.
from django . utils import six
5,709
return self._encoding.
return self . _encoding
5,710
substitute self.html_name for name.
name = self . html_name
5,711
from django.template.base import Node, NodeList, Template, Context, Library, TemplateSyntaxError, VariableDoesNotExist,
from django . template . base import ( Node , NodeList , Template , Context , Library , TemplateSyntaxError , VariableDoesNotExist , InvalidTemplateLibrary , BLOCK_TAG_START , BLOCK_TAG_END , VARIABLE_TAG_START , VARIABLE_TAG_END , SINGLE_BRACE_START , SINGLE_BRACE_END , COMMENT_TAG_START , COMMENT_TAG_END , VARIABLE_ATTRIBUTE_SEPARATOR , get_library , token_kwargs , kwarg_re , render_value_in_context )
5,712
call the function _ with an argument string 'Ensure this value is less than or equal to %(limit_value)s.', substitute the result for message.
message = _ ( 'Ensure this value is less than or equal to %(limit_value)s.' )
5,713
join elements of c into a string, return it.
return '' . join ( c )
5,714
call the function settings.is_overridden with argument string 'ADMINS', if it evaluates to boolean True,
if settings . is_overridden ( 'ADMINS' ) :
5,715
call the function _create_cache with argument alias.
cache = _create_cache ( alias )
5,716
substitute func for self.func.
self . func = func
5,717
call the __init__ method with 3 arguments: DEBUG, unpacked list args and unpacked dictionary kwargs from the base class of Debug.
return super ( Debug , self ) . __init__ ( DEBUG , * args , ** kwargs )
5,718
call the method connections.all(), perform the following for every db in the result,
for db in connections . all ( ) :
5,719
property decorator,
@ property
5,720
if config dictionary value under 'version' key is not equal to integer 1,
if config [ 'version' ] != 1 :
5,721
append filename to the self.attachments list.
self . attachments . append ( filename )
5,722
define the function check_errors with argument fn.
def check_errors ( fn ) :
5,723
with the name of the type of the self class instance of the middleware_method, raise the ValueError with the previous as the argument. call the method self.apply_response_fixes with the request and response as the arguments, substitute the result for response.
response = self . apply_response_fixes ( request , response )
5,724
join into a string: md5 hash sum of force_bytes(key) and self.cache_suffix, compose root file path out of self._dir and previous result, return it.
return os . path . join ( self . _dir , '' . join ( [ hashlib . md5 ( force_bytes ( key ) ) . hexdigest ( ) , self . cache_suffix ] ) )
5,725
convert new_name to a string and append it to string 'number_', substitute the result for new_name.
new_name = 'number_%s' % new_name
5,726
write string "Cleaning up temporary files.\n" to self.stdout stream.
self . stdout . write ( "Cleaning up temporary files.\n" )
5,727
call the method self.make_key with key and version set to version as arguments, substitute it for key.
key = self . make_key ( key , version = version )
5,728
define the method exists with arguments self and name.
def exists ( self , name ) :
5,729
if first element of cwords equals a string 'runfcgi',
if cwords [ 0 ] == 'runfcgi' :
5,730
called with 2 arguments: s and string_only as boolean True. if categories is true,
if categories :
5,731
if not,
else :
5,732
convert value to an string and substitute it for value.
value = str ( value )
5,733
return boolean True.
return True
5,734
import module warnings.
import warnings
5,735
try,
try :
5,736
call the method self.xml.startElement with 2 arguments, string "django-objects" and a dictionary containing 1 element: "1.0" for "version".
self . xml . startElement ( "django-objects" , { "version" : "1.0" } )
5,737
from django.core.management.base import AppCommand into default name space.
from django . core . management . base import AppCommand
5,738
if meta is None,
if meta is None :
5,739
define the method __getitem__ with arguments self and index.
def __getitem__ ( self , index ) :
5,740
if not,
else :
5,741
define the function localtime with 2 arguments: value and timezone set to None.
def localtime ( value , timezone = None ) :
5,742
unpacked list exc_info. if self.include_html is true, call the method reporter.get_traceback_html and substitute the result for html_message,
html_message = reporter . get_traceback_html ( ) if self . include_html else None
5,743
return boolean True.
return True
5,744
if item is contained in the list of the elements of self, return boolean True, otherwise return boolean False.
return item in list ( self )
5,745
substitute settings.CACHE_MIDDLEWARE_SECONDS for cache_timeout.
cache_timeout = settings . CACHE_MIDDLEWARE_SECONDS
5,746
define the function autodiscover_modules with 2 arguments unpacked list args and unpacked dictionary kwargs.
def autodiscover_modules ( * args , ** kwargs ) :
5,747
get format_type attribute of the settings object, return it.
return getattr ( settings , format_type )
5,748
if resource_string is not None, is_usable is boolean True, otherwise is_usable is boolean False.
is_usable = resource_string is not None
5,749
call the cursor method on the value under the db key of connections dictionary, preform following with return value named cursor,
with connections [ db ] . cursor ( ) as cursor :
5,750
for every app in sorted return value of the commands_dict.keys function,
for app in sorted ( commands_dict . keys ( ) ) :
5,751
if ImportError exception is caught,
except ImportError :
5,752
call the method self.itervalues, return list of results.
return list ( self . itervalues ( ) )
5,753
bring intger 2 to integer 32, decrement the result by 1, multiply it with hlen, if dklen is greater than the previous result,
if dklen > ( 2 ** 32 - 1 ) * hlen :
5,754
raise an ValueError exception with an argument string "Base36 input too large".
raise ValueError ( "Base36 input too large" )
5,755
if ValueError, OverflowError or InvalidOperation exceptions are caught,
except ( ValueError , OverflowError , InvalidOperation ) :
5,756
for every role in termcolors.PALETTES list at the index termcolors.NOCOLOR_PALETTE,
for role in termcolors . PALETTES [ termcolors . NOCOLOR_PALETTE ] :
5,757
set attr.name attribute of the _MovedItemst object to attr.
setattr ( _MovedItems , attr . name , attr )
5,758
try,
try :
5,759
call the sign method from the base class of the TimestampSigner class with an argument value, return the result
return super ( TimestampSigner , self ) . sign ( value )
5,760
call the function lazy with arguments _get_val and six.text_type, substitute the result for _get_val.
_get_val = lazy ( _get_val , six . text_type )
5,761
if not,
else :
5,762
self.pos is integer 0.
self . pos = 0
5,763
if autoescape is true and value is not an instance of SafeData, autoescape is boolean True, otherwise it is boolean False.
autoescape = autoescape and not isinstance ( value , SafeData )
5,764
args is a list containing arg surrounded by double quotes for every arg in args.
args = [ '"%s"' % arg for arg in args ]
5,765
return value.
return value
5,766
from django.utils.six.moves import html_parser as _html_parse into default name space.
from django . utils . six . moves import html_parser as _html_parser
5,767
define the function phone2numeric with an argument phone.
def phone2numeric ( phone ) :
5,768
raise an ValueError exception with an argument string "Don't mix *args and **kwargs in call to reverse()!".
raise ValueError ( "Don't mix *args and **kwargs in call to reverse()!" )
5,769
use global variable template_source_loaders.
global template_source_loaders
5,770
substitute apps for the value under language_code key of the self._app_dict dictionary.
self . _app_dict [ language_code ] = apps
5,771
call the function runfastcgi with an argument all the elements, except the first from the sys.argv list.
runfastcgi ( sys . argv [ 1 : ] )
5,772
compile the regex "^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$", substitute it for host_validation_re.
host_validation_re = re . compile ( r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$" )
5,773
call the method connection.ops.start_transaction_sql, use the result as an argument for the call to the method self.style.SQL_KEYWORD,
self . stdout . write ( self . style . SQL_KEYWORD ( connection . ops . start_transaction_sql ( ) ) )
5,774
raise an CommandError with an argument string "errors happened while running msgmerge\n%s", where '%s' is replaced with errors.
raise CommandError ( "errors happened while running msgmerge\n%s" % errors )
5,775
where '%s' is replaced with taglib and e. return an instance of a LoadNode class.
return LoadNode ( )
5,776
TOTAL_FORM_COUNT is a string 'TOTAL_FORMS'.
TOTAL_FORM_COUNT = 'TOTAL_FORMS'
5,777
define the method incr with self class instance, key, delta set to integer 1 and version set to None, as arguments.
def incr ( self , key , delta = 1 , version = None ) :
5,778
call the _expire_info.setdefault method with name and empty dictionary as arguments, substitute the result for self_expire_info.
self . _expire_info = _expire_info . setdefault ( name , { } )
5,779
derive the class RemovedInDjango20Warning from PendingDeprecationWarning base class.
class RemovedInDjango20Warning ( PendingDeprecationWarning ) :
5,780
define function get_max_age with response as an argument.
def get_max_age ( response ) :
5,781
raise a CommandError exception with an argument:
raise CommandError ( "%s already exists, overlaying a " "project or app into an existing " "directory won't replace conflicting " "files" % new_path )
5,782
call the function validate_ipv4_address with an argument value.
validate_ipv4_address ( value )
5,783
decrement truncate_len by integer 1.
truncate_len -= 1
5,784
call the function middleware_class with 2 arguments: unpacked list m_args and unpacked dictionary m_kwargs,
middleware = middleware_class ( * m_args , ** m_kwargs )
5,785
where '%r' is replaced with first element of bits. options is an empty dictionary.
options = { }
5,786
define the method __init__ with 3 arguments: self, attrs set to None and choices set to an empty tuple.
def __init__ ( self , attrs = None , choices = ( ) ) :
5,787
call the method self.set_charset with utf8_charset as an argument.
self . set_charset ( utf8_charset )
5,788
compile a regex from raw string '^\[\s*(\w+)\s*\]\s*', substitute it for INDEX_PATTERN.
INDEX_PATTERN = re . compile ( r'^\[\s*(\w+)\s*\]\s*' )
5,789
import module signal.
import signal
5,790
substitute default for value under the key key of self dictionary.
self [ key ] = default
5,791
increment num_args by one.
num_args += 1
5,792
try,
try :
5,793
skip this loop execution.
continue
5,794
and format, call the method time on the result, return the result. derive the class DateTimeField from the base class BaseTemporalField class.
class DateTimeField ( BaseTemporalField ) :
5,795
from django.utils import six into default name space.
from django . utils import six
5,796
convert elements of error into a list, substitute the first element for message.
message = list ( error ) [ 0 ]
5,797
if file path top_dir doesnt exists,
if not os . path . exists ( top_dir ) :
5,798
call the method __init__ from the base class of the class TemplateIfParser, with 2 arguments: unpacked list args and unpacked dictionary.
super ( TemplateIfParser , self ) . __init__ ( * args , ** kwargs )
5,799
define the method __init__ with 3 arguments: self, attrs set to None and format is None.
def __init__ ( self , attrs = None , format = None ) :