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 basic framework for generators" }, { "role": "assistant", "content": "import time\n\nfrom concord.computation import Computation, Metadata\n\n\ndef current_time_millis():\n return round(time.time() * 1000)\n\n\nclass Gener...
python
new_file
1
3
apache-2.0
271f5921b8a15abe3f29296ec0b474167cd415cf
concord/bfd,alanhdu/bfd,concord/ml,AndrewAday/bfd
concord_ml/data/computations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add DVLA org migration with default values" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0072_add_dvla_orgs\nRevises: 0071_add_job_error_state\nCreate Date: 2017-04-19 15:25:45.155886\n\n\"\"\"\n\n# r...
python
new_file
1
1
mit
0ce008663983a312a6f5d7211aa3767fd6c5f747
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0072_add_dvla_orgs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom i3pystatus import IntervalModule\n\nclass Pianobar(IntervalModule):\n \"\"\"\n Shows the title and artist name of the current music\n\n In pianobar config file must be setted the fifo and event_command options \n (see man p...
python
edit
1
1
mit
4fe4408736268e3a2c8437cca70625b4fc1a4a3c
m45t3r/i3pystatus,facetoe/i3pystatus,ismaelpuerto/i3pystatus,ismaelpuerto/i3pystatus,plumps/i3pystatus,schroeji/i3pystatus,teto/i3pystatus,plumps/i3pystatus,teto/i3pystatus,facetoe/i3pystatus,ncoop/i3pystatus,Elder-of-Ozone/i3pystatus,enkore/i3pystatus,juliushaertl/i3pystatus,enkore/i3pystatus,yang-ling/i3pystatus,Maic...
i3pystatus/pianobar.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for issues causing exceptions" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport numpy as np\nimport ibei\nfrom astropy import units\nimport unittest\n\ntemp_sun = 5762.\ntemp_earth = 288.\nbandgap =...
python
new_file
4
2
mit
8882c77e6b96df7548357bce0a1c995fa2600e39
jrsmith3/tec,jrsmith3/tec,jrsmith3/ibei
test/test_iebi.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add unittests for Task 4" }, { "role": "assistant", "content": "__author__ = 'nino'\n\nimport unittest\nfrom jadrolinija import Vozilo\n\n\nclass VoziloTest(unittest.TestCase):\n\n def test_something(self):\n v = Vozilo...
python
new_file
1
1
mit
7069a8826f06338e0d95981316972147314c6e81
nbasic/racunalnistvo-1
dn1/vozilo_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Scanner class" }, { "role": "assistant", "content": "import pytest\nfrom katana.expr import Expr, Token\nfrom katana.parser import Scanner\n\n\nclass TestScanner:\n scanner = Scanner([\n Expr('dollar', r'\...
python
new_file
1
1
mit
c60ec4b373a812e8207a2f1c22c11ff2a24ee268
eugene-eeo/katana
tests/test_scanner.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Heapchecker: Add presubmit checks for suppressions.\n\nBUG=none\nTEST=none\nReview URL: http://codereview.chromium.org/3197014\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@57132 0039d316-1c4b-4281-b951-d872f2087c98" }, { "...
python
new_file
1
13
bsd-3-clause
4e53ea6ea9e3f5f409014221c000486bc188769f
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
tools/heapcheck/PRESUBMIT.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Write python code for the following: tests/basics: Add test case for overflowing Py stack in try-finally." }, { "role": "assistant", "content": "# check that the Python stack does not overflow when the finally\n# block itself uses more stack than the rest of the fun...
python
new_file
1
2
mit
3f0c1c24528d8ce818434d8b553136d315b0d548
blazewicz/micropython,adafruit/circuitpython,SHA2017-badge/micropython-esp32,trezor/micropython,toolmacher/micropython,mhoffma/micropython,tobbad/micropython,dxxb/micropython,deshipu/micropython,henriknelson/micropython,turbinenreiter/micropython,infinnovation/micropython,MrSurly/micropython,selste/micropython,pramasou...
tests/basics/try_finally2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for desmod.dot" }, { "role": "assistant", "content": "import pytest\n\nfrom desmod.dot import component_to_dot\nfrom desmod.component import Component\nfrom desmod.simulation import SimEnvironment\n\n\n@pytest.fixt...
python
new_file
1
2
mit
e0a363bce00dca2545fe33d947bbd7f04d1d7234
SanDisk-Open-Source/desmod,bgmerrell/desmod
tests/test_dot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for pip packages" }, { "role": "assistant", "content": "import pytest\n\n@pytest.mark.parametrize(\"name\", [\n (\"ansible\"),\n (\"docker-py\"),\n (\"mkdocs\"),\n (\"mkdocs-material\"),\n])\n\ndef test_pips(host, n...
python
new_file
1
1
mit
816c87ba5f38760adfc87877a1c403da3f0bc054
wicksy/CV,wicksy/CV,wicksy/CV
test/test_pips.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new variant of WaterButlerPath" }, { "role": "assistant", "content": "import os\n\nclass WaterButlerPathPart:\n DECODE = lambda x: x\n ENCODE = lambda x: x\n\n def __init__(self, part, _id=None):\n self._id ...
python
new_file
3
3
apache-2.0
fba9cb1278afab3c16ec4077770a33c09950e1a7
rdhyee/waterbutler,rafaeldelucena/waterbutler,CenterForOpenScience/waterbutler,TomBaxter/waterbutler,felliott/waterbutler,Johnetordoff/waterbutler,cosenal/waterbutler,icereval/waterbutler,chrisseto/waterbutler,hmoco/waterbutler,RCOSDP/waterbutler,Ghalko/waterbutler,kwierman/waterbutler
waterbutler/core/path.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make changes to generate ts.csv and only one csv for each market for the day." }, { "role": "assistant", "content": "import multiprocessing\r\nimport time\r\n\r\nclass Consumer(multiprocessing.Process):\r\n \r\n def __init_...
python
new_file
7
3
mit
ae3a567c695477013d34316e160ab09055f8feeb
aviatorBeijing/CapMarket,aviatorBeijing/CapMarket
src/MultiProcessing.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add solar years to recipes" }, { "role": "assistant", "content": "\"\"\"\n A tropical solar year is the length from spring equinox\n to the following spring equinox. \n \n This recipe was implemented to reply to a top...
python
new_file
1
3
mit
ca8151832647864cd6e63dc84cbed8c77955d91e
flatangle/flatlib
recipes/solaryears.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add bathy download script for atlantic" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Simple implementation of a file fetcher\"\"\"\n\nimport sys\nimport os\nimport urllib\nimport subprocess\n\ndef get_bath...
python
new_file
5
12
mit
a2fba4f0f90f069c0fcacc597fc1690f6d9d7609
mandli/surge-examples
atlantic/bathy/get_bathy.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a decorator for requiring a specific type\n\nPreperation for moving the rule matching into a class so adding more\nrules is simpler, and applying rules to more than two types makes sense." }, { "role": "assistant", "content":...
python
new_file
1
3
bsd-3-clause
b53d1b632d14904800f74d4c31f7a42b30e3ef7a
rasher/reddit-modbot
decorators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sleep duration time series plotter" }, { "role": "assistant", "content": "import plotly as py, plotly.graph_objs as go\nfrom csvparser import parse\nfrom os.path import basename, splitext\nfrom sys import argv\n\ndata_file = ...
python
new_file
1
0
mit
17180021f96897a659d472555c3e2588ca94d41b
f-jiang/sleep-pattern-grapher
hours_slept_time_series.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Handlers for special object mappings.\"\"\"\n\nfrom flask import current_app\n\nfrom ggrc import models\nfrom ggrc.log...
python
edit
5
3
apache-2.0
3b146038ca6aebfdc11920cc688903124ccc2b3a
selahssea/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,sela...
src/ggrc/converters/handlers/document.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Test the import of the Centerline class" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom unittest import TestCase\n\n\nclass TestInit(TestCase):\n\n def test_cen...
python
new_file
3
1
mit
aef0765b2d76f371bda6e7ce3575bbede1b2a2a2
fitodic/polygon-centerline,fitodic/centerline,fitodic/centerline
tests/test_init.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add parser for weekly log" }, { "role": "assistant", "content": "import sys\nimport re\n\n\"\"\"\nTo do:\n\t- Add web interaction to get the string argument\ndirectly from web instead of having to manually put the \nargument as a...
python
new_file
1
0
mit
de57486712d60995dd4e75ace21b9ce4f824a552
josecolella/Dynatrace-Resources
WeeklyLogParser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions for running cmake and vcbuild" }, { "role": "assistant", "content": "import os\n\nimport system\n\ndef cmake_generator(toolchain, arch):\n \"\"\"Return name of CMake generator for toolchain\"\"\"\n generator =...
python
new_file
1
4
mit
80bcce3208941df6b51d97fabdacaa93bb764376
peterl94/CLbundler,peterl94/CLbundler
clbundler/buildtools.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for PostgresPartitionedModel meta options" }, { "role": "assistant", "content": "\nfrom psqlextra.models import PostgresPartitionedModel\nfrom psqlextra.types import PostgresPartitioningMethod\n\nfrom .fake_model import...
python
new_file
1
1
mit
e101f2687a6857f218b9dab277e323edf377a0fb
SectorLabs/django-postgres-extra
tests/test_partitioned_model.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility for terminal colors" }, { "role": "assistant", "content": "FG_COLORS = {\n 'black' : '30',\n 'red' : '31',\n 'green' : '32',\n 'yellow' : '33',\n 'blue' : '34',\n 'purple' : '35',\n 'cyan' : '36',...
python
new_file
1
3
mit
2ab1e008ab5626b96767bb40a6e365c464019d0f
nvander1/skrt
skrt/text.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic script to apply migrations" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport json\nimport sys\nfrom pathlib import Path\n\nfrom alembic.config import main as alembic\n\n\nif __name__ == '__main__':...
python
new_file
1
0
mit
e954624c56348f484d8e99c595770582281f4a02
FallenWarrior2k/cardinal.py,FallenWarrior2k/cardinal.py
upgrade_db.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for profile classes" }, { "role": "assistant", "content": "import numpy as np\nimport unittest\nfrom desc.io import InputReader\nfrom desc.equilibrium import Equilibrium\nfrom desc.profiles import PowerSeriesProfile\n\n...
python
new_file
1
1
mit
b9a9a684d94efe94523a4172ce0074ede906b5bc
PlasmaControl/DESC,PlasmaControl/DESC
tests/test_profiles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a few tests to see that we actually can retrieve information from the API and that our helper methods seem to work" }, { "role": "assistant", "content": "import unittest\nimport carseour\n\n\"\"\"\nRun tests from the main car...
python
new_file
1
2
mit
069e6a31208e98d565811216aea1b5a4b18f4391
matslindh/carseour,matslindh/carseour
tests/api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a Nano installer for Windows\n\n1. Downloads and installs Nano into the users home directory\n2. Adds Nano to the path\n3. Makes Nano the default editor" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"So...
python
new_file
1
2
bsd-2-clause
f4e0254eada3a6dd3aaa794926c5cc82e993b180
selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest
setup/bin/swc-nano-installer.py
rejected_duplicate
Near-duplicate of sample 9278
true
[ { "role": "user", "content": "Write python code for the following: Add function to remove duplicates from a string" }, { "role": "assistant", "content": "'''\nIn this module we remove duplicates in a string\n\n'''\n\n\ndef remove_duplicates(string):\n\t'''\n\tRemove duplicated characters in stri...
python
new_file
2
1
mit
dc4ce85a621e0ffccfa9dbf400f558333e813df4
ueg1990/aids
aids/strings/remove_duplicates.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add skeleton test for bin/receiver\n\n- Add skeleton test for bin/receiver so that the coverage stats become\n more accurate." }, { "role": "assistant", "content": "import os\nimport tempfile\nimport unittest\n\nimport bin.recei...
python
new_file
1
1
apache-2.0
a2353846c97f94a23c01a51f8589cd3b8ff17376
tofu-rocketry/ssm,apel/ssm,tofu-rocketry/ssm,stfc/ssm,stfc/ssm,apel/ssm
test/test_receiver.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to run a broad scan.\n\nA broad scan of skin geometry, epsilo, and spline knots." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Oct 25 19:43:13 2015\n\n@author: jensv\n\nDo a b...
python
new_file
1
0
mit
be82e8070e01c24ca909171e1b6f0bac4edeafb6
jensv/fluxtubestability,jensv/fluxtubestability
broad_scan.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new the JSONField Wrapper" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import connection\n\nPOSTGRES_FALG = False\nif str(connection.vendor) == 'pos...
python
new_file
1
1
bsd-3-clause
e069020558c53b24eb164aaaf6124130fdd2daab
divio/django-shop,nimbis/django-shop,nimbis/django-shop,jrief/django-shop,khchine5/django-shop,divio/django-shop,khchine5/django-shop,khchine5/django-shop,nimbis/django-shop,khchine5/django-shop,jrief/django-shop,awesto/django-shop,jrief/django-shop,awesto/django-shop,awesto/django-shop,nimbis/django-shop,divio/django-...
shop/models/fields.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for odl_sfc\n\nChange-Id: I8eb037a8c2427695d42207897064b79cb2b03a5d\nSigned-off-by: Cédric Ollivier <<EMAIL>>" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n# Copyright (c) 2017 Orange and others.\...
python
new_file
1
1
apache-2.0
72c085ac3fde2a294a09b2065e1fe38a33f8841c
opnfv/functest,opnfv/functest,mywulin/functest,mywulin/functest
functest/tests/unit/features/test_odl_sfc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Connect Tor Network with Python\n\nConnect Tor Network with Python\n\n1. apt-get install tor\n2. apt-get install privoxy\n(we need to edit our privoxy config (/etc/privoxy/config) and add the\nfollowing line -> forward-socks4a / localhost:90...
python
new_file
3
4
mit
8b8208a5a4790b199d0f35ca834f0982788c99c1
namegpark/Tor-Network-Connection
ConnectTor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests to check validity of gmap and misg_map" }, { "role": "assistant", "content": "import os\nimport csv\nfrom indra.statements.validate import validate_db_refs, validate_ns\nfrom indra.preassembler.grounding_mapper import d...
python
new_file
4
4
bsd-2-clause
7f84c6914182cd83192661dfe165fad9c59014ef
johnbachman/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,johnbachman/indra
indra/tests/test_grounding_resources.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Create Segment class with positive and negative properties" }, { "role": "assistant", "content": "class Segment:\n '''A representation of a phonetic segment, stored in terms of features.'''\n\n def __init__(self, positive, ...
python
new_file
1
5
mit
bbaddeed4cc57af287b61ec79e74e5061c1b2e84
kdelwat/LangEvolve,kdelwat/LangEvolve,kdelwat/LangEvolve
app/segment.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 140: Word Break II" }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# Given a string s and a dictionary of words dict, add spaces in s to construct\n# a sentence where each word is a valid dictionary word. Ret...
python
new_file
2
18
apache-2.0
4f7b2096da44b17abc3f8cac77e40bee527b48aa
ovaskevich/leetcode,ovaskevich/leetcode
algorithms/140_word_break_ii.py
rejected_complexity
Cyclomatic complexity too high: 18
true
[ { "role": "user", "content": "Write python code for the following: Add tests for basic functionality" }, { "role": "assistant", "content": "import os.path\nimport numpy as np\nimport pytest\n\nfrom eccodes import *\n\nSAMPLE_DATA_FOLDER = os.path.join(os.path.dirname(__file__), 'sample-data')\nT...
python
new_file
23
1
apache-2.0
ffe2b546218bce0f03ac09736b89c5b098a2c0f1
ecmwf/eccodes-python,ecmwf/eccodes-python
tests/test_eccodes.py
rejected_lint
Too many lint violations: 23
true
[ { "role": "user", "content": "Write python code for the following: Set up an IPython config for the minimal image" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Configuration file for ipython-notebook.\n\nc = get_config()\nc.NotebookApp.ip = '*'\nc.Not...
python
new_file
2
0
bsd-3-clause
1f5b624e7fac4883f8a86305364f55af0703bb32
ianabc/tmpnb,zischwartz/tmpnb,captainsafia/tmpnb,zischwartz/tmpnb,malev/tmpnb,parente/tmpnb,malev/tmpnb,iamjakob/tmpnb,rgbkrk/tmpnb,betatim/tmpnb,jupyter/tmpnb,cannin/tmpnb,captainsafia/tmpnb,willjharmer/tmpnb,captainsafia/tmpnb,marscher/tmpnb,parente/tmpnb,ianabc/tmpnb,jupyter/tmpnb,cannin/tmpnb,willjharmer/tmpnb,beta...
images/minimal/ipython_notebook_config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Access twitter, get user info" }, { "role": "assistant", "content": "from twitter import *\n\n#Put in token, token_key, con_secret, con_secret_key\nt = Twitter(\n auth=OAuth('', '',\n '', ''))\n\n#get user status...
python
new_file
4
0
mit
1637f26fc9ee852e0eda33056bca7dd442e0df05
AndrewKLeech/Pip-Boy
data.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add application code with SMS route to accept SMS and route to Spark Core via their API" }, { "role": "assistant", "content": "import os\nimport requests\nimport tinycss2\nfrom tinycss2 import color3\nfrom flask import Flask, Res...
python
new_file
2
4
mit
4cf8ae2ab95e9c7ed1a091532f12a4211f7580b7
willdages/The-Texting-Tree
textingtree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for process check\n\nThis test call the check method in process 7 times and check the process_check\noutput. The result should be:\n1 OK\n2 WARNING\n4 CRITICAL" }, { "role": "assistant", "content": "import unittest\nimp...
python
new_file
3
8
bsd-3-clause
9732f5e1bb667b6683c9e97db03d293373909da6
jraede/dd-agent,benmccann/dd-agent,packetloop/dd-agent,PagerDuty/dd-agent,benmccann/dd-agent,truthbk/dd-agent,jshum/dd-agent,citrusleaf/dd-agent,gphat/dd-agent,AniruddhaSAtre/dd-agent,AniruddhaSAtre/dd-agent,jvassev/dd-agent,urosgruber/dd-agent,jraede/dd-agent,Mashape/dd-agent,huhongbo/dd-agent,oneandoneis2/dd-agent,br...
tests/test_process.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add modeladmin entry for animals" }, { "role": "assistant", "content": "from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register\n\nfrom bvspca.animals.models import Animal\n\n\nclass AnimalModelAdmin(ModelA...
python
new_file
1
0
mit
9247d831dfa8ea5b11f870bf3ad75951b8b16891
nfletton/bvspca,nfletton/bvspca,nfletton/bvspca,nfletton/bvspca
bvspca/animals/wagtail_hooks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update default year in migrations" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.27 on 2020-01-23 09:39\nfrom __future__ import unicode_literals\n\nimport datetime\nfrom django.db impor...
python
new_file
1
0
bsd-3-clause
59917abe1c07dd92636e3f00f74a9e9a95947f0f
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
lowfat/migrations/0150_update_default_year.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add (forgotten) migration for Twitter model changes." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10 on 2018-01-21 22:32\nfrom __future__ import unicode_literals\n\nfrom django.db import...
python
new_file
1
0
mit
aef53625ebedd9e2af7676014910e8a98de46f96
Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher
crowdgezwitscher/twitter/migrations/0007_auto_20180121_2232.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Tests: Add quick test for session locks." }, { "role": "assistant", "content": "from infiniteworld import SessionLockLost, MCInfdevOldLevel\nfrom templevel import TempLevel\nimport unittest\n\nclass SessionLockTest(unittest.TestC...
python
new_file
3
1
isc
11aac46ef2e3fc867e1879ae8e7bc77e5e0aedc2
mcedit/pymclevel,arruda/pymclevel,ahh2131/mchisel,mcedit/pymclevel,arruda/pymclevel,ahh2131/mchisel
test/session_lock_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for jiffy to get hot pixel coordinates as x, y" }, { "role": "assistant", "content": "from __future__ import division\nimport os\nimport libtbx.load_env\nfrom libtbx import easy_run\n\nhave_dials_regression = libtbx.env.has_...
python
new_file
3
2
bsd-3-clause
495c922c221125bc86ca8a75b03e8c8738c41a7f
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
test/command_line/tst_hot_pixel_mask_to_xy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to sort score files according to their mean scores." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\nMake statistics on score files (stored in JSON files).\n\"\"\"\n\n...
python
new_file
1
3
mit
92f41cf20097de534d8ffe8e85cd29f9e292946e
jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/sap-cta-data-pipeline,jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/sap-cta-data-pipeline
utils/sort_score_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for asserting downloaded files" }, { "role": "assistant", "content": "from seleniumbase import BaseCase\r\n\r\n\r\nclass DownloadTests(BaseCase):\r\n\r\n def test_download_files(self):\r\n self.open(\"https://p...
python
new_file
1
1
mit
5e3f3b83974c4826cddcfdb73f2d4eb4abe2aca1
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
examples/test_download_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for code editor widget based on codemirror" }, { "role": "assistant", "content": "# doc-export: CodeEditor\r\n\"\"\"\r\nThis example demonstrates a code editor widget based on CodeMirror.\r\n\"\"\"\r\n\r\n# todo: Mayb...
python
new_file
1
1
bsd-2-clause
1c293752b03b74105ad48d4d9be0a38bec55ca9a
jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx,jrversteegh/flexx,JohnLunzer/flexx,zoofIO/flexx,JohnLunzer/flexx
flexx/ui/examples/code_editor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file found on server" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.1 on 2016-09-08 07:14\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\ncl...
python
new_file
1
0
mit
9b42c3553b6b55125d63c902de6f9a92bc7c1fc0
ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing
openprescribing/frontend/migrations/0007_auto_20160908_0811.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check the status of a read" }, { "role": "assistant", "content": "\"\"\"\nReport the status of an SRA run\n\"\"\"\n\nimport os\nimport sys\nimport argparse\nimport requests\nimport json\n\n\ndef get_status(runids, verbose, url='h...
python
new_file
7
4
mit
f0b009494ba743272e555c87bc9d1ea99377371f
linsalrob/partie,linsalrob/partie,linsalrob/partie,linsalrob/partie
sra_status.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom __future__ import unicode_literals\n\nimport os\nimport socket\nimport sys\nimport codecs\n\n\nfname = sys.argv[1]\nnew_fname = fname + '.new'\npid_fname = 'tests/shell/3rd/pid'\n\nwith open(pid_fname, 'r') as ...
python
edit
1
0
mit
a590e100a23a0c225467b34b7c4481ece45905ad
Liangjianghao/powerline,bartvm/powerline,lukw00/powerline,kenrachynski/powerline,Luffin/powerline,DoctorJellyface/powerline,Luffin/powerline,areteix/powerline,cyrixhero/powerline,seanfisk/powerline,EricSB/powerline,dragon788/powerline,blindFS/powerline,magus424/powerline,wfscheper/powerline,dragon788/powerline,wfschepe...
tests/test_shells/postproc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Backup and restore config and journal files every time" }, { "role": "assistant", "content": "from behave import *\nimport shutil\nimport os\n\ndef before_scenario(context, scenario):\n \"\"\"Before each scenario, backup all c...
python
new_file
2
4
mit
89423bdccbf5fbfc8a645e0066e1082de64a8eac
cloudrave/jrnl-todos,flight16/jrnl,MinchinWeb/jrnl,philipsd6/jrnl,maebert/jrnl,notbalanced/jrnl,Shir0kamii/jrnl,MSylvia/jrnl,zdravi/jrnl,nikvdp/jrnl,dzeban/jrnl,beni55/jrnl,rzyns/jrnl
features/environment.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for ActionsQueueConsumer class which verifies that the right BufferedDispatcher class is used." }, { "role": "assistant", "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor lice...
python
new_file
1
1
apache-2.0
69b3d3619ce08940277c811cb9e4c24a137831da
emedvedev/st2,nzlosh/st2,peak6/st2,punalpatel/st2,peak6/st2,Plexxi/st2,punalpatel/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,peak6/st2,punalpatel/st2,pixelrebel/st2,nzlosh/st2,tonybaloney/st2,tonybaloney/st2,Plexxi/st2,StackStorm/st2,pixelrebel/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,lakshmi-kannan/st2,pixelrebel/st...
st2actions/tests/unit/test_action_runner_worker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add beginning of simple script to gather data on cluster" }, { "role": "assistant", "content": "import numpy as np\nimport yaml\nfrom perses.analysis import Analysis\nimport glob\n\ndef collect_file_conditions(experiment_director...
python
new_file
1
4
mit
051e2ff67a87fbbf7229b8f04b70742d441b75fd
choderalab/perses,choderalab/perses
examples/freesolv/gather_data_for_analysis.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add segment for npm version" }, { "role": "assistant", "content": "import subprocess\n\n\ndef add_npm_version_segment(powerline):\n try:\n p1 = subprocess.Popen([\"npm\", \"--version\"], stdout=subprocess.PIPE)\n ...
python
new_file
1
2
mit
724e8303a80f17c83128b5876dbb3d95c106805c
tswsl1989/powerline-shell,bitIO/powerline-shell,milkbikis/powerline-shell,banga/powerline-shell,b-ryan/powerline-shell,b-ryan/powerline-shell,banga/powerline-shell
segments/npm_version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to remove NotificationSubscriptions on Registrations." }, { "role": "assistant", "content": "\"\"\" Script for removing NotificationSubscriptions from registrations.\n Registrations shouldn't have them!\n\"\"\"\nimp...
python
new_file
1
2
apache-2.0
a0bdba19b6f22363bed532a7872a1128679fafe6
felliott/osf.io,brianjgeiger/osf.io,felliott/osf.io,baylee-d/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,brianjgeiger/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,mattclark/osf.io,adlius/osf.io,aaxelb/osf.io,mattclark/osf.io,mfraezz/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io...
scripts/remove_notification_subscriptions_from_registrations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create migration for specialist requirementLengths\n\nDue to the new functionality for specialist briefs to be live for one or\ntwo weeks, it's necessary to migrate existing published briefs to have a\nrequirementsLength of '2 weeks' so they...
python
new_file
1
5
mit
25f0375683064d39fc460da6f42109a8b6b2e60c
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/690_add_brief_length_to_published_briefs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for last commit" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n ...
python
new_file
1
0
mit
61d1020d1a96e6384426414ee122a013c6d75ea9
KerkhoffTechnologies/django-connectwise,KerkhoffTechnologies/django-connectwise
djconnectwise/migrations/0046_auto_20180104_1504.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python file for Multiple linear regression" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Multiple linear regression for machine learning.\n\nA linear regression model that contains more than one predic...
python
new_file
1
0
mit
db20a15c34fc6bb43ad8e0a4860dd252e49a8033
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Regression/MultipleLinearRegression/regularMultipleRegression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unicodecsv as ucsv\nfrom cStringIO import StringIO\nfrom ondata.apps.api.viewsets.xform_submission_api import dict_lists2strings\nfrom onadata.libs.utils.logger_tools import dict2xform, safe_create_instance\n\n\ndef submit_csv(userna...
python
edit
3
7
bsd-2-clause
34f8c0a4a0a9f78c124cd07b121ce5b2fbf00136
awemulya/fieldsight-kobocat,mainakibui/kobocat,qlands/onadata,smn/onadata,sounay/flaminggo-test,piqoni/onadata,qlands/onadata,jomolinare/kobocat,sounay/flaminggo-test,mainakibui/kobocat,kobotoolbox/kobocat,kobotoolbox/kobocat,smn/onadata,piqoni/onadata,hnjamba/onaclone,awemulya/fieldsight-kobocat,smn/onadata,jomolinare...
onadata/libs/utils/csv_import.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add fixture for database related testing" }, { "role": "assistant", "content": "import pytest\nimport random\n\nimport pymongo\nfrom pymongo import MongoClient\n\n\n_connection = None\n\n\nclass TempCollection:\n def __init__(...
python
new_file
1
2
mit
158d8722b8a232dceefc040cb2414201ddc7a059
irvind/logster,irvind/logster,irvind/logster
test_all.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a migration for dataset name length." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migratio...
python
new_file
1
0
bsd-3-clause
a6407fe9a3b77372ed3e93b92f77bcea32e77393
cfe-lab/Kive,cfe-lab/Kive,cfe-lab/Kive,cfe-lab/Kive,cfe-lab/Kive
kive/archive/migrations/0014_dataset_name_length.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert gpu model to cpu model" }, { "role": "assistant", "content": "from transformer_net import TransformerNet\nimport argparse\nimport torch\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument(\"-...
python
new_file
3
1
mit
5fee82b0ef269993ebc4147bfd825718a460616c
onai/fast-neural-style
neural_style/convert_model_cpu.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example plot script for RANSAC" }, { "role": "assistant", "content": "\"\"\"\n===========================================\nRobust linear model estimation using RANSAC\n===========================================\n\nIn this ex...
python
new_file
1
0
bsd-3-clause
23d34308206013033f22204f8720ef01263ab07b
maheshakya/scikit-learn,meduz/scikit-learn,tawsifkhan/scikit-learn,thilbern/scikit-learn,abimannans/scikit-learn,mikebenfield/scikit-learn,fyffyt/scikit-learn,xwolf12/scikit-learn,nhejazi/scikit-learn,btabibian/scikit-learn,Lawrence-Liu/scikit-learn,ngoix/OCRF,loli/semisupervisedforests,mugizico/scikit-learn,pnedunuri/...
examples/plot_ransac.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Load JSON of Melodee ORCID" }, { "role": "assistant", "content": "url = \"https://pub.orcid.org/0000-0002-2907-3313\"\n\nimport requests\nimport json\n\nresp = requests.get(url,\n headers={'Accept':'application...
python
new_file
2
0
mit
dedfec08bbec4c97ff8e7e1242ac8d406cc73b0b
njall/Orctrix,njall/Orctrix,njall/Orctrix
init.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.views.generic import DetailView\nfrom django.views.generic import ListView\n\nfrom mongonaut.sites import NautSite\n\nclass IndexView(ListView):\n queryset = NautSite._registry.iteritems()\n template_name = \"mongonaut/ind...
python
edit
null
null
mit
0dfe3084cf7d4832d14c027e646bfd74cc096177
jazzband/django-mongonaut,pydanny/django-mongonaut,jazzband/django-mongonaut,lchsk/django-mongonaut,jazzband/django-mongonaut,lchsk/django-mongonaut,pydanny/django-mongonaut,lchsk/django-mongonaut,pydanny/django-mongonaut
mongonaut/views.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Remove Element -- keep streak!" }, { "role": "assistant", "content": "class Solution:\n # @param A a list of integers\n # @param elem an integer, value need to be removed\n # @return an integer\n def re...
python
new_file
2
3
mit
1b8bf0b171532d366f0823ea9afb9ac500262488
sureleo/leetcode,sureleo/leetcode,lsingal/leetcode,sureleo/leetcode,lsingal/leetcode,lsingal/leetcode
python/array/RemoveElement.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for invocation plugin hooks" }, { "role": "assistant", "content": "from mock import Mock\n\nfrom orges.invoker.pluggable import PluggableInvoker\n\nfrom orges.args import ArgsCreator\nimport orges.param as param\n\...
python
new_file
1
1
bsd-3-clause
a7c952cce7c006913727adf1be29e6d94e3b9f6a
cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt
orges/test/unit/test_pluggable.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for the decider." }, { "role": "assistant", "content": "from unittest.mock import MagicMock\nimport boto.swf.layer2 as swf\nfrom boto.swf import layer1\nimport pytest\n\nfrom garcon import activity\nfrom garcon imp...
python
new_file
5
3
mit
dcd80232189743962d12a3df15bbb2708b1966b8
xethorn/garcon,theorchard/garcon,pkuong/garcon,rantonmattei/garcon,someboredkiddo/garcon
tests/test_decider.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add step to remove nfs snapshot" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport logging\nfrom util import full_stack\nfrom workflow.steps.util.base import BaseStep\nfrom dbaas_nfsaas.provider import NfsaasP...
python
new_file
1
2
bsd-3-clause
6db2c7298a4111ce540743099cabed7aed4439c8
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/mysql/region_migration/remove_nfs_snapshot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add proxy-fixing middleware if serving over HTTPS proxy" }, { "role": "assistant", "content": "\"\"\" WSGI Entry Point\n\n\"\"\"\n\nfrom portal.app import create_app\nfrom werkzeug.contrib.fixers import ProxyFix\n\napp = create_a...
python
new_file
1
0
bsd-3-clause
f4bb9685d4ba6661cdda34635c772fb39dc3e246
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
wsgi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move win32 audio experiment to trunk." }, { "role": "assistant", "content": "#!/usr/bin/python\r\n# $Id:$\r\n\r\n# Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU.\r\n# Caveats:\r\n# - Requires a filena...
python
new_file
3
0
bsd-3-clause
d5c7d429be93a2b2de4a1c09bd73f72c02664499
adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet,niklaskorz/pyglet,niklaskorz/pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet
experimental/directshow.py
rejected_duplicate
Near-duplicate of sample 6875
true
[ { "role": "user", "content": "Write python code for the following: Add lab 10 template for class C" }, { "role": "assistant", "content": "# Template Binary Search Tree\n\nclass Node:\n \n '''\n Class untuk node dari Binary Search Tree\n Terdiri dari value dari node\n dan reference...
python
new_file
1
5
mit
6c53c55204955cf0682c655321219b4e67481030
giovanism/TarungLab,laymonage/TarungLab
lab/10/template_10_c.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Change name for maxprofit in amazing" }, { "role": "assistant", "content": "def maxprofit(stockvals): \n maxval, profit = 0, 0\n for stockval in stockvals[::-1]:\n maxval = max(maxval, stockval)\n profit += ma...
python
new_file
2
2
mit
d3367d32dbc080d8e963542351c427fe2da48f18
cc13ny/Allin,Chasego/cod,cc13ny/Allin,Chasego/codirit,cc13ny/Allin,Chasego/codi,cc13ny/algo,cc13ny/algo,Chasego/cod,Chasego/codi,cc13ny/Allin,cc13ny/algo,Chasego/cod,Chasego/codirit,cc13ny/algo,Chasego/codi,cc13ny/Allin,Chasego/codirit,cc13ny/algo,Chasego/cod,Chasego/codi,Chasego/codi,Chasego/codirit,Chasego/codirit,Ch...
talempd/amazing/MaxProfit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Read prices from Google Finance" }, { "role": "assistant", "content": "from __future__ import division\nimport numpy as np\nimport pandas as pd\nimport urllib2\n\n# __author__ = 'mattmcd'\n\n\nclass LseReader:\n\n def __init__...
python
new_file
3
1
apache-2.0
b38edc2a192151324855d50e9e172f0fd96b9064
mattmcd/PyAnalysis
mda/finance.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create channel search index, indexed all channel name" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\n\nfrom haystack.indexes import SearchIndex, CharField, Da...
python
new_file
1
1
mit
27439c063c51015c1405c3c855ce96157892da72
williamroot/opps,YACOWS/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps
opps/channel/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights first digit problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights First Digit Problem\n\nimport re\n\n\ndef firstDigit(inputString):\n match = re.search(r'\\d', inputString)\n ...
python
new_file
1
3
mit
0f5c38b1c7bcd8a26c415c8d0c93edc132263087
HKuz/Test_Code
CodeFights/firstDigit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test program for thread debugging" }, { "role": "assistant", "content": "#!/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\nTest the 'send_morse' module.\n\"\"\"\n\nimport sys\nimport os\nimport getopt\nimport threading\nsys....
python
new_file
3
3
mit
1ec0c1d949e9379fc2a01bf480a782bb4d75afb9
rzzzwilson/morse_trainer,rzzzwilson/morse_trainer
test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for schema loader module" }, { "role": "assistant", "content": "import contextlib\nimport json\nimport os\nimport tempfile\nimport unittest\n\nfrom faker_schema.schema_loader import load_json_from_file, load_json_f...
python
new_file
1
3
mit
8fb60650f8ff1da16d537402e7227f78667b434e
ueg1990/faker-schema
tests/test_schema_loader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial EPSFBuilder and EPSFFitter classes" }, { "role": "assistant", "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nTools to build an ePSF.\n\"\"\"\n\nfrom __future__ import (absolute_im...
python
new_file
1
1
bsd-3-clause
4af2f405c1c09737bdb32842f8e87a730d9bedd3
astropy/photutils,larrybradley/photutils
photutils/psf/building/epsf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom django.conf.urls.defaults import patterns, url\n\nfrom mezzanine.conf import settings\n\n\nurlpatterns = []\n\nif \"django.contrib.admin\" in settings.INSTALLED_APPS:\n urlpatterns += patterns(\"django.contrib.auth.views\",\n ...
python
edit
1
0
bsd-2-clause
40f57a73adadf08e497464990a34860d03e04d39
scarcry/snm-mezzanine,vladir/mezzanine,fusionbox/mezzanine,jerivas/mezzanine,molokov/mezzanine,frankchin/mezzanine,adrian-the-git/mezzanine,fusionbox/mezzanine,mush42/mezzanine,damnfine/mezzanine,molokov/mezzanine,Kniyl/mezzanine,cccs-web/mezzanine,orlenko/sfpirg,sjdines/mezzanine,adrian-the-git/mezzanine,scarcry/snm-m...
mezzanine/core/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to convert a multi-sheet Excel to a single csv." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport os\nimport logging\nimport csv\nimport argparse\nimport xlrd\n\nlogger = logging.getLogger()\n\n\n...
python
new_file
3
11
bsd-3-clause
0aa1f60fc00d488cf662f16cf966e7a6b6af43a0
dmc2015/hall-of-justice,dmc2015/hall-of-justice,sunlightlabs/hall-of-justice,dmc2015/hall-of-justice,sunlightlabs/hall-of-justice,sunlightlabs/hall-of-justice
scripts/collapse_xls_to_csv.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Add script to verify that all pages(+comments) are in the Internet Archive" }, { "role": "assistant", "content": "#!/usr/bin/env python3\nfrom datetime import datetime, timezone, timedelta\nimport json\nimport re\nimport sys\nimp...
python
new_file
1
0
mit
cd121a2466887999062e4e674998af971cd416e2
squirrel2038/thearchdruidreport-archive,squirrel2038/thearchdruidreport-archive,squirrel2038/thearchdruidreport-archive
check-wayback-machine.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert an index to a contig" }, { "role": "assistant", "content": "\"\"\"\nGiven a tuple of index1, index2, correlation and a tuple of index, contig\n\nrewrite the correlation to be contig1, contig2, correlation\n\"\"\"\n\nimpor...
python
new_file
3
0
mit
100e0a406551707e92826c2374f9c135613f6858
linsalrob/EdwardsLab,linsalrob/EdwardsLab,linsalrob/EdwardsLab,linsalrob/EdwardsLab,linsalrob/EdwardsLab
bin/index_to_contig.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Handle flipping the image with checl boxes" }, { "role": "assistant", "content": "from qtpy import QtWidgets\n\nfrom .pdsspect_image_set import PDSSpectImageSetViewBase\n\n\nclass TransformsController(object):\n\n def __init__...
python
new_file
1
2
bsd-3-clause
4c008042d01be6020a863855f74d8ee931dab46e
planetarypy/pdsspect
pdsspect/transforms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple tests for MessagePacket\n\nCurrently only MessagePacket.split(). Needs to be improved." }, { "role": "assistant", "content": "from cactusbot.packets import MessagePacket\n\n\ndef _split(text, *args, **kwargs):\n ret...
python
new_file
1
2
mit
0cb5f00975570a115322ab028dcb93c92c2e0872
CactusDev/CactusBot
tests/packets/test_message.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move the job server into a django management command." }, { "role": "assistant", "content": "import Queue\nimport zmq\n\naddr = 'tcp://127.0.0.1:5555'\n\nfrom django.core.management.base import NoArgsCommand\n\nclass Command(NoAr...
python
new_file
3
4
apache-2.0
5622b1c0ad7708b1d3df72da9caa888d111f6156
pnomolos/greatbigcrane,pnomolos/greatbigcrane
greatbigcrane/job_queue/management/commands/job_server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create test class for merge function" }, { "role": "assistant", "content": "import unittest, pyPdf, sys, os.path\nfrom mock import Mock\n\nSRC = os.path.join(os.path.dirname(__file__), '..', 'src')\nsys.path.append(SRC)\nimport m...
python
new_file
3
1
bsd-2-clause
1cd9e2ececc47eddf5089596b35797ec4e7562de
mgarriott/PDFMerger
test/merge_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utilities file for tokenize" }, { "role": "assistant", "content": "\"\"\" Tokenization utilities\n\"\"\"\n\n__author__ = ['Patrick J. Burns <<EMAIL>>']\n__license__ = 'MIT License.'\n\nimport pickle\nfrom abc import abstractm...
python
new_file
4
4
mit
9539a6874af98e437cc17ba04c7f0bdfd0a81c5c
TylerKirby/cltk,diyclassics/cltk,TylerKirby/cltk,kylepjohnson/cltk,cltk/cltk,D-K-E/cltk
cltk/tokenize/utils.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add hourly sleep wake pie chart" }, { "role": "assistant", "content": "import plotly as py\nimport plotly.graph_objs as go\nimport plotly.tools as tools\nfrom datetime import datetime, time, timedelta\nfrom sys import argv\n\nimp...
python
new_file
5
1
mit
9fa3e7161764d1bc5a812bccc27837c9ddabef23
f-jiang/sleep-pattern-grapher
sleep_wake_hourly_pie_chart.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Test to check the db." }, { "role": "assistant", "content": "#!/usr/bin/python -O\n\nimport sqlite3\nfrom parser import SQLITE3_DB_NAME\nfrom random import randint, randrange\n\ndef main():\n \"\"\" Ouputs a random clue (with ga...
python
new_file
4
4
mit
bcbf11a44074d3c027d523e97d274f7838969d65
whymarrh/jeopardy-parser,dangoldin/jeopardy-parser,dangoldin/jeopardy-parser
tests.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add script to test for 100% coverage" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\"\"\"\nParse a coverage.info file,\nand report success if all files have 100% test coverage.\n\"\"\"\n\nimport sys\n\nif len(s...
python
new_file
1
0
apache-2.0
733d24512b40bc5737704f715cea792fa5a702f0
cjdrake/boolexpr,cjdrake/boolexpr
script/covall.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights alphabetic shift problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Alternating Sums Problem\n\n\ndef alphabeticShift(inputString):\n test = [chr((ord(c) - 96) % 26 + 97) fo...
python
new_file
1
3
mit
8ed2ef198b5b28f7d4661ea9c50e5076273b6c97
HKuz/Test_Code
CodeFights/alphabeticShift.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test install numpy and biopython for RTD" }, { "role": "assistant", "content": "from setuptools import setup\n\nsetup(name='',\n version='0.1',\n description='',\n url='',\n author='',\n author_email='',\...
python
new_file
1
0
mit
5000a069b0a7ab32eefafc7acef64946450837cb
m4rx9/rna-pdb-tools,m4rx9/rna-pdb-tools
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add TrackChecker to allow checking of changing tracks" }, { "role": "assistant", "content": "from threading import Timer\nimport track\n\n\nclass TrackChecker():\n\n\tcurrentSong = \"\"\n\tcurrentArtist = \"\"\n\tcurrentAlbum = \...
python
new_file
16
4
mit
a45d3def93e78d9fc26fadf27d83d5a4de44ddc4
ollien/playserver,ollien/playserver,ollien/playserver
playserver/trackchecker.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Write python code for the following: Add super-simple automatic AndroidManifest.xml updater." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport os\nimport re\n\nrepo = os.path.dirname(os.path.realpath(__file__))\n\ncode = 'android:versionCode=\"%...
python
new_file
3
0
apache-2.0
842064d8b4852232c19df9d176fb50a0c302d867
msdgwzhy6/ActionBarSherlock,caobaibing/ActionBarSherlock,msdgwzhy6/ActionBarSherlock,ubreader/ActionBarSherlock,msdgwzhy6/ActionBarSherlock,mercadolibre/ActionBarSherlock,mxn21/ActionBarSherlock,vimalrajpara2006/Lib-Droid-ActionbarSherlock,zhaokidd/ActionBarSherlock,zhupengGitHub/ActionBarSherlock,SpeedSolutions/Action...
update-manifest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for building recipes" }, { "role": "assistant", "content": "from __future__ import (division, print_function, absolute_import,\n unicode_literals)\n\nfrom obvci.conda_tools.build_directory import...
python
new_file
1
1
bsd-3-clause
8db409d7d63135c81daa5cc556269599b362b525
astropy/conda-builder-affiliated,Cadair/conda-builder-affiliated,mwcraig/conda-builder-affiliated,kbarbary/conda-builder-affiliated,zblz/conda-builder-affiliated,kbarbary/conda-builder-affiliated,cdeil/conda-builder-affiliated,cdeil/conda-builder-affiliated,astropy/conda-build-tools,bmorris3/conda-builder-affiliated,Ca...
affiliate-builder/build_recipes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for transformation functions" }, { "role": "assistant", "content": "import unittest\nfrom transformations import drop_vowel, words_with_ck, repeat_to_single, vowel_expand, get_matched_letters_indices, l33t\n\n\nclass My...
python
new_file
3
1
apache-2.0
3b79b49b08c35a1e8d57fa9774027bdeda4e8e83
JeffSpies/nonwordlist,CenterForOpenScience/guid-filter
test_transformations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Put up a structure to extraction library.\n\nDo this so we have a skelton to fill in." }, { "role": "assistant", "content": "\"\"\"\n### CODE OWNERS: Shea Parkes\n\n### OBJECTIVE:\n Extraction methods for relevant items.\n\n### ...
python
new_file
4
1
mit
7a9772952b5a6b39986b9a705ac7bbaf2810de91
IndyActuaries/epic-fhir,IndyActuaries/epic-fhir
python/prm_fhir/extractors.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add yaml file to python dict example" }, { "role": "assistant", "content": "import yaml\n\nsample_yaml_as_dict = '''\nfirst_dict_key: some value\nsecond_dict_key: some other value\n'''\n\nsample_yaml_as_list = '''\n# Notice here ...
python
new_file
4
0
mit
3d04954345b15527707d119939b8f79a761e7782
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
pyaml.py
rejected_lint
Too many lint violations: 4
true