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: Create Symbol, List, Boolean, Nil and Atom types." }, { "role": "assistant", "content": "class Symbol(str):\n pass\n\n\n# lists\nclass List(list):\n def __add__(self, rhs):\n return List(list.__add__(self, rhs))\n\n ...
python
new_file
1
3
mit
98f4a1c0fc1562d49d86b4b8f6763f2ce259280d
skk/eche
eche/eche_types.py
rejected_duplicate
Near-duplicate of sample 10469
true
[ { "role": "user", "content": "Write python code for the following: Add watchdog that monitors scripts editing" }, { "role": "assistant", "content": "import time\nfrom watchdog.observers import Observer\nfrom watchdog.events import PatternMatchingEventHandler\n\n\nclass ScriptModifiedHandler(Patt...
python
new_file
5
1
mit
ea8c2f9007c9356bf24f66119153c4e844e5483f
duboviy/misc
watcher.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a state for patch a person in wonderland." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# encoding=utf8\n\nimport requests\nfrom flexbe_core import EventState, Logger\n\n\"\"\"\nCreated on 17/05/2018\n\n@autho...
python
new_file
1
18
bsd-3-clause
6f28fc31a9734cc36f3e41759ce20852beb890f8
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
sara_flexbe_states/src/sara_flexbe_states/WonderlandPatchPerson.py
rejected_complexity
Cyclomatic complexity too high: 18
true
[ { "role": "user", "content": "Write python code for the following: Add Ansible callback plugin to profile tasks\n\nIn order to try and speed up provisioning, this changeset adds a plugin\nthat gives you the per task duration breakdown of a playbook. From here,\nwe can identify the outliers and spend a littl...
python
new_file
1
3
apache-2.0
521888f703466375ac36fab8c53ddf0c242d73e8
lliss/model-my-watershed,mmcfarland/model-my-watershed,lewfish/model-my-watershed,mmcfarland/model-my-watershed,lliss/model-my-watershed,lliss/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,lliss/model-my-watershed,project-icp/bee-...
deployment/ansible/callback_plugins/profile_tasks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example script for image pyramids" }, { "role": "assistant", "content": "\"\"\"\n====================\nBuild image pyramids\n====================\n\nThis example shows how to build image pyramids.\n\"\"\"\n\nimport numpy as n...
python
new_file
3
0
bsd-3-clause
e6675dcda6721acb6ad70adc68f1e33ce8190fc4
SamHames/scikit-image,oew1v07/scikit-image,vighneshbirodkar/scikit-image,robintw/scikit-image,paalge/scikit-image,pratapvardhan/scikit-image,emon10005/scikit-image,bsipocz/scikit-image,chintak/scikit-image,jwiggins/scikit-image,ofgulban/scikit-image,paalge/scikit-image,ClinicalGraphics/scikit-image,Midafi/scikit-image,...
doc/examples/plot_pyramid.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an importer for Bromsgrove.\n\nrefs #24" }, { "role": "assistant", "content": "\"\"\"\nImport Bromsgrove\n\"\"\"\nimport sys\n\nfrom data_collection.management.commands import BaseShpShpImporter\n\nclass Command(BaseShpShpImp...
python
new_file
3
1
bsd-3-clause
96777c29a8b9d27da8bc6098ee7cfc2ce9bf368f
andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_bromsgrove.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration that sets `submitted_at` for old brief responses\n\nFor any brief response that does not have a `submitted_at` time,\nwe add one based on the `created_at` time. As we will now be looking\nat `submitted_at` rather than `created_...
python
new_file
4
1
mit
42415eb9bab1d4e5ac5b4c5bafe5234d0a617367
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/770_set_submitted_at_for_old_brief_responses.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Implement a basic kivy application" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\n{{cookiecutter.repo_name}}\n============================\n\nThe root of :class:`{{cookiecutter.app_class_name}}` is crea...
python
new_file
null
null
mit
2a198df61a420e97b746d1a27a0f622be56e386c
hackebrot/cookiedozer,hackebrot/cookiedozer
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add script to download property data from Wikidata." }, { "role": "assistant", "content": "# coding=utf-8\nimport urllib, urllib2\nimport json\n\ndef fetch_wikidata_data():\n\tWIKIDATA_API_URL = 'https://www.wikidata.org/w/api.ph...
python
new_file
1
5
apache-2.0
aa554e0a67d69518da5cec8d97799497e3d996c4
jankohoener/asknow-UI,jankohoener/asknow-UI,jankohoener/asknow-UI
fetchwikidatadata.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for constants and magic numbers\n\nThis is the file where things like default timeouts, statuses to write\nin a database and others will be stored.\nThe code is more readable and importable from any other file." }, { "role":...
python
new_file
1
0
mit
a979ae85c16fd9f6e9e3c1f4ad8fa0261d212b88
Zloool/manyfaced-honeypot
status.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement libray to use API" }, { "role": "assistant", "content": "from django.db import connection\nimport requests\n\n\ndef get(http_url, user_id):\n headers = {\n 'Authorization': __auth_token(user_id)\n }\n r ...
python
new_file
1
1
apache-2.0
efdb5b328ccf2597ab05ff2c225c36793199ec50
deka108/meas_deka,deka108/mathqa-server,deka108/meas_deka,deka108/mathqa-server,deka108/meas_deka,deka108/meas_deka,deka108/mathqa-server,deka108/mathqa-server
webapp/request_api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add language relation to existing pages" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef add_language_relation(apps, schema_edito...
python
new_file
1
4
bsd-2-clause
11f92aaee9c8f9f902ddc56203dfa2e7af94ea63
praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme,praekelt/molo-tuneme
tuneme/migrations/0002_add_language_relation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to check dataset integrity" }, { "role": "assistant", "content": "import os\n\nfrom collections import defaultdict\n\nimport click\n\nimport dtoolcore\n\n\n@click.command()\n@click.argument('dataset_path')\ndef main(da...
python
new_file
3
4
mit
7bf86f0ef0572e86370726ff25479d051b3fbd3e
JIC-Image-Analysis/senescence-in-field,JIC-Image-Analysis/senescence-in-field,JIC-Image-Analysis/senescence-in-field
scripts/check_dataset_integrity.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to clean up nodes that were templated from registrations\n\n[OSF-7956]" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport sys\nimport logging\nfrom website.app import setup_django, init_app\nfrom sc...
python
new_file
1
2
apache-2.0
53ac7ef266899651fa9b73b402baa35cf920a31d
TomBaxter/osf.io,caneruguz/osf.io,binoculars/osf.io,chennan47/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,aaxelb/osf.io,cslzchen/osf.io,aaxelb/osf.io,saradbowman/osf.io,caseyrollins/osf.io,mfraezz/osf.io,pattisdr/osf.io,felliott/osf.io,chrisseto/osf.io,leb2dg/osf.io,mattclark/osf.io,TomBaxter/osf.io,cslzchen/osf...
scripts/fix_nodes_templated_from_registration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to lintcode question 105" }, { "role": "assistant", "content": "# Definition for singly-linked list with a random pointer.\n# class RandomListNode:\n# def __init__(self, x):\n# self.label = x\n# s...
python
new_file
3
6
mit
d3a4153edcc25b358cfe3b0f0b315cbf064266bd
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
lintcode/Medium/105_Copy_List_with_Random_Pointer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic test of Topos.beneath()" }, { "role": "assistant", "content": "from skyfield.api import load\nfrom skyfield.positionlib import Geocentric\nfrom skyfield.toposlib import Topos\n\ndef ts():\n yield load.timescale()\n\n...
python
new_file
1
1
mit
7435cf43180e32fe0b17f3ca839c030d09ab09d5
skyfielders/python-skyfield,skyfielders/python-skyfield
skyfield/tests/test_topos.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for anpnymize methods" }, { "role": "assistant", "content": "from ..anonymize import obfuscate_address, obfuscate_email, obfuscate_string\n\n\ndef test_obfuscate_email():\n # given\n email = \"<EMAIL>\"\n\n # w...
python
new_file
1
1
bsd-3-clause
79aa5fb22c71590f367ee4b0e8906df2a8693c27
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/core/tests/test_anonymize.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for many to many aggregates" }, { "role": "assistant", "content": "import sqlalchemy as sa\nfrom sqlalchemy_utils.aggregates import aggregated\nfrom tests import TestCase\n\n\nclass TestAggregatesWithManyToManyRelations...
python
new_file
1
1
bsd-3-clause
9e067b8f53c8ee8afae63996e725614e5766059f
JackWink/sqlalchemy-utils,rmoorman/sqlalchemy-utils,marrybird/sqlalchemy-utils,konstantinoskostis/sqlalchemy-utils,cheungpat/sqlalchemy-utils,joshfriend/sqlalchemy-utils,tonyseek/sqlalchemy-utils,tonyseek/sqlalchemy-utils,joshfriend/sqlalchemy-utils,spoqa/sqlalchemy-utils
tests/aggregate/test_many_to_many_relationships.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for session choices" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n...
python
new_file
1
0
mit
fae8889ae24ab5dcb8ea28af1664fb5a54fdbdfb
ChillarAnand/junction,farhaanbukhsh/junction,nava45/junction,pythonindia/junction,ChillarAnand/junction,nava45/junction,ChillarAnand/junction,pythonindia/junction,pythonindia/junction,farhaanbukhsh/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,nava45/junction,farhaanbukhsh/junction,nava45/j...
junction/schedule/migrations/0004_auto_20150917_2017.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some shortcuts for Google, Facebook, Instagram" }, { "role": "assistant", "content": "from requests_oauth2 import OAuth2\n\n\nclass GoogleClient(OAuth2):\n site = \"https://accounts.google.com\"\n authorization_url = \"...
python
new_file
1
0
bsd-3-clause
a388af55a88602318159b8a52150a6a49e1be6f7
maraujop/requests-oauth2
requests_oauth2/services.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for FB Melbourne 2018 Hackahton Pre-eliminary Challenge" }, { "role": "assistant", "content": "def triangleOrNot(a, b, c):\n n = len(a)\n result = []\n for i in range(n):\n side_a = a[i]\n side...
python
new_file
1
6
mit
0816398dae4fd7f35a4eba3b4a6545798703ca44
martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox,martindavid/code-sandbox
hacker-rank/fb-hack-2018/degenerate_triangle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test health check URL response" }, { "role": "assistant", "content": "from tests.BaseTestWithDB import BaseTestWithDB\nfrom django.urls import reverse\n\n\nclass HealthCheckURLTest(BaseTestWithDB):\n\n def __init__(self, *args...
python
new_file
3
1
mit
02568861b778728f53fbec3a2d06875add0861de
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
csunplugged/tests/general/urls/test_health_check.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate random Levenshtein queries from a set of strings" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nScript to extract and then generate random queries for fuzzy searching.\n\nUsage:\n ...
python
new_file
1
0
mit
06d6f989abacb048e54585847dec37cb55064685
xhochy/libfuzzymatch,xhochy/libfuzzymatch
benchmark/datasets/musicbrainz/extract-random-queries.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a push notification module to handle mobile client notifications\n\n(imported from commit 3061a6e2d845226d3dce5bb262deb3a896e54f07)" }, { "role": "assistant", "content": "from __future__ import absolute_import\n\nfrom zerver....
python
new_file
4
6
apache-2.0
7961d4f6b37c8cb40d46793b8016706340779825
deer-hope/zulip,susansls/zulip,ashwinirudrappa/zulip,wangdeshui/zulip,zachallaun/zulip,johnny9/zulip,bluesea/zulip,paxapy/zulip,vikas-parashar/zulip,deer-hope/zulip,nicholasbs/zulip,saitodisse/zulip,jeffcao/zulip,dawran6/zulip,zorojean/zulip,wdaher/zulip,Cheppers/zulip,jimmy54/zulip,sharmaeklavya2/zulip,krtkmj/zulip,Ph...
zerver/lib/push_notifications.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add default permissions for existing services." }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0028_add_default_permissions\nRevises: 0027_add_service_permission\nCreate Date: 2016-02-26 10:33:20.536362...
python
new_file
4
2
mit
fa77d7d83ed9150670ac374f1494b38f2338217a
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0028_add_default_permissions.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for expected links on main site homepage" }, { "role": "assistant", "content": "from web_test_base import *\n\nclass TestIATIStandard(WebTestBase):\n requests_to_load = {\n 'IATI Standard Homepage - no w...
python
new_file
4
1
mit
8c84bbc10a08c783fed22209402ead4672754f57
IATI/IATI-Website-Tests
tests/test_iati_standard.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the mandrill execution module" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\nTests for the Mandrill execution module.\n'''\n\n# Import Python Libs\nfrom __future__ import absolute_import\n\n# I...
python
new_file
1
2
apache-2.0
777d01e82a63a2480d8ae2f53096d4a4c338409a
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/modules/test_mandrill.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to obtain the clients IP address via check.tpo" }, { "role": "assistant", "content": "# -*- encoding: utf-8 -*-\n#\n# :authors: Arturo Filastò\n# :licence: see LICENSE\n\nfrom ooni.templates import httpt\nclass MyIP(http...
python
new_file
2
2
bsd-2-clause
26213446116ffef0ee8d528a1a58aab918b16aa7
lordappsec/ooni-probe,0xPoly/ooni-probe,kdmurray91/ooni-probe,hackerberry/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-probe,0xPoly/ooni-probe,hackerberry/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,lord...
nettests/myip.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for calling rpc from command line" }, { "role": "assistant", "content": "# -*- coding: utf8 -*-\n\n# Low-resource message queue framework\n# Do RPC\n# Copyright (c) 2016 Roman Kharin <<EMAIL>>\n\n# Permission is hereby g...
python
new_file
1
2
mit
6149a527c34b29713028ad0be4dcbe39f5ee0457
RomanKharin/lrmq
test/test_rpc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for _parse_author_info." }, { "role": "assistant", "content": "import pytest\n\nfrom pymt.framework.bmi_setup import _parse_author_info\n\n\n@pytest.mark.parametrize(\"key\", (\"author\", \"authors\"))\ndef test_au...
python
new_file
1
1
mit
2b02519f521f9e3cf177ed9970e9958a0eeb43c3
csdms/coupling,csdms/pymt,csdms/coupling
tests/framework/test_setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create new node manager: LedgerManager" }, { "role": "assistant", "content": "# stdlib\nfrom typing import Any\nfrom typing import List\n\n# third party\nfrom sqlalchemy.engine import Engine\nfrom sqlalchemy.orm import sessionmak...
python
new_file
5
2
apache-2.0
9cfff243c95490ea09a9ac1eeec47d7089d40d59
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
packages/syft/src/syft/core/node/common/node_manager/ledger_manager.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: DOC: Add viewer example for RGB line profile" }, { "role": "assistant", "content": "from skimage import data\nfrom skimage.viewer import ImageViewer\nfrom skimage.viewer.plugins.lineprofile import LineProfile\n\n\nimage = data.ch...
python
new_file
1
0
bsd-3-clause
2b5930ad60c091bef5bb92683b73542b89ab5845
vighneshbirodkar/scikit-image,michaelpacer/scikit-image,vighneshbirodkar/scikit-image,jwiggins/scikit-image,SamHames/scikit-image,michaelaye/scikit-image,robintw/scikit-image,paalge/scikit-image,pratapvardhan/scikit-image,bsipocz/scikit-image,juliusbierk/scikit-image,ofgulban/scikit-image,warmspringwinds/scikit-image,c...
viewer_examples/plugins/lineprofile_rgb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for PowerFreqMeasurement and increase\n\ncoverage" }, { "role": "assistant", "content": "'''\nCreated on Jul 16, 2014\n\n@author: thomas\n'''\nimport unittest\n\nclass TestPowerFrequency (unittest.TestCase):\n\n\n ...
python
new_file
1
2
mit
21d9df797f04cfc2aad4e79d5845486414cffb63
brianthomas/astroplpython,brianthomas/astroplpython
tests/astroplpython/data/test_PowerFreqMeasurement.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to lintcode question 87" }, { "role": "assistant", "content": "\"\"\"\nDefinition of TreeNode:\nclass TreeNode:\n def __init__(self, val):\n self.val = val\n self.left, self.right = None, None\n\"\"\...
python
new_file
1
18
mit
377526392b3f4a01c3f307c3d30af9f3368ebc47
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
lintcode/Hard/087_Remove_Node_in_Binary_Search_Tree.py
rejected_complexity
Cyclomatic complexity too high: 18
true
[ { "role": "user", "content": "Write python code for the following: Introduce new quilt cli Command class\n\nAll cli commands should derive from this new class to simplyfy the\nregistration of new commands. The registration is done in the Command\nclass via a Meta class automatically." }, { "role": "...
python
new_file
2
2
mit
fe5a5e4a601a332a2067b8cfe080c6e5cea25dae
bjoernricks/python-quilt,vadmium/python-quilt
quilt/cli/meta.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some initial tests for pack configs API endpoints." }, { "role": "assistant", "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed ...
python
new_file
1
1
apache-2.0
4a1c0ab4e1425b1bfe2ff2843f6ae1ce242997e9
nzlosh/st2,peak6/st2,Plexxi/st2,pixelrebel/st2,StackStorm/st2,emedvedev/st2,pixelrebel/st2,lakshmi-kannan/st2,lakshmi-kannan/st2,punalpatel/st2,lakshmi-kannan/st2,nzlosh/st2,pixelrebel/st2,StackStorm/st2,nzlosh/st2,emedvedev/st2,Plexxi/st2,emedvedev/st2,tonybaloney/st2,StackStorm/st2,StackStorm/st2,punalpatel/st2,tonyb...
st2api/tests/unit/controllers/v1/test_pack_configs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test case for notification messages." }, { "role": "assistant", "content": "from . import TheInternetTestCase\nfrom helium.api import Text, click\n\nclass NotificationMessagesTest(TheInternetTestCase):\n\tdef get_page(self):\...
python
new_file
1
3
mit
3d86c45c74f71dfcc3aede082ba966f677beb934
bugfree-software/the-internet-solution-python
tests/test_notification_messages.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for m3_ice + callback\n\nUsage:\n$ m3_ice snoop -c snsv7_par_csv_callback.py" }, { "role": "assistant", "content": "import csv\nfrom datetime import datetime\nimport sys\n\nlogfile = open('mbus_snoop_log.txt','w')\n\n...
python
new_file
2
9
apache-2.0
6de47a88a1c8a1a17e92958683bf7d6240b4dc0f
lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator,lab11/M-ulator
platforms/m3/programming/snsv7_par_csv_callback.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test data generator script" }, { "role": "assistant", "content": "#! /usr/bin/env python\n\nimport time\nfrom redis import StrictRedis\nfrom flask_sse import Message\nimport json\n\ncount = 0\nredis=StrictRedis.from_url(\"red...
python
new_file
2
0
apache-2.0
c120dccb5ca78b7601a1606fef1b25f1b18b3f8c
xgds/xgds_core,xgds/xgds_core,xgds/xgds_core
xgds_core/sse-test/test-data-gen.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update the field to eventbrite_organizer_id" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migra...
python
new_file
3
0
mit
0d64439bf587bad91d4ec622ef936c1d1fa19352
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/migrations/0054_update_eventbrite_organizer_id_field.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Increase max length of url field." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10 on 2016-09-01 11:22\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models...
python
new_file
1
0
mit
7bda769dc62c7621a7606c5de060852b33cd7595
tom-henderson/bookmarks,tom-henderson/bookmarks,tom-henderson/bookmarks
bookmarks/core/migrations/0004_auto_20160901_2322.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for memoization in N-dimensional pooling kernel generator." }, { "role": "assistant", "content": "import unittest\n\nimport mock\n\nimport chainer\nfrom chainer import testing\nfrom chainer.testing import attr\nfrom chai...
python
new_file
1
1
mit
3d6324080e112857e2cc8fab6a9c0c168ec0ab1f
hvy/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,wkentaro/chainer,rezoo/chainer,jnishi/chainer,kashif/chainer,jnishi/chainer,ronekko/chainer,okuta/chainer,chainer/chainer,wkentaro/chainer,ktnyt/chainer,okuta/chainer,niboshi/chainer,chainer/chainer,cupy/cupy,jnishi/chainer,niboshi/chainer,okuta/chainer,nibosh...
tests/chainer_tests/functions_tests/pooling_tests/test_pooling_nd_kernel.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to allow sermon_preacher to be blank" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migration...
python
new_file
1
0
bsd-2-clause
337e66b111f012f5faac8abc60256e1cf7513847
philipsouthwell/mezzanine-sermons,philipsouthwell/mezzanine-sermons
mezzanine_sermons/migrations/0002_auto_20150606_1059.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: migration: Add migration to remove default status of private streams.\n\nThis commit adds migration which removes default status of exisitng\ndefault private streams, i.e. private stream exists but they are no\nlonger default." }, { ...
python
new_file
1
1
apache-2.0
7106069d4dc6dd9a55634da419d4c270c43f0849
eeshangarg/zulip,andersk/zulip,showell/zulip,rht/zulip,rht/zulip,zulip/zulip,hackerkid/zulip,showell/zulip,hackerkid/zulip,andersk/zulip,zulip/zulip,zulip/zulip,eeshangarg/zulip,andersk/zulip,zulip/zulip,kou/zulip,andersk/zulip,rht/zulip,rht/zulip,rht/zulip,eeshangarg/zulip,punchagan/zulip,showell/zulip,zulip/zulip,pun...
zerver/migrations/0304_remove_default_status_of_default_private_streams.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sketch for tree-diff test." }, { "role": "assistant", "content": "\n\ndef p2c_to_c2p(p2c):\n c2p = {}\n nodes_needing_parents = list(p2c)\n for parent, children in p2c.items():\n if not children:\n ...
python
new_file
7
4
mit
7b7ae3bd3ea80af90238edbcec8e6377b30b9d35
josiah-wolf-oberholtzer/supriya,Pulgama/supriya,Pulgama/supriya,Pulgama/supriya,Pulgama/supriya
supriya/tools/nonrealtimetools/test/test_diff.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add a command to send mail" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom django.contrib.auth.models import User\nfrom optparse import make_option\nimport datetime\n\nclass Comman...
python
new_file
4
7
mit
f3a22d8f615710d7f62704dd9769542bad96fecb
bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur,bruceyou/NewsBlur
apps/profile/management/commands/send_notification.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add package-level import for SNGP.\n\nPiperOrigin-RevId: 322276743" }, { "role": "assistant", "content": "# coding=utf-8\n# Copyright 2020 The Edward2 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"...
python
new_file
3
0
apache-2.0
a1deee1f63aa2271bc40731dfceb7e7852a9c38a
google/edward2
experimental/sngp/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to show what python modules are installed" }, { "role": "assistant", "content": "# from http://stackoverflow.com/a/23885252\n\nimport pip\ninstalled_packages = pip.get_installed_distributions()\ninstalled_packages_list...
python
new_file
2
0
mit
22a318b760d8332be8526fb755d2cf1f154874fc
claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code
programming/python/installed_packages.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a snippet (Python GTK+3)." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)\n\n\"\"\"\nThis is the simplest Python GTK+3 Paned ...
python
new_file
1
1
mit
2e6d9f5c0d55e6fa8740679e643c2df14ac82134
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
python/pygtk/python_gtk3_pygobject/container_paned.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add (python) basic model itself" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport tensorflow as tf\n\nx = tf.placeholder(\"double\") \ny = tf.placeholder(\"double\")\nz = tf.mul(x, y)\n\nwith tf.Session() a...
python
new_file
1
0
mit
870de29a70255027a97053e089149cc98150c021
vjuranek/tensorflow-snippets,vjuranek/tensorflow-snippets
basic-model-import/src/main/python/basic-model.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple test script that invokes the pipeline\n\nSo that we can make sure that all the pieces work together.\nModelled on the existing testPipeline code.\nThanks to Gautham (@gaukes)" }, { "role": "assistant", "content": "im...
python
new_file
12
2
bsd-3-clause
60b01109b2504e990b30a70f6cba25dd9d440626
sunil07t/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-missio...
CFC_DataCollector/tests/recommenderTests/TestNewPipeline.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Write python code for the following: Add simple test that api functions are importable" }, { "role": "assistant", "content": "import unittest\nimport random\nimport importlib\n\nclass TestUnit(unittest.TestCase):\n def test_api_imports(self):\n expected_na...
python
new_file
3
2
mit
5d8541f247275e781d6740caa5f24e5b5395dfc9
ForeverWintr/metafunctions
metafunctions/tests/test_imports.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a unittest for spacegroup. Still very basic.\n\n\nFormer-commit-id: 515d29a50e2b0abf9889329545a6218ec8dbb707 [formerly ad5f851b7959f7bf09d7cd669d8db126fa962982]\nFormer-commit-id: 51cd323da532e54c94f8d427ed631c11c9ecfae5" }, { "r...
python
new_file
3
5
mit
ad5f851b7959f7bf09d7cd669d8db126fa962982
migueldiascosta/pymatgen,yanikou19/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,sonium0/pymatgen,Dioptas/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,Bismarrck/pymatgen,ctoher/pymatgen,mig...
pymatgen/symmetry/tests/test_spacegroup.py
rejected_duplicate
Near-duplicate of sample 6001
true
[ { "role": "user", "content": "Write python code for the following: Add letter organisation for Companies House\n\nDepends on:\n- [ ] https://github.com/alphagov/notifications-template-preview/pull/37" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0114_another_letter_o...
python
new_file
1
1
mit
fdcb0da2188e22341170d939a1d92b70189ff8df
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0114_another_letter_org.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement basic tests for GCI student form uploads." }, { "role": "assistant", "content": "# Copyright 2012 the Melange authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file...
python
new_file
3
1
apache-2.0
7319b0efbe0bb5515d1a244db4dadebab9a4e3ec
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
tests/app/soc/modules/gci/views/test_student_forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the share button" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom selenium_tests.UserDriverTest import UserDriverTest\nfrom selenium.webdriver.common.by import By\nfrom selenium.webdriver.common....
python
new_file
1
1
bsd-3-clause
8d34420d595e7b58220004ecf521cc8cfbc224f1
simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote
selenium_tests/test_share_application.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missed call service audio notification to active subscriptions" }, { "role": "assistant", "content": "from django.core.exceptions import ObjectDoesNotExist\nfrom django.core.management.base import BaseCommand, CommandError\n\...
python
new_file
3
7
bsd-3-clause
0d36640d47c30d8b9cd2b2eff1c8ccf1e97c13c5
praekelt/seed-staged-based-messaging,praekelt/seed-stage-based-messaging,praekelt/seed-stage-based-messaging
subscriptions/management/commands/add_missed_call_service_audio_notification_to_active_subscriptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix amount matching in wrong currency" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.15 on 2019-11-08 09:08\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\...
python
new_file
1
3
bsd-3-clause
0869c28f6f8cd5a6ddd636a4850d1609a60f90a7
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/funding/migrations/0044_auto_20191108_1008.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create function in python to transpose matrix" }, { "role": "assistant", "content": "def transpose_matrix(matrix):\n matrix_rows_quantity = len(matrix)\n matrix_column_quantity = len(matrix[0])\n\n transposed_matrix = [[...
python
new_file
1
4
cc0-1.0
2e766d9b7010cb8d3fefaf785102e869e69b4a95
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
math/transpose_of_matrix/python/transpose_of_matrix.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom datetime import datetime\nfrom django.core.management import BaseCommand, CommandError\nfrom corehq.apps.importer.tasks import do_import\nfrom corehq.apps.importer.util import ImporterConfig, ExcelFile\nfrom corehq.apps.us...
python
edit
3
4
bsd-3-clause
2c3281754bd0e57a263a85f518eb49fbe6a8d72b
dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/apps/importer/management/commands/import_cases.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to count label set statistics\n\nAdded a script that outputs statistics about label sets in the data." }, { "role": "assistant", "content": "\"\"\"Count labelsets that occur in the multilabel data.\n\nInput: name of th...
python
new_file
8
0
apache-2.0
999262374abb57dcb9d5b48db155f180f95015b0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
count_labelsets.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add mgmt cmd to clear bad location user data" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom corehq.apps.es import UserES\nfrom corehq.apps.users.models import CommCareUser\nfrom c...
python
new_file
1
4
bsd-3-clause
b2d7740cf1e328342b76f744f17e91029ee33061
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/apps/users/management/commands/clear_bad_user_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add notification email reply_to script" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0130_service_email_reply_to_row\nRevises: 0129_add_email_auth_permission\nCreate Date: 2017-08-29 14:09:41.042061\n...
python
new_file
1
1
mit
8a4c8802ef8744b6e691e69adf256008adaddcea
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0130_service_email_reply_to_row.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add SurveyKoboProject which optionally indicates a form/submission origin" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ncl...
python
new_file
1
0
mit
926fc398b24170d418e0836b8ea23320dc7ff193
Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela,Code4SA/umibukela
umibukela/migrations/0012_surveykoboproject.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for lib.environment" }, { "role": "assistant", "content": "# Run the following command to test:\n#\n# (in /usr/local/googkit)\n# $ python -m {test_module_name}\n#\n# See also: http://docs.python.org/3.3/library...
python
new_file
3
1
mit
2a61cdcad1de2d4b080a91e7eaca714a3e2ec68b
googkit/googkit,googkit/googkit,googkit/googkit
test/lib/environment_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python LinePlot Charts Test\n\nLargely a clone of the Cxx version save that the data arrays must\nbe manipulated directly since the vtkVariant based methods on vtkTable\naren't available to Python." }, { "role": "assistant", ...
python
new_file
3
2
bsd-3-clause
711aab80991f236232d3d1247f694d16e8ac0c4d
ashray/VTK-EVM,berendkleinhaneveld/VTK,demarle/VTK,cjh1/VTK,collects/VTK,keithroe/vtkoptix,mspark93/VTK,gram526/VTK,SimVascular/VTK,spthaolt/VTK,msmolens/VTK,spthaolt/VTK,johnkit/vtk-dev,jeffbaumes/jeffbaumes-vtk,arnaudgelas/VTK,sumedhasingla/VTK,mspark93/VTK,ashray/VTK-EVM,biddisco/VTK,naucoin/VTKSlicerWidgets,jmerkow...
Charts/Testing/Python/TestLinePlot.py
rejected_duplicate
Near-duplicate of sample 9051
true
[ { "role": "user", "content": "Write python code for the following: Add test script for verifying counts." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport sys\nimport logging\nfrom website.app import setup_django, init_app\nfrom scripts import utils as script_utils\nfrom dja...
python
new_file
3
3
apache-2.0
bed2210dd4e705b8574f2d1974f43b3a139a6477
felliott/osf.io,aaxelb/osf.io,mfraezz/osf.io,HalcyonChimera/osf.io,erinspace/osf.io,binoculars/osf.io,felliott/osf.io,saradbowman/osf.io,felliott/osf.io,pattisdr/osf.io,Johnetordoff/osf.io,HalcyonChimera/osf.io,erinspace/osf.io,mattclark/osf.io,mfraezz/osf.io,mfraezz/osf.io,baylee-d/osf.io,adlius/osf.io,pattisdr/osf.io...
scripts/remove_after_use/verify_node_wiki_page_counts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for tests of setting invalid nonterminal as start symbol" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 10.08.2017 23:20\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"...
python
new_file
4
0
mit
465aec2bf42d285b1707e0dbd8913856e6859e9d
PatrikValkovic/grammpy
tests/startsymbol_tests/NonterminalNotInGrammarTest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test for basic builtin types." }, { "role": "assistant", "content": "# basic types\n\nprint(bool)\nprint(int)\nprint(float)\nprint(complex)\nprint(tuple)\nprint(list)\nprint(set)\nprint(dict)\n\nprint(type(bool()) == bool)\np...
python
new_file
1
0
mit
11f1e4b8f12759e0492626e8d75c79c760d6ffcb
alex-robbins/micropython,supergis/micropython,stonegithubs/micropython,blmorris/micropython,Peetz0r/micropython-esp32,ganshun666/micropython,emfcamp/micropython,slzatz/micropython,blazewicz/micropython,jmarcelino/pycom-micropython,noahchense/micropython,vriera/micropython,blmorris/micropython,ahotam/micropython,dhyland...
tests/basics/tests/types1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add template script for supporting OpenStreetMap" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\n\tsphinxcontrib.openstreetmap\n\t===========================\n\n\tEmbed OpenStreetMap on your documentation....
python
new_file
5
1
bsd-2-clause
adefe5d762da042cfa6589d6cfcbc337f98921da
kenhys/sphinxcontrib-openstreetmap,kenhys/sphinxcontrib-openstreetmap
sphinxcontrib/openstreetmap.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add test for cis-splice-effects main" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n'''\ntest_cis_splice_effects_main.py -- Integration test for `regtools cis-splice-effects`\n\n Copyright (c) 2015, The Griffi...
python
new_file
1
1
mit
def7caf595c4d995673f2fb8b997fc4f6b563d09
griffithlab/regtools,griffithlab/regtools,griffithlab/regtools,griffithlab/regtools,griffithlab/regtools,gatoravi/regtools,gatoravi/regtools,griffithlab/regtools,gatoravi/regtools,gatoravi/regtools,gatoravi/regtools
tests/integration-test/test_cis_splice_effects_main.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a migration to replace notifications_template foreign key\n\nRemoves notifications.template_id foreign key and replaces it with\na composite foreign key constraint to TemplateHistory using the\nexisting notification columns for template ...
python
new_file
1
1
mit
9d4b8961cb1129cf02dffdbe987babe0942a4f9b
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0136_notification_template_hist.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update DB migrations following upstream change in ICEkit\n\nThe `WorkflowStateMixin` model in django-icekit --\nwhich is used as a basis for the `PressReleaseListing`\nmodel -- was updated with two new fields: `brief`,\nand `admin_notes`.\n\...
python
new_file
1
0
mit
76607bfd2b909eb004a897d9b4c78c93690e0f32
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-press-releases,ic-labs/django-icekit,ic-labs/icekit-press-releases,ic-labs/django-icekit
press_releases/migrations/0009_auto_20170519_1308.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration (validators on Route.url)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport conman.routes.validators\...
python
new_file
1
0
bsd-2-clause
2d1e8de13ce20c9e05e9e584d045431406af31c0
Ian-Foote/django-conman,meshy/django-conman,meshy/django-conman
conman/routes/migrations/0003_add_validators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the base endpoint HTTP methods\n\nThis tests the `try: ... except: raise finally: ...` gotcha caught\nby @pocin." }, { "role": "assistant", "content": "import unittest\n\nfrom requests import HTTPError\n\nfrom kbcst...
python
new_file
1
1
mit
5e75bf7b71c57ebc617dc0f073c2ed14585944be
Ogaday/sapi-python-client,Ogaday/sapi-python-client
tests/test_base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add post_save signal for annotations to add correct object level permissions" }, { "role": "assistant", "content": "from django.dispatch import receiver\nfrom django.db.models.signals import post_save\nfrom guardian.shortcuts imp...
python
new_file
1
5
apache-2.0
22171f517cfa72ed69fa1c321c6c647108de3a6d
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
app/grandchallenge/retina_core/signals.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for translation cleanup" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):...
python
new_file
1
0
bsd-3-clause
c76a24e25609fba8bdff5babc0319be6f8ea145c
f3r3nc/connect,nlhkabu/connect,f3r3nc/connect,f3r3nc/connect,nlhkabu/connect,nlhkabu/connect,nlhkabu/connect,f3r3nc/connect
connect_config/migrations/0003_auto_20141207_1231.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to create echonest user" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef add_echonest_forward(apps, schema_...
python
new_file
3
1
bsd-3-clause
4d0295eb55e92a8885b4e48749f6db019e2fb5a3
FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja
django/users/migrations/0002_auto_20140922_0843.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to exercise 4.4." }, { "role": "assistant", "content": "# 4-5. Summing a Million\n\nnumbers = list(range(1, 1000001))\nprint(\"min = \", min(numbers))\nprint(\"max = \", max(numbers))\nprint(\"sum = \", sum(numbers))...
python
new_file
1
0
mit
7fdce241ba818755f6822e44f66bf503cbea3a77
HenrikSamuelsson/python-crash-course
exercises/chapter_04/exercise_04_04/exercise_04_04.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove old files and empty directories" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport os\n\nimport time\n\nimport sys\n\n\ndef delete(path):\n print(path)\n try:\n os....
python
new_file
1
6
mit
48dd9e5de783297a99278a347f20914a4e4053a8
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
efs_cache_cleaner/cache_cleaner.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an index to speed up update_status\n\nThis adds an index that speeds up the update_status method in\ndesignate-central\n\nChange-Id: I62600ebbf066dc746a696263f0e72ca373076353\nCloses-Bug: 1445115" }, { "role": "assistant", "c...
python
new_file
1
4
apache-2.0
eaa5bad75434ac050f438dff730936164106bfa9
cneill/designate-testing,ramsateesh/designate,grahamhayes/designate,cneill/designate,grahamhayes/designate,tonyli71/designate,cneill/designate,kiall/designate-py3,ionrock/designate,ionrock/designate,ionrock/designate,muraliselva10/designate,ramsateesh/designate,grahamhayes/designate,kiall/designate-py3,openstack/design...
designate/storage/impl_sqlalchemy/migrate_repo/versions/066_add_update_status_index.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to load a Keras model from MongoDB where it was stored by Sacred." }, { "role": "assistant", "content": "\"\"\"\nA simple Python API for loading Keras models from MongoDB run artifact stored\nby the Sacred library.\n...
python
new_file
1
3
mit
3cedd52bb022dac3083c7de1245fd49882f39f41
bzamecnik/sanctuary
examples/sacred/mnist/model_from_mongo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add compact watershed gallery example" }, { "role": "assistant", "content": "\"\"\"\n=============================================\nFind Regular Segments Using Compact Watershed\n=============================================\n\nT...
python
new_file
1
0
bsd-3-clause
4816a7e7c24474e37d9dfe4ecde8079c92eb66e1
rjeli/scikit-image,paalge/scikit-image,vighneshbirodkar/scikit-image,vighneshbirodkar/scikit-image,vighneshbirodkar/scikit-image,paalge/scikit-image,rjeli/scikit-image,rjeli/scikit-image,paalge/scikit-image
doc/examples/segmentation/plot_compact_watershed.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a check to assert a file is a minimum size\n\nEFG generates an extract of the IL2 data by extracting and converting\neach night to an IL0 representation.\n\nThis check is intended to be used to verify that the file is generated\nand look...
python
new_file
4
5
mit
4c3a7cee4993ce9a76a084e89bcdf9f0931375a5
alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet
modules/nagios/files/usr/lib/nagios/plugins/check_file_size.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add next text of chaining when looking for nonterminals rewritable to epsilon" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 20.08.2017 16:07\n:Licence GNUv3\nPart of gramm...
python
new_file
9
2
mit
1890fbeacb34d1067a6e12909953cf070a8321c1
PatrikValkovic/grammpy
tests/FindEpsilonRules/SimpleChainingSecondTest.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add migration to resolve inconsistency between python2 and python3 strings" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nc...
python
new_file
1
0
mit
af4c6d9747197b23014ba71803da792f9e612a12
Shekharrajak/django-mailbox,coddingtonbear/django-mailbox,ad-m/django-mailbox,leifurhauks/django-mailbox
django_mailbox/migrations/0004_bytestring_to_unicode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test of full flow in WSGI app." }, { "role": "assistant", "content": "import json\n\nimport pytest\nfrom future.backports.urllib.parse import urlencode\nfrom jwkest.jwk import RSAKey, rsa_load\nfrom jwkest.jws import JWS\n\n\...
python
new_file
1
1
apache-2.0
b4085ddea32ce5487d2d649a130984d8902e8399
its-dirg/ALservice
tests/alservice/service/test_wsgi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add smoke test for thread state collection\n\nOnly a smoke test until more advanced facilities to inspect the capture view\nare introduced.\n\nBug: http://b/176960292\n\nTest: Run the test locally." }, { "role": "assistant", "con...
python
new_file
1
1
bsd-2-clause
6aceb95b6372654c9cb2fa2d86fd07fb81f33c50
google/orbit,google/orbit,google/orbit,google/orbit
contrib/automation_tests/orbit_thread_state.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add data repository package. Link to externally installed nipy data." }, { "role": "assistant", "content": "\"\"\"Information used for locating nipy test data.\n\nNipy uses a set of test data that is installed separately. The t...
python
new_file
2
0
bsd-3-clause
abfa62411ae77b5e541ac6b5a23883b6d1b6f31f
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
neuroimaging/utils/tests/data/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command to make testing incoming messages easier." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom optparse import make_option\nfrom rapidsms_httprouter.router import get_router...
python
new_file
4
3
bsd-3-clause
3eb99e0cd378e9cc3e15bef85c55e02ef28a8af3
unicefuganda/edtrac,unicefuganda/edtrac,unicefuganda/edtrac
education/management/commands/fake_incoming_message.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Cover the type support with tests" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom unittest import TestCase\n\nfrom centerline import Centerline\nfrom shapely.geome...
python
new_file
1
2
mit
31a36698c42e4c5d0e5d5a44cb924dcff231a7e4
fitodic/centerline,fitodic/centerline,fitodic/polygon-centerline
tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command for checking & saving unassigned flatblocks in the database" }, { "role": "assistant", "content": "import os\n\nfrom django.core.management.base import BaseCommand\nfrom django.template.loader import get_template\n\nf...
python
new_file
4
13
bsd-3-clause
d4949ced78d06ebc87a6f938d67f706eb9425f91
funkybob/django-flatblocks,funkybob/django-flatblocks
flatblocks/management/commands/unassignedflatblocks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add inet read file tests" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport pytest\nimport csv\n\nfrom inet.inet import Inet\n\n\nclass TestInet():\n \"\"\"Test the Inet class functions as expected\"\"\"\n\...
python
new_file
1
1
mit
ddcc6e3fe252f5666d9f33023361cb0e01ca351a
nestauk/inet
tests/test_inet.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a silly script for the centroid reports" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport os\nimport argparse\n\nfrom mica import centroid_da...
python
new_file
4
0
bsd-3-clause
6ba5fe781d32467a185e0c0d73fda401846e5370
sot/mica,sot/mica
scripts/update_centroid_reports.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add ordering for letters to migration" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.2 on 2017-08-04 19:28\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n...
python
new_file
1
0
mit
42c53d0f9afa61799e3c98327746e790f6fb0b1b
bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject
letters/migrations/0002_set_ordering_letter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for repo client" }, { "role": "assistant", "content": "import unittest\n\nfrom cartoframes.data.clients import SQLClient\nfrom cartoframes.data.observatory.repository.repo_client import RepoClient\n\nfrom ..example...
python
new_file
3
1
bsd-3-clause
5e53c6fd8f58935adfe8db3d7825dfd91780f961
CartoDB/cartoframes,CartoDB/cartoframes
test/data/observatory/repository/test_repo_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add invalid ark and target uri field migration\n\nNot significant changes, but django complains about model changes\nnot matching otherwise." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import u...
python
new_file
1
0
apache-2.0
cad8853286ee87c3efca07e80250cc5b5e43f3e3
emory-libraries/pidman,emory-libraries/pidman
pidman/pid/migrations/0003_rm_invalidark_target_urlfield.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for content types fields" }, { "role": "assistant", "content": "# Generated by Django 3.1.2 on 2020-10-12 12:08\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migr...
python
new_file
1
0
bsd-2-clause
bdc3a1620f15b842ade92815ba24bf611f9d96c1
lpomfrey/django-taggit-machinetags
taggit_machinetags/migrations/0002_auto_20201012_1308.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a tiny helper script to shutdown the chrome frame helper process.\n\nBUG=53127\nTEST=Run script, chrome_frame_helper.exe is shut down.\n\n\nReview URL: http://codereview.chromium.org/3312010\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50...
python
new_file
5
3
bsd-3-clause
ecaaaf3ef2373563a19be39981251b4201a20dc2
adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,yitian134/c...
chrome_frame/tools/helper_shutdown.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Fix matching currency being different then target currency\n\nBB-15798 #resolve" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.15 on 2019-11-16 14:40\nfrom __future__ import unicode_lit...
python
new_file
1
1
bsd-3-clause
798ddd081ff488194c9f0cb1bcab839099e1db70
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/funding/migrations/0047_auto_20191116_1540.py
accepted
null
true