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 unit test for barrier" }, { "role": "assistant", "content": "# -*- coding: iso-8859-1 -*-\n# Maintainer: jglaser\n\nfrom hoomd_script import *\ninit.setup_exec_conf();\nimport unittest\nimport os\n\n# unit test to run a simpl...
python
new_file
7
1
bsd-3-clause
3a75f01d6ece9eec332dff1ca7518af4f7c7f462
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
test/hoomd_script/test_barrier.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Sort a linked list using insertion sort" }, { "role": "assistant", "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Definition for singly-linked list.\r\nclass ListNode:\n def __init__(self, x):\n self.val = x\...
python
new_file
2
7
apache-2.0
e22173b8492fefe3d562f7efe684aa560772d757
don7hao/leetcode_oj,don7hao/leetcode_oj
insertion_sort_list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a regression test for whitespace normalization in the BibTeX parser." }, { "role": "assistant", "content": "from pybtex.database import BibliographyData\nfrom pybtex.core import Entry\nfrom pybtex.database.input.bibtex import...
python
new_file
1
2
mit
1818959519207eb1bd888d8abed096c32bb85b96
live-clones/pybtex
pybtex/tests/bibtex_parser_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add directory to story python plotting scripts. Add script to plot a 3D ellipsoid." }, { "role": "assistant", "content": "'''\nCopyright (c) 2016 Abhishek Agrawal (<EMAIL>)\nDistributed under the MIT License.\nSee accompanying fi...
python
new_file
14
0
mit
6df2413f0207bf800697c430c4e6f1b1c46bbac9
agrawalabhishek/NAOS,agrawalabhishek/NAOS,agrawalabhishek/NAOS
python/ellipsoid3DShape.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Write python code for the following: Add missing vouches to employees." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.15 on 2018-08-15 08:08\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfro...
python
new_file
1
7
bsd-3-clause
f3c546afd159d9a4ba006f448faec1653d974342
akatsoulas/mozillians,mozilla/mozillians,mozilla/mozillians,mozilla/mozillians,akatsoulas/mozillians,akatsoulas/mozillians,mozilla/mozillians,akatsoulas/mozillians
mozillians/users/migrations/0038_auto_20180815_0108.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for Emails()" }, { "role": "assistant", "content": "import unittest\nimport mock\nfrom ..emails import Emails\n\n\nclass TestEmails(unittest.TestCase):\n\n @mock.patch('auth0.v2.emails.RestClient')\n def test...
python
new_file
1
1
mit
c8bff113f85738f783fd00dcb1b9dacfa24cf589
auth0/auth0-python,auth0/auth0-python
auth0/v2/test/test_emails.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Send mails to contacts referenced in a csv file." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom django.core.mail import EmailMessage, get_connection\nfrom django.template import T...
python
new_file
1
5
bsd-3-clause
db11120077783fc3cc539fa919f822004d3ff355
RuralIndia/pari,RuralIndia/pari,RuralIndia/pari,RuralIndia/pari
pari/user/management/commands/bulk_mailer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add beginning of splinter tests" }, { "role": "assistant", "content": "from django.contrib.staticfiles.testing import LiveServerTestCase\nfrom django.contrib.auth.models import User\nfrom django.core.urlresolvers import reverse\n...
python
new_file
9
1
mit
ebcc9aef51d6244e69b5241b49359f8e8d2c0f85
Estmator/EstmatorApp,Estmator/EstmatorApp,Estmator/EstmatorApp
estmator_project/estmator_project/test_functional.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add migration for descriptor_dirty field in Sample" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.5 on 2017-02-03 10:11\nfrom __future__ import unicode_literals\n\nfrom django.db import...
python
new_file
1
0
apache-2.0
e1132fb8642a572eb674b69160db6bbd83b52cab
genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio
resolwe_bio/migrations/0007_sample_descriptor_dirty.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for the BaseTrigger.parameters() method\n\nSigned-off-by: Samuel Dacanay <<EMAIL>>" }, { "role": "assistant", "content": "import pytest\n\nfrom anchore_engine.services.policy_engine.engine.policy.gates import Packag...
python
new_file
1
2
apache-2.0
5a88660c98511f8cc0a8c210490a60b4805bdc58
anchore/anchore-engine,anchore/anchore-engine,anchore/anchore-engine
tests/unit/anchore_engine/services/policy_engine/engine/policy/test_gate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration test covering basic functionality" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2016- The Spyder Development Team\n# Licensed under the terms of the MIT License\n# (see ../../LIC...
python
new_file
1
1
mit
64be453e86c8e1a9461c901028078a12deaa4c32
jitseniesen/spyder-unittest
spyder_unittesting/widgets/tests/test_unittestinggui.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for RabbitMQ backend\n\nWe are testing here RabbitMQ Backend and RabbitMQ publisher class.\nI'm not sure yet how to implement Subscriber class" }, { "role": "assistant", "content": "import mock\n\n\nfrom pubsub.backend....
python
new_file
1
1
mit
5f38319bcc2cad3f7d8ea1985379b51e89e32f44
csarcom/python-pubsub,WeLikeAlpacas/python-pubsub,WeLikeAlpacas/Qpaca
tests/test_rabbitmq.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add automated script for determining which features to suppress" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport argparse\nimport subprocess\n\nfrom itertools import combinations\nfrom sys import executable...
python
new_file
1
0
mit
e3fdf6c03420cd95da33f4e36a0721308107687e
pdarragh/MinSem
suppress_classifier.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Supernova report parser script" }, { "role": "assistant", "content": "import sys\nimport re\nimport json\nimport fileinput\nimport argparse\n\ndef print_json(files):\n\tsamples = {}\n\tfor line in fileinput.input(files=files)...
python
new_file
3
7
mit
80f9ed82cfedcca494aa7e960d546f992f2d6c60
jgruselius/standalone_scripts,jgruselius/standalone_scripts
supernova_report_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 637. Average of Levels in Binary Tree\n\n637. Average of Levels in Binary Tree: https://leetcode.com/problems/average-of-levels-in-binary-tree/" }, { "role": "assistant", "content": "from collections import de...
python
new_file
1
6
apache-2.0
332a1d777a5205886a7bd941155ba178a577e601
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/average-of-levels-in-binary-tree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Wav2Vec2 unit test to Python" }, { "role": "assistant", "content": "# Copyright 2017-2022 John Snow Labs\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compli...
python
new_file
6
1
apache-2.0
cf732aaebfd4ed3f7ac2e8475a52e59934d193d6
JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp,JohnSnowLabs/spark-nlp
python/test/annotator/audio/wav2vec2_for_ctc_test.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add unittest for the Lambda Function" }, { "role": "assistant", "content": "\"\"\"Created By: Andrew Ryan DeFilippis\"\"\"\n\nimport contextlib\nimport re\nimport unittest\nfrom io import StringIO\n\nimport context\nimport lambda...
python
new_file
1
1
apache-2.0
64cbcc160dd3f7a6f8e59592afda302522314404
andrewdefilippis/aws-lambda
Functions/Python/template/test/test_lambda_function.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add hero to press release listing" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Mi...
python
new_file
1
0
mit
9bcedcb7ce07a0436b5b27d5f76bde69b4103f3f
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-press-releases,ic-labs/icekit-press-releases,ic-labs/django-icekit,ic-labs/django-icekit
press_releases/migrations/0008_auto_20161128_1049.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests on commands." }, { "role": "assistant", "content": "from unittest import TestCase\nfrom mock import Mock, patch\n\nfrom nyuki.commands import (_update_config, _merge_config, parse_init,\n ...
python
new_file
1
1
apache-2.0
8accd764b72299f6ed7be35104f9a2b958b0fce6
gdraynz/nyuki,optiflows/nyuki,optiflows/nyuki,gdraynz/nyuki
tests/commands_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test file for lesson 0." }, { "role": "assistant", "content": "# This lesson teaches you how to define a Python method. Try running the tests for this file before doing anything!\n\n# Here's a python script you can use to run...
python
new_file
1
1
mit
728c18bce41277781b2981c8a446100da19c0070
thejessleigh/test_driven_python,thejessleigh/test_driven_python,thejessleigh/test_driven_python
tests/test_lesson_0_hello_world.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tasks to anonymize past opt outs" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand, CommandError\n\nfrom studygroups.models import Application\n\nclass Command(BaseCommand):\n help ...
python
new_file
3
2
mit
5bfc44f140b0d8a16c88aa98205bee71e08fc372
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
studygroups/management/commands/anonymize-opt-outs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simplest integration test ever for dump" }, { "role": "assistant", "content": "from ...testcases import DustyIntegrationTestCase\n\nclass TestDumpCLI(DustyIntegrationTestCase):\n def test_dump(self):\n result = self...
python
new_file
1
1
mit
79e06c8e07ff0b945145a2a29e3133e0714f9415
gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty
tests/integration/cli/dump_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple function for outputting statistics for use with munin\n\nEventually we will want to replace this with statsd.\n\n(imported from commit 64246e9f2d13d72f53d009a5e3e456bc6be6296b)" }, { "role": "assistant", "content": "im...
python
new_file
2
3
apache-2.0
a73e2975d74a3a15a4180974fc6dd75789bc8e78
ericzhou2008/zulip,calvinleenyc/zulip,wavelets/zulip,littledogboy/zulip,Jianchun1/zulip,praveenaki/zulip,bssrdf/zulip,noroot/zulip,bluesea/zulip,jimmy54/zulip,timabbott/zulip,bluesea/zulip,SmartPeople/zulip,natanovia/zulip,karamcnair/zulip,aliceriot/zulip,nicholasbs/zulip,SmartPeople/zulip,amallia/zulip,mdavid/zulip,xu...
zephyr/lib/stats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add beginnings of some gizmo test coverage" }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom groundstation.transfer.request import Request\n\nclass TestGizmoRequest(TestCase):\n def test_loadable_aft...
python
new_file
4
1
mit
06c78c6f721f79ae5d72e4da0b6b966bbcb99fbf
richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation,richo/groundstation
test/test_gizmo_request.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for wind_turbine module" }, { "role": "assistant", "content": "import pandas as pd\nfrom pandas.util.testing import assert_series_equal\nimport pytest\n\nfrom windpowerlib.wind_turbine import read_turbine_data, WindTurb...
python
new_file
5
1
mit
a389b1172880db069e1a12ba75665e5366699b95
wind-python/windpowerlib
tests/test_wind_turbine.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Create Support Vector Machine vectorizer and classifier pickles" }, { "role": "assistant", "content": "from sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.linear_model import SGDClassifier\nfrom sklearn.exte...
python
new_file
2
0
mit
2f0145b59be4a251b31223d44fdca7f3fb211fa8
npentella/CuriousCorpus,npentella/CuriousCorpus,npentella/CuriousCorpus
svm_train.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add open url (web page) script" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport urllib2\n\nresponse = urllib2.urlopen(\"https://www.python.org/\")\nhtml = response.read()\n\n# print ...
python
new_file
1
0
mit
4e57f963d11dc66bb2bee46324121f1f229cb685
rawswift/python-collections
url/cli-open-url.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add level generation test util fn\n\nMaybe just create a general test util unless you're gonna build a\nlotta these." }, { "role": "assistant", "content": "from hunting.level.map import LevelMap, LevelTile\n\ndef generate_5x3_lon...
python
new_file
1
4
mit
6ee1612e73efc2209c8399a54cebb7cba7965c7d
MoyTW/RL_Arena_Experiment
tests/level/level_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test if there is a pattern in sparsity structure" }, { "role": "assistant", "content": "\n\"\"\"\nSome code to see if there is any pattern in the SVD of a matrix with fixed \nsparisty structure. \n\"\"\"\nimport sys \nimport logg...
python
new_file
3
0
bsd-3-clause
3099161325dfd99f1bf32d62218e2aaed41f32cd
charanpald/APGL
exp/sandbox/SparseSVDExp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a trivially basic test" }, { "role": "assistant", "content": "from __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nfrom unittest import TestCase\n\nfrom .. import Dr...
python
new_file
1
1
mit
c0685e9257af79e9ea2393611e7ad00a00a3734e
storborg/pyweaving
pyweaving/tests/test_draft.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use closue default parameter for set arguments correctly in list comprehension." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\ndef create_multipliers_late_binding():\n \"\"\" https://www.toptal.com/python/t...
python
new_file
1
2
apache-2.0
2e73497a0f1a417f1b047b3857bd72117c2a33d3
sjh/python
closure_default_parameter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the GPIO proxy class for the Raspberry Pi" }, { "role": "assistant", "content": "# The MIT License (MIT)\n#\n# Copyright (c) 2015 Frederic Jacob\n#\n# Permission is hereby granted, free of charge, to any person obtaining a co...
python
new_file
1
2
mit
dc26ebcd2437f4ade2a0692ebe79af0f4f664097
fjacob21/pycon2015
elpiwear/Rpi/gpio.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to restore a deleted node" }, { "role": "assistant", "content": "\"\"\"Restores a deleted node.\nNOTE: Only use this for nodes that have no addons except for OSFStorage and Wiki.\n\"\"\"\nimport logging\nimport sys\n\n...
python
new_file
1
6
apache-2.0
41fcb60868f0551603cf25c8616f942fcfd008f4
alexschiller/osf.io,cwisecarver/osf.io,erinspace/osf.io,CenterForOpenScience/osf.io,Nesiehr/osf.io,leb2dg/osf.io,emetsger/osf.io,chrisseto/osf.io,caneruguz/osf.io,binoculars/osf.io,alexschiller/osf.io,Johnetordoff/osf.io,mluo613/osf.io,mfraezz/osf.io,brianjgeiger/osf.io,caneruguz/osf.io,laurenrevere/osf.io,sloria/osf.i...
scripts/restore_node.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command to truncate table data in PostgreSQL db dump files\n\nExample usage:\n\n manage.py truncate_postgres_dbdump \\\n big.sql big_table_name1 big_table_name2 \\\n > small.sql" }, { "role": "assistant", "content": "i...
python
new_file
1
8
mit
7903336bf1190814c04f73ade3e19f0ed5fadef4
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit
icekit/management/commands/truncate_postgres_dbdump.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write tests for socket: short, long and exact." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport subprocess\nimport pytest\n\n\ndef test_basic(string=\"This is a test.\"):\n process = subprocess.Popen(['./...
python
new_file
1
1
mit
aff608fcd354bad4a2637f6cad6a6f90b1971bf8
bm5w/network_tools
test_echo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the stacks.yml file" }, { "role": "assistant", "content": "import json\n\nfrom dmaws.stacks import Stack\nfrom dmaws.context import Context\n\n\ndef is_true(x):\n assert x\n\n\ndef is_in(a, b):\n assert a in b...
python
new_file
1
7
mit
16654e7c02831e1d8daede1a3d83cbcfa0d5f92b
alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws
tests/test_stacks_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions to build and parse variable-length (VLE) strings" }, { "role": "assistant", "content": "import struct\n\ndef spdy_add_vle_string(frame, string):\n\tbuf = bytes(string, 'utf-8')\n\tbuf_len = len(buf)\n\n\tif buf_len ...
python
new_file
1
2
bsd-3-clause
924de7e93a8d73932253b10699ab0f481761586e
TeskaLabs/SeaCat-Client-Python3
seacat/spdy/vle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add joblaunch command to source control" }, { "role": "assistant", "content": "# Copyright 2013, AnsibleWorks Inc.\n# Michael DeHaan <<EMAIL>>\n# Chris Church <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"...
python
new_file
3
3
apache-2.0
f3f94fc218220e91197e639b0b3e5514741623f0
jangsutsr/tower-cli,tomfotherby/tower-cli,ansible/tower-cli,AlanCoding/tower-cli,docschick/tower-cli,ansible/tower-cli,cedub/tower-cli,nitzmahone/tower-cli,AlanCoding/tower-cli,chrismeyersfsu/tower-cli
lib/awx_cli/commands/JobLaunchCommand.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for upcoming pygametemplate.Image class" }, { "role": "assistant", "content": "from spec.helper import *\n\nfrom pygame import Surface\n\nfrom pygametemplate import Image\n\n\nwith description(\"pygametemplate.Imag...
python
new_file
27
0
mit
d8b396db59199f9221a3bf7ac9d75f1edfd07d4c
AndyDeany/pygame-template
spec/image_spec.py
rejected_lint
Too many lint violations: 27
true
[ { "role": "user", "content": "Write python code for the following: Add custom uility function which knows how to compare and match complex semver version specifiers." }, { "role": "assistant", "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license a...
python
new_file
1
4
apache-2.0
9bce03d89dad6b69a88632d95988fc42af19557a
nzlosh/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,tonybaloney/st2,StackStorm/st2,Plexxi/st2,peak6/st2,Plexxi/st2,lakshmi-kannan/st2,lakshmi-kannan/st2,tonybaloney/st2,Plexxi/st2,peak6/st2,tonybaloney/st2,peak6/st2,StackStorm/st2,lakshmi-kannan/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2
st2common/st2common/util/versioning.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add check for None values in node or node.next\n\nWe raise a ValueError if the rules of the API are broken (passing a null node or the tail node)" }, { "role": "assistant", "content": "\"\"\"\nWrite a function to delete a node (e...
python
new_file
1
3
mit
f44805d8673bdf1382a48962e46ba4e2a7ec7e79
keon/algorithms,amaozhao/algorithms
delete_node.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic proof of concept: encode and decode" }, { "role": "assistant", "content": "import string\n\n# Pseudocode\n\n## Encode\ndef encode(secret_string, wordlist=[]):\n # TODO: wordlist is not intended for production\n me...
python
new_file
3
2
mit
a6c3622ffbe6f02bab8a9be2c8949771d8729d95
Telkkar/fibonacci_message_encoding
fibonacci_message_encoding/main.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool for generating ublox config packets" }, { "role": "assistant", "content": "#\n# Copyright (c) Michael Tharp <<EMAIL>>\n#\n# This file is distributed under the terms of the MIT License.\n# See the LICENSE file at the top ...
python
new_file
2
0
mit
13cb9144047b0aa24260ff4b2bdbc5d2fcd8b82b
mtharp/laureline-firmware,mtharp/laureline-firmware,mtharp/laureline-firmware,mtharp/laureline-firmware
util/ublox_pkt.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Drop unused month and year columns from monthlybilling" }, { "role": "assistant", "content": "\"\"\"\n\nRevision ID: 0014_drop_monthly_billing_cols\nRevises: 0113_job_created_by_nullable\nCreate Date: 2017-07-27 13:36:37.304344\n...
python
new_file
1
1
mit
dcecd21f8237f9e455fa2aaf4862530470e7ffa8
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0114_drop_monthly_billing_cols.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command to populate site codes" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom corehq.apps.locations.models import Location\n\n\nclass Command(BaseCommand):\n hel...
python
new_file
1
4
bsd-3-clause
fce66218e682d80076ef744b9206b9cc042891b2
SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttara...
corehq/apps/commtrack/management/commands/populate_site_code.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2012 Nebula, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n#...
python
edit
1
4
apache-2.0
0c1a0a70154ddf107a6174d49793e369d28f1beb
bigswitch/horizon,tsufiev/horizon,froyobin/horizon,NeCTAR-RC/horizon,kfox1111/horizon,NeCTAR-RC/horizon,yjxtogo/horizon,RudoCris/horizon,watonyweng/horizon,philoniare/horizon,philoniare/horizon,noironetworks/horizon,eayunstack/horizon,CiscoSystems/avos,Dark-Hacker/horizon,zouyapeng/horizon,nvoron23/avos,mrunge/horizon,...
openstack_dashboard/views.py
rejected_duplicate
Near-duplicate of sample 4563
true
[ { "role": "user", "content": "Write python code for the following: Add backkwards-compatible Bankcard class factory\n\nThis provides a way for extensions that need to work with Oscar 0.5 and\n0.6 to consistently load the Banckard class (even though it was moved\nand had its API changed between versions)." ...
python
new_file
1
1
bsd-3-clause
085d280f450b6516d377bd7f7dbdbbd5004cd963
QLGu/django-oscar,kapt/django-oscar,Idematica/django-oscar,anentropic/django-oscar,Bogh/django-oscar,nickpack/django-oscar,saadatqadri/django-oscar,jmt4/django-oscar,michaelkuty/django-oscar,bnprk/django-oscar,sonofatailor/django-oscar,thechampanurag/django-oscar,kapari/django-oscar,nfletton/django-oscar,nickpack/djang...
oscar/apps/payment/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add class to store caption data" }, { "role": "assistant", "content": "\n\nclass Caption(object):\n def __init__(self, start, end, lines=None):\n self.start = start\n self.end = end\n self.lines = lines or...
python
new_file
1
2
mit
a1e5ebded1a44480dd71bdb267087683cf330a67
glut23/webvtt-py,sampattuzzi/webvtt-py
webvtt/generic.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new buyer email domain table\n\nA simple table to store the email domain (currently held in a text\nfile).\n\nThe domain_name field has a uniqueness constraint." }, { "role": "assistant", "content": "\"\"\"Add buyer email dom...
python
new_file
1
1
mit
329c3d31b76b22c481278a7c0994c9a7ba3f2852
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/1020_add_buyer_email_domain_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test part 1 of day 7." }, { "role": "assistant", "content": "import unittest\n\nfrom address import has_reflection, is_compatible\n\n\nclass TestAddress(unittest.TestCase):\n def test_has_reflection(self):\n assert has_...
python
new_file
1
1
mit
aea4f35e51f244ad191de37ca0f634b4917ae78d
machinelearningdeveloper/aoc_2016
07/test_address.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport subprocess\nimport sys\n\n# Attempt to detect https://github.com/docker/compose/issues/4344\ntry:\n # We don...
python
edit
1
0
apache-2.0
da466b391470333492a56395569812653ed6658f
thaJeztah/compose,shin-/compose,vdemeester/compose,sdurrheimer/compose,sdurrheimer/compose,schmunk42/compose,hoogenm/compose,jrabbit/compose,dnephin/compose,dnephin/compose,schmunk42/compose,swoopla/compose,funkyfuture/docker-compose,shin-/compose,thaJeztah/compose,hoogenm/compose,funkyfuture/docker-compose,jrabbit/com...
compose/cli/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Support for SSL in wsgi.Service\n\nEnable support for SSL as well using code from glance. We\nhave some new options for configuring the SSL support.\n\ntest_app starts wsgi.Service with a test app, then creates\na url to make sure the http r...
python
new_file
1
11
apache-2.0
a812d3054e25768c19a470bf090b298e11786ed3
poznyakandrey/oslo.service,eezhova/oslo.service,openstack/oslo.service,citrix-openstack-build/oslo.service
openstack/common/sslutils.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Add a test that imports runlint under both python2 and python3\n\nSummary:\nkhan-linter now runs under both python2 and python3, but it's going to be easy\nto break that. This commit adds a test that checks that runlint.py can be\nimported ...
python
new_file
1
1
apache-2.0
004e5411e94ed3a2f372f8a66b4683eebb5da11a
Khan/khan-linter,Khan/khan-linter,Khan/khan-linter,Khan/khan-linter
python_version_compat_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to find site-packages dirs." }, { "role": "assistant", "content": "import site\nfrom distutils.sysconfig import get_python_lib\n\nprint(\"Your main site-packages directory:\")\nprint(get_python_lib())\n\nprint\n\nprint...
python
new_file
1
0
bsd-3-clause
b05f95fb3e67ef2d13d67bf369e10c679a8b55cf
audreyr/useful
find_site_packages.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for the wiki markup." }, { "role": "assistant", "content": "# encoding: utf-8\n\nimport unittest\nimport ghmarkup\n\nclass test_ghmarkup(unittest.TestCase):\n def test_unadorned_text(self):\n self.assertEqual(\...
python
new_file
1
1
apache-2.0
edef5ae25b7228cf8b769a171305e9f9c32eeabb
jkingdon/ghilbert,kryptine/ghilbert,raphlinus/ghilbert,kryptine/ghilbert,raphlinus/ghilbert,raphlinus/ghilbert,raphlinus/ghilbert,jkingdon/ghilbert
app/test_ghmarkup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Print installed packages in pytest" }, { "role": "assistant", "content": "import os\nimport subprocess\nimport sys\n\n\ndef _is_pip_installed():\n try:\n import pip # NOQA\n return True\n except ImportError:\...
python
new_file
1
3
mit
b264313d48a66b847a1cfa6459745f2d35e10cee
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add udp sender for debug purpose" }, { "role": "assistant", "content": "import socket\n\nUDP_IP = \"192.168.1.1\"\nUDP_PORT = 1234\nMESSAGE = \"Hello, World!\"\n\nprint \"UDP target IP:\", UDP_IP\nprint \"UDP target port:\", UDP_...
python
new_file
4
0
mit
09c48a690958502568b76dc10bce751614a63f38
baptistelabat/orgie
udpSender.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add Web tools: getHeader, getParticularClass, getLinks, errorHandling, bannerGrapper" }, { "role": "assistant", "content": "import urllib, subprocess, random, re\nfrom bs4 import BeautifulSoup # http://www.crummy.com/software/Be...
python
new_file
10
7
mit
65bae0d38b96fde3e3dd54cdc915e99b661b974a
rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network,rudolfvavra/network
web_tools.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add check script for WithHueAndSaturation" }, { "role": "assistant", "content": "from __future__ import print_function, division\nimport imgaug as ia\nimport imgaug.augmenters as iaa\n\n\ndef main():\n image = ia.quokka_square...
python
new_file
1
3
mit
056de4daf1a00f677d3f9bccebae849dc49e7c48
aleju/imgaug,aleju/ImageAugmenter,aleju/imgaug
checks/check_with_hue_and_saturation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an examples directory to illustrate operator usage." }, { "role": "assistant", "content": "from opterator import opterate\n@opterate\ndef main(filename1, filename2, recursive=False, backup=False,\n suffix='~', *other_f...
python
new_file
5
3
mit
f12dba1134b8c9b42dc607e3e672de0e1cc2a4d1
buchuki/opterator
examples/copy.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add function to generate logarithmically spaced integers." }, { "role": "assistant", "content": "# encoding: utf-8\n\"\"\"\nMiscellaneous functions.\n\n\"\"\"\nfrom __future__ import division\n\nimport numpy as np\n\ndef logspace...
python
new_file
1
8
mit
8e75202872dd640c28173e2070b234165774f9db
chebee7i/buhmm
buhmm/misc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions to read in message data and parse targets." }, { "role": "assistant", "content": "#! /usr/bin/python\n\nimport numpy as np\nimport os\nfrom sklearn import datasets\n\nMESSAGES_DIR = \"data/messages/\"\nJUDGMENTS_PAT...
python
new_file
2
3
mit
ec742a7572f94d8864444379ce91a4de32c45715
chiubaka/actionizer
actionizer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial code for starting Tor" }, { "role": "assistant", "content": "import stem.process\n\ndef startTor(config):\n\tprocess = stem.process.launch_tor_with_config(config, take_ownership = True)\n\n\treturn process\n\ndef stop...
python
new_file
1
2
bsd-2-clause
00fc071687661a0f27e61cef74a3d6af0dadf38b
neelchauhan/OnionLauncher
OnionLauncher/torctl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add AWS poll for init complete plug-in." }, { "role": "assistant", "content": "import sys\nimport time\n\nfrom infrastructure.models import Server\nfrom jobs.models import Job\n\nTIMEOUT = 600\n\n\ndef is_reachable(server):\n ...
python
new_file
3
4
apache-2.0
c31eae3d02889a5517782bcaf20406c72bc0de14
CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge,CloudBoltSoftware/cloudbolt-forge
actions/cloudbolt_plugins/aws/poll_for_init_complete.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Automate initial seeding of user and oauth for development" }, { "role": "assistant", "content": "from django.utils.timezone import now, timedelta\nfrom django.core.management.base import BaseCommand\nfrom datastore.models import...
python
new_file
5
1
mit
b5db260f9499b7bdd5c13dc0c59c1ad6ad2d37fc
impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore
datastore/management/commands/dev_seed.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Tests: Add simple test for `mde_reference_new_footnote` command\n\nStart to ensure not to break existing functions." }, { "role": "assistant", "content": "from MarkdownEditing.tests import DereferrablePanelTestCase\n\n\nclass Tes...
python
new_file
1
1
mit
88b9ab92c5fe3374dba27c1d8c1d0b0b0e7411b7
SublimeText-Markdown/MarkdownEditing
tests/test_footnotes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Change folder structure. Add Python folder" }, { "role": "assistant", "content": "from __future__ import print_function\nfrom PIL import Image\n\ndef encode(image, string_to_encode):\n image_data = list(image.getdata())\n b...
python
new_file
2
5
cc0-1.0
85736989c7f3049d9d6c107e9dac385a751d0ba4
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
image_processing/steganography/python/steganography.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple test of one's h5py installation." }, { "role": "assistant", "content": "\"\"\"\nSimple test of a parallel build of h5py (from h5py's documentation).\n\nhttp://h5py.readthedocs.org/en/latest/mpi.html#using-parallel-hd...
python
new_file
1
0
bsd-3-clause
a75effa9489e41915b624084c61fba144003b448
RaoUmer/distarray,enthought/distarray,RaoUmer/distarray,enthought/distarray
utils/test_h5py.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a start for an ABC for the API" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"\nThe APIRUS API as an Abstract Base Class\n\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import divis...
python
new_file
1
1
cc0-1.0
564613521716161ca09ed127acfec984ca1ab48a
ocefpaf/APIRUS,ioos/APIRUS
apirus_abc.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nimport logging\n\nlogger = logging.getLogger(__file__)\n\n\ndef update_comment_root_target(state, *args, **kwargs):\n Comment = state.get_model('osf', 'comment'...
python
edit
1
7
apache-2.0
1f947d6cfe05f32ffa6566714e5aeeb74543a932
caseyrollins/osf.io,pattisdr/osf.io,HalcyonChimera/osf.io,erinspace/osf.io,mfraezz/osf.io,mfraezz/osf.io,felliott/osf.io,sloria/osf.io,aaxelb/osf.io,icereval/osf.io,felliott/osf.io,mattclark/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,erinspace/osf.io,pattisdr/osf.io,sloria/osf.io,Johnetordoff/osf.io,mfraezz/osf.io,icer...
osf/migrations/0095_migration_comments.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example of usage of the simulation of 802.11" }, { "role": "assistant", "content": "# Authors: CommPy contributors\n# License: BSD 3-Clause\n\nimport math\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimport commp...
python
new_file
1
0
bsd-3-clause
5c8c8585b19a9031cacad6a21fa4990560933e02
veeresht/CommPy
commpy/examples/wifi80211_conv_encode_decode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test case to cover multiple future statements on separate lines of a module." }, { "role": "assistant", "content": "from __future__ import nested_scopes\nfrom __future__ import division\nfrom __future__ import nested_scopes\n...
python
new_file
2
1
mit
bdf40e28126e9e18ac9ea069659686e37e70f34d
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_future3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add auto-link between User and Account models in migration" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.5 on 2017-03-25 10:24\nfrom __future__ import unicode_literals\n\nfrom django.c...
python
new_file
1
3
mit
e81f63798b84d26a29db79603efb0458ac25d374
Atilla106/members.atilla.org,Atilla106/members.atilla.org,Atilla106/members.atilla.org,Atilla106/members.atilla.org,Atilla106/members.atilla.org
accounts/migrations/0006_auto_20170325_1024.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add very basic move plugin test" }, { "role": "assistant", "content": "import pytest\n\n\n@pytest.mark.usefixtures('tmpdir')\nclass TestMove:\n config = \"\"\"\n tasks:\n test_move:\n mock:\n ...
python
new_file
3
1
mit
e7aa94722c3657fb4b0dfacb4c1e432438e4670a
crawln45/Flexget,ianstalk/Flexget,ianstalk/Flexget,crawln45/Flexget,Flexget/Flexget,malkavi/Flexget,Flexget/Flexget,malkavi/Flexget,ianstalk/Flexget,crawln45/Flexget,malkavi/Flexget,Flexget/Flexget,malkavi/Flexget,crawln45/Flexget,Flexget/Flexget
flexget/tests/test_move.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix error message when expanding data asset" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see L...
python
new_file
3
1
apache-2.0
3c49ca199fe41f0ca434b0fdc00ab76e7b134289
selahssea/ggrc-core,NejcZupec/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,and...
src/ggrc/migrations/versions/20160510122526_44ebc240800b_remove_response_relationships.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helper tool to help with examining entries in a feed." }, { "role": "assistant", "content": "#!/usr/bin/python3\n# Copyright (c) 2016 Eric Eisenhart\n# This software is released under an MIT-style license.\n# See LICENSE.md f...
python
new_file
3
0
mit
f7f8d7c6a92aa5d2d491674df14df46768f8b037
freiheit/discord_feedbot,freiheit/discord_rss_bot,freiheit/discord_feedbot,freiheit/discord_rss_bot
show_sample_entry.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command for forking Oscar's statics\n\nThis makes it easier for FEDs to get started styling a new Oscar\nproject. It copies all of Oscar's statics into a specified folder and\nchecks whether the new folder is in STATICFILES_D...
python
new_file
2
5
bsd-3-clause
c11b0f905ad844ef95bd779d3277318e357fdef0
jlmadurga/django-oscar,spartonia/django-oscar,WadeYuChen/django-oscar,makielab/django-oscar,josesanch/django-oscar,taedori81/django-oscar,faratro/django-oscar,vovanbo/django-oscar,DrOctogon/unwash_ecom,anentropic/django-oscar,mexeniz/django-oscar,kapt/django-oscar,WillisXChen/django-oscar,jinnykoo/wuyisj.com,sasha0/dja...
oscar/management/commands/oscar_fork_statics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration which no longer allows blank user representation fields" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass ...
python
new_file
1
0
bsd-3-clause
31e1b7837f101ead043b1d85eaa281d32c00c13b
Dreamsolution/django-auth-policy,mcella/django-auth-policy,Dreamsolution/django-auth-policy,mcella/django-auth-policy
django_auth_policy/migrations/0003_auto_20150410_0408.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for blank kicker" }, { "role": "assistant", "content": "# Generated by Django 2.0.8 on 2018-08-17 23:21\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.M...
python
new_file
1
0
mit
079be3496b22d1ac08408dcee13bca02bb20babd
thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline
articles/migrations/0010_auto_20180817_2321.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Terminal when grammar is different so terminals should not be equal" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of g...
python
new_file
1
1
mit
a4eb88bcd351c65aee85a2586b1c2eeb52dcd0e4
PatrikValkovic/grammpy
tests/terminal_tests/DifferentGrammarsTest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add shim for clover package name and deprecation warning" }, { "role": "assistant", "content": "# This is here simply to aid migration to trefoil. It will be removed in a future version!\n\nimport sys\nimport warnings\n\nimport ...
python
new_file
1
0
bsd-3-clause
1692e53b86f830cdde631437de3ad746d5225fc6
consbio/clover,consbio/clover
clover/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add YAML documents creating capability.\n\nSigned-off-by: Xavier Figueroa <<EMAIL>>" }, { "role": "assistant", "content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unic...
python
new_file
3
3
apache-2.0
d4bfe2f59d2552d211caddf90ceefcf27a06f08a
spdx/tools-python
spdx/writers/yaml.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first test for committee question uploads" }, { "role": "assistant", "content": "import os\nfrom builtins import str\nfrom tests import PMGLiveServerTestCase\nfrom pmg.models import db, Committee\nfrom tests.fixtures import d...
python
new_file
9
1
apache-2.0
101cdcaf3fff6c10e5c519f1ed409feefeff313a
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
tests/views/test_admin_committee_questions.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add Contact Page functional tests" }, { "role": "assistant", "content": "from .base import FunctionalTest\n\n\nclass ContactPageTest(FunctionalTest):\n\n def test_contact_page_navigation(self):\n self.browser.get(self.l...
python
new_file
1
1
bsd-3-clause
237ce6e8bc8534411825c9477f7cc8d6f3bfa570
andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop
tests/functional/test_contact_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic query string tests" }, { "role": "assistant", "content": "import pytest\nfrom httoop import URI\n\n\n@pytest.mark.parametrize('query_string,query', [\n\t(b'', ()),\n\t(b'&', ()),\n\t(b'&&', ()),\n#\t(b'=', ((u'', u''),)...
python
new_file
1
1
mit
887a81f21033a0694bccec9ac07470b95569646b
spaceone/httoop,spaceone/httoop,spaceone/httoop
tests/uri/test_uri_query.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration test for switching interfaces" }, { "role": "assistant", "content": "from .util import DestructiveYubikeyTestCase\nfrom ykman import driver_fido, driver_otp, driver_ccid\n\n\nclass TestInterfaces(DestructiveYubike...
python
new_file
1
1
bsd-2-clause
ce31b68b98802291c2d6e6871ba20f4711617f45
Yubico/yubikey-manager,Yubico/yubikey-manager
test/on_yubikey/test_interfaces.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add OpenStack Server facts module" }, { "role": "assistant", "content": "#!/usr/bin/python\n\n# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.\n#\n# This module is free software: you can redistribute it and/or modif...
python
new_file
6
3
mit
15013cde32597c6414ba731461d881080083bf24
thaim/ansible,thaim/ansible
lib/ansible/modules/cloud/openstack/os_server_facts.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 401. Binary Watch\n\n401. Binary Watch: https://leetcode.com/problems/binary-watch/" }, { "role": "assistant", "content": "from operator import mul\nclass Solution(object):\n def dfs(self, rem, cur, depth):...
python
new_file
1
7
apache-2.0
c44ce1e29e8af7808dda8f80e65a92842dd8144a
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/binary-watch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test with single rule with three nonterminals for chromsky normal form transformation" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 28.08.2017 14:37\n:Licence GNUv3\nP...
python
new_file
10
1
mit
c83ec7a33334c253362f93b991c396d3d1338ea4
PatrikValkovic/grammpy
tests/ChromskyForm/OneRuleWithMultipleNonterminalsTest.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Test `brew uninstall --force` suggestion" }, { "role": "assistant", "content": "import pytest\nfrom tests.utils import Command\nfrom thefuck.rules.brew_uninstall import get_new_command, match\n\n\n@pytest.fixture\ndef stdout():\n...
python
new_file
1
1
mit
17c39350788c9d371b6810dcc0bf82dd1fd93be1
Clpsplug/thefuck,SimenB/thefuck,SimenB/thefuck,mlk/thefuck,scorphus/thefuck,nvbn/thefuck,Clpsplug/thefuck,mlk/thefuck,nvbn/thefuck,scorphus/thefuck
tests/rules/test_brew_uninstall.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 721. Accounts Merge\n\n721. Accounts Merge: https://leetcode.com/problems/accounts-merge/" }, { "role": "assistant", "content": "from collections import defaultdict\nclass Solution(object):\n def accountsMe...
python
new_file
1
7
apache-2.0
e42718a59d9c0bffed524f5764ee119cb616085e
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/accounts-merge.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to get all brazilian state with their respective type and coverage" }, { "role": "assistant", "content": "from .registry import registry\nfrom workalendar.america import Brazil, BrazilBankCalendar\n\n\n# Commemorative ...
python
new_file
1
14
mit
eb5f3db33bf607b21dfc132127e873c9722c687e
novafloss/workalendar,novapost/workalendar,jaraco/calendra
workalendar/brazil_holidays_set.py
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Write python code for the following: Add script to id missing CHANGELOG entries" }, { "role": "assistant", "content": "# Find head of current branch and merge commit of last release\n# Get merges in between\ncurrent_branch_head = '8dfeae34'\nlast_release_head = '355...
python
new_file
2
0
apache-2.0
3134a061d9bd1d80fd99d223537f6c046a862d31
Kitware/girder,Xarthisius/girder,Xarthisius/girder,girder/girder,data-exp-lab/girder,manthey/girder,manthey/girder,jbeezley/girder,RafaelPalomar/girder,Kitware/girder,kotfic/girder,girder/girder,girder/girder,RafaelPalomar/girder,kotfic/girder,Xarthisius/girder,Xarthisius/girder,manthey/girder,data-exp-lab/girder,Kitwa...
release_notes_prep.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 329. Longest Increasing Path in a Matrix\n\n329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/" }, { "role": "assistant", "content": "from collections ...
python
new_file
4
10
apache-2.0
f0a721f2dbc4b8b9354e459d45325a08a646e09b
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/longest-increasing-path-in-a-matrix.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 712. Minimum ASCII Delete Sum for Two Strings\n\n712. Minimum ASCII Delete Sum for Two Strings: https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/" }, { "role": "assistant", "content": "cl...
python
new_file
1
5
apache-2.0
5c3cdc7a23fc1b0733b8b8bb9266c6d8c419dcd4
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/minimum-ascii-delete-sum-for-two-strings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move module namespace test to a separate test script." }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# Copyright 2011-2012 Splunk, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"): you...
python
new_file
1
1
apache-2.0
d3731c0b3c15b6f321a91121300de4da7d47acca
splunk/splunk-sdk-python,ww9rivers/splunk-sdk-python,kkirsche/splunk-sdk-python,lowtalker/splunk-sdk-python,sullivanmatt/splunk-sdk-python,kkirsche/splunk-sdk-python,kkirsche/splunk-sdk-python,kkirsche/splunk-sdk-python,splunk/splunk-sdk-python
tests/test_module.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom wagtail.wagtailimages.models import get_image_model\nfrom wagtail.wagtailimages.formats import get_image_format\n\n\nclass ImageEmbedHandler(object):\n \"\"\"\n ImageEmbedHandler will be invoked whenever we encounter an element i...
python
edit
1
3
bsd-3-clause
98f37bb6fff90d9a4385ceea5454f0b5146e6dee
mikedingjan/wagtail,Toshakins/wagtail,nutztherookie/wagtail,quru/wagtail,mayapurmedia/wagtail,iansprice/wagtail,mixxorz/wagtail,zerolab/wagtail,iansprice/wagtail,takeflight/wagtail,gogobook/wagtail,mixxorz/wagtail,hamsterbacke23/wagtail,FlipperPA/wagtail,kurtw/wagtail,davecranwell/wagtail,chrxr/wagtail,nrsimha/wagtail,...
wagtail/wagtailimages/rich_text.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Heapchecker: Add presubmit checks for suppressions.\n\nBUG=none\nTEST=none\nReview URL: http://codereview.chromium.org/3197014\n\ngit-svn-id: http://src.chromium.org/svn/trunk/src@57132 4ff67af0-8c30-449e-8e8b-ad334ec8d88c\n\nFormer-commit-i...
python
new_file
1
13
bsd-3-clause
4e53ea6ea9e3f5f409014221c000486bc188769f
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
tools/heapcheck/PRESUBMIT.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Write python code for the following: Add a testcase for Manual" }, { "role": "assistant", "content": "from tests.helper import ExternalVersionTestCase\n\n\nclass ManualTest(ExternalVersionTestCase):\n def test_manual(self):\n self.assertEqual(self.sync_get...
python
new_file
1
1
mit
d77cff9cc75b949b63d9497db54a5d86aabf9281
lilydjwg/nvchecker
tests/test_manual.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests/cpydiff: Add test and workaround for function.__module__ attr.\n\nMicroPython does not store any reference from a function object to the\nmodule it was defined in, but there is a way to use function.__globals__ to\nindirectly get the m...
python
new_file
1
1
mit
86c8f3311efaf6bc4f1ef5bda4213ec07f36a7fd
pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython
tests/cpydiff/core_function_moduleattr.py
accepted
null
true