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 subroutine to print a dictionary tree" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import pr...
python
new_file
1
8
apache-2.0
a5f591a71e460130055aafd16b248f7f61d0c541
nathanielng/code-templates,nathanielng/code-templates,nathanielng/code-templates
snippets/python/nested.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for getting the current versions of the API" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- encoding: utf-8\n\"\"\"\nPrints information about which version of the API is currently running,\nso you...
python
new_file
1
4
mit
5109ced931692a0c09efcd2dfc5131537b32e4cc
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
catalogue_api/get_api_versions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple decorator for local evaluation of functions." }, { "role": "assistant", "content": "import numpy as np\nfrom distarray.client import DistArrayContext, DistArrayProxy\nfrom IPython.parallel import Client\n\nc = Client...
python
new_file
1
1
bsd-3-clause
6187cb81c7d80dc05f25fb399a9d01ee61fa93d6
RaoUmer/distarray,enthought/distarray,RaoUmer/distarray,enthought/distarray
distarray/tests/test_odin_local.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new test using an ARM firmware" }, { "role": "assistant", "content": "\nimport os\n\nimport angr\nfrom nose.tools import assert_equal, assert_true\n\ntest_location = str(os.path.join(os.path.dirname(os.path.realpath(__file_...
python
new_file
4
1
bsd-2-clause
6e4e5cb5d32ac650d5ae08b47fe8e1c9d7e2ec04
schieb/angr,schieb/angr,schieb/angr,angr/angr,angr/angr,angr/angr,iamahuman/angr,iamahuman/angr,iamahuman/angr
tests/test_cfg_thumb_firmware.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test case for ppc64 initial rtoc value" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport nose\nimport logging\nimport cle\n\nimport os\ntest_location = os.path.join(os.path.dirname(os.path.realpath(__file...
python
new_file
1
1
bsd-2-clause
841a84d940ff1dc8e4751ef31acb25bc3e1497da
angr/cle
tests/test_ppc64_initial_rtoc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple and untested FFT transform" }, { "role": "assistant", "content": "import cmath\n\ndef fft0(xs):\n n, ys = len(xs), []\n\n for i in range(n):\n yi = complex(0, 0)\n\n for j in range(n):\n ...
python
new_file
1
3
mit
4b3443d5cccf9a62ffceb7ea795ad0ef69811908
all3fox/algos-py
src/fft.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a basic crawler and tfidf_lsa creation test" }, { "role": "assistant", "content": "from tfidf_lsa import calculate_corpus_var\nimport json\nimport os\nimport shutil\nimport subprocess\nimport unittest\n\nclass TestMoviePepper...
python
new_file
1
4
mit
90ac14b61066f6039df5d1522b7ac6bd76779b7b
hugo19941994/movie-pepper-back,hugo19941994/movie-pepper-back
tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test suite for str()'s and repr()'s\n\nBefore I jump into improvements to how the strings and reprs work, I\nreally should have something in the unit tests about them. The clunky\nreporting from Sphinx's `make doctest`, which are the cu...
python
new_file
1
1
mit
e7534c6d5fd5c7d76c56d48be12302b596b35d29
skyfielders/python-skyfield,skyfielders/python-skyfield
skyfield/tests/test_strs_and_reprs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create new module for TestGetUserConfig with setup/teardown" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_get_user_config\n--------------------\n\nTests formerly known from ...
python
new_file
19
2
bsd-3-clause
d180b780487b81b06beb24e809cfb17fd2320e3f
audreyr/cookiecutter,jhermann/cookiecutter,drgarcia1986/cookiecutter,willingc/cookiecutter,stevepiercy/cookiecutter,0k/cookiecutter,benthomasson/cookiecutter,venumech/cookiecutter,benthomasson/cookiecutter,terryjbates/cookiecutter,dajose/cookiecutter,vincentbernat/cookiecutter,atlassian/cookiecutter,cguardia/cookiecutt...
tests/test_get_user_config.py
rejected_lint
Too many lint violations: 19
true
[ { "role": "user", "content": "Write python code for the following: Migrate v1 attachment file names." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.1 on 2017-08-26 13:12\nfrom __future__ import unicode_literals\nimport os.path\n\nfrom django.db import ...
python
new_file
1
3
mit
bd5537414ed5d05eeab2c41b22af9d665823ccaf
occrp/id-backend
api_v3/migrations/0008_v1_to_v2_attachments.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to dump FDP metadata into files in different formats." }, { "role": "assistant", "content": "#\n# This script creates dump files of metadata in different formats upon requests to FDP.\n#\n\nfrom os import path, makedir...
python
new_file
8
4
apache-2.0
d89d783e9b4555eadf17467a9022fec2c73b3943
DTL-FAIRData/ODEX-FAIRDataPoint,DTL-FAIRData/ODEX-FAIRDataPoint,NLeSC/ODEX-FAIRDataPoint,DTL-FAIRData/ODEX-FAIRDataPoint,DTL-FAIRData/ODEX-FAIRDataPoint,NLeSC/ODEX-FAIRDataPoint,NLeSC/ODEX-FAIRDataPoint,NLeSC/ODEX-FAIRDataPoint
fdp-api/python/tests/dump_metadata.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Use Stack to create postage stamps from Exposure (specifically CoaddTempExp) images" }, { "role": "assistant", "content": "import lsst.afw.geom as afwGeom\nimport lsst.afw.image as afwImage\n\n\nclass PostageStampMaker(object):\n...
python
new_file
3
1
mit
8994ca798a9cc2971954ce2b30bb6b5284c6e927
LSSTDESC/Twinkles,DarkEnergyScienceCollaboration/Twinkles,DarkEnergyScienceCollaboration/Twinkles,LSSTDESC/Twinkles
twinkles/PostageStampMaker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for add_css_class util function" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\nfrom django.test import TestCase\nfrom mock import MagicMock\...
python
new_file
1
1
apache-2.0
63a98b84709c4e981ea3fcf5493849948146e21d
thecut/thecut-forms,thecut/thecut-forms
thecut/forms/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a query command for easily finding people without contact info" }, { "role": "assistant", "content": "import sys\nimport csv\nfrom optparse import make_option\n\nfrom django.core.management.base import BaseCommand\n\nfrom dja...
python
new_file
3
8
isc
87460f7ff5d5079cffb7f1c02930fea2f891d3f0
CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer
wafer/management/commands/pycon_speaker_contact_details.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add graph compile with topological sort" }, { "role": "assistant", "content": "import copy\nfrom itertools import chain\n\nfrom graffiti import util\n\nexample = {\n \"a\": lambda b: 1,\n \"b\": lambda c: 2,\n \"c\": lam...
python
new_file
3
3
mit
a6b92bba1c92a2d324b6c1f1602dae0559859356
SegFaultAX/graffiti
graffiti/descriptor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial framerate webcam test structure" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport qrtools, gi, os\ngi.require_version('Gtk', '3.0')\ngi.require_version('Gst', '1.0')\nfrom gi.repository import Gtk...
python
new_file
4
3
mit
c6c87e1aafa6b8a4f7929c491398574921417bd4
daveol/Fedora-Test-Laptop,daveol/Fedora-Test-Laptop
tests/webcam_framerate.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Fix add help text on forms with migration" }, { "role": "assistant", "content": "# Generated by Django 3.1.13 on 2021-07-16 10:43\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(...
python
new_file
1
0
bsd-2-clause
c7e45b8f5eb06b2bd1934b357ae44b968375ed6f
makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
geotrek/infrastructure/migrations/0024_auto_20210716_1043.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add exercise Dwarfs standing on the shoulders of giants" }, { "role": "assistant", "content": "from collections import defaultdict\n\n\ndef traverseRelations(relations, children, length):\n if len(children) == 0:\n retu...
python
new_file
2
3
mit
a06796003e72cee518e66c7250afc3e4aec6ab7a
AntoineAugusti/katas,AntoineAugusti/katas,AntoineAugusti/katas
codingame/medium/dwarfs_standing.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for Embedly in Talk" }, { "role": "assistant", "content": "# coding: utf-8\nimport datetime\nfrom django.test import TestCase, override_settings\nfrom unittest.mock import patch\nfrom embedly import Embedly\nfrom apps.meetup...
python
new_file
1
1
bsd-3-clause
ad425b73ab396532b042e8b01be00af6024ef910
moscowpython/moscowpython,VladimirFilonov/moscowdjango,VladimirFilonov/moscowdjango,moscowpython/moscowpython,moscowpython/moscowpython,VladimirFilonov/moscowdjango,moscowdjango/moscowdjango,moscowdjango/moscowdjango,moscowdjango/moscowdjango
apps/meetup/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a management command to check for unapplied migrations.\n\n[PLAT-972]" }, { "role": "assistant", "content": "\"\"\"\nReturn a non-zero exit code if there are unapplied migrations.\n\"\"\"\nimport sys\n\nfrom django.db import ...
python
new_file
1
3
apache-2.0
1a12130c7be8b36a905de7000661d1ff91ed808c
mfraezz/osf.io,brianjgeiger/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,saradbowman/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,HalcyonChimera/osf.io,CenterForOpenScience/osf.io,sloria/osf.io,adlius/osf.io,HalcyonChimera/osf.io,cslzchen/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,caseyrollins/osf.io...
osf/management/commands/checkmigrations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add `role_required` view decorator to check current_user role\n\nReturns 403 if user has none of the roles listed in the decorator\narguments." }, { "role": "assistant", "content": "from functools import wraps\n\nfrom flask impor...
python
new_file
1
3
mit
ebf89478f7c841ee7d61a4081d4d6ba2f2cabe05
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
app/main/auth.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate LUI rasters for Katia\n\nThis script iterates through every land-use x intensity and writes out\nthe raster for the LUI." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport os\nimport sy...
python
new_file
3
0
apache-2.0
097464150228c3b5ba7cfb94619363cfea1fba1d
ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project,ricardog/raster-project
user-scripts/katia/code-LUI-secmin-isl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python (boto3-based) simple api workflow request script." }, { "role": "assistant", "content": "#!/usr/bin/python\r\n\r\nfrom boto3.session import Session\r\nimport sys\r\nimport os\r\nimport uuid\r\nimport time\r\n\r\n\r\nde...
python
new_file
1
2
apache-2.0
13a02d424fadd4401d393b2443dc97183c933221
groboclown/whimbrel,groboclown/whimbrel,groboclown/whimbrel,groboclown/whimbrel
simple-client-api/request-workflow-exec/python2_3/src/request-workflow-exec.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to combine data and extradata" }, { "role": "assistant", "content": "###\n# Call this with 4 parameters: the file to read data from, the file to read\n# extradata from, the file to write the combined data to, the...
python
new_file
3
6
bsd-3-clause
7cfc6abb8e573b0dd996f5849480a72652201279
meejah/torperf,meejah/torperf,meejah/torperf,aaronsw/torperf,aaronsw/torperf,mrphs/torperf,mrphs/torperf,aaronsw/torperf,mrphs/torperf,meejah/torperf
consolidate_stats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a helper script for initial distance fetch." }, { "role": "assistant", "content": "#!env python\n\nimport database as db\nfrom database.model import Team, RouteDistance\nfrom geotools import simple_distance\nfrom geotools.rou...
python
new_file
5
0
bsd-3-clause
9bdf597477d513b84de84a6872e15833c25efa19
janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
src/location_fetch.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add regression test for GH-18" }, { "role": "assistant", "content": "import unittest\n\nfrom mopidy.backends.dummy import DummyBackend\nfrom mopidy.frontends.mpd import dispatcher\nfrom mopidy.mixers.dummy import DummyMixer\nfrom...
python
new_file
1
1
apache-2.0
5cdfbce122ec0248104049760dadc1c83a01f7fb
ZenithDK/mopidy,mopidy/mopidy,kingosticks/mopidy,vrs01/mopidy,vrs01/mopidy,jcass77/mopidy,jodal/mopidy,mokieyue/mopidy,adamcik/mopidy,tkem/mopidy,glogiotatidis/mopidy,rawdlite/mopidy,mokieyue/mopidy,pacificIT/mopidy,bacontext/mopidy,bacontext/mopidy,mopidy/mopidy,bencevans/mopidy,liamw9534/mopidy,ZenithDK/mopidy,SuperS...
tests/frontends/mpd/regression_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add class to access dilipad text data\n\nCurrently only the nouns (topic words) are accessed. This class must be\nupdated to also return the opinion words of a text. The idea is to have\nsuch a corpus per perspective for cross perspective to...
python
new_file
7
2
apache-2.0
d4eb11f846da5b38a56599ca18d68fd2344dec7c
NLeSC/cptm,NLeSC/cptm
DilipadCorpus.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add some simple recursion examples" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\n A function is recursive when it calls itself (on a smaller piece of the\n problem). We need to provide a 'stoppin...
python
new_file
1
2
mit
915364b232bfa5a433962bd474074d985a39d7fa
nightmarebadger/tutorials-python-basic
2_basic/recursion/recursion_examples.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add projects field to samples and usergroups." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport rethinkdb as r\nfrom optparse import OptionParser\n\n\ndef main(conn):\n groups = list(r.table('usergroups')....
python
new_file
1
3
mit
b4f7bbe1d018316dce0c82b64c74efabbeea523e
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/conversion/addprojs.py
rejected_duplicate
Near-duplicate of sample 10130
true
[ { "role": "user", "content": "Write python code for the following: Add an integration test (disabled by default).\n\nThis gives a way to check the Cloudaux GCP resource retrieval against a\nGCP test project. They are disabled unless the\nCLOUDAUX_GCP_TEST_PROJECT environment variable is defined." }, { ...
python
new_file
1
2
apache-2.0
e850ab188e73f91bb4d85954d5f957ceb90d069a
Netflix-Skunkworks/cloudaux
cloudaux/tests/gcp/test_integration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration tests basic framework" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\nintegration tests for mac_service\n'''\n\n# Import python libs\nfrom __future__ import absolute_import, print_function\n\n...
python
new_file
3
4
apache-2.0
ed8add068ef8cdbbe8bed412272a8a608e003bb9
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/modules/mac_service.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for network bindings in NVP plugin\n\nBug 1099895\n\nEnsures the table nvp_network_bindings is created when upgrading\ndatabase to head, by adding an appropriate alembic migration\n\nChange-Id: I4a794ed0ec6866d657cb2470d5aa6782...
python
new_file
3
2
apache-2.0
821ae1f40c643d0ee2f9cbdfbce83c6f75196895
gkotton/vmware-nsx,gkotton/vmware-nsx
quantum/db/migration/alembic_migrations/versions/1d76643bcec4_nvp_netbinding.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility module for compiling FreeRTOS" }, { "role": "assistant", "content": "import os.path\n\ndef sources(base, port, mem_mang=None):\n core_src_names = [\n 'croutine.c',\n 'event_groups.c',\n 'list.c...
python
new_file
1
4
apache-2.0
f79edb442849785f3180756973a30eaff72d9821
google/cortex-demos,google/cortex-demos,google/cortex-demos,google/cortex-demos
freertos.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert a image to many lines." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport numpy as np\nfrom PIL import Image\nfrom pylab import *\nimport types\nfrom skimage import io, data\n\n# 读取图片,灰度化,并转为数组\nim0 = ...
python
new_file
10
0
apache-2.0
9d1e404eaf8e78efd6117266baf86ff3228915da
xpeng2333/robodraw,xpeng2333/robodraw,xpeng2333/robodraw,xpeng2333/robodraw
src/img2line.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add a completely hack-ish tool to sort includes according to the coding\nstandards.\n\nI am a terrible Python programmer. Patches more the welcome. Please tell\nme how this should look if it should look differently. It's just a tiny\nlittle ...
python
new_file
6
15
bsd-2-clause
42fdc9f9242df112046763560011336869d3efa1
lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx
sort_includes.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add specification for alchemy schema." }, { "role": "assistant", "content": "import unittest\n\nimport sqlalchemy as sa\n\nfrom pga.alchemy import sa_column_dict_to_column\n\n\nclass TestAlchemySchema(unittest.TestCase):\n\n d...
python
new_file
1
2
mit
a617c4bd3b38b2d364a3f12a0cb066559f8c8ae3
portfoliome/pgawedge
tests/test_alchemy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for ensuring side panel ordering" }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom wagtail.admin.ui.side_panels import BaseSidePanel, BaseSidePanels\n\n\nclass SidePanelA(BaseSidePanel):\n o...
python
new_file
1
2
bsd-3-clause
291538ca1de9605865d35cd8e30e4cd2f8a74cd3
zerolab/wagtail,thenewguy/wagtail,zerolab/wagtail,thenewguy/wagtail,wagtail/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,thenewguy/wagtail,wagtail/wagtail,wagtail/wagtail,wagtail/wagtail,zerolab/wagtail,wagtail/wagtail,thenewguy/wagtail,zerolab/wagtail,zerolab/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,thenewguy/wagtail,rs...
wagtail/admin/tests/ui/test_side_panels.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add WINC1500 fw update script." }, { "role": "assistant", "content": "'''\n Firmware update examples\n Note: copy the WINC1500/firmware folder to uSD\n'''\nimport time, network\n\n# Init wlan module in Download mode\nwlan =...
python
new_file
3
0
mit
ea63340282b7eba0d4b4f357808b8e374a3fcdf8
kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv
usr/examples/14-WiFi-Shield/fw_update.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#from distutils.core import setup\nfrom setuptools import setup\n\nfilename = 'tweetfeels/version.py'\nexec(compile(open(filename, \"rb\").read(), filename, 'exec'))\n\nsetup(name='tweetfeels',\n version=__version__,\n description...
python
edit
5
0
bsd-3-clause
8e5617d8c0279c871c0d78bc3ad5d3676d35cbce
uclatommy/tweetfeels
setup.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to split multi-point CZIs" }, { "role": "assistant", "content": "# @File(label=\"Input file\") input\n# @File(label=\"Output folder\") output\n\n# Splits multi-point CZI files into multiple TIFFs using Bio-Formats.\n#\...
python
new_file
null
null
bsd-2-clause
38db1be31407ecab2237c3cd75160f5ffeb59cb2
bic-kn/imagej-scripts
Split_Multipoint_CZI.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add missing script to use the root2json class" }, { "role": "assistant", "content": "\"\"\"\n1 July 2017\n\nDan Marley\n<EMAIL>\nTexas A&M University\n-----\n\nExecute the root2json class to convert\nROOT data into JSON format fo...
python
new_file
1
0
mit
ed48ce514c40e0f4e68e691091ed5bad91f273a6
cms-ttbarAC/CyMiniAna,cms-ttbarAC/CyMiniAna,cms-ttbarAC/CyMiniAna
python/runRoot2json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Read and print json data test." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport json\nfrom pprint import pprint\n\nwith open('data.json') as data_file:\n data = json.load(data_file)\n\npprint(data)\n\n" ...
python
new_file
1
0
mit
3465cd435547444d16c6ce479f22371b6fa00c4d
magnetmagnate/daily-grind,magnetmagnate/daily-grind
printjson.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix default value for owner" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.6 on 2016-06-02 23:00\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django...
python
new_file
1
0
mit
8ac4de6438488f3a24b13959e4effa644474609b
jake-jake-jake/cocktails,jake-jake-jake/cocktails,jake-jake-jake/cocktails,jake-jake-jake/cocktails
cocktails/drinks/migrations/0003_drink_owner.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test cases for sdk module\n\nAdd unit test cases for sdk module for class ProfileAction\nStill need unit tests for class Resource\n\nChange-Id: I6328e6346bbc2e615d1824aeb223e76cb5c8adf0\nPartial-Bug: #1484496" }, { "role": "...
python
new_file
1
1
apache-2.0
fef1191dc42a5710f14635182f59b4bc643b549e
stackforge/python-senlinclient,stackforge/python-senlinclient,openstack/python-senlinclient,openstack/python-senlinclient
senlinclient/tests/unit/test_sdk.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test harness and tests for the invert function" }, { "role": "assistant", "content": "import CijUtil\nimport numpy as np\nimport unittest\n\nclass TestInvertCijFunctions(unittest.TestCase):\n\n def setUp(self):\n self.i...
python
new_file
1
5
bsd-3-clause
051d00f65d4f5a8f03c7a91dcd1a74b454fd7943
andreww/elastic-constants,duyuan11/elastic-constants
test-CijUtil.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Add a test for GIL release in scipy.interpolate.RectBivariateSpline." }, { "role": "assistant", "content": "from __future__ import division, print_function, absolute_import\n\nimport itertools\nimport threading\nimport time\...
python
new_file
1
3
bsd-3-clause
c59d27223af702a55a603cfab5e06a4579a4435b
perimosocordiae/scipy,pizzathief/scipy,niknow/scipy,Shaswat27/scipy,Newman101/scipy,Gillu13/scipy,tylerjereddy/scipy,fernand/scipy,ortylp/scipy,newemailjdm/scipy,jjhelmus/scipy,vanpact/scipy,giorgiop/scipy,mortada/scipy,surhudm/scipy,felipebetancur/scipy,jseabold/scipy,endolith/scipy,futurulus/scipy,vanpact/scipy,rgomm...
scipy/interpolate/tests/test_gil.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for ICRS frames" }, { "role": "assistant", "content": "import pytest\n\nfrom astropy import units as u\nfrom astropy.coordinates import (\n CartesianRepresentation,\n get_body_barycentric, solar_system_ephemeris\n...
python
new_file
null
null
mit
f8d86e2339102232fe31aa4828f22a4338f803a0
Juanlu001/poliastro,poliastro/poliastro,newlawrence/poliastro,Juanlu001/poliastro,Juanlu001/poliastro,newlawrence/poliastro,newlawrence/poliastro
src/poliastro/tests/test_frames.py
rejected_code_smell
Internal duplication: ~24% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write python code for the following: Add first couple of unit tests for ipplan2sqlite" }, { "role": "assistant", "content": "import os\nimport sqlite3\nimport sys\nimport unittest\n\npath = os.path.abspath( os.path.join( os.path.dirname( __file__ ), '../lib' ) )\nsy...
python
new_file
1
1
bsd-3-clause
1d67482432ec56ee66d6fd7f6604d73f6d1a495f
nlindblad/ipplan2sqlite,nlindblad/ipplan2sqlite,nlindblad/ipplan2sqlite,nlindblad/ipplan2sqlite,nlindblad/ipplan2sqlite
ipplan2sqlite/tests/TestParser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a functional test for insight." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport requests\nimport sys\n\nfrom insight_reloaded.insight_settings import CROP_SIZE\n\n\ndef main():\n args = {}\n args['...
python
new_file
6
7
bsd-3-clause
bdea8195a3f06c3e69c655419b63dbcf925a6382
novapost/insight-reloaded
test_install.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add initial Zen of Hug to satisfy HOPE-20" }, { "role": "assistant", "content": "\"\"\"hug/this.py.\n\nThe Zen of Hug\n\nCopyright (C) 2019 Timothy Edmund Crosley\n\nPermission is hereby granted, free of charge, to any person obt...
python
new_file
1
0
mit
e388f4c982d629da12f59626440d0d88e940db8d
timothycrosley/hug,timothycrosley/hug,timothycrosley/hug
hug/this.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom falcon.testing import StartResponseMock, create_environ\nfrom falcon import HTTP_METHODS\nfrom urllib.parse import urlencode\nimport json\nfrom hug.run import server\nfrom functools import partial\n\n\ndef call(method, api_module, url,...
python
edit
1
3
mit
0cbce0ddc139dde1367155398d0c6a186408fab3
shaunstanislaus/hug,janusnic/hug,origingod/hug,shaunstanislaus/hug,giserh/hug,yasoob/hug,timothycrosley/hug,timothycrosley/hug,philiptzou/hug,alisaifee/hug,yasoob/hug,jean/hug,MuhammadAlkarouri/hug,gbn972/hug,giserh/hug,gbn972/hug,alisaifee/hug,MuhammadAlkarouri/hug,STANAPO/hug,janusnic/hug,jean/hug,origingod/hug,STANA...
hug/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 NEC Corporation\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of th...
python
edit
1
2
apache-2.0
d49b23365a972931502329f47a3aa65b9170477e
varunarya10/oslo.middleware,openstack/oslo.middleware,chungg/oslo.middleware,JioCloud/oslo.middleware
openstack/common/middleware/catch_errors.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: DOC: Add example of adaptive thresholding." }, { "role": "assistant", "content": "\"\"\"\n=====================\nAdaptive Thresholding\n=====================\n\nThresholding is the simplest way to segment objects from a backgroun...
python
new_file
1
0
bsd-3-clause
e84abb1b67586d3a3620ce6a21e3314527083218
Hiyorimi/scikit-image,ofgulban/scikit-image,rjeli/scikit-image,newville/scikit-image,almarklein/scikit-image,youprofit/scikit-image,chintak/scikit-image,dpshelio/scikit-image,emon10005/scikit-image,vighneshbirodkar/scikit-image,ClinicalGraphics/scikit-image,juliusbierk/scikit-image,robintw/scikit-image,keflavich/scikit...
doc/examples/plot_threshold_adaptive.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add map and recude example." }, { "role": "assistant", "content": "#!/usr/bin/env python2.7\n# coding=utf-8\n\nLST = [4, 2, 3, 2, 1, 1, 5]\n\n\ndef map_reduce(lst):\n \"\"\"\n Map values and reduce based on key.\n\n :par...
python
new_file
4
3
mit
11f16de1876e76b3c52494397d5613aa80530736
vsamov/sidewinder,vsamov/sidewinder,vsamov/sidewinder
sidewinder/streaming/map_and_reduce.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add problema da soma de 2 numeros" }, { "role": "assistant", "content": "\n# Problem\n# Given an array/list A of n numbers and another number x, determines\n# if exists two elements in A whose sum is exactly x\n\n# Works only for...
python
new_file
1
4
mit
d8168c182efb9ca6e05c9f8fdf253cb25ff6599d
kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-de-Dados,kelvins/Algoritmos-e-Estruturas-d...
Python/Soma2Numeros.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create script for generating remaining bit report.\n\nThis report is fairly fragile, but works well enough for the remaining\nLiteX bits.\n\nSigned-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>" ...
python
new_file
1
10
isc
2c7b64ea22ebe7e35945550f5726a72a721213b4
SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray
minitests/litex/src.yosys/missing_bit_report.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for triggering Buildbucket builds\n\nBUG=493885\nTESTED=See https://paste.googleplex.com/5622248052359168\n\nReview URL: https://codereview.chromium.org/1164363003\n\ngit-svn-id: fd409f4bdeea2bb50a5d34bb4d4bfc2046a5a3dd@295569 003...
python
new_file
2
4
bsd-3-clause
5f0788be20bad0cef4a31a88b7513da58822a157
duongbaoduy/gtools,mlufei/depot_tools,aleonliao/depot_tools,azunite/chrome_build,azunite/chrome_build,disigma/depot_tools,hsharsha/depot_tools,chinmaygarde/depot_tools,kaiix/depot_tools,fracting/depot_tools,disigma/depot_tools,fracting/depot_tools,mlufei/depot_tools,aleonliao/depot_tools,ajohnson23/depot_tools,mlufei/d...
buildbucket.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create hemres (jdwebsite newsletter) interface adapter" }, { "role": "assistant", "content": "# coding=utf-8\n# description: functions to interact with the newsletter subscriptions in jdwebsite (Hemres),\n# via Hemres management ...
python
new_file
1
1
mit
2f37f0ae1fc024b97de4c783c8f162c02c2c3a2d
jonge-democraten/jdleden,jonge-democraten/jdleden
hemresadapter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple script from the logipy page" }, { "role": "assistant", "content": "from logipy import logi_led\nimport time\nimport ctypes\n\nlogi_led.logi_led_init()\ntime.sleep(1) # Give the SDK a second to initialize\nlogi_led.logi...
python
new_file
3
0
mit
18dfdce4307e0f678f9a46fa4bccb51e31c4ff69
louismerlin/keyboard-games,louismerlin/keyboard-games
red.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add django admin mixin for exporting csvs" }, { "role": "assistant", "content": "import csv\nfrom datetime import datetime\nimport itertools\n\nfrom django.http import StreamingHttpResponse\nfrom django_object_actions import Djan...
python
new_file
1
3
bsd-3-clause
6ac16fc33a6f887535a143cc7155c7ff910ca835
praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control
control/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a crasher for the long-standing issue with closing a file while another thread uses it." }, { "role": "assistant", "content": "# f.close() is not thread-safe: calling it at the same time as another\n# operation (or another cl...
python
new_file
1
0
mit
e107e3b47f015523861bafaab5cacce7deff6366
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/crashers/multithreaded_close.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add ANSI escape sequence library" }, { "role": "assistant", "content": "\"\"\"ANSI escape sequence objects.\n\nThis is designed to place ANSI escape sequences in format strings.\nColors and attributes are selected by using object...
python
new_file
1
3
bsd-2-clause
3aa10577f292a2962f66926fb021ed4a1b6fc493
depp/headerfix,depp/headerfix,depp/headerfix,depp/headerfix
lib/header/colors.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add own SV-COMP unreach-call set runner script" }, { "role": "assistant", "content": "#!/usr/bin/python3\n\nimport sys\nimport glob\nimport subprocess\nimport re\nimport collections\nimport os.path\n\n\ndef str2bool(s):\n retu...
python
new_file
1
2
mit
911edb36fa6810dba3264dc3ba40648aeb9d436f
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
sv-comp-run.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: :rocket: Add migration for patient model" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: df33f3613823\nRevises: 15741cc426db\nCreate Date: 2017-07-14 11:37:46.347709\n\n\"\"\"\nfrom alembic import op\ni...
python
new_file
1
1
mit
190dae03cc027e397c387294075e1a38ad8647da
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
migrations/versions/2017-07-14_11:37:46__df33f3613823.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new class to ease dynamic metamodel handling\n\nThe dynamic metamodel manipulation is a little bit cumbersome when it\ncomes to extract all the existing EClass from a loaded\nEPackage. Currently, a solution is to gather all the elements ...
python
new_file
2
8
bsd-3-clause
c7a4ffbbb2023ebfb470ad79dd8b0d8217af0ff7
aranega/pyecore,pyecore/pyecore
pyecore/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Multiple Group Approval Orch Action\n\n[DEV-12140]" }, { "role": "assistant", "content": "\"\"\"\nMultiple Group Approval\n~~~~~~~~~~~~~~~~~~~~~~~\nOverrides CloudBolt's standard Order Approval workflow. This Orchestration\nA...
python
new_file
1
3
apache-2.0
304c6cf5314ae3050ca5f47d341323c03e75aea6
CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge
actions/cloudbolt_plugins/multi_user_approval/multi_group_approval.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add harvester for the University of Cambridge\n\nCloses [#SHARE-103]" }, { "role": "assistant", "content": "'''\nHarvester for the DSpace at Cambridge (production) for the SHARE project\n\nExample API call: https://www.repository...
python
new_file
1
0
apache-2.0
22cfab045c15685f18baa8fc5d8b1b9036888f41
fabianvf/scrapi,fabianvf/scrapi,felliott/scrapi,erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi
scrapi/harvesters/cambridge.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add django 1.7 migration for modified slot length" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations...
python
new_file
1
0
bsd-3-clause
d0008f639a12c384d6d9faa58e6370d834bef2de
cyberintruder/django-cms,nostalgiaz/django-cms,keimlink/django-cms,jeffreylu9/django-cms,wuzhihui1123/django-cms,frnhr/django-cms,SachaMPS/django-cms,kk9599/django-cms,sznekol/django-cms,vstoykov/django-cms,donce/django-cms,bittner/django-cms,stefanw/django-cms,takeshineshiro/django-cms,Vegasvikk/django-cms,benzkji/dja...
cms/migrations_django/0002_auto_20140807_2306.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for change directory" }, { "role": "assistant", "content": "import sys\nimport os\nsys.path.insert(0, os.path.realpath('.'))\nimport pytest\n\nfrom create_movie import change_directory\n\n\ndef test_change_directory_exi...
python
new_file
1
1
mit
c4cad482f38fb4dca00d00d8374833268dbc4545
NGTS/frame-movies,NGTS/frame-movies
testing/test_change_directory.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for checker panel (improve coverage)" }, { "role": "assistant", "content": "from pyqode.core import modes\nfrom pyqode.core import panels\nfrom pyqode.core.api import TextHelper\nfrom pyqode.core.qt import QtCore\...
python
new_file
1
2
mit
413295160d16c99f72ed37794cc823eccdb5676f
zwadar/pyqode.core,pyQode/pyqode.core,pyQode/pyqode.core
test/test_panels/test_checker.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''This package groups together a bunch of theano code for neural nets.'''\n\nfrom .feedforward import Autoencoder, Regressor, Classifier\nfrom .graph import Network\nfrom .main import Experiment\n\nfrom . import layers\nfrom . import recur...
python
edit
10
0
mit
68b17dc4fa6cdf1c04922d9d4fae77252b6712cd
chrinide/theanets,lmjohns3/theanets,devdoer/theanets
theanets/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add tests for dataframe utils" }, { "role": "assistant", "content": "import pytest\nfrom streamz.dataframe.utils import is_dataframe_like, is_series_like, is_index_like, get_base_frame_type\n\nimport pandas as pd\nimport numpy as...
python
new_file
1
1
bsd-3-clause
09f077b5bc78d5fe382fdb1b3317ee68b0f619b5
mrocklin/streams
streamz/dataframe/tests/test_dataframe_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add extra notebook config to append to base-notebook config" }, { "role": "assistant", "content": "# Configuration file for Jupyter-notebook.\n# https://github.com/jupyter/docker-demo-images/blob/master/resources/jupyter_notebook...
python
new_file
null
null
bsd-3-clause
ab5c755f0e8aec37e284a0a2c4eacbb2892f5b11
ProjectPyRhO/Prometheus,ProjectPyRhO/Prometheus,ProjectPyRhO/Prometheus,ProjectPyRhO/Prometheus
jupyter_notebook_config.partial.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add resolution for the 2dGeometry Homework" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport os\nimport numpy as np\nimport math\n\nprint \"This script solves the excercises propossed in the Linear Algebra & 2D G...
python
new_file
7
0
mit
b212d7391c07457ed23a499d6fd113e08f173999
nachovizzo/AUTONAVx,nachovizzo/AUTONAVx,nachovizzo/AUTONAVx
Algebra_Geometry/2d_homework.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Create a simple load test skeleton" }, { "role": "assistant", "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with ...
python
new_file
1
1
apache-2.0
8a797d3abd43a96df1d4dab8ae52cc21da3930a4
GoogleCloudPlatform/cloud-opensource-python,GoogleCloudPlatform/cloud-opensource-python,GoogleCloudPlatform/cloud-opensource-python,GoogleCloudPlatform/cloud-opensource-python
compatibility_server/loadtest/locustfile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 697. Degree of an Array\n\n697. Degree of an Array: https://leetcode.com/problems/degree-of-an-array/" }, { "role": "assistant", "content": "from collections import Counter\nclass Solution(object):\n def fi...
python
new_file
1
5
apache-2.0
4473354da6d029964258996067adbd97eb06baa8
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/degree-of-an-array.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create file to read in parameter vectors from user forms" }, { "role": "assistant", "content": "import csv\nimport argparse\nimport itertools\n\nfrom thermo_utils import csv_row_writer, read_csv_rows\n\n# Read input/output argume...
python
new_file
5
0
mit
55a0797aa70ef91ce1ad9d29f313fa58a1db761d
ndebuhr/thermo-state-solver,ndebuhr/thermo-state-solver
read_forms.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Test script for requesting by user" }, { "role": "assistant", "content": "import random\n\nfrom dmp import dmp\n\nusers = [\"adam\", \"ben\", \"chris\", \"denis\", \"eric\"]\n\nda = dmp()\n\nfor u in users:\n results = da.get_...
python
new_file
2
0
apache-2.0
1a5806d2a69553d9116836cbc8819ac60756e462
Multiscale-Genomics/mg-dm-api,Multiscale-Genomics/mg-dm-api
test_files_by_user.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test project - basic template for project to be tested" }, { "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...
python
new_file
1
2
apache-2.0
35aafe82f73c32e2d3db76d2fb3b988a3c4ade01
sarahmarshy/project_generator,molejar/project_generator,hwfwgrp/project_generator,0xc0170/project_generator,project-generator/project_generator,ohagendorf/project_generator
tests/test_project.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add getting data from .root file into Numpy" }, { "role": "assistant", "content": "__author__ = 'jacob'\nimport ROOT\nimport numpy as np\nimport os\nfrom root_numpy import root2array, root2rec, tree2rec\n\n# Look at r284484 data\...
python
new_file
4
0
mit
49539431d0e4172c5ce83c20f436b58e41d0fa02
jacobbieker/ATLAS-Luminosity
heavy-ion-luminosity.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a user test script" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\ntry:\n import sympy\nexcept ImportError:\n print(\"sympy is required\")\nelse:\n\n if sympy.__version__ < '0.7.5':\n print(\"S...
python
new_file
2
0
bsd-3-clause
b064392b2e357bb5725c61f6a07389290954e411
asmeurer/scipy-2014-tutorial,Sumith1896/scipy-2014-tutorial,leosartaj/scipy-2016-tutorial,aktech/scipy-2016-tutorial,Shekharrajak/scipy-2014-tutorial
user_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add admin test for adding a query" }, { "role": "assistant", "content": "from django.contrib.auth.models import User\nfrom django.conf import settings\n\nfrom website.models import Db\n\nfrom .testcases import TestCase\n\n\ndef m...
python
new_file
1
2
mit
504930ad343c074d34d4e4ac1774d909d11a5a63
sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz
tests/functional/test_admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some unit tests for emit_movie_queue" }, { "role": "assistant", "content": "from __future__ import unicode_literals, division, absolute_import\nfrom datetime import timedelta, datetime\n\nfrom flexget.manager import Session\n...
python
new_file
1
2
mit
d9b3d312543268d4305b102d5f28bd7446e00da8
antivirtel/Flexget,crawln45/Flexget,sean797/Flexget,LynxyssCZ/Flexget,tsnoam/Flexget,drwyrm/Flexget,tsnoam/Flexget,sean797/Flexget,offbyone/Flexget,qvazzler/Flexget,crawln45/Flexget,ianstalk/Flexget,Danfocus/Flexget,grrr2/Flexget,jacobmetrick/Flexget,vfrc2/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,qk4l/Flexget,vfrc2...
tests/test_emit_movie_queue.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for the Handler" }, { "role": "assistant", "content": "import requests\n\nfrom fixtures import test_server\n\n\ndef test(test_server):\n response = requests.get(test_server('/'))\n assert response.status_code == 20...
python
new_file
4
1
mit
99b7ff50e77483f7a2ec0d3ca99b9cc74d426edf
piotrekw/tornado-pytest
tests/handler_test.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add in support for mongodb store. Add dependencies for pymongo/redis." }, { "role": "assistant", "content": "\"\"\"MongoDB UserStore implementation\"\"\"\ntry:\n import cPickle as pickle\nexcept ImportError:\n import pickle...
python
new_file
4
3
mit
00f0ec1740109cc12815b9aaed88023cc91881fe
miedzinski/velruse,bbangert/velruse,bbangert/velruse,ImaginationForPeople/velruse,miedzinski/velruse,ImaginationForPeople/velruse
velruse/store/mongodb_store.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add 1D Transpose Convolution Implementation Official implementation of transpose 1d convolution is only available in nightly build at the moment" }, { "role": "assistant", "content": "# Copyright 2020 Google LLC\n# \n# Licensed u...
python
new_file
1
1
apache-2.0
70e4843ccb2dde8a1fa2b50dcfb10ae10c3c3d9a
googleinterns/audio_synthesis
utils/Layers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add heatmap with working ish pseudocode" }, { "role": "assistant", "content": "import plotly as py\nimport plotly.graph_objs as go\nimport datetime\nfrom sys import argv\n\nimport names\nfrom csvparser import parse\n\ndata_file =...
python
new_file
8
0
mit
ae2e437b5bdf5202d0fc38d8f0d2dbe41bd68b11
f-jiang/sleep-pattern-grapher
sleep_wake_heatmap.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Test file for backup pose" }, { "role": "assistant", "content": "import csv\n\ndef get_backup_pose(filename):\n p = []\n r = csv.DictReader(open(filename,'r'),delimiter = ';')\n for row in r:\n p.append(row)\n ...
python
new_file
2
2
mit
a0fc417f9d5abbf19ff516590b6c5cdff849cb1e
ThotAlion/FIRE,ThotAlion/FIRE,ThotAlion/FIRE
get_pose.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add relevance client based on NDEx service" }, { "role": "assistant", "content": "import logging\nfrom indra.databases import ndex_client\n\nlogging = logging.getLogger('relevance')\n\nndex_relevance = 'http://general.bigmech.nde...
python
new_file
2
3
bsd-2-clause
7027680e509055503c86544193d9ff46530be3d3
jmuhlich/indra,pvtodorov/indra,bgyori/indra,pvtodorov/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,johnbachman/indra,jmuhlich/indra,sorgerlab/belpy,pvtodorov/indra,jmuhlich/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra...
indra/databases/relevance_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the backend" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom keyring.tests.test_backend import BackendBasicTests\nfrom keyring.tests.py30compat import unittest\nfrom s3ke...
python
new_file
1
1
mit
7ee1168509ecdef6ba6cc81faeb3b6c9674ddc67
InnovativeTravel/s3-keyring
tests/test_S3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for testing log embeds." }, { "role": "assistant", "content": "from nose.tools import * # flake8: noqa\n\nfrom api.base.settings.defaults import API_BASE\nfrom tests.base import ApiTestCase\nfrom tests.factories import...
python
new_file
13
1
apache-2.0
da372725ea236b971829e4a07e4c18d7d094152c
alexschiller/osf.io,samchrisinger/osf.io,mattclark/osf.io,felliott/osf.io,saradbowman/osf.io,kwierman/osf.io,emetsger/osf.io,cslzchen/osf.io,leb2dg/osf.io,caneruguz/osf.io,caneruguz/osf.io,rdhyee/osf.io,zachjanicki/osf.io,saradbowman/osf.io,adlius/osf.io,doublebits/osf.io,SSJohns/osf.io,cwisecarver/osf.io,DanielSBrown/...
api_tests/logs/views/test_log_embeds.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 25" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom math import ceil, log10\n\nPHI = 1.6180339887\nx = 0\ni = 0\nwhile x < 1000:\n i += 1\n x = ceil(i * log10(PHI) - log10(5) / 2)\n ...
python
new_file
1
0
mit
3ec610d7f24aec622e13284088622c7f98b454b1
cifvts/PyEuler
euler025.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Fibonacci, How Many Calls? in python" }, { "role": "assistant", "content": "from functools import lru_cache\n\nfibs = [0] * 40\ncalls = [0] * 40\n\n\ndef fibonacci(n):\n global fibs, calls\n\n if n <= 1:\n fibs...
python
new_file
3
3
mit
8a0ee09eec5f24152babfff3882a38ca749b3cc9
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1029/1029.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a rough script for checking validity of Calm data" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\"\"\"Checks for the validity of Calm data.\n\nThis script runs a series of checks ove...
python
new_file
3
7
mit
e7e4aaa2788edcb01f3e681bc557d4c7f5ae26e1
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
calm-ingest/validate_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate sponsor info for guidebook." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport shlex\nimport subprocess\nimport sys\nimport zipfile\n\nfrom os import makedirs\n\nimport frontmatter\n\ni...
python
new_file
1
0
mit
4886f21febbc6385e6aafb990163e69e31a5b99e
acl2017/acl2017.github.io,acl2017/acl2017.github.io,acl2017/acl2017.github.io,acl2017/acl2017.github.io
scripts/generate-guidebook-sponsor-logs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a command to pre-create queues." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom optparse import make_option\n\nfrom django.conf import settings\n\nfrom pq.queue import PQ_DEFAU...
python
new_file
5
4
bsd-2-clause
5d0c7b7d209b0487c0a12e995a11efa9d695a50e
bretth/django-pq
pq/management/commands/pqcreate.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for the __index__/nb_index slot in ndobject" }, { "role": "assistant", "content": "import sys\nimport unittest\nfrom dynd import nd, ndt\n\nclass TestBasics(unittest.TestCase):\n def test_index(self):\n #...
python
new_file
3
1
bsd-2-clause
76817a379aff0dd6968df6a6163c635f7e7b53e3
izaid/dynd-python,ContinuumIO/dynd-python,cpcloud/dynd-python,mwiebe/dynd-python,mwiebe/dynd-python,insertinterestingnamehere/dynd-python,aterrel/dynd-python,michaelpacer/dynd-python,pombredanne/dynd-python,insertinterestingnamehere/dynd-python,pombredanne/dynd-python,pombredanne/dynd-python,insertinterestingnamehere/d...
dynd/tests/test_ndobject_basics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create board and find conflicts of the whole board" }, { "role": "assistant", "content": "from collections import OrderedDict\nfrom random import shuffle\n\n\nMAX_CONFLICTS = [-1, {\n 'row': -1,\n 'column': -1,\n 'confli...
python
new_file
1
6
mit
797ebb71721e067140a2437810cd4923b03af3fa
mileto94/Data-Mining
homework3/game.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 2d grid canvas construction test." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\" Test case for 2D grid canvas.\n\"\"\"\n\nimport unittest\n\nfrom matplotlib.collections import ...
python
new_file
1
1
mit
c1fcf18feaafab22f32bb755cae7920d0f09cbb9
PytLab/catplot
tests/grid_2d_canvas_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights late ride problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Late Ride Problem\n\n\ndef lateRide(n):\n h, m = divmod(n, 60)\n return sum(map(int, str(h) + str(m)))\n\n\nd...
python
new_file
1
3
mit
22ae8b04443c13a1c5e9a25a93c2c52faa996b95
HKuz/Test_Code
CodeFights/lateRide.py
accepted
null
true