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 minimal regression tests of reading ACA hdr3 data" }, { "role": "assistant", "content": "\"\"\"\nBasic functionality and regression tests for ACA hdr3 (diagnostic) telemetry.\n\"\"\"\n\nimport numpy as np\n\nfrom .. import ac...
python
new_file
1
8
bsd-3-clause
aca69251d17bd76302c0d4c1403f54c9f8da4949
sot/mica,sot/mica
mica/archive/tests/test_aca_hdr3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for custom context processor" }, { "role": "assistant", "content": "\"\"\"\nTests for Custom context processors.\n\"\"\"\nimport os\n\nfrom django.conf import settings\nfrom django.test import TestCase, override_setting...
python
new_file
1
1
bsd-3-clause
f0d501bec97e77b7f7efb427bdcbb051230a5e5a
kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop,andela-kndungu/compshop,andela-kndungu/compshop
store/tests/test_context_processor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration that has been pending for a long time" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10 on 2019-03-08 02:15\nfrom __future__ import unicode_literals\n\nfrom django.db import ...
python
new_file
1
0
mit
c64b2e468f19b96c49d2a79e8f9165beb7ab55a2
CasualGaming/studlan,dotKom/studlan,CasualGaming/studlan,CasualGaming/studlan,dotKom/studlan,CasualGaming/studlan,dotKom/studlan,dotKom/studlan
apps/competition/migrations/0015_auto_20190308_0215.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for auto_now removal" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9 on 2017-03-29 17:51\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nimport...
python
new_file
1
0
apache-2.0
b0b3e28df3807de5bb6b534bf21c2d2d027340e9
mfraezz/osf.io,icereval/osf.io,Johnetordoff/osf.io,icereval/osf.io,HalcyonChimera/osf.io,adlius/osf.io,Nesiehr/osf.io,HalcyonChimera/osf.io,saradbowman/osf.io,hmoco/osf.io,aaxelb/osf.io,laurenrevere/osf.io,cslzchen/osf.io,caseyrollins/osf.io,TomBaxter/osf.io,chrisseto/osf.io,cslzchen/osf.io,crcresearch/osf.io,adlius/os...
osf/migrations/0002_auto_20170329_1251.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ENH: Add a Matplotlib helper functions module\n\n* So far this only contains a function to create a ListedColormap from\n ColorBrewer palette specs." }, { "role": "assistant", "content": "\"\"\"\nA collection of helper functions...
python
new_file
1
4
bsd-3-clause
3c8f25edfe6fb87c971fd1d60ee7cf0e2d18f36b
sahg/SAHGutils
sahgutils/mpl_helpers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for table outputter" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\nunittests for table outputter\n'''\n\n# Import Python Libs\nfrom __future__ import absolute_import, print_function, unicode_l...
python
new_file
1
1
apache-2.0
d729656703940304555a2d638d02c71f5a872434
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/output/test_table_out.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add shell class for type checkers" }, { "role": "assistant", "content": "import six\n\n\nclass SubscriptableType(type):\n def __getitem__(self, key):\n return self\n\n\n@six.add_metaclass(SubscriptableType)\nclass Check...
python
new_file
1
1
mit
8137d5ae66dc6f6d08a674466a5d7c84efb12b6c
tobgu/pyrsistent,tobgu/pyrsistent,tobgu/pyrsistent
pyrsistent/typing.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cycle test of remove useless symbols" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 19.08.2017 16:13\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"\n\nfrom unitt...
python
new_file
17
1
mit
73bf27a95944f67feb254d90b90cfa31165dc4cb
PatrikValkovic/grammpy
tests/UselessSymbolsRemove/CycleTest.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Write python code for the following: Add script used to subvolume new EM volumes" }, { "role": "assistant", "content": "# IPython log file\n\n\nfrom gala import imio\nimport numpy as np\n\nslices = [(slice(None), slice(None, 625), slice(None, 625)),\n (slic...
python
new_file
1
0
bsd-3-clause
d423c5cc0756f621660598a4df2e331c6e5d97db
jni/gala-scripts
new-em-subvolumes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to hamming numbers kata" }, { "role": "assistant", "content": "# You are given as input an unsorted array of n distinct numbers, \n# where n is a power of 2. \n# Give an algorithm that identifies the second-largest n...
python
new_file
2
8
mit
2ae16c880d6b38c00b5eb48d99facacc5a3ccf7e
HiccupinGminor/tidbits,HiccupinGminor/tidbits
python/second-largest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 345. Reverse Vowels of a String\n\n345. Reverse Vowels of a String: https://leetcode.com/problems/reverse-vowels-of-a-string/" }, { "role": "assistant", "content": "class Solution(object):\n def reverseVowe...
python
new_file
1
3
apache-2.0
a046376067c7e3055dc327246660b161b505dce6
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/reverse-vowels-of-a-string.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unittest for logging from apel.common.__init__" }, { "role": "assistant", "content": "from cStringIO import StringIO\nimport logging\nimport os\nimport sys\nimport tempfile\nimport unittest\n\nfrom apel.common import set_up_l...
python
new_file
1
1
apache-2.0
8040b797ba78f59fd0d182dfd22993340cb37700
apel/apel,stfc/apel,tofu-rocketry/apel,stfc/apel,tofu-rocketry/apel,apel/apel
test/test_logging.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for sympy_parser" }, { "role": "assistant", "content": "from sympy.parsing.sympy_parser import parse_expr\nfrom sympy import *\n\ndef test_implicit_multiplication_application():\n x = Symbol('x')\n inputs = {...
python
new_file
2
2
bsd-3-clause
bf8e308c9ebab2a2a8a14f9fff747d5a303f6f68
Mitchkoens/sympy,saurabhjn76/sympy,kmacinnis/sympy,pandeyadarsh/sympy,mafiya69/sympy,MechCoder/sympy,cccfran/sympy,liangjiaxing/sympy,hargup/sympy,mcdaniel67/sympy,jamesblunt/sympy,garvitr/sympy,ahhda/sympy,skidzo/sympy,Designist/sympy,hrashk/sympy,rahuldan/sympy,toolforger/sympy,grevutiu-gabriel/sympy,kaichogami/sympy...
sympy/parsing/tests/test_sympy_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for tshark sub-module" }, { "role": "assistant", "content": "import mock\n\nfrom pyshark.tshark.tshark import (\n get_tshark_display_filter_flag,\n get_tshark_interfaces,\n get_tshark_version,\n)\n\n@mock.patch...
python
new_file
1
1
mit
5981cba4f2bac5b1c29d4901bd0b3b3f523eb8a9
eaufavor/pyshark-ssl,KimiNewt/pyshark
tests/test_tshark.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for ElasticSearch classes." }, { "role": "assistant", "content": "\"\"\"Test the ElasticSearch module\"\"\"\n\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import divis...
python
new_file
1
1
mit
305a137352ee2a287ded5d39657f91460e474e3b
openspending/gobble
tests/test_search.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for very basic things" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport unittest\nimport pandas as pd\nimport pdfplumber\nimport sys, os\nimport six\n\nimport logging\nlogging.disable(logging.ERROR)\n\...
python
new_file
4
1
mit
c0e6979a98251fa2300b2c61f206775ef953f7a8
jsvine/pdfplumber
tests/test-basics.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tool to send a jump to application command." }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport utils\nimport commands\n\ndef parse_commandline_args():\n parser = utils.ConnectionArgumentParser(description...
python
new_file
1
2
bsd-2-clause
ef204d9455070d3ebff2890813e98ca44d398212
cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader
client/bootloader_run_application.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test locale is set based on query param" }, { "role": "assistant", "content": "import unittest\nfrom cla_public.apps.base.views import set_locale\n\nfrom cla_public.app import create_app\nfrom flask import request\n\nclass Locale...
python
new_file
4
3
mit
8290df4317b0aae2c15b4a82942413b84f754e84
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/apps/base/tests/test_locale.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add Python project generation script." }, { "role": "assistant", "content": "import os\nimport subprocess\nimport sys\n\n# get the path to the directory containing the script\nprojects_directory = os.path.dirname(os.path.realpath...
python
new_file
1
0
mit
c637bb057698b2699c9515ee9aed8432d7c51fe7
chrisculy/Divida,chrisculy/Divida
projects/generate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to instantiate unrolling block" }, { "role": "assistant", "content": "from mock import Mock\n\nfrom malcolm.modules.scanning.blocks import unrolling_block\nfrom malcolm.testutil import ChildTestCase\n\n\nclass TestUnroll...
python
new_file
1
1
apache-2.0
3bcb4fd5fd9680d33423e76bd9502f408a5e498f
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
tests/test_modules/test_scanning/test_unrollingblock.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add primitive library search support" }, { "role": "assistant", "content": "\"\"\"A module for consuming the Penn Libraries API\"\"\"\nimport requests\n\nBASE_URL = \"http://dla.library.upenn.edu/2.0.0/search\"\n\n\ndef search(qu...
python
new_file
1
1
mit
3c9ef6d42bb45d147d0c6093ea134d94fc4cf29f
pennlabs/penn-sdk-python,pennlabs/penn-sdk-python
penn/libraries.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Make the initial account migrations" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.3 on 2017-07-11 19:06\nfrom __future__ import unicode_literals\n\nimport apps.accounts.models\nfrom dj...
python
new_file
1
0
mit
7c292b1577420d74fd72cbc4eef3d5364ba01bb2
slavpetroff/sweetshop,slavpetroff/sweetshop
backend/django/apps/accounts/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sketch for POI selector widget" }, { "role": "assistant", "content": "from functools import partial\n\nimport numpy as np\nimport pandas as pd\nimport pyqtgraph as pg\n\nfrom pyqtgraph.Qt import QtGui, QtCore\n\nfrom graphysi...
python
new_file
7
2
isc
ea0ff4ae04907473e2af6e7629ea9d73a34f4d85
jaj42/dyngraph,jaj42/GraPhysio,jaj42/GraPhysio
graphysio/plotwidgets/poiselector.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Apply refactoring done to authorize.net form/gateway to braintree." }, { "role": "assistant", "content": "from django import forms\n\n\nclass PaymentFormBase(forms.Form):\n\n def __getitem__(self, key):\n \tpayment_fields =...
python
new_file
5
1
mit
844fd2533063343c969d9ff9259c80605fe488dd
hiidef/hiicart,hiidef/hiicart
hiicart/forms.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add utilities to make writing ros tests less painful." }, { "role": "assistant", "content": "import roslaunch\nimport functools\nimport subprocess\n\ndef with_roscore(obj):\n \"\"\"Decorator to run all tests in a testcase with...
python
new_file
1
1
mit
58c10946515b37e55b06f3e455a59c44d3b6076d
jgkamat/buzzmobile,gtagency/buzzmobile,gtagency/buzzmobile,jgkamat/buzzmobile,gtagency/buzzmobile,jgkamat/buzzmobile
buzzmobile/tests/rostest_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a python-only alternative to dbbindings.py\n\nPushing a small web app that can return Bookworm API calls through Python, rather than Apache HTTP Server. It is currently a very simple porting of the Apache code that runs on port 8080, and...
python
new_file
11
3
mit
8a07ebf3db3cd2b70534c92e90d5428444e3d8f1
Bookworm-project/BookwormDB,Bookworm-project/BookwormDB
bookwormDB/bin/dbbindings-flask.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Add Capabilities Client unit tests\n\nChange-Id: I0bb5d0d7b775ee41dedf6ac30ece3698d585f072" }, { "role": "assistant", "content": "# Copyright 2017 AT&T Corporation.\n# All Rights Reserved.\n#\n# Licensed under the Apache Licen...
python
new_file
1
1
apache-2.0
998442022f2c71197c6e91fb8de276316eff5cc5
Juniper/tempest,vedujoshi/tempest,cisco-openstack/tempest,cisco-openstack/tempest,vedujoshi/tempest,masayukig/tempest,openstack/tempest,Juniper/tempest,masayukig/tempest,openstack/tempest
tempest/tests/lib/services/volume/v2/test_capabilities_client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [SR] Add basic CLI for SyncWrite requests\n\nAdd sync_repl.py; a basic command-line interface to making Synchronous\nReplication requests.\n\nExample usage - to perform a set with durability requirements to key\n'test' setting its value to '...
python
new_file
3
0
bsd-3-clause
e64b399370ae4ddb21a969d1b8c664d2201790f9
daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine
engines/ep/management/sync_repl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add scripts to create release notes from git log\n\nThese script generates a list of commits from git log between\n<since> and <until>. The output of this script is in asciidoc\nformat containting list of commits subject and body.\n\nBug: is...
python
new_file
1
0
apache-2.0
1c39b15ef604db13c37e37080ba6294c163b0c5d
midnightradio/gerrit,zommarin/gerrit,gcoders/gerrit,bpollack/gerrit,Seinlin/gerrit,thesamet/gerrit,keerath/gerrit_newssh,teamblueridge/gerrit,qtproject/qtqa-gerrit,GerritCodeReview/gerrit,anminhsu/gerrit,quyixia/gerrit,teamblueridge/gerrit,thinkernel/gerrit,Seinlin/gerrit,quyixia/gerrit,ashang/aaron-gerrit,Saulis/gerri...
tools/gitlog2asciidoc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command to migrate countries to list" }, { "role": "assistant", "content": "from django.core.management.base import LabelCommand\nfrom django_countries.countries import COUNTRIES\nfrom corehq.apps.domain.models imp...
python
new_file
4
6
bsd-3-clause
030e558b3b52900b8fa2cea9a92c055de3ec5b44
puttarajubr/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq
corehq/apps/domain/management/commands/migrate_domain_countries.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Test that redirects from root URL are performed appropriately." }, { "role": "assistant", "content": "from __future__ import absolute_import, print_function, unicode_literals\n\nfrom django.core.urlresolvers import reverse\nfrom ...
python
new_file
1
1
mit
7529bbffd349c57d3ec527a91b620252d0814414
mrpau/kolibri,rtibbles/kolibri,christianmemije/kolibri,jonboiser/kolibri,benjaoming/kolibri,jayoshih/kolibri,jtamiace/kolibri,learningequality/kolibri,jonboiser/kolibri,christianmemije/kolibri,jamalex/kolibri,DXCanas/kolibri,aronasorman/kolibri,whitzhu/kolibri,DXCanas/kolibri,lyw07/kolibri,MingDai/kolibri,lyw07/kolibri...
kolibri/core/test/test_key_urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example of a generator->freevar->cell->generator reference-cycle that doesn't get cleaned up and thus leaks." }, { "role": "assistant", "content": "\n# This leaks since the introduction of yield-expr and the use of generat...
python
new_file
1
2
mit
e87f5c80d7723480544374c175cacc5540f9f6ab
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/leakers/test_generator_cycle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use NLTK to get word stems (useful for categorization)" }, { "role": "assistant", "content": "#!/usr/bin/env python2\n\n# Install nltk: 'sudo pip install -U pyyaml nltk'\nfrom nltk.stem.lancaster import LancasterStemmer \n\nc = {...
python
new_file
3
3
bsd-3-clause
5b251c46581e286f05e02ec2363b9c83a228f3fb
FAB4D/humanitas,FAB4D/humanitas,FAB4D/humanitas
data_collection/social_media/twitter/spellchecking/get_category.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple util to help convert to new event system" }, { "role": "assistant", "content": "import os\r\n\r\n\r\ndef iter_filenames(dir, ignore):\r\n for dirpath, dirnames, filenames in os.walk(dir):\r\n for fname in fil...
python
new_file
1
12
bsd-2-clause
ab935c2fed108aeb1e7c0cad3ba97c48967c676f
jrversteegh/flexx,JohnLunzer/flexx,JohnLunzer/flexx,zoofIO/flexx,zoofIO/flexx,JohnLunzer/flexx,jrversteegh/flexx
flexx/util/eventhelper.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add tool for converting EXO data from latex to JSON" }, { "role": "assistant", "content": "\n# EXO Convesion Script\n# Using specification v1.01\n# J.C. Loach (2013)\n\n# Textual replacements\nremove = {r\"\\centering\":\"\", r\"...
python
new_file
1
0
apache-2.0
b635b6f17e8fceba72e48ab074120d3bddd9388d
chrisstanford/persephone-darkside,nepahwin/persephone,nepahwin/persephone,chrisstanford/persephone-darkside
tools/process_EXO.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add push api script to get a version's salesforce id from its namespace and version number including support for patch and beta versions" }, { "role": "assistant", "content": "import os\nimport sys\nimport csv\nfrom push_api impo...
python
new_file
4
0
bsd-3-clause
6275c09373ac796876cebf62d74ac1f421eed3ca
steelbrick/CumulusCI,motivislearning/CumulusCI,steelbrick/CumulusCI,e02d96ec16/CumulusCI,cdcarter/CumulusCI,SalesforceFoundation/CumulusCI,Joble/CumulusCI,e02d96ec16/CumulusCI,motivislearning/CumulusCI,SalesforceFoundation/CumulusCI
ci/push/get_version_id.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import LabelCommand\nfrom django_countries.countries import COUNTRIES\nfrom corehq.apps.domain.models import Domain\n\nclass Command(LabelCommand):\n help = \"Migrates old django domain countries from str...
python
edit
4
9
bsd-3-clause
2e9c58f00db55e12f3a9df1a71fe33fbe440d7ce
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq
corehq/apps/domain/management/commands/migrate_domain_countries.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration to rename version -> tag field" }, { "role": "assistant", "content": "\"\"\"\nMigrate version to tag in build models\n\"\"\"\nimport os\nimport shutil\nimport yaml\n\n\njob_dirs = (\n filename for filename in\n ...
python
new_file
3
0
isc
73321680795cff9b1c680ba20fc6ebf2fb87eeb9
sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,RickyCook/DockCI
dockci/migrations/0003.py
rejected_duplicate
Near-duplicate of sample 8426
true
[ { "role": "user", "content": "Write python code for the following: Add test for CryptoTicker widget" }, { "role": "assistant", "content": "# Copyright (c) 2021 elParaguayo\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated docume...
python
new_file
1
1
mit
2f4722bb30e39510e985a08da1d28dbdd6ccd232
ramnes/qtile,qtile/qtile,ramnes/qtile,qtile/qtile
test/widgets/test_crypto_ticker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add task to migrate TariffPrice and NCSOConcession data\n\nThis file can be removed once the migration is done. (Should it be a\ndata migration?)" }, { "role": "assistant", "content": "# This is a one-off command to migrate all ...
python
new_file
1
3
mit
c6108cacc7705c27b8913d82229c331551796830
ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc
openprescribing/frontend/management/commands/migrate_some_dmd_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test file for otp script" }, { "role": "assistant", "content": "import unittest\nimport random\nimport datetime \nimport emission.net.ext_service.otp.otp as otp\nimport emission.core.wrapper.location as ecwl\nimport emission....
python
new_file
7
1
bsd-3-clause
7ae164a58e229379f0acf674767bdb0b422cf13a
e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server
emission/net/ext_service/otp/test_otp.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 481. Magical String\n\n481. Magical String: https://leetcode.com/problems/magical-string/" }, { "role": "assistant", "content": "class Solution(object):\n def magicalString(self, n):\n \"\"\"\n ...
python
new_file
1
7
apache-2.0
1bb34ccef2f5c622f258a7dbe375e3a62b6cf63d
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/magical-string.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python loop with else demo" }, { "role": "assistant", "content": "# coding=utf-8\n\n\"\"\"\n # test_loop_with_else.py\n # \n # Copyright(C) By AbsentM. 2018\n # \n # Author: AbsentM\n # Date: 2018/03/18\n # \n # Description: ...
python
new_file
18
3
mit
67b90064cfaa09c55ea138895eb6c7ed9513bc96
absentm/Demo,absentm/Demo,absentm/Demo,absentm/Demo,absentm/Demo,absentm/Demo
Python-demo/test-demo/test_loop_with_else.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport platform\nimport sys\n\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'aa87035cc012ce0d533bb56b947bca81a6e71b82'\n\nARCH = {\n 'cygwin': '32bit'...
python
edit
2
1
mit
654d21100ff2908af6c44e2d2d71ba92b1e96722
beni55/electron,vHanda/electron,leftstick/electron,mubassirhayat/electron,simongregory/electron,voidbridge/electron,tomashanacek/electron,nicobot/electron,MaxWhere/electron,pandoraui/electron,farmisen/electron,shennushi/electron,thomsonreuters/electron,minggo/electron,LadyNaggaga/electron,MaxGraey/electron,lrlna/electr...
script/lib/config.py
rejected_duplicate
Near-duplicate of sample 3285
true
[ { "role": "user", "content": "Write python code for the following: Create script to migrate email" }, { "role": "assistant", "content": "from django.contrib.auth.models import User\nfrom copy import deepcopy\n\n\ndef _migrate(file_path):\n arq = open(file_path)\n for line in arq.readlines(...
python
new_file
1
4
bsd-3-clause
c8336a85f002dfe8437c6092f3d44bca2c5e0b45
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/maintenance/scripts/migrate_email.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: linter: Add test case for custom_check.py\n\nFixes #5406." }, { "role": "assistant", "content": "import os\n\nfrom itertools import chain\nfrom mock import patch, MagicMock\nfrom unittest import TestCase\n\nfrom tools.linter_lib....
python
new_file
4
7
apache-2.0
53436d9ea71b11c45fb7208c13b626d1b47d1f70
dhcrzf/zulip,jackrzhang/zulip,amanharitsh123/zulip,Galexrt/zulip,Galexrt/zulip,timabbott/zulip,rht/zulip,dhcrzf/zulip,rishig/zulip,zulip/zulip,zulip/zulip,showell/zulip,mahim97/zulip,timabbott/zulip,kou/zulip,kou/zulip,rht/zulip,synicalsyntax/zulip,punchagan/zulip,brainwane/zulip,timabbott/zulip,showell/zulip,synicalsy...
tools/tests/test_linter_custom_check.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add integration tests for simultaneous updates\n\nConvergence allows us to start a stack update while a previous update (or\ncreate) is still in progress. If a resource is found to be locked by a\nprevious graph traversal when the new traver...
python
new_file
1
3
apache-2.0
fe45b745e5f0a859f10b6edf2ad8f1e24cc01a56
openstack/heat,noironetworks/heat,noironetworks/heat,openstack/heat
heat_integrationtests/functional/test_simultaneous_update.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test which executes the Solidity contract over an Ethereum RPC, and then compares the result with the Python emulation of the Solidity contract." }, { "role": "assistant", "content": "import json\nfrom hypothesis import giv...
python
new_file
3
1
apache-2.0
9475f33d5689d348721c3f7409f7bb9ae2f0e639
enjin/contracts
solidity/hypothesis/SolidityTest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check in plain RNN test." }, { "role": "assistant", "content": "import unittest\n\nimport numpy as np\nimport theano\nfrom theano import tensor as T\n\nfrom rembed.plain_rnn import RNN\nfrom rembed.util import VariableStore, Crop...
python
new_file
4
1
mit
45d7a440067f6c0aed45468863814fa0ee1c9449
stanfordnlp/spinn,nyu-mll/spinn,stanfordnlp/spinn,nyu-mll/spinn,nyu-mll/spinn,stanfordnlp/spinn
rembed/tests/test_plain_rnn.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add stupidly simple HTTP server using standard python 3" }, { "role": "assistant", "content": "#!/usr/bin/env python3\nfrom argparse import ArgumentParser, ArgumentDefaultsHelpFormatter\nimport os, http.server\n\ndef main(args):\...
python
new_file
3
1
unlicense
5974132232605d27fde2704631e3c8a6d928a723
pastly/python-snippits
src/simple-http-server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial version of download script" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom utils.summary_downloader import SummaryDownloader\n\nif __name__ == '__main__':\n\n # setting...
python
new_file
1
0
mit
a543e4dd62de6e0dbda0fa43c67d3a3fe2165499
leaffan/pynhldb
download_summaries.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add monkeyrunner script of cpu energy usage\n\nSigned-off-by: Emiliano Firmino <<EMAIL>>" }, { "role": "assistant", "content": "from com.android.monkeyrunner import MonkeyRunner as mkr\nfrom com.android.monkeyrunner import Monkey...
python
new_file
1
2
mit
608976fb5663adc5cbfa3ebc9af00171e3042a98
Miliox/droid_emc2,Miliox/droid_emc2,Miliox/droid_emc2,Miliox/droid_emc2,Miliox/droid_emc2
monkey/cpu_profile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Validate files needed by Android tools\n\nBUG=catapult:#2546\n\nReview-Url: https://codereview.chromium.org/2194743002" }, { "role": "assistant", "content": "# Copyright 2016 The Chromium Authors. All rights reserved.\n# Use of t...
python
new_file
1
1
bsd-3-clause
35aa49152ab28d3364afeac4a053b41082f0b3b9
sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult,benschmaus/catapult,catapult-projec...
systrace/systrace/monitor_unittest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add spectral graph display script" }, { "role": "assistant", "content": "import numpy as np\nfrom scipy import io, sparse, linalg\n# run this from elegant scipy chapter\n\nchem = np.load('chem-network.npy')\ngap = np.load('gap-ne...
python
new_file
4
0
bsd-3-clause
22b897c20ac63a6aea4383f4a4378bca1c3688b2
jni/spectral-graphs
scripts/spectral-graph-display.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add SgExpressionEvaluator - Evaluates expressions given fields and values" }, { "role": "assistant", "content": "\"\"\"A set of utility functions to evaluate expressions.\n\nSample Usage:\n print(SgExpressionEvaluator.Evaluate...
python
new_file
1
2
mit
82162a334595ad47090dc1a8991d53ab5ece3736
lnishan/SQLGitHub
components/expression_evaluator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add bitmask for subscribed events to intervention table." }, { "role": "assistant", "content": "from alembic import op\nimport sqlalchemy as sa\n\n\n\"\"\"empty message\n\nRevision ID: 91351a73e6e2\nRevises: 63262fe95b9c\nCreate ...
python
new_file
1
1
bsd-3-clause
5ef9ea4fe0c90fad89d5ab772f42c48fd702860c
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
portal/migrations/versions/91351a73e6e2_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Replace older dups management script" }, { "role": "assistant", "content": "'''\nCompare File Contents and remove duplicate files\n\n get sha256 hash for each file found\n use dictionary to check for duplicates\n delete ...
python
new_file
3
5
mit
1c270ec827b2cbb2d8ed6077366d2d7d10e17b16
daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various
utilities/foto-files/manage-duplicates.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add greatest digit in number with python in math" }, { "role": "assistant", "content": "number = 201328361572\nmaxDigit = -1\n\n# convert number into unique set of digits and iterate over it\nfor c in set(str(number)):\n # par...
python
new_file
1
0
cc0-1.0
b758d6b1c445093a261e0f2be175181fa57109e4
Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-...
math/basic/Greatest_digit_in_number/Greatest_digit_in_number.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration - that created bug, where table had wrong name" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.7 on 2016-08-26 12:16\nfrom __future__ import unicode_literals\n\nfrom...
python
new_file
1
0
mit
5f1fc4687e463632049ea889a8fc566839201a8a
lucasgr7/silverplate,lucasgr7/silverplate,lucasgr7/silverplate
crawler/migrations/0002_auto_20160826_1216.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for dates in mpl." }, { "role": "assistant", "content": "from __future__ import absolute_import\nimport matplotlib\n# Force matplotlib to not use any Xwindows backend.\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as ...
python
new_file
3
2
mit
12bc92863076c594422f327efc1ba23a321b05a7
plotly/plotly.py,ee-in/python-api,plotly/python-api,plotly/python-api,plotly/python-api,ee-in/python-api,plotly/plotly.py,plotly/plotly.py,ee-in/python-api
plotly/tests/test_optional/test_matplotlylib/test_date_times.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Store extra data in JSON format, also add method to extend extra values to store. Closes gh-30" }, { "role": "assistant", "content": "from django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.u...
python
new_file
11
5
bsd-3-clause
bf11946afbac3a10b6a7ae502c81f7016c472719
qas612820704/django-social-auth,sk7/django-social-auth,limdauto/django-social-auth,mayankcu/Django-social,thesealion/django-social-auth,qas612820704/django-social-auth,gustavoam/django-social-auth,getsentry/django-social-auth,lovehhf/django-social-auth,MjAbuz/django-social-auth,MjAbuz/django-social-auth,michael-borisov...
social_auth/fields.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nfrom rbtools.api.utils import parse_mimetype\n\n\nDECODER_MAP = {}\n\n\ndef DefaultDecoder(payload):\n \"\"\"Default decoder for API payloads.\n\n The default decoder is used when a decoder is not found in the\n DECO...
python
edit
1
2
mit
6ee284adcc30213bc07153a16be475ec3e067d7e
davidt/rbtools,datjwu/rbtools,halvorlu/rbtools,beol/rbtools,reviewboard/rbtools,datjwu/rbtools,reviewboard/rbtools,halvorlu/rbtools,davidt/rbtools,datjwu/rbtools,davidt/rbtools,1tush/rbtools,beol/rbtools,haosdent/rbtools,beol/rbtools,haosdent/rbtools,reviewboard/rbtools,haosdent/rbtools,halvorlu/rbtools
rbtools/api/decode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for Link.url type change" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.7 on 2016-08-30 21:02\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n...
python
new_file
1
0
apache-2.0
303152ec2828fe6c709ec17d21910a9b3a369004
laurenbarker/SHARE,zamattiac/SHARE,CenterForOpenScience/SHARE,laurenbarker/SHARE,laurenbarker/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,zamattiac/SHARE,aaxelb/SHARE,zamattiac/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE
share/migrations/0034_auto_20160830_2102.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for Search w/ just LTR" }, { "role": "assistant", "content": "from features import formatFeature\n\nbaseQuery = {\n \"query\": {\n \"ltr\": {\n \"model\": {\n \"stored\": \"\...
python
new_file
1
3
apache-2.0
b58c85e5105b06ecb5d8598105b4c999287a5a62
o19s/elasticsearch-learning-to-rank,o19s/elasticsearch-learning-to-rank
demo/searchJustLtr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script that generates a test workflow with needed paralellism\n\nChange-Id: I6b1087f95b88a881e074a0af4f6f8be6d9413bc7" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\n\n\ntry:\n wf_name = str(s...
python
new_file
1
0
apache-2.0
0224b1eeeb3db78f5445e413d3c5a3a8c3c4bc57
openstack/mistral,openstack/mistral
tools/wf_generators/generate_parallel_wf.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Print a presence/absence table from a directory of FASTA-formatted sequence files" }, { "role": "assistant", "content": "#for a directory of FASTA gene family files, compute a gene presence-absence (or Count-type) table\nfrom __f...
python
new_file
1
0
mit
7bd2df1ebfa02603a660c75cc13adcd35a326b68
Tancata/phylo,Tancata/phylo
ALE/print_pa_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration script for nodes with incorrect piwik_site_id set." }, { "role": "assistant", "content": "\"\"\"\n\n\"\"\"\n\nimport logging\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath(\n os.path.join(os.path.dirn...
python
new_file
3
5
apache-2.0
a48774d7279df4148df9dcfdedaefdd0689373ba
haoyuchen1992/osf.io,GaryKriebel/osf.io,KAsante95/osf.io,SSJohns/osf.io,kwierman/osf.io,sbt9uc/osf.io,njantrania/osf.io,Johnetordoff/osf.io,chennan47/osf.io,HarryRybacki/osf.io,cslzchen/osf.io,caseyrygt/osf.io,bdyetton/prettychart,amyshi188/osf.io,wearpants/osf.io,Nesiehr/osf.io,caseyrollins/osf.io,jeffreyliu3230/osf.i...
scripts/migrate_piwik_derived_nodes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple test for modified repr as per review." }, { "role": "assistant", "content": "\"\"\"Tests for debugging machinery.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c...
python
new_file
3
1
bsd-3-clause
999481b2c49440f428205a161a2c4ccf5580167e
ipython/ipython,ipython/ipython
IPython/core/tests/test_debugger.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add QuickUnion algorithm(a better algorithm)" }, { "role": "assistant", "content": "#-*- coding:utf-8 -*-\n\n\nclass QuickFind(object):\n\tdef __init__(self,objnum):\n\t\tself.id=[i for i in range(0,objnum)]\n\tdef union(self,p,q...
python
new_file
1
3
apache-2.0
78b058759eac8239e8b8b377a365cefabcf5c21a
free-free/algorithm,free-free/algorithm
algorithm/dynamic_connectivity/unionfind.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom oscar.core.loading import get_model\n\n\nclass WeightBasedForm(forms.ModelForm):\n\n class Meta:\n model = get_model('shipping', 'WeightBased')\n fields = ['description', 'default_weight', '...
python
edit
1
1
bsd-3-clause
e5124e51ac716cf47af89fca957acc5623470e45
anentropic/django-oscar,okfish/django-oscar,solarissmoke/django-oscar,sonofatailor/django-oscar,django-oscar/django-oscar,django-oscar/django-oscar,john-parton/django-oscar,sasha0/django-oscar,john-parton/django-oscar,okfish/django-oscar,anentropic/django-oscar,sonofatailor/django-oscar,anentropic/django-oscar,solariss...
src/oscar/apps/dashboard/shipping/forms.py
rejected_duplicate
Near-duplicate of sample 8836
true
[ { "role": "user", "content": "Write python code for the following: Examples: Add a simple single-frame data acquisition example" }, { "role": "assistant", "content": "from pymoku import Moku, MokuException, NoDataException\nfrom pymoku.instruments import *\nimport time, logging, traceback\n\nlog...
python
new_file
6
0
mit
31e812c2abd7f7e8fd26dc36a87ce17c1ec75f86
liquidinstruments/pymoku,benizl/pymoku
examples/single_frame_datalogger.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# flake8: noqa\n\nfrom .extension import ExtensionManager\nfrom .enabled import EnabledExtensionManager\nfrom .named import NamedExtensionManager\nfrom .hook import HookManager\nfrom .driver import DriverManager\n\nimport logging\n\n# Confi...
python
edit
1
1
apache-2.0
a3eb4602aa5ec87e6f78477c4789ed2fbde1cf93
mandeepdhami/stevedore,nelsnelson/stevedore,nelsnelson/stevedore,openstack/stevedore,varunarya10/stevedore,JioCloud/stevedore,JioCloud/stevedore,citrix-openstack-build/stevedore,mandeepdhami/stevedore,citrix-openstack-build/stevedore,varunarya10/stevedore
stevedore/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for article content field verbose name introduction" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport wagtail...
python
new_file
3
0
bsd-3-clause
4d2a513794ab61c1a6264807daaac9946cfebd25
PARINetwork/pari,PARINetwork/pari,PARINetwork/pari,PARINetwork/pari
article/migrations/0012_alter_content_field_to_have_verbose_name.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create ConnectionSettings for all Repeaters" }, { "role": "assistant", "content": "from django.db import migrations\n\nfrom corehq.motech.repeaters.models import Repeater\n\n\ndef _migrate_to_connectionsettings(apps, schema_edito...
python
new_file
1
3
bsd-3-clause
b2eb9b8ec3223a359b9c44d5880022d1b48b11f2
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/motech/repeaters/migrations/0003_migrate_connectionsettings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add OPG to letter organisations\n\nLogo was added here:\nhttps://github.com/alphagov/notifications-template-preview/pull/19" }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0105_opg_letter_org\nRevises: ...
python
new_file
5
1
mit
ce96d59cf4b63101c061796ecf3793cc107a74c1
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0105_opg_letter_org.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add an example script in NaCle" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport yaml\nimport numpy as np\n\ndata = yaml.load(open(\"qpoints.yaml\"))\ndynmat = []\ndynmat_data = data['phonon'][0]['dynamical_m...
python
new_file
2
0
bsd-3-clause
b5142de511907167b3c9c7add5d14e6ec799633c
atztogo/phonopy,atztogo/phonopy,atztogo/phonopy,atztogo/phonopy
example/NaCl/dynmat.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to delete user login events older than a number of days" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Delete login user events older than a given number of days.\n\n:Copyright: 2006-2020 Jochen ...
python
new_file
3
2
bsd-3-clause
612ae3adb2636fb3a926cd29d87b4b388ca48476
homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps
scripts/delete_old_user_login_events.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add target for unit tests + basic test\n\nSummary: Add target for unit tests + basic test\n\nReviewed By: vkhalidov\n\nDifferential Revision: D20429230\n\nfbshipit-source-id: 36bee00d2dd57a350e2a6f3dd58a87f0c9c8227e" }, { "role": "as...
python
new_file
1
1
apache-2.0
1636e4755d9e0a58b4626750d82102152641068c
facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2
projects/DensePose/tests/test_structures.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement a basic test with cookies.bake()" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nimport pytest\n\n@pytest.fixture\ndef context():\n return {\n \"project_name\": \"My Test Project\",\n ...
python
new_file
1
1
bsd-3-clause
6c339a14170ea77926bc8eb47bd7e61c80db4a42
ovidner/cookiecutter-django,luzfcb/cookiecutter-django,kappataumu/cookiecutter-django,aleprovencio/cookiecutter-django,HandyCodeJob/hcj-django-temp,hairychris/cookiecutter-django,calculuscowboy/cookiecutter-django,webspired/cookiecutter-django,hairychris/cookiecutter-django,schacki/cookiecutter-django,topwebmaster/cook...
tests/test_cookiecutter_generation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to dump S-file PC-CORA data" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport sys, os\nsys.path.append(os.path.join(os.path.dirname(__file__), '..', 'pccora'))\nfrom pccora import *\nimport math\n...
python
new_file
6
4
mit
d197fe8140d8d01e7b517fa0a6a5698548a65af8
kinow/pccora
scripts/dump_s_file.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add script usable for cron/queue-ing retrievable of automatically polled stations\n\ngit-svn-id: 138413ff556ff9267caefd2d209ba774763e85fb@8 696a86c2-f982-11dd-8259-6defae454439" }, { "role": "assistant", "content": "from weathert...
python
new_file
3
0
bsd-3-clause
a33685a7a1432b86572c49ac895a7822cf6b58d2
adamfast/django-weathertracking
weathertracking/bin/gather_observations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add demo of DAX analysis and MA" }, { "role": "assistant", "content": "#-*-coding:utf-8-*-\n#!/usr/bin/python\n# coding: UTF-8\n\nimport numpy as np\nimport pandas as pd\nimport pandas_datareader.data as web\nimport math\n\n#从雅虎财...
python
new_file
1
0
apache-2.0
c1fe209bde5d7edf95b809ebcb00c2167d74ede5
yunfeiz/py_learnt
quant/demo/demo_DAX.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for adding RTP process events" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 2019 the HERA Collaboration\n# Licensed under the 2-clause BSD License\n\n\"\"\"\nScript ...
python
new_file
1
0
bsd-2-clause
2b0e7e221bcf6b01fa3eccfe6b33bf0763613630
HERA-Team/Monitor_and_Control,HERA-Team/hera_mc,HERA-Team/hera_mc
scripts/add_rtp_process_event.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a number of unittests for registering and deregistering task definitions" }, { "role": "assistant", "content": "import copy\nimport os\n\nfrom ecs_deplojo import main\n\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\n...
python
new_file
null
null
mit
c0e9a1a741a16548a466b427338fab5ac8603537
LabD/ecs-deplojo
tests/test_main.py
rejected_code_smell
Internal duplication: ~189% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write python code for the following: Add test for making sure equal_to is case-insensitive" }, { "role": "assistant", "content": "from nose.tools import istest, assert_equal\n\nfrom mammoth import document_matchers\n\n\n@istest\ndef equal_to_matcher_is_case_insensit...
python
new_file
1
1
bsd-2-clause
264a67f649cab578aaafea4b23bc38b05705a1ac
mwilliamson/python-mammoth
tests/styles/document_matcher_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created By: <EMAIL>\n# Maintained By: <EMAIL>\n\nscope = \"Audit\"\ndescriptio...
python
edit
1
0
apache-2.0
5582556d735da829fe629cc36f9664047997a5bb
kr41/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak...
src/ggrc_basic_permissions/roles/Auditor.py
rejected_duplicate
Near-duplicate of sample 9026
true
[ { "role": "user", "content": "Write python code for the following: Add migrations for adding seasons" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.8 on 2016-08-27 22:21\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nd...
python
new_file
1
2
unlicense
78821f2df84bbb822e076fb1591dfccc09bcb43c
kinaklub/next.filmfest.by,nott/next.filmfest.by,nott/next.filmfest.by,nott/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,nott/next.filmfest.by
cpm_data/migrations/0004_add_seasons_data.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests: Add testcase for yielding from a stopped generator." }, { "role": "assistant", "content": "# Yielding from stopped generator is ok and results in None\n\ndef gen():\n return 1\n # This yield is just to make this a ge...
python
new_file
1
1
mit
0ea2108f1cb4ab889e780fdff2ad0730290950e0
alex-robbins/micropython,cwyark/micropython,MrSurly/micropython-esp32,bvernoux/micropython,selste/micropython,Peetz0r/micropython-esp32,ryannathans/micropython,matthewelse/micropython,pozetroninc/micropython,ryannathans/micropython,PappaPeppar/micropython,hiway/micropython,pozetroninc/micropython,trezor/micropython,chr...
tests/basics/gen_yield_from_stopped.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add idealness experiment py script" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom string import printable\nfrom generate_huffman import get_huffman_tree\n\n\ndef get_ideal_tree(freq_list):\n freq_list =...
python
new_file
1
5
mit
6dca5c4564bbd2c8b6546090a646c7c841f1d7be
esarafianou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dimriou/rupture,e...
etc/theory/idealness_experiments/analysis.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to verify custom name functionality" }, { "role": "assistant", "content": "from .base import ServiceTestCase\n\nclass VServiceTests(ServiceTestCase):\n def verifyCustomName(self):\n self.assertEquals(self.servi...
python
new_file
1
1
bsd-3-clause
b7c90f17465232f4c49cc1f05c614a9a17f6bece
fmoo/sparts,djipko/sparts,bboozzoo/sparts,pshuff/sparts,djipko/sparts,facebook/sparts,pshuff/sparts,facebook/sparts,bboozzoo/sparts,fmoo/sparts
tests/test_vservice.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement a tool to crawl bug pages." }, { "role": "assistant", "content": "#!/usr/bin/python\nimport os\nimport re\nimport subprocess\n\nbugIds = []\ndef prepareCookieData():\n out = subprocess.call(\"curl --cookie-jar cookie...
python
new_file
5
4
apache-2.0
c5e5e34482730fa50329d513bbe4ccb2ef7d51ff
bug-analysis/DDVP
data_preparation/crawl_bug_page/GetBug.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add migration for previous commit" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n...
python
new_file
1
0
mit
8e59a09b8270af79d2ad3a2564904137a470c628
tuomas777/linkedevents,aapris/linkedevents,City-of-Helsinki/linkedevents,kooditiimi/linkedevents,aapris/linkedevents,kooditiimi/linkedevents,kooditiimi/linkedevents,City-of-Helsinki/linkedevents,aapris/linkedevents,kooditiimi/linkedevents,City-of-Helsinki/linkedevents,tuomas777/linkedevents,tuomas777/linkedevents
events/migrations/0006_auto_20150827_2020.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add plotting of launch times" }, { "role": "assistant", "content": "# Helper script for making run-time plots.\n#\n# Requires a Python installation with the full numeric stack (Numpy, Matplotlib)\n# including Seaborn (for prettie...
python
new_file
3
0
unlicense
ad57bd124aea637520696857f0b9897ed28f4a96
eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog
2018/clone/plot-time.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for end finding and walk through a skeleton" }, { "role": "assistant", "content": "\n'''\nTests for functions in fil_finder.width_profiles.\n'''\n\nimport pytest\n\nimport numpy as np\nimport numpy.testing as npt\n\n\nf...
python
new_file
4
7
mit
b8b02b41ee5c5712f90c0621d5fd7130004eafb6
e-koch/FilFinder
fil_finder/tests/test_profiles.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration for admin change" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.1 on 2017-07-18 14:14\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n...
python
new_file
1
0
bsd-3-clause
5158ecbec55f142e79cd5efa0360e01b50142464
praekeltfoundation/ndoh-hub,praekeltfoundation/ndoh-hub,praekeltfoundation/ndoh-hub
changes/migrations/0006_auto_20170718_1414.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.conf.urls import patterns, include, url\nfrom django.conf.urls.static import static\nfrom django.views.generic import Template...
python
edit
1
0
bsd-3-clause
e07e436b461015365b2cbbdb96daa8bfc3ae31a4
interaktiviti/cookiecutter-django,asyncee/cookiecutter-django,kappataumu/cookiecutter-django,Sushantgakhar/cookiecutter-django,hairychris/cookiecutter-django,Sushantgakhar/cookiecutter-django,thornomad/cookiecutter-django,stepmr/cookiecutter-django,javipalanca/cookiecutter-django,wldcordeiro/cookiecutter-django-essenti...
{{cookiecutter.repo_name}}/config/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a telemetry-based gpu_tests folder\n\nBUG=143317\n\n\nReview URL: https://chromiumcodereview.appspot.com/12252020\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@183915 0039d316-1c4b-4281-b951-d872f2087c98" }, { "role": "...
python
new_file
2
8
bsd-3-clause
9874b911fa04cd5b6883845ee627c7d91c6376a2
sahiljain/catapult,benschmaus/catapult,benschmaus/catapult,SummerLW/Perf-Insight-Report,sahiljain/catapult,catapult-project/catapult,benschmaus/catapult,catapult-project/catapult-csm,benschmaus/catapult,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,SummerLW/Per...
telemetry/telemetry/page/page_test_runner.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for meta options" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n ...
python
new_file
3
0
unlicense
274511db02b95c14c19564d1e0b3d30ccf1bf532
kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no,kvikshaug/btc.kvikshaug.no
core/migrations/0011_auto_20150602_0128.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for DeviceCredentials" }, { "role": "assistant", "content": "import unittest\nimport mock\nfrom ..device_credentials import DeviceCredentials\n\n\nclass TestDeviceCredentials(unittest.TestCase):\n\n @mock.patch(...
python
new_file
1
1
mit
7321bb9986ce1836ab65ac82f65576d6412494f2
auth0/auth0-python,auth0/auth0-python
auth0/v2/test/test_device_credentials.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Android: Add list of files with licenses not wanted in webview.\n\nThe script which merges Chromium code into the Android tree needs to\nknow which directories to remove for licensing reasons; it's much easier\nif this is just a static list ...
python
new_file
1
0
bsd-3-clause
31fff75ff499604453cd3cd07ad75496f5e0d222
Jonekee/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,markYoungH/chromiu...
android_webview/tools/known_incompatible.py
accepted
null
true