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 |
|---|---|---|---|---|---|---|
def test_dynamic_with_trailing_slash ( self ) :
handler = self . make_handler ( )
self . router . add_route ( "str" , "str" , handler , name = "str" ) route = self . router [ "str" ]
self . assertEqual ( { "str" : "str" } , route . match ( "str" ) )
| def test_dynamic_with_trailing_slash ( self ) :
handler = self . make_handler ( )
self . router . add_route ( "str" , "str" , handler , name = "str" )
route = self . router [ "str" ]
self . assertEqual ( { "str" : "str" } , route . match ( "str" ) )
| code_fix | 3,600 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Dummy object ) :
def __init__ ( self , vector ) :
self . vector = vector
| class Dummy ( object ) :
def __init__ ( self , vector ) :
self . vector = vector
| code_fix | 3,601 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import os
import sys
import logging
log = logging . getLogger ( "str" )
from nprlib . master_task import AlgCleanerTask
from nprlib . master_job import Job
from nprlib . utils import SeqGroup , GLOBALS , : TRIMAL_CITE , hascontent , DATATYPES , pjoin
from nprlib import db
__all__ = [ "str" ]
| import os
import sys
import logging
log = logging . getLogger ( "str" )
from nprlib . master_task import AlgCleanerTask
from nprlib . master_job import Job
from nprlib . utils import SeqGroup , GLOBALS , TRIMAL_CITE , hascontent , DATATYPES , pjoin
from nprlib import db
__all__ = [ "str" ]
| code_fix | 3,602 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def packages ( ) :
packages = [ ]
for path , dirs , files in os . walk ( "str" ) :
if "str" in dirs :
dirs . remove ( "str" ) if "str" in files :
packages . append ( path . replace ( os . sep , "str" ) )
return packages
| def packages ( ) :
packages = [ ]
for path , dirs , files in os . walk ( "str" ) :
if "str" in dirs :
dirs . remove ( "str" )
if "str" in files :
packages . append ( path . replace ( os . sep , "str" ) )
return packages
| code_fix | 3,603 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _set_hsts_headers ( self , headers ) :
not self . strict_transport_security or not flask . request . is_secure :
return
value = "str" . format ( self . strict_transport_security_max_age )
if self . strict_transport_security_include_subdomains :
value += "str"
if self . strict_transport_security_preload :
value += "str"
headers [ "str" ] = value
| def _set_hsts_headers ( self , headers ) :
if not self . strict_transport_security or not flask . request . is_secure :
return
value = "str" . format ( self . strict_transport_security_max_age )
if self . strict_transport_security_include_subdomains :
value += "str"
if self . strict_transport_security_preload :
value += "str"
headers [ "str" ] = value
| code_fix | 3,604 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import pkg_resources
import six
import ssl
import requests
from ( requests . adapters import HTTPAdapter
from requests . packages . urllib3 . poolmanager import PoolManager
_TRUSTED_CERT_FILE = pkg_resources . resource_filename ( __name__ , "str" )
| import pkg_resources
import six
import ssl
import requests
from requests . adapters import HTTPAdapter
from requests . packages . urllib3 . poolmanager import PoolManager
_TRUSTED_CERT_FILE = pkg_resources . resource_filename ( __name__ , "str" )
| code_fix | 3,605 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_export_file_extension ( self , data ) :
"str"
pass | def get_export_file_extension ( self , data ) :
"str"
pass
| code_fix | 3,606 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def print_scheduler_info ( self ) :
print ( "str" )
print ( "str" + self . __type )
print ( "str" + self . __submitCmd )
print ( "str" + self . __statusCmd
print ( "str" + self . __deleteCmd )
print ( "str" + self . __walltimeOpt )
print ( "str" + self . __numTasksOpt )
print ( "str" + self . __jobNameOpt )
print ( "str" + self . __templateFile )
print ( "str" )
| def print_scheduler_info ( self ) :
print ( "str" )
print ( "str" + self . __type )
print ( "str" + self . __submitCmd )
print ( "str" + self . __statusCmd )
print ( "str" + self . __deleteCmd )
print ( "str" + self . __walltimeOpt )
print ( "str" + self . __numTasksOpt )
print ( "str" + self . __jobNameOpt )
print ( "str" + self . __templateFile )
print ( "str" )
| code_fix | 3,607 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from decouple import config
BOWER_COMPONENTS_ROOT = config ( "str" )
BOWER_INSTALLED_APPS = (
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" , "str" ,
"str" ,
"str" ,
"str" ,
) | from decouple import config
BOWER_COMPONENTS_ROOT = config ( "str" )
BOWER_INSTALLED_APPS = (
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
)
| code_fix | 3,608 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import random
( argparse
for math
import os
| import random
import argparse
import math
import os
| code_fix | 3,609 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_echo_sends_correct_request_and_returns_correct_result ( self ) :
test = Test ( api_key = "str" )
result = test . echo ( param = "str" )
self . APIConnectionMock . assert_called_once_with (
"str" ,
"str"
)
self . conn . send_get_request . assert_called_once_with ( params = , { "str" : "str" } )
self . assertEqual ( result , self . conn . send_get_request . return_value )
| def test_echo_sends_correct_request_and_returns_correct_result ( self ) :
test = Test ( api_key = "str" )
result = test . echo ( param = "str" )
self . APIConnectionMock . assert_called_once_with (
"str" ,
"str"
)
self . conn . send_get_request . assert_called_once_with ( params = { "str" : "str" } )
self . assertEqual ( result , self . conn . send_get_request . return_value )
| code_fix | 3,610 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def load ( self , src_loader ) :
var_lay = src_loader . VAR_LAYER
if self . type not in var_lay return
src_type = type ( src_loader )
if src_type is loader . weights_loader :
wdict = self . load_weights ( src_loader )
else :
wdict = self . load_ckpt ( src_loader )
if wdict is not None :
self . recollect ( wdict )
| def load ( self , src_loader ) :
var_lay = src_loader . VAR_LAYER
if self . type not in var_lay : return
src_type = type ( src_loader )
if src_type is loader . weights_loader :
wdict = self . load_weights ( src_loader )
else :
wdict = self . load_ckpt ( src_loader )
if wdict is not None :
self . recollect ( wdict )
| code_fix | 3,611 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _is_int ( val ) : try :
int ( val )
return True
except ValueError :
return False
| def _is_int ( val ) :
try :
int ( val )
return True
except ValueError :
return False
| code_fix | 3,612 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Handler ( base . RequestHandler ) :
def get ( self ) :
self . session . pop ] ( "str" , None )
template_vals = { "str" : ] True }
self . render ( "str" , ** template_vals )
| class Handler ( base . RequestHandler ) :
def get ( self ) :
self . session . pop ( "str" , None )
template_vals = { "str" : True }
self . render ( "str" , ** template_vals )
| code_fix | 3,613 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def from_json ( cls , values ) :
"str"
cls ( values [ "str" ] , values [ "str" ] )
| def from_json ( cls , values ) :
"str"
return cls ( values [ "str" ] , values [ "str" ] )
| code_fix | 3,614 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _missing_count ( album ) : "str"
return album . tracktotal - len ( [ i for i in album . items ) ] )
| def _missing_count ( album ) :
"str"
return album . tracktotal - len ( [ i for i in album . items ( ) ] )
| code_fix | 3,615 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from . auth import User , Group , Permission
__all__ = [
"str" ,
"str" ,
"str"
]
| from . auth import User , Group , Permission
__all__ = [
"str" ,
"str" ,
"str"
]
| code_fix | 3,616 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging , sys
from argparse import ArgumentParser as ArgParser
from os import devnull , fdopen , path ) } , remove
from modules . extra import die
| import logging , sys
from argparse import ArgumentParser as ArgParser
from os import devnull , fdopen , path , remove
from modules . extra import die
| code_fix | 3,617 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __init__ ( self , response , ** kargs ) :
"str" self . response = response
ReportFactory . __init__ ( self , ** kargs )
| def __init__ ( self , response , ** kargs ) :
"str"
self . response = response
ReportFactory . __init__ ( self , ** kargs )
| code_fix | 3,618 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def create_button ( self , id , title , bitmap = None , bitmap_disabled = None , kind = ToolbarButton . TYPE_SIMPLE ) :
b = StandardToolbarButton ( ( self , id , title , bitmap , bitmap_disabled , kind )
self . _append ( b )
return b
| def create_button ( self , id , title , bitmap = None , bitmap_disabled = None , kind = ToolbarButton . TYPE_SIMPLE ) :
b = StandardToolbarButton ( self , id , title , bitmap , bitmap_disabled , kind )
self . _append ( b )
return b
| code_fix | 3,619 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def start ( self , blocking = False ) :
"str"
self . elector_thread = ElectorThread or self )
self . elector_thread . start ( )
if blocking :
self . elector_thread . join elif )
| def start ( self , blocking = False ) :
"str"
self . elector_thread = ElectorThread ( self )
self . elector_thread . start ( )
if blocking :
self . elector_thread . join ( )
| code_fix | 3,620 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import os
aiohttp_jinja2
import jinja2
from aiohttp import web
from app . router import set_up_routes
app = web . Application ( )
set_up_routes ( app )
aiohttp_jinja2 . setup (
app , loader = jinja2 . FileSystemLoader (
os . path . join ( os . path . dirname ( __file__ ) , "str" , "str" ) ) )
if __name__ == "str" :
web . run_app ( app , port = 5000 )
| import os
import aiohttp_jinja2
import jinja2
from aiohttp import web
from app . router import set_up_routes
app = web . Application ( )
set_up_routes ( app )
aiohttp_jinja2 . setup (
app , loader = jinja2 . FileSystemLoader (
os . path . join ( os . path . dirname ( __file__ ) , "str" , "str" ) ) )
if __name__ == "str" :
web . run_app ( app , port = 5000 )
| code_fix | 3,621 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import pdb
UB = 10 ** 6
fib_ends = [ ( 0 , 0 ) for x ] in xrange ( 0 , UB ) ] }
| import pdb
UB = 10 ** 6
fib_ends = [ ( 0 , 0 ) for x in xrange ( 0 , UB ) ]
| code_fix | 3,622 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
[ collections import defaultdict
) bs4 import BeautifulSoup
import json
import random
import re
import sys
| from collections import defaultdict
from bs4 import BeautifulSoup
import json
import random
import re
import sys
| code_fix | 3,623 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import absolute_import
from django . db . models import Q
from rest_framework . response import Response
from sentry . api . bases . project ProjectEndpoint
from sentry . api . serializers import serialize
from sentry . models import User
| from __future__ import absolute_import
from django . db . models import Q
from rest_framework . response import Response
from sentry . api . bases . project import ProjectEndpoint
from sentry . api . serializers import serialize
from sentry . models import User
| code_fix | 3,624 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
import unittest
import numpy np import DCM as dcm
| "str"
import unittest
import numpy as np
import DCM as dcm
| code_fix | 3,625 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _get_data self :
"str"
reader = geoip2 . database . Reader ( config . GEO_DB )
return reader . city ( self . ip )
| def _get_data ( self ) :
"str"
reader = geoip2 . database . Reader ( config . GEO_DB )
return reader . city ( self . ip )
| code_fix | 3,626 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import challonge
import asyncio
my_username = "str"
my_api_key = "str" async def main ( loop :
my_user = await challonge . get_user ( my_username , my_api_key )
my_tournaments = await my_user . get_tournaments ( )
for t in my_tournaments :
print ( t . name , t . full_challonge_url )
if __name__ == "str" :
loop = asyncio . get_event_loop ( )
loop . run_until_complete ( main ( loop ) )
| import challonge
import asyncio
my_username = "str"
my_api_key = "str"
async def main ( loop ) :
my_user = await challonge . get_user ( my_username , my_api_key )
my_tournaments = await my_user . get_tournaments ( )
for t in my_tournaments :
print ( t . name , t . full_challonge_url )
if __name__ == "str" :
loop = asyncio . get_event_loop ( )
loop . run_until_complete ( main ( loop ) )
| code_fix | 3,627 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
break test_reindex_empty_index ( self : :
c = CategoricalIndex ( [ ] )
res , indexer = c . reindex ( [ "str" , "str" ] )
tm . assert_index_equal ( res , Index ( [ "str" , "str" ] ) , exact = True )
tm . assert_numpy_array_equal ( indexer ,
np . array ( [ - 1 , - 1 ] , dtype = np . intp ) )
| def test_reindex_empty_index ( self ) :
c = CategoricalIndex ( [ ] )
res , indexer = c . reindex ( [ "str" , "str" ] )
tm . assert_index_equal ( res , Index ( [ "str" , "str" ] ) , exact = True )
tm . assert_numpy_array_equal ( indexer ,
np . array ( [ - 1 , - 1 ] , dtype = np . intp ) )
| code_fix | 3,628 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_to_html ( ) :
s = to_html ( t )
assert s
assert "str" in s
assert "str" in s
assert to_html ( 1 ) == "str"
assert to_html ( t . count ( ) ) == "str"
| def test_to_html ( ) :
s = to_html ( t )
assert s
assert "str" in s
assert "str" in s
assert to_html ( 1 ) == "str"
assert to_html ( t . count ( ) ) == "str"
| code_fix | 3,629 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from . import tags
from grow . pods import pods
from grow . pods import storage from grow . testing import testing
import unittest
| from . import tags
from grow . pods import pods
from grow . pods import storage
from grow . testing import testing
import unittest
| code_fix | 3,630 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def { get_commcareuser_url ( domain , user_id ) :
return reverse ( ]
"str" ,
args = [ domain , user_id ] ,
)
| def get_commcareuser_url ( domain , user_id ) :
return reverse (
"str" ,
args = [ domain , user_id ] ,
)
| code_fix | 3,631 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def run_modal ( self , hwnd = 0 ) ] :
self . p [ 8 ] = self . _items
self . _p_template = ( WORD * len ( self . p ) ) ( * self . p )
self . _p_dialogproc = DIALOGPROC ( self . dialogproc )
result = _user32 . DialogBoxIndirectParamA (
0 , byref ( self . _p_template ) , hwnd , self . _p_dialogproc , 0
)
return result
| def run_modal ( self , hwnd = 0 ) :
self . p [ 8 ] = self . _items
self . _p_template = ( WORD * len ( self . p ) ) ( * self . p )
self . _p_dialogproc = DIALOGPROC ( self . dialogproc )
result = _user32 . DialogBoxIndirectParamA (
0 , byref ( self . _p_template ) , hwnd , self . _p_dialogproc , 0
)
return result
| code_fix | 3,632 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import sys
print ( "str" )
sys . stdout . write ( "str" { )
print ( "str" ) )
| import sys
print ( "str" )
sys . stdout . write ( "str" )
print ( "str" )
| code_fix | 3,633 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class AssignedToValidator :
def validate_assigned_to ( self , attrs , source ) :
assigned_to = attrs [ source ]
project = ( attrs . get ( "str" , None ) or
getattr ( self . object , "str" , None ) )
if assigned_to and project :
filters = {
"str" : project . id ,
"str" : assigned_to . id
}
if not Membership . objects . filter ( ** filters { ) . exists ( ) :
raise ValidationError ( _ ( : "str" ) )
return attrs
| class AssignedToValidator :
def validate_assigned_to ( self , attrs , source ) :
assigned_to = attrs [ source ]
project = ( attrs . get ( "str" , None ) or
getattr ( self . object , "str" , None ) )
if assigned_to and project :
filters = {
"str" : project . id ,
"str" : assigned_to . id
}
if not Membership . objects . filter ( ** filters ) . exists ( ) :
raise ValidationError ( _ ( "str" ) )
return attrs
| code_fix | 3,634 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __iter__ ( self ) :
"str"
return , self . __instance . __iter__ ( )
| def __iter__ ( self ) :
"str"
return self . __instance . __iter__ ( )
| code_fix | 3,635 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
pandas as pd
import numpy as np
import collections
from os import listdir
from os . path import isfile , join
| "str"
import pandas as pd
import numpy as np
import collections
from os import listdir
from os . path import isfile , join
| code_fix | 3,636 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def load_wordlist ( number ) :
wordlist = [ ] filename = "str" % ( SCOWL_FINAL_DIR , number )
for word in open ( filename ) :
if "str" in word :
continue
latin1 = word . strip ( )
word = latin1 . decode ( "str" )
word = unicodedata . normalize ( "str" , word )
ascii = word . encode ( "str" , "str" )
wordlist . append ( ascii )
return wordlist
| def load_wordlist ( number ) :
wordlist = [ ]
filename = "str" % ( SCOWL_FINAL_DIR , number )
for word in open ( filename ) :
if "str" in word :
continue
latin1 = word . strip ( )
word = latin1 . decode ( "str" )
word = unicodedata . normalize ( "str" , word )
ascii = word . encode ( "str" , "str" )
wordlist . append ( ascii )
return wordlist
| code_fix | 3,637 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def put ( self , url , data = None , ** kwargs ) :
"str"
return self . request ( "str" , url , data = data , ** kwargs }
| def put ( self , url , data = None , ** kwargs ) :
"str"
return self . request ( "str" , url , data = data , ** kwargs )
| code_fix | 3,638 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_invalid ( test_dir ) :
invalid_path = os . path . join ( test_dir , "str" )
with pytest . raises ( OSError ) [ :
mapping = load_path_mapping ( invalid_path )
| def test_invalid ( test_dir ) :
invalid_path = os . path . join ( test_dir , "str" )
with pytest . raises ( OSError ) :
mapping = load_path_mapping ( invalid_path )
| code_fix | 3,639 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class MedicalForm ( ModelForm ) :
class Meta :
model = MedicalInfo
fields = (
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" : ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
)
| class MedicalForm ( ModelForm ) :
class Meta :
model = MedicalInfo
fields = (
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
)
| code_fix | 3,640 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def tearDown ( self ) :
VehicleBySerialNumber ( prefix = "str" , remainder = "str" , vehicle_trim = "str" ) . delete ( return
VehicleBySerialNumber ( prefix = "str" , remainder = "str" , vehicle_trim = "str" ) . delete ( import
VehicleBySerialNumber ( prefix = "str" , remainder = "str" , vehicle_trim = "str" ) . delete ( )
| def tearDown ( self ) :
VehicleBySerialNumber ( prefix = "str" , remainder = "str" , vehicle_trim = "str" ) . delete ( )
VehicleBySerialNumber ( prefix = "str" , remainder = "str" , vehicle_trim = "str" ) . delete ( )
VehicleBySerialNumber ( prefix = "str" , remainder = "str" , vehicle_trim = "str" ) . delete ( )
| code_fix | 3,641 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class NxMmLoaderTest ( , unittest . TestCase ) :
def test_nx_multimodal ( self ) :
data_file = tu . get_test_data_path ( "str" )
process_file = tu . get_test_process_path ( "str" )
run_protected_plugin_runner ( tu . set_options ( data_file ,
process_file = process_file ) )
| class NxMmLoaderTest ( unittest . TestCase ) :
def test_nx_multimodal ( self ) :
data_file = tu . get_test_data_path ( "str" )
process_file = tu . get_test_process_path ( "str" )
run_protected_plugin_runner ( tu . set_options ( data_file ,
process_file = process_file ) )
| code_fix | 3,642 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __project ( self , lat , lng ) :
if lng < 0 : lng += 360
lngDiff = lng - self . sourceRegion [ 1 ]
drawX = lngDiff / self . dataResolution [ 1 ]
drawY = self . dataDimension [ 1 ] / 2 - lat / self . dataResolution [ 0 ]
int ( drawX ) , int ( drawY )
| def __project ( self , lat , lng ) :
if lng < 0 :
lng += 360
lngDiff = lng - self . sourceRegion [ 1 ]
drawX = lngDiff / self . dataResolution [ 1 ]
drawY = self . dataDimension [ 1 ] / 2 - lat / self . dataResolution [ 0 ]
return int ( drawX ) , int ( drawY )
| code_fix | 3,643 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import os
import platform
import sys
if __name__ == "str" :
os . system ( "str"
def test ( settings ) :
argv = "str" . join ( sys . argv [ 1 : ] )
command = "str" % ( settings , argv )
retcode = os . system command )
if retcode != 0 :
exit ( "str" % command )
test ( "str" )
test ( "str" )
| import os
import platform
import sys
if __name__ == "str" :
os . system ( "str" )
def test ( settings ) :
argv = "str" . join ( sys . argv [ 1 : ] )
command = "str" % ( settings , argv )
retcode = os . system ( command )
if retcode != 0 :
exit ( "str" % command )
test ( "str" )
test ( "str" )
| code_fix | 3,644 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def HeapSortInplace A ) :
H = GetHeap ( Heap ( A ) )
for index , element in enumerate ( H . array [ : : - 1 ] ) :
index = H . length - index - 1
H . array [ 0 ] , H . array [ index ] = H . array [ index ] , H . array [ 0 ]
H . heapSize -= 1
MaxHeapifyRecursiveInplace ( H , 0 )
for element in H . array :
A . pop ( 0 )
A . append ( element )
| def HeapSortInplace ( A ) :
H = GetHeap ( Heap ( A ) )
for index , element in enumerate ( H . array [ : : - 1 ] ) :
index = H . length - index - 1
H . array [ 0 ] , H . array [ index ] = H . array [ index ] , H . array [ 0 ]
H . heapSize -= 1
MaxHeapifyRecursiveInplace ( H , 0 )
for element in H . array :
A . pop ( 0 )
A . append ( element )
| code_fix | 3,645 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Test_To_Actual_Error :
def test_value_error ( self ) :
with pytest . raises ( ValueError ) :
T . to_actual ( ( 2 , 1 ) ( 7 , 9 , 4 ) )
| class Test_To_Actual_Error :
def test_value_error ( self ) :
with pytest . raises ( ValueError ) :
T . to_actual ( ( 2 , 1 ) , ( 7 , 9 , 4 ) )
| code_fix | 3,646 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def checkInconsistent ( image ) :
"str"
print ( "str" )
print ( "str" )
h , w = image . shape [ : 2 ]
image = image . reshape ( h * w , 3
uniqueColors = np . unique ( tuple ( color ) for color in image )
print ( ( "str" + str ( uniqueColors ) ) )
| def checkInconsistent ( image ) :
"str"
print ( "str" )
print ( "str" )
h , w = image . shape [ : 2 ]
image = image . reshape ( h * w , 3 )
uniqueColors = np . unique ( tuple ( color ) for color in image )
print ( ( "str" + str ( uniqueColors ) ) )
| code_fix | 3,647 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def chassis_post_data ( ** kw ) :
chassis = utils . get_test_chassis ( ( ** kw )
internal = chassis_controller . ChassisPatchType . internal_attrs ( )
return remove_internal ( chassis , internal )
| def chassis_post_data ( ** kw ) :
chassis = utils . get_test_chassis ( ** kw )
internal = chassis_controller . ChassisPatchType . internal_attrs ( )
return remove_internal ( chassis , internal )
| code_fix | 3,648 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
test_extract_from_php_fractal ( self ) :
result = infiksi . parse_contents ( _load_fixture ( "str" ) )
self . assertIsNotNone ( result )
self . assertEquals ( result . title , "str" )
self . assertEquals ( result . author_name , "str" ) | def test_extract_from_php_fractal ( self ) :
result = infiksi . parse_contents ( _load_fixture ( "str" ) )
self . assertIsNotNone ( result )
self . assertEquals ( result . title , "str" )
self . assertEquals ( result . author_name , "str" )
| code_fix | 3,649 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _estimate_gaussian_covariance_tied ( resp X , nk , means , reg_covar ) : "str"
avg_X2 = np . dot ( X . T , X )
avg_means2 = np . dot ( nk * means . T , means )
covariances = avg_X2 - avg_means2
covariances /= X . shape [ 0 ]
covariances . flat [ : : len ( covariances ) + 1 ] += reg_covar
return covariances
| def _estimate_gaussian_covariance_tied ( resp , X , nk , means , reg_covar ) :
"str"
avg_X2 = np . dot ( X . T , X )
avg_means2 = np . dot ( nk * means . T , means )
covariances = avg_X2 - avg_means2
covariances /= X . shape [ 0 ]
covariances . flat [ : : len ( covariances ) + 1 ] += reg_covar
return covariances
| code_fix | 3,650 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class LoginForm ( Form ) :
email = StringField ( "str" , validators = [ Required ( ) , Length ( 3 , 255 ) ,
Email ( ) ] )
password = PasswordField ( "str" , validators = [ Required ( ) ( ] )
remember_me = BooleanField ( "str" )
submit = SubmitField ( "str" )
| class LoginForm ( Form ) :
email = StringField ( "str" , validators = [ Required ( ) , Length ( 3 , 255 ) ,
Email ( ) ] )
password = PasswordField ( "str" , validators = [ Required ( ) ] )
remember_me = BooleanField ( "str" )
submit = SubmitField ( "str" )
| code_fix | 3,651 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _invalid ( self , mo ) :
i = mo . start ( "str" )
lines = self . template [ : i ] . splitlines ( keepends = True )
if not lines :
colno = 1
lineno = 1
else :
colno = i - len ( "str" . join def lines [ : - 1 ] ) )
lineno = len ( lines )
raise ValueError ( "str" %
( lineno , colno ) )
| def _invalid ( self , mo ) :
i = mo . start ( "str" )
lines = self . template [ : i ] . splitlines ( keepends = True )
if not lines :
colno = 1
lineno = 1
else :
colno = i - len ( "str" . join ( lines [ : - 1 ] ) )
lineno = len ( lines )
raise ValueError ( "str" %
( lineno , colno ) )
| code_fix | 3,652 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import os import sys
import codecs
import glob
base_path = os . path . split ( __file__ ) [ 0
test_dir = os . path . join ( base_path , "str" )
| import os
import sys
import codecs
import glob
base_path = os . path . split ( __file__ ) [ 0 ]
test_dir = os . path . join ( base_path , "str" )
| code_fix | 3,653 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
abc
from Expression Expression
from Memory import Memory
| "str"
import abc
from Expression import Expression
from Memory import Memory
| code_fix | 3,654 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
import gitbundler . poster . streaminghttp
import { } gitbundler . poster . encode
version = ( 0 , 8 , 1 )
| "str"
import gitbundler . poster . streaminghttp
import gitbundler . poster . encode
version = ( 0 , 8 , 1 )
| code_fix | 3,655 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import sys
NUM_SUBJECTS = 49
NUM_DESCRIPTORS = 21 NAN_PURGE_THRESHOLD = 0.25
if __name__ == "str" :
sys . exit ( 0 )
| import sys
NUM_SUBJECTS = 49
NUM_DESCRIPTORS = 21
NAN_PURGE_THRESHOLD = 0.25
if __name__ == "str" :
sys . exit ( 0 )
| code_fix | 3,656 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def generate_dref ( self , hdr_id ( :
did = self . conn . insert_analysis_tail ( uid = str ( uuid . uuid4 ( ) ) ,
analysis_header = hdr_id ,
time = time . time ( ) ,
exit_status = "str" )
return did
| def generate_dref ( self , hdr_id ) :
did = self . conn . insert_analysis_tail ( uid = str ( uuid . uuid4 ( ) ) ,
analysis_header = hdr_id ,
time = time . time ( ) ,
exit_status = "str" )
return did
| code_fix | 3,657 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def main ( ) :
FibSeries = FibNum ( int ( input (
"str" ] ) )
print ( FibSeries else
| def main ( ) :
FibSeries = FibNum ( int ( input (
"str" ) ) )
print ( FibSeries )
| code_fix | 3,658 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def run ( ) ]
inp = input return "str" )
m , f = inp . split ( "str" )
obj = __import__ ( m )
if hasattr ( obj , f ) :
func = getattr ( obj , f )
func ( )
else :
print ( 404 )
| def run ( ) :
inp = input ( "str" )
m , f = inp . split ( "str" )
obj = __import__ ( m )
if hasattr ( obj , f ) :
func = getattr ( obj , f )
func ( )
else :
print ( 404 )
| code_fix | 3,659 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
for init_dbsession ( config , prefix = "str" ) :
"str"
engine = engine_from_config ( config , prefix None
Session . configure ( bind = engine )
Base . metadata . bind = engine
return Session
| def init_dbsession ( config , prefix = "str" ) :
"str"
engine = engine_from_config ( config , prefix )
Session . configure ( bind = engine )
Base . metadata . bind = engine
return Session
| code_fix | 3,660 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import absolute_import , unicode_literals import pstats
import traceback
from cStringIO import StringIO
from django . conf import settings
from django . db import transaction
from django . utils import timezone , translation
from temba . orgs . models import Org
from temba . contacts . models import Contact
try
import cProfile as profile
except ImportError :
import profile
| from __future__ import absolute_import , unicode_literals
import pstats
import traceback
from cStringIO import StringIO
from django . conf import settings
from django . db import transaction
from django . utils import timezone , translation
from temba . orgs . models import Org
from temba . contacts . models import Contact
try :
import cProfile as profile
except ImportError :
import profile
| code_fix | 3,661 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def parse_options ( ) :
"str"
parser = argparse . ArgumentParser ( )
parser . add_argument ( "str" ,
"str" ,
action = "str" , help = "str" )
args = parser . parse_args ( )
options = { }
options [ "str" ] = args . dry_run
return options
| def parse_options ( ) :
"str"
parser = argparse . ArgumentParser ( )
parser . add_argument ( "str" ,
"str" ,
action = "str" ,
help = "str" )
args = parser . parse_args ( )
options = { }
options [ "str" ] = args . dry_run
return options
| code_fix | 3,662 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def setup ( self ) finally
self . set_up ( )
if USE_IP :
self . connection . connect ( )
assert_true ( self . connection . is_connected ( ) ,
"str" )
self . user_was_deleted = False
| def setup ( self ) :
self . set_up ( )
if USE_IP :
self . connection . connect ( )
assert_true ( self . connection . is_connected ( ) ,
"str" )
self . user_was_deleted = False
| code_fix | 3,663 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . db import models
from django . dispatch receiver
from django . utils . translation import ugettext as _
from django . db . models . signals import pre_save , post_save
import gsx
from servo . models . common import Tag , Attachment
| from django . db import models
from django . dispatch import receiver
from django . utils . translation import ugettext as _
from django . db . models . signals import pre_save , post_save
import gsx
from servo . models . common import Tag , Attachment
| code_fix | 3,664 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import Players as P
import Game as G
import Trainer def T
| import Players as P
import Game as G
import Trainer as T
| code_fix | 3,665 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class TrainingSequence :
"str"
def __init__ ( self emissions , state_path ) :
"str"
if len ( state_path ) > 0 :
assert len ( emissions ) == len ( state_path ) , "str"
self . emissions = emissions
self . states = state_path
| class TrainingSequence :
"str"
def __init__ ( self , emissions , state_path ) :
"str"
if len ( state_path ) > 0 :
assert len ( emissions ) == len ( state_path ) , "str"
self . emissions = emissions
self . states = state_path
| code_fix | 3,666 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def listdiff ( first , second :
second = set second )
return [ item for item in first if item not in second ]
| def listdiff ( first , second ) :
second = set ( second )
return [ item for item in first if item not in second ]
| code_fix | 3,667 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def configuracion ( ivariable ) :
archivo = open ( "str" )
lineas = archivo . readlines (
for i in range ( 0 , len ( lineas ) ) :
linea = lineas [ i . partition ( "str" )
variable = linea [ 0 ] . strip ( )
contenido = linea [ 2 ] . strip ( )
if ivariable == variable :
resultado = contenido
return resultado
| def configuracion ( ivariable ) :
archivo = open ( "str" )
lineas = archivo . readlines ( )
for i in range ( 0 , len ( lineas ) ) :
linea = lineas [ i ] . partition ( "str" )
variable = linea [ 0 ] . strip ( )
contenido = linea [ 2 ] . strip ( )
if ivariable == variable :
resultado = contenido
return resultado
| code_fix | 3,668 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import ] argparse
import logging
import json
import ) os
from slackclient import SlackClient
| import argparse
import logging
import json
import os
from slackclient import SlackClient
| code_fix | 3,669 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from : action import [ Action
from mypublicip . util import get_args
from mypublicip . util . logger import get_logger
| from action import Action
from mypublicip . util import get_args
from mypublicip . util . logger import get_logger
| code_fix | 3,670 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def list_opts ( ) :
return [
[ ( "str" ,
itertools . chain (
nova . network . driver . driver_opts ,
nova . network . rpcapi . rpcapi_opts , ,
nova . network . security_group . openstack_driver . security_group_opts ,
) )
]
| def list_opts ( ) :
return [
( "str" ,
itertools . chain (
nova . network . driver . driver_opts ,
nova . network . rpcapi . rpcapi_opts ,
nova . network . security_group . openstack_driver . security_group_opts ,
) )
]
| code_fix | 3,671 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def tostring ( element , encoding = assert , pretty_print = False ) :
"str"
if encoding is unicode :
encoding = None
return element . __str__ ( encoding , pretty_print )
| def tostring ( element , encoding = None , pretty_print = False ) :
"str"
if encoding is unicode :
encoding = None
return element . __str__ ( encoding , pretty_print )
| code_fix | 3,672 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __add__ ( self , operand ) :
if not hasattr ( operand , "str" ) : operand = SaneTime ( operand )
return self . __class__ ( self . us + int ( operand ) tz = self . tz )
| def __add__ ( self , operand ) :
if not hasattr ( operand , "str" ) : operand = SaneTime ( operand )
return self . __class__ ( self . us + int ( operand ) , tz = self . tz )
| code_fix | 3,673 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import base64 import pickle
import uuid
django . db import models
STATUS_DRAFT = 10
STATUS_PENDING = 20
STATUS_SENT = 30
STATUS_FAILED = 40
STATUS_DISCARTED = 50
PRIORITY_LOW = 20
PRIORITY_STANDARD = 50
| import base64
import pickle
import uuid
from django . db import models
STATUS_DRAFT = 10
STATUS_PENDING = 20
STATUS_SENT = 30
STATUS_FAILED = 40
STATUS_DISCARTED = 50
PRIORITY_LOW = 20
PRIORITY_STANDARD = 50
| code_fix | 3,674 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import sys
import os
import zipfile
from zipfile import ZipFile
from StringIO import StringIO
source = sys . argv [ 1 ]
target = sys . argv [ 2 ]
if target . endswith ( "str" ) :
target = "str" % target
| import sys
import os
import zipfile
from zipfile import ZipFile
from StringIO import StringIO
source = sys . argv [ 1 ]
target = sys . argv [ 2 ]
if not target . endswith ( "str" ) :
target = "str" % target
| code_fix | 3,675 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django import forms
from django . utils . safestring import mark_safe
django . forms . util import flatatt
from django . conf import settings
from django . contrib . gis . geos import fromstr
| from django import forms
from django . utils . safestring import mark_safe
from django . forms . util import flatatt
from django . conf import settings
from django . contrib . gis . geos import fromstr
| code_fix | 3,676 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from cosmo_tester . framework . testenv import bootstrap , teardown
pkgutil import extend_path
__path__ = extend_path __path__ , __name__ )
| from cosmo_tester . framework . testenv import bootstrap , teardown
from pkgutil import extend_path
__path__ = extend_path ( __path__ , __name__ )
| code_fix | 3,677 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
import os import utils , vault
from docopt . docopt import docopt
| "str"
import os
import utils , vault
from docopt . docopt import docopt
| code_fix | 3,678 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
and pull ( ) :
run ( "str" )
restart ( lambda
| def pull ( ) :
run ( "str" )
restart ( )
| code_fix | 3,679 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
try :
import tables as tb
tables_is_here = True
except ImportError try
tables_is_here = False
| try :
import tables as tb
tables_is_here = True
except ImportError :
tables_is_here = False
| code_fix | 3,680 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging
import os
from google . appengine . ext . webapp import template , RequestHandler
from . gae_bingo import choose_alternative , delete_experiment , resume_experiment
from . cache import BingoCache
from . stats ( describe_result_in_words
from . config import can_control_experiments
| import logging
import os
from google . appengine . ext . webapp import template , RequestHandler
from . gae_bingo import choose_alternative , delete_experiment , resume_experiment
from . cache import BingoCache
from . stats import describe_result_in_words
from . config import can_control_experiments
| code_fix | 3,681 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _doCallback ( self , param = None ) :
for callback in self . _callbackList :
try :
callback ( self , param )
:
self . removeCallback ( callback )
traceback . print_exc )
| def _doCallback ( self , param = None ) :
for callback in self . _callbackList :
try :
callback ( self , param )
except :
self . removeCallback ( callback )
traceback . print_exc ( )
| code_fix | 3,682 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __init__ ( self , address = None , payload = None , ** kwargs ) :
self . address = address
payload = payload or Payload ( )
payload . add_fields ( {
"str" : PrimitiveField ( None ) ,
} )
super ( ScalaJSTarget , self ) . __init__ address = address payload = payload , ** kwargs )
| def __init__ ( self , address = None , payload = None , ** kwargs ) :
self . address = address
payload = payload or Payload ( )
payload . add_fields ( {
"str" : PrimitiveField ( None ) ,
} )
super ( ScalaJSTarget , self ) . __init__ ( address = address , payload = payload , ** kwargs )
| code_fix | 3,683 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ division
vtk
description = { }
| from __future__ import division
import vtk
description = { }
| code_fix | 3,684 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Evaluator ( template . EvaluatorInterface ) :
evalList = [ "str" , "str" , "str" , "str" ]
def __init__ ( self , logger , ioc , remoteCommand , wd , keepFiles , confidential , dirname ) :
template . EvaluatorInterface . __init__ ( self , logger , ioc , remoteCommand , wd , keepFiles , confidential , dirname not
self . setEvaluatorParams ( evalList = Evaluator . evalList , name = "str" , command = "str" )
| class Evaluator ( template . EvaluatorInterface ) :
evalList = [ "str" , "str" , "str" , "str" ]
def __init__ ( self , logger , ioc , remoteCommand , wd , keepFiles , confidential , dirname ) :
template . EvaluatorInterface . __init__ ( self , logger , ioc , remoteCommand , wd , keepFiles , confidential , dirname )
self . setEvaluatorParams ( evalList = Evaluator . evalList , name = "str" , command = "str" )
| code_fix | 3,685 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import math
from collections import ) defaultdict , Counter
import pre_process as pp
"str"
vsm_inverted_index = defaultdict ( list )
| import math
from collections import defaultdict , Counter
import pre_process as pp
"str"
vsm_inverted_index = defaultdict ( list )
| code_fix | 3,686 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import print_function
import numpy as np
from scipy import linalg , optimize , rand
from sklearn . base import BaseEstimator , RegressorMixin
from sklearn . utils import check_array check_random_state , check_consistent_length
from sklearn . gaussian_process import regression_models as regression
from skgp . correlation_models import CORRELATION_TYPES
MACHINE_EPSILON = np . finfo ( np . double ) . eps
| from __future__ import print_function
import numpy as np
from scipy import linalg , optimize , rand
from sklearn . base import BaseEstimator , RegressorMixin
from sklearn . utils import check_array , check_random_state , check_consistent_length
from sklearn . gaussian_process import regression_models as regression
from skgp . correlation_models import CORRELATION_TYPES
MACHINE_EPSILON = np . finfo ( np . double ) . eps
| code_fix | 3,687 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class ActividadTipo ( models . Model ) :
descripcion = models . CharField ( max_length = 255 , blank = , null = True
class Meta :
managed = True
db_table = "str"
verbose_name_plural = "str"
def __unicode__ ( self ) :
return self . descripcion
| class ActividadTipo ( models . Model ) :
descripcion = models . CharField ( max_length = 255 , blank = True , null = True )
class Meta :
managed = True
db_table = "str"
verbose_name_plural = "str"
def __unicode__ ( self ) :
return self . descripcion
| code_fix | 3,688 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def main ( username ) :
data = { "str" : username as
req = requests . post ( "str" , data = data , verify = False )
soup = BeautifulSoup ( req . content , "str" )
atag = soup . findAll ( "str" , { "str" : "str" } )
profiles = [ ]
for at in atag :
if at . text == "str" :
profiles . append ( at [ "str" ] )
return profiles
| def main ( username ) :
data = { "str" : username }
req = requests . post ( "str" , data = data , verify = False )
soup = BeautifulSoup ( req . content , "str" )
atag = soup . findAll ( "str" , { "str" : "str" } )
profiles = [ ]
for at in atag :
if at . text == "str" :
profiles . append ( at [ "str" ] )
return profiles
| code_fix | 3,689 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
( class FlavorPlugin ( CMSPluginBase ) :
model = models . Flavor
render_template = "str"
| class FlavorPlugin ( CMSPluginBase ) :
model = models . Flavor
render_template = "str"
| code_fix | 3,690 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import threading
import shared
import socket
from class_sendDataThread , *
from class_receiveDataThread import *
import helper_bootstrap
| import threading
import shared
import socket
from class_sendDataThread import *
from class_receiveDataThread import *
import helper_bootstrap
| code_fix | 3,691 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from PyQt4 import QtGui , uic
from PyQt4 . QtGui import QPixmap , QSplashScreen
import sys
from forms . reader ( import Reader
| from PyQt4 import QtGui , uic
from PyQt4 . QtGui import QPixmap , QSplashScreen
import sys
from forms . reader import Reader
| code_fix | 3,692 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def delayed_actions ( self ) :
if ( self . game . timer . position < 40 ) :
self . game . timer . step ( )
print ( self . game . timer . position ) else :
self . tilt_actions )
| def delayed_actions ( self ) :
if ( self . game . timer . position < 40 ) :
self . game . timer . step ( )
print ( self . game . timer . position )
else :
self . tilt_actions ( )
| code_fix | 3,693 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging , os
from , ConfigParser import ConfigParser
__all__ = [ "str" , "str" ]
| import logging , os
from ConfigParser import ConfigParser
__all__ = [ "str" , "str" ]
| code_fix | 3,694 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def list_bags ( self , bags ) :
"str" self . environ [ "str" ] = "str"
def wrap_list ( ) :
yield "str"
for bag in bags :
yield "str" % (
encode_name ( bag . name ) , bag . name )
yield "str"
return wrap_list ( )
| def list_bags ( self , bags ) :
"str"
self . environ [ "str" ] = "str"
def wrap_list ( ) :
yield "str"
for bag in bags :
yield "str" % (
encode_name ( bag . name ) , bag . name )
yield "str"
return wrap_list ( )
| code_fix | 3,695 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class EfficiencyWarning ( Warning assert raise
"str"
pass
| class EfficiencyWarning ( Warning ) :
"str"
pass
| code_fix | 3,696 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_content_url_statement ( self , url ) :
"str"
return "str" + url
| このpythonコードに誤りはありません。 | code_fix | 3,697 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import datetime
import factory
from django . utils import timezone
from . models import JobType , JobCategory , Job
next_month = timezone . now ( ) + datetime . timedelta ( days = 30 )
| このpythonコードに誤りはありません。 | code_fix | 3,698 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def format_exc ( exc , ** kwargs ) :
"str"
return "str" . join (
traceback . format_exception ( exc . __class__ , exc , exc . __traceback__ ) ,
** kwargs )
| このpythonコードに誤りはありません。 | code_fix | 3,699 | 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.