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: Update script for problem 15 on pe" }, { "role": "assistant", "content": "# projecteuler.net/problem=15\n\ndef main():\n answer = LatticePaths(20)\n print(answer)\n\ndef LatticePaths(x):\n x += 1 # each item represent no...
python
new_file
1
8
apache-2.0
c7fe8e2a186d094d49c7c9218ba63bd8a7cdd024
yuriyshapovalov/Prototypes,yuriyshapovalov/Prototypes,yuriyshapovalov/Prototypes
ProjectEuler/prob15.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for flexget utils (json)" }, { "role": "assistant", "content": "from datetime import datetime\nfrom flexget.utils import json\n\n\nclass TestJson(object):\n\n def test_dt_encode(self):\n date_str = '2016-03-11T...
python
new_file
1
1
mit
ea8b0193845d794b9612b0e78dffa772c15fbca3
JorisDeRieck/Flexget,antivirtel/Flexget,poulpito/Flexget,antivirtel/Flexget,tobinjt/Flexget,crawln45/Flexget,oxc/Flexget,drwyrm/Flexget,Pretagonist/Flexget,jawilson/Flexget,Danfocus/Flexget,sean797/Flexget,LynxyssCZ/Flexget,tarzasai/Flexget,tarzasai/Flexget,dsemi/Flexget,ianstalk/Flexget,OmgOhnoes/Flexget,LynxyssCZ/Fle...
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport re\nfrom flexget.plugin import register_plugin, priority\n\nlog = logging.getLogger('torrent_cache')\n\nMIRRORS = ['http://torrage.com/torrent/',\n 'http://torcache.net/torrent/',\n 'http://zoink.i...
python
edit
1
7
mit
b6f2325c153b499c3b79fdb813d80e5423e4919d
tobinjt/Flexget,tarzasai/Flexget,jacobmetrick/Flexget,offbyone/Flexget,Flexget/Flexget,tvcsantos/Flexget,qk4l/Flexget,jawilson/Flexget,sean797/Flexget,oxc/Flexget,oxc/Flexget,asm0dey/Flexget,Flexget/Flexget,thalamus/Flexget,Danfocus/Flexget,crawln45/Flexget,v17al/Flexget,JorisDeRieck/Flexget,dsemi/Flexget,vfrc2/Flexget...
flexget/plugins/services/torrent_cache.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for existing image" }, { "role": "assistant", "content": "# Copyright 2015 Canonical Ltd\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file...
python
new_file
1
2
apache-2.0
a00822aeb17eabde80adf16c30498472d5775159
tpouyer/nova-lxd,Saviq/nova-compute-lxd,tpouyer/nova-lxd,Saviq/nova-compute-lxd
nclxd/tests/test_container_image.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow channel ops to change the required level for specific permissions" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom txircd.module_interface import IMode, IModuleData, Mode, ModuleData\nfrom txi...
python
new_file
3
4
bsd-3-clause
2a8f064733892b86c2041f3294d5efebd4b565d9
Heufneutje/txircd,ElementalAlchemist/txircd
txircd/modules/extra/channelopaccess.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cli arguments parser tests" }, { "role": "assistant", "content": "from hamcrest import assert_that, is_\nimport pytest\n\nfrom pyhttp.cli import parse_args\n\n\ndef describe_parse_args():\n def it_returns_parsed_arguments(...
python
new_file
3
1
mit
e2c52c768420357b43394df622a32629155c927e
tesonet/pyhttp
tests/unit/test_cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for view_all_talks permission." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migr...
python
new_file
3
0
isc
c699a331ed8976069731f6bc7f61871123810865
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CarlFK/wafer,CTPUG/wafer
wafer/talks/migrations/0002_auto_20150813_2327.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial test for listener module" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport pytest\n\nimport pg_bawler.core\n\n\n@pytest.mark.asyncio\nasync def test_simple_listen():\n\n class NotificationListene...
python
new_file
1
1
bsd-3-clause
9386120ee2d5e27374a53c10ca45bf7b6f0d2e6e
beezz/pg_bawler,beezz/pg_bawler
tests/test_listener.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add local type driver unittests\n\nPartial-Bug: #1269127\n\nChange-Id: I5b34dc09128bcb879ea46be64cc5104eeefd4ab4" }, { "role": "assistant", "content": "# Copyright (c) 2014 Thales Services SAS\n# All Rights Reserved.\n#\n# Lic...
python
new_file
1
1
apache-2.0
b6bb33aae60239d882cd86640313ed9e9802a5cc
gkotton/vmware-nsx,gkotton/vmware-nsx
neutron/tests/unit/ml2/test_type_local.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to test/verify alert configuration\n\nWe're looking to build out another alerter or two, and wanted a way to test our current alert configurations as well as be able to trigger alerts as we developer new alerters." }, { "r...
python
new_file
7
0
mit
ad1121b941a694b7cb6a65e7e6bf4839147f7551
aelialper/skyline,hcxiong/skyline,loggly/skyline,triplekill/skyline,PaytmLabs/skyline,100star/skyline,CDKGlobal/skyline,hcxiong/skyline,loggly/skyline,sdgdsffdsfff/skyline,klynch/skyline,aelialper/skyline,triplekill/skyline,100star/skyline,sdgdsffdsfff/skyline,hcxiong/skyline,loggly/skyline,sdgdsffdsfff/skyline,PaytmLa...
utils/verify_alerts.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add script for downloading the modern PRISM climate data\n\nThe modern PRISM data provides monthly raster precip and temperature measures\nfor the United States from 1981 to present." }, { "role": "assistant", "content": "#retrie...
python
new_file
1
6
mit
da5a3d5bf9d7a6130f05339f36798b3e5d93e7a2
goelakash/retriever,davharris/retriever,goelakash/retriever,davharris/retriever,henrykironde/deletedret,embaldridge/retriever,embaldridge/retriever,embaldridge/retriever,henrykironde/deletedret,davharris/retriever
scripts/prism_4km_monthly_modern.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ZON-4007: Add test for dummy rendering (belongs to commit:be85116)" }, { "role": "assistant", "content": "import zeit.cms.testing\nimport zeit.content.text.jinja\nimport zeit.content.text.testing\n\n\nclass PythonScriptTest(zeit....
python
new_file
1
1
bsd-3-clause
28acda0265c8913e761f9a63315fe17c09a3e5fc
ZeitOnline/zeit.content.text
src/zeit/content/text/tests/test_jinja.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add custom style which imitates the offical coloring\n\n--HG--\nbranch : igor-pro-changes-v2" }, { "role": "assistant", "content": "from pygments.style import Style\nfrom pygments.token import Keyword, Name, Comment, String, Erro...
python
new_file
6
0
bsd-2-clause
a7d8442482b7862b96adf3c8f40015072221f600
dscorbett/pygments,pygments/pygments,dscorbett/pygments,pygments/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,ds...
pygments/styles/igor.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add solution v2 for Labelmaker." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\ndef solve():\n L, N = input().split(' ')\n N = int(N)\n result = ''\n\n while N > 0:\n N...
python
new_file
1
2
mit
a47b82f7feb18da55cf402e363508141764a180f
changyuheng/hacker-cup-solutions
2014/round-1/labelmaker-v2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make some twitter plots of SVR,TOR freq hour\n\nhttps://twitter.com/akrherz/status/703776738422050816\nhttps://twitter.com/akrherz/status/703776599057895424" }, { "role": "assistant", "content": "import matplotlib.colors as mpcol...
python
new_file
1
0
mit
d195358bc5814301e91a97f5d2ae95ede4a72bbc
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/feature/warnings/simple_county.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Tunnel Zone and Tunnel Zone Host API handlers\n\nThis patch adds TunnelzoneHandlerMixin and\nTunnelzonehostHandlerMixin to the core plugin using\ngenerate_methods decorators.\n\nThis patch also adds symbols for 'list', 'show', 'create', ...
python
new_file
1
0
apache-2.0
e3f97f30291a407a54a021d7e4a1805e75c1ec41
midonet/python-neutron-plugin-midonet,midonet/python-neutron-plugin-midonet,JoeMido/networking-midonet,yamt/networking-midonet,midokura/python-neutron-plugin-midonet,yamt/networking-midonet,JoeMido/networking-midonet,midokura/python-neutron-plugin-midonet
midonet/neutron/api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test branja serijskega vmesnika na Ubuntu-ju. \nBranje z naprave Arduino UNO." }, { "role": "assistant", "content": "'''\nCreated on Nov 24, 2013\n\n@author: gregor\n'''\nfrom serial import *\nfrom threading import Thread\n\nlast...
python
new_file
2
2
mit
62513585437d2c86f8668eb26eebb6f8c5a1a656
blazdivjak/rzpproject
Testiranje/Serijski.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for experiment records" }, { "role": "assistant", "content": "''' \nExperiments are recorded in this script\n\n'''\n\n\n# Experiment Date:06/24/2015\ndef compare_lab_tests_and_vitals():\n ''' Compare the ability of ...
python
new_file
2
1
mit
da80b3deb8d1b3a0172a11fb46af99c1af003c56
belemizz/mimic2_tools,belemizz/mimic2_tools
clinical_db/experiment_script.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test script show how we might use the Python logger more effectively\n\n\nFormer-commit-id: cc69a6ab3b6c61fd2f3e60bd16085b81cda84e42\nFormer-commit-id: 28ba0ba57de3379bd99b9f508972cd0520c04fcb" }, { "role": "assistant", "content"...
python
new_file
2
1
mit
de8d507e64894bdaaf036f99f179637c2660f0f1
amdouglas/OpenPNM,amdouglas/OpenPNM,stadelmanma/OpenPNM,PMEAL/OpenPNM,TomTranter/OpenPNM
tests/issue0078.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add svm experiment on test data" }, { "role": "assistant", "content": "from svm import SVMModel\n\nif __name__ == '__main__':\n features = [\n # 'refuting',\n 'ngrams',\n # 'polarity',\n 'named',\n ...
python
new_file
5
0
apache-2.0
2b7a2e0ffde981afd96395e5422eb9574e4ff51f
sarahannnicholson/FNC
svm_experiments.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a script for running pytest with the correct sys.path." }, { "role": "assistant", "content": "# coding=utf-8\n\"\"\"This is a script for running pytest from the command line.\n\nThis script exists so that the project director...
python
new_file
1
0
mit
2cb905a4a0da9650135ab297d9e55c02bc7261c5
Uname-a/knife_scraper,Uname-a/knife_scraper,Uname-a/knife_scraper
pytest_run.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a unit test for flatc" }, { "role": "assistant", "content": "import pytest\n\n\n# TODO: Duplicate code\n# Figure out how to import from flatc.py\ndef get_attrs_dict(attrs):\n attrs_dict = {x[0]: x[1] for x in attrs if len(...
python
new_file
3
4
mit
149879c6029efac02bec30b67d13592287f2898c
adsharma/flattools,adsharma/flattools,adsharma/flattools
tests/test_flatc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: psa: Add a script to validate PSA targets\n\nAdd a script to parse `targets.json` to identify PSA targets and ensure\nmandatory parameters are configured correctly for all PSA targets.\n\nSigned-off-by: Devaraj Ranganna <<EMAIL>>" }, { ...
python
new_file
3
4
apache-2.0
cd88e724f7f2f8293a509db3dc0558904beee6e4
mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed
tools/test/psa/psa_target_config_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add prototype code for testing scalability." }, { "role": "assistant", "content": "# test_scalability.py\n# Ronald L. Rivest with Huasyn Karimi\n\nimport syn2\n\ndef tester(se):\n\n # copy code here from syn2.test; modify as n...
python
new_file
2
1
mit
eb5e6bde589f3598d955c0d7389f7054a3a3c642
ron-rivest/2017-bayes-audit,ron-rivest/2017-bayes-audit
2017-code/test_scalability.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add LocalDataGrabber class so tests work with local data.\n\nThis changeset adds the LocalDataGrabber class in the test source\ntree. This class exposes the same interface as Grabber -- so that\nit can be used in place of it -- but is only a...
python
new_file
3
1
mit
85da0b9062d8266a3e3fe4cd29fbb5ea79a7cedf
davidalber/Geneagrapher,davidalber/Geneagrapher
tests/geneagrapher/local_data_grabber.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for tests, when no rule is specified" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest im...
python
new_file
3
0
mit
1f3625b98de4edd8a0d0bcce882c5f79aeaf23b2
PatrikValkovic/grammpy
tests/rules_tests/NoRuleSpecifiedTest.py
rejected_duplicate
Near-duplicate of sample 5873
true
[ { "role": "user", "content": "Write python code for the following: Add template filters test cases" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nfrom flask import render_template_string\n\n\ndef test_nl2br_filter(app):\n...
python
new_file
1
1
mit
3644e3dc2d97f87b3810f1295a98b8977fa0c387
bosondata/badwolf,bosondata/badwolf,bosondata/badwolf
tests/test_template_filters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to generate some files to be used for the sensor calibration" }, { "role": "assistant", "content": "from pymavlink import mavutil\n\nfileout = open('acc.txt', 'w')\nfilemag = open('mag.txt', 'w')\nfilegyro = open('gy...
python
new_file
2
0
mit
2d9cc52e6ce6a6d2584e1d73e3d84ca3538758d9
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
Sensors/recordCalibration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first basic unittests using py.test" }, { "role": "assistant", "content": "\"\"\"\n test_validators\n ~~~~~~~~~~~~~~\n \n Unittests for bundled validators.\n \n :copyright: 2007-2008 by James Crasta, Thomas ...
python
new_file
1
1
bsd-3-clause
1fafccc7df5179ce89b100537e45307417658512
clones/wtforms
tests/test_validators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a few tests for Tee" }, { "role": "assistant", "content": "from .context import tohu\nfrom tohu.v6.primitive_generators import Integer, TimestampPrimitive\nfrom tohu.v6.derived_generators import IntegerDerived, Tee\nfrom tohu...
python
new_file
3
2
mit
58bee0ac0df709f9a5cee83e7828dce148182d10
maxalbert/tohu
tests/v6/test_tee_generator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add User object to model" }, { "role": "assistant", "content": "from flask import current_app\nfrom passlib.apps import custom_app_context as pwd_context\nfrom itsdangerous import (TimedJSONWebSignatureSerializer\n ...
python
new_file
3
3
mit
6ca79d2ce16f8745c8d58c3dea20174931820ef3
EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list
api/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add better solution for nth prime" }, { "role": "assistant", "content": "def nth_prime(n):\n if n <= 0:\n raise ValueError\n for i, prime in enumerate(prime_gen()):\n if n == i + 1:\n return prime\n...
python
new_file
2
4
mit
76c580f04edc1995e2dc9d107f84a714c088c0c2
always-waiting/exercism-python
nth-prime/nth_prime1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sending raw packet example" }, { "role": "assistant", "content": "from socket import *\n\ndef send_packet(src, dst, eth_type, payload, interface = \"eth0\"):\n \"\"\"Send raw Ethernet packet on interface.\"\"\"\n\n assert(l...
python
new_file
5
1
mit
d57fab92485e403dd24321ded7090b9c46d61655
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
send_packet.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the IATI wiki\n\nThis adds tests to ensure that IATI wiki is up and contains specified links" }, { "role": "assistant", "content": "import pytest\nfrom web_test_base import *\n\nclass TestIATIWiki(WebTestBase):\n ...
python
new_file
5
1
mit
3e52dcc7c4af0ab7208abebdfb59a079ee9b764b
IATI/IATI-Website-Tests
tests/test_iati_wiki.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add initial unit test for openstack cloud module" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\n :codeauthor: :email:`Bo Maryniuk <<EMAIL>>`\n'''\n\n# Import Python libs\nfrom __future__ import absolute_i...
python
new_file
1
1
apache-2.0
cd4380577061bd3e10c72926db80a830f3e90100
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/cloud/clouds/openstack_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions to handle temp directory for download" }, { "role": "assistant", "content": "import os\nimport time\n\nTMP_DIR = \"/tmp/lobster\"\n\ndef get_tempdir():\n tmp_path = TMP_DIR\n if not os.path.isdir(tmp_path):\n ...
python
new_file
1
2
mit
57c09aad6ad8de1fb5bb13d92b69db381f55cdac
noahfx/lobster
lobster/filemanager.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for the HansenLaw implementation" }, { "role": "assistant", "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os.path\n\nimport num...
python
new_file
3
1
mit
031016e21879ad7c0e3a2c1c888e973bfb23c529
PyAbel/PyAbel,rth/PyAbel,DhrubajyotiDas/PyAbel,stggh/PyAbel,huletlab/PyAbel
abel/tests/test_hansenlaw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic search by pmcid" }, { "role": "assistant", "content": "import requests, untangle\n\npmcid = 'PMC3834665'\nepmc_basequeryurl = \"http://www.ebi.ac.uk/europepmc/webservices/rest/search\"\n\n''' Make query to EuropePMC'''\...
python
new_file
1
0
mit
5f411b0ce564eba7a4b1f6c07d0d3209d63eef8e
tarrow/epmclib
searchbypmid.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for some shop POIs" }, { "role": "assistant", "content": "from . import FixtureTest\n\n\nclass FeaturesTest(FixtureTest):\n def test_shops(self):\n self._run_test(\n 'http://www.openstreetmap.org/no...
python
new_file
1
1
mit
9244e9d17ed57e1848bf52566d401e19c2cde8b7
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/491-feature-tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helper for HTTP/2 SSL context" }, { "role": "assistant", "content": "__all__ = [\n 'make_ssl_context',\n]\n\nimport ssl\n\n\ndef make_ssl_context(crt, key):\n ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)\n ssl_...
python
new_file
2
2
mit
df5ee98d6a2e39318e76f67afb4b02cd8e48def1
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
py/http2/http2/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [skip ci] Add script to get bus stops from datamall" }, { "role": "assistant", "content": "#!/usr/bin/python3\n\nimport urllib.request\nimport json\nimport os\nimport sys\n\n\nendpoint = 'http://datamall2.mytransport.sg/ltaodatas...
python
new_file
1
6
mit
84acd57a114fb2a9c2e17e729586399e66bb0eb9
yi-jiayu/bus-eta-bot,yi-jiayu/bus-eta-bot,yi-jiayu/bus-eta-bot,yi-jiayu/bus-eta-bot
bin/scrape-bus-stops.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add standings checker to prevent friendly fire" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom eveapi import eveapi\nimport ChatKosLookup\nimport sys\n\nclass StandingsChecker:\n def __init__(self, keyID, vCode)...
python
new_file
14
21
mit
92946362496f950a28357f3dee44b936cc59909a
lizthegrey/nrds-tools
StandingsCheck.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Write python code for the following: Create Queue with pop and put" }, { "role": "assistant", "content": "import sqlite3 as sql\n\nclass Queue(object):\n def __init__(self, db_filename):\n self.con = sql.connect(db_filename)\n self._create_tables()\n\n def _...
python
new_file
1
2
mit
4ec87c35ed6603f1eafb540840a8f978ea87130c
bewt85/jobqueue
argqueue/queue.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility to create administrative users." }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport rethinkdb as r\nfrom optparse import OptionParser\nimport sys\n\n\ndef create_group(conn):\n group = {}\n grou...
python
new_file
3
3
mit
102855b8d3dc7258c68a1f2bac3bb4c8953732dc
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/adminuser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a* tree search algorithm using misplaced tiles heuristic" }, { "role": "assistant", "content": "\"\"\"\npynpuzzle - Solve n-puzzle with Python\n\nA* tree search algorithm using misplaced tiles heuristic\n\nVersion : 1.0.0\nAu...
python
new_file
1
5
mit
3236e1dc9624a4e4a2770cf463e8f366e4eb7cde
mahdavipanah/pynpuzzle
algorithms/a_star_tree_misplaced_tiles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add conversion script for single pop to numpy" }, { "role": "assistant", "content": "import sys\nimport numpy as np\n\ndef read_phi(flname, n_steps, n_loci):\n\tsampled_phis = np.zeros((n_steps, n_loci))\n\tfl = open(flname)\n\tc...
python
new_file
1
3
apache-2.0
a097aef42255b963b91c54494355d34cdc7c08f7
rnowling/pop-gen-models
single-pop/singlepop2npy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement class for managing formulas" }, { "role": "assistant", "content": "import os\nimport imp\n\n_formula_cache = {}\n\n_default_search_path = [os.path.join(os.path.dirname(__file__), \"..\", \"Formula\")]\n\nclass FormulaMa...
python
new_file
2
4
mit
d269568387b622861001fdc39eeeaff03ebd9a78
peterl94/CLbundler,peterl94/CLbundler
formulamanager.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the includeme/settings" }, { "role": "assistant", "content": "import pytest\n\nfrom pyramid.authorization import ACLAuthorizationPolicy\nimport pyramid.testing\n\nfrom zope.interface import (\n Interface,\n im...
python
new_file
5
2
isc
9f5e11f789c01e3a6da0ff2c7376c4ead2741a6a
usingnamespace/pyramid_authsanity
pyramid_authsanity/tests/test_includeme.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom requests.exceptions import HTTPError\n\n\nclass BaseException(Exception):\n pass\n\n\nclass APIError(BaseException, HTTPError):\n \"\"\"\n The API responded with a non-200 status code.\n \"\"\"\n\n def __init__(self, htt...
python
edit
1
2
mit
cd13ddd24df33e3a34cd5fc71c3ad0b352952f8b
rkhleics/police-api-client-python
police_api/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Datalogger: Add example code to use stream from network" }, { "role": "assistant", "content": "from pymoku import Moku, MokuException\nfrom pymoku.instruments import *\nimport time, logging, traceback\n\nlogging.basicConfig(forma...
python
new_file
6
0
mit
6aab268f697a2cbdc39aa6ccf59801bd04068626
benizl/pymoku,liquidinstruments/pymoku
examples/livestream_datalogger.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add fabfile to install readthedocs for development.\n\n * Automates step-by-step instructions in Installation docs.\n\n * Installing prerequisites is specific to Debian/Ubuntu. Edit\n if using a different distribution or different OS.\n...
python
new_file
42
1
mit
018ecf79f5235882b47d37f363f746fce271a7cd
laplaceliu/readthedocs.org,clarkperkins/readthedocs.org,LukasBoersma/readthedocs.org,safwanrahman/readthedocs.org,agjohnson/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,dirn/readthedocs.org,stevepiercy/readthedocs.org,attakei/readthedocs-oauth,cgourlay/readthedocs.org,davidfischer/readthedocs.org,attakei/r...
fabfile-development.py
rejected_lint
Too many lint violations: 42
true
[ { "role": "user", "content": "Write python code for the following: Add step 0, which create a sample file for labelling instruction" }, { "role": "assistant", "content": "# coding=utf-8\nimport sys\nreload(sys)\nsys.setdefaultencoding('utf-8')\n\n# sc is an existing SparkContext.\nfrom pyspark.s...
python
new_file
4
0
apache-2.0
2fa79ad053f8af0acc121543a9ceb85cc07c2ac2
chuajiesheng/twitter-sentiment-analysis
step_0/scripts/instructional_sampling.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add basic sound generation (time sampling, sine wave, white noise, save to WAV file, play via afplay)." }, { "role": "assistant", "content": "from scipy.io import wavfile\nimport numpy as np\nimport subprocess\nfrom scipy.signal ...
python
new_file
5
2
mit
eff79d3dc25e2cd5a296f50e051bd950e73ebf47
bzamecnik/tfr,bzamecnik/tfr
generate_sound.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script for migrating tips to new teams" }, { "role": "assistant", "content": "from gratipay.wireup import db, env\nfrom gratipay.models.team import Team, AlreadyMigrated\n\ndb = db(env())\n\nslugs = db.all(\"\"\"\n SELECT ...
python
new_file
1
0
mit
c12d70090b47765a658a98c29fd332ca6ec057d7
studio666/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio6...
bin/migrate-tips.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add db related test steps" }, { "role": "assistant", "content": "#!/usr/bin/env python2\nfrom __future__ import print_function\nimport logging\nimport time\nimport sys\nimport psycopg2\nfrom behave import *\nfrom contextlib impor...
python
new_file
24
2
mit
fdc1723e5d4769902f7896264e27a7d475f2ba1a
Galeria-Kaufhof/private-postgres-rds,Galeria-Kaufhof/private-postgres-rds,Galeria-Kaufhof/private-postgres-rds
test/features/steps/access_db.py
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Write python code for the following: Add a basic presubmit script.\n\ngit-svn-id: 3a56fcae908c7e16d23cb53443ea4795ac387cf2@70 0e6d7f2b-9903-5b78-7403-59d27f066143" }, { "role": "assistant", "content": "# Copyright (c) 2012 The Chromium Authors. All rights reserved.\...
python
new_file
1
1
bsd-3-clause
8860cb45cbc0be048a0f87335b7a150a4d8b0b7a
bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer
PRESUBMIT.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration test for receiving chunks" }, { "role": "assistant", "content": "import bernhard\nimport socket\nimport struct\nimport time\nimport sys\n\ndef events(n):\n events = list()\n for i in range(0, n):\n ev...
python
new_file
3
2
mit
2a35dc8835aab9471198a2e1bd32de0ad31014eb
juruen/cavalieri,juruen/cavalieri,juruen/cavalieri,juruen/cavalieri
ci/send-test/run.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
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first job module tests" }, { "role": "assistant", "content": "import pytest\nimport multiprocessing\nfrom copy import deepcopy\nfrom pprint import pprint\n\nimport virtool.job\n\n\nclass TestProcessor:\n\n def test(self, t...
python
new_file
4
1
mit
e303425602e7535fb16d97a2f24a326791ef646d
igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool
tests/test_job.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the fix_entities parameter" }, { "role": "assistant", "content": "from __future__ import unicode_literals\nfrom ftfy import fix_text, fix_text_segment\nfrom nose.tools import eq_\n\ndef test_entities():\n example...
python
new_file
1
1
mit
1316ed65550b47d694b870093c38fef47e88a06c
rspeer/python-ftfy
tests/test_entities.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"wrap SimpleHTTPServer and prevent Ctrl-C stack trace output\"\"\"\n\nimport SimpleHTTPServer\nimport SocketServer\n\nimport log\n\ntry :\n log.colored(log.GREEN, 'serving on http://localhost:8000 (Ctrl-C to quit)')\n httpd = Soc...
python
edit
1
0
mit
f525d04e978c35132db6ff77f455cf22b486482f
floooh/fips,floooh/fips,michaKFromParis/fips,floooh/fips,michaKFromParis/fips,anthraxx/fips,mgerhardy/fips,anthraxx/fips,mgerhardy/fips,code-disaster/fips,code-disaster/fips
mod/httpserver.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the setup.py hook" }, { "role": "assistant", "content": "from unittest import TestCase, mock\n\nfrom semantic_release import setup_hook\n\n\nclass SetupPyHookTests(TestCase):\n\n @mock.patch('semantic_release.cli...
python
new_file
1
1
mit
ecd9e9a3f97bdf9489b6dc750d736855a2c109c2
wlonk/python-semantic-release,relekang/python-semantic-release,jvrsantacruz/python-semantic-release,relekang/python-semantic-release,riddlesio/python-semantic-release
tests/test_setup_py_hook.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add merge migration for hotfix 0.107.6" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11 on 2017-05-04 00:47\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\...
python
new_file
1
0
apache-2.0
5e48d933795cc367ba0c5c378994c1b6c5cb3fb2
Nesiehr/osf.io,Johnetordoff/osf.io,icereval/osf.io,caseyrollins/osf.io,saradbowman/osf.io,baylee-d/osf.io,chrisseto/osf.io,cslzchen/osf.io,TomBaxter/osf.io,cslzchen/osf.io,adlius/osf.io,aaxelb/osf.io,mfraezz/osf.io,chennan47/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,TomBaxter/osf.io,aaxelb/osf.io,baylee-d/osf.io,ch...
osf/migrations/0023_merge_20170503_1947.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Split bam into files based on read grouping" }, { "role": "assistant", "content": "\nfrom pysamimport import pysam\nimport re, os, hashlib\n\nclass SplitBAM(object):\n def __init__(self,bamfile,readgroups,batchsize=10,director...
python
new_file
1
10
mit
1294679a7ea4ceacf610e4dc103677aeedc7b7ea
HorvathLab/NGS,HorvathLab/NGS,HorvathLab/NGS,HorvathLab/NGS,HorvathLab/NGS
common/src/split.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add time and geo query examples" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Brandon Heller\n#\n# Run geo, time, and combined queries to get an early idea of how interactive\n# this might be.\n\nimport time\nfr...
python
new_file
9
2
mit
7a15963a81da6120a79f282dcf43e5e508d13ff5
emarschner/gothub,emarschner/gothub,emarschner/gothub,emarschner/gothub
queries.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add crypto pre-submit that will add the openssl builder to the default try-bot list.\n\nBUG=None\nTEST=git try should run a linux_redux try job too.\n\n\nReview URL: http://codereview.chromium.org/9235031\n\ngit-svn-id: de016e52bd170d2d4f234...
python
new_file
1
1
bsd-3-clause
eec00e07d8e50d260249eab6cbefc976cc184683
Fireblend/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,rogerwang/chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,dednal/chromium.src,patrickm/chromium.src,littlstar/chromium.src,mohamed--ab...
crypto/PRESUBMIT.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new example test (GitHub)" }, { "role": "assistant", "content": "from seleniumbase import BaseCase\n\n\nclass GitHubTests(BaseCase):\n\n def test_github(self):\n self.open(\"https://github.com/\")\n self.up...
python
new_file
1
1
mit
2dec0f46c6b8ed61f6fd4723bb43711603ea754f
mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/seleniumspot,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/SeleniumBase
examples/github_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TestReboot: Test time to complete reboot call\n\nUseful for tracking the time we're losing between calling reboot and\nactually rebooting.\n\nSigned-off-by: Samuel Mendoza-Jonas <<EMAIL>>" }, { "role": "assistant", "content": "#!...
python
new_file
4
1
apache-2.0
39a15c3842faa8ffeae78ec31db54656888448ec
open-power/op-test-framework,open-power/op-test-framework,open-power/op-test-framework
testcases/OpTestRebootTimeout.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for pickle functionality" }, { "role": "assistant", "content": "import pickle\nimport pytest\n\nfrom bonobo import Bag, PickleReader, PickleWriter, open_fs\nfrom bonobo.constants import BEGIN, END\nfrom bonobo.execution...
python
new_file
1
3
apache-2.0
5d8f4c3dc7fbd8bc7380e272889640271b512582
python-bonobo/bonobo,hartym/bonobo,hartym/bonobo,python-bonobo/bonobo,hartym/bonobo,python-bonobo/bonobo
tests/io/test_pickle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add testcase of error with no space\n\nCherry-picked from https://github.com/twitter/twemproxy/pull/406\n\nThe alternate fix 6c962267d7fab8595940367b0cc8fb6f75f66cea was used\n\nAmended to work with the updated test framework\n\nRelated to h...
python
new_file
9
1
apache-2.0
918cef54c3cd83f41d1322ffc509c78e28b341f5
ifwe/twemproxy,ifwe/twemproxy,ifwe/twemproxy,ifwe/twemproxy
tests/test_redis/test_lua_error_return.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights file naming problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights File Naming Problem\n\n\ndef fileNaming(names):\n valid = []\n tmp = dict()\n for name in names:\n ...
python
new_file
1
4
mit
bead9f754bb8a3b6ffc55ae24c7436771c0f792e
HKuz/Test_Code
CodeFights/fileNaming.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: :white_check_mark: Add tests for validation errors in response" }, { "role": "assistant", "content": "from typing import List\n\nimport pytest\nfrom fastapi import FastAPI\nfrom pydantic import BaseModel, ValidationError\nfrom st...
python
new_file
1
1
mit
57ff677027eec19c0d659e050675e7a320123637
tiangolo/fastapi,tiangolo/fastapi,tiangolo/fastapi
tests/test_serialize_response.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add AGS (Adventure Game Studio) example" }, { "role": "assistant", "content": "from rockstar import RockStar\n\nags_code = \"Display(\"Hello, world!\");\"\nrock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_cod...
python
new_file
null
null
mit
0ea33e658cdbf0605ee4a2f28a1e0cd24a57b608
yask123/rockstar,varunparkhe/rockstar,monsterwater/rockstar,gokaygurcan/rockstar,haosdent/rockstar,jrajath94/RockStar,ActuallyACat/rockstar,Endika/rockstar,jehb/rockstar,avinassh/rockstar
examples/ags_rockstar.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add mock Connection object for testing purposes." }, { "role": "assistant", "content": "from pyromancer.objects import Connection\n\n\nclass MockConnection(Connection):\n\n def __init__(self, *args, **kwargs):\n self.ou...
python
new_file
1
1
mit
6d1ed4bf18ded809371e383e87679ed1b5714699
Gwildor/Pyromancer
pyromancer/test/mock_objects.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Copy is_safe_url unit test from Django." }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obt...
python
new_file
1
3
apache-2.0
6f024ec7fada73388e5a9c1df9446747c8e1e586
ismail-s/warehouse,HonzaKral/warehouse,dstufft/warehouse,HonzaKral/warehouse,pypa/warehouse,karan/warehouse,karan/warehouse,dstufft/warehouse,wlonk/warehouse,ismail-s/warehouse,wlonk/warehouse,pypa/warehouse,alex/warehouse,ismail-s/warehouse,chopmann/warehouse,alex/warehouse,karan/warehouse,alex/warehouse,ismail-s/ware...
tests/utils/test_http.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for adding parser actions" }, { "role": "assistant", "content": "'''Test the ability to add a label to a (potentially trained) parsing model.'''\nfrom __future__ import unicode_literals\nimport pytest\nimport numpy.rand...
python
new_file
1
2
mit
dde87e6b0d2de331e536d335ead00db5d181ee96
recognai/spaCy,aikramer2/spaCy,recognai/spaCy,honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/s...
spacy/tests/parser/test_add_label.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing `per_page` migration file." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration)...
python
new_file
1
0
mit
16a36338fecb21fb3e9e6a15a7af1a438da48c79
onespacemedia/cms-jobs,onespacemedia/cms-jobs
apps/jobs/migrations/0003_jobs_per_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility to strip HTML" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport re\nimport srt\nimport utils\n\n\ndef strip_html_from_subs(subtitles):\n for subtitle in subtitles:\n subtitle_lines = sub...
python
new_file
1
3
mit
38f43f5555a799afbec8adb2fc09e895a3c71637
cdown/srt
strip-html.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: feat: Add a script which split your region in smaller sample" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow\nimp...
python
new_file
1
4
mit
49ed704f02b686888aef81eafb1a3c57910f9d74
aguijarro/DataSciencePython
DataWrangling/CaseStudy/sample_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test added for testing proof of concept" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom circuits import Component, Event\n\nclass Test(Event):\n \"\"\"Test Event\"\"\"\n\nclass Foo(Event):\n \"\"\"Foo E...
python
new_file
1
1
mit
3f9eaa6ed1e69e6d40637ff9711dd72ad1113457
eriol/circuits,eriol/circuits,treemo/circuits,eriol/circuits,treemo/circuits,treemo/circuits,nizox/circuits
tmp/test_result_proxy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yappi\n\nclass YappiProfile(object):\n \"\"\" Wrapper class that represents Yappi profiling backend with API matching\n the cProfile.\n \"\"\"\n def __init__(self):\n self.stats = None\n\n def runcall(self, ...
python
edit
1
2
apache-2.0
ad6670874f37c52f4a15f30e1ab2682bd81f40f8
adedayo/intellij-community,muntasirsyed/intellij-community,da1z/intellij-community,vvv1559/intellij-community,vvv1559/intellij-community,diorcety/intellij-community,da1z/intellij-community,asedunov/intellij-community,akosyakov/intellij-community,fitermay/intellij-community,orekyuu/intellij-community,ThiagoGarciaAlves/i...
python/helpers/profiler/yappi_profiler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Multiplication table in Excel" }, { "role": "assistant", "content": "#! /usr/bin/env python\n# multiplication_table.py -- Creates a multiplication table in excel\n\nimport sys\nimport openpyxl\nfrom openpyxl.styles import ...
python
new_file
3
0
mit
7b527400c162ad6810f938c38e06fdb68e488467
terrameijar/useful_scripts
multiplication_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a main function with top-level logic\n\nThis is now at the point where I'd give it to a developer for in-house\nusage, however before being \"done\" I need to check the edge cases." }, { "role": "assistant", "content": "\nimp...
python
new_file
1
5
mit
23b80f5a5bd5f418e8da229f39d9912b0b4e8e77
robbie-c/git-lang-guesser
git-lang-guesser/guesser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Tweet / update status example" }, { "role": "assistant", "content": "import tweepy\n\n\nconsumer_key = \"\"\nconsumer_secret = \"\"\naccess_token = \"\"\naccess_token_secret = \"\"\n\nauth = tweepy.OAuthHandler(consumer_key, ...
python
new_file
1
0
mit
6749e116f47b9307571e016762b3ff918445ba9e
tweepy/tweepy,svven/tweepy
examples/update_status.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tentative support for installation via pip" }, { "role": "assistant", "content": "\"\"\"Python Bindings for Psynteract.\n\n\"\"\"\n\n# This is built on the demo package as described at\n# https://packaging.python.org/en/lates...
python
new_file
3
0
apache-2.0
ede47b64d892878e21178aeda2a16f24db59567b
psynteract/psynteract-py
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom demag import Demag\n\n\ndef test_demag_mif():\n demag = Demag()\n mif_string = demag.get_mif()\n assert 'Specify Oxs_Demag {}' in mif_string\n\n\ndef test_demag_formatting():\n demag = Demag()\n mif_string = demag.get_mi...
python
edit
1
1
bsd-2-clause
9c762d01b6dafd48d227c0ef927b844a257ff1b9
ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python
joommf/energies/test_demag.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Upgrade to backfill existing observations with a dummy audit row so we can require audits for all observations." }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 12113d3fcab1\nRevises: 85ee128c8304\nCreat...
python
new_file
1
2
bsd-3-clause
39147b41147cb4551e60d1356be1795822ae7d72
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
migrations/versions/12113d3fcab1_.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFor examples of dadi's usage, see the examples directory in the source\ndistribution.\n\nDocumentation of all methods can be found in doc/api/index.html of the source\ndistribution.\n\"\"\"\nimport logging\nlogging.basicConfig()\n\n...
python
edit
10
0
bsd-3-clause
51965dc3b26abfd0f9fb730c3076ee16b13612bc
yangjl/dadi,ChenHsiang/dadi,cheese1213/dadi,ChenHsiang/dadi,RyanGutenkunst/dadi,cheese1213/dadi,niuhuifei/dadi,paulirish/dadi,beni55/dadi,yangjl/dadi,RyanGutenkunst/dadi,niuhuifei/dadi,beni55/dadi,paulirish/dadi
dadi/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Convert the data from a Matlab -v6 file to numpy \"npz\"." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# mat2npz.py\n#\n# purpose: Convert matlab file from TEOS-10 group to a npz file...
python
new_file
1
0
mit
c6d2a791a9984855dbaad026e741723ad129c137
castelao/python-gsw,lukecampbell/python-gsw,rabernat/python-gsw,TEOS-10/python-gsw,ocefpaf/python-gsw
gsw/utilities/mat2npz.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example to push raw transaction to the network via RPC" }, { "role": "assistant", "content": "from bitcoinrpc.authproxy import AuthServiceProxy\n\n#################################################\n# Sending a transation ...
python
new_file
2
0
bsd-3-clause
01428c6eca0351ad6a1767ac39969408c961aec1
sr-gi/bitcoin_tools
examples/push_tx.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: test: Verify a model with many parameters works\n\nCheck that a schools model with many parameters (160) works. Prompted\nby a unusual macOS bug in late 2020 (#163)." }, { "role": "assistant", "content": "\"\"\"Test a \"large\" ...
python
new_file
1
1
isc
9be2e5927487dd1400d635d40f85192371a0d1ba
stan-dev/pystan,stan-dev/pystan
tests/test_eight_schools_large.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract stderr and stout from nextflow" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport os\nimport sys\nimport pandas as pd\nfrom glob import glob\nimport subprocess\n\ndef main():\n if len(...
python
new_file
1
7
apache-2.0
01db1d6f591858b52b6a75ac72b5bdcb49aca708
maubarsom/biotico-tools,maubarsom/biotico-tools,maubarsom/biotico-tools,maubarsom/biotico-tools,maubarsom/biotico-tools
python/extract_logs_from_nextflow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a first test script." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom selenium import webdriver\nfrom selenium.common.exceptions import NoSuchElementException\nimport unittest\n\n\nclass TestPhp4dvd(unitte...
python
new_file
3
3
bsd-2-clause
bd303aa652cd071a612060e7c0e6b0b11dc91018
bsamorodov/selenium-py-training-samorodov
php4dvd/test_php4dvd.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test Keras DNN for 2048 value" }, { "role": "assistant", "content": "from __future__ import print_function\nimport numpy as np\nimport math\nnp.random.seed(1337) # for reproducibility\n\nfrom keras.datasets import mnist\nfrom ke...
python
new_file
14
4
mit
4493b6d42d025ac79f6e89c40ed3b583802a2330
choupi/NDHUDLWorkshop
2048/test_value_2048.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Write python code for the following: Store HD version of the art images (made with waifux2 by @meiponnyan on Twitter), use it when it exists on the homepage and when using the download link" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __futur...
python
new_file
1
0
apache-2.0
fbd49abfb5a3d32f30de0e85c70f08c873813755
SchoolIdolTomodachi/CinderellaProducers,SchoolIdolTomodachi/CinderellaProducers
cpro/migrations/0014_auto_20170129_2236.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Support library for managing log files" }, { "role": "assistant", "content": "#\n# Description: log support module\n#\n# Author:\n# Igor Sfiligoi (Oct 25th 2006)\n#\nimport time\n\n# this class can be used instead of a file for ...
python
new_file
2
4
bsd-3-clause
22c96540eb5cbf33d9ea868458769031dc57102a
holzman/glideinwms-old,holzman/glideinwms-old,holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS,bbockelm/glideinWMS,bbockelm/glideinWMS
lib/logSupport.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a helper script for creating migrations" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport decimal\nimport os\nimport sys\n\nimport django\n\nfrom django.conf import settings\n\n\nDEFAULT_SETTINGS = dict(\n ...
python
new_file
1
2
mit
8c2aa6409358b4b5830e9a6242194030307f2aa6
pinax/django-stripe-payments
makemigrations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport pytest\nfrom members.tests.fixtures.memberlikes import MembershipApplicationFactory\nfrom members.tests.fixtures.types import MemberTypeFactory\nfrom members.models import Member\n\n@pytest.mark.django_db\nde...
python
edit
1
1
mit
3dce48f228caec9b317f263af3c5e7a71372f0be
hacklab-fi/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,rambo/asylum,rambo/asylum,rambo/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,jautero/asylum,jautero/asylum,HelsinkiHacklab/asylum
project/members/tests/test_application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding=utf-8\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"tinydb\",\n version=\"2.1.0\",\n packages=find_packages(),\n\n # development metadata\n zip_safe=True,\n\n # metadata for upload to PyPI\n a...
python
edit
1
0
mit
70fa6d750fbbdae405b0012b9aa53f066008ba5f
ivankravets/tinydb,Callwoola/tinydb,raquel-ucl/tinydb,cagnosolutions/tinydb,msiemens/tinydb
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add job sequencing greedy Python" }, { "role": "assistant", "content": "class Job:\n def __init__(self, name, deadline, duration, profit):\n self.name = name\n self.deadline = deadline\n self.duration = du...
python
new_file
1
7
cc0-1.0
067fa81cf56b7f8ab29060ec8a1409c0c07c797e
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
greedy/Job_sequencing_problem/python/jobsequencing.py
accepted
null
true