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 migration file to change of verbose_name of Lessons models" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migr...
python
new_file
1
0
mit
6e3d49bf270d240290c8c4b11b7242f8b11d3de3
mazulo/simplemooc,mazulo/simplemooc
simplemooc/courses/migrations/0002_auto_20160504_2321.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models import Q\n\nfrom django.core.urlresolvers import reverse\n\n\nclass TeamDefaultHookset(object):\n\n def build_team_url(self, url_name, team_slug):\n return reverse(url_name, args=[team_slug])\n\n def get_a...
python
edit
1
1
mit
11602e6729a9549aa334f776a9920e79ff2bab1a
rizumu/pinax-teams,jacobwegner/pinax-teams,pinax/pinax-teams,miurahr/pinax-teams,pinax/pinax-teams
pinax/teams/hooks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve queue using two stacks" }, { "role": "assistant", "content": "class MyQueue(object):\n\n def __init__(self):\n self.stack_1 = []\n self.stack_2 = []\n\n def peek(self):\n self.migrate_stacks_if_ne...
python
new_file
1
2
mit
27d29f2f30be7dd899fae08b09d181a22be8d56a
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/ctci_queue_using_two_stacks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add docstring 3-way merge tool" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport lxml.etree as etree\nimport subprocess, optparse, sys\n\ndef main():\n p = optparse.OptionParser(usage=\"\"\"%prog FILE1.xml F...
python
new_file
7
11
bsd-3-clause
2dd10b10878de50911b6420226f90cb1eae2db5d
pv/pydocweb,pv/pydocweb
merge_docstrings.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add script for computing average daily volume.\n\n--HG--\nbranch : cython" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nCompute average daily trade volume of Indian securities.\n\nNotes\n-----\nAssumes t...
python
new_file
2
0
bsd-3-clause
d3b24e3808f3149a80148c26aec6a4077581e4e8
lebedov/nseindia_lob
avg_daily_vol.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make a batch announcement script for generating gists" }, { "role": "assistant", "content": "from beer_search_v2.models import ProductType\nfrom django.core.management.base import BaseCommand\n\n\nclass Command(BaseCommand):\n ...
python
new_file
1
3
mit
982a57cc37d611519a40eed1afd6e713dae096fc
Ernir/bjorleitin,Ernir/bjorleitin,Ernir/bjorleitin,Ernir/bjorleitin
beer_search_v2/management/commands/batch_announce.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python script to simulate Whipple model" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport numpy as np\nimport scipy\nfrom dtk.bicycle import benchmark_state_space_vs_speed, benchmar...
python
new_file
1
5
bsd-2-clause
8a7a27dd356ecb1f067be0270e82b37195605499
oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos
scripts/simulate_whipple_benchmark.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove end date from deed contributions" }, { "role": "assistant", "content": "# Generated by Django 2.2.24 on 2021-12-09 15:40\n\nfrom django.db import migrations\n\n\ndef fix_participant_dates(apps, schema_editor):\n EffortC...
python
new_file
1
1
bsd-3-clause
0db1d34f3dceb015474f8a22a2cc52e6fdd92b76
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/deeds/migrations/0011_auto_20211209_1640.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example which plots a simplex_grid in 3D." }, { "role": "assistant", "content": "\"\"\"\nProject and visualize a simplex grid on the 3-simplex.\n\n\"\"\"\nfrom __future__ import division\n\nimport dit\nimport numpy as np\n...
python
new_file
3
2
bsd-3-clause
59626e34c7938fddeec140522dd2a592ba4f42ef
chebee7i/dit,chebee7i/dit,chebee7i/dit,chebee7i/dit
examples/simplex3_plot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for rule remove tests" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import main, Test...
python
new_file
8
1
mit
1c55fdc21062a7090a76fc7316c93d6ed4647d53
PatrikValkovic/grammpy
tests/rules_tests/grammarManipulation_tests/RemoveTest.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add Google App Engine helper module" }, { "role": "assistant", "content": "\"\"\"Compatibility layer for Google App Engine\n\nUse as you would normally do with :mod:`simples3`, only instead of\n:class:`simples3.S3Bucket`, use :cl...
python
new_file
1
1
bsd-2-clause
f22d1e7d39a282f12f92140b552c3d6751135ae1
sirkamran32/simples3,leo23/simples3,lericson/simples3
simples3/gae.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add little script used for profiling" }, { "role": "assistant", "content": "import cProfile as prof\nimport os.path as opath\n\nfrom nex.nex import run_file\nfrom nex.utils import get_default_font_paths\nfrom nex.box_writer impor...
python
new_file
1
1
mit
370d0604cf3abebc56f0a39efcf3cc5c3d908808
eddiejessup/nex
nex_profile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for payment adapter credentials" }, { "role": "assistant", "content": "from django.test.utils import override_settings\nfrom moneyed import Money\n\nfrom bluebottle.payments.adapters import BasePaymentAdapter\nfrom blue...
python
new_file
1
1
bsd-3-clause
1ff5402c960ac23a9339eaac17cd8e002118be9e
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/payments/tests/test_adapters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test that sourmash signature processor results match sourmash library" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# (c) Camille Scott, 2019\n# File : test_signatures.py\n# License: MI...
python
new_file
4
2
mit
9c5e65b844ef8ac0b6a864a6edb83a827506809c
camillescott/boink,camillescott/boink,camillescott/boink,camillescott/boink
tests/test_signatures.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add Remove Element from LeetCode" }, { "role": "assistant", "content": "# Remove Element https://oj.leetcode.com/problems/remove-element/\n# Given an array and a value, remove all instances of that value in place and return the n...
python
new_file
1
4
mit
14bd96b2ce7e7b67d7fa9b583b44eb04630557b1
aenon/OnlineJudge,aenon/OnlineJudge
leetcode/RemoveElement.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add more example in testtest/" }, { "role": "assistant", "content": "# -*- encoding: utf-8 -*-\n\"\"\"\n\n\"\"\"\n\nimport unittest\nimport time\n\nDELAY = 0.25\n\nclass Case1(unittest.TestCase):\n\n def test_success(self):\n ...
python
new_file
null
null
bsd-2-clause
e0d1c88b8bc37160b93f8a99ee89702a153e803f
nicolasdespres/hunittest
testtest/test_allgood.py
rejected_code_smell
Internal duplication: ~267% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write python code for the following: Switch on G-Cloud 7 - status change to open" }, { "role": "assistant", "content": "\"\"\"Add audit_events type, object and created_at indexes\n\nRevision ID: 280_switch_g7_framework_to_open\nRevises: 270_add_audit_events_indexes\...
python
new_file
1
1
mit
5db2b7ce0573048077054a29857c4e46d44ca0b8
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/280_switch_g7_framework_to_open.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test the get_storage_class utility function" }, { "role": "assistant", "content": "import pytest\n\nfrom storages import FileSystemStorage\nfrom storages.utils import get_storage_class\n\n\ndef test_get_filesystem_storage():\n ...
python
new_file
1
1
bsd-2-clause
09d6b1e3766ff8e35d55c4aa3e7574c292d0be34
dstufft/storages
tests/utils/test_get_storage_class.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update migration to latest schedule work" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migratio...
python
new_file
3
0
isc
ca791d66b85baae91d6decd5f5a201a2b7512efb
CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer
wafer/schedule/migrations/0002_auto_20140909_1403.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add class implementing a bagged estimator" }, { "role": "assistant", "content": "\n\nimport random\nimport numpy as np\nfrom sklearn.base import BaseEstimator, clone\nfrom tqdm import tqdm\n\n\nclass BaggedModel(BaseEstimator):\n...
python
new_file
1
3
mit
785a2f2f12dc72e624d76dd918533db1256c5885
rladeira/mltils
mltils/sklearn/bagging.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add user permissions to groups migration" }, { "role": "assistant", "content": "from collections import namedtuple\n\nfrom django.db import migrations\n\n\ndef add_users_to_groups_based_on_users_permissions(apps, schema_editor):\...
python
new_file
1
4
bsd-3-clause
bcf2b57a3aca1953ce1bde7d2850f8475c561590
mociepka/saleor,mociepka/saleor,mociepka/saleor
saleor/account/migrations/0040_permissions_to_groups.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add country field to Address" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import SchemaMigration\nfrom django.db import models\n\n\nclass Migration(Schema...
python
new_file
4
1
bsd-3-clause
214c7fdcad89135738c7caa60d7c57170a9c74db
andreagrandi/workshopvenues
workshopvenues/venues/migrations/0004_auto__add_field_address_country.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add template for filter specific search tests" }, { "role": "assistant", "content": "\"\"\"Module grouping tests for the search grondwaterfilter module.\"\"\"\n\n\nimport pydov\nfrom pydov.search.grondwaterfilter import Grondwate...
python
new_file
5
0
mit
32f69883aa5c5f2a86ddd7abf93f99628de45c0c
DOV-Vlaanderen/pydov
tests/test_search_grondwaterfilter.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add conversion script for quotes database\n\nFigured I'd keep this around for a while just in case. Maybe remove it\nin some future cleanup and declare the old format dead." }, { "role": "assistant", "content": "#!/usr/bin/env py...
python
new_file
1
0
mit
45db81042b58c72da04193cdcdc6d400b5370c18
TAOTheCrab/CrabBot
convert_quotes_json_to_sqlite.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python script to take GPS EXIF data and convert for GeoJSON use." }, { "role": "assistant", "content": "#!/usr/local/python\n\nimport re\nimport subprocess\nimport sys\n\ndef main():\n latlon = subprocess.check_output([\"exi...
python
new_file
2
3
mit
3a4903bd09cd30397ed98734ba7a92ae9cc23697
Tanner/Technique-Newsstands-Map
location.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add util for parsing required params from body." }, { "role": "assistant", "content": "import json\n\nimport sys\n\nimport falcon\n\n\ndef body_checker(required_params=(), documentation_link=None):\n\n def hook(req, resp, reso...
python
new_file
1
5
cc0-1.0
a8129cfb7544c5b2f021f8258462ec3b7933b38f
sketchturnerr/WaifuSim-backend,sketchturnerr/WaifuSim-backend
resources/middlewares/body_checker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script that randomly shuffles a list of songs" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport os\nimport subprocess\nimport sys\nimport uuid\n\nif __name__ == '__main__':\n dir_name = sys.argv[1]\n\n...
python
new_file
1
0
mit
5d665d1511dbef99bbfca6ce735c0db927b0a8b4
cataliniacob/misc,cataliniacob/misc
randomize-music.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to lintcode question 106" }, { "role": "assistant", "content": "\"\"\"\nDefinition of ListNode\nclass ListNode(object):\n\n def __init__(self, val, next=None):\n self.val = val\n self.next = next\n\n...
python
new_file
3
6
mit
a79273430fd3f3a4629cfdba6a5db119a3b2c3ba
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
lintcode/Medium/106_Convert_Sorted_List_to_Balanced_BST.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add database provision test script\n\nThis just constantly adds/removes (at random) the database to ensure it\ndoesn't cause problems" }, { "role": "assistant", "content": "import random\nimport json\n\nimport tornado.ioloop\nimp...
python
new_file
5
2
mit
f0f22d018d5dae1a362512da1f8e5290ac755795
jacksontj/dataman
examples/python/forum/router_spin.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add basic SockJS server implementation" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport json\nimport logging\nimport os\nfrom sockjs.tornado import SockJSRouter, SockJSConnection\nfrom tornado.web import R...
python
new_file
1
2
apache-2.0
10169d66c91360f562367a00002bac23ec036719
aldanor/sidecar,aldanor/sidecar,aldanor/sidecar
src/sidecar/connection.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a Ukrainian Internet provider" }, { "role": "assistant", "content": "# coding=utf-8\nfrom __future__ import unicode_literals\n\nfrom .. import Provider as InternetProvider\n\n\nclass Provider(InternetProvider):\n free_emai...
python
new_file
1
0
mit
7576d66b34ea01b336daa7750a1b45a077e15bb2
joke2k/faker,trtd/faker,danhuss/faker,joke2k/faker
faker/providers/internet/uk_UA/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a very simple performance testing tool." }, { "role": "assistant", "content": "\"\"\"\nSimple peformance tests.\n\"\"\"\n\nimport sys\nimport time\n\nimport couchdb\n\n\ndef main():\n\n print 'sys.version : %r' % (sys.vers...
python
new_file
4
5
bsd-3-clause
b01076381ebc91f20c527f1632c7b3f2aa82d39a
ajmirsky/couchdb-python
perftest.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add util to dump out archived noaaport files" }, { "role": "assistant", "content": "\"\"\"\nDump what I have stored in the AFOS database to flat files\n\"\"\"\nimport psycopg2\npgconn = psycopg2.connect(database='afos', host='iem...
python
new_file
1
5
mit
41c99eb2c186082869396c19e0ada2b9f3d0cee2
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/util/afos2flatfile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add negative tempest API test for cluster_delete\n\nThis patch adds negative tempest API test for cluster_delete for\nfailure cases of 404(NotFound) and 409(Conflict).\n\nChange-Id: I5e0d917499fe897d0c8b46a8b323c9606db545e5" }, { "ro...
python
new_file
1
1
apache-2.0
c0d98d5fe5b095dcbe6f01050f7e0addc2b950e8
stackforge/senlin,openstack/senlin,openstack/senlin,openstack/senlin,stackforge/senlin
senlin/tests/tempest/api/clusters/test_cluster_delete_negative.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement RTPP_LOG_TSTART and RTPP_LOG_TFORM=\"rel\" env parameters to aid debugging." }, { "role": "assistant", "content": "import getopt, sys\n\nif __name__ == '__main__':\n sippy_path = None\n\n try:\n opts, args ...
python
new_file
2
0
bsd-2-clause
7bf60d5ef1e6052044ebfedf1e2bf2dddc0940b8
sippy/rtp_cluster,sippy/rtp_cluster
python/getmonotime.py
rejected_duplicate
Near-duplicate of sample 5863
true
[ { "role": "user", "content": "Write python code for the following: Add import script for Kingston" }, { "role": "assistant", "content": "\"\"\"\nImports Kingston\n\"\"\"\nimport sys\n\nfrom django.contrib.gis.geos import Point, GEOSGeometry\n\nfrom data_collection.management.commands import Base...
python
new_file
4
1
bsd-3-clause
f4812deb2bdba677d77b35ad3a97a9367166f5c2
chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_kingston.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate spectral graph\n\nThis script assumes several data files adapted from\nhttp://www.ifp.illinois.edu/~varshney/elegans/\n\nIt uses dense matrices and so is unsuitable for large datasets." }, { "role": "assistant"...
python
new_file
4
0
mit
22b897c20ac63a6aea4383f4a4378bca1c3688b2
jni/spectral-graphs
scripts/spectral-graph-display.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tool to create a json with deprecated events removed\n\nThe new tool takes an input json filename and an optional output\nfilename (default is stdout) and writes the input to the output removing\nany events that have a \"Deprecated\":\"1...
python
new_file
1
4
bsd-3-clause
35d34a9fe3bb12cc42ed9c91331687eff883a378
intel/event-converter-for-linux-perf,intel/event-converter-for-linux-perf
remove-deprecated-json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test of cyk for one rule" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 31.08.2017 14:51\n:Licence GNUv3\nPart of pyparsers\n\n\"\"\"\n\nfrom unittest import main, Test...
python
new_file
11
1
mit
162a0cf6f19878f20bd6a7c92aeff2eac2a240c3
PatrikValkovic/grammpy
tests/CYK/OneRuleTest.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add (failing) test for ElasticBeanstalk" }, { "role": "assistant", "content": "import boto3\nfrom moto import mock_eb\n\n\n@mock_eb\ndef test_application():\n # Create Elastic Beanstalk Application\n eb_client = boto3.clien...
python
new_file
1
1
apache-2.0
c95d472bf5ef9746521cf54c83bb61333c3eafcd
william-richard/moto,spulec/moto,william-richard/moto,spulec/moto,william-richard/moto,spulec/moto,spulec/moto,william-richard/moto,william-richard/moto,spulec/moto,william-richard/moto,spulec/moto
tests/test_eb/test_eb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add default group data migration\n\nrefs #17433" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.contrib.auth.models ...
python
new_file
3
2
apache-2.0
47f6859fa11f7cc02f340e96567a0a4a78310b42
osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api
whats_fresh/whats_fresh_api/migrations/0002_auto_20141120_2246.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unittests for check app" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\nimport os\n\nimport sshrc.endpoints.check\n\n\ndef test_mainfunc_ok(cliargs_default, templater, mock_get_content):\n mock_get_cont...
python
new_file
1
2
mit
ac7a9cc262890976cefd0c83551f6ea7e2a0e6a3
9seconds/concierge,9seconds/sshrc
tests/test_endpoints_check.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool to convert testr.conf to stestr.conf\n\nSince stestr isn't strictly backwards compatible with testr user\nintervention will be required to start using stestr as a replacement for\ntestrepository. This commit adds a tools directory a...
python
new_file
1
0
apache-2.0
2cf1b0c8080864a46ede994ece3211c1a4a35db6
masayukig/stestr,mtreinish/stestr,mtreinish/stestr,masayukig/stestr
tools/testr_to_stestr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Initialize Table and Hash item" }, { "role": "assistant", "content": "class HashItem(object):\n def __init__(self, key, value):\n self.key = key\n self.value = value\n\n\nclass HashTable(object):\n def __init_...
python
new_file
2
2
mit
405c3c3a0264d158a878934d6e23078d250aec57
nbeck90/data_structures_2
hash.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic test for scanner parsing html block with specified groups correctly" }, { "role": "assistant", "content": "from djangae.test import TestCase\n\nfrom fluent.scanner import parse_file, DEFAULT_TRANSLATION_GROUP\n\n\nTEST_...
python
new_file
1
1
mit
9b618c71bb7d8cc0d38c5cbafb40e9775205a544
potatolondon/fluent-2.0,potatolondon/fluent-2.0
fluent/tests/test_scanner.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add experiment job manager tests" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function\n\nfrom unittest import TestCase\n\nfrom polyaxon_cli.managers.expe...
python
new_file
1
1
apache-2.0
41bc62e8cd9e52f443670f326dad84b39d4d9ca1
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
tests/test_managers/test_experiment_job.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to find lowest rmse result values" }, { "role": "assistant", "content": "__author__ = 'quinnosha'\n\n\"\"\"Tools for viewing and analyzing prediction results\n\n.. moduleauthor:: Quinn Osha\n\"\"\"\n\n\nfrom os.path im...
python
new_file
4
2
mit
28af79e1f4362db812247911b3cda1831bed75bf
jvanbrug/netflix,jvanbrug/netflix
utils/result_analysis.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test for detecting memory leaks" }, { "role": "assistant", "content": "import resource\n\nimport pytest\n\nfrom .models import TestModel as DirtyMixinModel\n\npytestmark = pytest.mark.django_db\n\n\ndef test_rss_usage():\n ...
python
new_file
1
2
bsd-3-clause
af28c1449cf525460de16304c231616873b2ca3d
romgar/django-dirtyfields,smn/django-dirtyfields
tests/test_memory_leak.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create separate file for simulate." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2015, MIT Probabilistic Computing Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"L...
python
new_file
4
5
apache-2.0
62f6f127a8b74daa74d38850d9b9d9346c7b1144
probcomp/cgpm,probcomp/cgpm
gpmcc/tests/inference/test_simulate.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 36, after long time..." }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom math import pow\n\nLIMIT = 1000000\npalindrome_sum = 0\n\ndef is_palindrome(res):\n\treturn res == res[::-1]\n\ndef ...
python
new_file
3
2
mit
19ab63c1f5c377a58b3b91ae2c716f6d3ed6b78b
cifvts/PyEuler
euler036.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for parallel queries" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport asyncio\nimport pytest\nimport logging\n\nfrom bitshares.aio.asset import Asset\n\nlogger = logging.getLogger(\"websockets\")\nl...
python
new_file
1
2
mit
caaec1dd39b10ceae04736fd2fb1278d6f74d7cd
xeroc/python-bitshares
tests/testnet/aio/test_jsonrpc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add api v2 license, add license accessibility attachment" }, { "role": "assistant", "content": "# Generated by Django 3.1.14 on 2022-04-25 09:38\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nc...
python
new_file
1
0
bsd-2-clause
d689ac08e6d0b928d674997aafb383c8bf2a4861
makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin
geotrek/common/migrations/0026_auto_20220425_0938.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add text filter and text filter composite (pipeline)" }, { "role": "assistant", "content": "from abc import ABCMeta, abstractmethod\n\nclass TextFilter(object, metaclass=ABCMeta):\n \"\"\" An intertface for text filters \n\n ...
python
new_file
1
3
mit
5e74bfcf03afdc0eaf58c668e063fd41432b6da0
iluxonchik/lyricist
text_filter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to filter VCF." }, { "role": "assistant", "content": "\"\"\"\nPython script to filter a vcf-file generated by freebayes.\n\"\"\"\n\nimport sys\nimport vcf\n\nclass VCF(vcf.Reader):\n def __init__(self, filename, **k...
python
new_file
3
7
bsd-3-clause
203fceedd93a56032f7b78154620f4da89cb4768
sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana,sequana/sequana
sequana/vcf_filter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for generating a preview image for non-gridified tSNE placed images" }, { "role": "assistant", "content": "# Quick hack to visualize non-gridified tSNE placed images\n\n# Adapted from https://github.com/ml4a/ml4a-guide...
python
new_file
3
0
apache-2.0
fb61f99e97e0d6f630e9f17132a33e06e4a64d4c
tokee/juxta,tokee/juxta,tokee/juxta
plotpoints.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for sponsor package changes" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migrati...
python
new_file
1
0
isc
a3d70cd799126f489737b193f6917fe607a03652
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
wafer/sponsors/migrations/0005_sponsorshippackage_symbol.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Radix sort" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom radix_sort import int_radix, str_radix\n\n\ndef test_sorted():\n my_list = list(range(100))\n new_list = int_radix(my_list)\n ...
python
new_file
1
1
mit
8f341dcb684e852b7a920ee930f4714e83bb180f
nbeck90/data_structures_2
test_radix_sort.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for accessing the root of a statically served dir." }, { "role": "assistant", "content": "import pytest\nimport tempfile\nimport aiohttp\nfrom aiohttp import web\nimport os\nimport shutil\nimport asyncio\n\nSERVER_HOST = '12...
python
new_file
1
2
apache-2.0
3fd7cda9be34dd0bbf884aae8012096d3962fad3
z2v/aiohttp,esaezgil/aiohttp,AraHaanOrg/aiohttp,elastic-coders/aiohttp,moden-py/aiohttp,vaskalas/aiohttp,panda73111/aiohttp,jashandeep-sohi/aiohttp,elastic-coders/aiohttp,hellysmile/aiohttp,juliatem/aiohttp,panda73111/aiohttp,moden-py/aiohttp,esaezgil/aiohttp,jashandeep-sohi/aiohttp,KeepSafe/aiohttp,singulared/aiohttp,...
tests/test_web_urldispatcher.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple mail extractor of eml files. Convert the email to schema format." }, { "role": "assistant", "content": "import email\nimport sys\nimport os\nimport argparse\nimport textwrap\n\ndef make_person_schema(msg, schemaFile)...
python
new_file
3
3
mit
6e4d457244b49c903e706d8deffaf74c4a737990
ptal/people-link
mail_extractor/mail_extractor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add plugin to make syntax detection work" }, { "role": "assistant", "content": "# The XML package includes a `XML.sublime-settings` file that sets `hidden_extensions` to some\n# of the extension we want to highlight with our pack...
python
new_file
1
2
mit
78454dcde6be6da73d99fd77c79b6af21dfe02c1
SublimeText/PackageDev,SublimeText/AAAPackageDev,SublimeText/AAAPackageDev
xml_hidden_extensions_hotfix.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for GOES light curve" }, { "role": "assistant", "content": "from sunpy.time import TimeRange\nfrom sunpy.lightcurve import GOESLightCurve\n\ndt = TimeRange('1981/01/10 00:00', '2014/04/18 23:00')\n\ntr_not_found = []\n\ntime...
python
new_file
1
0
apache-2.0
1218583a097575e7befd6eea339e34a0cbfda76f
ehsteve/sunpy-tests
test_goeslc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for mutual information function" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: latin-1 -*-\n#\n# Copyright 2016-2019 Blaise Frederick\n#\n# Licensed under the Apache License, Version 2.0 (the...
python
new_file
6
3
apache-2.0
aa37928593ae84526d56f2c50ba7c21b2be6c5e8
bbfrederick/rapidtide,bbfrederick/rapidtide
rapidtide/tests/test_mi.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Create turn on and off script" }, { "role": "assistant", "content": "#!/usr/bin/python\n#Definindo a biblioteca GPIO\nimport RPi.GPIO as GPIO\n#Definindo a biblioteca TIME\nimport time\nimport sys\n\n#Aqui definimos que vamos usa...
python
new_file
4
0
mit
4c354a4941b15ea90e72483881c95c7f8c496f71
biorreator/bioreator-api,biorreator/bioreator-api
scripts/turn_on_and_off.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Introduce template filters for checking dynamic permissions" }, { "role": "assistant", "content": "from django import template\n\nregister = template.Library()\n\n\ndef _check_permission(user, instance, action):\n return user....
python
new_file
1
1
apache-2.0
68ef5177f0519d1bb889a51974fdd5f075c8b0f0
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
netbox/utilities/templatetags/perms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for 'a' vs. 'an' rule\n\nCloses #31." }, { "role": "assistant", "content": "from check import Check\nfrom proselint.checks import mau_a_vs_an as chk\n\n\nclass TestCheck(Check):\n\n __test__ = True\n\n @property\n...
python
new_file
1
1
bsd-3-clause
58d9ac5372d6d013750e570a37f6a425dfc244e1
amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint
tests/test_mau_a_vs_an.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Rename test_array and add more variations" }, { "role": "assistant", "content": "import pymatbridge as pymat\nimport random as rd\nimport numpy as np\nimport numpy.testing as npt\nimport test_utils as tu\n\nclass TestArray:\n\n ...
python
new_file
4
1
bsd-3-clause
5eb33cd8ab278be2f8b4e879ef39dfa5ade3c3d7
jjangsangy/python-matlab-bridge,jjangsangy/python-matlab-bridge,arokem/python-matlab-bridge,arokem/python-matlab-bridge,blink1073/python-matlab-bridge,jjangsangy/python-matlab-bridge,blink1073/python-matlab-bridge,blink1073/python-matlab-bridge,arokem/python-matlab-bridge
pymatbridge/tests/test_set_variable.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add separate test file for c" }, { "role": "assistant", "content": "import glob\nimport json\nimport os\n\nimport pytest\n\nfrom helpers import solutions_dir\n\n\n# NOTE: If we make solution_files a fixture instead of a normal at...
python
new_file
1
1
mit
c5aa8f0c6b631ee7f4d0beefb20c8537ecbcf011
project-lovelace/lovelace-engine,project-lovelace/lovelace-engine,project-lovelace/lovelace-engine
tests/test_c_solutions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to rename version -> tag field" }, { "role": "assistant", "content": "\"\"\"\nMigrate version to tag in build models\n\"\"\"\nimport os\nimport shutil\nimport yaml\n\n\njob_dirs = (\n filename for filename in\n ...
python
new_file
3
0
isc
73321680795cff9b1c680ba20fc6ebf2fb87eeb9
sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,RickyCook/DockCI
dockci/migrations/0003.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert Sorted Array to Binary Search Tree" }, { "role": "assistant", "content": "# Definition for a binary tree node.\n# class TreeNode:\n# def __init__(self, x):\n# self.val = x\n# self.left = None\n# ...
python
new_file
4
2
apache-2.0
11b139e7e4fa42d58157b2c872677fe807127a3d
MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode,MingfeiPan/leetcode
tree/108.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 530. Minimum Absolute Difference in BST\n\n530. Minimum Absolute Difference in BST: https://leetcode.com/problems/minimum-absolute-difference-in-bst/" }, { "role": "assistant", "content": "# Definition for a b...
python
new_file
1
4
apache-2.0
029183cfd855c1fc157df771d1b5a705aec38854
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/minimum-absolute-difference-in-bst.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for User" }, { "role": "assistant", "content": "# Generated by Django 3.2.13 on 2022-06-22 14:11\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = ...
python
new_file
1
0
mit
8f91a2e8dea6076cdb148b53f6f938faad693ab1
City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi
kerrokantasi/migrations/0005_alter_user_first_name.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for SOC integrals" }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# Author: Qiming Sun <<EMAIL>>\n#\n\nimport numpy\nfrom pyscf import gto\n\n'''\nIntegrals for spin-orbit coupling\n'''\n\nmol = gto.M...
python
new_file
1
1
apache-2.0
465f0156a6e92991ed277cd0434cc65f25ef8af8
gkc1000/pyscf,sunqm/pyscf,sunqm/pyscf,sunqm/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,sunqm/pyscf
examples/gto/20-soc_ao_integrals.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test case for configure failure.\n\nTryRun fails to find the executable when VariantDir is set up from\nSConscript/SConstruct.\n\ngit-svn-id: 7892167f69f80ee5d3024affce49f20c74bcb41d@4363 fdb21ef1-2011-0410-befe-b5e4ea1792b1" }, { ...
python
new_file
3
0
mit
8b0b7c19d2e2c015fd8ba7d5408b23334ee8874f
Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons
test/Configure/VariantDir2.py
rejected_duplicate
Near-duplicate of sample 7900
true
[ { "role": "user", "content": "Write python code for the following: Add tests for GitOps deployment strategy" }, { "role": "assistant", "content": "\"\"\"Tests for the GitOps deployment strategy.\"\"\"\nfrom . import pytest_generate_tests # noqa, pylint: disable=unused-import\n\n\n# pylint: disa...
python
new_file
3
3
apache-2.0
8a2b6649481e204458b8a3895330e059a3d631c5
painless-software/painless-continuous-delivery,painless-software/painless-continuous-delivery,painless-software/painless-continuous-delivery,painless-software/painless-continuous-delivery
tests/unit/test_gitops.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for generating movie" }, { "role": "assistant", "content": "import sys\nimport os\nsys.path.insert(0, os.path.realpath('.'))\nimport mimetypes\n\nfrom create_movie import generate_movie\n\n\ndef test_generate_movie(tmpdi...
python
new_file
1
2
mit
1644f743996c950264a4be58ba0c58b013102828
NGTS/frame-movies,NGTS/frame-movies
testing/test_generate_movie.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the heom module API." }, { "role": "assistant", "content": "\"\"\"\nTests for qutip.nonmarkov.heom.\n\"\"\"\n\nfrom qutip.nonmarkov.heom import (\n BathExponent,\n Bath,\n BosonicBath,\n DrudeLorentzBath...
python
new_file
1
1
bsd-3-clause
0d3e94a4043347d671e7d898e382b11b1a5e1c23
qutip/qutip,qutip/qutip,cgranade/qutip,cgranade/qutip
qutip/tests/test_heom.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add placeholder CLI interface to libcask.container.Container" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport sys; sys.path.insert(0, './src/')\nimport libcask.container\n\ncont = libcask.container.Container(\...
python
new_file
3
0
mit
4ae010a286f6660fbbad38f6f867c5d185eac784
ianpreston/cask,ianpreston/cask
test.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: Add CLI for converting dwaq binary map to nc" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nCommand-line tool to convert a binary map output to netcdf.\n\"\"\"\nfrom __future__ import print_function\n\nimpo...
python
new_file
1
0
mit
85e0c4d75bf8ccff20eff338242c6e37af1c705c
rustychris/stompy,rustychris/stompy
examples/dwaq_map_to_nc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to the problem Mini-Max Sum" }, { "role": "assistant", "content": "#!/bin/python3\n\n# https://www.hackerrank.com/challenges/mini-max-sum/problem\n\n\"\"\"\nThe algorithm used to solve this problem is the following:\...
python
new_file
1
1
mit
ba6673615deeb776919ef98fb4f0b3a07fb80801
julianespinel/training,julianespinel/training,julianespinel/training,julianespinel/trainning,julianespinel/trainning,julianespinel/training
hackerrank/mini_max_sum.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add playlist list and playlist video list getters" }, { "role": "assistant", "content": "from __future__ import unicode_literals\n\nimport dateutil.parser\n\n\ndef get_playlists(client):\n playlists = []\n\n def process(ite...
python
new_file
1
1
mit
099e42bb6264ddb67136d8c6d13926605c2f525c
drkitty/metatube,drkitty/metatube
tube.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the model summary example." }, { "role": "assistant", "content": "\"\"\"\nThis example:\n\n1. Connects to the current model\n2. Starts an AllWatcher\n3. Prints all changes received from the AllWatcher\n4. Runs forever (kill w...
python
new_file
4
2
apache-2.0
cf978fed09339dc31a665fc508516961c52565f2
juju/python-libjuju,juju/python-libjuju
examples/modelsummaries.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Create brushing scatter plot to show data on a table example" }, { "role": "assistant", "content": "\"\"\"\r\nBrushing Scatter Plot to show data on a table\r\n---------------------------------\r\nA scatter plot of the cars datase...
python
new_file
1
0
bsd-3-clause
225fb524d67faeaa6d5af837f53c25b232b0b43e
altair-viz/altair,jakevdp/altair
altair/examples/scatter_linked_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a management command to clean up lingering tutorial streams.\n\nWe now clean up the stream subscription in more places, but some\nhistorical tutorial streams are still around and if an error or page\nreload happens during the tutorial it...
python
new_file
4
7
apache-2.0
2f644f8439e63f7e621825e2036701c3bbcf311a
bowlofstew/zulip,JPJPJPOPOP/zulip,isht3/zulip,qq1012803704/zulip,hj3938/zulip,Frouk/zulip,Gabriel0402/zulip,karamcnair/zulip,he15his/zulip,hengqujushi/zulip,schatt/zulip,paxapy/zulip,mdavid/zulip,bluesea/zulip,jackrzhang/zulip,littledogboy/zulip,niftynei/zulip,isht3/zulip,LAndreas/zulip,amallia/zulip,mahim97/zulip,JPJP...
zephyr/management/commands/delete_tutorial_streams.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a couple tests for teuthology.schedule\n\nSigned-off-by: Zack Cerza <<EMAIL>>" }, { "role": "assistant", "content": "from ..schedule import build_config\nfrom ..misc import get_user\n\n\nclass TestSchedule(object):\n basic...
python
new_file
1
1
mit
fc772d73549d9a99188cf0534eba7d2f1e0a52d7
michaelsevilla/teuthology,ktdreyer/teuthology,robbat2/teuthology,tchaikov/teuthology,zhouyuan/teuthology,tchaikov/teuthology,t-miyamae/teuthology,dmick/teuthology,yghannam/teuthology,yghannam/teuthology,ivotron/teuthology,dmick/teuthology,ceph/teuthology,SUSE/teuthology,robbat2/teuthology,dreamhost/teuthology,SUSE/teut...
teuthology/test/test_schedule.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial workflow test.\nThis is an example of how workflow can be automatically tested. In this case, the modeling workflow is tested. If something is done here that isn't valid, and is caught during validation, this test would fail.\n\n...
python
new_file
1
1
mit
46c64c4612417a16fb8027c39e252f5d4a44378b
getavalon/core,MoonShineVFX/core,mindbender-studio/core,MoonShineVFX/core,mindbender-studio/core,getavalon/core
mindbender/maya/tests/test_workflow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add json parsing for the curl response (already referenced in the main script)" }, { "role": "assistant", "content": "import json\n\njsonFile = open('output.json', 'r')\nlines = jsonFile.readlines()\n\n# lines[1] since the first ...
python
new_file
2
0
mit
cb8c664f69dd6eede4d6bee48b6d84f3aeaf2218
Nespa32/sm_project,Nespa32/sm_project,Nespa32/sm_project,Nespa32/sm_project,Nespa32/sm_project
json_parser/json_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Battery Electric Vehicle (BEV) charging example" }, { "role": "assistant", "content": "## Battery Electric Vehicle Charging\n#\n#In this example a battery electric vehicle (BEV) is driven 100 km in the morning and 100 km in t...
python
new_file
1
0
mit
aa215f1d5e6059517c3f7e13287434fd7e193e26
PyPSA/PyPSA
examples/sector-coupling/battery-electric-vehicle-charging.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 334. Increasing Triplet Subsequence\n\n334. Increasing Triplet Subsequence: https://leetcode.com/problems/increasing-triplet-subsequence/" }, { "role": "assistant", "content": "class Solution(object):\n def...
python
new_file
1
6
apache-2.0
47cb213be2071ad77f75d350ead4cfd7c7dc2d62
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/increasing-triplet-subsequence.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple tests for kernel spec machinery" }, { "role": "assistant", "content": "import json\nimport os\nfrom os.path import join as pjoin\nimport unittest\n\nfrom IPython.utils.tempdir import TemporaryDirectory\nfrom IPython.ke...
python
new_file
1
1
bsd-3-clause
86f276416ee70470d33ec7f481cf2d69b6956b36
ipython/ipython,ipython/ipython
IPython/kernel/tests/test_kernelspec.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add interface for unikernel backends to implement" }, { "role": "assistant", "content": "from abc import ABCMeta, abstractmethod\n\n\nclass IUnikernelBackend(object):\n \"\"\"\n Interface that must be implemented by every U...
python
new_file
1
1
apache-2.0
4812103b4d9be418aecdc64341fb32be7865f113
onyb/dune,adyasha/dune,adyasha/dune,adyasha/dune
core/backends/IUnikernelBackend.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the first unit test." }, { "role": "assistant", "content": "import re\nimport unittest\n\nfrom test_utils import import_utils\nimport_utils.prepare_lldb_import_or_exit()\n\nimport lldb\n\nimport_utils.prepare_for_scripts_impo...
python
new_file
1
2
mit
d42bc4c14ca9a4f819c2ef3dccbfa916b381b959
mrhappyasthma/happydebugging,mrhappyasthma/HappyDebugging
tests/print_view_controller_hierarchy_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add post-submission status check script." }, { "role": "assistant", "content": "#! /usr/bin/python\n'''\nChecks a Google genomics pipeline submission and prints status.\n'''\n\nimport argparse\nimport subprocess\nimport yaml\n\n\...
python
new_file
2
2
bsd-2-clause
c90f64a57b02035c87c000e06025c59736fad9ba
dkdeconti/DFCI-CCCB-GATK-Cloud-pipeline,dkdeconti/DFCI-CCCB-GATK-Cloud-pipeline,dkdeconti/DFCI-CCCB-GATK-Cloud-pipeline
WDL_Pipelines/GATK_from_bam/check_completion_status.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command which reads password lists and outputs passwords that validate the password policy\n\nThis comes in handy when disallowing commonly used passwords because it removes all passwords that will never validate anyhow." }, { "r...
python
new_file
2
5
bsd-3-clause
4398fd54672d8149e61b9360465d227b85f0ea12
Dreamsolution/django-auth-policy,Dreamsolution/django-auth-policy,mcella/django-auth-policy,mcella/django-auth-policy
django_auth_policy/management/commands/filter_password_list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple pinger for basic locust demo" }, { "role": "assistant", "content": "from locust import HttpLocust, TaskSet, task\n\nclass HttpPingTasks(TaskSet):\n @task\n def ping(self):\n self.client.get(\"/\")\n\nclass...
python
new_file
1
1
apache-2.0
0dbc2613fc686471be214ef69f245bc279a7e660
drednout/locust_on_meetup
http_ping.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example of a long running publisher" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# pylint: disable=C0111,C0103,R0205\n\nimport threading\nfrom time import sleep\nfrom pika import ConnectionParameters, Bl...
python
new_file
1
2
bsd-3-clause
8a089a5a8126110ef0b763294a0a14869787146e
pika/pika
examples/long_running_publisher.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add BloggerInterface class to interact with blogger api" }, { "role": "assistant", "content": "\"\"\"\npyblogit.api_interface\n~~~~~~~~~~~~~~~~~~~~~~\n\nThis modules acts as an interface between pyblogit and various\nblogging pla...
python
new_file
2
1
mit
4ba2dc07dcd1394e829fed0168ee64af1bd401ed
jamalmoir/pyblogit
pyblogit/api_interface.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for HTTP server, step 1" }, { "role": "assistant", "content": "from echo_client import client\n\n\ndef test_ok():\n response = client('GET /index.html HTTP/1.1').split('\\r\\n')\n first_line = response[0]\n ass...
python
new_file
1
1
mit
d1663520f019364841f673e929ed8095697b7ab9
jwarren116/network-tools,jwarren116/network-tools
test_http1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make a script to automatically move to new schema." }, { "role": "assistant", "content": "#! /usr/bin/env python3\n\nimport sys\nimport json\n\nwith open(sys.argv[1]) as f:\n equajson = json.load(f)\n\nfield_list = [\n \"al...
python
new_file
1
0
mit
fe257b061292df122064765db0f06c49b01b3ed7
nbeaver/equajson
ad-hoc-scripts/lift.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for -- terminating option processing." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n__revision__ = \"test/option-n.py __REVISION__ __DATE__ __DEVELOPER__\"\n\nimport TestCmd\nimport os.path\nimport st...
python
new_file
4
0
mit
f4b5ccd3fdacad36cb124245591ea5bfaf4de12e
andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,Distrotech/scons,Distrotech/scons,andrewyoung1991/scons,timj/scons,timj/scons,andrewyoung1991/scons,timj/scons,Distrotech/scons,timj/scons,Distrotech/scons...
test/option--.py
rejected_lint
Too many lint violations: 4
true