messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Write python code for the following: Implement monkey patching. It works!\n\nNeeded to fix a few bugs along the way:\n - make sure bind() isn't called twice -- need to be careful about the order\n we load POX modules\n - need to actually send data in send() [even if non-block...
python
new_file
1
2
apache-2.0
87afc656e837d1d48fe050d69e793caa5f4a674d
ucb-sts/sts,jmiserez/sts,ucb-sts/sts,jmiserez/sts
sts/util/socket_mux/pox_monkeypatcher.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement a consistent way to check channel rank requirements" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom zope.interface import impl...
python
new_file
3
3
bsd-3-clause
311a952851e9d2f859607060c387df8079b8ecce
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/core/channellevel.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Change summary map for generating notification emails" }, { "role": "assistant", "content": "from collections import defaultdict\n\nfrom proposal.models import Change, Proposal\nfrom proposal.views import proposal_json\nfrom prop...
python
new_file
1
9
mit
da95ece4472c1988ec8fe9056c8d5b91c79da322
cityofsomerville/citydash,cityofsomerville/cornerwise,cityofsomerville/citydash,codeforboston/cornerwise,cityofsomerville/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/cornerwise,codeforboston/cornerwise
server/user/changes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write a program to prompt for a score between 0.0 and 1.0. If the score is out of range, print an error message. If the score is between 0.0 and 1.0, print a grade using the following table" }, { "role": "assistant", "content": "...
python
new_file
8
0
mit
8c8dd6930a7e9ae983dbc28a095767157ced70bd
let42/python-course
src/conditionals/exercise6.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Increase unit test coverage for exceptions in Packages API.\n\nImplements bp: murano-unit-test-coverage\nCo-Authored-By: David Purcell <<EMAIL>>\nCo-Authored-By: Samantha Blanco <<EMAIL>>\nCo-Authored-By: Julian Sy <<EMAIL>>\n\nChange-Id: Id...
python
new_file
1
5
apache-2.0
07b2fa2df9fb23dc1e3bdd56609b596555644d29
openstack/murano,openstack/murano
murano/tests/unit/packages/test_exceptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Extend capacity of verifiermain.ip field\n\nAdd migration script to extend the ip field capacity to hold up\nto 255 characters.\n\nResolves: #498\nSigned-off-by: Kaifeng Wang <<EMAIL>>" }, { "role": "assistant", "content": "\"\"\...
python
new_file
1
1
bsd-2-clause
23bc365763b0d07d80015b72d43e12a4d0d91bc7
mit-ll/python-keylime,mit-ll/python-keylime,mit-ll/python-keylime,mit-ll/python-keylime
keylime/migrations/versions/8da20383f6e1_extend_ip_field.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to download refseq fungal genomes via FTP" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom __future__ import print_function\nimport ftplib\nimport sys\n\ngenome_list_fh = open(\"downloaded_genomes.txt...
python
new_file
2
0
apache-2.0
19ff1e1999a5132ba7dd84baf446023870620ee9
maubarsom/biotico-tools,maubarsom/biotico-tools,maubarsom/biotico-tools,maubarsom/biotico-tools,maubarsom/biotico-tools
python/download_fungi_genomes_refseq.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Migrate Request revisions to Assessment revisions" }, { "role": "assistant", "content": "# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"\nMigrate requests...
python
new_file
1
1
apache-2.0
229dd6c82e38237e0948b9e5091647990fc11af4
plamut/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core
src/ggrc/migrations/versions/20170130060409_57940269e30_migrate_requests_change_logs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [NF] Test for ECMA loudness computation" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Third party imports\nimport pytest\nfrom numpy import mean\n\n# Local application imports\nfrom mosqito.functions.hearing...
python
new_file
1
2
apache-2.0
da0a626ca6e05d918381653d7c219300d2e12ece
Eomys/MoSQITo
mosqito/tests/loudness/test_loudness_ecma.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [AC-7818] Add a migration to add meeting_info" }, { "role": "assistant", "content": "# Generated by Django 2.2.10 on 2020-05-21 18:52\n\nfrom django.conf import settings\nfrom django.db import migrations, models\nimport django.db...
python
new_file
4
0
mit
e793c88f68429718c8293225c7099dcb31635d3d
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/migrations/0022_add_meeting_info_on_office_hour_model.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add some basic tests for compound validators which can be expanded upon later." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport unittest\n\nfrom formencode import compound, Invalid\nfrom formencode.validat...
python
new_file
4
2
mit
f5ac5b27f1c586e0f3e65ceab633fdae0b040454
formencode/formencode,formencode/formencode,systemctl/formencode,jvanasco/formencode,formencode/formencode,jvanasco/formencode,genixpro/formencode,genixpro/formencode,genixpro/formencode,systemctl/formencode,jvanasco/formencode,systemctl/formencode
tests/test_compound.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Locality management commands" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.test import TestCase\nfrom django.core.management import call_command\nfrom django.core.management.base import...
python
new_file
1
1
bsd-2-clause
5190338818e6eac093525bc2b188070105ce7891
ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites
django_project/localities/tests/test_managementcommands.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for settings handlers" }, { "role": "assistant", "content": "from flask import url_for\n\nimport pytest\n\nimport roomcontrol.utils.localstorage as ls\n\n\nTEST_FILE = \"\"\"\n[settings]\nserverip=0.0.0.0\nnotify=False\...
python
new_file
1
1
mit
25669d7946c5c9faa5f07348580809b33d9ee1d2
miguelfrde/roomcontrol_backend
tests/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration script for deleted osfstorage" }, { "role": "assistant", "content": "import logging\nfrom modularodm import Q\nfrom website.app import init_app\nfrom website.addons.osfstorage.model import OsfStorageFileNode\nfrom s...
python
new_file
1
2
apache-2.0
d62072cd1e01dc37563934cb1b87161ea06ebbaf
zachjanicki/osf.io,arpitar/osf.io,chennan47/osf.io,bdyetton/prettychart,DanielSBrown/osf.io,billyhunt/osf.io,alexschiller/osf.io,mfraezz/osf.io,chrisseto/osf.io,caseyrygt/osf.io,RomanZWang/osf.io,bdyetton/prettychart,lyndsysimon/osf.io,cldershem/osf.io,ZobairAlijan/osf.io,binoculars/osf.io,asanfilippo7/osf.io,Ghalko/os...
scripts/osfstorage/migrate_deleted_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to remove Emails associated with unconfirmed users\n\nThere should not be any Email records for unconfirmed users.\nThese users would not be able to log in nor confirm their email" }, { "role": "assistant", "content...
python
new_file
1
4
apache-2.0
14d9f4c6cdea8b2bac1ea199509a5da49ae3d85a
felliott/osf.io,chrisseto/osf.io,leb2dg/osf.io,cslzchen/osf.io,pattisdr/osf.io,erinspace/osf.io,caneruguz/osf.io,sloria/osf.io,chrisseto/osf.io,baylee-d/osf.io,brianjgeiger/osf.io,HalcyonChimera/osf.io,pattisdr/osf.io,mattclark/osf.io,adlius/osf.io,brianjgeiger/osf.io,mfraezz/osf.io,cslzchen/osf.io,TomBaxter/osf.io,Hal...
osf/migrations/0037_remove_emails_for_unconfirmed_users.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nOutput the collected values to . Zer0MQ pub/sub channel\n\"\"\"\n\nfrom Handler import Handler\n\nimport zmq\n\nclass zmqHandler ( Handler ):\n \"\"\"\n Implements the abstract Handler class, sending data to a Zer0MQ pub channel...
python
edit
1
1
mit
d15472fec9b3bbc589099409376191eb7a93eac6
works-mobile/Diamond,signalfx/Diamond,Ssawa/Diamond,Ensighten/Diamond,h00dy/Diamond,janisz/Diamond-1,thardie/Diamond,Ssawa/Diamond,saucelabs/Diamond,Basis/Diamond,Ensighten/Diamond,Netuitive/Diamond,cannium/Diamond,zoidbergwill/Diamond,bmhatfield/Diamond,datafiniti/Diamond,metamx/Diamond,mzupan/Diamond,cannium/Diamond,...
src/diamond/handler/zmq_pubsub.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to calculate registration trends" }, { "role": "assistant", "content": "from competition.models import Competition\n\nimport collections\nimport csv\nimport datetime\nimport itertools\nimport json\nimport StringIO\n\n\...
python
new_file
3
3
bsd-3-clause
128d16d236a6e02218b9e3d9212d9f7d37fc99e3
siggame/webserver,siggame/webserver,siggame/webserver
scripts/registration_trends.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a basic unit test" }, { "role": "assistant", "content": "import requests\nfrom tornalet import tornalet\nfrom trequests import setup_session\nfrom tornado.ioloop import IOLoop\nfrom tornado.escape import json_decode\nfrom tor...
python
new_file
1
2
bsd-3-clause
50536bd56904158d0a5c5587c62b76a6ce8745be
isaacnotnwton/trequests,1stvamp/trequests,pandada8/trequests
tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add day 2 part 2 solution." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport re\n\ntotal = 0\n\nwith open('../inputs/02.txt') as f:\n for line in f:\n # data is like \"1x2x3\"\n matches = re.split...
python
new_file
3
0
mit
bf616f52a2a90fc04921e22a530ab1038eb15b4b
opello/adventofcode
python/02-2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add acceptance test for vital" }, { "role": "assistant", "content": "import unittest\nfrom pathlib import Path\nimport subprocess\n\n\nclass TestVintDoNotDiedWhenLintingVital(unittest.TestCase):\n def assertVintStillAlive(self...
python
new_file
1
2
mit
7a3f15c011447374dcd782a7eb5953534c25f09f
Kuniwak/vint,RianFuro/vint,Kuniwak/vint,RianFuro/vint
test/acceptance/test_cli_vital.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement the autojoin on connect module" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom txircd.channel import IRCChannel\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom zope.int...
python
new_file
1
4
bsd-3-clause
414f70d3c378353fb29664db3b4c980c664b2f60
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/extra/conn_join.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add AWS Hourly Spending Anomaly Detection\n\nNew plugin checks hourly spending data for all AWS instances and sends\nan alert if the cost threshold has been exceeded.\n\n[DEV-13347]" }, { "role": "assistant", "content": "\"\"\"\n...
python
new_file
1
3
apache-2.0
0701fae308161caf92ac89b8d8fc765258c6f38f
CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge
actions/cloudbolt_plugins/aws/spending_anomaly_detection/hourly_spending_anomaly_detection.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add validator for all testcase in dir" }, { "role": "assistant", "content": "import re\nimport os\nimport sys\nimport subprocess\nfrom natsort import natsort_keygen, ns\n\nif len(sys.argv) < 2:\n print('python3 validator_all.p...
python
new_file
3
9
mit
c00187d36ff625e7b78861d326452efb97fb2498
sunset1995/YA-SAT,sunset1995/YA-SAT,sunset1995/YA-SAT
utils/validator_all.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test of empty geometry collection creation." }, { "role": "assistant", "content": "import unittest\nfrom shapely.geometry.collection import GeometryCollection\n\nclass CollectionTestCase(unittest.TestCase):\n def test_arra...
python
new_file
1
1
bsd-3-clause
e2caa28af50b5c053b8da248c3b05b3a3bb33be0
mindw/shapely,mouadino/Shapely,mouadino/Shapely,mindw/shapely,abali96/Shapely,jdmcbr/Shapely,jdmcbr/Shapely,abali96/Shapely
shapely/tests/test_collection.py
rejected_duplicate
Near-duplicate of sample 10711
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights pressure gauges problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Pressure Gauges Problem\n\n\ndef pressureGauges(morning, evening):\n return [list(map(min, zip(morning, ev...
python
new_file
1
3
mit
1ff90eec99c1d0f8130552c9f4323f3b099a8231
HKuz/Test_Code
CodeFights/pressureGauges.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple spark on mesos test" }, { "role": "assistant", "content": "import pytest\n\nfrom hdfs.client import Client\n\nimport utils\n\n\ndef setup_module(module):\n utils.invoke('install', 'spark')\n\n\n@utils.vagranttest\nd...
python
new_file
3
1
apache-2.0
67326682df2efaf013830df5985f479e5d0ce19c
danielfrg/datasciencebox,danielfrg/datasciencebox,danielfrg/datasciencebox,danielfrg/datasciencebox
datasciencebox/tests/salt/test_mesos_spark.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add ratechecker migration to remove_fee_loader" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.22 on 2019-10-31 16:33\nfrom __future__ import unicode_literals\n\nfrom django.db import mi...
python
new_file
1
0
cc0-1.0
db8b342e999cc75cd776d8ca1821522145610d1d
cfpb/owning-a-home-api
ratechecker/migrations/0002_remove_fee_loader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to display statistics about games result." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)\n\n# Permission is hereby ...
python
new_file
1
2
mit
871cba8009b383c89023dbc39db75be27bad0ee0
jeremiedecock/tictactoe-py,jeremiedecock/tictactoe-py
utils/stats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add commandline command for creating accounting data." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.core.management.base import BaseCommand\nfrom django.utils.translation import activate\n\nfrom kirp...
python
new_file
1
2
mit
f9524d36fa2b43a71726b7935af5d8d57c88a426
jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu,jlaunonen/kirppu
kirppu/management/commands/accounting_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add notification for alliance selections" }, { "role": "assistant", "content": "from consts.notification_type import NotificationType\nfrom helpers.model_to_dict import ModelToDict\nfrom notifications.base_notification import Bas...
python
new_file
1
1
mit
2570564f9b6334a14e1b06c3cc71afa3576f6e22
phil-lopreiato/the-blue-alliance,josephbisch/the-blue-alliance,bdaroz/the-blue-alliance,josephbisch/the-blue-alliance,jaredhasenklein/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,nwalters512/the-blue-alliance,nwalters512/the-blue-alliance,bvisness/the-blue-al...
notifications/alliance_selections.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a real python one-liner" }, { "role": "assistant", "content": "#!/usr/bin/env pypy3\nfrom itertools import permutations as p\n\nprint([i for i in p(set(range(10)) - {1}, 8) if all([i[j] != 0 for j in range(0, 7, 2)]) and (i[0...
python
new_file
1
0
mit
f674dcc0aa16753a3cc26bdd3fa1087f7277a9ed
phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,phiSgr/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,mingchuno/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,dng8888/ABCDEFGHPPP,mingchuno/ABCDEFGHPP...
python-real-one-liner/abcdefghppp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for generating the regexp for which chars to escape." }, { "role": "assistant", "content": "lastback = False\nstartback = 0\n\nunprintable = []\n\nfor i in range(0x7f, 0x10001):\n\tc = chr(i)\n\tthisback = repr(c)[1] =...
python
new_file
1
0
mit
5c9ffdb83bbc2796acc520365f6ce854d39a4c14
LivingLogic/LivingLogic.Javascript.ul4,LivingLogic/LivingLogic.Javascript.ul4,doerwalter/LivingLogic.Javascript.ul4,doerwalter/LivingLogic.Javascript.ul4
makeul4represcapes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add letter logo for Neath Port Talbot Council" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0247_another_letter_org\nRevises: 0246_notifications_index\n\n\"\"\"\n\n# revision identifiers, used by Alem...
python
new_file
1
2
mit
16311a8288eefe00ccb5bfce736ab7e211a0a905
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0247_another_letter_org.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add check for the MMU type under petitboot\n\nWe expect the petitboot kernel to always use radix MMU on Power9. This\ntest case will also test that Power8 is using hash.\n\nIt uses /proc/cpuinfo while booted into the petitboot environment.\n...
python
new_file
3
3
apache-2.0
89b3097e13c8241b26cacde615b792c75524d3d5
open-power/op-test-framework,open-power/op-test-framework,open-power/op-test-framework
testcases/PetitbootMMU.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for message template admin" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.urls import reverse\n\nfrom bluebottle.notifications.models import MessageTemplate\nfrom bluebottle.test.utils impor...
python
new_file
1
1
bsd-3-clause
dccc851f34eebe2e74efcce5141ced166a9baa04
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/notifications/tests/test_admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights replace middle problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Replace Middle Problem\n\n\ndef replaceMiddle(arr):\n n = len(arr)\n if n % 2 == 1:\n return arr\...
python
new_file
1
3
mit
f6ca3abbcb621135acd39c0556df2b5f672cc286
HKuz/Test_Code
CodeFights/replaceMiddle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for over-riding author info" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom opentreetesting import test_http_json_method, config\nimport datetime\nimport codecs\nimport json\nimport sys\nimport os\n\...
python
new_file
1
0
bsd-2-clause
02832aee17b4cae8dc49a035bc8c6d11a69dd7ac
leto/new_opentree_api,leto/new_opentree_api
ws-tests/test_valid_study_put_override_author.py
rejected_duplicate
Near-duplicate of sample 9765
true
[ { "role": "user", "content": "Write python code for the following: Add an example script to search through every mailbox" }, { "role": "assistant", "content": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n\"\"\"Use IMAP CLI to search trhough every mailbox on an account.\"\"\"\n\n\nimport...
python
new_file
1
5
mit
a35c7023adbe1aeabce62f02d390f934741cb392
Gentux/imap-cli,Gentux/imap-cli
examples/multimailboxsearch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Initialize Food scraper, add timing scraper" }, { "role": "assistant", "content": "import requests\nfrom bs4 import BeautifulSoup\nfrom collections import OrderedDict\nimport json\nfrom ..scraper import Scraper\n\n\nclass Food(Sc...
python
new_file
3
4
mit
832b22df0dc8cc7d9b4a3ae4095d5508b732978f
kshvmdn/uoft-scrapers,cobalt-uoft/uoft-scrapers,arkon/uoft-scrapers,g3wanghc/uoft-scrapers
uoftscrapers/scrapers/food/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Rename relevant columns on the requests table" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see...
python
new_file
1
1
apache-2.0
98b317f0727b53cee2faefb0a7eaa977bceb13d5
edofic/ggrc-core,kr41/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,selahssea/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,VinnieJohns...
src/ggrc/migrations/versions/20160317173315_3715694bd315_rename_date_columns_in_requests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for middleware" }, { "role": "assistant", "content": "from django.http.response import HttpResponse\nfrom django.test import TestCase\nfrom mock import MagicMock\n\nfrom rewrite_external_links.middleware import Re...
python
new_file
1
1
bsd-2-clause
4756856a1f146b39103e50abcda41c5ecf8e89e9
incuna/django-rewrite-external-links,incuna/django-rewrite-external-links
tests/test_middlewares.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport six\n\nfrom sentry.api.serializers import Serializer, register\nfrom sentry.models import Commit, CommitFileChange\nfrom sentry.api.serializers.models.release import get_users_for_commits\n\n...
python
edit
1
4
bsd-3-clause
c0f7dc1dcfdbabff116f8d7132b191397fd9007f
looker/sentry,JackDanger/sentry,mvaled/sentry,gencer/sentry,beeftornado/sentry,jean/sentry,jean/sentry,BuildingLink/sentry,ifduyue/sentry,mvaled/sentry,ifduyue/sentry,BuildingLink/sentry,looker/sentry,JamesMura/sentry,looker/sentry,jean/sentry,gencer/sentry,JamesMura/sentry,ifduyue/sentry,JamesMura/sentry,BuildingLink/...
src/sentry/api/serializers/models/filechange.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix naming of location in meeting" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.5 on 2017-09-11 16:58\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\n...
python
new_file
1
0
mit
4153237428b73c85062d1842aecc96c8ca42d06e
meine-stadt-transparent/meine-stadt-transparent,meine-stadt-transparent/meine-stadt-transparent,meine-stadt-transparent/meine-stadt-transparent,meine-stadt-transparent/meine-stadt-transparent
mainapp/migrations/0010_auto_20170911_1858.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add stub class for future analysis class" }, { "role": "assistant", "content": "import camoco as co\n\nclass Analysis(object):\n '''\n Perform an analysis based on CLI arguments:\n set up, event loop, tear down\n...
python
new_file
19
4
mit
e5dad84c986e94fe85c5923130ecc9e379ae2c93
schae234/Camoco,schae234/Camoco
camoco/cli/commands/Analysis.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Write python code for the following: Add a simple load test." }, { "role": "assistant", "content": "# A simple loadtest using locust.\n# launch using: locust -f simpleloadtest.py --host=http://pencilcode.net\n\nfrom locust import HttpLocust, TaskSet, task\nimport si...
python
new_file
3
4
mit
c0ad7a6e3048b7691daabeef7779f044709d6a81
davidbau/pencilcode,davidbau/pencilcode,sakagg/pencilcode,dweintrop/pencilcode,cacticouncil/pencilcode,sakagg/pencilcode,Dinuka2013513/pencilcode,davidbau/pencilcode,davidbau/pencilcode,Dinuka2013513/pencilcode,xinan/pencilcode,davidbau/pencilcode,PencilCode/pencilcode,cacticouncil/pencilcode,cacticouncil/pencilcode,dw...
admin/simpleloadtest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add aproximate pattern count algorithm" }, { "role": "assistant", "content": "from hamming_distance import hamming_distance\n\ndef approximate_pattern_count(text, pattern, d):\n count = 0\n pattern_length = len(pattern)\n for ...
python
new_file
2
3
mit
e83a58de8b0ac7c2d8ed001d5d4d609d2005d7d8
dennis95stumm/bioinformatics_algorithms,dennis95stumm/bioinformatics_algorithms
approximate_patern_count.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for wire invoice factory" }, { "role": "assistant", "content": "from decimal import Decimal\nfrom django.core import mail\n\nfrom corehq.apps.accounting.tests.test_invoicing import BaseInvoiceTestCase\nfrom corehq.apps.accou...
python
new_file
4
1
bsd-3-clause
d5950a23679753e5cfb70b4955b45dcf9298faec
dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq
corehq/apps/accounting/tests/test_wire_invoice.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Copy of rfsom_example.py except with 200 steps instead of 10000, and a topo.gui.link_to_sim() call" }, { "role": "assistant", "content": "\n\nfrom topo.inputsheet import *\nfrom topo.kernelfactory import *\nfrom topo.simulator im...
python
new_file
3
0
bsd-3-clause
78ebafc9364fac9bdad3ba3172c645f35673bec7
ioam/svn-history,ioam/svn-history,ioam/svn-history,ioam/svn-history,ioam/svn-history
examples/gui_example.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add nose tests for BMI methods" }, { "role": "assistant", "content": "from nose.tools import assert_is, assert_equal\nfrom bmi_ilamb import BmiIlamb\n\ndef test_component_name():\n component = BmiIlamb()\n name = component....
python
new_file
1
1
mit
d421a51be6b8bc0cc30228f26e3e22ea62814efa
permamodel/bmi-ilamb
bmi_ilamb/tests/test_bmi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add two tests for dart client" }, { "role": "assistant", "content": "import json\nfrom indra.literature.dart_client import jsonify_query_data\n\n\ndef test_timestamp():\n # Should ignore \"after\"\n assert jsonify_query_dat...
python
new_file
1
1
bsd-2-clause
6f148fb1bb047b4977c8fcd1d898c231bed3fc9d
sorgerlab/belpy,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,sorgerlab/indra,bgyori/indra,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,johnbachman/indra,johnbachman/belpy,johnbachman/indra
indra/tests/test_dart_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set postage for all existing templates to service default" }, { "role": "assistant", "content": "\"\"\"\n\nRevision ID: 0253_set_template_postage\nRevises: 0252_letter_branding_table\nCreate Date: 2019-01-30 16:47:08.599448\n\n\"...
python
new_file
3
1
mit
c32fdfa008d89cdbab7bd06529647958224a4e49
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0253_set_template_postage_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to measure title length statistics" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Script to measure title length statisics\"\"\"\nfrom itertools import cycle\nimport numpy as np\nfrom iscc_bench....
python
new_file
1
3
bsd-2-clause
de79ece940d244d2346b45cb27840f4bfbb32b20
coblo/isccbench
iscc_bench/title_length.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create migration to load POS fixture data" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.db import models, migrations\nfrom django.core.management import call_command\n\napp_name = 'api'\nfixture = mo...
python
new_file
4
1
mit
f4c4ceb7eb3dcdc80c343ef53d9146a664fb6107
LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search
site/api/migrations/0009_load_pos_fixture_data.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Switch myisam to innodb for fulltext_record_properties\n\nThis change was made because fulltext record properties table\ncrashed on grc-dev and grc-test. The issue was resolved with\nREPAIR TABLE clause. Running the reindex script did not he...
python
new_file
1
1
apache-2.0
53718f877a97fdff6e2a0862f6f6313c5ece5593
uskudnik/ggrc-core,NejcZupec/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,hyperNURb/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,josthkko/ggrc-co...
src/ggrc/migrations/versions/20140930092005_53bb0f4f6ec8_switch_fulltext_record_properties.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for: Remove Duplicates from Sorted Array" }, { "role": "assistant", "content": "\"\"\"\nPlease read this as markdown:\n\n# Algorithm description\n\nProblem statement: https://leetcode.com/explore/interview/card/top-i...
python
new_file
1
4
mit
625ab38d0509d43620292f471bccee38d66d1fe6
julianespinel/trainning,julianespinel/training,julianespinel/training,julianespinel/training,julianespinel/trainning,julianespinel/training
leetcode/remove_duplicates_from_sorted_array.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example how to draw Bezier curves.\n\nThe vispy.geometry.curves module provides several helper\nfunctions to generate the right vertices for a nice curved\nline." }, { "role": "assistant", "content": "# -*- coding: utf-8 -...
python
new_file
1
4
bsd-3-clause
5ac31a4baedc9ee6e704392e8c42dd474199fb90
bollu/vispy,sbtlaarzc/vispy,QuLogic/vispy,srinathv/vispy,RebeccaWPerry/vispy,drufat/vispy,bollu/vispy,michaelaye/vispy,ghisvail/vispy,drufat/vispy,ghisvail/vispy,RebeccaWPerry/vispy,QuLogic/vispy,kkuunnddaannkk/vispy,jay3sh/vispy,inclement/vispy,julienr/vispy,dchilds7/Deysha-Star-Formation,michaelaye/vispy,srinathv/vis...
examples/basics/visuals/bezier.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests: Add initial test suite for nighttrain.tasks module\n\nThis overlaps with the main test suite so far, but will be useful once\nthe task list format becomes more complex." }, { "role": "assistant", "content": "# Copyright 20...
python
new_file
1
1
apache-2.0
1a81ef87d7d763957533f0f9e62b12834bfb38bb
ssssam/nightbus,ssssam/nightbus
tests/test_tasks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create migration after upgrading to mezzanine 4" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport mezzanine.core.fields\n\n...
python
new_file
3
0
mit
68de70260e4ad9649ada6ef283e2ec93ac732762
jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website
website/jdpages/migrations/0002_auto_orderfield_verbose_name.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module for wolfram alpha queries via their API\n\n\ngit-svn-id: 056f9092885898c4775d98c479d2d33d00273e45@330 dda364a1-ef19-0410-af65-756c83048fb2" }, { "role": "assistant", "content": "import requests\nimport urllib\nimport l...
python
new_file
1
6
bsd-3-clause
f3f7db3064afea812c47c1edd3115ce5cec2b558
aapa/pyfibot,aapa/pyfibot,rnyberg/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,EArmour/pyfibot,huqa/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot
modules/module_wolfram_alpha.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\n\nfrom Handler import Handler\nimport urllib2\n\n\nclass HttpPostHandler(Handler):\n\n# Inititalize Handler with url and batch size\n def __init__(self, config=None):\n Handler.__init__(self,...
python
edit
1
2
mit
befadd8fc0482adb55f63ac51166f2330c897d7a
szibis/Diamond,sebbrandt87/Diamond,TinLe/Diamond,datafiniti/Diamond,Ssawa/Diamond,ramjothikumar/Diamond,signalfx/Diamond,codepython/Diamond,mfriedenhagen/Diamond,thardie/Diamond,works-mobile/Diamond,cannium/Diamond,eMerzh/Diamond-1,actmd/Diamond,Netuitive/Diamond,jriguera/Diamond,TinLe/Diamond,bmhatfield/Diamond,hvnswe...
src/diamond/handler/httpHandler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert an image to grayscale and resize it." }, { "role": "assistant", "content": "#!/bin/env python3\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.ndimage import imread\n\ndef rgb2gray(img):\n\treturn np.do...
python
new_file
1
1
mit
be0d4b9e2e62490cab62a39499e570bdab1ac2f5
HKervadec/cmp_imgs
cmp_imgs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for memoize_request" }, { "role": "assistant", "content": "# This file is part of Indico.\n# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redist...
python
new_file
1
2
mit
880c69f0de40c4ad4ec0eddf65e10b3bbd955c6f
ThiefMaster/indico,indico/indico,ThiefMaster/indico,OmeGak/indico,pferreir/indico,mvidalgarcia/indico,DirkHoffmann/indico,mvidalgarcia/indico,mic4ael/indico,DirkHoffmann/indico,indico/indico,OmeGak/indico,ThiefMaster/indico,pferreir/indico,mic4ael/indico,indico/indico,DirkHoffmann/indico,mvidalgarcia/indico,indico/indi...
indico/util/caching_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Clean up an old index in sentry_groupedmessage\n\nThe original migration version 0015 was supposed to remove this, but the\nordering of the index fields in the migration script didn't match the\nactual index.\n\n0015 has:\n\n db.delete_uniq...
python
new_file
4
1
bsd-3-clause
3095e39499df1db93c7fd8771f44504a38986fde
looker/sentry,SilentCircle/sentry,vperron/sentry,jokey2k/sentry,rdio/sentry,gencer/sentry,daevaorn/sentry,pauloschilling/sentry,SilentCircle/sentry,alexm92/sentry,songyi199111/sentry,ifduyue/sentry,mvaled/sentry,ewdurbin/sentry,alexm92/sentry,kevinlondon/sentry,Kryz/sentry,looker/sentry,BayanGroup/sentry,nicholasserra/...
src/sentry/migrations/0063_remove_bad_groupedmessage_index.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a test case for invalid log level friendly error message during service setup." }, { "role": "assistant", "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See ...
python
new_file
1
1
apache-2.0
a809ba1af45726f8aed7ba4b079063629406c52b
StackStorm/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2
st2common/tests/unit/test_service_setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add recursive binary search implementation" }, { "role": "assistant", "content": "\ndef binary_search(array, low, high, item):\n\n if(low>high) :\n return -1\n\n mid = (low + high)//2\n\n if(item == array[mid]):\n...
python
new_file
1
5
mit
2de823ae11e1337f114457bf4e49275d8d2eda99
arafat-al-mahmud/algorithms-python
recursive_binary_search.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for retriever context factory" }, { "role": "assistant", "content": "import unittest\nfrom robotide.namespace.namespace import _RetrieverContextFactory\nfrom robot.parsing.model import ResourceFile\nfrom robot.utils.asse...
python
new_file
1
2
apache-2.0
20d7a5cff131448f1960ac8cd03550739e19d698
robotframework/RIDE,caio2k/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE,fingeronthebutton/RIDE,caio2k/RIDE,caio2k/RIDE,HelioGuilherme66/RIDE
utest/namespace/test_retrievercontextfactory.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a migration for threat actor -> threat" }, { "role": "assistant", "content": "# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LI...
python
new_file
1
1
apache-2.0
447206a785b9563e82dfbd28e1cd2c5ef10a57f2
plamut/ggrc-core,andrei-karalionak/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,jmakov/ggrc-core,prasannav7/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,josthkko/g...
src/ggrc_risks/migrations/versions/20151029154646_2837682ad516_rename_threat_actors_to_threat.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test of the timing module" }, { "role": "assistant", "content": "from test_support import verbose\nimport timing\n\nr = range(100000)\nif verbose:\n print 'starting...'\ntiming.start()\nfor i in r:\n pass\ntiming.finish()\n...
python
new_file
6
0
mit
6be193e6287a1823d6216205e5dbdbcb46895612
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_timing.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add sound recording tool with arecord and lame" }, { "role": "assistant", "content": "# coding: utf-8\n\nimport os\nimport re\nimport shlex\nfrom subprocess import Popen, PIPE\n\n\ndef available_devices():\n devices =[]\n\n ...
python
new_file
2
6
apache-2.0
e38211248504bb87b73775e0157a7e1d2dace6ed
nknytk/home-recorder,nknytk/home-recorder
lib/util/lamearecord.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sampler for conditional LFW(crop)" }, { "role": "assistant", "content": "from pylearn2.utils import serial\nimport sys\n_, model_path = sys.argv\nmodel = serial.load(model_path)\nspace = model.generator.get_output_space()\nfr...
python
new_file
5
0
bsd-3-clause
7d7699bd40b84aee3d210899999c666044943814
hans/adversarial
show_samples_lfw_conditional.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add test for ALWAYS_PUBLIC injection behavior" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom nose.tools import assert_in\nfrom unittest import TestCase\n\nfrom framework.auth import oauth_scopes\n\nclass Tes...
python
new_file
1
2
apache-2.0
2adea388d387ff78778dc4e79045ff3d9a6780ae
monikagrabowska/osf.io,HalcyonChimera/osf.io,adlius/osf.io,Johnetordoff/osf.io,leb2dg/osf.io,DanielSBrown/osf.io,cwisecarver/osf.io,DanielSBrown/osf.io,monikagrabowska/osf.io,Nesiehr/osf.io,adlius/osf.io,cslzchen/osf.io,wearpants/osf.io,caseyrollins/osf.io,CenterForOpenScience/osf.io,hmoco/osf.io,mattclark/osf.io,alexs...
tests/framework_tests/test_oauth_scopes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to drop now-unused supplier_framework columns\n\nThe recent addition of the framework_agreement table means that these columns\nare no longer needed. (They are no longer referred to anywhere in the API code.)" }, { "rol...
python
new_file
1
1
mit
e06590cf16cbf2e52c247c6e5a518103cf4278c2
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/780_remove_unused_cols.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to artificially increase the size of graphs by replicating all nodes and their links" }, { "role": "assistant", "content": "import sys\nimport commentjson as json\nimport os\nimport argparse\nimport numpy as np\nimport...
python
new_file
5
0
mit
cd003fa1d57b442d6889442d0b1815fc3312505c
chaubold/hytra,chaubold/hytra,chaubold/hytra
toolbox/replicate_graph.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: migrations: Add migration to set default value of enable_read_receipts.\n\nThis migration set default value of enable_read_receipts to True\nfor existing realms which require an invitation to join." }, { "role": "assistant", "con...
python
new_file
1
1
apache-2.0
09b35b09c5265ebff9dffbef876df1100a569339
andersk/zulip,zulip/zulip,zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,rht/zulip,andersk/zulip,rht/zulip,zulip/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip
zerver/migrations/0405_set_default_for_enable_read_receipts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add negative test for cluster show\n\nThe negative tests in tempest will check the exceptions raised\nfrom an invalid request, so this patch will follow. It will request\na invalid cluster and check the NotFound error.\n\nChange-Id: Ib602800...
python
new_file
1
1
apache-2.0
9e0acc72cf34659c3a95a3495cfa4c5536bb15b7
openstack/senlin,openstack/senlin,openstack/senlin,stackforge/senlin,stackforge/senlin
senlin/tests/tempest/api/clusters/test_cluster_show_negative.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nVERSION = \"0.0.8\" # Add User-Agent and optional token encoding with sense.app_secret key.\n#\"0.0.7\": Fix a bug in Feed instance_url (case of adressing a feed by type on a retrieved feed)\n# 0.0.6: Allow addressing feed by node uid + fee...
python
edit
1
0
mit
cf8934f07b9d5a7b022d4030f8549f05e6391e35
Sense-API/sense-python-client
sense/version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unittest for utility functions of optimizer" }, { "role": "assistant", "content": "from unittest import TestCase\nimport numpy as np\nfrom chainer import cuda, Optimizer\nfrom chainer.optimizer import _sqnorm\n\ncuda.init()\n...
python
new_file
3
1
mit
688fd5fb5a4dcc754ab13ccc7db7d43f56088c71
muupan/chainer,1986ks/chainer,kikusu/chainer,wkentaro/chainer,tscohen/chainer,ytoyama/yans_chainer_hackathon,rezoo/chainer,delta2323/chainer,AlpacaDB/chainer,hvy/chainer,jnishi/chainer,hvy/chainer,keisuke-umezawa/chainer,cupy/cupy,cupy/cupy,minhpqn/chainer,niboshi/chainer,hvy/chainer,wavelets/chainer,chainer/chainer,ke...
tests/test_optimizer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for computing nullspace of the Schur operator" }, { "role": "assistant", "content": "from firedrake import *\nfrom firedrake.slate.preconditioners import create_schur_nullspace\nimport numpy as np\n\nmesh = UnitCubedSphe...
python
new_file
4
0
mit
59835b91ee82a8d5d12d27992b6494f9487f6848
thomasgibson/firedrake-hybridization
testing/schur_nullspace.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\ntry:\n from importlib import import_module\nexcept ImportError:\n # for Python 2.6, fall back on django.utils.importlib (deprecated as of Django 1.7)\n from django.utils.importlib import import_mod...
python
edit
1
4
bsd-3-clause
edd8ac2d77b747cffbcf702e71f2633a148d64c6
kaedroho/wagtail,willcodefortea/wagtail,JoshBarr/wagtail,takeshineshiro/wagtail,torchbox/wagtail,dresiu/wagtail,m-sanders/wagtail,jnns/wagtail,bjesus/wagtail,jorge-marques/wagtail,nilnvoid/wagtail,timorieber/wagtail,rsalmaso/wagtail,Toshakins/wagtail,tangentlabs/wagtail,nimasmi/wagtail,WQuanfeng/wagtail,timorieber/wagt...
wagtail/wagtailcore/hooks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command line tool to import metadata" }, { "role": "assistant", "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport os\nimport csv\n\nfrom django.core.management.base import BaseCommand\n\nfrom emgapimetadata imp...
python
new_file
4
7
apache-2.0
0798e457957b3db8f5de1891900d639961d78a0f
EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi
emgapimetadata/management/commands/test-data.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for simple char creation" }, { "role": "assistant", "content": "import npc\nimport pytest\nimport os\n\n@pytest.fixture\ndef characters(campaign, prefs):\n os.mkdir(prefs.get('paths.characters'))\n return campaign...
python
new_file
1
2
mit
bffbc23b730081b5cd071a50c2755ecee4adfe99
aurule/npc,aurule/npc
tests/test_create_simple.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add rabbitmq request reply server" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport pika\n\nconnection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))\n\nchannel = connection.channel()\n\...
python
new_file
1
3
mit
00bd680b7711d48b22043308871d91d560a69944
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
rabbitmq-req-rep-server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Apply it 1 from lecture 4 added" }, { "role": "assistant", "content": "# Temperature Conversion Program (Celcius-Fahrenheit / Fahrenheit-Celcius)\n\n# Display program welcome\nprint('This program will convert temperatures (Fahren...
python
new_file
3
0
mit
619dcc460dc54dc06555b6bf880ed1c50b3d5dda
NAU-CFL/Python_Learning_Source
scripts/two_way_temperature_conversion.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for password hashing and checking" }, { "role": "assistant", "content": "import hashlib\n\nfrom virtool.utils import random_alphanumeric\nfrom virtool.users import hash_password, check_password, check_legacy_password\n\...
python
new_file
1
1
mit
0ef78781d0c4048f2fbe26c05cf81b3ec4f59d26
virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool
virtool/tests/test_users.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python 2 and 3 solution for Nov. 2013 Bronze Problem 1" }, { "role": "assistant", "content": "import itertools\n\ndef read_combo(file):\n\treturn [int(x) - 1 for x in file.readline().split()];\n\ndef permute(combo, size):\n\t...
python
new_file
1
4
mit
a60968a4f75067e56e32a55539b8fe2e90e67665
hsun324/usaco-solutions,hsun324/usaco-solutions
2013-nov-bronze/1-combo/py/main.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for availability_zone_client\n\nThis patch adds unit test for availability_zone_client.\n\nChange-Id: I9f043f0cf864773cbd15c23f776487a729c09692" }, { "role": "assistant", "content": "# Copyright 2015 NEC Corporatio...
python
new_file
1
2
apache-2.0
6f19bb060f0cd906763cd5875227cdb6afb24c7b
bigswitch/tempest,tonyli71/tempest,zsoltdudas/lis-tempest,Juniper/tempest,bigswitch/tempest,LIS/lis-tempest,vedujoshi/tempest,vedujoshi/tempest,flyingfish007/tempest,Tesora/tesora-tempest,izadorozhna/tempest,Tesora/tesora-tempest,rakeshmi/tempest,flyingfish007/tempest,pczerkas/tempest,pczerkas/tempest,tonyli71/tempest,...
tempest/tests/services/compute/test_availability_zone_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for provincial legislatures page" }, { "role": "assistant", "content": "from tests import PMGLiveServerTestCase\nfrom tests.fixtures import dbfixture, HouseData, CommitteeData\nfrom pmg.models import House\nfrom pmg.view...
python
new_file
3
1
apache-2.0
bc8292286bc372a58c3dca70af179536bff7c67a
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
tests/views/test_provincial_legislatures_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for meta names" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.3 on 2017-07-04 17:55\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclass...
python
new_file
1
0
mit
ae900a60b714e76b9c3d4310b3ed9120afa780fe
MiningTheDisclosures/conflict-minerals-data,MiningTheDisclosures/conflict-minerals-data,MiningTheDisclosures/conflict-minerals-data,MiningTheDisclosures/conflict-minerals-data
conflict_minerals_data/api/migrations/0003_auto_20170704_1055.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python 3.8 f-string debugging specifier." }, { "role": "assistant", "content": "\"\"\"\nPython 3.8 にて導入された f-string での {xxx=} 表記についてのサンプルです。\n\nREFERENCES:: http://bit.ly/2NlJkSc\n\"\"\"\nfrom trypython.common.commoncls impor...
python
new_file
1
1
mit
467ba634991629affc3a53bef2e93ed02d7d1ae7
devlights/try-python
trypython/py38/fstring_debug.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command to get number of preregistrations by schema" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom django.core.management.base import BaseCommand\nfrom osf.models import Registration, MetaSchema\n\nPRERE...
python
new_file
1
3
apache-2.0
28449fe72be77c9515610e9542ab24ebf6d8b311
TomBaxter/osf.io,mattclark/osf.io,chrisseto/osf.io,caseyrollins/osf.io,leb2dg/osf.io,sloria/osf.io,brianjgeiger/osf.io,binoculars/osf.io,HalcyonChimera/osf.io,aaxelb/osf.io,laurenrevere/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,leb2dg/osf.io,crcresearch/osf.io,mattclark/osf.io,adlius/osf.io,erinspace/osf.io,fellio...
osf/management/commands/count_preregistrations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ENH/DOC: Add an example doing classification on digits.\n\n\n\ngit-svn-id: a2d1b0e147e530765aaf3e1662d4a98e2f63c719@669 22fbfee3-77ab-4535-9bad-27d1bd3bc7d8" }, { "role": "assistant", "content": "\"\"\"\n=========================...
python
new_file
1
0
bsd-3-clause
d7c07abbc50b536531a5f622a089690d5ff5faa3
AlexanderFabisch/scikit-learn,sarahgrogan/scikit-learn,gotomypc/scikit-learn,jpautom/scikit-learn,cainiaocome/scikit-learn,shyamalschandra/scikit-learn,gclenaghan/scikit-learn,chrsrds/scikit-learn,rahuldhote/scikit-learn,ldirer/scikit-learn,sinhrks/scikit-learn,hdmetor/scikit-learn,lucidfrontier45/scikit-learn,cainiaoc...
examples/plot_digits_classification.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for Notification model" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport notifications.models\n\n\ncl...
python
new_file
1
0
bsd-3-clause
b93c75d710e75bf28bf3f007251725195ec7c945
alazaro/django-notifications,letolab/django-notifications,LegoStormtroopr/django-notifications,error0608/django-notifications,iberben/django-notifications,Evidlo/django-notifications,iberben/django-notifications,iberben/django-notifications,LegoStormtroopr/django-notifications,zhang-z/django-notifications,error0608/dja...
notifications/migrations/0004_auto_20150826_1508.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a tool for benchmarking read performance\n\nIt's not installed, on the assumption that it will be used by katdal\ndevelopers, not users." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom __future__ import p...
python
new_file
3
0
bsd-3-clause
02c0c3bd4b5ff7629af35bfb8a21dba38133033e
ska-sa/katdal
scripts/mvf_read_benchmark.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add forgotten table delete for table we don't need" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migration...
python
new_file
3
0
mit
2585d3fac2cedf17a5d851629f8e898d0ed6ec61
Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela
umibukela/migrations/0014_auto_20170110_1019.py
rejected_duplicate
Near-duplicate of sample 5939
true
[ { "role": "user", "content": "Write python code for the following: Add task to summarise concessions" }, { "role": "assistant", "content": "from datetime import date\n\nfrom django.core.management import BaseCommand\n\nfrom dmd.models import NCSOConcession\n\n\nclass Command(BaseCommand):\n d...
python
new_file
1
5
mit
8fa5871adb9b872d1ac1117810b8511a8325ad5c
annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc
openprescribing/dmd/management/commands/summarise_ncso_concessions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add old code from test1." }, { "role": "assistant", "content": "#!/usr/bin/python3\n\n\nimport time\n\n\ndef c_frac(n):\n s = 1\n for i in range(0, n):\n s = 1.0 + 1.0 / s\n\n return s\n\n\nstart_time = time.time()\nprint(c...
python
new_file
1
2
mit
149534662f865793bbff7e54027af6751039a682
djpetti/csci2963-DanielPetti,djpetti/csci2963-DanielPetti,djpetti/csci2963-DanielPetti,djpetti/csci2963-DanielPetti
code/test1/continued_fraction.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport json\n\nimport requests\n\nAPI = 'http://localhost:8000/api/1.0'\nAUTH_PARAMS = {\n 'email': '<EMAIL>',\n 'api_key': 'edfe6c5ffd1be4d3bf22f69188ac6bc0fc04c84b'\n}\n\n# Create dataset\ndataset = {\n '...
python
edit
1
0
mit
a6f291a3beb7ecb7d67b81fe92e7cca6db2139dc
PalmBeachPost/panda,pandaproject/panda,PalmBeachPost/panda,newsapps/panda,ibrahimcesar/panda,pandaproject/panda,NUKnightLab/panda,ibrahimcesar/panda,NUKnightLab/panda,datadesk/panda,PalmBeachPost/panda,PalmBeachPost/panda,NUKnightLab/panda,ibrahimcesar/panda,datadesk/panda,ibrahimcesar/panda,pandaproject/panda,newsapps...
example_scraper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Initialize and declare class Node" }, { "role": "assistant", "content": "class Node:\n\n def __init__(self):\n self.name = ''\n self.weight = 0\n self.code = ''\n\n def initSet(self, name, weight):\n ...
python
new_file
1
1
mit
f497d51a9736cfac5ececaf1a729a04ad74ea8bd
hane1818/Algorithm_HW3_huffman_code
huffman.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to create \"user created\" template" }, { "role": "assistant", "content": "from django.db import migrations\n\nNOTIFICATION_TYPES = ('user_created',)\nLANGUAGES = ['fi']\nDEFAULT_LANGUAGE = 'fi'\n\nFOOTER_FI = 'Tämä...
python
new_file
1
5
mit
5bd191920c0e0fa5bc869999473bc638030e3ba7
City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
notifications/migrations/0003_create_default_user_created_template.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add reconstruct corpus as a test" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport argparse\nimport collections\nimport random\n\nimport sys\n\n\ndef reconstruct(f_in, f_out):\n sentence_starts = []\n\n ...
python
new_file
1
8
apache-2.0
1feb96590df3f10a7205f43d472ce27ec278360e
psmit/kaldi-recipes,psmit/kaldi-recipes,phsmit/kaldi-recipes,phsmit/kaldi-recipes,psmit/kaldi-recipes
spraakbanken/s5/spr_local/reconstruct_corpus.py
accepted
null
true