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: Add betweeness centrality and load centrality test.\n\n--HG--\nextra : convert_revision : svn%3A3ed01bd8-26fb-0310-9e4c-ca1a4053419f/networkx/trunk%401110" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom nose.to...
python
new_file
4
2
bsd-3-clause
de57228d38d9a95953ffc90f70e03cbfda806774
chrisnatali/networkx,tmilicic/networkx,bzero/networkx,farhaanbukhsh/networkx,jtorrents/networkx,RMKD/networkx,ionanrozenfeld/networkx,debsankha/networkx,jfinkels/networkx,wasade/networkx,ghdk/networkx,ionanrozenfeld/networkx,jni/networkx,jakevdp/networkx,harlowja/networkx,kernc/networkx,jcurbelo/networkx,SanketDG/netwo...
networkx/algorithms/tests/test_betweenness_centrality.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration file to reflect use of db_column in models" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.contrib.g...
python
new_file
1
0
mit
6fc69f735aa075aad15e066c5a2d1c0cb7df722a
LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search,LitPalimpsest/parser-api-search
site/api/migrations/0013_auto_20150317_1053.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Order legs of a flight trip using recursion" }, { "role": "assistant", "content": "def next_leg(flights, source):\n \"\"\"Find and append next flight to trip\"\"\"\n for leg in flights:\n if leg[0] == source:\n ...
python
new_file
1
3
mit
bb5d89ca793cfbdeaf4dea3a4791f675ecf9039f
zedfoxus/stackoverflow-answers,zedfoxus/stackoverflow-answers,zedfoxus/stackoverflow-answers
order-flights/flights-recursion.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an uncommitted test file" }, { "role": "assistant", "content": "import mock\nimport unittest\n\nfrom .models import B\nfrom json import dumps\nfrom sir import util\nfrom sir.schema import searchentities\n\n\nclass VersionChec...
python
new_file
1
1
mit
15c589b6b186865faf0dcec10b75d54d8ed9200e
jeffweeksio/sir
test/test_util.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example command to toggle between disassembly-only and source mode.\n\nSometimes you are debugging in source, but you really only want to see\nthe disassembly. That's easy to do but you have to set a few variables.\nThis command togg...
python
new_file
1
2
apache-2.0
0155a9b005a5b62b8245b29ac49cd5766f12b218
llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb
examples/python/disassembly_mode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for packager.core.flavor.py" }, { "role": "assistant", "content": "#! /usr/bin/python\n\nfrom packager.core.flavor import debian_check\nfrom nose.tools import *\nfrom subprocess import call\n\ndef test_debian_check(...
python
new_file
2
1
mit
c1b090a8774030d4898a02b41cdbd9f199e2c1b8
csdms/packagebuilder
packager/core/test/test_flavor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Add basic smoke tests for dask." }, { "role": "assistant", "content": "import event_model\nfrom bluesky.plans import count\nimport numpy\nfrom ophyd.sim import NumpySeqHandler\n\nfrom ..core import DaskFiller\n\n\ndef test_f...
python
new_file
1
2
bsd-3-clause
478d8331e03e00365beafff455e8dc7ed2562af4
ericdill/databroker,ericdill/databroker
intake_bluesky/tests/test_dask_filler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add small test script for python bindings" }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# This is just a simple test script to check whether the python bindings are\n# actually working as intended\n\nfrom __fut...
python
new_file
1
0
bsd-3-clause
f7aeb4fa5bafa5218bed14e5b19c0fb9409e6700
iLCSoft/LCIO,iLCSoft/LCIO,iLCSoft/LCIO,iLCSoft/LCIO,iLCSoft/LCIO,iLCSoft/LCIO
examples/python/readMCParticles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add harvester for Huskie Commons\n\nCloses [#SHARE-114]" }, { "role": "assistant", "content": "'''\nHarvester for the Huskie Commons for the SHARE project\n\nExample API call: http://commons.lib.niu.edu/oai/request?verb=ListRecor...
python
new_file
1
0
apache-2.0
b8121d15e59d08cd93ada94b69b37c8942308ede
fabianvf/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,erinspace/scrapi,fabianvf/scrapi,erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi
scrapi/harvesters/huskiecommons.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unittest for Task 3" }, { "role": "assistant", "content": "__author__ = 'Nino Bašić <<EMAIL>>'\n\nimport unittest\nfrom revolver import Revolver\n\n\nclass RevolverTest(unittest.TestCase):\n\n def test_iter(self):\n ...
python
new_file
1
2
mit
70587b40766a3c5ab3bfad9639790d332508fb76
nbasic/racunalnistvo-1
dn1/revolver_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ENH: Add utility script to create JRE tarballs.\n\nThese tarballs will be uploaded to the Midas server to be\nused by the SCIFIOImageIO module.\n\nChange-Id: I180cf0957221762ddf62b14e3712b70fe19e03bb" }, { "role": "assistant", "c...
python
new_file
1
0
apache-2.0
7a1981ef9499b12e16d9f7851b76e36a8b8a7f52
PlutoniumHeart/ITK,vfonov/ITK,hendradarwin/ITK,stnava/ITK,fbudin69500/ITK,hjmjohnson/ITK,heimdali/ITK,BlueBrain/ITK,ajjl/ITK,spinicist/ITK,vfonov/ITK,msmolens/ITK,vfonov/ITK,hendradarwin/ITK,stnava/ITK,atsnyder/ITK,richardbeare/ITK,stnava/ITK,LucHermitte/ITK,GEHC-Surgery/ITK,biotrump/ITK,BRAINSia/ITK,hinerm/ITK,spinici...
Utilities/Maintenance/JREUpdate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for Django app" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\n\n\nclass...
python
new_file
1
0
bsd-3-clause
52f6f1450299aee86730bb430228bf2ed6bb9774
daniula/python-social-auth,python-social-auth/social-app-django,python-social-auth/social-app-django,mrwags/python-social-auth,muhammad-ammar/python-social-auth,clef/python-social-auth,jameslittle/python-social-auth,msampathkumar/python-social-auth,DhiaEddineSaidi/python-social-auth,S01780/python-social-auth,MSOpenTech...
social/apps/django_app/default/migrations/0002_add_related_name.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to print words for LIWC categories\n\nGiven a LIWC dictionary and a category, the script prints the words in\nthe category." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"S...
python
new_file
4
0
apache-2.0
d5106925d90ac5c0454279c31535381b45958a95
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
print_liwc_cat.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: [algorithm] Solve hackerrank linked list problem\n\nThis is the solution of \"get-the-value-of-the-node-at-a-specific-position-from-the-tail\" problem." }, { "role": "assistant", "content": "# https://www.hackerrank.com/challenge...
python
new_file
1
3
mit
91b99d08892e8fc758c21a2ddec13ba6f83f4f8b
honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice
hackerrank/linked-list/position-from-tail.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test commands clean - addition" }, { "role": "assistant", "content": "# Copyright 2015 0xc0170\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Lic...
python
new_file
3
2
apache-2.0
e5ffed089fe5727e7711a685a62100a779f80fd7
molejar/project_generator,project-generator/project_generator,ohagendorf/project_generator,sarahmarshy/project_generator,0xc0170/project_generator,hwfwgrp/project_generator
tests/test_commands/test_clean.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Rename migration and fix dependency" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.13 on 2019-07-23 14:26\nfrom __future__ import unicode_literals\nfrom django.db import migrations\n\nf...
python
new_file
1
0
apache-2.0
7a2b962012067d509a07d00dfd55319c428585ff
mfraezz/osf.io,saradbowman/osf.io,cslzchen/osf.io,aaxelb/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,CenterForOpenScience/osf.io,baylee-d/osf.io,felliott/osf.io,mattclark/osf.io,CenterForOpenScience/osf.io,mattclark/osf.io,adlius/osf.io,baylee-d/osf...
osf/migrations/0174_add_ab_testing_home_page_version_b_flag.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add automated test inspared in bcbio-nextgen code" }, { "role": "assistant", "content": "\"\"\"This directory is setup with configurations to run the main functional test.\n\nIt exercises a full analysis pipeline on a smaller sub...
python
new_file
2
4
mit
466622e95e5243a2d5a9d6a12f1b7735c4fb5637
lpantano/seqcluster,lpantano/seqcluster,lpantano/seqcluster,lpantano/seqcluster,lpantano/seqcluster
test/test_automated_analysis.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for permutation group class\n\nThe permutation group class is tested with the S3 group. This also\ntests the correctness of the Schreier-Sims algorithm in libcanon. The\npicklability is also tested." }, { "role": "assista...
python
new_file
1
2
mit
c25b54976a0250863fbf05419d9944e6d337251b
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
tests/group_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for fft and ifft" }, { "role": "assistant", "content": "import unittest\n\nimport numpy as np\nimport numpy.fft as npfft\n\nimport dask\nfrom dask.array.core import Array\nfrom dask.utils import raises\nimport dask.arra...
python
new_file
1
6
bsd-3-clause
7bf47ceb1872db834a91cbcc2193366bff1abb58
ssanderson/dask,mrocklin/dask,chrisbarber/dask,cowlicks/dask,PhE/dask,mrocklin/dask,mikegraham/dask,gameduell/dask,dask/dask,jcrist/dask,jakirkham/dask,vikhyat/dask,ssanderson/dask,wiso/dask,ContinuumIO/dask,ContinuumIO/dask,blaze/dask,pombredanne/dask,wiso/dask,mraspaud/dask,clarkfitzg/dask,vikhyat/dask,dask/dask,PhE/...
dask/array/tests/test_fft.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for triggering rtf build (curl is not available on build slave)." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license...
python
new_file
2
0
apache-2.0
a06cd308c9aaa908386d2a1390817049723f28af
Cloud-Elasticity-Services/as-libcloud,pquentin/libcloud,wido/libcloud,schaubl/libcloud,atsaki/libcloud,marcinzaremba/libcloud,mbrukman/libcloud,marcinzaremba/libcloud,carletes/libcloud,thesquelched/libcloud,Itxaka/libcloud,vongazman/libcloud,t-tran/libcloud,jerryblakley/libcloud,munkiat/libcloud,sgammon/libcloud,iPlant...
contrib/trigger_rtd_build.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Put EarthTwinHabZone tests in same new file/class" }, { "role": "assistant", "content": "r\"\"\"Test code for modules EarthTwinHabZone1 and EarthTwinHabZone2 within EXOSIMS PlanetPopulation.\n\nCate Liu, IPAC, 2016\"\"\"\n\nimpor...
python
new_file
6
2
bsd-3-clause
fbc4646c791d37e3360cac30ef590e5a242312d9
dsavransky/EXOSIMS,dsavransky/EXOSIMS
tests/PlanetPopulation/test_EarthTwinHabZone.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add quantity to shopping items" }, { "role": "assistant", "content": "\"\"\"Add quantity to shopping items\n\nRevision ID: 32ccd6db0955\nRevises: 430dc4ed6dd6\nCreate Date: 2015-01-06 21:59:03.761529\n\n\"\"\"\n\n# revision ident...
python
new_file
4
1
mit
684c208bfec727cd66bd4a2eccedbfeea1c59d0a
jlutz777/FreeStore,jlutz777/FreeStore,jlutz777/FreeStore
alembic/versions/32ccd6db0955_add_quantity_to_shopping_items.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add project for chapter 6 Automate the Boring Stuff" }, { "role": "assistant", "content": "#!/urs/local/bin/python\n# pw.py - an insecure password locker program\n\nimport sys\nimport pyperclip\n\nPASSWORDS = {'email': 'F7minlBDD...
python
new_file
1
0
mit
69aeb3afafc79bd9f7f85231f25ca198d4e23367
HKuz/Test_Code
AutoTheBoringStuffProjects/Chp6Password/pw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for new endpoints" }, { "role": "assistant", "content": "import unittest\nimport mock\nfrom ...management.branding import Branding\n\n\nclass TestBranding(unittest.TestCase):\n def test_init_with_optionals(self):\n ...
python
new_file
1
1
mit
8d5b0bd8f50d7b0489ebbafd22c66cf5304d308f
auth0/auth0-python,auth0/auth0-python
auth0/v3/test/management/test_branding.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add standard migrations to contrib.sites" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-04-14 09:03\nfrom __future__ import unicode_literals\n\nimport django.contrib.sites.mode...
python
new_file
1
0
mit
ebc1c3ddb2adca3205d1976cf0def5145a31a6dc
watchdogpolska/bliski_publikator,watchdogpolska/bliski_publikator,watchdogpolska/bliski_publikator,watchdogpolska/bliski_publikator
bliski_publikator/contrib/sites/migrations/0003_auto_20160414_0903.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration script for coverage scores." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migrati...
python
new_file
1
0
mit
4ae97e9d15b28dd2eba5c5e404b071ee87773f77
thomaskonrad/osm_austria_building_coverage,thomaskonrad/osm_austria_building_coverage,thomaskonrad/osm-austria-building-coverage,thomaskonrad/osm_austria_building_coverage,thomaskonrad/osm-austria-building-coverage,thomaskonrad/osm_austria_building_coverage,thomaskonrad/osm-austria-building-coverage,thomaskonrad/osm-au...
coverage_score_viewer/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functional tests for server group in ComputeV2\n\nChange-Id: I43a6ce3a6d976f3d1bd68c0483c929977b660f0d" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# ...
python
new_file
1
1
apache-2.0
e10a5979bc4cbe5b6ff89ae7af6ea726eb1a0000
dtroyer/python-openstackclient,redhat-openstack/python-openstackclient,dtroyer/python-openstackclient,openstack/python-openstackclient,openstack/python-openstackclient,redhat-openstack/python-openstackclient
functional/tests/compute/v2/test_server_group.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test of rules with EPS" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 19.08.2017 17:25\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\n\nfrom unittest import TestCase, ma...
python
new_file
9
1
mit
d627397fa4c7544a39c6be648ffaf82536ac06f0
PatrikValkovic/grammpy
tests/rules_tests/clearAfterNonTermRemove/WithEpsilonTest.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add a script to show loading/saving models" }, { "role": "assistant", "content": "from __future__ import print_function\n\nimport numpy\n\nfrom molml.features import CoulombMatrix\nfrom molml.crystal import GenerallizedCrystal\nf...
python
new_file
1
0
mit
6dd95098cd65fc31e07ae6339d9c86ec3028cf5e
crcollins/molml
examples/load_save.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python template to process a folder of images" }, { "role": "assistant", "content": "import os\nfrom ij import IJ, ImagePlus\nfrom ij.gui import GenericDialog\n \ndef run():\n srcDir = IJ.getDirectory(\"Input_directory\")\n...
python
new_file
4
8
bsd-2-clause
cb7631303a73e69ffa62811be2ea79e2d4a6d64b
imagej/imagej-legacy,imagej/imagej-legacy,imagej/imagej-legacy,imagej/imagej-legacy
src/main/resources/script_templates/Python/Process_Folder.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Set 1 / Challenge 2 done." }, { "role": "assistant", "content": "def buffers_xor(buffer1, buffer2):\n \"\"\"buffer1, buffer2: byte-like objects.\"\"\"\n try:\n return bytes(b1 ^ b2 for b1, b2 in zip(buffer1, buffer2)...
python
new_file
1
3
mit
8e870ebb5d55207d45cc2b583291d6d5e0f2d4c1
vitkarpenko/cryptopals
set_1/challenge_2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add query_level and query_nature functions" }, { "role": "assistant", "content": "import os\nimport sqlite3\nimport pandas as pd\n\nDB_PATH = os.path.dirname(__file__)+\"/Tables/Pyranitar.db\"\n\ndef query_level(group, experience...
python
new_file
1
1
mit
21f2571a0e5b7100db8c2ddf3c49d32992d20e3e
Ditoeight/Pyranitar
db_queries.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add base Django user directory" }, { "role": "assistant", "content": "import sqlalchemy\n\nfrom .base import Directory, User\n\nclass DjangoDirectory(Directory):\n query = \"\"\"\n SELECT\n auth_user.id,\n aut...
python
new_file
2
2
mit
10e9fd1dd93cee2fd96fcb50f9a5ec1607fb9c66
prophile/jacquard,prophile/jacquard
jacquard/directory/django.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add site engine for StudioKhimera" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2019-2020 Tobias Gruetzmacher\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom ..scraper...
python
new_file
1
4
mit
121e63c069a83411f15c66d42a9ade871ad9afab
webcomics/dosage,peterjanes/dosage,webcomics/dosage,peterjanes/dosage
dosagelib/plugins/studiokhimera.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add match accuracy benchmark script" }, { "role": "assistant", "content": "from tabulate import tabulate\nimport csv\nimport yaml\nimport sys\nimport os.path as path\n\nbase_directory = path.dirname(path.dirname(path.abspath(__fi...
python
new_file
1
6
mit
a558b9efe5f20af2b5b4e588add8648bfba22c2c
kdelwat/LangEvolve,kdelwat/LangEvolve,kdelwat/LangEvolve
app/scripts/benchmark_match_accuracy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some initial teests for hostdb" }, { "role": "assistant", "content": "'''\nTest hostdb\n'''\n\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# ...
python
new_file
1
1
apache-2.0
ee87aecbd08abaac4b5fa7b50ac120fdf17553c2
persiaAziz/trafficserver,PSUdaemon/trafficserver,rpufky/trafficserver,davidbz/trafficserver,SolidWallOfCode/trafficserver,rahmalik/trafficserver,rahmalik/trafficserver,vmamidi/trafficserver,chitianhao/trafficserver,reveller/trafficserver,duke8253/trafficserver,duke8253/trafficserver,chitianhao/trafficserver,pbchou/traf...
ci/new_tsqa/tests/test_hostdb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add South migration for LoginAttempt.path" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Mig...
python
new_file
4
1
mit
38eafc8a4a78da04b0260d2bad6a38addb82ee4a
wujuguang/django-admin-honeypot,ajostergaard/django-admin-honeypot,dmpayton/django-admin-honeypot,Samael500/django-admin-honeypot,Samael500/django-admin-honeypot,ajostergaard/django-admin-honeypot,wujuguang/django-admin-honeypot,javierchavez/django-admin-honeypot,javierchavez/django-admin-honeypot,dmpayton/django-admin...
admin_honeypot/migrations/0002_add_field_LoginAttempt_path.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tool for creating a separate backoff node for inword positions" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport argparse\n\nimport sys\n\n\ndef main(inf, outf, word_map):\n iw_backoff_outgoing = []\n...
python
new_file
1
10
apache-2.0
6182f07a82733c0c3d22aee40abbc392da67ce4d
psmit/kaldi-recipes,psmit/kaldi-recipes,psmit/kaldi-recipes,phsmit/kaldi-recipes,phsmit/kaldi-recipes
spraakbanken/s5/spr_local/inword_backoff_node.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add current state of golddust package" }, { "role": "assistant", "content": "# Copyright 2015-2016 John \"LuaMilkshake\" Marion\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ...
python
new_file
1
3
apache-2.0
c7d32d2ed2483ce34c7a901c84d128c50f03c472
Packeteers/GoldDust
golddust/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the Russian example test" }, { "role": "assistant", "content": "# Russian Language Test\nfrom seleniumbase.translate.russian import ТестНаСелен # noqa\n\n\nclass МойТестовыйКласс(ТестНаСелен):\n\n def test_пример_1(self):...
python
new_file
1
1
mit
dfa99a462487fe728c29a8663a223c129ed17355
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
examples/translations/russian_test_1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es)\n#\n# 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 obtain a copy of the License at\n...
python
edit
1
3
apache-2.0
d4aab57bf6173334fa2dbd82eef74b786473ef3d
WebSpider/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,damienmarie-alation/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,bernii/djangosaml2,damienmarie-alation/djangosaml2,knaperek/djangosaml2,WebSpider/djangosaml2,writepython/djangosaml2,MiguelSR/djangosaml2,knaperek/djangosaml2,azavea/django...
djangosaml2/templatetags/idplist.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.template.defaultfilters import slugify\nfrom debug_toolbar.middleware import DebugToolbarMiddleware\n\n\nclass DebugPanel(object):\n \"\"\"\n Base class for debug panels.\n \"\"\"\n # name = Base\n has_content = F...
python
edit
1
2
bsd-3-clause
c20e83fc946c8898d40b0210f71286575891ae94
megcunningham/django-debug-toolbar,spookylukey/django-debug-toolbar,megcunningham/django-debug-toolbar,tim-schilling/django-debug-toolbar,calvinpy/django-debug-toolbar,barseghyanartur/django-debug-toolbar,Endika/django-debug-toolbar,spookylukey/django-debug-toolbar,megcunningham/django-debug-toolbar,ChristosChristofidi...
debug_toolbar/panels/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr" }, { "role": "assistant", "content": "\"\"\"\nCreate a plot of today's total precipitation from the Stage4 estimates\n\"\"\"\n\nimport pygrib\nimport mx.Da...
python
new_file
4
4
mit
a6f1d1e7ca63a4d204aade3b0f67b53c1e867609
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/feature/stage4_24h_heavy.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Load data from AT20G BSS and SUperCOSMOS catalogues" }, { "role": "assistant", "content": "import numpy as np\n\ndef hms2dec(h, m, s):\n return 15*(h + m/60 + s/3600)\n\ndef dms2dec(d, m, s):\n if (d >= 0):\n return d + m/60...
python
new_file
1
2
mit
0ad93dfef152aae325b99274ac6a6789b1d46a32
lokijota/datadrivenastronomymooc
wk2/loading_catalogues.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add event indexing service client\n\nAdd script that serves as client to EPA Event Indexing Service. The\nscript has a convenience function for querying EPA with minimal\narguments and returns GeoJSON." }, { "role": "assistant", ...
python
new_file
4
2
mit
63d2d3cd16cd4f7f2bedb748f84fefa4e6c32661
Harefoot/TurboQUALTX
ET_Utils/WATERS_Utils/event_indexing_client.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add pytest config file for slow tests.\n\nAdded a pytest config file in the tests folder, so that I could define a\n--runslow option to some tests. This way, I don't have to run them all\nthe time if not necessary." }, { "role": "ass...
python
new_file
1
3
bsd-3-clause
5b5027a6e84324bc09ad3ba29d84e54c51d33b45
achabotl/pambox
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: messenger: Add a small test client program" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n# Copyright 2012 James McCauley\n#\n# This file is part of POX.\n#\n# POX is free software: you can redistribute it and/or...
python
new_file
3
9
apache-2.0
9e8b32928c068237e34a7c319564333bbed59cb7
waltznetworks/pox,waltznetworks/pox,PrincetonUniversity/pox,andiwundsam/_of_normalize,VamsikrishnaNallabothu/pox,jacobq/csci5221-viro-project,chenyuntc/pox,diogommartins/pox,carlye566/IoT-POX,pthien92/sdn,adusia/pox,pthien92/sdn,pthien92/sdn,carlye566/IoT-POX,pthien92/sdn,waltznetworks/pox,kulawczukmarcin/mypox,Princet...
pox/messenger/test_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for zipping galleries" }, { "role": "assistant", "content": "# -*- coding:utf-8 -*-\n\nimport os\nimport glob\nimport zipfile\n\nfrom sigal.gallery import Gallery\nfrom sigal.settings import read_settings\n\nCURREN...
python
new_file
1
2
mit
77274f00cf1f4c3b99289fa0c21461e207cdfcb8
Ferada/sigal,cbosdo/sigal,xouillet/sigal,elaOnMars/sigal,kontza/sigal,jdn06/sigal,xouillet/sigal,saimn/sigal,cbosdo/sigal,kontza/sigal,jdn06/sigal,jasuarez/sigal,franek/sigal,Ferada/sigal,jdn06/sigal,saimn/sigal,muggenhor/sigal,elaOnMars/sigal,t-animal/sigal,franek/sigal,kontza/sigal,t-animal/sigal,jasuarez/sigal,Ferad...
tests/test_zip.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple module to show internet connection" }, { "role": "assistant", "content": "from i3pystatus import IntervalModule\nfrom i3pystatus.core.util import internet\n\n\nclass Online(IntervalModule):\n\n \"\"\"Show internet c...
python
new_file
1
2
mit
1210f01eddf1979f9a8a4c9eed429d43e3fd7d53
schroeji/i3pystatus,richese/i3pystatus,yang-ling/i3pystatus,fmarchenko/i3pystatus,facetoe/i3pystatus,ncoop/i3pystatus,juliushaertl/i3pystatus,Arvedui/i3pystatus,juliushaertl/i3pystatus,m45t3r/i3pystatus,facetoe/i3pystatus,enkore/i3pystatus,eBrnd/i3pystatus,enkore/i3pystatus,drwahl/i3pystatus,teto/i3pystatus,asmikhailov...
i3pystatus/online.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 02-task sample test v2." }, { "role": "assistant", "content": "import unittest\nimport solution as s\n\n\nclass SampleTest(unittest.TestCase):\n def test_five_plus_three(self):\n plus = s.create_operator('+', lambda...
python
new_file
1
3
mit
e6318e03697034ba40ebd33666c1cf3d2f9a7bc5
pepincho/Python-Course-FMI
02_task/sample_tests_v2.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django.contrib.auth.backends import ModelBackend\n\n\nclass Emailbackend(ModelBackend):\n\n def authenticate(self, email=None, password=None, *args, **kwargs):\n if email is None:\...
python
edit
1
7
bsd-3-clause
c3c5128726e86436a7c7413c60c578410750d2c1
Jannes123/django-oscar,amirrpp/django-oscar,Bogh/django-oscar,michaelkuty/django-oscar,jinnykoo/christmas,pasqualguerrero/django-oscar,rocopartners/django-oscar,pdonadeo/django-oscar,eddiep1101/django-oscar,adamend/django-oscar,jinnykoo/wuyisj,jmt4/django-oscar,jlmadurga/django-oscar,itbabu/django-oscar,jinnykoo/wuyisj...
oscar/apps/customer/auth_backends.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sim procedure for Random.nextInt" }, { "role": "assistant", "content": "from ..java import JavaSimProcedure\nfrom angr.engines.soot.values.thisref import SimSootValue_ThisRef\nfrom angr.engines.soot.values.instancefieldref im...
python
new_file
6
1
bsd-2-clause
1dc07f52ea90a50e40d550193f8ac19b5086f208
iamahuman/angr,iamahuman/angr,angr/angr,angr/angr,iamahuman/angr,schieb/angr,angr/angr,schieb/angr,schieb/angr
angr/procedures/java_util/random.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Create the state for get a person from database." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# encoding=utf8\n\nimport json\n\nimport requests\nfrom flexbe_core import EventState\nfrom rospy import logerr, login...
python
new_file
1
8
bsd-3-clause
60a27341bb469943271047781a4be8a38b39825a
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
sara_flexbe_states/src/sara_flexbe_states/WonderlandGetPersonById.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Bring my Github up to date, with latest CSP." }, { "role": "assistant", "content": "cats = {\n 'kb': '''\n\n\n\nName(Felis, Catus)\nName2(Catus, Cat)\nName(Felis, Chaus)\nName2(Chaus, JungleCat)\nName(Panthera, Tigris)\nName2(...
python
new_file
1
0
mit
bf15370e98a015fd0a989f7df2be6ba0383fbd78
JoeLaMartina/AlphametricProject,NolanBecker/aima-python,AmberJBlue/aima-python,JamesDickenson/aima-python,AmberJBlue/aima-python,SimeonFritz/aima-python,jottenlips/aima-python,chandlercr/aima-python,WmHHooper/aima-python,AmberJBlue/aima-python,abbeymiles/aima-python,WhittKinley/aima-python,WmHHooper/aima-python,grantvk...
submissions/McLean/myLogic.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple peer selector which automatically connects to any new jam instance it hears about" }, { "role": "assistant", "content": "import sets\nimport Axon\n\nclass PeerSelector(Axon.Component.component):\n Inboxes = {\"inb...
python
new_file
2
5
apache-2.0
8d1b233c336298f2929a176d0bc6c7279dc07853
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/PeerSelector.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for nationality model" }, { "role": "assistant", "content": "from django.test import TestCase\nfrom django.core.exceptions import ValidationError\n\nfrom master_data.models import Nationality\n\n\nclass NationalityModeTe...
python
new_file
1
1
mit
2b2b7101dfe6953da2a482dfcf16f94eba3c08aa
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
master_data/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test that 1D orbit integration agrees between Orbit and Orbits" }, { "role": "assistant", "content": "##########################TESTS ON MULTIPLE ORBITS#############################\nimport numpy\nfrom galpy import potential\n\n#...
python
new_file
1
3
bsd-3-clause
b90ef0acfec29aaf317dadce7122e97c8cc103c4
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
tests/test_orbits.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make a new prophage dir" }, { "role": "assistant", "content": "\"\"\"\nCreate a prophage.tbl file from a phispy directory that does not contain one.\n\"\"\"\n\nimport os\nimport sys\nimport argparse\nfrom evaluation import make_...
python
new_file
3
1
mit
b27ae2b78d5d21e4a1f5e9fbeba5433e62cd4057
linsalrob/PhiSpy,linsalrob/PhiSpy,linsalrob/PhiSpy,linsalrob/PhiSpy
source/create_prophage_tbl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration test for sns" }, { "role": "assistant", "content": "import os\nfrom asyncaws import SNS\nfrom tornado.testing import AsyncTestCase, gen_test\nfrom random import randint\n\naws_key_id = os.environ['AWS_ACCESS_KEY_I...
python
new_file
5
1
mit
99d6a8d2c1c59dcac90ddd9b3958ed5d74d66a2a
MA3STR0/AsyncAWS
tests/integration/test_sns.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add simple tests for shub deploy" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# coding=utf-8\n\n\nimport unittest\nfrom shub import deploy\nfrom click.testing import CliRunner\nfrom mock import Mock\n\n\nclass De...
python
new_file
1
1
bsd-3-clause
45685a739efdd215623ca1364f979ed3b5444367
scrapinghub/shub
tests/test_deploy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve the Fibonacci Series challenge" }, { "role": "assistant", "content": "import sys\n\ndef fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n-1) + fibonac...
python
new_file
1
3
mit
737000499967a9c910e60868227de9a923f0555e
TommyN94/CodeEvalSolutions,TommyN94/CodeEvalSolutions
FibonacciSeries.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add failing test for anon viewing receiving page" }, { "role": "assistant", "content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom gratipay.testing import Harness\n\n\nclass Tests(H...
python
new_file
4
1
mit
ca346df368c7c798495243199c8693d1b44a5e7f
gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com
tests/py/test_www_team_receiving.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add directory for start symbol tests" }, { "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\"\"\"" } ]
python
new_file
1
0
mit
5578d11f45e9c41ab9c4311f2bed48b9c24d9bf5
PatrikValkovic/grammpy
tests/grammar_term-nonterm_test/NonterminalHaveTest.py
rejected_duplicate
Near-duplicate of sample 7653
true
[ { "role": "user", "content": "Write python code for the following: Add test for self usage in static methods" }, { "role": "assistant", "content": "import pytest\n\nfrom tests.compiler import compile_base, internal_call\nfrom thinglang.compiler.errors import SelfInStaticMethod\nfrom thinglang.co...
python
new_file
5
1
mit
27ee10a1a44dee6e4efce6b8187d4cb6dd448e7b
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
tests/compiler/method_definition.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a class to implement a fraction in python, to deal with method overriding" }, { "role": "assistant", "content": "#gdc(a,b) = gcd(b, a%b) OBS: Positive integer only\ndef gcd(m,n):\n while(m%n != 0):\n aux = m\n ...
python
new_file
1
2
unlicense
fa6e1b638f7d8832498ddb75b94420607ffc109c
robotenique/RandomAccessMemory,robotenique/RandomAccessMemory,robotenique/RandomAccessMemory
Python_Data/Fraction.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to make testartifact actually CASCADE on delete.\n\nSummary:\nThis is alright if we don't care much about having dangling references\non S3/ArtifactStore (such as if we clean them separately).\n\nReviewers: paulruan\n\nReviewed...
python
new_file
3
1
apache-2.0
876a182de54b2f1fc54cc051646fc04cd400a81c
dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes
migrations/versions/3be107806e62_make_testartifact_cascade_on_test_delete.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8\n\n\"\"\"\nThe sole purpose of the following script is to update the\nlocal.ini file used by the dimagi teamcity buildserver\nso that the path to xform_translate.jar is upda...
python
edit
4
0
bsd-3-clause
1bae1bc94fea8fd9b8fe25d832ebfce07ad08a1c
puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttaraju...
utilities/build/update_xform_translate_path.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test for get_gcs_client with un-authed ID" }, { "role": "assistant", "content": "import uuid\n\nimport pytest\n\nfrom globus_cli.services.gcs import get_gcs_client\n\n\ndef test_get_gcs_client_missing_required_auth():\n gc...
python
new_file
1
1
apache-2.0
d5442c89c27b672496ab5aa71e68b38aa8166f73
globus/globus-cli,globus/globus-cli
tests/unit/test_gcs_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for processing invariant" }, { "role": "assistant", "content": "\"\"\"Test that we can read and write bib entries with postprocessing.\"\"\"\n\nimport bibpy\nimport pytest\n\n\n@pytest.fixture\ndef test_string():\n re...
python
new_file
1
1
mit
5eaf915f7fe6ed590e58b5cc554b4477568dda85
MisanthropicBit/bibpy,MisanthropicBit/bibpy
tests/test_processing_invariant.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to profile benchmarking time" }, { "role": "assistant", "content": "# Profile the basic test execution\n\nfrom pyresttest import resttest\nfrom pyresttest.benchmarks import Benchmark\nimport cProfile\n\ntest = Benchmar...
python
new_file
3
0
apache-2.0
c91ab4c38fabb78842b97584356e816903f4ec0e
satish-suradkar/pyresttest,TimYi/pyresttest,janusnic/pyresttest,netjunki/pyresttest,janusnic/pyresttest,svanoort/pyresttest,sunyanhui/pyresttest,suvarnaraju/pyresttest,satish-suradkar/pyresttest,TimYi/pyresttest,sunyanhui/pyresttest,holdenweb/pyresttest,netjunki/pyresttest,MorrisJobke/pyresttest,holdenweb/pyresttest,sv...
profile_benchmark.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial bare repository generation." }, { "role": "assistant", "content": "import tempfile\nimport pygit2\n\n\ntmpdir = tempfile.TemporaryDirectory(suffix='.git', prefix='branchandcommit-')\n\nprint('Creating bare repository:...
python
new_file
1
0
mit
f47f30d9f6e19c99c0beff94aa5d7a8d276b78b2
davidstrauss/branch-and-commit-to-bare-repo
branchandcommit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic smoke test that task_processing is available" }, { "role": "assistant", "content": "# Copyright 2015-2017 Yelp Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ex...
python
new_file
1
1
apache-2.0
8e833781bc121e07e49331c277179d9b587dd5e7
somic/paasta,somic/paasta,Yelp/paasta,Yelp/paasta
tests/test_task_processing.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve all but first test case" }, { "role": "assistant", "content": "def fibonacci(n):\n if n == 0:\n return 0\n elif n == 1:\n return 1\n else:\n return fibonacci(n - 1) + fibonacci(n - 2)\n\nn = in...
python
new_file
1
3
mit
33e88fa6d68172f49e3e23d38f3dc58044cf92a0
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/ctci_fibonacci_numbers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new test for symmetry with site tensors" }, { "role": "assistant", "content": "import unittest\nimport numpy as np\nfrom spglib import get_symmetry\n\n\nclass TestGetOperationsWithSiteTensors(unittest.TestCase):\n\n def se...
python
new_file
1
1
bsd-3-clause
88409bd0d71138d02729d03bf66aebc65e98acf8
atztogo/spglib,atztogo/spglib,atztogo/spglib,atztogo/spglib,atztogo/spglib
python/test/test_site_tensors.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to create user_rank materialized view" }, { "role": "assistant", "content": "def up(cursor, bot):\n cursor.execute(\n \"\"\"\n CREATE MATERIALIZED VIEW user_rank AS (\n SELECT\n id as ...
python
new_file
1
1
mit
88102b625d239d3c35187d6b398cf0f1a8171015
pajlada/tyggbot,pajlada/pajbot,pajlada/pajbot,pajlada/tyggbot,pajlada/tyggbot,pajlada/pajbot,pajlada/tyggbot,pajlada/pajbot
pajbot/migration_revisions/db/0006_create_user_rank_materialized_view.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement the server notice mechanism" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom twisted.words.protocols import irc\nfrom txircd.module_interface import IMode, IModuleData, Mode, ModuleData\nf...
python
new_file
1
6
bsd-3-clause
96b902865cd06f578d7dc3f23f90168b7e8ba7c8
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/rfc/umode_s.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve is binary search tree" }, { "role": "assistant", "content": "\"\"\" Node is defined as\nclass node:\n def __init__(self, data):\n self.data = data\n self.left = None\n self.right = None\n\"\"\"\n\nim...
python
new_file
1
4
mit
2cc2a1318da0980911dd0cd0868efb8fad4dd1d8
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/ctci-is-binary-search-tree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for `qisrc diff`\n\nChange-Id: I32fe0d298dd8bced991c3b314ed543614266cc24\nReviewed-on: http://gerrit.aldebaran.lan/60721\nTested-by: gerrit\nReviewed-by: vbarbaresi <<EMAIL>>" }, { "role": "assistant", "content": "## C...
python
new_file
3
1
bsd-3-clause
41055e52ee2f626c82dafa10c5df1cd90adf288a
aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild
python/qisrc/test/test_qisrc_diff.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for converting landmarks config\n\nAdd an example script for converting old-style landmarks configurations\n(constructing an actual Landmarks instance in config.py) with the\nnew-style of using standard Python data-types (a tupl...
python
new_file
1
2
mit
b810e2b7cdd612b1dba522e36241a472d59376ca
sebast1219/Monocle,sebast1219/Monocle,sebast1219/Monocle
scripts/convert_landmarks_example.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add two smoke tests for Elsevier client" }, { "role": "assistant", "content": "from indra.literature import elsevier_client as ec\n\ndef test_get_fulltext_article():\n # This article is not open access so in order to get a ful...
python
new_file
1
1
bsd-2-clause
f44faa9a029b57c96cdb7d1b38a4e3760ac19f94
pvtodorov/indra,jmuhlich/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,pvtodorov/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,jmuhlich/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,jmuhlich/indra,pvtodorov/indra,bgyori/indra,pv...
indra/tests/test_elsevier_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test that derived generator is the owner of its constituent generators" }, { "role": "assistant", "content": "import pytest\nfrom .exemplar_generators import EXEMPLAR_DERIVED_GENERATORS\n\n\n@pytest.mark.parametrize(\"g\", EX...
python
new_file
1
2
mit
d7d916c196001ca2d23e4a3477145c5383ee99bf
maxalbert/tohu
tests/v6/test_derived_generators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a tool to convert pcap to Murphy's python classes.\n\nNot quite useful yet" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n# Installed from: http://dirtbags.net/py-pcap.html\nimport pcap\nimport argparse\nimpo...
python
new_file
2
0
apache-2.0
cde1be5f4f8b3effe2d6802db368167a35495878
ucb-sts/sts,ucb-sts/sts,jmiserez/sts,jmiserez/sts
tools/load_pcap.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Reset `not null` on some legacy fields." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.13 on 2018-06-15 6:12\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations...
python
new_file
1
0
mit
af4fe82552b894073e3f4c7fae814deb80487b3c
occrp/id-backend
api_v3/migrations/0010_drop_profile_not_null.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add validation test for adding node label\n\nhttps://github.com/rancher/rancher/issues/24123" }, { "role": "assistant", "content": "import pytest\n\nfrom .common import * # NOQA\n\ndef test_add_node_label():\n client, cluster...
python
new_file
6
2
apache-2.0
6717e73d1dfb5b7b7a6d1e2cd24e1983d41c0fc3
rancher/rancher,cjellick/rancher,rancher/rancher,rancherio/rancher,rancher/rancher,rancher/rancher,cjellick/rancher,cjellick/rancher,rancherio/rancher
tests/validation/tests/v3_api/test_node.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add minimisation & then dynamics example test" }, { "role": "assistant", "content": "def test_min_dyn():\n import glob\n import matplotlib.pyplot as plt\n %matplotlib inline\n from joommf.sim import Sim\n from joom...
python
new_file
null
null
bsd-2-clause
8eda98d75d2fb502b447deb2ab28e71611b021c3
fangohr/oommf-python,fangohr/oommf-python,fangohr/oommf-python
joommf/tests/test_min_dyn_example.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add test for scoring engine config" }, { "role": "assistant", "content": "\nfrom scoring_engine.config_loader import ConfigLoader\nclass MockConfigLoader():\n pass\n\nConfigLoader = MockConfigLoader\n\nfrom scoring_engine.conf...
python
new_file
4
1
mit
b6d0ff750bb48c8be514a8a36f1b7ab30efb460a
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
tests/scoring_engine/test_config.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration for Observation model options change." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migratio...
python
new_file
3
0
mit
1c84604b28ffcbfc3b32d401a29e87927aba282e
zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net
observations/migrations/0002_auto_20151217_1759.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test channel joins of real bot" }, { "role": "assistant", "content": "\"\"\"\n:Copyright: 2007-2021 Jochen Kupperschmidt\n:License: MIT, see LICENSE for details.\n\"\"\"\n\nfrom irc.client import Event, NickMask, ServerConnection...
python
new_file
1
1
mit
3f9032dd250434f45db97e106da7ff97eb5d39d1
homeworkprod/syslog2irc
tests/test_irc_bot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add STATS type to display the ports that the server is listening on" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom txircd.factory import UserFactory\nfrom txircd.module_interface import IModuleDat...
python
new_file
1
3
bsd-3-clause
b7b0159e462efb7abfd63c0e3066704637fa4df2
Heufneutje/txircd
txircd/modules/extra/stats_ports.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to get OAuth2 credentials for Google Sheets API" }, { "role": "assistant", "content": "\"\"\"\nProgram: Get Credentials\nProgrammer: Michael Fryar, Research Fellow, EPoD\nDate created: January 5, 2017\n\nPurpose: Gets ...
python
new_file
4
5
mit
ccf3ea0a1b89815710460a40eefc3f230b9660a3
mefryar/epodx-dashboards,mefryar/epodx-dashboards
get_credentials.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a Google Translate plugin." }, { "role": "assistant", "content": "import json\nimport re\n\nimport pycountry\nfrom titlecase import titlecase\n\nfrom plumeria.command import commands, CommandError\nfrom plumeria.message impor...
python
new_file
3
5
mit
23fd59feb2576ec5837bbb2233f6b20befed5866
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
plumeria/plugins/google_translate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add start of z-order example." }, { "role": "assistant", "content": "\"\"\"\nEventually this will be an example showing how we support z-ordering.\n\"\"\"\nimport arcade\n\nSCALE = 0.75\n\nSCREEN_HEIGHT = 320\nSCREEN_WIDTH = 512\...
python
new_file
1
1
mit
37a6261897b413f3aa5be310c4cd1e7abcb1a55f
mikemhenry/arcade,mikemhenry/arcade
examples/zorder.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Cover the syntax error from wrong indentation as well." }, { "role": "assistant", "content": "#\n# Kay Hayen, mailto:<EMAIL>\n#\n# Python test originally created or extracted from other peoples work. The\n# parts from...
python
new_file
2
1
apache-2.0
934367c972d99c034ee69fcec7930c4bd7d42dcc
tempbottle/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka,wfxiang08/Nuitka,wfxiang08/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,wfxiang08/Nuitka,wfxiang08/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka
tests/syntax/IndentationError.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: examples: Add example script to flash an LED using inline assembler." }, { "role": "assistant", "content": "# flash LED #1 using inline assembler\n@micropython.asm_thumb\ndef flash_led(r0):\n movw(r1, (stm.GPIOA + stm.GPIO_BSR...
python
new_file
103
1
mit
71dcd5198944b59f8f69e4027032f8ef0346eabf
utopiaprince/micropython,alex-robbins/micropython,ruffy91/micropython,drrk/micropython,mgyenik/micropython,martinribelotta/micropython,trezor/micropython,misterdanb/micropython,torwag/micropython,adafruit/circuitpython,Timmenem/micropython,ernesto-g/micropython,kostyll/micropython,hosaka/micropython,lbattraw/micropytho...
examples/asmled.py
rejected_lint
Too many lint violations: 103
true
[ { "role": "user", "content": "Write python code for the following: Convert basecall files to BED3 files" }, { "role": "assistant", "content": "#!/usr/bin/env python\n'''\nConverts a file in basecall format to BED3 format.\n'''\nimport sys,os\n\ndef basecall_to_bed(fname):\n with open(fname) a...
python
new_file
3
3
bsd-3-clause
755c192a9299888475606a9e60c8c8c5105b6cd2
ngsutils/ngsutils,ngsutils/ngsutils,ngsutils/ngsutils
bed_utils/bed_from_basecall.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to transform CT result to trace list" }, { "role": "assistant", "content": "import csv\nimport sys\n\ndef csv_to_traces(infile, outfile):\n traces = []\n with open(infile) as inf:\n results = csv.DictReader(inf)\n...
python
new_file
2
4
bsd-3-clause
8f69b07e80198c1af0d5bd368d8ad8ced968884a
catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm
experimental/csm/ct_csv_to_traces.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Execution class to represent data read from configuration Sheet" }, { "role": "assistant", "content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use ...
python
new_file
3
6
apache-2.0
7ffb2c2e56f80d12f5e7dccfe8555a741d67e335
google/megalista,google/megalista
megalist_dataflow/utils/execution.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add failing line number test." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\n\n# Copyright 2017 Eddie Antonio Santos <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"L...
python
new_file
1
1
apache-2.0
2e8b74b7b7067ab3bb0345247c4d16521234822f
naturalness/sensibility,naturalness/sensibility,naturalness/sensibility,naturalness/sensibility
tests/test_line_number_regression.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test case showing the RL bug" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph\nfrom reportlab.platypus.tables import *\n\ndef go(...
python
new_file
4
1
mit
7d2f454eb5302b62a9c22c69c319f6c9f8bab7fe
rafaelmartins/rst2pdf,rafaelmartins/rst2pdf
rst2pdf/tests/input/test_issue_65.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Test finding empty subplots for all selector combinations\n\nThis tests go.Figure._subplot_not_empty" }, { "role": "assistant", "content": "import pytest\nimport plotly.graph_objects as go\nfrom plotly.subplots import make_subplo...
python
new_file
3
2
mit
bc1e78ac1caf18e0dfaa6479388cb8496e406419
plotly/plotly.py,plotly/plotly.py,plotly/plotly.py
packages/python/plotly/plotly/tests/test_core/test_subplots/test_find_nonempty_subplots.py
accepted
null
true