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: Solve Code Fights make array consecutive 2 problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Make Array Consecutive 2 Problem\n\n\ndef makeArrayConsecutive2(statues):\n return (len(range(min...
python
new_file
1
3
mit
f4d26567afc9185e0f9370eda43d30084437ade5
HKuz/Test_Code
CodeFights/makeArrayConsecutive2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create directory for useless symbols remove" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 17.08.2017 14:38\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"" } ]
python
new_file
1
0
mit
d082eb41c2ccef7178d228896a7658fe52bcbdec
PatrikValkovic/grammpy
tests/UselessSymbolsRemove/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new test setup required for py.test/django test setup" }, { "role": "assistant", "content": "import os\nimport django\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'testsettings'\n\n# run django setup if we are on a version of dj...
python
new_file
1
0
apache-2.0
0fd7cdee45b54551bcfc901cece2e5cc9dec4555
emory-libraries/eulcommon,emory-libraries/eulcommon
test/test_setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for VocabularySet" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom __future__ import division\n\nfrom unittest import TestCase, main\nfrom metasane.core import VocabularySet\n\nclass VocabularySet...
python
new_file
1
1
bsd-3-clause
0091af78bd191e34ecb621b20e79d6dd3d32ebb6
clemente-lab/metasane
tests/test_core.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for testing error reporting." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Copyright 2012 The greplin-nagios-utils Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# y...
python
new_file
1
1
apache-2.0
6c9760b328716d6b2e099698293c93cba9361932
Cue/greplin-nagios-utils,Cue/greplin-nagios-utils
checkserver/testchecks/check_error.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make a command to make subsets. Subsets are useful for testing during development." }, { "role": "assistant", "content": "\"\"\"\n Copyright 2014 Google Inc. All rights reserved.\n\n Licensed under the Apache License, Version 2...
python
new_file
1
5
apache-2.0
aafd823069176075b4810496ee98cea3203b5652
googlei18n/TachyFont,moyogo/tachyfont,googlefonts/TachyFont,moyogo/tachyfont,googlei18n/TachyFont,moyogo/tachyfont,bstell/TachyFont,moyogo/tachyfont,googlefonts/TachyFont,moyogo/tachyfont,googlei18n/TachyFont,bstell/TachyFont,googlei18n/TachyFont,googlei18n/TachyFont,bstell/TachyFont,googlefonts/TachyFont,bstell/TachyF...
build_time/src/make_subset.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement classes to be used by the deserializer" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\nclass TreeElement(object):\n \"\"\"Helper class to identify internal classes.\"\"\"\n def __init__(self, *...
python
new_file
1
2
mit
1786ebacb85b2ddce816fb21b80285d991761695
hackebrot/poyo
poyo/_nodes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom IPython.parallel import Client\nfrom distarray.client import DistArrayContext\n\n\nclass TestClient(unittest.TestCase):\n\n def setUp(self):\n self.client = Client()\n self.dv = self.client[:]\n\n d...
python
edit
1
1
bsd-3-clause
d187c51ccd9dc1676b6f16eddecee6dce752d668
RaoUmer/distarray,enthought/distarray,RaoUmer/distarray,enthought/distarray
distarray/tests/test_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: contrib_bots: Add tests for xkcd bot." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport mock\nimport os\nimport sys\n\nour_dir ...
python
new_file
1
2
apache-2.0
ac7c5f51e270e48d3be9363a7c65b4b2f019c90c
shubhamdhama/zulip,shubhamdhama/zulip,verma-varsha/zulip,punchagan/zulip,vabs22/zulip,shubhamdhama/zulip,vaidap/zulip,brockwhittaker/zulip,rishig/zulip,punchagan/zulip,synicalsyntax/zulip,hackerkid/zulip,brainwane/zulip,jrowan/zulip,amanharitsh123/zulip,punchagan/zulip,brainwane/zulip,rishig/zulip,synicalsyntax/zulip,r...
contrib_bots/bots/xkcd/test_xkcd.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an audio output using the pygame mixer. This abuses pygame to a fair extent, but works reasonably with large-ish buffer sizes." }, { "role": "assistant", "content": "import numpy\nimport Numeric\nimport pygame\nimport Axon\n...
python
new_file
4
5
apache-2.0
280aa4c8db7b5580b73ab6980f10d21a6ef2d761
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Audio/PyGameOutput.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a very simple test that *must* always pass. * Useful for testing the newstyle API" }, { "role": "assistant", "content": "from ooni import nettest\nclass SimpleTest(nettest.TestCase):\n inputs = range(1,100)\n optParamet...
python
new_file
3
1
bsd-2-clause
4433cadaa39dd84b922329c84a7e791d81cac7c6
Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,juga0/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,0xPoly/ooni-probe,lordappsec/ooni-probe,hackerberry/ooni-probe,0xPoly/ooni-probe,kdmurray91/ooni-pr...
nettests/simpletest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Migration: Add all PLs to db" }, { "role": "assistant", "content": "\"\"\"populate-provincial-legislatures\n\nRevision ID: 299e1d15a55f\nRevises: 1f97f799a477\nCreate Date: 2018-08-20 16:17:28.919476\n\n\"\"\"\n\n# revision ident...
python
new_file
5
4
apache-2.0
fefb9a9fa5a7c6080bc52896e2d1517828b01a3d
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
migrations/versions/299e1d15a55f_populate_provincial_legislatures.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a script for plotting distance to target." }, { "role": "assistant", "content": "import climate\nimport itertools\nimport lmj.plot\nimport numpy as np\n\nimport source as experiment\nimport plots\n\n\n@climate.annotate(\n ...
python
new_file
4
3
mit
8ccf3d937d25ec93d1ce22d60735ffbcaf776fe3
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/plot-target-distance.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add model representing a listing" }, { "role": "assistant", "content": "from sqlalchemy import create_engine, Column, DateTime, Float, Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\n\nBase = declarative...
python
new_file
1
1
mit
28944376472130d53a05f7473e7213c917207cd4
rlucioni/craigbot,rlucioni/craigbot,rlucioni/apartments
apartments/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate data from an experiment\n\nAdded a script that generates csv files of estimations of theta,\nphi_topic and phi_opinion and saves them to disk." }, { "role": "assistant", "content": "import logging\nimport o...
python
new_file
1
0
apache-2.0
38cbc73f70a9ca896a29d7fa2e000388bbf40d88
NLeSC/cptm,NLeSC/cptm
DilipadTopicModelling/experiment_get_results.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add custom plot style contour_image." }, { "role": "assistant", "content": "from matplotlib import cm\nimport matplotlib.pyplot as plt\nfrom mplstyles import cmap as colormap\nimport numpy as np\n\ndef contour_image(x,y,Z,cmap=No...
python
new_file
1
5
mit
52c50ca6e4c5d2ee75300617c5da118fb1136e76
matthewwardrop/python-mplstyles,matthewwardrop/python-mplkit,matthewwardrop/python-mplstyles,matthewwardrop/python-mplkit
mplstyles/plots.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Clear out unaligned NLCD19 GWLF-E results\n\nAdds a migration that clears out all stored results for GWLF-E\nprojects created on or after 2022-01-17, which is when 1.33.0\nwas released with incorrectly aligned NLCD19 layers, which had\nalso ...
python
new_file
1
1
apache-2.0
3fd4244dbfd33bbf2fa369d81756e82b1cf1c467
WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed
src/mmw/apps/modeling/migrations/0041_clear_nlcd2019_gwlfe_results.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport roan\n\nfrom django.contrib.flatpages import models\n\nfrom palestras import models as pmodels\n\n\ndef connect():\n flatpages = models.FlatPage.objects.all()\n for f in flatpages:\n roan.purge(f...
python
edit
1
3
bsd-2-clause
2611476df6f362cd59e4aad38a243fc8f6cbf8a8
devincachu/devincachu-2013,devincachu/devincachu-2013,devincachu/devincachu-2014,devincachu/devincachu-2014,devincachu/devincachu-2014,devincachu/devincachu-2013,devincachu/devincachu-2013
devincachu/purger.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add lemon drop elevator model" }, { "role": "assistant", "content": "import numpy as np\n\nKt = 1.41/89.0\nKv = 5840.0/3.0\nG = 10.0\nJ = 4.0*(2.54**2.0)/2.0 # 4 kg on a 1 inch pully\nR = 12.0/89.0\n\nA = np.asarray([[0, 1],\n ...
python
new_file
1
0
mit
656d94c0375f6a96cc3a9d4b3227d8f19afe3dea
WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox
control/systems/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\n\n\"\"\"\npdt_locales\n\nAll of the included locale classes shipped with pdt.\n\"\"\"\n\ntry:\n import PyICU as pyicu\nexcept:\n pyicu = None\n\n\ndef lcase(x):\n return x.lower()\n\n\nfrom .base import p...
python
edit
11
1
apache-2.0
cdd1f3410b8ae304485f7992ac6048e1277cffe1
phoebebright/parsedatetime,bear/parsedatetime,idpaterson/parsedatetime
parsedatetime/pdt_locales/__init__.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add external driver and parameter file" }, { "role": "assistant", "content": "#=================================================\n# Observation\n#-------------------------------------------------\nsstObsPath = '/clim_obs/obs/ocn/...
python
new_file
1
0
bsd-3-clause
b3889f8ff6d66963d4253d6796c3bb20dc9adbb7
eguil/ENSO_metrics,eguil/ENSO_metrics
scripts/my_Param.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for DakotaBase\n\nStill need to determine how to test its non-abstract methods." }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# Tests for dakota.dakota_base module.\n#\n# Call with:\n# $ nosetes...
python
new_file
7
1
mit
45b789010409e4e2e2afc88cb776c8b70e7768ec
csdms/dakota,csdms/dakota
dakota/tests/test_dakota_base.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Create template_redacted entry for templates created by migration\n\nSo that we can edit those templates" }, { "role": "assistant", "content": "\"\"\"\n\nRevision ID: 0296_template_redacted_fix\nRevises: 0295_api_key_constraint\n...
python
new_file
1
1
mit
0ca7d4a20c8a65e45ddb7c61ca72c0e6c464a80e
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0296_template_redacted_fix.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Adjust the sorting of restaurants." }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 9ef49beab95\nRevises: 4b7b5a7ddc5c\nCreate Date: 2016-02-07 15:00:45.614000\n\n\"\"\"\n\n# revision identifiers, used b...
python
new_file
4
1
mit
2cb7e09df0a8ec6fda707cccd1e9f8f00e15083c
clementlefevre/hunger-game,clementlefevre/hunger-game,clementlefevre/hunger-game
migrations/versions/9ef49beab95_.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add command to print vault info" }, { "role": "assistant", "content": "import boto\n\nclass CommandVaultInfo(object):\n\n def execute(self, args, config):\n glacier_connection = boto.connect_glacier(aws_access_key_id=config.g...
python
new_file
3
3
mit
4ff6b846311a0f7bd6cfcf2e661a7c53061406fe
carsonmcdonald/glacier-cmd
glaciercmd/command_vault_info.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for security_scan\n\nChange-Id: Idda799c01408aa9afd09d573e23f42e011f3fafb\nSigned-off-by: Cédric Ollivier <<EMAIL>>" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n# Copyright (c) 2017 Orange and ot...
python
new_file
1
1
apache-2.0
582ebd448508625ed2c9f362aaafc3fc46e60df0
opnfv/functest,opnfv/functest,mywulin/functest,mywulin/functest
functest/tests/unit/features/test_security_scan.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a management command to register webhooks" }, { "role": "assistant", "content": "from django.core.management.base import NoArgsCommand\n\nfrom webhooks.models import Webhook\n\n\nclass Command(NoArgsCommand):\n help = 'Reg...
python
new_file
1
1
bsd-3-clause
2ca07d4a8893196bbf304bcdac16688505e6123a
CorbanU/corban-shopify,CorbanU/corban-shopify
shopify/webhooks/management/commands/webhookregister.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add columns to User model" }, { "role": "assistant", "content": "from sqlalchemy import Column, Integer, String\nfrom bookmarks.database import Base\n\n\nclass User(Base):\n __tablename__ = 'users'\n id = Column(Integer, pr...
python
new_file
1
1
apache-2.0
463502a251111199da130e508929a35b2f126f4e
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
bookmarks/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create TwoSum II for Lint" }, { "role": "assistant", "content": "class Solution:\n # @param nums, an array of integer\n # @param target, an integer\n # @return an integer\n def twoSum2(self, nums, target):\n # ...
python
new_file
1
3
mit
ee859881af0633d4d2d88015c907cfa856516dbe
Chasego/codi,Chasego/codi,cc13ny/Allin,cc13ny/algo,Chasego/cod,cc13ny/algo,Chasego/codirit,Chasego/cod,cc13ny/Allin,Chasego/codirit,Chasego/codi,Chasego/codirit,cc13ny/Allin,Chasego/codi,Chasego/codi,Chasego/codirit,cc13ny/algo,Chasego/cod,cc13ny/Allin,cc13ny/algo,Chasego/codirit,cc13ny/algo,cc13ny/Allin,Chasego/cod,Ch...
lintcode/000-000-Two-Sum-II/TwoSumII.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add negative API tests for policy validation\n\nAdd negative API tests for policy validation\n\nChange-Id: I0363bfd2165893b713059dc9db5ab9e632522091" }, { "role": "assistant", "content": "# Licensed under the Apache License, Vers...
python
new_file
1
1
apache-2.0
1c81643eaed91b4171a4e68699d930e5ef3688db
openstack/senlin,openstack/senlin,stackforge/senlin,stackforge/senlin,openstack/senlin
senlin/tests/tempest/api/policies/test_policy_validate_negative.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test Home Assistant yaml loader.\"\"\"\nimport io\nimport unittest\n\nfrom homeassistant.util import yaml\n\n\nclass TestYaml(unittest.TestCase):\n \"\"\"Test util.yaml loader.\"\"\"\n\n def test_simple_list(self):\n \"\"...
python
edit
1
2
mit
24788b106b9cdd70e7240dc3eccac82fba290c85
lukas-hetzenecker/home-assistant,LinuxChristian/home-assistant,molobrakos/home-assistant,sffjunkie/home-assistant,titilambert/home-assistant,ewandor/home-assistant,emilhetty/home-assistant,mikaelboman/home-assistant,nkgilley/home-assistant,robbiet480/home-assistant,jawilson/home-assistant,molobrakos/home-assistant,devd...
tests/util/test_yaml.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add spider for Brookdale Senior Living" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nfrom locations.items import GeojsonPointItem\n\nURL = 'https://www.brookdale.com/bin/brookdale/com...
python
new_file
1
2
mit
8eeb4c2db613c1354c38696ac6691cf79f66a383
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
locations/spiders/brookdale.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add registration method for TB" }, { "role": "assistant", "content": "\"\"\"\nUtility functions to retrieve information about available services and setting up security for the Hops platform.\n\nThese utils facilitates developmen...
python
new_file
1
1
apache-2.0
bb11ab050fe9a7bb0ffe83419eb0e87390f7deac
hopshadoop/hops-util-py,hopshadoop/hops-util-py
hopsutil/tensorboard.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ptch: Add ptch module and base PatchFile class. This class can unpack RLE-compressed patchfiles." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nPTCH files are a container format for Blizzard patch files.\...
python
new_file
3
3
cc0-1.0
0403d6f78189be3f3b22f068dad1db0c53687ef7
jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow,jleclanche/pywow
ptch/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add data migration to add category components for VPC." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\nfrom waldur_mastermind.marketpl...
python
new_file
1
2
mit
52e8a378d8a31989c9d93ef83eabbe6df339f915
opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/marketplace/migrations/0083_offering_component.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new layout window command" }, { "role": "assistant", "content": "import sublime, sublime_plugin\n\nclass NewLayoutCommand(sublime_plugin.TextCommand):\n def run(self, edit, **args):\n self.view.window().run_command(\"set_...
python
new_file
3
1
mit
96f224a6b80720a88fefc8530aea113f975ef110
shaochuan/sublime-plugins
new_layout.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate big RUM_* files" }, { "role": "assistant", "content": "from rum_mapping_stats import aln_iter\nimport argparse\nimport sys\n\nparser = argparse.ArgumentParser()\n\nparser.add_argument('--times', type=int)\n...
python
new_file
2
0
mit
841e8fe236eab35b803cb9d8bec201306ce4642e
itmat/rum,itmat/rum,itmat/rum
util/repeat_rum_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix maybe all flake8 errors. Add first test." }, { "role": "assistant", "content": "\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with mo...
python
new_file
1
1
mit
74354263acb3399295e7fde18d6aeed4b7bb7397
grandmasterchef/WhatManager2,MADindustries/WhatManager2,grandmasterchef/WhatManager2,karamanolev/WhatManager2,davols/WhatManager2,MADindustries/WhatManager2,karamanolev/WhatManager2,MADindustries/WhatManager2,grandmasterchef/WhatManager2,davols/WhatManager2,MADindustries/WhatManager2,karamanolev/WhatManager2,grandmaste...
what_transcode/tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add actor with behavior similar to old-style Delay" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2015 Ericsson AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ...
python
new_file
1
1
apache-2.0
ebd62eac70d5589b0b7f593009024868f981e658
les69/calvin-base,EricssonResearch/calvin-base,les69/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base,les69/calvin-base,EricssonResearch/calvin-base,les69/calvin-base
calvin/actorstore/systemactors/std/ClassicDelay.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial test for routes." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath('..'))\n\nimport website\nimport unittest\nimport tem...
python
new_file
3
1
mit
a1039c2e38243b64d2027621aa87ee020636f23b
jonathanchu/fpo,jonathanchu/fpo
tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Script to encode raw RGB565\n\n* Encodes RGB565 raw stream to MP4/AVI" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Converts raw RGB565 video to MP4/AVI\n\nfrom sys import argv, exit\nfrom array import array...
python
new_file
1
0
mit
49b1de4a68133e618723f96f2dc922b311bdd982
SmartArduino/openmv,SmartArduino/openmv,iabdalkader/openmv,kwagyeman/openmv,kwagyeman/openmv,tianzhihen/openmv,kwagyeman/openmv,SmartArduino/openmv,openmv/openmv,openmv/openmv,tianzhihen/openmv,iabdalkader/openmv,kwagyeman/openmv,tianzhihen/openmv,iabdalkader/openmv,iabdalkader/openmv,SmartArduino/openmv,openmv/openmv,...
util/encode_raw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add data migration for section" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef add_sections(apps, schema_editor):\n #...
python
new_file
3
3
mit
cb9166c4564c4e763e1214355dc76cbe6d466258
supermitch/simple-author
books/migrations/0009_auto_20141127_1718.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for timestr()" }, { "role": "assistant", "content": "#!/usr/bin/python\n# ex:ts=4:sw=4:sts=4:et\n# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-\n\n# The unittest framwork doesn't play nice with py...
python
new_file
1
1
mit
a02a46752d954c29a65bf8bc5b88fa3545315175
OakNinja/svtplay-dl,qnorsten/svtplay-dl,dalgr/svtplay-dl,iwconfig/svtplay-dl,dalgr/svtplay-dl,leakim/svtplay-dl,selepo/svtplay-dl,spaam/svtplay-dl,olof/svtplay-dl,leakim/svtplay-dl,OakNinja/svtplay-dl,qnorsten/svtplay-dl,selepo/svtplay-dl,iwconfig/svtplay-dl,olof/svtplay-dl,spaam/svtplay-dl,OakNinja/svtplay-dl,leakim/s...
lib/svtplay_dl/tests/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Copy old script from @erinspace which added identifiers to existing preprints." }, { "role": "assistant", "content": "import sys\nimport time\nimport logging\nfrom scripts import utils as script_utils\nfrom django.db import trans...
python
new_file
3
3
apache-2.0
840bc57e7120ae67e84c1c7bca94cfef34c8d2a8
erinspace/osf.io,chennan47/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,felliott/osf.io,baylee-d/osf.io,saradbowman/osf.io,leb2dg/osf.io,caseyrollins/osf.io,sloria/osf.io,Johnetordoff/osf.io,TomBaxter/osf.io,crcresearch/osf.io,mattclark/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,felliott/osf.io,mfraezz/osf.io,adlius/osf.io...
scripts/add_missing_identifiers_to_preprints.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add problem 35, circular primes" }, { "role": "assistant", "content": "from math import sqrt\nfrom time import time\n\nPRIME_STATUS = {}\n\n\ndef is_prime(n):\n if n == 2:\n return True\n if n % 2 == 0 or n <= 1:\n ...
python
new_file
4
6
mit
278920272efd7ab959d7cad5b5f7d6c17935c7e6
dimkarakostas/project-euler
problem_35.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for lazy strings" }, { "role": "assistant", "content": "import sys\nimport os\nsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))\n\n\nfrom stringlike.lazy import LazyString, C...
python
new_file
1
1
mit
dad430fd56b8be22bd1a3b9773f9948c3e305883
CovenantEyes/py_stringlike
stringlike/test/lazy_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a new tour example" }, { "role": "assistant", "content": "from seleniumbase import BaseCase\n\n\nclass MyTourClass(BaseCase):\n\n def test_google_maps_tour(self):\n self.open(\"https://www.google.com/maps/@42.359...
python
new_file
1
1
mit
e7b6aef4db85c777463d2335107145b60b678ae2
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
examples/tour_examples/maps_introjs_tour.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration which fixes missing message IDs." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.2 on 2017-06-28 15:27\nfrom __future__ import unicode_literals\n\nfrom django.db import mig...
python
new_file
1
2
apache-2.0
e363aac46c9a5b607c7b32bcc5546c5a2728d750
qubs/data-centre,qubs/data-centre,qubs/climate-data-api,qubs/climate-data-api
climate_data/migrations/0029_auto_20170628_1527.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add decision tree classifier attempt." }, { "role": "assistant", "content": "import pandas as pd\nfrom sklearn import tree\n\n# X = [[0, 1], [1, 1]]\n# Y = [0, 1]\n#clf = tree.DecisionTreeClassifier()\n#clf = clf.fit(X, Y)\n\ndat...
python
new_file
3
0
mit
10ccc510deab5c97ce8a6c5ee57232c5e399986e
andretadeu/jhu-immuno,andretadeu/jhu-immuno
decision_tree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add small example of basic anomaly detection w/peewee." }, { "role": "assistant", "content": "import math\nfrom peewee import *\n\n\ndb = SqliteDatabase(':memory:')\n\nclass Reg(Model):\n key = TextField()\n value = Integer...
python
new_file
8
3
mit
d93916b1927f0ae099cee3cf93619d3113db147b
coleifer/peewee,coleifer/peewee,coleifer/peewee
examples/anomaly_detection.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add rolling mean scatter plot example" }, { "role": "assistant", "content": "\"\"\"\nScatter Plot with Rolling Mean\n------------------------------\nA scatter plot with a rolling mean overlay. In this example a 30 day window\nis ...
python
new_file
1
0
bsd-3-clause
c5ecaef62d788b69446181c6ba495cb273bf98ef
altair-viz/altair,jakevdp/altair
altair/examples/scatter_with_rolling_mean.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to shuffle paired fastq sequences." }, { "role": "assistant", "content": "# shuffles the sequences in a fastq file\nimport os\nimport random\nfrom Bio import SeqIO\nimport fileinput\nfrom argparse import ArgumentParser...
python
new_file
3
0
mit
8adfedd0c30fab796fccac6ec58c09e644a91b2f
roryk/junkdrawer,roryk/junkdrawer
shuffle_fastq.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate other adobe themes" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom PIL import Image, ImageEnhance\nimport PIL.ImageOps\nimport fnmatch\nimport shutil\nimport os\n\ndef globPath(path, patt...
python
new_file
1
6
mit
ffb5caf83055e734baf711366b6779ecb24a013c
Geequlim/godot-themes
addons/adobe/clone.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use filfinder to get the average radial width of features in the moment 0" }, { "role": "assistant", "content": "\nfrom fil_finder import fil_finder_2D\nfrom basics import BubbleFinder2D\nfrom spectral_cube.lower_dimensional_stru...
python
new_file
3
0
mit
c206969facfc0e46d7ec4d3f60ce2e6a07956dbd
e-koch/VLA_Lband,e-koch/VLA_Lband
14B-088/HI/analysis/run_filfinder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nDATABASES = {\n \"default\": {\n # Ends with \"postgresql_psycopg2\", \"mysql\", \"sqlite3\" or \"oracle\".\n \"ENGINE\": \"django.db.backends.postgresql_psycopg2\",\n # DB name or path to database file if using sq...
python
edit
1
0
bsd-2-clause
b3f91806b525ddef50d541f937bed539f9bae20a
Kniyl/mezzanine,webounty/mezzanine,spookylukey/mezzanine,theclanks/mezzanine,batpad/mezzanine,sjdines/mezzanine,dovydas/mezzanine,readevalprint/mezzanine,eino-makitalo/mezzanine,industrydive/mezzanine,joshcartme/mezzanine,Cajoline/mezzanine,frankier/mezzanine,PegasusWang/mezzanine,biomassives/mezzanine,Skytorn86/mezzan...
mezzanine/project_template/deploy/live_settings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script demonstrating raising and catching Exceptions." }, { "role": "assistant", "content": "gestures = [\"rock\", \"paper\", \"scissors\"]\n\ndef verify_move(player_move):\n if player_move not in gestures:\n raise ...
python
new_file
1
2
mit
ea26478495d5aec6925e32c9a87245bf2e1e4bc8
kubkon/ee106-additional-material
rps/errors.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Dehnen smoothing as a wrapper" }, { "role": "assistant", "content": "###############################################################################\n# DehnenSmoothWrapperPotential.py: Wrapper to smoothly grow a potential\n...
python
new_file
1
3
bsd-3-clause
c599b5d470cf80b964af1b261a11540516e120df
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
galpy/potential_src/DehnenSmoothWrapperPotential.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove Duplicates from Sorted Array problem" }, { "role": "assistant", "content": "'''\nGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.\n\nDo not allocate ex...
python
new_file
5
6
apache-2.0
da5fed886d519b271a120820668d21518872f52c
zsmountain/leetcode,zsmountain/leetcode,zsmountain/leetcode
remove_duplicates_from_sorted_array.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a failing test to the landing page to check for upcoming events." }, { "role": "assistant", "content": "from django.core.urlresolvers import reverse\nfrom django.test import TestCase\nfrom mock import patch\nfrom datetime imp...
python
new_file
1
2
mit
aff827e9cc02bcee6cf8687e1dff65f39daaf6c6
shapiromatron/amy,pbanaszkiewicz/amy,swcarpentry/amy,vahtras/amy,pbanaszkiewicz/amy,pbanaszkiewicz/amy,wking/swc-amy,vahtras/amy,shapiromatron/amy,swcarpentry/amy,swcarpentry/amy,wking/swc-amy,wking/swc-amy,shapiromatron/amy,vahtras/amy,wking/swc-amy
workshops/test/test_landing_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use unified class for json output" }, { "role": "assistant", "content": "from os import path\n\nfrom ffflash import RELEASE, log, now, timeout\nfrom ffflash.lib.clock import epoch_repr\nfrom ffflash.lib.data import merge_dicts\nf...
python
new_file
1
3
bsd-3-clause
947c9ef100686fa1ec0acaa10bc49bf6c785665b
spookey/ffflash,spookey/ffflash
ffflash/container.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for profile items.\n\nWhen we moved profile item image content into a separate model, we\nmissed this migration when rebasing." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by D...
python
new_file
1
0
apache-2.0
bb7bb2e12d3ccbb55f0b0e6db5d0cb79c3ea8079
knowmetools/km-api,knowmetools/km-api,knowmetools/km-api,knowmetools/km-api
km_api/know_me/migrations/0013_remove_profileitem_media_resource.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add codemod to replace __unicode__ with __str__" }, { "role": "assistant", "content": "import sys\n\nfrom bowler import Query\n\n\n(\n Query(sys.argv[1])\n .select_function(\"__unicode__\")\n .rename('__str__')\n .idi...
python
new_file
1
0
apache-2.0
207116ee7ba8d8da521f497997da90066831a551
edx/repo-tools,edx/repo-tools
django3_codemods/replace_unicode_with_str.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\n__version__ = \"0.15.0rc3\"\nversion = tuple(__version__.split('.'))\n\nlogging.getLogger(__name__).addHandler(logging.NullHandler())\n\n```\n\nApply this change: Bump version 0.15.0rc3 --> 0.15.0rc4\n\nSigned-off-by: Jack...
python
edit
1
0
mit
2d1624f088431e5f71214988499f732695a82b16
lbryio/lbry,lbryio/lbry,zestyr/lbry,lbryio/lbry,zestyr/lbry,zestyr/lbry
lbrynet/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial shell of Pyglab class." }, { "role": "assistant", "content": "import requests\n\n\nclass Pyglab(object):\n def __init__(self, token):\n self.token = token\n self.headers = {'PRIVATE-TOKEN', token}\n ...
python
new_file
3
1
mit
4764b5248cf91042a12ce6aef77a04c37360eb4f
sloede/pyglab,sloede/pyglab
pyglab/pyglab.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add JSON HttpResponse that does the encoding for you." }, { "role": "assistant", "content": "from django.core.serializers import json, serialize\nfrom django.db.models.query import QuerySet\nfrom django.http import HttpResponse\n...
python
new_file
1
2
mit
70e04b20c5d78b41546aa4ea1a1e2fd82af7527f
bueda/django-comrade
comrade/http/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add auto solver for \"W3-Radix Sorts\"." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\ndef make_arr(text):\n return text.strip().split(' ')\n\n\ndef print_arr(arr):\n for t in arr:\n print(t, end=...
python
new_file
1
5
mit
31bb487a2f75268cb0b60ef4539935df83b68a84
hghwng/mooc-algs2,hghwng/mooc-algs2
quiz/3-radixsort.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new content parser class (based upon code in Konstruktuer)" }, { "role": "assistant", "content": "#\n# Konstrukteur - Static website generator\n# Copyright 2013 Sebastian Fastner\n#\n\nimport glob, os\nfrom jasy.core import C...
python
new_file
1
7
mit
72f32099411644a3fed6103430f7dd78fb0929a5
fastner/konstrukteur,fastner/konstrukteur,fastner/konstrukteur
konstrukteur/ContentParser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for posting a review through the view" }, { "role": "assistant", "content": "\"\"\"Tests for wafer.talk review form behaviour.\"\"\"\n\nfrom django.test import Client, TestCase\nfrom django.urls import reverse\n\nfrom re...
python
new_file
3
1
isc
e2ed635fb3289a5b45f5f15cd1eb543d87fb93d7
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
wafer/talks/tests/test_review_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the model.py file declarative generated from mysql." }, { "role": "assistant", "content": "#autogenerated by sqlautocode\n\nfrom sqlalchemy import *\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.or...
python
new_file
34
0
mit
896270bcd99b26e4128fd35dd3821a59807ae850
mteule/StationMeteo,mteule/StationMeteo
doc/model/model_decla.py
rejected_lint
Too many lint violations: 34
true
[ { "role": "user", "content": "Write python code for the following: Add example for a clunky 3D high resolution loupe for napari" }, { "role": "assistant", "content": "import functools\nimport numpy as np\nimport dask.array as da\nfrom magicgui.widgets import Slider, Container\nimport napari\n\n#...
python
new_file
3
1
bsd-3-clause
7182af317116db7eb3f7a278b3487ad91a3b3331
jni/useful-histories
high-res-slider.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create file and add pseudocode" }, { "role": "assistant", "content": "# Copyright (C) 2017 Bran Seals. All rights reserved.\n# Created: 2017-06-05\n\nprint(\"== UML to CPP ==\")\nprint(\"Create or modify C++ header and implementa...
python
new_file
1
1
mit
3ebae0f57ae3396213eb28b6fc7a23ff3e3c4980
BranSeals/uml-to-cpp
uml-to-cpp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove start dates for the second time from draft dos2 briefs\n\nThis is identical to the previous migration but will be run again\nto cover any draft briefs with invalid dates that could have\nappeared during the previous API rollout proces...
python
new_file
1
3
mit
7aab44f006a6412d8f169c3f9a801f41a6ea0a95
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/880_remove_invalid_draft_dos2_brief_dates_again.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for sabnzbd cleanupfilename.py" }, { "role": "assistant", "content": "import unittest\nfrom cleanupfilename import rename\n\n\nclass TestRename(unittest.TestCase):\n files = []\n dirs = []\n\n def setUp(self):\n...
python
new_file
1
3
bsd-3-clause
c25cebf31648466111cb3d576e0a398bb4220ccf
FreekKalter/linux-scripts,FreekKalter/linux-scripts,FreekKalter/linux-scripts,FreekKalter/linux-scripts
sabnzbd/test_cleanupfilename.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add crypto pre-submit that will add the openssl builder to the default try-bot list.\n\nBUG=None\nTEST=git try should run a linux_redux try job too.\n\n\nReview URL: http://codereview.chromium.org/9235031\n\ngit-svn-id: de016e52bd170d2d4f234...
python
new_file
1
1
bsd-3-clause
eec00e07d8e50d260249eab6cbefc976cc184683
Fireblend/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,rogerwang/chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,dednal/chromium.src,patrickm/chromium.src,littlstar/chromium.src,mohamed--ab...
crypto/PRESUBMIT.py
rejected_duplicate
Near-duplicate of sample 5945
true
[ { "role": "user", "content": "Write python code for the following: Add problem 36, palindrome binaries" }, { "role": "assistant", "content": "from time import time\n\n\ndef is_palindrome(s):\n for idx in range(len(s)/2):\n if s[idx] != s[-1*idx - 1]:\n return False\n retu...
python
new_file
4
4
mit
734967196c8f0577b218802c16d9eab31c9e9054
dimkarakostas/project-euler
problem_36.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add installation script for profiler." }, { "role": "assistant", "content": "# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use...
python
new_file
1
1
apache-2.0
50d05aabc2eb1d5bcb20d457dd05d2882b983afa
tensorflow/profiler,tensorflow/profiler,tensorflow/profiler,tensorflow/profiler,tensorflow/profiler
install_and_run.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add staff permissions for backup models" }, { "role": "assistant", "content": "from nodeconductor.core.permissions import StaffPermissionLogic\n\n\nPERMISSION_LOGICS = (\n ('backup.BackupSchedule', StaffPermissionLogic(any_pe...
python
new_file
1
0
mit
bca4a0a0dda95306fe126191166e733c7ccea3ee
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/backup/perms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to save ner data to a csv file" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport click\nimport os\nimport codecs\nimport json\nimport pandas as pd\n\n\n@click.command()\n@click.argument('input_dir', ...
python
new_file
1
11
apache-2.0
8ae3e44b0a43f382c98194b9caa097b62de899ef
WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln
nlpppln/save_ner_data.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Add two-point example to serve as a regression test for gridline/plot distinguishing" }, { "role": "assistant", "content": "\"\"\"\nDemonstrates plotting multiple linear features with a single ``ax.pole`` call.\n\nThe real purpos...
python
new_file
1
0
mit
2fda10a83aa5a4d3080a0ce8751e28a18fc9a3e0
joferkington/mplstereonet
examples/two_point.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add driver to find plate solutions" }, { "role": "assistant", "content": "import babeldix\n\nimport sys\nimport operator\n\n# Print solutions in order of increasing score\n\nfor plate in sys.argv[1:]:\n solns = babeldix.Plates...
python
new_file
2
0
mit
5ae58621bd766aeaa6f1838397b045039568887c
dkirkby/babeldix
platesolve.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some time handling functions" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom datetime import datetime, timedelta\n\ndef todayhelper():\n today = datetime.today()\n return datetime(day=today.day, y...
python
new_file
4
8
mit
8b92e55fa202723f7859cd1ea22e835e5c693807
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/kompomaatti/misc/awesometime.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for User admin_forms" }, { "role": "assistant", "content": "from django.core.exceptions import ValidationError\nfrom django.test import TestCase\n\nfrom .. import admin_forms\nfrom . factories import UserFactory\n\n\ncl...
python
new_file
1
1
bsd-2-clause
59de1a12d44245b69ade0d4703c98bf772681751
incuna/django-user-management,incuna/django-user-management
user_management/models/tests/test_admin_forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Qt4 file to start on creating a Qt-based GUI" }, { "role": "assistant", "content": "from lib.version import AMON_VERSION\nfrom lib.keybase import KeybaseUser\nfrom lib.gmail import GmailUser\nfrom lib.addresses import Address...
python
new_file
7
1
unlicense
e87982d03edeb7c16d3c183309adfff4be50d168
CodingAnarchy/Amon
gui/qt.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add testing for graphing code" }, { "role": "assistant", "content": "import os\n\nfrom click.testing import CliRunner\n\nfrom cli.script import cli\n\n\ndef get_graph_code():\n return '''\nfrom copy import deepcopy as dc\n\ncl...
python
new_file
1
1
mit
5d795253180ef11117ae27447fa597fa15b40734
LaurEars/codegrapher
tests/test_graph.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new file with mixin for mysql" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# (C) Copyright 2017 Inova Development Inc.\n# All Rights Reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"Licens...
python
new_file
1
4
mit
4c73cad398d5dac85b264187f709a860f356b311
KSchopmeyer/smipyping,KSchopmeyer/smipyping,KSchopmeyer/smipyping,KSchopmeyer/smipyping,KSchopmeyer/smipyping
smipyping/_mysqldbmixin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a low-level example for creating views." }, { "role": "assistant", "content": "\"\"\"\nA low level example:\nThis is how JenkinsAPI creates views\n\"\"\"\nimport requests\nimport json\n\nurl = 'http://localhost:8080/newView'\...
python
new_file
2
0
mit
0e53f398bf2cf885393865ec1f899308bb56625b
mistermocha/jenkinsapi,imsardine/jenkinsapi,mistermocha/jenkinsapi,JohnLZeller/jenkinsapi,JohnLZeller/jenkinsapi,aerickson/jenkinsapi,zaro0508/jenkinsapi,imsardine/jenkinsapi,zaro0508/jenkinsapi,jduan/jenkinsapi,domenkozar/jenkinsapi,mistermocha/jenkinsapi,jduan/jenkinsapi,salimfadhley/jenkinsapi,salimfadhley/jenkinsap...
examples/create_a_view_low_level.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement DispatchLoader (metapath import hook)" }, { "role": "assistant", "content": "from __future__ import print_function, absolute_import, unicode_literals, division\nfrom stackable.stack import Stack\nfrom stackable.utils im...
python
new_file
2
3
mit
bae50495106ce5c9cb39143a58e0e73a4e823d29
joushou/dispatch,joushou/dispatch
loader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test class to cover the RandomForestClassifier in Go" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom unittest import TestCase\n\nfrom sklearn.ensemble import RandomForestClassifier\n\nfrom tests.estimat...
python
new_file
1
1
bsd-3-clause
c57c672aae98fb5b280f70b68ac27fc2d94a243f
nok/sklearn-porter
tests/estimator/classifier/RandomForestClassifier/RandomForestClassifierGoTest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unittests for bridgedb.parse.versions module." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#_____________________________________________________________________________\n#\n# This file is part of BridgeDB,...
python
new_file
1
1
bsd-3-clause
ab99f855f708dec213c9eea1489643c01526e0b0
pagea/bridgedb,pagea/bridgedb
lib/bridgedb/test/test_parse_versions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test to make sure exception is raised\n\nNone of our code should be raising this exception, so it’s possible it\ncould stop working without us knowing about it.\n\nThis commit adds a tests to alert us if the override ever does silently...
python
new_file
1
1
mit
19b13f0fb9b86ec99025bd1baf2c4d5fe757f809
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
tests/test_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add in the db migration" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 8081a5906af\nRevises: 575d8824e34c\nCreate Date: 2015-08-25 18:04:56.738898\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\...
python
new_file
1
1
mit
f14c483283984b793f1209255e059d7b9deb414c
MaxPresman/cfapi,smalley/cfapi,smalley/cfapi,codeforamerica/cfapi,codeforamerica/cfapi,MaxPresman/cfapi,MaxPresman/cfapi,smalley/cfapi
migrations/versions/8081a5906af_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a little program that calls sync until is is done" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport subprocess\nimport sys\nfrom time import time\n\n\n\ndef eprint(*args, **kwargs):\n print(*args, fil...
python
new_file
1
3
unlicense
2a1b46740c4cf14f7db4f344431aced9bf06d1e7
paolobolzoni/useful-conf,paolobolzoni/useful-conf,paolobolzoni/useful-conf
scripts/sync_for_real.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [depot_tools][owners] Add owners client to depot_tools.\n\nAdd an owners API that will be used by Depot Tools to\ninteract with OWNERS files.\n\nThe API will be implemented using both owners.py and the\nGerrit Code-Owners plugin REST API. Al...
python
new_file
1
1
bsd-3-clause
91bb7506bd20ed22b8787e7a8b9975cc07e97175
CoherentLabs/depot_tools,CoherentLabs/depot_tools
owners_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix corrupt abstract field data" }, { "role": "assistant", "content": "\"\"\"Fix corrupt abstract field data\n\nRevision ID: 8b5ab7da2d5\nRevises: 52d970fb6a74\nCreate Date: 2016-10-04 17:21:19.186125\n\"\"\"\n\nimport sqlalchemy...
python
new_file
3
1
mit
a4bc16a375dc30e37034993bd07d3014f3b936e1
pferreir/indico,mic4ael/indico,ThiefMaster/indico,mvidalgarcia/indico,DirkHoffmann/indico,indico/indico,DirkHoffmann/indico,mvidalgarcia/indico,indico/indico,pferreir/indico,indico/indico,ThiefMaster/indico,OmeGak/indico,DirkHoffmann/indico,indico/indico,mic4ael/indico,mic4ael/indico,mic4ael/indico,ThiefMaster/indico,O...
migrations/versions/201610041721_8b5ab7da2d5_fix_corrupt_abstract_field_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for 118 pascals triangle" }, { "role": "assistant", "content": "class Solution(object):\n def generate(self, numRows):\n \"\"\"\n :type numRows: int\n :rtype: List[List[int]]\n \"\"\"\n...
python
new_file
2
5
mit
ef745ed086ebd8e77e158c89b577c77296630320
comicxmz001/LeetCode,comicxmz001/LeetCode
Python/118_Pascals_Triangle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add frameless drag region example." }, { "role": "assistant", "content": "import webview\n\n'''\nThis example demonstrates a user-provided \"drag region\" to move a frameless window\naround, whilst maintaining normal mouse down/m...
python
new_file
1
0
bsd-3-clause
a8b524318d7f9d4406193d610b2bb3ef8e56e147
r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
examples/frameless_drag_region.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an autonomous mode to strafe and shoot. Doesn't work" }, { "role": "assistant", "content": "\r\ntry:\r\n import wpilib\r\nexcept ImportError:\r\n from pyfrc import wpilib\r\n\r\nimport timed_shoot\r\n\r\nclass HotShootA...
python
new_file
1
14
bsd-3-clause
b72c421696b5714d256b7ac461833bc692ca5354
frc1418/2014
robot/robot/src/autonomous/hot_aim_shoot.py
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for smudge" }, { "role": "assistant", "content": "import unittest\n\nfrom dotbriefs.smudge import SmudgeTemplate\n\n\nclass TestCleanSecret(unittest.TestCase):\n\n def setUp(self):\n self.secrets = {}\n ...
python
new_file
1
1
bsd-3-clause
1be4e6f97b3d062c4fa07f70b05305bf32593fd4
oohlaf/dotsecrets
dotbriefs/tests/test_smudge.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to write base signatures" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport argparse\nimport subprocess\nimport os\nimport shutil\nimport sys\n\nfrom util import write_signature\n\nparser = argparse.A...
python
new_file
1
0
mit
254239102955bb8916aab98530251b5cdd79ce50
jdkato/codetype,jdkato/codetype
cypher/siggen.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for converting a solarized dark file to solarized dark high contrast" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\n\nif sys.version_info < (3, 4):\n sys.exit('ERROR: Requires Python 3.4...
python
new_file
1
9
mit
971570b4288c9ac7131a1756e17574acbe6d1b9a
bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile
python/misc/solarized-dark-high-contrast.py
accepted
null
true