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 generate data using jmeter: add fabric script." }, { "role": "assistant", "content": "from datetime import datetime, timedelta\nfrom fabric.api import local, task, lcd\nimport random\n\n@task\ndef create_salesman_order():\n ...
python
new_file
4
5
mit
f1b09372f3a4286925ba5892c3f5fded399932bb
tranhuucuong91/test-tools
generate-data-using-jmeter/05-fabric-create-salesman-order/fabfile.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom contextlib import contextmanager\n\nfrom sentry.digests.backends.base import Backend\n\n\nclass DummyBackend(Backend):\n def add(self, key, record):\n pass\n\n @contextmanager\n ...
python
edit
1
1
bsd-3-clause
342da37f14c6ac991bd3f7c904bd5b7f1196493a
looker/sentry,mvaled/sentry,JamesMura/sentry,mvaled/sentry,zenefits/sentry,zenefits/sentry,fotinakis/sentry,alexm92/sentry,JamesMura/sentry,BuildingLink/sentry,mvaled/sentry,jean/sentry,JamesMura/sentry,BuildingLink/sentry,JackDanger/sentry,gencer/sentry,fotinakis/sentry,gencer/sentry,daevaorn/sentry,JackDanger/sentry,...
src/sentry/digests/backends/dummy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for pyramid functions" }, { "role": "assistant", "content": "from numpy.testing import assert_array_equal, run_module_suite\nfrom skimage import data\nfrom skimage.transform import (pyramid_reduce, pyramid_expand,\n ...
python
new_file
1
2
bsd-3-clause
eaed3dff1e478ee0ba9e1564ab22fc9ec059f166
michaelpacer/scikit-image,almarklein/scikit-image,bennlich/scikit-image,paalge/scikit-image,emon10005/scikit-image,youprofit/scikit-image,GaZ3ll3/scikit-image,SamHames/scikit-image,warmspringwinds/scikit-image,bsipocz/scikit-image,pratapvardhan/scikit-image,SamHames/scikit-image,rjeli/scikit-image,vighneshbirodkar/scik...
skimage/transform/tests/test_pyramids.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for running rfmake on emerge data" }, { "role": "assistant", "content": "\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou ma...
python
new_file
3
3
apache-2.0
d3d45373acb04e4a6128874437092aabd55ceac9
Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production
scripts/emerge/automate_rfmake.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Automate calculation of canonical URLs" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport os\nimport re\n\nVERSION_MASK = \"__version__\"\n\n\ndef split_version(f):\n m = re.match(\"(master|v[0-9]+\\\\.[0-9...
python
new_file
2
2
apache-2.0
29bd89c6ca182afa8b5f163ddf1bd985bec4ed3f
bcreane/calico,bcreane/calico,bcreane/calico,bcreane/calico,bcreane/calico,bcreane/calico
release-scripts/update-canonical-urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic accepted talks template tag" }, { "role": "assistant", "content": "from __future__ import unicode_literals\nfrom django import template\n\nfrom conference import models\n\nfrom ..utils import profile_url, talk_title\n\n...
python
new_file
1
11
bsd-2-clause
faa4f2f26b051dc9946d9ee1d3ca209aebdd8880
artcz/epcon,EuroPython/epcon,artcz/epcon,EuroPython/epcon,malemburg/epcon,artcz/epcon,matrixise/epcon,EuroPython/epcon,malemburg/epcon,matrixise/epcon,malemburg/epcon,artcz/epcon,malemburg/epcon,artcz/epcon,matrixise/epcon,EuroPython/epcon,matrixise/epcon,matrixise/epcon,artcz/epcon,matrixise/epcon,malemburg/epcon,male...
p3/templatetags/accepted_talks.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: 完成了第80题: Remove Duplicates from Sorted Array II" }, { "role": "assistant", "content": "class Solution(object):\n def removeDuplicates(self, nums):\n \"\"\"\n :type nums: List[int]\n :rtype: int\n \"...
python
new_file
1
5
mit
e28ebe8bf2209d624e4b9470a4f86dcffcc5be56
ChuanleiGuo/AlgorithmsPlayground,ChuanleiGuo/AlgorithmsPlayground,ChuanleiGuo/AlgorithmsPlayground,ChuanleiGuo/AlgorithmsPlayground
src/80_Remove_Duplicates_from_Sorted_Array_II.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add very basic NumbersApi example" }, { "role": "assistant", "content": "from bessie import BaseClient, Endpoint\n\n\nclass NumbersApi(BaseClient):\n\n\tendpoints = [\n\t\tEndpoint('GET', 'random', None),\n\t\tEndpoint('GET', '<n...
python
new_file
1
0
mit
62fa48e28ab46c4b48e9fcd3cc909b80f83c1fb6
andymitchhank/bessie
examples/Numbers/numbers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for phenotypes page." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom flask import url_for\n\ndef test_phenotypes(app, institute_obj):\n # GIVEN an initialized app\n # GIVEN a valid user and ins...
python
new_file
1
1
bsd-3-clause
31da92f943c8db6b81c41bbca49f461250b9ae83
Clinical-Genomics/scout,Clinical-Genomics/scout,Clinical-Genomics/scout
tests/server/blueprints/phenotypes/test_server_phenotypes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a `create_engine` function which creates an engine from a DSN." }, { "role": "assistant", "content": "\"\"\"\nKatagawa engines are the actual SQL connections behind the scenes. They actually emit the raw SQL to the database\n...
python
new_file
1
6
mit
1740e3550ecd73c296a5adf90383ebb7c6c1fcf2
SunDwarf/asyncqlio
katagawa/engine/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for (and fix a minor bug in) the last two commits." }, { "role": "assistant", "content": "from validator.errorbundler import ErrorBundle\nfrom validator.testcases import scripting\n\nscripting.traverser.DEBUG = True\n\n...
python
new_file
1
2
bsd-3-clause
557350d511b04f85f46b0693fa5769ebd3468793
eviljeff/app-validator,eviljeff/app-validator,diox/amo-validator,muffinresearch/amo-validator,eviljeff/app-validator,kmaglione/amo-validator,kumar303/amo-validator,mstriemer/amo-validator,muffinresearch/amo-validator,mozilla/app-validator,eviljeff/app-validator,diox/amo-validator,stasm/app-validator,mattbasta/perfalato...
tests/test_js_bootstrapped.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add placeholder for gold standard" }, { "role": "assistant", "content": "# ------------------------------------------------\n# built-ins\nimport unittest\n\n# local\nfrom utils.base import TestPostgapBase\n# ---------------------...
python
new_file
1
1
apache-2.0
dcdf0247ff1612ef257a5ab49fe54c7f56c19ea3
Ensembl/cttv024,Ensembl/cttv024
tests/data_checks/test_gold_standards.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add windows ip module integration tests" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Import Python libs\nfrom __future__ import absolute_import\nimport re\n\n# Import Salt Testing libs\nfrom tests.support.c...
python
new_file
1
1
apache-2.0
90c3f568b1179e4c5da9f8349f909d25e5221f10
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/modules/test_win_ip.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create migration febbe2d7e47b for fernet columns\n\nUpdates fastly_encrypted_api_key and aws_encrypted_secret_key to use\nLargeBinary types for their columns." }, { "role": "assistant", "content": "\"\"\"Use LargeBinary for ferne...
python
new_file
1
1
mit
677f721e38dcbefaf9378eba6e54a5f4b63c1a3f
lsst-sqre/ltd-keeper,lsst-sqre/ltd-keeper
migrations/versions/febbe2d7e47b_use_largebinary_for_fernet_key_columns.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the Legendre benchmark in Sage" }, { "role": "assistant", "content": "print \"import...\"\nfrom timeit import default_timer as clock\nfrom sage.all import var, Integer\nprint \" done.\"\n\ndef fact(n):\n if n in [0, 1]:...
python
new_file
5
2
mit
3ea5e8956987b2c7ff0830186ca601118693f3d1
symengine/symengine.py,symengine/symengine.py,bjodah/symengine.py,symengine/symengine.py,bjodah/symengine.py,bjodah/symengine.py
benchmarks/legendre1_sage.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to make the .num.txt.gz file from the fastq" }, { "role": "assistant", "content": "import gzip\nfrom sys import argv\n\nif __name__ == \"__main__\":\n fastq = gzip.open(argv[1], 'rt')\n base, _ = argv[1].rsplit('...
python
new_file
1
0
apache-2.0
2b793812b0e237e90048c33439ac940466ad068a
TheFraserLab/Hornet
mapping/make_num_from_fq.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for login-as URLs." }, { "role": "assistant", "content": "from django.core.urlresolvers import reverse\n\nfrom go.base.tests.helpers import GoDjangoTestCase, DjangoVumiApiHelper\n\n\nclass TestLoginAs(GoDjangoTestCase):...
python
new_file
1
1
bsd-3-clause
a3d5736fdd8ae747bb7c375ddf1e7934f2227d25
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
go/tests/test_urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first test for views" }, { "role": "assistant", "content": "from django.contrib.auth.models import User as AuthUser\nfrom django.core.urlresolvers import resolve\nfrom django.http import HttpRequest\nfrom django.template.load...
python
new_file
7
1
bsd-3-clause
46c140bd441904f9cbfa655382223363c6e6e2fc
raspberrywhite/raspberrywhite,raspberrywhite/raspberrywhite,raspberrywhite/raspberrywhite,raspberrywhite/raspberrywhite
server/tests/test_views.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add script for upating readme with auto-generated pack list." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nScript which updates README.md with a list of all the available packs.\n\"\"\"\n\nimport os\nimp...
python
new_file
1
4
apache-2.0
068a273d859a082c153acee4192a34df0b1ce4ea
pidah/st2contrib,tonybaloney/st2contrib,lmEshoo/st2contrib,pearsontechnology/st2contrib,meirwah/st2contrib,jtopjian/st2contrib,lmEshoo/st2contrib,pearsontechnology/st2contrib,Aamir-raza-1/st2contrib,jtopjian/st2contrib,pearsontechnology/st2contrib,armab/st2contrib,digideskio/st2contrib,pinterb/st2contrib,tonybaloney/st...
scripts/update-readme-with-pack-list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command for finding commconnect enabled projects" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom corehq.apps.domain.models import Domain\n\nclass Command(BaseCommand...
python
new_file
2
3
bsd-3-clause
4325c2fc8308f604eef379551524a2d8f8bfc8bb
puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/sms/management/commands/find_commconnect_enabled_projects.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function to load CSV roll tables into dicts\n\nSpecify the format for roll table CSV files. Dashes are used to\nspecify ranges for consistency with tables printed in the core\nrulebooks. Headers are optional simply to give flexibility.\n...
python
new_file
1
5
mit
6500a93f4b13f6c51be88288542aabdc0dea954a
whonut/Random-Table-Roller,whonut/Random-Table-Roller,whonut/Random-Table-Roller
table_loader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport pytest\n\n@pytest.fixture\ndef setup(request):\n def teardown():\n print(\"Running make clean\")\n os.system('make clean')\n print(\"Completed finaliser\")\n request.addfinalizer(teardown)\n ...
python
edit
1
1
bsd-2-clause
145cf9e539d44b3996a4ab916edb7873fa5090f0
fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python
other/wrapping-cpp/swig/c++/test_mylib.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for ir downgrade patch" }, { "role": "assistant", "content": "from __future__ import print_function, absolute_import, division\n\nfrom numba.cuda.testing import unittest\nfrom numba.cuda.testing import skip_on_cudasim\n...
python
new_file
1
1
bsd-2-clause
e30333f6c7d4dfc14934fea6d379ba0ae035ce0f
jriehl/numba,sklam/numba,cpcloud/numba,IntelLabs/numba,jriehl/numba,stuartarchibald/numba,cpcloud/numba,jriehl/numba,numba/numba,stonebig/numba,stuartarchibald/numba,stonebig/numba,sklam/numba,IntelLabs/numba,gmarkall/numba,numba/numba,cpcloud/numba,seibert/numba,seibert/numba,sklam/numba,gmarkall/numba,numba/numba,skl...
numba/cuda/tests/cudadrv/test_ir_patch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update migrations for Django 1.11 and Python 3" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.20 on 2019-03-27 19:51\nfrom __future__ import unicode_literals\n\nfrom django.db import mi...
python
new_file
1
0
mit
ada5c5039d9a516fa9e6bc7741fbbbcd7f35d30f
mback2k/django-app-announcements
migrations/0003_auto_20190327_1951.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to trap for missing services\n\nRecently when there was an issue with the magnum devstack plugin causing\nthe shade gate to not have swift, we didn't notice except through the\nansible tests. That's because we have a bunch of has_se...
python
new_file
1
2
apache-2.0
ecce72199a8c9f0f333715419d572444d5b9fc90
openstack/python-openstacksdk,dtroyer/python-openstacksdk,openstack/python-openstacksdk,dtroyer/python-openstacksdk,stackforge/python-openstacksdk,stackforge/python-openstacksdk,openstack-infra/shade,openstack-infra/shade
shade/tests/functional/test_devstack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',...
python
edit
1
2
mit
02740a850817d2d3294965e97333218b5f44f532
electronick1/todoist-python,Doist/todoist-python
setup.py
rejected_duplicate
Near-duplicate of sample 2235
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom gpu_test_expectations import GpuTestExpectations\n\n# See the GpuTes...
python
edit
1
1
bsd-3-clause
62317424b7e318ac9c59aecc768a4487788bd179
lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBacke...
content/test/gpu/gpu_tests/pixel_expectations.py
rejected_duplicate
Near-duplicate of sample 2153
true
[ { "role": "user", "content": "Write python code for the following: Put StarFinderBase is separate module" }, { "role": "assistant", "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis module implements the base classes for detecting stars in an\nastronomical...
python
new_file
1
1
bsd-3-clause
b84b04178d1ad16ae8c515c002427244183de0ca
larrybradley/photutils,astropy/photutils
photutils/detection/base.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cache script for the warnings" }, { "role": "assistant", "content": "# Need something to cache the warnings GIS files, since they are so \n# huge.\n\nimport os\n\nFINAL = \"/mesonet/share/pickup/wwa/\"\n\nfor year in range(19...
python
new_file
1
0
mit
2d58336d0605b313a90f2d1c3c13e0c33f4c592c
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/cache/warn_cache.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add generic test for custom content resolution" }, { "role": "assistant", "content": "from corehq.apps.users.models import CommCareUser\nfrom corehq.messaging.scheduling.models import CustomContent\nfrom corehq.messaging.scheduli...
python
new_file
1
2
bsd-3-clause
2fe3b8040730e769ce4814b5e7be35ff0293d8a8
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/messaging/scheduling/tests/test_content.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Gaussian LDA preparation script." }, { "role": "assistant", "content": "import argparse\nimport logging\nimport os\n\nfrom gensim.models import Word2Vec\n\nlogging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s...
python
new_file
1
0
apache-2.0
4d82d539b25a1a7f3e5e5b5c5bfa25a171757fdc
knub/master-thesis,knub/master-thesis,knub/master-thesis,knub/master-thesis
code/python/knub/thesis/word2vec_gaussian_lda_preprocessing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nimport setup_util\nimport os\nfrom os.path import expanduser\n\nhome = expanduser(\"~\")\n\ndef start(args):\n setup_util.replace_text(\"django/hello/hello/settings.py\", \"HOST': '.*'\", \"HOST': '\" + args....
python
edit
3
4
bsd-3-clause
2f976fda50e0946486383b61a996a36b0f3ff9ae
raziel057/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,denkab/FrameworkBenchmarks,doom369/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,sgml/Fram...
django/setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example of SeleniumBase Chart Maker" }, { "role": "assistant", "content": "from seleniumbase import BaseCase\n\n\nclass MyChartMakerClass(BaseCase):\n\n def test_chart_maker(self):\n self.create_pie_chart(title=\...
python
new_file
1
1
mit
0a0a34bc1e6e09b85a3e1739679a7b76dc2672c4
mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
examples/chart_maker/my_chart.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to find the relationship between numbers of prior art citations and numbers of blocking actions, and types of blocking actions" }, { "role": "assistant", "content": "#!/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"...
python
new_file
1
0
bsd-2-clause
229e5136b56ffa6488abd81647d5811a5371ce8a
PatentBlocker/Motorola_Patent_Citations,PatentBlocker/Motorola_Patent_Citations
src/citation_vs_blocking.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for file blocks and file info" }, { "role": "assistant", "content": "import inspect\nimport posixpath\n\nfrom utils import *\n\n\ndef test_block_locations(hdfs):\n testname = inspect.stack()[0][3]\n fname = posixp...
python
new_file
5
2
apache-2.0
3b1e38785505e4f472e7cb0bce487b7d31efbf1d
danielfrg/cyhdfs3,danielfrg/libhdfs3.py,danielfrg/libhdfs3.py,danielfrg/cyhdfs3
cyhdfs3/tests/test_file.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add new task class RemoveElementsXPath for removing XML elements using XPath selectors" }, { "role": "assistant", "content": "import glob\nimport os\nimport lxml.etree as ET\nfrom xml.sax.saxutils import escape\nfrom cumulusci.co...
python
new_file
3
4
bsd-3-clause
b948968dc616b671b2b426ead5768e60e86a38c1
e02d96ec16/CumulusCI,e02d96ec16/CumulusCI,SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
cumulusci/tasks/metadata/modify.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file to securely hash passwords" }, { "role": "assistant", "content": "\nfrom hashlib import sha512 # crypto-secure hashing algorithm\nfrom pbkdf2 import PBKDF2 # key-stretching algorithm\nfrom os import urandom # crypto-secu...
python
new_file
1
1
mit
83f0aeb4c8bdea3da65c50b9545bacb9c1aec74b
davenportw15/SnailMail,davenportw15/SnailMail,davenportw15/SnailMail
models/secure_pass.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for refresh token" }, { "role": "assistant", "content": "# coding: utf-8\n\nfrom .base import TestCase\nfrom .base import create_server, sqlalchemy_provider, cache_provider\nfrom .base import db, Client, User, Token\n\n\...
python
new_file
1
1
bsd-3-clause
77b248c18bf1edfe6d36fb8c1ca2fc96258dacb2
stianpr/flask-oauthlib,stianpr/flask-oauthlib,CoreyHyllested/flask-oauthlib,cogniteev/flask-oauthlib,lepture/flask-oauthlib,landler/flask-oauthlib,tonyseek/flask-oauthlib,landler/flask-oauthlib,brightforme/flask-oauthlib,cogniteev/flask-oauthlib,PyBossa/flask-oauthlib,Ryan-K/flask-oauthlib,icook/flask-oauthlib,lepture/...
tests/test_oauth2/test_refresh.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for problems in hash." }, { "role": "assistant", "content": "# *****************************************************************************\n# Copyright 2019 Karl Einar Nelson\n#\n# Licensed under the Apache License, Ve...
python
new_file
3
1
apache-2.0
554f3437e06c3bd295a38b3b87c93bf6c0af6f52
originell/jpype,originell/jpype,originell/jpype,originell/jpype,originell/jpype
test/jpypetest/test_hash.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add wrapper code to emit all of the XML things" }, { "role": "assistant", "content": "\nimport precinct\nimport electoralDistrict\n\n\ndef emitProlog():\n print '<?xml version=\"1.0\"?>'\n print '<VipObject xmlns:xsi=\"http...
python
new_file
4
1
apache-2.0
72b944740a474b3f476ed36fd5940cdac2895754
mapmydemocracy/civichackathon,mapmydemocracy/civichackathon
src/VipFormat/emitAllXml.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Implement the quick sort algorithm." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n'''\nQuick Sort. It is an application of divide and conquer strategy.\n\nBest, Average: O(nlogn), Worst:...
python
new_file
3
8
mit
6863a9526af42f2c7615abe22f3a6eb40b759da2
weichen2046/algorithm-study,weichen2046/algorithm-study
sorting/quick_sort.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add DB migration for more explicit ordering of work & creator models" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass M...
python
new_file
3
0
mit
f614502f0a67b754f5757935ffb0d86920998dcb
ic-labs/glamkit-collections,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/glamkit-collections,ic-labs/django-icekit
glamkit_collections/contrib/work_creator/migrations/0012_auto_20170502_2209.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights bishop and pawn problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Bishop and Pawn Problem\n\n\ndef bishopAndPawn(bishop, pawn):\n epsilon = 0.001\n dist = ((ord(bishop[0...
python
new_file
1
3
mit
a854abd2d9580e1c31e659cb4d0bd182f96c5b81
HKuz/Test_Code
CodeFights/bishopAndPawn.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function for ICP metrics (and plotting)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Dec 25 18:07:42 2017\n\n@author: vostok\n\"\"\"\n\nimport numpy as np\n\ndef icp_metric(image_star...
python
new_file
1
3
mit
314de418ff9e920238c5dcb274a6b009fab728d0
lkangas/python-tycho2
icp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test capturing bad implementation of contains handler." }, { "role": "assistant", "content": "from pmxbot import core\n\ndef test_contains_always_match():\n\t\"\"\"\n\tContains handler should always match if no rate is specif...
python
new_file
1
1
bsd-3-clause
645507ed9ec43b354880673fbc75afe169ef6697
jawilson/pmxbot,jawilson/pmxbot
tests/unit/test_handlers.py
rejected_duplicate
Near-duplicate of sample 7645
true
[ { "role": "user", "content": "Write python code for the following: zilencer: Add a simple management command to create a RemoteZulipServer.\n\nThis saves us from having to go into a `manage.py shell` to do this,\nand adds a bit more structure like the usage message." }, { "role": "assistant", "c...
python
new_file
1
1
apache-2.0
9a4cd54a254089e2ffdffc97b40791bb96041660
rishig/zulip,showell/zulip,zulip/zulip,synicalsyntax/zulip,dhcrzf/zulip,rishig/zulip,zulip/zulip,shubhamdhama/zulip,shubhamdhama/zulip,hackerkid/zulip,dhcrzf/zulip,punchagan/zulip,synicalsyntax/zulip,timabbott/zulip,rishig/zulip,kou/zulip,tommyip/zulip,andersk/zulip,timabbott/zulip,rht/zulip,timabbott/zulip,brainwane/z...
zilencer/management/commands/add_remote_server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create log_request decorator to log API requests\n\n* Creates a new decorator to save info about API requets (user, path, etc)\n\n* Heavily inspired by\nhttps://github.com/aschn/drf-tracking/blob/master/rest_framework_tracking/mixins.py" }...
python
new_file
4
3
apache-2.0
463360261d573f3f3ca934264bd27a072b96d3e6
WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed
src/mmw/apps/core/decorators.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 415. Add Strings\n\n415. Add Strings: https://leetcode.com/problems/add-strings/" }, { "role": "assistant", "content": "class Solution(object):\n def addStrings(self, num1, num2):\n \"\"\"\n :...
python
new_file
3
5
apache-2.0
abfb39c841293d719809d595af6aa7e9d6a12e87
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/add-strings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add pot player mini support" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# appModule for Daum potplayer (automatic reading subtitle and play information)\n# This file part of Daum potplayer AppModule\n# Copyr...
python
new_file
3
0
mit
4e3c76fa2c2af7b19bcac72c25044b9534198e18
dnz3d4c/potplayerNVDAAddon
appModules/potplayermini.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for entry.content -> JSON" }, { "role": "assistant", "content": "\"\"\"Use native JSON for entry.content on postgres\n\nRevision ID: 2213b8196921\nRevises: 2b7f5e38dd73\nCreate Date: 2013-12-15 13:48:25.988000\n\n\"...
python
new_file
3
1
mit
839716bb2ea94d8c8a3f6cf44ceecf0afcfd6c55
streamr/marvin,streamr/marvin,streamr/marvin
migrations/versions/2213b8196921_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test stub module for backend tools\n\nSigned-off-by: Niklas Koep <<EMAIL>>" }, { "role": "assistant", "content": "import unittest\n\nfrom pymanopt.tools import flatten_arguments\n\n\nclass TestArgumentFlattening(unittest.Test...
python
new_file
1
1
bsd-3-clause
2a5ca3c708582b213950d7134a2e29333b8dfd11
nkoep/pymanopt,pymanopt/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,nkoep/pymanopt
tests/test_backend_tools.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migrations for movie ranking metadata" }, { "role": "assistant", "content": "\"\"\"Add movie metadata (imdb rating, number of votes, metascore) and relevancy\n\nRevision ID: 2c240cb3edd1\nRevises: 588336e02ca\nCreate Date: 20...
python
new_file
1
1
mit
52d8a8f7e616523360528367b6354ebca6c44f8e
streamr/marvin,streamr/marvin,streamr/marvin
migrations/versions/2c240cb3edd1_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create the package with metadatas" }, { "role": "assistant", "content": "\"\"\"CKEditor for Django-blog-zinnia\"\"\"\n__version__ = '1.0'\n__license__ = 'BSD License'\n\n__author__ = 'Fantomas42'\n__email__ = '<EMAIL>'\n\n__url__...
python
new_file
1
0
bsd-3-clause
11c060ea43082dfaad503b2af9149e69878ca4e6
django-blog-zinnia/zinnia-wysiwyg-ckeditor
zinnia_ckeditor/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Swagger to Markdown converter." }, { "role": "assistant", "content": "\"\"\"Swagger to Markdown converter.\"\"\"\n\nimport shlex, subprocess\n\ndef convert(swagger_location, output_file, template_file):\n \"\"\"Convert Swa...
python
new_file
3
3
mit
41625db23c40c0d1b9479321693bbca6b56fbd25
foliant-docs/foliant
foliant/swagger2markdown.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set branding_type to org if it’s none\n\nSame as a0deef06e23e4c81e55d83afb63d4bbab1bdaaa5 but with `is null` not\n`= null` 🤦🏻‍" }, { "role": "assistant", "content": "\"\"\"\n Revision ID: 0219_default_email_branding\nRevises: 0...
python
new_file
1
1
mit
0107cdcfdef6d8562c71b576c39ed52fc7afcedf
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0219_default_email_branding.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for utils._misc" }, { "role": "assistant", "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nTests for the _misc module.\n\"\"\"\n\nimport pytest\n\nfrom .._misc import _get_meta\...
python
new_file
1
3
bsd-3-clause
7e56bb9c4ac96e46bb786277414724de742af8f0
astropy/photutils,larrybradley/photutils
photutils/utils/tests/test_misc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for settings & defaults" }, { "role": "assistant", "content": "\"\"\"\nTests application settings are connected to Django\nsettings and have sensible default values.\n\"\"\"\nimport importlib\n\nfrom django.test import ...
python
new_file
1
1
bsd-2-clause
e5c57e7e0110fb35707ef4900f289698fb778dfd
marcgibbons/drf_signed_auth,marcgibbons/drf_signed_auth,marcgibbons/drf_signed_auth
tests/unit/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for Users" }, { "role": "assistant", "content": "import unittest\nimport mock\nfrom ...authentication.users import Users\n\n\nclass TestUsers(unittest.TestCase):\n\n @mock.patch('auth0.v2.authentication.users.Us...
python
new_file
1
1
mit
fd5824e4e4600b0a3bd58386edfc1029418bd813
auth0/auth0-python,auth0/auth0-python
auth0/v2/test/authentication/test_users.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for sending arbitrary patch files to clients" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport argparse\n\nfrom qlmdm import set_gpg, patch_hosts\n\nset_gpg('server')\n\n\ndef parse_args():\n pa...
python
new_file
1
3
apache-2.0
1358eb62cd54d921da0c76dba8536067ff51a31e
quantopian/PenguinDome,quantopian/PenguinDome
server/patch_hosts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module to retrieve disk space" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nReturn disk usage statistics about the given path as a (total, used, free)\nnamedtuple. Values are expressed in bytes.\n\"...
python
new_file
2
4
mit
d064a1e86e2de66593ec2bf665ccd015ed87e6d2
borevitzlab/Gigavision,borevitzlab/Gigavision,borevitzlab/Gigavision,borevitzlab/Gigvaision-ControlSoftware,borevitzlab/Gigvaision-ControlSoftware
disk_usage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add file for testing script that populates new and noteworthy nodes. Tests still need to be written." }, { "role": "assistant", "content": "import datetime\nfrom nose.tools import * # noqa\n\nfrom tests.base import OsfTestCase\...
python
new_file
3
1
apache-2.0
17c42034137ca01557163f9d5386450303b872d7
caseyrollins/osf.io,TomBaxter/osf.io,TomHeatwole/osf.io,SSJohns/osf.io,Nesiehr/osf.io,crcresearch/osf.io,emetsger/osf.io,crcresearch/osf.io,chennan47/osf.io,caneruguz/osf.io,emetsger/osf.io,leb2dg/osf.io,asanfilippo7/osf.io,TomHeatwole/osf.io,mluo613/osf.io,cwisecarver/osf.io,zamattiac/osf.io,amyshi188/osf.io,DanielSBr...
scripts/tests/test_populate_new_and_noteworthy.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a basic script to compare FreeBSD docs\n\nneeds more and more code :)" }, { "role": "assistant", "content": "# -*- Coding: utf-8 -*-\n#\n# Copyright (C) 2014 Loic BLOT <http://www.unix-experience.fr>\n#\n# Redistribution...
python
new_file
3
0
bsd-2-clause
09fe0bfb275ded53b2569ce1160a931238fd7116
nerzhul/MiscScripts,nerzhul/MiscScripts
Python/CompareFreeBSDDocs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove domain columns from branding table\n\nThis relationship is via the `Organisation` now; we don’t use this\ncolumn to fudge a relationship based on the user’s email address and the\nmatching something in these columns." }, { "ro...
python
new_file
3
1
mit
916d4e2860e231be0b2f602212931c32dcf72743
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0287_drop_branding_domains.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for finding bytes" }, { "role": "assistant", "content": "shellcode = \"\\x31\\xdb\\xf7\\xe3\\x53\\x43\\x53\\x6a\\x02\\x89\\xe1\\xb0\\x66\\xcd\\x80\\x93\\x59\\xb0\\x3f\\xcd\\x80\\x49\\x79\\xf9\\x68\\x8f\\xf8\\x02\\x4f...
python
new_file
2
0
mit
5b0cbbd19aef3a28dcee8b7143c1c0644da9c3ff
jakkdu/idapythons
find_bytes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to generate release log" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\nimport argparse\nimport json\nimport requests\nimport re\n\n\nBASE_URL = 'https://api.github.com/repos/magicstack/uvloop/comp...
python
new_file
1
5
apache-2.0
b996e0f7ddc622afbbd06d1640f7804f0a97745c
1st1/uvloop,MagicStack/uvloop,MagicStack/uvloop
.github/release_log.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a python websocket dumper" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport websockets\nimport asyncio\nimport time\n\n# import logging\n# logger = logging.getLogger('websockets')\n# logger.setLevel(logg...
python
new_file
1
4
mit
a9116a9c47602f24c9e4fa6ca30b99507ae29703
ndevenish/KerbalHUD,ndevenish/KerbalHUD
dumpws.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add selectors for elements in new program page" }, { "role": "assistant", "content": "SELECTOR_TITLE = '[data-test-id=\"new_program_field_title_a63ed79d\"]'\nSELECTOR_DESCRIPTION = '[data-test-id=\"new_program_field_description_7...
python
new_file
1
0
apache-2.0
f71251f5f5b25da9e76dcb93a5b0ffbda3efa0c6
andrei-karalionak/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,jmakov/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,edofic/ggr...
src/lib/constants/element/page_header/lhn_menu/create_new_program.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use selenium to open url and then extract local cookies into requests.get" }, { "role": "assistant", "content": "# -*- coding:utf-8 -*-\n\nfrom selenium import webdriver\nimport requests\nimport sqlite3\n\nbrowser = webdriver.Fir...
python
new_file
3
0
apache-2.0
faa68400ef3e3001bd87e4e9d0189b78908c3e9f
huangchuchuan/Spider
myselenium.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Define kernel classes and a factory to generate them from xml" }, { "role": "assistant", "content": "\"\"\"@package DisplacementKernels\nThis module defines an interface to read and use InputGen projects\n\nSee C++ InputGen proje...
python
new_file
5
1
apache-2.0
1984fbe9a59eb5de3c8e9af477ac277a978cf21d
amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt
evaluation/packages/displacementKernels.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add basic framework for LDA" }, { "role": "assistant", "content": "import sys\nimport logging\nfrom os.path import isdir, isfile\nfrom gensim import models\nfrom corpus import Corpus\nlogging.basicConfig(format='%(asctime)s : %(l...
python
new_file
2
5
mit
f80bf4cf1723db814e62753ee4bd5a7c302e09ee
PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project
src/project/lda_corpus.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add rough test for AGIPD geometry" }, { "role": "assistant", "content": "import numpy as np\n\nfrom karabo_data.geometry2 import AGIPD_1MGeometry\n\ndef test_snap_assemble_data():\n geom = AGIPD_1MGeometry.from_quad_positions(...
python
new_file
1
1
bsd-3-clause
86e6577fc9737b76b287c676fa7b7ceb64c25838
European-XFEL/h5tools-py
karabo_data/tests/test_agipd_geometry.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Replace missing indexes for SQLite\n\nMigration 018 to replace missing indexes on domains and servers\n\nBug #1200027\n\nChange-Id: I2240af58c7730d019916924f8f314134899c7cf6" }, { "role": "assistant", "content": "# Copyright 2013...
python
new_file
1
2
apache-2.0
21b8788e2df4fa143dcb7594510c3bff60367224
ionrock/designate,grahamhayes/designate,openstack/designate,richm/designate,kiall/designate-py3,ramsateesh/designate,tonyli71/designate,cneill/designate,kiall/designate-py3,grahamhayes/designate,ramsateesh/designate,tonyli71/designate,muraliselva10/designate,kiall/designate-py3,kiall/designate-py3,muraliselva10/designa...
designate/storage/impl_sqlalchemy/migrate_repo/versions/018_add_back_unique_name_deleted_sqlite.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for new connection modelling objects.\n\nSigned-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>" }, { "role": "assistant", "content": "import unittest\nfrom fasm2bels.verilog_mod...
python
new_file
1
1
isc
1bb0855bc70598bafb341b48c93e5e26ec8b5818
SymbiFlow/symbiflow-xc-fasm2bels
xc7/fasm2bels/tests/test_verilog_modeling.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create unittest to avoid repeating excessive closing\n\n\"Thou shalst not close file handles that SHE, your caller, has given you!\"\n\nEnsure we comply with this dogma." }, { "role": "assistant", "content": "\"\"\"Check that giv...
python
new_file
1
2
mit
bbb448e6909fd975ba4f1a19d40febad4464df8c
nolze/ms-offcrypto-tool,nolze/msoffcrypto-tool,nolze/msoffcrypto-tool,nolze/ms-offcrypto-tool
tests/test_file_handle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for cron" }, { "role": "assistant", "content": "#! /usr/bin/python\nimport os, subprocess\n\nos.chdir(os.path.dirname(os.path.abspath(__file__)))\n\nsubprocess.call([ 'python',\n os.path.join('..', '...
python
new_file
1
0
mit
93bb70c34f7c6eb4a72f8a6f53982a4228fe710f
kzys/planet-tempura
update.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Items table db migration" }, { "role": "assistant", "content": "\"\"\"Create items table\n\nRevision ID: 042f45c107c4\nRevises: 8b1cf2bfda5e\nCreate Date: 2017-04-24 02:31:00.545797\n\n\"\"\"\nfrom alembic import op\nimpor...
python
new_file
1
1
mit
306b18870044798aa4256bba8cd213a6ef2b9365
terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python,terryjbates/test-driven-development-with-python
myflaskapp/migrations/versions/042f45c107c4_create_items_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to lintcode question 180" }, { "role": "assistant", "content": "class Solution:\n #@param n: Given a decimal number that is passed in as a string\n #@return: A string\n def binaryRepresentation(self, n):\n ...
python
new_file
1
9
mit
e4e345e348093639a488855058b1b5ebe44e3507
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
lintcode/Hard/180_Binary_Representation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add SymPy benchmark for the expand2b problem" }, { "role": "assistant", "content": "from timeit import default_timer as clock\nfrom sympy import ring, ZZ\nR, x, y, z, w = ring(\"x y z w\", ZZ)\ne = (x+y+z+w)**15\nt1 = clock()\nf ...
python
new_file
3
0
mit
4b9798b028afbfcfc4ae7417f1adc488a9567977
bjodah/symengine.py,bjodah/symengine.py,symengine/symengine.py,bjodah/symengine.py,symengine/symengine.py,symengine/symengine.py
benchmarks/expand2b_sympy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport array\nimport numpy as np\n\n\ndef load_glove_vectors(filename, vocab=None):\n \"\"\"\n Load glove vectors from a .txt file.\n Optionally limit the vocabulary to save memory. `vocab` should be a set.\n \"\"\"\n dct = {...
python
edit
1
5
mit
42a1aaba8daa253b99f444a512f8231db47dfbb2
AotY/chatbot-retrieval,LepiorzDaniel/test2
helpers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement first prototype of EventSystem" }, { "role": "assistant", "content": "import queue\n\nclass Event:\n \n def __init__(self, eventType='', userParam=dict()):\n \n self.type = eventType\n self.us...
python
new_file
1
4
mit
1d9e9e3f6b5796db7f72f108e3a19327f0313cd9
JeFaProductions/TextAdventure2
tead/event.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic test for OTPS code" }, { "role": "assistant", "content": "from stompy.model.otps import read_otps\n\nimport six\nsix.moves.reload_module(read_otps)\n\nmodfile=\"data/DATA/Model_OR1km\"\n\ndef test_read_otps():\n time...
python
new_file
13
3
mit
54942867218662dc1856faf6fda989ccadfda08d
rustychris/stompy,rustychris/stompy
test/test_otps.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Write python code for the following: Add test for root CLI" }, { "role": "assistant", "content": "from valohai_cli.cli import PluginCLI\n\n\ndef test_command_enumeration():\n cli = PluginCLI()\n assert 'init' in cli.list_commands(None)\n assert cli.get_comm...
python
new_file
1
1
mit
fe7be655c261af07477fdf49959eff9609832127
valohai/valohai-cli
tests/test_cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add very simple module finder" }, { "role": "assistant", "content": "import sys\n\nclass SempaiLoader(object):\n def __init__(self, *args):\n print args\n\n def find_module(self, fullname, path=None):\n print ...
python
new_file
3
2
mit
04337a036429e98edab7c2e5f17086a3ccfe263b
kragniz/json-sempai
jsonsempai.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Update HassIO API -> new files" }, { "role": "assistant", "content": "\"\"\"Bootstrap HassIO.\"\"\"\nimport asyncio\nimport json\nimport logging\nimport os\n\nfrom colorlog import ColoredFormatter\n\nfrom .const import (\n FIL...
python
new_file
null
null
bsd-3-clause
822fdaa409322a41eb83797da76d021e97e34949
pvizeli/hassio,pvizeli/hassio
hassio_api/hassio/version.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add test with live database, disabled by default such that all test complete when using master" }, { "role": "assistant", "content": "# from unittest import TestCase\n# from elasticsearch import Elasticsearch\n# from query import...
python
new_file
1
0
mit
429a2fa0d24c4c56506d584b42a977b13874b9ec
pietermarsman/elastic-queries
test/test_live.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command-line test for dials.symmetry" }, { "role": "assistant", "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport pytest\nimport procrunner\n\n\ndef test_symmetry(dials_regressi...
python
new_file
3
1
bsd-3-clause
986888c882273a2f69c367641eaea84dd3a1791f
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
test/command_line/test_symmetry.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an initial ProgressManager implementation" }, { "role": "assistant", "content": "# -*- encoding: utf-8\n\nimport requests\n\n\nclass ProgressError(Exception):\n \"\"\"Raised if we get an unexpected response from the progre...
python
new_file
1
2
mit
ac531c43efdba1645585d88ee87eaf313c07748b
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
archive/archive_api/src/progress_manager.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Define API for language identification extractor." }, { "role": "assistant", "content": "from typing import List\nfrom etk.extraction import Extraction\nfrom etk.extractor import Extractor, InputType\n\n\nclass LangaugeIdentifica...
python
new_file
1
1
mit
fad6285f79a8681994c25261941be49d7e43617c
usc-isi-i2/etk,usc-isi-i2/etk,usc-isi-i2/etk
etk/extractors/language_identification_extractor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Print all the elements of a linked list" }, { "role": "assistant", "content": "# https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list\n# Python 2\n\n\"\"\"\n Print elements of a linked list on console\n head ...
python
new_file
1
2
mit
4fb4603522c3693ef6ca1f7e258f9aaf3cccc7d1
arvinsim/hackerrank-solutions
all-domains/data-structures/linked-lists/print-the-elements-of-a-linked-list/solution.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a brute force solution.\n\nIt works on the small 1000 number test case but fails horribly on the\n10 ** 9 case. Still worth saving before moving on." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\n ...
python
new_file
3
3
mit
3b34008cbf659c34059ce783470edb69001d3584
smillet15/project-euler
problem145.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for deep_get and soft_get api utils" }, { "role": "assistant", "content": "from nose.tools import * # noqa\n\nfrom api.base import utils as api_utils\n\nfrom tests.base import ApiTestCase\n\nclass DummyAttrAttr(ob...
python
new_file
16
1
apache-2.0
cd5a846e82ec023a1d69ff832924493e8dfc3068
mluo613/osf.io,kwierman/osf.io,leb2dg/osf.io,samchrisinger/osf.io,Nesiehr/osf.io,Nesiehr/osf.io,rdhyee/osf.io,laurenrevere/osf.io,kch8qx/osf.io,zamattiac/osf.io,hmoco/osf.io,asanfilippo7/osf.io,zachjanicki/osf.io,hmoco/osf.io,brandonPurvis/osf.io,leb2dg/osf.io,GageGaskins/osf.io,kch8qx/osf.io,abought/osf.io,pattisdr/os...
tests/api_tests/base/test_utils.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Write python code for the following: Implement server-time; this just enables server-time to be used by other modules" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom zope.in...
python
new_file
1
3
bsd-3-clause
c0bae380d83283541860bbd709425e653678a3cf
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/ircv3/servertime.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the start of an api wrapper" }, { "role": "assistant", "content": "import json\nimport os\n\nimport requests\n\n\nclass APIWrapper(object):\n\n def __init__(self, base_url=None, auth_token=None):\n\n if base_url:\n ...
python
new_file
3
3
mit
40f8190029cf1431a14cd74dfab515d7bb106dd4
conormag94/pyscores
pyscores/api_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move testcases here from INTENT." }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom intent.igt.references import raw_tier, cleaned_tier, normalized_tier\nfrom intent.igt.rgxigt import Igt\nfrom yggdrasil...
python
new_file
1
1
mit
5bdc9a7834c67ac7e39c9674b328a68e42467efc
xigt/yggdrasil,xigt/yggdrasil,xigt/yggdrasil
yggdrasil/yggdrasil_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python script to read coverage data files" }, { "role": "assistant", "content": "\"\"\"Translate coverage.py data files to JSON.\"\"\"\n\n\nimport argparse\nimport json\nimport pathlib\nimport sys\n\nfrom coverage import cove...
python
new_file
1
1
mit
1f6c7b33a150096dad4c856516b6dd23dd1571ae
Holiverh/atom-coverage-python
read-coverage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for normalizing unicode in json line dumps" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom __future__ import unicode_literals, print_function\nimport unicodedata\nimport json\nimport sys\nfor l in sy...
python
new_file
1
0
apache-2.0
e783c0381208326f79db411a39d008701d57ad89
libris/librisxl,libris/librisxl,libris/librisxl
librisxl-tools/scripts/normalize_jsonlines.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a unittest for spacegroup. Still very basic.\n\n\nFormer-commit-id: 1a63abe5e2a85b220d8b4fd5fa4cd25a1c739e49 [formerly 5f925f837f4ae3ba136f0d6e271848b06467ea8b]\nFormer-commit-id: 3112d8f3738a35c4572c9384f8860a6de69a9b6a" }, { "r...
python
new_file
3
5
mit
ad5f851b7959f7bf09d7cd669d8db126fa962982
migueldiascosta/pymatgen,yanikou19/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,sonium0/pymatgen,Dioptas/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,Bismarrck/pymatgen,ctoher/pymatgen,mig...
pymatgen/symmetry/tests/test_spacegroup.py
rejected_duplicate
Near-duplicate of sample 6001
true
[ { "role": "user", "content": "Write python code for the following: Add test for setup.py's _guard_py_ver" }, { "role": "assistant", "content": "\"\"\"\nTests for setup.py behavior\n\"\"\"\n\nimport distutils.core\ntry:\n import setuptools\nexcept ImportError:\n setuptools = None\nimport sy...
python
new_file
1
5
bsd-2-clause
038bd9745cda294491589bbca60b1b3431ce39cc
numba/llvmlite,numba/llvmlite,numba/llvmlite,numba/llvmlite
llvmlite/tests/test_setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for diffing the hw discovery data\n\nThis will let us spot-check things that should be identical but aren't." }, { "role": "assistant", "content": "import json\nfrom subprocess import Popen, PIPE\nimport os\nimport s...
python
new_file
7
4
apache-2.0
aa1c6dbede3cbee67d1b2b0a1064fd7cc5662251
rthallisey/clapper,larsks/clapper,larsks/clapper,coolsvap/clapper,rthallisey/clapper,coolsvap/clapper,coolsvap/clapper
discovery-diff/discovery-diff.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add a test to test the cache is working" }, { "role": "assistant", "content": "from django.test import TestCase\nfrom django.core.cache import cache\n\nclass CacheTestCase(TestCase):\n def test_cache_task(self):\n \"\"\...
python
new_file
1
2
mit
915b3f3ca7008faa22bbe9ef32cd652d371dbe4a
BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo
bongo/apps/bongo/tests/cache_tests.py
accepted
null
true