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
class BuiltinDelattrFunctionTests ( BuiltinTwoargFunctionTestCase , TranspileTestCase ) : functions = [ "str" ] not_implemented = [ "str" , ]
このpythonコードに誤りはありません。
code_fix
3,800
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def disk_image_to_rspec_object ( image ) : img = Image ( image ) return img . to_rspec_object ( )
このpythonコードに誤りはありません。
code_fix
3,801
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
"str" import sys from . . utils import * from . . utils . SQL import * import Player import ProgressBar from . . Capture import Writers
このpythonコードに誤りはありません。
code_fix
3,802
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def upgrade ( migrate_engine ) : meta = sqlalchemy . MetaData ( bind = migrate_engine ) stack = sqlalchemy . Table ( "str" , meta , autoload = True ) parent_resource_name = sqlalchemy . Column ( "str" , sqlalchemy . String ( 255 ) ) parent_resource_name . create ( stack )
このpythonコードに誤りはありません。
code_fix
3,803
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def _render ( template , context ) : tpl = Template ( template ) ctx = Context ( context ) return tpl . render ( ctx )
このpythonコードに誤りはありません。
code_fix
3,804
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def test_shutdown_all_instances_sleeps_if_shutdown_successfully_issued ( self ) : self . try_issue_shutdown . return_value = True shutdown_all_instances ( ) self . sleep . assert_called_once_with ( SHUTDOWN_SLEEP )
このpythonコードに誤りはありません。
code_fix
3,805
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def check_generate_args ( N , dt , beta , generate_complex ) : x = generate_power_law ( N , dt , beta , generate_complex ) assert_ ( bool ( generate_complex ) == np . iscomplexobj ( x ) ) assert_ ( len ( x ) == N )
このpythonコードに誤りはありません。
code_fix
3,806
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class Solution ( object ) : def arrayPairSum ( self , nums ) : "str" list . sort ( nums ) l = len ( nums ) i = 0 sum = 0 while i < l : sum += nums [ i ] i += 2 return sum
このpythonコードに誤りはありません。
code_fix
3,807
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def toggle_connect ( widget , event = None ) : "str" global connect_points connect_points = not connect_points graph . plot ( )
このpythonコードに誤りはありません。
code_fix
3,808
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from __future__ import absolute_import from . fx2 . fx2_model import Fx2Model from . fx2 . fpgalink_host import FpgaLinkHost
このpythonコードに誤りはありません。
code_fix
3,809
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def __init__ ( self , parent = None ) : super ( TableView , self ) . __init__ ( parent ) header = HeaderView ( self ) header . rightButtonPressed . connect ( self . on_header_rightButtonPressed ) header . setSortIndicator ( - 1 , QtCore . Qt . AscendingOrder ) self . setHorizontalHeader ( header ) self . verticalHeader ( ) . hide ( ) self . setSelectionMode ( QtGui . QAbstractItemView . SingleSelection ) self . setSelectionBehavior ( QtGui . QAbstractItemView . SelectRows ) self . setSortingEnabled ( True )
このpythonコードに誤りはありません。
code_fix
3,810
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
"str" from sympy import symbols from sympy import Plot from sympy import sin , cos , pi , sqrt , exp from sympy . core . compatibility import callable from time import sleep , clock
このpythonコードに誤りはありません。
code_fix
3,811
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class Planner1 ( Planner ) : "str" ref = "str" schema = { } example = { } def plan ( self , planner_config , attack_config ) : pass @ staticmethod def to_dict ( ) : return Planner . _to_dict ( Planner1 . ref , Planner1 . schema , Planner1 . example )
このpythonコードに誤りはありません。
code_fix
3,812
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def dismiss ( self , * largs ) : "str" if self . bubble . parent : self . bubble . parent . remove_widget ( self . bubble ) if self . attach_to : self . attach_to . unbind ( pos = self . _reposition , size = self . _reposition ) self . attach_to = None self . switch_to ( self . main_tab ) for child in self . tab_list [ : ] : self . remove_widget ( child ) self . dispatch ( "str" )
このpythonコードに誤りはありません。
code_fix
3,813
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def fibonacci ( n = 1 ) : _val = 0 _next = 1 _cnt = 0 for i in xrange ( n ) : yield _val temp = _next _next += _val _val = temp
このpythonコードに誤りはありません。
code_fix
3,814
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def __init__ ( self , module_config , test_object ) : "str" self . module_config = module_config self . test_object = test_object self . _current_feature = None self . test_object . register_feature_start_observer ( self . _handle_feature_start ) if ( Transfer . __singleton_instance == None ) : Transfer . __singleton_instance = self
このpythonコードに誤りはありません。
code_fix
3,815
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import pyxb_114 import unittest import datetime import pyxb_114 . binding . datatypes as xsd
このpythonコードに誤りはありません。
code_fix
3,816
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import json from collections import defaultdict , Counter path = "str" records = [ json . loads ( line ) for line in open ( path ) ] time_zones = [ rec [ "str" ] for rec in records if "str" in rec ] counts = Counter ( time_zones ) print ( counts . most_common ( 10 ) )
このpythonコードに誤りはありません。
code_fix
3,817
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def validate_heroes ( self , field ) : if len ( field . data ) > 5 : raise ValidationError ( "str" )
このpythonコードに誤りはありません。
code_fix
3,818
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def NeededPaddingForAlignment ( value , alignment = 8 ) : "str" if value % alignment : return alignment - ( value % alignment ) return 0
このpythonコードに誤りはありません。
code_fix
3,819
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def search4CNode ( condition ) : node = exactSearch ( condition ) if node is not None : return node node = getCentralEnt ( condition ) return node
このpythonコードに誤りはありません。
code_fix
3,820
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def _get_context_data ( self , ** kwargs ) : "str" queryset = Message . vobjects . filter ( reply_to_major_message = None ) page = self . request . GET . get ( "str" ) tmp = utils . get_pagination ( queryset , page , settings . HOMEPAGE_MESSAGE_NUM_PER_PAGE ) for i in tmp [ "str" ] : i . reply = Message . vobjects . filter ( reply_to_major_message = i ) . order_by ( "str" ) kwargs . update ( tmp ) return super ( IndexView , self ) . get_context_data ( ** kwargs )
このpythonコードに誤りはありません。
code_fix
3,821
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def add ( request ) : entry = Entry ( ) entry . date = datetime . now ( ) entry . text = request . POST [ "str" ] entry . save ( ) return HttpResponseRedirect ( reverse ( "str" ) )
このpythonコードに誤りはありません。
code_fix
3,822
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
"str" from __future__ import absolute_import from . runner import main main ( )
このpythonコードに誤りはありません。
code_fix
3,823
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def __is_visited ( self , x , y ) : if self . visited [ y ] [ x ] == 1 : return True else : return False
このpythonコードに誤りはありません。
code_fix
3,824
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def get_pipeline_definition ( self , pipeline_id , version = None ) : "str" params = { "str" : pipeline_id , } if version is not None : params [ "str" ] = version return self . make_request ( action = "str" , body = json . dumps ( params ) )
このpythonコードに誤りはありません。
code_fix
3,825
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def update ( self ) : keys = pygame . key . get_pressed ( ) self . camera_controller . update ( keys ) if self . mouse_buttons [ 0 ] : for tray in self . trays : tray . handle ( self . mouse_pos , self . mouse_rel ) else : for tray in self . trays : tray . should_move = False tray . should_resize = False tray . edge = 0b0000
このpythonコードに誤りはありません。
code_fix
3,826
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class SliceTransformFactory ( object ) : def __init__ ( self , start , end ) : self . start = start self . end = end def __call__ ( self , * args , ** kwargs ) : return SliceTransform ( self . start , self . end , * args , ** kwargs )
このpythonコードに誤りはありません。
code_fix
3,827
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def get ( self , url , query_params ) : "str" return self . execute_request ( url , "str" , query_params , None )
このpythonコードに誤りはありません。
code_fix
3,828
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def getPost ( reddit , subreddit , post ) : text = { } if isinstance ( post , list ) : post = post [ 0 ] else : post = post for submission in reddit . subreddit ( subreddit ) . search ( post , time_filter = "str" ) : if submission . title == post : text [ "str" ] = submission . title text [ "str" ] = submission . selftext return text
このpythonコードに誤りはありません。
code_fix
3,829
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def ermittle_besten_spieler ( self ) : hoechster_zug = self . zuege [ 0 ] for x in range ( 1 , len ( self . zuege ) ) : "str" if hoechster_zug is None or self . zuege [ x ] > hoechster_zug : hoechster_zug = self . zuege [ x ] if Config . LOG_RUNDEN : print ( "str" . format ( hoechster_zug . spieler ) ) if hoechster_zug is not None : self . besterSpieler = hoechster_zug . spieler return self . besterSpieler
このpythonコードに誤りはありません。
code_fix
3,830
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from livewires import games games . init ( screen_width = 640 , screen_height = 480 , fps = 50 ) games . screen . mainloop ( )
このpythonコードに誤りはありません。
code_fix
3,831
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class MySSHServer ( asyncssh . SSHServer ) : def connection_requested ( self , dest_host , dest_port , orig_host , orig_port ) : if dest_port == 80 : return True else : raise asyncssh . ChannelOpenError ( asyncssh . OPEN_ADMINISTRATIVELY_PROHIBITED , "str" )
このpythonコードに誤りはありません。
code_fix
3,832
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def remove_duplicate_urls ( urls , names ) : "str" for pattern in urls : if hasattr ( pattern , "str" ) : remove_duplicate_urls ( pattern . url_patterns , names ) elif hasattr ( pattern , "str" ) and pattern . name : if pattern . name in names : urls . remove ( pattern ) else : names . append ( pattern . name )
このpythonコードに誤りはありません。
code_fix
3,833
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import socket import threading import time from connection . server import Server from . utils import get_ip
このpythonコードに誤りはありません。
code_fix
3,834
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
if __dev__ : from direct . directutil import DistributedLargeBlobSender import DistributedInGameEditor
このpythonコードに誤りはありません。
code_fix
3,835
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from django . contrib import admin from djanban . apps . dev_environment . models import NoiseMeasurement , Interruption admin . site . register ( NoiseMeasurement ) admin . site . register ( Interruption )
このpythonコードに誤りはありません。
code_fix
3,836
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def setUp ( self ) : self . harass_repeat = 1000 self . data = data
このpythonコードに誤りはありません。
code_fix
3,837
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from copy import deepcopy from django . core . urlresolvers import RegexURLPattern from django . conf . urls import url
このpythonコードに誤りはありません。
code_fix
3,838
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def create_plugin ( name , version , author , description ) : from framework . core . registry import plugin_registry from framework . core . plugin import Plugin plugin = Plugin ( name , version , author , description ) plugin_registry . add ( plugin ) return plugin
このpythonコードに誤りはありません。
code_fix
3,839
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def onSplitButtonClicked ( self ) : "str" self . insertSingleLineTextAtCursor ( "str" ) self . slideTextEdit . setFocus ( )
このpythonコードに誤りはありません。
code_fix
3,840
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
"str" __author__ = "str" __date__ = "str" __copyright__ = "str" __revision__ = "str" import os import subprocess from PyQt4 import QtGui from processing . gui . ToolboxAction import ToolboxAction from FusionUtils import FusionUtils
このpythonコードに誤りはありません。
code_fix
3,841
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def __init__ ( self ) : self . fout = FloppyOut ( ) self . midi_fin = MidiFileIn ( self . cb_midi_event_list ) pygame . midi . init ( ) self . mout = pygame . midi . Output ( pygame . midi . get_default_output_id ( ) )
このpythonコードに誤りはありません。
code_fix
3,842
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from orchestrate_ai . webclient . app import app app . run ( debug = True )
このpythonコードに誤りはありません。
code_fix
3,843
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from django . contrib import admin from pamplesneak . models import Pamplesneak , Player , GameWord admin . site . register ( Pamplesneak ) admin . site . register ( Player ) admin . site . register ( GameWord )
このpythonコードに誤りはありません。
code_fix
3,844
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import numpy as np from scipy import constants from interpolate_thermal_property import get_potential_aims , get_potential_nist_table , get_potential_sulfur_table import re import os materials_directory = os . path . dirname ( __file__ ) if materials_directory : materials_directory = materials_directory + "str" eV2Jmol = constants . physical_constants [ "str" ] [ 0 ] * constants . N_A
このpythonコードに誤りはありません。
code_fix
3,845
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def download_version ( version ) : download_file_and_compare_hashes ( "str" % version ) if ( args . tests ) : download_file_and_compare_hashes ( "str" % version )
このpythonコードに誤りはありません。
code_fix
3,846
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class TripsLocation ( ApiView ) : "str" api_url = "str" def get ( self , request ) : import analysis . logic trip_ids = request . GET . get ( "str" , None ) if not trip_ids : return HttpResponseBadRequest ( "str" ) live_trips = analysis . logic . get_trips_location ( trip_ids . split ( "str" ) ) result = dict ( objects = live_trips ) result [ "str" ] = dict ( ) return self . get_json_resp ( result )
このpythonコードに誤りはありません。
code_fix
3,847
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def test_finalize_with_trace ( self ) : import subprocess rc = subprocess . call ( [ sys . executable , "str" , "str" ] ) self . failIf ( rc == 2 , "str" ) self . failUnless ( rc == 0 , "str" )
このpythonコードに誤りはありません。
code_fix
3,848
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def rebuild ( indexname , jsonfile ) : es . indices . delete ( index = indexname ) es . indices . create ( index = indexname ) for line in open ( jsonfile ) : s = line . strip ( ) toInsert = eval ( s ) res = es . index ( index = indexname , doc_type = "str" , body = toInsert ) print ( res ) es . indices . refresh ( index = indexname )
このpythonコードに誤りはありません。
code_fix
3,849
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class HasGetOntologies ( object ) : "str" def get_ontologies ( self ) : "str" raise NotImplementedError ( )
このpythonコードに誤りはありません。
code_fix
3,850
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def api_group ( self , api_group ) : "str" if api_group is None : raise ValueError ( "str" ) self . _api_group = api_group
このpythonコードに誤りはありません。
code_fix
3,851
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def _query_counting_switch ( self , switch_id , vlan_id , nw_src , nw_dst ) : "str" for con in core . openflow . _connections . itervalues ( ) : if con . dpid == switch_id : match = self . _find_counting_flow_match ( switch_id , nw_src , nw_dst , vlan_id ) con . send ( of . ofp_stats_request ( body = of . ofp_flow_stats_request ( match = match ) ) )
このpythonコードに誤りはありません。
code_fix
3,852
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from setuptools import setup , find_packages setup ( name = "str" , version = "str" , packages = find_packages ( exclude = [ "str" , "str" ] ) , test_suite = "str" , install_requires = [ "str" ] , author = "str" , author_email = "str" , description = "str" , license = "str" , keywords = "str" , url = "str" , )
このpythonコードに誤りはありません。
code_fix
3,853
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def test_400_resource_validator ( ) : request = request_parser ( request_400 ) response = request_validator ( request ) assert response [ 0 ] == "str" assert response [ 1 ] == "str" assert response [ 2 ] == "str"
このpythonコードに誤りはありません。
code_fix
3,854
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from django . core . management . base import BaseCommand , CommandError from django . conf import settings from jobs . models import Job , JobImage import os from shutil import copyfile
このpythonコードに誤りはありません。
code_fix
3,855
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def initializeELMnet ( nDimInput , nDimOutput , numNeurons = 10 ) : net = OSELM ( nDimInput , nDimOutput , numHiddenNeurons = numNeurons , activationFunction = "str" ) return net
このpythonコードに誤りはありません。
code_fix
3,856
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def testGenericInlineFormsetFactory ( self ) : inline_formset = generic_inlineformset_factory ( Media , exclude = ( "str" , ) )
このpythonコードに誤りはありません。
code_fix
3,857
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class TestMinInsertions ( unittest . TestCase ) : def test_min_insertions ( self ) : string = "str" self . assertEqual ( min_insertions_to_make_palindrome ( string ) , 3 ) string = "str" self . assertEqual ( min_insertions_to_make_palindrome ( string ) , 4 )
このpythonコードに誤りはありません。
code_fix
3,858
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from distutils . core import setup setup ( name = "str" , version = "str" , description = "str" , author = "str" , scripts = [ "str" ] , data_files = [ ( "str" , [ "str" ] ) ] )
このpythonコードに誤りはありません。
code_fix
3,859
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def GetDirGetName ( BamFile ) : fileSimple = re . split ( "str" , re . split ( "str" , BamFile ) [ 1 ] ) [ 0 ] dir = re . findall ( "str" , BamFile ) [ 0 ] return [ dir , fileSimple ]
このpythonコードに誤りはありません。
code_fix
3,860
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class TestImport ( unittest . TestCase ) : def test_import ( self ) : import fifilib def test_application ( self ) : from fifilib . api import Application test_value = 10 A = Application ( ) A . set_value ( test_value ) v = A . get_value ( ) self . assertEqual ( test_value , v )
このpythonコードに誤りはありません。
code_fix
3,861
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class CourseType ( db . Model ) : id = db . Column ( db . Integer , primary_key = True ) description = db . Column ( db . String ( 50 ) ) def set_fields ( self , fields ) : self . description = fields [ "str" ]
このpythonコードに誤りはありません。
code_fix
3,862
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from __future__ import unicode_literals from djangobmf . serializers import ModuleSerializer from rest_framework import serializers
このpythonコードに誤りはありません。
code_fix
3,863
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def populate ( self ) : vlan_list = get_vlan_list ( ) for vlan in vlan_list : if Vlan . query . filter_by ( vlan_no = vlan ) . count ( ) == 1 : continue db . session . add ( Vlan ( vlan ) ) db . session . commit ( )
このpythonコードに誤りはありません。
code_fix
3,864
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def is_admin ( taskid ) : global adminid if adminid != taskid : return False else : return True
このpythonコードに誤りはありません。
code_fix
3,865
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def ModularIntegerFactory ( _mod , _dom , _sym ) : "str" class cls ( ModularInteger ) : mod , dom , sym = _dom . convert ( _mod ) , _dom , _sym if _sym : cls . __name__ = "str" % _mod else : cls . __name__ = "str" % _mod return cls
このpythonコードに誤りはありません。
code_fix
3,866
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def addKColumn ( self ) : if self . kcolumnModel is None : return row = self . kcolumnModel . rowCount ( ) self . kcolumnModel . insertRows ( row ) index = self . kcolumnModel . index ( row , 0 ) self . kcolumnView . setFocus ( ) self . kcolumnView . setCurrentIndex ( index ) self . kcolumnView . edit ( index )
このpythonコードに誤りはありません。
code_fix
3,867
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def log ( self , msg ) : print ( "str" % ( time . time ( ) , time . time ( ) - self . starttime , msg ) ) sys . stdout . flush ( )
このpythonコードに誤りはありません。
code_fix
3,868
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def get ( self , key , default = None ) : try : return self [ key ] except ( KeyError , IndexError ) : pass return default
このpythonコードに誤りはありません。
code_fix
3,869
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def isInsidePolygon ( point , polyPoints ) : shapelyPoint = Point ( point [ "str" ] , point [ "str" ] ) shapelyPolygon = Polygon ( polyPoints ) isInside = shapelyPolygon . contains ( shapelyPoint ) return isInside
このpythonコードに誤りはありません。
code_fix
3,870
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import os from django . conf import global_settings from django . contrib . auth import authenticate from django . contrib . auth . tests . utils import skipIfCustomUser from django . contrib . auth . models import User , Permission from django . contrib . contenttypes . models import ContentType from django . contrib . auth . context_processors import PermWrapper , PermLookupDict from django . db . models import Q from django . test import TestCase , override_settings from django . utils . _os import upath
このpythonコードに誤りはありません。
code_fix
3,871
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def to_mirror ( url ) : if not mirrors_ : load_mirrors ( ) for mirror_name in mirrors_ : for mirror_url in mirrors_ [ mirror_name ] : if url . startswith ( mirror_url ) : url_part = url . split ( mirror_url ) [ 1 ] return "str" % ( mirror_name , "str" if url_part . startswith ( "str" ) else "str" , url_part ) return url
このpythonコードに誤りはありません。
code_fix
3,872
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def extract_ramdisk ( fh ) : if isinstance ( fh , str ) : with open ( fh , "str" ) as fh : return _extract_ramdisk ( fh ) else : return _extract_ramdisk ( fh )
このpythonコードに誤りはありません。
code_fix
3,873
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import re from collections import namedtuple import rpsl import errors GROUP_START = "str" GROUP_END = "str" ASPATH_START = "str" ASPATH_END = "str" PREFIX_START = "str" PREFIX_END = "str" AS , AS_SET , AS_PATH , PREFIX_LIST , RS_SET , ANY = ( "str" . split ( ) ) op_details = namedtuple ( "str" , "str" ) ops = { "str" : op_details ( precedence = 3 , associativity = "str" ) , "str" : op_details ( precedence = 2 , associativity = "str" ) , "str" : op_details ( precedence = 1 , associativity = "str" ) , }
このpythonコードに誤りはありません。
code_fix
3,874
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def __get__ ( self , instance , klass ) : if instance is None : return self def func ( key ) : if not key in self . keys : raise ValueError ( "str" % key ) self . func ( instance , key ) self . _state [ instance ] = key for actionable in self . _proxies . get ( instance , [ ] ) : gtk_radioaction_set_current ( actionable , key ) return func
このpythonコードに誤りはありません。
code_fix
3,875
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def run_command ( self ) : server = ircd . XinIRCd ( ) server . run ( )
このpythonコードに誤りはありません。
code_fix
3,876
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class ArticleManager ( models . Manager ) : def all_infoboxes ( self ) : return self . filter ( article_type = self . model . INFOBOX ) . all ( ) def get_infobox_for_entrez ( self , entrez ) : title = "str" . format ( entrez ) return self . filter ( title = title ) . first ( ) def get_talk_for_entrez ( self , entrez ) : pass
このpythonコードに誤りはありません。
code_fix
3,877
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def getParameters ( self ) : search = "str" + self . _xmlns + "str" + self . _xmlns + self . _steerStats xmin = self . _Element_Tree . findall ( search ) [ 0 ] parametersDict = { } for item in xmin : parametersDict [ str ( item . tag ) ] = item . text return parametersDict
このpythonコードに誤りはありません。
code_fix
3,878
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from couchdbkit import ResourceNotFound from sqlagg . filters import EQ from corehq . apps . groups . models import Group from corehq . apps . reports . util import get_INFilter_element_bindparam from corehq . util . quickcache import quickcache
このpythonコードに誤りはありません。
code_fix
3,879
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def test_int_enum ( self ) : module = builder . parse ( "str" ) enumeration = next ( module [ "str" ] . infer ( ) ) one = enumeration [ "str" ] clazz = one . getattr ( "str" ) [ 0 ] int_type = "str" . format ( bases . BUILTINS , "str" ) self . assertTrue ( clazz . is_subtype_of ( int_type ) , "str" )
このpythonコードに誤りはありません。
code_fix
3,880
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def forwards ( self , orm ) : db . add_column ( "str" , "str" , self . gf ( "str" ) ( auto_now_add = True , default = datetime . datetime ( 2015 , 1 , 12 , 0 , 0 ) , blank = True ) , keep_default = False )
このpythonコードに誤りはありません。
code_fix
3,881
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def asmline ( loc ) : if loc == 0 : return "str" loc = preproc + 16 + loc return "str" + asmseg ( loc )
このpythonコードに誤りはありません。
code_fix
3,882
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def DeathWindow ( ) : GemRB . HideGUI ( ) GemRB . SetTimedEvent ( DeathWindowEnd , 10 ) return
このpythonコードに誤りはありません。
code_fix
3,883
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def set_up ( self ) : set_up_testing ( ) reg = self . _registry = get_current_registry ( ) self . _config = Configurator ( registry = reg , package = package ) self . _config . setup_registry ( ) repo_mgr = self . _config . get_registered_utility ( IRepositoryManager ) repo_mgr . initialize_all ( )
このpythonコードに誤りはありません。
code_fix
3,884
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class DummyDisplay ( gui . Container ) : def __init__ ( self , x , y ) : super ( DummyDisplay , self ) . __init__ ( align = - 1 , valign = - 1 )
このpythonコードに誤りはありません。
code_fix
3,885
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from __future__ import unicode_literals from django . conf import settings from django . db import migrations , models
このpythonコードに誤りはありません。
code_fix
3,886
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def delete_posts_referring_to ( node ) : Post . objects . filter ( node_references = node ) . delete ( ) Post . objects . filter ( location = node ) . delete ( )
このpythonコードに誤りはありません。
code_fix
3,887
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def test_with_threadpool ( self ) : with mock_module ( "str" ) : x = TaskPool ( ) self . assertTrue ( x . ThreadPool ) self . assertTrue ( x . WorkRequest )
このpythonコードに誤りはありません。
code_fix
3,888
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def remove_prefix ( prefixes , string ) : "str" for pre in prefixes : if string . startswith ( pre ) : return string [ len ( pre ) : ] return string
このpythonコードに誤りはありません。
code_fix
3,889
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def sanitize_path_list ( path_list ) : new_path_list = [ ] for l in path_list : if l : new_path_list . append ( l ) return new_path_list
このpythonコードに誤りはありません。
code_fix
3,890
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def ParseOpt_windowed ( self ) : "str" self . fullscreen = False
このpythonコードに誤りはありません。
code_fix
3,891
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
from dput . core import logger from dput . exceptions import HookException try : from distro_info import ( DebianDistroInfo , UbuntuDistroInfo , DistroDataOutdated ) except ImportError : logger . warning ( "str" "str" ) raise
このpythonコードに誤りはありません。
code_fix
3,892
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
import rdflib from rdflib import Graph , Namespace , ConjunctiveGraph from rdflib . namespace import NamespaceManager from . quantity import Quantity from datetime import datetime as DT import datetime import os import logging from . configure import Configureable , Configuration , ConfigValue __all__ = [ "str" , "str" , "str" , "str" , "str" , "str" ] L = logging . getLogger ( __name__ )
このpythonコードに誤りはありません。
code_fix
3,893
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def __init__ ( self , logger_name = None , verbose = False ) : "str" cls , cout = self . __class__ , COut ( ) cout . set_ats_phase_process ( cls . VERBOSE ) msg = "str" . format ( "str" ) COut . print_console_msg ( msg , verbose = verbose ) self . __logger_name = logger_name
このpythonコードに誤りはありません。
code_fix
3,894
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class FakeDataStoreTest ( data_store_test . _DataStoreTest ) : "str" def testApi ( self ) : "str"
このpythonコードに誤りはありません。
code_fix
3,895
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def iter_rings ( data , pathcodes ) : ring = [ ] for point , code in zip ( data , pathcodes ) : if code == "str" : if len ( ring ) : yield ring ring = [ point ] elif code == "str" : ring . append ( point ) else : raise ValueError ( "str" . format ( code ) ) if len ( ring ) : yield ring
このpythonコードに誤りはありません。
code_fix
3,896
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def EnvironmentName ( environ ) : "str" app . config . from_object ( app_config [ environ ] )
このpythonコードに誤りはありません。
code_fix
3,897
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
class UserPanel ( horizon_lib . Panel ) : name = _ ( "str" ) slug = "str"
このpythonコードに誤りはありません。
code_fix
3,898
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。
def multiplier ( self ) : "str" if self . price is None : return 0 return self . price / self . unit . divisor
このpythonコードに誤りはありません。
code_fix
3,899
MIT
bifi
次に示すpythonコードの誤りを修正しなさい。