messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Write python code for the following: Add array of prime number generator code" }, { "role": "assistant", "content": "import argparse\nimport sys\n\n# Sieve of Eratosthenes\n# Code by David Eppstein, UC Irvine, 28 Feb 2002\n# http://code.activestate.com/recipes/11711...
python
new_file
1
4
mit
37b5531e2cc969e1ee73a46bf372d89871f922a7
everyevery/programming_study,everyevery/algorithm_code,everyevery/algorithm_code,everyevery/programming_study,everyevery/algorithm_code,everyevery/algorithm_code,everyevery/algorithm_code,everyevery/programming_study,everyevery/algorithm_code,everyevery/programming_study,everyevery/algorithm_code,everyevery/programming...
tools/gen_prime.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement roulette wheel selection algorithm" }, { "role": "assistant", "content": "import random\nimport bisect\n\ndef select(population):\n \"\"\"Roulette wheel selection.\n\n Each individual is selected to reproduce, wit...
python
new_file
1
3
mit
426f90ba500aa5d213a8b130e1841806e2dae388
nemanja-m/gaps,nemanja-m/genetic-jigsaw-solver
solver/operators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new sample files for Python3-py grammar" }, { "role": "assistant", "content": "def ls(self, msg, match):\n \"\"\"\n A sample function to test the parsing of ** resolution\n \"\"\"\n langs = list(map(lambda x: x.lo...
python
new_file
4
2
mit
31fe72931d29d81088f23c7609aa612d4735814b
antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4
python3-py/examples/new_features.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add example of factory usage" }, { "role": "assistant", "content": "import random\n\n\ndef get_digit():\n return random.randint(1, 9)\n\n\nfrom zope.component.factory import Factory\nfactory = Factory(get_digit, 'random_digit'...
python
new_file
1
1
mit
47775471e2e8f0d88cb79d362114b5f49128a492
duboviy/zca
factory/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cooperator import *\nfrom defector import *\nfrom grudger import *\nfrom rand import *\nfrom titfortat import *\nfrom gobymajority import *\nfrom alternator import *\nfrom averagecopier import *\nfrom grumpy import *\n\n\nstrategies = ...
python
edit
21
0
mit
b9d167cf1eba2d55ab7710e78f38c3fa010d21ef
marcharper/Axelrod,ranjinidas/Axelrod,ranjinidas/Axelrod,marcharper/Axelrod
axelrod/strategies/__init__.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Write python code for the following: Add a simple test for version finder." }, { "role": "assistant", "content": "from __future__ import absolute_import, print_function\n\n# Standard library\nimport unittest\n\n# Local library\nfrom cinspect.index.serialize import _...
python
new_file
1
1
bsd-3-clause
e279f8a046d2d9b985df2b01abe23dbe154da188
punchagan/cinspect,punchagan/cinspect
cinspect/tests/test_version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a basic example of the Tabler API." }, { "role": "assistant", "content": "from tabler import Tabler\n\ntable = \"\"\"<table>\n<thead>\n <tr>\n <th>Number</th>\n <th>First Name</th>\n <th>Last Name</th>\n <th>Phon...
python
new_file
4
0
bsd-3-clause
fac97130396057802f1ebf21928667a971395ba9
bschmeck/tabler
examples/ex_tabler.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: ADD Domain association_requests unit tests" }, { "role": "assistant", "content": "\ndef test_send_association_request(client):\n result = client.post(\"/association-requests/request\", data={\"id\": \"54623156\", \"address\": ...
python
new_file
1
1
apache-2.0
639143e3145682d776251f39f0a791f0c77e5169
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
apps/domain/tests/test_routes/test_association_requests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example script for 'simpleflow.download.with_binaries' decorator" }, { "role": "assistant", "content": "import subprocess\n\nfrom simpleflow.download import with_binaries\n\n\n@with_binaries({\n \"how-is-simpleflow\": \"s3...
python
new_file
5
1
mit
fcbfaded67747984899dbbabb2cdcdefe00002df
botify-labs/simpleflow,botify-labs/simpleflow
examples/download1.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add trainer for siamese models" }, { "role": "assistant", "content": "from __future__ import print_function\nimport time\n\nfrom torch.autograd import Variable\n\nfrom .evaluation import accuracy\nfrom .utils.meters import Averag...
python
new_file
1
3
mit
1d7d86ba12fd00d388b939206abf305a6db569db
Flowerfan524/TriClustering,Flowerfan524/TriClustering,zydou/open-reid,Cysu/open-reid
reid/train_siamese.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for mission." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport pytest\n\nimport mission\n\n\nclass TestMissionList(object):\n\n def pytest_funcarg__mission_list(self):\n mission_list = mi...
python
new_file
1
1
apache-2.0
528afdc0f00b958f6920bd6e66c3bac841b3a8b8
kcaa/kcaa,kcaa/kcaa,kcaa/kcaa,kcaa/kcaa
server/kcaa/kcsapi/mission_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test libewf-less calls in ewf module" }, { "role": "assistant", "content": "from os import path\n\nfrom digestive.ewf import EWFSource, format_supported, list_ewf_files\n\n\nhere = path.dirname(path.abspath(__file__))\n\n\ndef te...
python
new_file
1
3
isc
38e294e7d8e8053ac604fdbcdcaeed59fecae1e9
akaIDIOT/Digestive
tests/test_ewf.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for observers and observable." }, { "role": "assistant", "content": "from copy import copy\nfrom pytest import fixture\n\nfrom vistas.core.observers.interface import *\n\n\n@fixture(scope='session')\ndef observer():\n ...
python
new_file
7
1
bsd-3-clause
fbc375a51aca560554f3dd28fa212d6d877449f2
VISTAS-IVES/pyvistas
source/tests/core/test_observer.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add test for optional page admin registrations for Country and CountryGroup." }, { "role": "assistant", "content": "from django.conf import settings\nfrom django.contrib import admin\nfrom django.test import TestCase\n\nfrom ..mo...
python
new_file
1
1
bsd-3-clause
18c93f4c70a2247bcce8a853c30038097cb9f7b2
jamesfoley/cms,jamesfoley/cms,danielsamuels/cms,lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,lewiscollard/cms,danielsamuels/cms,danielsamuels/cms,lewiscollard/cms,dan-gamble/cms,jamesfoley/cms,dan-gamble/cms
cms/apps/pages/tests/test_admin_destructive.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to validate web/db/handlerpresets.json file\n\nSimple validation for `web/db/handlerpresets.json` file. It prints\nerror if handler's name is not same as beginning of value's string.\n\nCatches problems like this in handlerpresets...
python
new_file
3
4
mit
3c5116f3a26fb93ab85fd973462a582a0fa5d877
nkapu/handlers,ouspg/urlhandlers,ouspg/urlhandlers,nkapu/handlers,nkapu/handlers,nkapu/handlers,ouspg/urlhandlers,ouspg/urlhandlers
bin/validate-presets.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check issue numbers to find out of order listings" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport os\nimport sys\nimport re\nfrom collections import defaultdict\n\nCOMIC_RE = re.compile(r'^\\d+ +([^#]+)#(\\d+)'...
python
new_file
2
5
mit
24b6126871a5378faa2e8f9848c279999e50cb96
xchewtoyx/comicmgt,xchewtoyx/comicmgt
ooo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to list undocumented files and directories" }, { "role": "assistant", "content": "#!/usr/bin/env python2.7\n\n# Copyright 2015, Google Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary fo...
python
new_file
3
0
apache-2.0
d34ad4b0b969dd6c10fc7c1646f934016ba8ddd7
makdharma/grpc,yugui/grpc,simonkuang/grpc,dklempner/grpc,matt-kwong/grpc,apolcyn/grpc,kumaralokgithub/grpc,geffzhang/grpc,ctiller/grpc,thinkerou/grpc,chrisdunelm/grpc,ejona86/grpc,donnadionne/grpc,yugui/grpc,nicolasnoble/grpc,dgquintas/grpc,adelez/grpc,PeterFaiman/ruby-grpc-minimal,kpayson64/grpc,grani/grpc,makdharma/g...
tools/distrib/c-ish/check_documentation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add (broken) AWc test for debugging purposes" }, { "role": "assistant", "content": "import pytest\nimport FIAT\nimport finat\nimport numpy as np\nfrom gem.interpreter import evaluate\nfrom fiat_mapping import MyMapping\n\n\ndef t...
python
new_file
3
1
mit
d9720f1fcc3013324c9ea58620df9c458a2e314e
FInAT/FInAT
test/test_awc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add complex parse scenario - environment variables and init" }, { "role": "assistant", "content": "from script_parser import parser\nimport os\n\n\ndef test_environ_init():\n \"\"\" Set up variables in environment and check pa...
python
new_file
1
1
mit
94d7a3b01b7360001817ef3ed3ad2003f0722b14
melkamar/webstore-manager,melkamar/webstore-manager
tests/script_parser/test_parsing_complex.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a unit test file for MessageDirectory" }, { "role": "assistant", "content": "\"\"\"\nCreated on 18 May 2018.\n\n@author: Greg Corbett\n\"\"\"\n\nimport shutil\nimport tempfile\nimport unittest\n\nfrom ssm.message_directory im...
python
new_file
4
2
apache-2.0
d3e90e4dca1cce2f27ccf9c24c1bb944f9d708b9
tofu-rocketry/ssm,apel/ssm,tofu-rocketry/ssm,stfc/ssm,apel/ssm,stfc/ssm
test/test_message_directory.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Print daily form submission counts" }, { "role": "assistant", "content": "import itertools\nfrom datetime import date, datetime, timedelta\n\nfrom django.core.management.base import BaseCommand\n\nfrom corehq.apps.enterprise.mode...
python
new_file
4
3
bsd-3-clause
b363b20440e564b2909736c64cb543cd632b4ae4
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
custom/covid/management/commands/fetch_form_case_counts.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add form tests for LoginForm" }, { "role": "assistant", "content": "\"\"\"accounts app unittests for views\n\n\"\"\"\nfrom django.test import TestCase\n\nfrom accounts.forms import LoginForm\n\n\nclass LoginFormTest(TestCase):\n ...
python
new_file
1
1
mit
7fd09bd791661ab0b12921dfd977591690d9c01a
randomic/aniauth-tdd,randomic/aniauth-tdd
accounts/tests/test_forms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to convert an index to a md5 file." }, { "role": "assistant", "content": "#! /usr/bin/python\n\nfrom __future__ import print_function\nimport sys\nimport photo.index\n\nidx = photo.index.Index(idxfile=sys.argv[1])\nf...
python
new_file
1
0
apache-2.0
28a7077b7f05f52d0bff7a849f8b50f82f73dbdb
RKrahl/photo-tools
idx2md5.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test file to check consistent use of default arguments" }, { "role": "assistant", "content": "\"\"\"Make sure that arguments of open/read/write don't diverge\"\"\"\n\nimport pysoundfile as sf\nfrom inspect import getargspec\n...
python
new_file
1
3
bsd-3-clause
ee1df360979ec24fd8233210372eedd3071cee87
mgeier/PySoundFile
tests/test_argspec.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add API tests for profile validation\n\nAdd positive API tests for profile validation, add missing tests.\n\nChange-Id: I3bed44af9b90e317a0d1d76b883182db9338d40d" }, { "role": "assistant", "content": "# Licensed under the Apache ...
python
new_file
1
2
apache-2.0
05e2b100512a9c9b06c5d7d2701867f155c5e3f0
openstack/senlin,openstack/senlin,stackforge/senlin,openstack/senlin,stackforge/senlin
senlin/tests/tempest/api/profiles/test_profile_validate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cluster evaluation: adjusted rand index" }, { "role": "assistant", "content": "from sklearn import metrics\n\n\nclass ClusterEvaluation(object):\n @staticmethod\n def get_evaluated(evaluated_file):\n with open(ev...
python
new_file
1
2
mit
9d2a2b0e1f066b2606e62ec019b56d4659ed86b1
studiawan/pygraphc
pygraphc/clustering/ClusterEvaluation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for django-simple-history == 1.9.0" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.2 on 2017-06-15 14:00\nfrom __future__ import unicode_literals\n\nfrom django.db import m...
python
new_file
1
0
bsd-3-clause
c4e6b2b68e6acd8f83091fc055897628b8df05bb
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
lowfat/migrations/0105_auto_20170615_1400.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions for parsing log file" }, { "role": "assistant", "content": "import os\nfrom collections import defaultdict\n\nfrom django.conf import settings\nfrom django.core.management import call_command\n\nfrom celery.schedule...
python
new_file
8
7
bsd-3-clause
f06e5a8c701f06d40597cd268a6739988c2fff56
dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/cleanup/tasks.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add abstract box for ComponentSearch so users can drag it into their workflows." }, { "role": "assistant", "content": "#Copied imports from HTTP package init.py file\nfrom PyQt4 import QtGui\nfrom core.modules.vistrails_module im...
python
new_file
9
1
bsd-3-clause
095b9cc5f2e9a87220e6f40f88bf6ecd598ca681
CMUSV-VisTrails/WorkflowRecommendation,CMUSV-VisTrails/WorkflowRecommendation,CMUSV-VisTrails/WorkflowRecommendation
vistrails/packages/componentSearch/init.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add a script that can be used to compare asyncio.sleep to time.sleep" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"https://docs.python.org/3.7/library/asyncio-task.html 変奏版\n\nFeatures:\n- asyncio.gather()...
python
new_file
1
3
mit
c0b37b879b2e20ee71663e64be76ad11c1e1794c
showa-yojyo/bin,showa-yojyo/bin
async/3.7/basic/compsleep.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add quick run script for celex fullscale tests" }, { "role": "assistant", "content": "from celex import Celex\n'''\n- Allows for a quick run of a desired size pulled from any evolution file.\n- Automatically loads the best chromo...
python
new_file
1
0
mit
13b3320399e51bbbb4018ea5fb3ff6d63c8864c7
jacobkrantz/ProbSyllabifier
celexRunScript.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Subjects model, methods for report and export" }, { "role": "assistant", "content": "from collections import defaultdict\nfrom corehq.apps.users.models import CouchUser\nfrom custom.openclinica.const import AUDIT_LOGS\nfrom c...
python
new_file
12
3
bsd-3-clause
25a4c9ba978aef7f648904c654fcc044f429acd4
qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
custom/openclinica/models.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Write python code for the following: Add a script to build a map of all the tiles" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom osgeo import ogr\nfrom osgeo import osr\nfrom glob import glob\nimport os\n\ndriver = ogr.GetDriverByName(\"ESRI Shap...
python
new_file
1
0
mit
22946180e9e5e660be14d453ddf5bb37564ddf33
simonsonc/mn-glo-mosaic,simonsonc/mn-glo-mosaic,simonsonc/mn-glo-mosaic
build-tile-map.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add request bouncer test cases" }, { "role": "assistant", "content": "from rest_framework import status\nfrom rest_framework.test import APITestCase\nfrom django.contrib.auth import get_user_model\n\nfrom api_bouncer.models impor...
python
new_file
1
1
apache-2.0
2b99781e67e1e2e0bb3863c08e81b3cf57a5e296
menecio/django-api-bouncer
tests/test_bouncer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for calc_md5() function" }, { "role": "assistant", "content": "from mws.mws import calc_md5\n\n\ndef test_calc_md5():\n assert calc_md5(b'mws') == b'mA5nPbh1CSx9M3dbkr3Cyg=='\n" } ]
python
new_file
1
1
unlicense
ab1bc996d477c84187df381ec77e7aaab299783b
bpipat/mws,jameshiew/mws,Bobspadger/python-amazon-mws,GriceTurrble/python-amazon-mws
tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create child class for Rainbow bulb" }, { "role": "assistant", "content": "from pyplaybulb.playbulb import Playbulb\n\nEFFECT_FLASH = '00'\nEFFECT_PULSE = '01'\nEFFECT_RAINBOW = '02'\nEFFECT_RAINBOW_FADE = '03'\n\nclass Rainbow(P...
python
new_file
1
1
mit
e110c968ece35e41c467aeb5fceb9274023e7e82
litobro/PyPlaybulb
pyplaybulb/rainbow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add strDiff problem and tests. Minor tweak to setup.py" }, { "role": "assistant", "content": "#!/Applications/anaconda/envs/Python3/bin\n\n\ndef main():\n # Test suite\n tests = [\n [None, None, None], # Should throw...
python
new_file
1
5
mit
37704a2e905342bf867225fb5a8a3fec0c55a9fd
HKuz/Test_Code
Problems/stringDiff.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('contenttypes', '0001_initial'),\n ]\n\n operat...
python
edit
1
0
apache-2.0
9a9ee99129cee92c93fbc9e2cc24b7b933d51aac
hackerkid/zulip,dhcrzf/zulip,Galexrt/zulip,showell/zulip,amanharitsh123/zulip,zulip/zulip,vabs22/zulip,vaidap/zulip,jackrzhang/zulip,jrowan/zulip,hackerkid/zulip,zulip/zulip,tommyip/zulip,kou/zulip,jackrzhang/zulip,brockwhittaker/zulip,brockwhittaker/zulip,tommyip/zulip,shubhamdhama/zulip,eeshangarg/zulip,shubhamdhama/...
confirmation/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add half-naive solution to problem 10" }, { "role": "assistant", "content": "from math import sqrt\nfrom typing import Generator\n\n\ndef prime_generator(limit: int) -> Generator[int, None, int]:\n if limit < 2:\n retur...
python
new_file
2
4
bsd-3-clause
2207351e805f11c39f843ca0e0eff261a7a5bde8
gidj/euler,gidj/euler
python/010_summation_of_primes/primes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: UPDATE - add migration file" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n de...
python
new_file
1
0
mit
c3a9d78ca3ffbad0e11192e896db8cd0c2758154
mingkim/QuesCheetah,mingkim/QuesCheetah,mingkim/QuesCheetah,mingkim/QuesCheetah
vote/migrations/0002_auto_20160315_0006.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models.sql.expressions import SQLEvaluator\nfrom django.db.models.expressions import ExpressionNode\n\n\nOPERATION_MAP = {\n ExpressionNode.ADD: lambda x, y: x + y,\n ExpressionNode.SUB: lambda x, y: x - y,\n Express...
python
edit
1
4
bsd-3-clause
e120f5fac68e2daf7cdf6e9d7b17b1f63a330595
django-nonrel/djangoappengine,Implisit/djangoappengine,dwdraju/djangoappengine
djangoappengine/db/expressions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set 1 - Challenge 2" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nif __name__ == '__main__':\n s1 = 0x1c0111001f010100061a024b53535009181c\n s2 = 0x686974207468652062756c6c277320657965\n\n print(hex(s1 ...
python
new_file
1
0
apache-2.0
1058ed0847d151246299f73b325004fc04946fa0
Scythe14/Crypto
Basics/challenge_2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the plugin framework from common; use and test.\n\nFor blueprint novaplugins.\n\nChange-Id: Id4a5ae3ebb91f941956e2f73ecfd9ea1d290a235" }, { "role": "assistant", "content": "# Copyright 2011 OpenStack LLC.\n# All Rights Reserv...
python
new_file
4
3
apache-2.0
7ab0cc93703abf6716b353f38a009897ab154ce4
n0ano/ganttclient
nova/tests/test_plugin_api_extensions.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 12\n\nHighly divisible triangular number" }, { "role": "assistant", "content": "\"\"\"Highly divisible triangular number\n\nThe sequence of triangle numbers is generated by adding the natural numbers.\n\n...
python
new_file
1
6
mit
747ff2fbaf9e6216ba932f446418819723611174
rlucioni/project-euler
euler/solutions/solution_12.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\n\nfrom django.db import models\n\nfrom logicaldelete import managers\n\n\nclass Model(models.Model):\n \"\"\"\n This base model provides date fields and functionality to enable logical\n delete functionality in der...
python
edit
2
5
mit
31f16844dd98516b1f57e3913d0fdba3e5715aa8
pinax/pinax-models,angvp/django-logical-delete,Ubiwhere/pinax-models,angvp/django-logical-delete,naringas/pinax-models
logicaldelete/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: DEMO: Create a single script to run the three demo services\n\n(image repo, director, and timeserver)" }, { "role": "assistant", "content": "\"\"\"\nstart_servers.py\n\n<Purpose>\n A simple script to start the three cloud-side U...
python
new_file
5
1
mit
e233352d5016c2b57ec4edbc4366ca4347bc1d98
uptane/uptane,awwad/uptane,awwad/uptane,uptane/uptane
demo/start_servers.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add auto migration for minor model changes" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport django.utils.timezone\n\n\ncla...
python
new_file
1
0
mit
3dfc4bfbb71d1e97a6b8213f338df487fbae5fcc
andychase/codebook,andychase/codebook
topics/migrations/0016_auto_20151221_0923.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Store OBO data into a suitable queryable format\n\nAchieved using transitive closures, which allows a hierarchy structure\n(OBO ontology) to be stored in a SQL format." }, { "role": "assistant", "content": "# Note: based on - htt...
python
new_file
1
5
mit
e84d811f13347da3625e3a30d200e836f6393e9d
jawrainey/healthchat,jawrainey/healthchat
scripts/obo_to_sql.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a Locust load testing script\n\nThis isn't quite doing everything I want but it's a nice way to check some performance characteristics" }, { "role": "assistant", "content": "from locust import HttpLocust, TaskSet, task\nimpor...
python
new_file
1
1
apache-2.0
65aee742ea0e95b200152f8a90d9ad5ee86b2512
ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod
scripts/locustfile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic support for LimitlessLED" }, { "role": "assistant", "content": "\"\"\"\nhomeassistant.components.light.limitlessled\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSupport for LimitlessLED bulbs, also known as...\n\nEasyBulb\nA...
python
new_file
3
4
apache-2.0
a86852fe908bb0a44ef267a75b9446ddcaf03f6e
Duoxilian/home-assistant,betrisey/home-assistant,CCOSTAN/home-assistant,open-homeautomation/home-assistant,Smart-Torvy/torvy-home-assistant,pschmitt/home-assistant,hexxter/home-assistant,srcLurker/home-assistant,postlund/home-assistant,alexmogavero/home-assistant,MungoRae/home-assistant,srcLurker/home-assistant,turboko...
homeassistant/components/light/limitlessled.py
rejected_duplicate
Near-duplicate of sample 6619
true
[ { "role": "user", "content": "Write python code for the following: Add check script to test 'deprecated' decorator" }, { "role": "assistant", "content": "from __future__ import print_function, absolute_import, division\n\nimport imgaug as ia\n\n\nclass Dummy1(object):\n @ia.deprecated(alt_fun...
python
new_file
1
1
mit
fc72ca537e6eaf5f4bf04ed4511ec1acdd9eae11
aleju/imgaug,aleju/imgaug,aleju/ImageAugmenter
checks/check_deprecation_warning.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write test for mock_pose generator." }, { "role": "assistant", "content": "try:\n from unittest.mock import patch, MagicMock\nexcept ImportError:\n from mock import patch, MagicMock\n\nimport pytest\n\nimport rospy\n\nMockT...
python
new_file
1
1
mit
b9759f60c9f107c3d2c319f53ed2985ee58dc319
masasin/spirit,masasin/spirit
src/tests/test_mock_pose.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add wiki macro for the Like button." }, { "role": "assistant", "content": "\"\"\"\n@note: enable X\n\"\"\"\n\nfrom trac.core import Component\nfrom trac.wiki.macros import WikiMacroBase\n\n\nclass FacebookPlugins(Component):\n ...
python
new_file
2
3
mit
9b48cb18980ae2e55ce02a84576f65f0bd8a27bb
thijstriemstra/trac-facebook-plugins
FacebookPlugins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add one public IP provider" }, { "role": "assistant", "content": "from json import load\nfrom urllib2 import urlopen\n\nclass JsonIp:\n\n def __init__(self):\n url = 'https://jsonip.com/'\n uri = urlopen(url)\n ...
python
new_file
1
1
mit
8d1016437e87794fb39b447b51427bae98a51bc2
Saphyel/ipteller,Saphyel/ipteller
classes/jsonip.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test runner for our jqplot demo too" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nnose runner script.\n\"\"\"\n__requires__ = 'moksha'\n\nimport pkg_resources\nimport nose\n\nif __name__ == '__main__...
python
new_file
3
0
apache-2.0
ef1fa03d753f5d8a0b32831320a1b3e076ace363
ralphbean/moksha,mokshaproject/moksha,lmacken/moksha,mokshaproject/moksha,pombredanne/moksha,mokshaproject/moksha,pombredanne/moksha,ralphbean/moksha,lmacken/moksha,lmacken/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha,mokshaproject/moksha
moksha/apps/demo/MokshaJQPlotDemo/run_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for longitivity-testing: both LED-s ON at the same time for extended periods of time" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport time\nimport sys\nimport os\nfrom random import randint\n\n# Hack ...
python
new_file
1
0
mit
b3dcbe95d766d902d22a0c4c171cbbe5ce207571
anroots/teensy-moonica
python/tests/stress_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example using Tom's registration code in scipy." }, { "role": "assistant", "content": "\"\"\"Example using Tom's registration code from scipy.\n\n\"\"\"\n\nfrom os import path\nfrom glob import glob\n\nimport scipy.ndimage._r...
python
new_file
4
0
bsd-3-clause
c8ec0689950a5fea0aff98afe54b172bd84e2ce9
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
examples/coregister.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Implement some tests for AgentAPI" }, { "role": "assistant", "content": "# No shebang line, this module is meant to be imported\n#\n# Copyright 2013 Oliver Palmer\n# Copyright 2013 Ambient Entertainment GmbH & Co. KG\n#\n# Licens...
python
new_file
3
1
apache-2.0
407c08899eccea60a2ae534ab0c1b000c58708ab
pyfarm/pyfarm-master,pyfarm/pyfarm-master,pyfarm/pyfarm-master
tests/test_agent_api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple analysis tool to get some structural properties about an AG's specfile." }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport os\nimport sys\nimport lxml \nfrom lxml import etree\nimport math \n\nclass S...
python
new_file
5
6
apache-2.0
33448340d278da7e0653701d78cbab317893279d
jcnelson/syndicate,iychoi/syndicate,iychoi/syndicate,jcnelson/syndicate,iychoi/syndicate,iychoi/syndicate,iychoi/syndicate,iychoi/syndicate,iychoi/syndicate,jcnelson/syndicate,jcnelson/syndicate,jcnelson/syndicate,jcnelson/syndicate,iychoi/syndicate,jcnelson/syndicate,jcnelson/syndicate
AG/datasets/analyze.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add generic function for iterating arrays." }, { "role": "assistant", "content": "def iterate_array(arr, f=None):\n i = 0\n while True:\n if not arr[i]:\n break\n yield arr[i] if f is None else f(ar...
python
new_file
1
4
bsd-3-clause
62b01c3c1614d5719cc69be951b2f6c660e40faa
matusvalo/python-easyldap
pyldap/libldap/tools.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add check script for MultiplyHueAndSaturation" }, { "role": "assistant", "content": "from __future__ import print_function, division\n\nimport numpy as np\n\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\n\n\ndef main...
python
new_file
1
4
mit
30a0b17d028f279a9877150ac4eb60b1ce135fa2
aleju/imgaug,aleju/imgaug,aleju/ImageAugmenter
checks/check_multiply_hue_and_saturation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python 3 Script for Converting Image Types" }, { "role": "assistant", "content": "import cairosvg\nimport os\n\n# MUST RUN IN PYTHON 3 and pip install cairosvg\n\nfile_dir = '../data/hough_test/Test_Set_1/'\n\nsvgs = os.listd...
python
new_file
1
0
mit
a9ca7f2f22551256213ecd32047022048c72db5c
Molecular-Image-Recognition/Molecular-Image-Recognition
scripts/convert_svgs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests: Add test for nested while with exc and break." }, { "role": "assistant", "content": "# test nested whiles within a try-except\n\nwhile 1:\n print(1)\n try:\n print(2)\n while 1:\n print(3)\n ...
python
new_file
1
0
mit
9870fdd4b0996254216ff85a4dc0f9706843ca50
ruffy91/micropython,jmarcelino/pycom-micropython,henriknelson/micropython,puuu/micropython,neilh10/micropython,xuxiaoxin/micropython,utopiaprince/micropython,cwyark/micropython,aethaniel/micropython,tuc-osg/micropython,vitiral/micropython,orionrobots/micropython,noahchense/micropython,paul-xxx/micropython,ganshun666/mi...
tests/basics/while_nest_exc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [RM-11742] Add argparse tests for gatherkeys\n\nSigned-off-by: Travis Rhoden <<EMAIL>>" }, { "role": "assistant", "content": "import pytest\n\nfrom ceph_deploy.cli import get_parser\n\n\nclass TestParserGatherKeys(object):\n\n ...
python
new_file
1
1
mit
8c7fa4e16805dc9e8adbd5615c610be8ba92c444
SUSE/ceph-deploy,zhouyuan/ceph-deploy,shenhequnying/ceph-deploy,ghxandsky/ceph-deploy,zhouyuan/ceph-deploy,ceph/ceph-deploy,SUSE/ceph-deploy,branto1/ceph-deploy,isyippee/ceph-deploy,osynge/ceph-deploy,Vicente-Cheng/ceph-deploy,isyippee/ceph-deploy,ceph/ceph-deploy,trhoden/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,SUSE...
ceph_deploy/tests/parser/test_gatherkeys.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for easy diffing of two Incars.\n\n\nFormer-commit-id: 998a47c0b96b3024abd82b196f431926cc50847d [formerly 927396038d147b633bee31988cf1e016258c5320]\nFormer-commit-id: 4a8c6bb9cfef4a3a3f6cc211b7ef558a06f523c3" }, { "role"...
python
new_file
2
3
mit
f24fe32329625ec037a9afc8d3bdeed5f41e69a0
gpetretto/pymatgen,aykol/pymatgen,Bismarrck/pymatgen,czhengsci/pymatgen,johnson1228/pymatgen,Bismarrck/pymatgen,gVallverdu/pymatgen,richardtran415/pymatgen,blondegeek/pymatgen,czhengsci/pymatgen,dongsenfo/pymatgen,montoyjh/pymatgen,czhengsci/pymatgen,fraricci/pymatgen,nisse3000/pymatgen,nisse3000/pymatgen,blondegeek/py...
scripts/diff_incar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pych.extern import Chapel\n\n@Chapel(sfile=\"users.onlyonce.chpl\")\ndef useTwoModules(x=int, y=int):\n return int\n\nif __name__ == \"__main__\":\n print(useTwoModules(2, 4))\n\nimport testcase\n# contains the general testing me...
python
edit
1
1
apache-2.0
e61dcb055fb4767e6e662648c89cbdfda4422c97
chapel-lang/pychapel,russel/pychapel,chapel-lang/pychapel,russel/pychapel,russel/pychapel,chapel-lang/pychapel
docs/source/examples/test_no_depends_fails.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add outlier detection util script." }, { "role": "assistant", "content": "#!/usr/bin/env python2\n#\n# Detect outlier faces (not of the same person) in a directory\n# of aligned images.\n# Brandon Amos\n# 2016/02/14\n#\n# Copyrig...
python
new_file
5
5
apache-2.0
58ac46511964ca1dd3de25d2b6053eb785e3e281
Alexx-G/openface,nmabhi/Webface,Alexx-G/openface,nmabhi/Webface,xinfang/face-recognize,francisleunggie/openface,cmusatyalab/openface,nmabhi/Webface,Alexx-G/openface,francisleunggie/openface,nhzandi/openface,xinfang/face-recognize,Alexx-G/openface,nmabhi/Webface,xinfang/face-recognize,cmusatyalab/openface,francisleunggi...
util/detect-outliers.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add tests for nginx version\n\nI had considered doing something with regex like `\\d+(\\.\\d+)*`, then I\nrealized that there are other valid version strings that perhaps do not\ncontain numerics separated by `.`, so this option is a bit mor...
python
new_file
1
1
apache-2.0
b333d95f3f4187b9d9b480ba8ff4985a62d65f41
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/unit/modules/test_nginx.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for the @cachit decorator.\n\nMake sure that the caching decorator correctly\ncopies over the function docstring and function name.\n\nThis fixes issue #744 from the issue tracker.\n\nSigned-off-by: Jochen Voss <<EMAIL>>\nSigned-o...
python
new_file
1
1
bsd-3-clause
964d1f97df600308b23b6a91b9de8811795509a4
cccfran/sympy,shipci/sympy,wyom/sympy,Titan-C/sympy,ahhda/sympy,meghana1995/sympy,wanglongqi/sympy,pandeyadarsh/sympy,vipulroxx/sympy,jbbskinny/sympy,jaimahajan1997/sympy,Arafatk/sympy,grevutiu-gabriel/sympy,Gadal/sympy,jerli/sympy,mcdaniel67/sympy,Mitchkoens/sympy,wyom/sympy,oliverlee/sympy,ga7g08/sympy,tovrstra/sympy...
sympy/core/tests/test_cache.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement consumer for adjusting screen brightness.\n\nThis script polls \"display-control-destination-brightness\" redis key and\nslowly adjusts screen brightness towards the value. Key is automatically\ndeleted when destination is reached....
python
new_file
5
8
bsd-3-clause
80580b8667558e3a4034b31ac08773de70ef3b39
ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display
display_control_consumer/run.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add missing IDL Visistor class\n\nThis class provides a simple mechanism for recursively traversing the AST\nfor both simple and version aware traversal.\n\nTBR= <EMAIL>\nBUG= http://code.google.com/p/chromium/issues/detail?id=87684\nTEST= p...
python
new_file
2
4
bsd-3-clause
3a19187e8116e8dc20166786fb1ca4d14b527950
yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,adobe/chromium,adobe/chromium...
ppapi/generators/idl_visitor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add pipeline for untar'ing GCS blobs.\n\nPiperOrigin-RevId: 247210932" }, { "role": "assistant", "content": "r\"\"\"Untar .tar and .tar.gz GCS files.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import divisio...
python
new_file
1
2
apache-2.0
0f1cf524c2b90d77e17d516a30d62632ebb5ed2f
GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare,GoogleCloudPlatform/healthcare
datathon/datathon_etl_pipelines/generic_imagining/untar_gcs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to convert release notes from Markdown" }, { "role": "assistant", "content": "import sys\nimport mistune\n\nprint(sys.argv[1])\n\nwith open(sys.argv[1], \"r\") as source_file:\n source = source_file.read()\n\nhtml =...
python
new_file
1
2
mit
bbed7b813b6c809ee9615eabf2fcf4d3156b1c36
adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython
tools/convert_release_notes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The supported extensions, as defined by https://github.com/github/markup\nsupported_extensions = [\n '.markdown', '.mdown', '.mkdn', '.md',\n '.textile',\n '.rdoc',\n '.org',\n '.creole',\n '.mediawiki', '.wiki',\n '....
python
edit
1
0
mit
bb940826d78e44a4098023e83d788b3d915b9b1f
jbarreras/grip,joeyespo/grip,mgoddard-pivotal/grip,joeyespo/grip,mgoddard-pivotal/grip,ssundarraj/grip,jbarreras/grip,ssundarraj/grip
grip/constants.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to check TOI coverage for a bbox and zoom range" }, { "role": "assistant", "content": "import mercantile\nimport argparse\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('min_lon',\n ...
python
new_file
1
4
mit
1e9980aff2370b96171011f7fa50d4517957fa86
tilezen/tilepacks
tilepack/check_toi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a largish auto-generated test for the aligned bundling feature, along with\nthe script generating it. The test should never be modified manually. If anyone\nneeds to change it, please change the script and re-run it.\n\nThe script is pla...
python
new_file
1
5
bsd-3-clause
7e600a791bec2f8639aae417a1ea052ca94cf7b9
lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx,lodyagin/bare_cxx
testgen/mc-bundling-x86-gen.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module for range support." }, { "role": "assistant", "content": "from collections import namedtuple\n\nfrom vintage_ex import EX_RANGE_REGEXP\nimport location\n\n\nEX_RANGE = namedtuple('ex_range', 'left left_offset separator...
python
new_file
1
6
mit
f9b38f675df9752a4b5309df059c6d15a1e1b3c2
SublimeText/VintageEx
ex_range.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for Message Queue" }, { "role": "assistant", "content": "from cobwebs.mq.core import RPCLink, TopicsLink\nfrom cobwebs.mq.backends.rabbitmq import driver\nimport pytest\nimport spider\nimport json\nfrom unittest im...
python
new_file
6
1
apache-2.0
3fbf2c29a54225e7d4dd882637e68cfe3a4d0101
asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider
src/cobwebs/tests/test_mq.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add basic mechanism to override the default EntryAdmin" }, { "role": "assistant", "content": "\"\"\"EntryAdmin for zinnia-wymeditor\"\"\"\nfrom django.contrib import admin\n\nfrom zinnia.models import Entry\nfrom zinnia.admin.ent...
python
new_file
1
0
bsd-3-clause
6705e0e23d13a94726556714e11dfbb7a916877d
django-blog-zinnia/zinnia-wysiwyg-wymeditor,layar/zinnia-wysiwyg-wymeditor,django-blog-zinnia/zinnia-wysiwyg-wymeditor,layar/zinnia-wysiwyg-wymeditor,layar/zinnia-wysiwyg-wymeditor,django-blog-zinnia/zinnia-wysiwyg-wymeditor,layar/zinnia-wysiwyg-wymeditor,django-blog-zinnia/zinnia-wysiwyg-wymeditor
zinnia_wymeditor/admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module capable of rendering a circle when ran" }, { "role": "assistant", "content": "import pygame\n\n\npygame.init()\n\n#-- SCREEN CHARACTERISTICS ------------------------->>>\nbackground_color = (255,255,255)\n(width, heigh...
python
new_file
1
0
mit
6454548da01dbc2b9f772a5c0ffb11a03dc933e7
withtwoemms/pygame-explorations
draw_shape.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test that noindex flag will only show robots metatag when set" }, { "role": "assistant", "content": "from django.test import TestCase\nfrom django.conf import settings\n\n\nclass TestAnalytics(TestCase):\n\n def test_noindex_f...
python
new_file
1
1
mit
2c0ce3c64720122bf2fdd80aeb2ff8359873ac83
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
municipal_finance/tests/test_analytics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial stub of GerritClient class\n\nThe Gerrit client class will be used as an interface to the\nGerrit events stream and query functionality.\n\nThis is the intial stub. More functionality will be added,\nand existing stream function...
python
new_file
1
2
mit
26bc11340590b0b863527fa12da03cea528feb46
morucci/pygerrit,sonyxperiadev/pygerrit,dpursehouse/pygerrit,benjiii/pygerrit,gferon/pygerrit2,markon/pygerrit2,dpursehouse/pygerrit2
pygerrit/client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration script to fix valid users with date_confirmed==None" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Script to migrate users with a valid date_last_login but no date_confi...
python
new_file
1
3
apache-2.0
5a857703de5fc1e67e958afb41a10db07b98bfa1
laurenrevere/osf.io,doublebits/osf.io,kch8qx/osf.io,mluo613/osf.io,petermalcolm/osf.io,GageGaskins/osf.io,ZobairAlijan/osf.io,caneruguz/osf.io,njantrania/osf.io,asanfilippo7/osf.io,zkraime/osf.io,petermalcolm/osf.io,himanshuo/osf.io,hmoco/osf.io,GaryKriebel/osf.io,jmcarp/osf.io,rdhyee/osf.io,monikagrabowska/osf.io,haoy...
scripts/migrate_unconfirmed_valid_users.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Game Time in python" }, { "role": "assistant", "content": "start, end = map(int, input().split())\n\nif start == end:\n result = 24\nelif end - start >= 0:\n result = end - start\nelse:\n result = 24 + end - start\...
python
new_file
1
0
mit
389adca1fd52747814f370de2d066a1743544469
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/beecrowd/1046/1046.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions for getting available checksums for a channel from remote and disk." }, { "role": "assistant", "content": "import json\nimport os\nimport re\n\nimport requests\nfrom django.core.cache import cache\n\nfrom kolibri.co...
python
new_file
1
6
mit
10f99acc11051b37595751b9b9b84e11dd133a64
mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,indirectlylit/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri
kolibri/core/content/utils/file_availability.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add draft of example using the new @bench" }, { "role": "assistant", "content": "from csv import DictWriter\n\nfrom ktbs_bench.utils.decorators import bench\n\n\n@bench\ndef batch_insert(graph, file):\n \"\"\"Insert triples in...
python
new_file
1
1
mit
27d37833663842405f159127f30c6351958fcb10
ktbs/ktbs-bench,ktbs/ktbs-bench
bench_examples/bench_dec_insert.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for retrieving credentials from environment variables" }, { "role": "assistant", "content": "import sys\n\nimport fixtures\nimport imgurpython\nimport testtools\n\nimport imgur_cli.cli as cli\n\nFAKE_ENV = {'IMGUR_C...
python
new_file
3
4
mit
edeffbcbe8fb239553c73fa37e73c0188ffc2479
ueg1990/imgur-cli
tests/test_cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for signup code exists method" }, { "role": "assistant", "content": "from django.conf import settings\nfrom django.core import mail\nfrom django.core.urlresolvers import reverse\nfrom django.test import TestCase, overri...
python
new_file
7
1
mit
b171eb0c77f2d68051b48145f4e49275ed6860b9
pinax/django-user-accounts,pinax/django-user-accounts
account/tests/test_models.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add data migration to populate preprint_doi_created field on existing published preprints where DOI identifier exists. Set to preprint date_published field." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Gener...
python
new_file
1
3
apache-2.0
bac06acb1e6255040f371232776f3da75fb9247a
baylee-d/osf.io,baylee-d/osf.io,erinspace/osf.io,cslzchen/osf.io,mattclark/osf.io,mfraezz/osf.io,cslzchen/osf.io,caseyrollins/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,Johnetordoff/osf.io,saradbowman/osf.io,icereval/osf.io,brianjgeiger/osf.io,felliott/osf.io,cslzchen/osf.io,TomBaxter/osf.io,felliott/osf.io...
osf/migrations/0069_auto_20171127_1119.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Tests: Add unittest for eventlogger config validation." }, { "role": "assistant", "content": "#!/usr/bin/env python2\nimport unittest\nimport subprocess\nimport threading\nimport tempfile\nimport os\n\nfrom testdc import *\n\nDAE...
python
new_file
2
2
bsd-3-clause
d4a7bbe27b285e455a3beafefd22fc493edeb161
ketoo/Astron,pizcogirl/Astron,ketoo/Astron,blindsighttf2/Astron,blindsighttf2/Astron,ketoo/Astron,pizcogirl/Astron,pizcogirl/Astron,ketoo/Astron,blindsighttf2/Astron,pizcogirl/Astron,blindsighttf2/Astron
test/test_config_eventlogger.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check whether Azure CLI is in ARM mode\n\nThis can prevent some hard-to-debug error messages later on." }, { "role": "assistant", "content": "# Copyright 2016 PerfKitBenchmarker Authors. All rights reserved.\n#\n# Licensed under ...
python
new_file
1
2
apache-2.0
081b5aabae205ad7c23c512be15ee26276dc8a29
GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,meteorfox/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,GoogleCloudPlatform/PerfKitBenchmarker,meteorfox/PerfKitBenchmarker
perfkitbenchmarker/providers/azure/util.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create an example of storing units in HDF5\n\nThis example script demonstrates how to store unit information attached to an array of numbers using HDF5 in such a way that the original data can be recovered upon reading the file. It uses the ...
python
new_file
1
0
bsd-3-clause
95874a5e06ff70d1cbea49321549beee5cc5abba
h5py/h5py,h5py/h5py,h5py/h5py
examples/store_and_retrieve_units_example.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some minimal testing for BandRCModel to the test suite." }, { "role": "assistant", "content": "import numpy as np\nimport climlab\nimport pytest\n\n# The fixtures are reusable pieces of code to set up the input to the tests.\...
python
new_file
1
2
mit
2c8752cd586f6d02ce8da4bc3a79660889ed7f3f
cjcardinale/climlab,brian-rose/climlab,brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab
climlab/tests/test_bandrc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Define function to retrieve imgur credentials" }, { "role": "assistant", "content": "import argparse\nimport logging\nimport os\n\nimport imgurpython\n\nfrom collections import namedtuple\n\nlogger = logging.getLogger(__name__)\n...
python
new_file
3
4
mit
55dd21610a2ed1befed6b4560528e8a6bf3602e2
ueg1990/imgur-cli
imgur_cli/cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check for duplicates based on coordinates and select only one database (EU/NASA)" }, { "role": "assistant", "content": "import pandas as pd\nfrom astropy import coordinates as coord\nfrom astropy import units as u\n\n\nclass Swee...
python
new_file
6
3
mit
f3f363e8911d3a635d68c7dbe767ee2585ed4f36
DanielAndreasen/SWEET-Cat
checkDuplicates.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 693. Binary Number with Alternating Bits\n\n693. Binary Number with Alternating Bits: https://leetcode.com/problems/binary-number-with-alternating-bits/" }, { "role": "assistant", "content": "class Solution(ob...
python
new_file
1
1
apache-2.0
cd910f95753a138e2df48a1370e666bee49ad1dd
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/binary-number-with-alternating-bits.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for response status code" }, { "role": "assistant", "content": "import hug\nfrom falcon import HTTP_400\n\n@hug.get()\ndef only_positive(positive: int, response):\n if positive < 0:\n response.status = HTTP_...
python
new_file
1
2
mit
5470661c6f171f1e9da609c3bf67ece21cf6d6eb
timothycrosley/hug,timothycrosley/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug
examples/return_400.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add html stripper for announcements" }, { "role": "assistant", "content": "from html.parser import HTMLParser\n\nclass HTMLStripper(HTMLParser):\n def __init__(self):\n super().__init__()\n self.reset()\n ...
python
new_file
1
1
mit
e54c82c336827c1fc835837006885c245a05e5cb
karenang/ivle-bot,karen/ivle-bot
html_stripper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test covering no RunStop for v2." }, { "role": "assistant", "content": "# This is a special test because we corrupt the generated data.\n# That is why it does not reuse the standard fixures.\n\nimport tempfile\nfrom suitcase....
python
new_file
4
2
bsd-3-clause
d53358a6a0a564a5b4982f7f3dfdfd1163d6a295
ericdill/databroker,ericdill/databroker
databroker/tests/test_v2/test_no_run_stop.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test coverage for utility module" }, { "role": "assistant", "content": "#\n# (C) Copyright IBM Corp. 2017\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complian...
python
new_file
1
1
apache-2.0
c757c6ad714afb393c65c1b82bca31de357332fc
lresende/toree-gateway,lresende/toree-gateway
python/util_test.py
accepted
null
true