input stringlengths 0 929 | output stringlengths 0 10.3k | task stringclasses 3 values | index int64 0 5.38k | liscence stringclasses 4 values | source stringclasses 15 values | instruction stringlengths 13 3.45k |
|---|---|---|---|---|---|---|
"str"
from flask import Flask
from flask_mako import MakoTemplates
app = Flask ( __name__ )
mako = MakoTemplates ( app )
| このpythonコードに誤りはありません。 | code_fix | 3,700 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class PosPriceListConfig ( models . Model ) :
_inherit = "str"
display_price_with_taxes = fields . Boolean (
string = "str" ,
help = "str"
)
| このpythonコードに誤りはありません。 | code_fix | 3,701 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class ButtonController ( object ) :
def __init__ ( self , button_data ) :
self . buttons = { }
self . last_button = None
for button in button_data :
self . buttons [ button [ 0 ] ] = Button ( self , button [ 0 ] , button [ 1 ] , button [ 2 ] )
while ( True ) :
for button in self . buttons . values ( ) :
button . update_state ( )
| このpythonコードに誤りはありません。 | code_fix | 3,702 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def allowed ( self , request , instance ) :
if not HORIZON_CONFIG [ "str" ] :
return False
return not is_deleting ( instance )
| このpythonコードに誤りはありません。 | code_fix | 3,703 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class ScanType ( models . Model ) :
title = models . CharField ( max_length = 150 , blank = False , null = False )
def __unicode__ ( self ) :
return self . title
| このpythonコードに誤りはありません。 | code_fix | 3,704 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import unicode_literals
import os
import yaml
from collections import defaultdict
from django . conf import settings
from django . core . cache import cache
from t2f import UserTypes
PERMISSION_MATRIX_CACHE_KEY = "str"
| このpythonコードに誤りはありません。 | code_fix | 3,705 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def led ( self , freq , msg_period = False ) :
if freq <= 0 :
cmd = "str"
else :
cmd = "str" % ( int ( 1000000 / freq ) ,
int ( 500000 / freq ) , int ( 500000 / freq ) )
self . send ( "str" , cmd , msg_period )
| このpythonコードに誤りはありません。 | code_fix | 3,706 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def build_ui ( ) :
local ( "str" )
with lcd ( "str" ) :
local ( "str" )
local ( "str" )
with lcd ( "str" ) :
local ( "str" )
local ( "str" )
local ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,707 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import absolute_import , unicode_literals
from . import __version__
from . import Journal
from . import util
from . EncryptedJournal import EncryptedJournal
import sys
import os
| このpythonコードに誤りはありません。 | code_fix | 3,708 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . conf . urls import url , patterns
urlpatterns = patterns ( "str" ,
( "str" , "str" ) ,
( "str" , "str" ) ,
( "str" , "str" ) ,
)
| このpythonコードに誤りはありません。 | code_fix | 3,709 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import unittest
from androguard . misc import AnalyzeDex
import sys
PATH_INSTALL = "str"
sys . path . append ( PATH_INSTALL )
| このpythonコードに誤りはありません。 | code_fix | 3,710 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def user_data ( self , access_token , * args , ** kwargs ) :
"str"
return self . get_json ( self . USER_DETAILS_URL , params = {
"str" : access_token
} )
| このpythonコードに誤りはありません。 | code_fix | 3,711 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
import logging
import textwrap
import os . path
import os
import sys
from datetime import datetime , timedelta
from pprint import pprint
import json
import requests
from cifsdk . client import Client
import yaml
LOG_FORMAT = "str"
DEFAULT_CONFIG = "str"
LIMIT = 10000000
APWG_DATE_FORMAT = "str"
CIF_DATE_FORMAT = "str"
APWG_REMOTE = os . getenv ( "str" )
APWG_TOKEN = os . getenv ( "str" )
TLP = "str"
CONFIDENCE = 85
| このpythonコードに誤りはありません。 | code_fix | 3,712 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import sys
from syrup import app
if sys . platform == "str" :
from multiprocessing import freeze_support
freeze_support ( )
app . main ( sys . argv )
| このpythonコードに誤りはありません。 | code_fix | 3,713 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import absolute_import
from __future__ import unicode_literals
import argparse
from . . import api , utils
from . . command import Command , CMD_SUCCESS , HELP_LIST
from . . exceptions import InvalidDateError , NotFoundError , WrappedValueError
| このpythonコードに誤りはありません。 | code_fix | 3,714 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class TestListForwardingAddressesResponse ( unittest . TestCase ) :
"str"
def setUp ( self ) :
pass
def tearDown ( self ) :
pass
def testListForwardingAddressesResponse ( self ) :
"str"
model = gmail_client . models . list_forwarding_addresses_response . ListForwardingAddressesResponse ( )
| このpythonコードに誤りはありません。 | code_fix | 3,715 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def RemoveHost ( ) :
screen = RemoveHostConfigScreen ( )
screen . start ( )
| このpythonコードに誤りはありません。 | code_fix | 3,716 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def defineCharacteristicsFromScript ( self ) :
lines = self . script . split ( "str" )
self . name = "str"
self . group = "str"
self . parseDescription ( iter ( lines ) )
| このpythonコードに誤りはありません。 | code_fix | 3,717 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class TestGlobal ( unittest . TestCase ) :
def test_global_solution ( self ) :
from dolo import yaml_import , time_iteration
filename = "str"
model = yaml_import ( filename )
import time
t1 = time . time ( )
dr = time_iteration ( model , pert_order = 1 , maxit = 5 , verbose = True )
| このpythonコードに誤りはありません。 | code_fix | 3,718 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def clean ( self ) :
cleaned_data = super ( CustomerForm , self ) . clean ( )
tax_code = cleaned_data . get ( "str" )
vat_code = cleaned_data . get ( "str" )
if tax_code and vat_code :
raise forms . ValidationError ( _ ( "str" ) )
elif not tax_code and not vat_code :
raise forms . ValidationError ( _ ( "str" ) )
return cleaned_data
| このpythonコードに誤りはありません。 | code_fix | 3,719 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from mfr . core import FileHandler , get_file_extension
from . render import render_html
EXTENSIONS = [
"str" ,
]
| このpythonコードに誤りはありません。 | code_fix | 3,720 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def GetLocation ( query ) :
if type ( query ) == str and os . path . isfile ( query ) :
input = open ( query , "str" ) ;
locations = input . readlines ( ) ;
input . close ( ) ;
return GetCoords ( locations ) ;
if type ( query ) == list :
return GetCoords ( query ) ;
print ( "str" )
return False ;
| このpythonコードに誤りはありません。 | code_fix | 3,721 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import os
import sys
from setuptools import setup
import pyqtcss
__author__ = "str"
| このpythonコードに誤りはありません。 | code_fix | 3,722 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def int2ip ( number ) :
try :
if number == 0 :
return "str"
ip = socket . inet_ntoa ( struct . pack ( "str" , number ) )
except :
ip = "str"
return ip
| このpythonコードに誤りはありません。 | code_fix | 3,723 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
from sage . combinat . integer_lists . invlex import IntegerListsLex
from sage . combinat . words . morphism import WordMorphism
from sage . combinat . words . words import FiniteWords
import itertools
| このpythonコードに誤りはありません。 | code_fix | 3,724 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import unicode_literals
import frappe
from frappe . utils import cint , cstr , flt , nowdate , comma_and
from frappe import msgprint , _
from frappe . model . document import Document
| このpythonコードに誤りはありません。 | code_fix | 3,725 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __repr__ ( self ) :
representation = "str" + self . name + "str"
if ( self . type == self . NO_MAN_ENTRY ) :
representation += "str"
elif ( self . type == self . NOT_FOUND ) :
representation += "str"
elif ( self . type == self . UNIMPLEMENTED ) :
representation += "str"
else :
representation += repr ( self . definition )
return representation
| このpythonコードに誤りはありません。 | code_fix | 3,726 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class ContextNameImpl :
@ classmethod
def get ( cls , ) :
print ( "str" )
if be . Context :
return be . Context
else :
raise KeyError ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,727 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Countries_Sierra_leone ( ) :
"str"
def open ( self , plugin , menu ) :
menu . add_xplugins ( plugin . get_xplugins ( dictionaries = [ "str" ,
"str" , "str" , "str" , "str" , "str" ] ,
countries = [ "str" ] ) )
| このpythonコードに誤りはありません。 | code_fix | 3,728 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def clean_photo ( self ) :
"str"
photo = self . cleaned_data . get ( "str" , False )
if photo :
photo . name = "str" % ( self . user . username ,
photo . name . split ( "str" ) [ - 1 ] )
if self . instance . photo :
default_storage . delete ( self . instance . photo . path )
return self . cleaned_data [ "str" ]
| このpythonコードに誤りはありません。 | code_fix | 3,729 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def meets_requirement ( exp_int , job_desc ) :
if exp_int >= experience_requirement ( job_desc ) :
return True
else :
return False
| このpythonコードに誤りはありません。 | code_fix | 3,730 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_create_role_w_invalid_volumes_allocate_size ( self ) :
self . role_data [ "str" ] [ 0 ] [ "str" ] = "str"
resp = self . env . create_role (
self . release . id , self . role_data , expect_errors = True )
self . assertEqual ( 400 , resp . status_code )
self . assertIn ( "str" , resp . body )
self . assertIn ( "str" , resp . body )
| このpythonコードに誤りはありません。 | code_fix | 3,731 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . contrib import admin
from tinder . models import WebHead , MasterMap
admin . site . register ( WebHead )
admin . site . register ( MasterMap )
| このpythonコードに誤りはありません。 | code_fix | 3,732 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class GettingSomeMoney ( Story ) :
"str"
output = output_filename
colored = False
| このpythonコードに誤りはありません。 | code_fix | 3,733 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def init ( self , userfacade ) :
self . userfacade = userfacade
self . userfacade . init ( )
| このpythonコードに誤りはありません。 | code_fix | 3,734 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class CooperativelyManagedOAuth2Mixin ( OAuth2 ) :
"str"
def __init__ ( self , retrieve_tokens = None , * args , ** kwargs ) :
"str"
self . _retrieve_tokens = retrieve_tokens
super ( CooperativelyManagedOAuth2Mixin , self ) . __init__ ( * args , ** kwargs )
def _get_tokens ( self ) :
"str"
return self . _retrieve_tokens ( )
| このpythonコードに誤りはありません。 | code_fix | 3,735 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def writeEmptySetup ( self , * path ) :
"str"
outdir = self . basedir . descendant ( path )
outdir . makedirs ( )
outdir . child ( "str" ) . setContent ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,736 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __init__ ( self ) :
"str"
self . validators = [ self . isA , self . hasReqAttrs , self . hasFTSJobFiles ]
| このpythonコードに誤りはありません。 | code_fix | 3,737 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
from scapy . all import sr1 , conf , IP , IPv6 , UDP , log_runtime
from scapy_pcp import PCP
import re
import argparse
import random
import scapy . supersocket
| このpythonコードに誤りはありません。 | code_fix | 3,738 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from redis import Redis
from rq import Queue
from rq . registry import FinishedJobRegistry
from videogen import videogen
import time
redis_conn = Redis ( port = 5001 )
videoq = Queue ( "str" , connection = redis_conn )
fin_registry = FinishedJobRegistry ( connection = redis_conn , name = "str" )
jobid = 1024
job = videoq . enqueue ( videogen , jobid )
while not job . is_finished :
time . sleep ( 2 )
print ( job . result )
| このpythonコードに誤りはありません。 | code_fix | 3,739 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_get_station ( self ) :
station = utils . get_station ( "str" )
self . assertIsNotNone ( station )
self . assertEqual ( "str" , station [ "str" ] )
| このpythonコードに誤りはありません。 | code_fix | 3,740 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class DeactivateMFADevice ( IAMRequest ) :
DESCRIPTION = "str"
ARGS = [ arg_user (
help = "str" ) ,
Arg ( "str" , "str" , dest = "str" , metavar = "str" ,
required = True , help = "str" ) ,
AS_ACCOUNT ]
| このpythonコードに誤りはありません。 | code_fix | 3,741 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_document ( name ) :
name = urllib . unquote_plus ( name )
name = name . title ( )
response . content_type = "str"
entity = db [ "str" ] . find ( { "str" : name } , { "str" : 0 } )
if not entity :
abort ( 404 , "str" % name )
entries = [ entry for entry in entity ]
return MongoEncoder ( ) . encode ( entries )
| このpythonコードに誤りはありません。 | code_fix | 3,742 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def jar_compare ( old_jar_files , new_jar_files ) :
if not len ( old_jar_files ) == len ( new_jar_files ) :
print ( "str" + str ( len ( old_jar_files ) ) + "str" + str ( len ( new_jar_files ) ) )
return 1
for old_file in old_jar_files :
new_file = old_file . replace ( "str" , "str" )
if not subprocess . call ( [ "str" , old_file , new_file ] ) == 0 :
print ( "str" + new_file )
return 1
print ( "str" )
return 0
| このpythonコードに誤りはありません。 | code_fix | 3,743 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test ( ) :
fn = "str"
sentences = Dataset . read_from_file ( fn )
| このpythonコードに誤りはありません。 | code_fix | 3,744 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Blog ( models . Model ) :
title = models . CharField ( max_length = 200 , db_index = True )
def __unicode__ ( self ) :
return "str" % self . title
| このpythonコードに誤りはありません。 | code_fix | 3,745 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class QSR_QTC_C_Simplified ( QSR_QTC_Simplified_Abstractclass ) :
"str"
def __init__ ( self ) :
"str"
super ( QSR_QTC_C_Simplified , self ) . __init__ ( )
self . _unique_id = "str"
"str"
self . qtc_type = "str"
"str"
self . _all_possible_relations = tuple ( self . return_all_possible_state_combinations ( ) [ 0 ] )
"str"
def qtc_to_output_format ( self , qtc ) :
"str"
return self . _format_qsr ( self . create_qtc_string ( qtc ) )
| このpythonコードに誤りはありません。 | code_fix | 3,746 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import splicetestlib
from splicetestlib . splice_testcase import *
import nose
import datetime
| このpythonコードに誤りはありません。 | code_fix | 3,747 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import time , copy , types
from DIRAC import S_OK , S_ERROR , gLogger
from DIRAC . AccountingSystem . private . DBUtils import DBUtils
from DIRAC . AccountingSystem . private . DataCache import gDataCache
from DIRAC . Core . Utilities import Time
from DIRAC . AccountingSystem . private . Plots import generateNoDataPlot , generateTimedStackedBarPlot , generateQualityPlot , generateCumulativePlot , generatePiePlot , generateStackedLinePlot
| このpythonコードに誤りはありません。 | code_fix | 3,748 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_list_filters_default ( self ) :
try :
out = StringIO ( )
sys . stdout = out
self . action . list_filters ( )
info = out . getvalue ( )
decoded_info = info
assert "str" in info
assert "str" in info
assert "str" in info
finally :
sys . stdout = sys . __stdout__
| このpythonコードに誤りはありません。 | code_fix | 3,749 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _team_sends_notification ( team , notification_setting_name ) :
from teams . models import Setting
return not team . settings . filter ( key = Setting . KEY_IDS [ notification_setting_name ] ) . exists ( )
| このpythonコードに誤りはありません。 | code_fix | 3,750 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class device :
port = None
portname = None
baudrate = 9600
| このpythonコードに誤りはありません。 | code_fix | 3,751 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def CreateDirectory ( Directory ) :
if not os . access ( Directory , os . F_OK ) :
os . makedirs ( Directory )
| このpythonコードに誤りはありません。 | code_fix | 3,752 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . conf import settings as django_settings
from askbot . conf import settings as askbot_settings
from django . utils import translation
| このpythonコードに誤りはありません。 | code_fix | 3,753 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _remove_exact ( self , needle , keep_field ) :
"str"
for i , param in enumerate ( self . params ) :
if param is needle :
if keep_field :
self . _blank_param_value ( param . value )
else :
self . _fix_dependendent_params ( i )
self . params . pop ( i )
return
raise ValueError ( needle )
| このpythonコードに誤りはありません。 | code_fix | 3,754 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_top_comics ( ) :
comics = cache . get ( "str" )
if comics is None :
comics = Comic . objects . filter ( active = True ) . order_by (
"str" , "str" ) [ : settings . COMICS_MAX_IN_TOP_LIST ]
cache . set ( "str" , list ( comics ) )
return comics
| このpythonコードに誤りはありません。 | code_fix | 3,755 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class StaticFilesPrefixNode ( template . Node ) :
def __init__ ( self , varname = None ) :
self . varname = varname
def render ( self , context ) :
try :
from django . conf import settings
except ImportError :
prefix = "str"
else :
prefix = iri_to_uri ( settings . STATICFILES_URL )
if self . varname is None :
return prefix
context [ self . varname ] = prefix
return "str"
| このpythonコードに誤りはありません。 | code_fix | 3,756 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def glInitTextureEnvCombineARB ( ) :
"str"
return extensions . hasGLExtension ( EXTENSION_NAME )
| このpythonコードに誤りはありません。 | code_fix | 3,757 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_attach_mongoid_successfully ( self ) :
obj = self . TestObj ( _id = "str" )
self . assertEqual ( obj . _id , "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,758 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def checkconfig ( ) :
"str"
out = _run ( "str" , output = True )
if out :
return out . replace ( "str" , "str" ) . replace ( "str" , "str" ) . replace ( "str" , "str" ) . replace ( "str" , "str" ) . replace ( "str" , "str" ) . replace ( "str" , "str" ) . split ( "str" )
return out
| このpythonコードに誤りはありません。 | code_fix | 3,759 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class PBXLibraryTarget ( PBX_Base_Target ) :
def __init__ ( self , lookup_func , dictionary , project , identifier ) :
super ( PBXLibraryTarget , self ) . __init__ ( lookup_func , dictionary , project , identifier ) ;
if kPBX_TARGET_passBuildSettingsInEnvironment in dictionary . keys ( ) :
self . passBuildSettingsInEnvironment = dictionary [ kPBX_TARGET_passBuildSettingsInEnvironment ] ;
if kPBX_TARGET_buildArgumentsString in dictionary . keys ( ) :
self . buildArgumentsString = dictionary [ kPBX_TARGET_buildArgumentsString ] ;
if kPBX_TARGET_buildToolPath in dictionary . keys ( ) :
self . buildToolPath = dictionary [ kPBX_TARGET_buildToolPath ] ;
| このpythonコードに誤りはありません。 | code_fix | 3,760 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from google . appengine . ext . webapp import template
from google . appengine . ext . webapp . util import run_wsgi_app
import logging
import os
import random
import ee_assets
import webapp2
import json
import cache
if "str" in os . environ :
PROD = not os . environ [ "str" ] . startswith ( "str" )
else :
PROD = True
| このpythonコードに誤りはありません。 | code_fix | 3,761 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import requests
r = requests . get ( "str" )
print ( r . status_code )
print ( r . headers )
print ( r . text )
print ( r . cookies )
| このpythonコードに誤りはありません。 | code_fix | 3,762 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def set_background_color ( color : Color ) :
"str"
gl . glClearColor ( color [ 0 ] / 255 , color [ 1 ] / 255 , color [ 2 ] / 255 , 1 )
| このpythonコードに誤りはありません。 | code_fix | 3,763 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class OrderedProcessingInstruction ( ProcessingInstruction ) :
def __init__ ( self , key , attrs ) :
super ( OrderedProcessingInstruction , self ) . __init__ ( key )
self . attrs = OrderedDict ( attrs )
| このpythonコードに誤りはありません。 | code_fix | 3,764 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class WebsiteUser ( HttpLocust ) :
task_set = UserBehavior
min_wait = 5000
max_wait = 9000
| このpythonコードに誤りはありません。 | code_fix | 3,765 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def create_file ( filename , data ) :
"str"
path = "str" . format ( BUCKET_NAME , filename )
write_retry_params = gcs . RetryParams ( backoff_factor = 1.1 )
gcs_file = gcs . open ( path ,
"str" ,
options = { "str" : "str" } ,
content_type = "str" ,
retry_params = write_retry_params )
gcs_file . write ( data )
gcs_file . close ( )
if DEBUG :
return "str" + path
return "str" + path
| このpythonコードに誤りはありません。 | code_fix | 3,766 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import subprocess
import sys
( sdk , ) = sys . argv [ 1 : ]
print ( subprocess . check_output ( [ "str" , "str" , sdk , "str" ] ) )
| このpythonコードに誤りはありません。 | code_fix | 3,767 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_delete ( self ) :
volume_id = fake . VOLUME_ID
self . _create_backup_db_entry ( volume_id = volume_id )
service = nfs . NFSBackupDriver ( self . ctxt )
backup = objects . Backup . get_by_id ( self . ctxt , fake . BACKUP_ID )
service . delete ( backup )
| このpythonコードに誤りはありません。 | code_fix | 3,768 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_get_address ( ) :
get_address ( address_id , api_key_id = api_key_id ,
http_adapter = http_adapter ) . should . equal ( address )
| このpythonコードに誤りはありません。 | code_fix | 3,769 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class SocketFile ( ) :
def __init__ ( self , sock ) :
self . _sock = sock
def read ( self , num_bytes ) :
return self . _sock . recv ( num_bytes )
def write ( self , data ) :
if isinstance ( data , str ) :
raise Exception ( )
self . _sock . send ( data )
def fileno ( self ) :
return self . _sock . fileno ( )
def flush ( self ) :
pass
| このpythonコードに誤りはありません。 | code_fix | 3,770 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_columns ( self ) :
assert serializer . loads ( serializer . dumps ( users . c . name , - 1 ) ,
users . metadata , Session ) is users . c . name
| このpythonコードに誤りはありません。 | code_fix | 3,771 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_http_port ( ) :
"str"
return 8080
| このpythonコードに誤りはありません。 | code_fix | 3,772 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_add_files_over_quota ( self ) :
res = create_resource ( resource_type = "str" ,
owner = self . user ,
title = "str" ,
metadata = [ ] , )
uquota = self . user . quotas . first ( )
uquota . used_value = uquota . allocated_value * 1.3
add_resource_files ( res . short_id , self . myfile1 , self . myfile2 , self . myfile3 )
self . assertRaises ( QuotaException )
res . delete ( )
| このpythonコードに誤りはありません。 | code_fix | 3,773 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from random import random
from pandac . PandaModules import CardMaker , Point3
from direct . fsm . FSM import FSM
from direct . interval . IntervalGlobal import Sequence , LerpPosInterval
from objects . bullet import Bullet
| このpythonコードに誤りはありません。 | code_fix | 3,774 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class DdlstorageCom ( XFileSharingPro ) :
__name__ = "str"
__type__ = "str"
__pattern__ = "str"
__version__ = "str"
__description__ = "str"
__author_name__ = ( "str" , "str" )
__author_mail__ = ( "str" , "str" )
FILE_INFO_PATTERN = "str"
HOSTER_NAME = "str"
| このpythonコードに誤りはありません。 | code_fix | 3,775 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Solution :
def convert ( self , s , nRows ) :
if nRows == 1 :
return s
result = [ "str" ] * nRows
index = 0
step = 1
for i in xrange ( len ( s ) ) :
result [ index ] += s [ i ]
if index == nRows - 1 :
step = - 1
if index == 0 :
step = 1
index += step
return "str" . join ( result )
| このpythonコードに誤りはありません。 | code_fix | 3,776 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def show_report ( self , out ) :
locale . setlocale ( locale . LC_ALL , "str" )
t = _ss . total_count ( )
out . write ( "str" %
( os . path . basename ( sys . argv [ 0 ] ) ,
locale . format ( "str" , t , grouping = True ) ,
locale . format ( "str" , len ( ss ) , grouping = True ) ,
len ( ss ) * 100. / t if t > 0 else 0 ) )
| このpythonコードに誤りはありません。 | code_fix | 3,777 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_get_transport_url_no_caching ( self ) :
t1 = messaging . get_transport ( "str" , cache = False )
t2 = messaging . get_transport ( "str" , cache = False )
self . assertNotEqual ( t1 , t2 )
| このpythonコードに誤りはありません。 | code_fix | 3,778 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __init__ ( self , id , namespace_args , ** kwargs ) :
self . _namespace = "str"
self . _category = "str"
self . namespace = id
self . _client = None
| このpythonコードに誤りはありません。 | code_fix | 3,779 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def organization_move ( request ) :
info = OrganizationInfo ( )
return move ( request , Organization , OrganizationMoveForm ,
"str" ,
extra_context = info . template_context )
| このpythonコードに誤りはありません。 | code_fix | 3,780 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_startup ( self ) :
d = 4
prior = { "str" : 10 ** 1 , "str" : np . eye ( d ) * 10. ** 2 }
param = { "str" : 4 }
self . d = d
self . dist = self . Wishart ( prior = prior , param = param )
| このpythonコードに誤りはありません。 | code_fix | 3,781 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def check_redirect_location ( resp , loc ) :
"str"
assert resp . _status_code == 302
if isinstance ( loc , six . string_types ) :
assert resp . headers [ "str" ] == loc
elif isfunction ( loc ) :
assert loc ( resp . headers [ "str" ] )
| このpythonコードに誤りはありません。 | code_fix | 3,782 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def run_diff_once ( ) :
f1 = "str"
f2 = "str"
subprocess . call ( [ "str" , "str" , f1 , f2 ] )
| このpythonコードに誤りはありません。 | code_fix | 3,783 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from nltk . corpus import wordnet
import re
from . pos_tagger import POS_tag_cleaner
| このpythonコードに誤りはありません。 | code_fix | 3,784 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class PDFPageParseTest ( TestCase ) :
def test_parse_page ( self ) :
import slate3k as slate
pdf = "str"
with open ( pdf , "str" ) as f :
doc = slate . PDF ( f )
for page in doc [ : 2 ] :
print ( page )
| このpythonコードに誤りはありません。 | code_fix | 3,785 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging
import const
import os
FILE_NAME = os . path . join ( const . Constant . conf_dir , "str" )
if os . path . isdir ( const . Constant . conf_dir ) is False :
os . mkdir ( const . Constant . conf_dir )
with open ( FILE_NAME , "str" ) as f :
f . write ( "str" * 80 )
f . write ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,786 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_queryset ( self ) :
if self . request . customer . is_visitor ( ) :
raise PermissionDenied ( detail = _ ( "str" ) )
return OrderModel . objects . filter ( customer = self . request . customer ) . order_by ( "str" , )
| このpythonコードに誤りはありません。 | code_fix | 3,787 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class X1ToolCrypto ( X1Tool ) :
"str"
DEFAULT_METADATA = { "str" : "str" , "str" : "str" , "str" : "str" , "str" : "str" , "str" : "str" , "str" : X1Category . PROGRAMMER }
def __init__ ( self , metadata = None ) :
if metadata is None :
metadata = self . DEFAULT_METADATA
super ( self . __class__ , self ) . __init__ ( metadata )
def run ( self , args ) :
return None
| このpythonコードに誤りはありません。 | code_fix | 3,788 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def setup ( subparser ) :
subparser . add_argument ( "str" , "str" , help = "str" , default = "str" )
subparser . add_argument ( "str" , "str" , required = True , help = "str" )
subparser . add_argument (
"str" , "str" , help = "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,789 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_task_list ( self ) :
"str"
self . assertFalse ( self . import_page . is_task_list_showing ( ) , "str" )
self . import_page . wait_for_tasks ( )
self . import_page . upload_tarball ( self . tarball_name )
self . import_page . wait_for_tasks ( completed = True )
self . assertTrue ( self . import_page . is_task_list_showing ( ) , "str" )
| このpythonコードに誤りはありません。 | code_fix | 3,790 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from telemetry import multi_page_benchmark
MEMORY_HISTOGRAMS = [
{ "str" : "str" , "str" : "str" } ,
{ "str" : "str" , "str" : "str" } ,
{ "str" : "str" , "str" : "str" } ,
{ "str" : "str" , "str" : "str" } ]
BROWSER_MEMORY_HISTOGRAMS = [
{ "str" : "str" , "str" : "str" } ]
| このpythonコードに誤りはありません。 | code_fix | 3,791 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class VagrantInstance :
def __init__ ( self , role , ip ) :
self . target = "str"
self . role = role
self . ip = ip
@ property
def name ( self ) :
return "str" . format ( role = self . role )
@ property
def host ( self ) :
return "str" . format ( ip = self . ip )
@ property
def key ( self ) :
return "str"
@ property
def manifest ( self ) :
return self . role
| このpythonコードに誤りはありません。 | code_fix | 3,792 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __init__ ( self , msg , server ) :
super ( Wrapper , self ) . __init__ ( msg , server )
self . alert = Alert ( self . token )
self . device = Device ( self . token )
self . service = Service ( self . token )
| このpythonコードに誤りはありません。 | code_fix | 3,793 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class LazyEncoder ( json . JSONEncoder ) :
def default ( self , obj ) :
if isinstance ( obj , Promise ) :
return force_unicode ( obj )
return obj
| このpythonコードに誤りはありません。 | code_fix | 3,794 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def copy_to_clipboard ( suffix ) :
try :
clipboard [ suffix ] = GPS . Editor . get_chars (
GPS . current_context ( ) . file ( ) . name ( ) )
except :
pass
| このpythonコードに誤りはありません。 | code_fix | 3,795 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def set_led ( r , g , b ) :
"str"
GPIO . output ( 19 , r )
GPIO . output ( 21 , g )
GPIO . output ( 23 , b )
| このpythonコードに誤りはありません。 | code_fix | 3,796 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def canonical_piece ( c ) :
if c == "str" or c == "str" :
return c
return "str"
| このpythonコードに誤りはありません。 | code_fix | 3,797 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import smtplib
from email . mime . multipart import MIMEMultipart
from email . mime . text import MIMEText
import string
from optparse import OptionParser
import sys
from lxml import etree
sys . path . append ( "str" )
import databaseInterface
from externals . HTML import HTML
from datetime import datetime
import uuid
import os
| このpythonコードに誤りはありません。 | code_fix | 3,798 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_cached_loader_debug_origin ( self ) :
load_name = "str"
template = loader . get_template ( load_name )
template_name = template . nodelist [ 0 ] . source [ 0 ] . name
self . assertTrue ( template_name . endswith ( load_name ) ,
"str" % template_name )
template = loader . get_template ( load_name )
template_name = template . nodelist [ 0 ] . source [ 0 ] . name
self . assertTrue ( template_name . endswith ( load_name ) ,
"str" % template_name )
| このpythonコードに誤りはありません。 | code_fix | 3,799 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
Subsets and Splits
Python Code Generation
Provides a structured view of code generation tasks specific to a Python-focused course, helping to understand the nature and sequence of the instructions and outputs.
Filtered Code Generation Tasks
The query extracts code generation questions and answers from a specific dataset source, offering structured insights into its contents.
Code Generation Instruction Split
The query processes and splits code generation outputs into separate answers, providing a structured view of potential alternative solutions for each instruction.
Filtered Code Generation Task
The query performs basic filtering and returns formatted data related to code generation tasks, which is helpful but does not provide deep insights into the dataset's underlying structure or patterns.
Code Generation Instructions
The query performs basic filtering to select code generation tasks and organizes them by license, source, and index, providing a simple overview but lacking deeper analytical insight.
Code Generation Instructions
The query performs basic filtering and selects specific columns, providing limited insight into the dataset's structure but not revealing deeper patterns or relationships.
Code Generation Instructions
The query performs basic filtering and selection, organizing code generation tasks by license and source but does not provide deep insights into the data.
^_Call_Call:::^_Call_Call:
The query performs basic filtering and selection, organizing code generation tasks by license, source, and index without revealing deeper insights.
^^^_Call.FromSeconds:^^ withheld^
The query performs basic filtering and ordering of dataset entries, providing a structured view but lacking deeper insights.
_Call^^^^^ serotonin^:^
The query performs basic data retrieval and organization, presenting specific fields in a structured format but without providing significant analytical insights.