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 stop ( self ) :
self . gui_up = False
self . fv . show_status ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,200 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import print_function
import os
import sys
import tempfile
from target_test import FileSystemTargetTestMixin
from helpers import with_config , unittest
from boto . exception import S3ResponseError
from boto . s3 import key
from moto import mock_s3
from luigi import configuration
from luigi . s3 import FileNotFoundException , InvalidDeleteException , S3Client , S3Target
from luigi . target import MissingParentDirectory
if ( 3 , 4 , 0 ) <= sys . version_info [ : 3 ] < ( 3 , 4 , 3 ) :
raise unittest . SkipTest ( "str" )
AWS_ACCESS_KEY = "str"
AWS_SECRET_KEY = "str"
| このpythonコードに誤りはありません。 | code_fix | 4,201 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from . import wizard
from . hooks import post_init_hook
| このpythonコードに誤りはありません。 | code_fix | 4,202 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class TestRootEndpoint ( TestCase ) :
def test_root_endpoint ( self ) :
url = reverse ( "str" )
expect_url = "str"
msg = "str"
assert url == expect_url , msg . format ( expect_url )
| このpythonコードに誤りはありません。 | code_fix | 4,203 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def add_poison_pills ( processes , task_queue ) :
for i in xrange ( processes ) :
task_queue . put ( None )
| このpythonコードに誤りはありません。 | code_fix | 4,204 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Cache ( ) :
storage = { }
@ staticmethod
def store ( key , value ) :
Cache . storage [ key ] = value
@ staticmethod
def retrieve ( key ) :
if key in Cache . storage :
return Cache . storage [ key ]
else :
return None
@ staticmethod
def delete ( key ) :
if key in Cache . storage :
del Cache . storage [ key ]
| このpythonコードに誤りはありません。 | code_fix | 4,205 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def parse_pet ( self , file ) :
self . logger . debug ( file )
data = [ ]
with open ( file , newline = "str" ) as csv_file :
reader = csv . DictReader ( csv_file , fieldnames = [ "str" , "str" ] )
for row in reader :
data . append ( row )
return data
| このpythonコードに誤りはありません。 | code_fix | 4,206 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def run ( ) :
app . run (
debug = settings . get ( "str" , "str" ) ,
port = settings . get ( "str" , "str" )
)
| このpythonコードに誤りはありません。 | code_fix | 4,207 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from distutils . core import setup
from distutils . extension import Extension
from Cython . Distutils import build_ext
setup ( ext_modules = [
Extension ( "str" ,
[ "str" ,
"str" ] ,
language = "str" ) ] ,
cmdclass = { "str" : build_ext } )
| このpythonコードに誤りはありません。 | code_fix | 4,208 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import sys
import unittest
import logging
sys . path . append ( "str" )
import ProjectsDAO
import json
import os
import shutil
test_dir = "str"
test_db = "str"
| このpythonコードに誤りはありません。 | code_fix | 4,209 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
__author__ = "str"
import json
import requests
from constants import *
from exceptions import MethodNotAllowedException , NotFoundException , ForbiddenOperationException , IllegalArgumentException , UnsupportedMediaTypeException , UnknownException
| このpythonコードに誤りはありません。 | code_fix | 4,210 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def usage ( ) :
print ( "str" % sys . argv [ 0 ] + "str" )
exit ( 1 )
| このpythonコードに誤りはありません。 | code_fix | 4,211 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def query ( self , query ) :
if query . frum != self :
Log . error ( "str" )
Log . error ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,212 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def write_manifest ( self ) :
with open ( self . manifest , "str" ) as f :
self . write_header ( f )
self . write_body ( f )
| このpythonコードに誤りはありません。 | code_fix | 4,213 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import scipy
import scipy . signal
import tensorflow as tf
| このpythonコードに誤りはありません。 | code_fix | 4,214 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __str__ ( self ) :
return "str" . format ( self . year ,
self . first_author , self . journal , self . title , str ( self . pmid ) , )
| このpythonコードに誤りはありません。 | code_fix | 4,215 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Migration ( migrations . Migration ) :
dependencies = [
( "str" , "str" ) ,
]
operations = [
migrations . AddField (
model_name = "str" ,
name = "str" ,
field = models . ForeignKey ( to = "str" , default = "str" ) ,
) ,
]
| このpythonコードに誤りはありません。 | code_fix | 4,216 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class CountCrawler17Proportional ( MultiCityCrawler ) :
is_proportional = True
url_city_codes_json = "str" "str" "str"
url_list_base = "str" "str" "str" "str" "str" "str" "str" "str"
def parse_consti ( self , consti , city_name = None ) :
consti = super ( CountCrawler17Proportional , self ) . parse_consti ( consti , city_name )
return consti
| このpythonコードに誤りはありません。 | code_fix | 4,217 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . conf . urls . defaults import patterns , include , url
from tutorial . views import Index , Contact , CycleExample
from django . conf import settings
urlpatterns = patterns ( "str" ,
( "str" , Index . as_view ( ) ) ,
( "str" , Contact . as_view ( ) ) ,
( "str" , CycleExample . as_view ( ) ) ,
( "str" , "str" , { "str" : settings . MEDIA_ROOT } ) ,
( "str" , include ( "str" ) )
)
| このpythonコードに誤りはありません。 | code_fix | 4,218 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_tweet_time ( TWEET ) :
strfts = time . strftime ( "str" , time . strptime ( TWEET [ "str" ] , "str" ) )
ts = time . strftime ( "str" , time . gmtime ( time . mktime ( time . strptime ( TWEET [ "str" ] , "str" ) ) ) )
return ts , strfts
| このpythonコードに誤りはありません。 | code_fix | 4,219 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def interrupt ( dpid ) :
try :
command = "str" % ( ControllerIP , ControllerPort , dpid )
debug ( "str" % command )
result = os . popen ( command ) . read ( )
debug ( "str" % result )
if result == "str" :
print ( "str" )
return ;
except :
log_error ( "str" )
exit ( 1 )
print ( "str" % ( dpid ) )
| このpythonコードに誤りはありません。 | code_fix | 4,220 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import BIO_FIX_TOPO
import sys
import argparse
import copy
import logging
from BCBio import GFF
from Bio import SeqIO
from gff3 import feature_lambda , feature_test_true
logging . basicConfig ( level = logging . INFO )
| このpythonコードに誤りはありません。 | code_fix | 4,221 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class MetaRepository :
"str"
def __init__ ( self ) :
"str"
settings . addListsToRepository ( "str" , None , self )
importantFileNames = [ "str" ]
settings . getRadioPluginsAddPluginFrame ( getPluginsDirectoryPath ( ) , importantFileNames , getPluginFileNames ( ) , self )
| このpythonコードに誤りはありません。 | code_fix | 4,222 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import asyncio
import networkx
from . base_graph import BaseGraph
| このpythonコードに誤りはありません。 | code_fix | 4,223 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def forecast ( self , steps : int = 1 , ** kwargs ) -> pd . Series :
index = pd . bdate_range ( self . _train . index [ - 1 ] , periods = steps + 1 ) [ 1 : ]
return pd . Series ( [ self . _train . values [ - 1 ] ] * steps , index = index )
| このpythonコードに誤りはありません。 | code_fix | 4,224 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def management_url ( self , value ) :
self . logger . warning (
_ ( "str"
"str"
"str" ) )
self . endpoint_override = value
| このpythonコードに誤りはありません。 | code_fix | 4,225 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class NoAccess ( BaseAccess ) :
@ property
def sso_is_valid ( self ) :
return True
@ property
def is_active ( self ) :
return False
@ property
def teams ( self ) :
return ( )
@ property
def memberships ( self ) :
return ( )
@ property
def scopes ( self ) :
return frozenset ( )
| このpythonコードに誤りはありません。 | code_fix | 4,226 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def save_json ( self , filename ) :
f = open ( filename , "str" )
json . dump ( self , f , indent = 2 )
f . close ( )
print ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,227 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from flask import Blueprint
remote = Blueprint ( "str" , __name__ )
| このpythonコードに誤りはありません。 | code_fix | 4,228 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Field ( BaseCClass ) :
def __init__ ( self ) :
raise NotImplementedError ( "str" )
def ijk_get_double ( self , i , j , k ) :
return Field . cNamespace ( ) . ijk_get_double ( self , i , j , k )
def free ( self ) :
Field . cNamespace ( ) . free ( self )
| このpythonコードに誤りはありません。 | code_fix | 4,229 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Testcase ( object ) :
def __init__ ( self ) :
pass
def process ( self ) :
raise NotImplementedError ( "str" )
def get_name ( self ) :
raise NotImplementedError ( "str" )
def leave ( self ) :
raise NotImplementedError ( "str" )
def enter ( self ) :
raise NotImplementedError ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,230 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def action_view_bom ( self , cr , uid , ids , context = None ) :
result = self . pool [ "str" ] . for_xml_id ( cr , uid , "str" , "str" )
templates = [ product . product_tmpl_id . id for product in self . browse ( cr , uid , ids , context = context ) ]
context = {
"str" : templates [ 0 ] ,
"str" : ids [ 0 ] ,
"str" : templates [ 0 ] ,
"str" : ids [ 0 ] ,
}
result [ "str" ] = str ( context )
return result
| このpythonコードに誤りはありません。 | code_fix | 4,231 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def init_image_service ( app ) :
"str"
image_store = app . config [ "str" ]
from psi . app . service import Info
if image_store is not None :
Info . set_image_store_service ( image_store ( app ) )
| このpythonコードに誤りはありません。 | code_fix | 4,232 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def s2s_process ( self , cr , uid , id , data , context = None ) :
acquirer = self . browse ( cr , uid , id , context = context )
cust_method_name = "str" % ( acquirer . provider )
if not self . s2s_validate ( cr , uid , id , data , context = context ) :
return False
if hasattr ( self , cust_method_name ) :
method = getattr ( self , cust_method_name )
return method ( cr , uid , data , context = context )
return True
| このpythonコードに誤りはありません。 | code_fix | 4,233 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_tuple_as_args ( self ) :
self . assertRaises ( SystemExit , self . module . run_command , ( "str" , "str" ) )
self . assertTrue ( self . module . fail_json . called )
| このpythonコードに誤りはありません。 | code_fix | 4,234 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def parse_color ( color ) :
m = re_color . match ( color )
if not m :
return None
r , g , b = m . group ( 1 , 2 , 3 )
return ( int ( r , 16 ) , int ( g , 16 ) , int ( b , 16 ) )
| このpythonコードに誤りはありません。 | code_fix | 4,235 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def __init__ ( self , session , site = [ 1 , 1 ] , channel = "str" ) :
self . channel = channel
self . messages = self . getShoutbox ( session , site , self . channel )
| このpythonコードに誤りはありません。 | code_fix | 4,236 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import cPickle as pickle
import re
import langid
| このpythonコードに誤りはありません。 | code_fix | 4,237 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _hash_value ( value , salt ) :
"str"
value = _string_or_bust ( value )
return hmac . new ( salt , msg = value , digestmod = hashlib . sha256 ) . hexdigest ( )
| このpythonコードに誤りはありません。 | code_fix | 4,238 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def tuple_add ( a , b ) :
a1 , a2 = a
b1 , b2 = b
return a1 + b1 , a2 + b2
| このpythonコードに誤りはありません。 | code_fix | 4,239 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging
import os
import dbus
| このpythonコードに誤りはありません。 | code_fix | 4,240 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class DeleteMeetingView ( UserIsAdminMixin , DeleteView ) :
model = Meeting
template_name = "str"
def get_success_url ( self ) :
return reverse ( "str" )
def get_context_data ( self , ** kwargs ) :
context = super ( DeleteMeetingView , self ) . get_context_data ( ** kwargs )
context [ "str" ] = user_is_admin ( self . request . user )
context [ "str" ] = "str"
return context
| このpythonコードに誤りはありません。 | code_fix | 4,241 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class HelloWorldWidget ( DashboardWidget ) :
def render ( self ) :
return "str"
| このpythonコードに誤りはありません。 | code_fix | 4,242 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _flat_transforms_to_matrices ( transforms ) :
transforms = array_ops . reshape ( transforms , constant_op . constant ( [ - 1 , 8 ] ) )
num_transforms = array_ops . shape ( transforms ) [ 0 ]
return array_ops . reshape (
array_ops . concat (
[ transforms , array_ops . ones ( [ num_transforms , 1 ] ) ] , axis = 1 ) ,
constant_op . constant ( [ - 1 , 3 , 3 ] ) )
| このpythonコードに誤りはありません。 | code_fix | 4,243 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def tearDown ( self ) :
del self . tk_object
del self . piece
| このpythonコードに誤りはありません。 | code_fix | 4,244 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
import socket
import sys
HOST = "str"
PORT = 10
try :
s = socket . socket ( socket . AF . INET , socket . SOCK_DRAM )
except :
print ( "str" )
sys . exit ( )
while 1 :
d = s . recvfrom ( 1024 )
data = d [ 0 ]
addr = d [ 1 ]
if not data :
break
| このpythonコードに誤りはありません。 | code_fix | 4,245 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_client_class ( version ) :
version_map = {
"str" : "str" ,
"str" : "str" ,
}
try :
client_path = version_map [ str ( version ) ]
except ( KeyError , ValueError ) :
msg = "str" % (
( version , "str" . join ( version_map ) ) )
raise exceptions . UnsupportedVersion ( msg )
return importutils . import_class ( client_path )
| このpythonコードに誤りはありません。 | code_fix | 4,246 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . db import models
from course_enrollment . models_gen import Country
| このpythonコードに誤りはありません。 | code_fix | 4,247 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import socket
HOST = "str"
PORT = 8888
sock = socket . socket ( socket . AF_INET ,
socket . SOCK_DGRAM )
sock . bind ( ( HOST , PORT ) )
data , addr = sock . recvfrom ( 1024 )
print ( addr , "str" , data )
sock . sendto ( data , addr )
sock . close ( )
| このpythonコードに誤りはありません。 | code_fix | 4,248 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging
import asyncio
import asynqp
from . driver_base import ExchangerBase
from ... import config
logger = logging . getLogger ( __name__ )
| このpythonコードに誤りはありません。 | code_fix | 4,249 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Lead ( models . Model ) :
_name = "str"
_inherit = [ "str" , "str" ]
@ api . onchange ( "str" , "str" )
def _onchange_phone_validation ( self ) :
if self . phone :
self . phone = self . phone_format ( self . phone )
@ api . onchange ( "str" , "str" )
def _onchange_mobile_validation ( self ) :
if self . mobile :
self . mobile = self . phone_format ( self . mobile )
| このpythonコードに誤りはありません。 | code_fix | 4,250 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def OnTouchRecord ( self , event ) :
"str"
self . GetParent ( ) . OnRecordClick ( event )
| このpythonコードに誤りはありません。 | code_fix | 4,251 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def set_font ( self , value ) :
for col , name in enumerate ( AXISLIST ) :
if col > 10 : break
temp = self . wTree . get_object ( "str" + name )
temp . set_property ( "str" , value )
| このpythonコードに誤りはありません。 | code_fix | 4,252 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class TestImportInstaller ( unittest . TestCase ) :
def testInstallingAndUninstalling ( self ) :
import ansible_importer
ansible_importer . install ( "str" )
self . assertEqual ( "str" , sys . path [ - 1 ] )
self . assertEqual ( ansible_importer . AnsibleModuleImporter ,
sys . path_hooks [ - 1 ] )
ansible_importer . uninstall ( "str" )
self . assertFalse ( "str" in sys . path )
self . assertFalse ( ansible_importer . AnsibleModuleImporter in sys . path_hooks )
| このpythonコードに誤りはありません。 | code_fix | 4,253 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
"str"
from . defaults import *
DEBUG = False
| このpythonコードに誤りはありません。 | code_fix | 4,254 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def testIsDriverInSection ( self ) :
"str"
self . this_function_name = sys . _getframe ( ) . f_code . co_name
section = "str"
identifier = "str"
option = "str"
driver = "str"
self . parser = xutils . XUtils ( )
position = self . parser . makeSection ( section , identifier = identifier )
self . parser . addOption ( section , option , driver , position = position )
status = self . parser . isDriverInSection ( driver , sectionsList = [ position ] )
self . failUnless ( status == True , "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,255 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class HelloWorld ( pypro . core . Recipe ) :
def run ( self , runner , arguments ) :
print ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,256 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class TestSearchBarTest ( TestCase ) :
@ classmethod
def setUpClass ( cls ) :
cls . driver = webdriver . Firefox ( )
cls . driver . get ( url )
def test_search_visibility ( self ) :
search_bar_text = "str"
page_content = self . driver . page_source
self . assertTrue ( search_bar_text in page_content )
@ classmethod
def tearDownClass ( cls ) :
cls . driver . quit ( )
| このpythonコードに誤りはありません。 | code_fix | 4,257 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def checkout ( self ) :
"str"
try :
gitter = git . Git ( )
gitter . clone ( self . _url , self . _build_path )
except git . GitCommandError as e :
raise RepositoryError ( "str" % ( self . _build_path , e . __str__ ( ) ) )
except OSError as e :
raise RepositoryError ( "str" % ( self . _build_path , e . strerror ) )
| このpythonコードに誤りはありません。 | code_fix | 4,258 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def discover_all ( ) :
base_schema = discover_help ( )
for class_name , Klass in searchables :
if class_name in base_schema :
continue
search_fields = discover_for_class ( Klass )
base_schema [ class_name ] = prepend_dtype (
search_fields , class_name . lower ( )
)
return base_schema
| このpythonコードに誤りはありません。 | code_fix | 4,259 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def hardNormals ( ) :
"str"
selection = cmds . ls ( sl = True , l = True )
if selection :
objects = list ( set ( cmds . ls ( selection , o = True , l = True ) or [ ] ) )
for obj in objects :
edges = [ e for e in selection if cmds . ls ( e , o = True , l = True ) [ 0 ] == obj ]
cmds . polySoftEdge ( edges , a = 0 )
| このpythonコードに誤りはありません。 | code_fix | 4,260 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
__author__ = "str"
__copyright__ = "str"
__license__ = "str"
import glob
import os
from ConfigParser import NoOptionError , NoSectionError
from . configparserinc import SafeConfigParserWithIncludes , logLevel
from . . helpers import getLogger
logSys = getLogger ( __name__ )
| このpythonコードに誤りはありません。 | code_fix | 4,261 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from . _assets import (
Asset ,
Equity ,
Future ,
make_asset_array ,
CACHE_FILE_TEMPLATE
)
from . assets import (
AssetFinder ,
AssetConvertible ,
AssetFinderCachedEquities
)
__all__ = [
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str" ,
"str"
]
| このpythonコードに誤りはありません。 | code_fix | 4,262 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import os
import cobbler . api as capi
import time
import sys
import random
N = 1000
print ( "str" % N )
api = capi . BootAPI ( )
if not api . profiles ( ) . find ( "str" ) :
print ( "str" )
sys . exit ( 0 )
| このpythonコードに誤りはありません。 | code_fix | 4,263 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def actionTexts ( self ) :
yield "str" , _ ( "str" )
yield "str" , _ ( "str" )
yield "str" , _ ( "str" )
yield "str" , _ ( "str" )
yield "str" , _ ( "str" )
yield "str" , _ ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,264 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def keep_table_together ( elem ) :
table = get_table_row_containing ( elem ) . getparent ( )
style_name = table . attrib [ tg ( "str" ) ]
style_elem = doc . content . automatic_styles . xmlnode . find ( "str" % style_name , nsmap )
properties = style_elem . find ( "str" , nsmap )
print ( "str" % style_name )
properties . attrib [ tg ( "str" ) ] = "str"
| このpythonコードに誤りはありません。 | code_fix | 4,265 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def get_parameters ( self ) :
params = { "str" : len ( self ) , "str" : self . Vth , "str" : self . Cm , "str" : self . El , "str" : self . Eex ,
"str" : self . Einh , "str" : self . Eahp , "str" : self . gl , "str" : self . g_ampa_ ,
"str" : self . g_inh_ , "str" : self . g_ahp_ , "str" : self . tau_ampa ,
"str" : self . tau_inh , "str" : self . tau_ahp , "str" : self . eqns ,
"str" : self . I_spont }
return params
| このpythonコードに誤りはありません。 | code_fix | 4,266 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def date_test ( self , loan_brw , ind , date ) :
error_msg_date_test = "str"
share = loan_brw . share_ids [ ind ]
self . assertEqual ( date , share . payment_date , error_msg_date_test )
| このpythonコードに誤りはありません。 | code_fix | 4,267 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from itertools import izip
from doodle . config import CONFIG
from doodle . core . property import IntegerProperty , StringProperty
from . base_model import JSONModel , SimpleModel
| このpythonコードに誤りはありません。 | code_fix | 4,268 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from haystack import indexes
from memopol . meps . models import MEP
from memopol . base . utils import stripdiacritics
| このpythonコードに誤りはありません。 | code_fix | 4,269 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def run_update ( self ) :
"str"
aliases_to_update = self . args . alias or self . cfg . get_named_recipe_sources ( ) . keys ( )
if not all ( [ self . update_recipe_repo ( x ) for x in aliases_to_update ] ) :
return - 1
| このpythonコードに誤りはありません。 | code_fix | 4,270 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import print_function , division
__all__ = [ "str" ]
from sympy import Matrix , eye , zeros , Dummy
from sympy . utilities . iterables import flatten
from sympy . physics . vector import dynamicsymbols
from sympy . physics . mechanics . functions import msubs
import collections
| このpythonコードに誤りはありません。 | code_fix | 4,271 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import numpy as np
from visual import Visual , RefVar
from galry . tools import hsv_to_rgb
| このpythonコードに誤りはありません。 | code_fix | 4,272 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class Select2ListCreateChoiceFieldTest ( test . TestCase ) :
def test_validate ( self ) :
choice_list = [ "str" , "str" ]
field = autocomplete . Select2ListCreateChoiceField (
choice_list = choice_list )
field . validate ( "str" )
with self . assertRaises ( ValidationError ) :
field . validate ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,273 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def suite ( ) :
tests = [ "str" , "str" , "str" ,
"str" , "str" , "str" , "str" , "str" ]
return unittest . TestSuite ( map ( DeltafyTests , tests ) )
| このpythonコードに誤りはありません。 | code_fix | 4,274 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def unzero ( v ) :
if v == 0 :
return 0.00000001
else :
return v
| このpythonコードに誤りはありません。 | code_fix | 4,275 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _parse_choices ( self , contest_el , contest , result_jurisdiction_lookup ) :
"str"
return [ self . _parse_choice ( c_el , contest , result_jurisdiction_lookup )
for c_el in contest_el . xpath ( "str" ) ]
| このpythonコードに誤りはありません。 | code_fix | 4,276 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def find_successor_from_root ( node : TreeNode , root : TreeNode ) -> TreeNode :
successor = None
while root :
if node . value < root . value :
successor = root
root = root . left
elif node . value > root . value :
root = root . right
else :
break
return successor
| このpythonコードに誤りはありません。 | code_fix | 4,277 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def run_tests ( self ) :
print ( "str" )
self . test_options ( )
self . test_get_no_query ( )
self . test_get_with_query ( )
| このpythonコードに誤りはありません。 | code_fix | 4,278 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class NotificationInvalidCommandError ( NotificationError ) :
"str"
pass
| このpythonコードに誤りはありません。 | code_fix | 4,279 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def cleanup_content ( content ) :
tree = html . fromstring ( content )
core_element = tree . xpath ( "str" )
if core_element :
return html . tostring (
core_element [ 0 ] ,
pretty_print = True ,
encoding = "str"
)
else :
return content
| このpythonコードに誤りはありません。 | code_fix | 4,280 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_existing_username ( self ) :
"str"
name = "str"
username = unique_username ( name )
user = UserFactory ( username = username )
eq_ ( user . username , "str" ,
"str" )
eq_ ( unique_username ( name ) , "str" ,
"str" )
eq_ ( unique_username ( "str" ) , "str" ,
"str" )
| このpythonコードに誤りはありません。 | code_fix | 4,281 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from flask import flash , render_template , url_for
from flask_babel import lazy_gettext as _
from werkzeug . utils import redirect
from wtforms import HiddenField , StringField , SubmitField , TextAreaField
from wtforms . validators import InputRequired
import openatlas
from openatlas import app
from openatlas . forms import DateForm
from openatlas . models . entity import EntityMapper
from openatlas . util . util import link , required_group , truncate_string , uc_first
| このpythonコードに誤りはありません。 | code_fix | 4,282 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class PermitedReusesMetric ( Metric ) :
model = Organization
name = "str"
display_name = _ ( "str" )
def get_value ( self ) :
ids = [ d . id
for d in Dataset . objects ( organization = self . target ) . only ( "str" ) ]
return Reuse . objects ( datasets__in = ids ) . count ( )
| このpythonコードに誤りはありません。 | code_fix | 4,283 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_types_error ( self ) :
self . assertRaisesMessage ( AssertionError , "str" , self . err_func1 , 123 )
self . assertRaisesMessage ( AssertionError , "str" , self . err_func2 )
| このpythonコードに誤りはありません。 | code_fix | 4,284 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_list_methods_many_params ( self ) :
try :
result = api . Backend . xmlclient . conn . system . listMethods ( "str" )
except Fault as f :
print ( f )
assert f . faultCode == 3003
assert f . faultString == (
"str" )
else :
raise AssertionError ( "str" )
| このpythonコードに誤りはありません。 | code_fix | 4,285 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def logged_in ( ) :
return hasattr (
tmpl_context , "str" ) and tmpl_context . account is not None
| このpythonコードに誤りはありません。 | code_fix | 4,286 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import logging
import os
import sys
logger = logging . getLogger ( __name__ )
| このpythonコードに誤りはありません。 | code_fix | 4,287 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from datetime import datetime
from unittest import TestCase , skip
from unittest . mock import Mock , patch
from sqlalchemy import Column , Integer , String , ForeignKey
from sqlalchemy . orm import relationship
from sqlalchemy . orm . collections import InstrumentedList
from pyramidcms import db
| このpythonコードに誤りはありません。 | code_fix | 4,288 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def _initialize_api ( self , video_id ) :
req = sanitized_Request (
"str" , data = "str" )
webpage = self . _download_webpage (
req , None ,
note = "str" ,
errnote = "str" )
if re . search ( "str" , webpage ) :
self . raise_geo_restricted (
"str" % self . IE_NAME )
auth_info = self . _parse_json ( webpage , video_id )
self . _api_url_template = self . http_scheme ( ) + "str" + auth_info [ "str" ]
| このpythonコードに誤りはありません。 | code_fix | 4,289 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def local_app ( app ) :
app . config [ "str" ] = True
return app
| このpythonコードに誤りはありません。 | code_fix | 4,290 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def onDisconnectAction ( self ) :
self . disconnectButton . setEnabled ( False )
self . controller . stopAutomaticConnection ( )
t = threading . Thread ( target = self . controller . performDisconnect )
t . start ( )
| このpythonコードに誤りはありません。 | code_fix | 4,291 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def test_duplicate ( self ) :
feature = Feature . build_from_geometry ( "str" , srid = 4326 )
feature2 = feature . duplicate ( )
self . assertTrue ( feature2 . equals ( feature ) )
| このpythonコードに誤りはありません。 | code_fix | 4,292 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from __future__ import with_statement
import gc
import sys
import wx
from weakref import ref
from time import clock
from contextlib import contextmanager
import sip
from testutil import assert_ownership , check_collected
| このpythonコードに誤りはありません。 | code_fix | 4,293 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
class MyPBKDF2PasswordHasher ( PBKDF2PasswordHasher ) :
"str"
iterations = PBKDF2PasswordHasher . iterations * 100
| このpythonコードに誤りはありません。 | code_fix | 4,294 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import random
LOWER_SYMBOLS = "str" . join ( [ chr ( i ) for i in range ( ord ( "str" ) , ord ( "str" ) + 1 ) ] )
UPPER_SYMBOLS = "str" . join ( [ chr ( i ) for i in range ( ord ( "str" ) , ord ( "str" ) + 1 ) ] )
NUMBERS = "str" . join ( [ str ( i ) for i in range ( 0 , 10 ) ] )
| このpythonコードに誤りはありません。 | code_fix | 4,295 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
import string
transfun = string . maketrans ( "str" , "str" )
hint = "str" . translate ( transfun )
answer = "str" . translate ( transfun )
| このpythonコードに誤りはありません。 | code_fix | 4,296 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def read_char ( self ) :
"str"
if self . input != 0 :
ret = self . input [ 0 ]
self . input = self . input [ 1 : ]
return ret
else :
return sys . stdin . read ( 1 )
| このpythonコードに誤りはありません。 | code_fix | 4,297 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
def assert_dirs_equal ( self , dir1 , dir2 ) :
diff = filecmp . dircmp ( dir1 , dir2 )
self . _assert_dirs_equal_cmp ( diff )
| このpythonコードに誤りはありません。 | code_fix | 4,298 | MIT | bifi | 次に示すpythonコードの誤りを修正しなさい。 |
from django . conf import settings
try :
from django . utils import importlib
except ImportError :
import importlib
from . base import BaseStaticSiteRenderer
from . disk import DiskStaticSiteRenderer
from . appengine import GAEStaticSiteRenderer
from . s3 import S3StaticSiteRenderer
__all__ = ( "str" , "str" ,
"str" , "str" ,
"str" )
| このpythonコードに誤りはありません。 | code_fix | 4,299 | 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.