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: Test asyncio in python 3.6"
},
{
"role": "assistant",
"content": "import asyncio\n\nasync def routine0(s,n):\n print('CRT:',s,':',n)\n\nasync def routine(id, n):\n print('TEST[%s] %d'%(id,n))\n if not n:\n return\n n -= 1\... | python | new_file | 1 | 2 | apache-2.0 | 40154d7de207df9689ac220cc8966735cb3ed5af | theia-log/theia,theia-log/theia | tests/test_asyncio.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for systemd module"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport unittest\nfrom unittest import mock\nfrom unittest.mock import MagicMock, patch\n\nfrom portinus import systemd\n\nclass testSyste... | python | new_file | 3 | 1 | mit | bcaa60ce73134e80e11e7df709e7ba7dbc07d349 | justin8/portinus,justin8/portinus | tests/test_systemd.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an interface for Markov Chains"
},
{
"role": "assistant",
"content": "from random import choice\n\nclass MarkovChain(object):\n \"\"\" An interface for signle-word states Markov Chains \"\"\"\n\n def __init__(self, text... | python | new_file | 1 | 2 | mit | bf34c1dbb37865e62e97e3463645c7df16a4ca08 | iluxonchik/lyricist | markov_chain.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add one test case for IOTOS-358\n\nTo check SQlite is integrated in image\n\nSigned-off-by: Wu Dawei <<EMAIL>>"
},
{
"role": "assistant",
"content": "from oeqa.oetest import oeRuntimeTest\n\nclass AppFwTest(oeRuntimeTest):\n\n ... | python | new_file | 1 | 1 | mit | e29de047d770de70f3745ae410b62d0ddad4b0b4 | ostroproject/meta-iotqa,ostroproject/meta-iotqa,wanghongjuan/meta-iotqa-1,ostroproject/meta-iotqa,daweiwu/meta-iotqa-1,ostroproject/meta-iotqa,daweiwu/meta-iotqa-1,ostroproject/meta-iotqa,wanghongjuan/meta-iotqa-1,wanghongjuan/meta-iotqa-1,daweiwu/meta-iotqa-1,daweiwu/meta-iotqa-1,wanghongjuan/meta-iotqa-1,wanghongjuan... | lib/oeqa/runtime/misc/appFW.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a migration for directive_sections -> relationships"
},
{
"role": "assistant",
"content": "# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENS... | python | new_file | 1 | 1 | apache-2.0 | 99282d42a3948b9ed45b02df657c344667ec0cf2 | AleksNeStu/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,josthkko/ggrc-core,hasanalom/ggrc-core,jmakov/ggrc-core,hasanalom/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,prasannav7/ggrc-core,hyperNURb/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,selah... | src/ggrc/migrations/versions/20150521125008_324d461206_migrate_directive_sections_to_.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add SolveTimer - print number of iterations and elapsed time to console while running ml.solve() - see docstring for usage"
},
{
"role": "assistant",
"content": "try:\n from tqdm.auto import tqdm\nexcept ModuleNotFoundError:\n... | python | new_file | 1 | 3 | mit | 0782e8786272fcd6e3e1a41d31bea253865c468b | pastas/pastas | pastas/timer.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example with sklearn pipeline"
},
{
"role": "assistant",
"content": "\"\"\"\nUMAP as a Feature Extraction Technique for Classification\n---------------------------------------------------------\n\nThe following script shows h... | python | new_file | 1 | 0 | bsd-3-clause | 7963e426e2d1f58105d8712c0379114d93d32b07 | lmcinnes/umap,lmcinnes/umap | examples/plot_feature_extraction_classification.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a simple script that runs the pipeline for the single specified user\n\nUser can be specified by either email or UUID.\nCalls the pipeline functions."
},
{
"role": "assistant",
"content": "import json\nimport logging\nimport ... | python | new_file | 4 | 0 | bsd-3-clause | 6ece957e5317a9f54499714f9a7cb9bca221d4e5 | sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server | bin/debug/intake_single_user.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script that creates a filtered list of required packages"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport shutil\nimport d1_dev.util\nimport os\nimport pip._internal.utils.misc\nimport re\n\n\nREQUIREMEN... | python | new_file | 3 | 3 | apache-2.0 | b44f13bfa1ac8b3c1bd24e528fc7874a06df0121 | DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python | dev_tools/src/d1_dev/update-requirements-txt.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test case for RPC HTTP handler."
},
{
"role": "assistant",
"content": "import time\n\nimport requests\nfrom weavelib.messaging import Receiver\nfrom weavelib.rpc import RPCServer, ServerAPI\nfrom weavelib.services import BaseServ... | python | new_file | 1 | 3 | mit | 5b9d9f531e3544f6d3dfe0a2e48dcaaebf132921 | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | test/services/appmanager/test_http.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a migration to load users and buckets"
},
{
"role": "assistant",
"content": "\"\"\"\nLoad initial user and bucket data from seed files.\n\"\"\"\nimport logging\nimport os\nimport subprocess\nimport sys\n\nlog = logging.getLog... | python | new_file | 1 | 3 | mit | 6f2529d1891b5c256394b9c8aa991b25a029b5f1 | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | migrations/004_load_seed_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Change meta option for Github"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.5 on 2017-05-24 15:03\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclas... | python | new_file | 1 | 0 | bsd-3-clause | 8ba5b29200520d853791943341d41798ff80a248 | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | src/repository/migrations/0003_auto_20170524_1503.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n\nNAME = 'djangae'\nPACKAGES = find_packages()\nDESCRIPTION = 'Django integration with Google App Engine'\nURL = \"https://github.com/potatolondon/djangae\"\nLONG_DESCRIPTION = open(... | python | edit | 1 | 0 | bsd-3-clause | 21a0948eb1d25e9126e2940cbc7d0496181d6a93 | grzes/djangae,asendecka/djangae,grzes/djangae,kirberich/djangae,asendecka/djangae,kirberich/djangae,armirusco/djangae,grzes/djangae,armirusco/djangae,potatolondon/djangae,chargrizzle/djangae,potatolondon/djangae,armirusco/djangae,kirberich/djangae,asendecka/djangae,chargrizzle/djangae,chargrizzle/djangae | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add implementation of more generic store calls"
},
{
"role": "assistant",
"content": "from ktbs_bench.graph_store import GraphStore\nimport rdflib\n\nrdflib.plugin.register('BN', rdflib.store.Store, 'ktbs_bench.bnsparqlstore', 'S... | python | new_file | 1 | 1 | mit | c43000d2f9ec20a1c0cdbbec86270d88acb36104 | ktbs/ktbs-bench,ktbs/ktbs-bench | bench_examples/sparqlstore.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to download files from url"
},
{
"role": "assistant",
"content": "import urllib2\n'''\nScript to download pdf from a url, you need specify the website URL, and change the \nfilename in the loop, it mostly useful to d... | python | new_file | 1 | 1 | bsd-3-clause | ba09b09e7315cafa96e162a8186abe14c51c8128 | qingkaikong/useful_script,qingkaikong/useful_script,qingkaikong/useful_script,qingkaikong/useful_script,qingkaikong/useful_script | python/download_file_from_url.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add in some tests for cities"
},
{
"role": "assistant",
"content": "import testtools\n\nimport cities\n\n\nclass TestCities(testtools.TestCase):\n def test_largest(self):\n largest = 'Sydney'\n self.assertEqual(l... | python | new_file | 1 | 1 | apache-2.0 | bffa61da4576c088c081daea3833142af58fef1d | jhesketh/pyconau-gating-demo | tests/test_cities.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a basic smoke test to check for exceptions and programming errors."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\nimport unittest\nimport sys\nsys.path.insert(0, '../mafia')\n\nfrom game import Game\nfrom g... | python | new_file | 1 | 1 | mit | 23df7b77cde8b5351cf2902b8b11ee07e4b478f4 | BitokuOokami/PloungeMafiaToolkit | tests/smoke_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unittests to test environment.py methods"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nu\"\"\"\nCopyright 2016 Telefónica Investigación y Desarrollo, S.A.U.\nThis file is part of Toolium.\n\nLicensed under t... | python | new_file | 1 | 1 | apache-2.0 | fb08ad77a821d86a3049628d907577949d525dac | Telefonica/toolium,Telefonica/toolium,Telefonica/toolium | toolium/test/behave/test_environment.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [AC-7570] Add test for email backend coverage"
},
{
"role": "assistant",
"content": "from mock import patch\nfrom django.core import mail\nfrom django.test import TestCase\nfrom django.urls import reverse\n\nfrom impact.minimal_e... | python | new_file | 4 | 1 | mit | c45ccd0f258fcbb152ffa9597ceb1bacd472f73b | masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api | web/impact/impact/tests/test_impact_email_backend.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add open time range support."
},
{
"role": "assistant",
"content": "import datetime\nimport flask\nimport functools\nfrom app import app\n\n# Use dateutil if available\ntry:\n from dateutil import parser as dateutil\nexcept Impo... | python | new_file | 3 | 6 | apache-2.0 | a6c96caa1392868402be9f89db034ef664a12bda | google/ctfscoreboard,google/ctfscoreboard,google/ctfscoreboard,google/ctfscoreboard | utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Chuck Norris bot to the team"
},
{
"role": "assistant",
"content": "import telegram\n\n\nLAST_UPDATE_ID = None\n\n\ndef main():\n\n ''' This is the main function that has to be called '''\n\n global LAST_UPDATE_ID\n\n ... | python | new_file | 1 | 6 | mit | 36756dbd6b287f8dc6d5629027a8fe75d0f4bb09 | farhaanbukhsh/Telegram-Bots | NorrisIsSoFunny_bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | 4646873ec80076759c02deac7ff3c50665e31415 | Doist/todoist-python,electronick1/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial version of season goal leader retrieval"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport requests\nfrom lxml import html\n\n\nSEASON_URL_TEMPLATE = \"http://www.hockey-re... | python | new_file | 1 | 0 | mit | a383d1220c31f153a5519e4aab4703db2b71ef53 | leaffan/pynhldb | analysis/_goal_leaders.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a unittest on plot_figs module."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010 Jérémie DECOCK (http://www.jdhp.org)\n\nimport unittest\nimport os\nimport sys\n\nd... | python | new_file | 1 | 2 | mit | 68babe2de9a8204c46ad23e1c82dd0ff8fe44c94 | jeremiedecock/pyarm,jeremiedecock/pyarm | pyarm/tests/test_plot_figs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 553. Optimal Division\n\n553. Optimal Division: https://leetcode.com/problems/optimal-division/\n\nApproach1\n Bottom-up DP"
},
{
"role": "assistant",
"content": "from fractions import Fraction\nclass Solut... | python | new_file | 4 | 9 | apache-2.0 | 37b175b6a6ac3f0fd7fdaa5c2ed6435c159a29c2 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/optimal-division.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for APNS message."
},
{
"role": "assistant",
"content": "import mock\n\nfrom django.test import TestCase\nfrom django.conf import settings\n\nfrom zerver.models import PushDeviceToken, UserProfile\nfrom zerver.models im... | python | new_file | 3 | 2 | apache-2.0 | 2ab796aeb53e650b8a1dd828b5daaca16850d9c3 | hackerkid/zulip,ahmadassaf/zulip,vaidap/zulip,peguin40/zulip,AZtheAsian/zulip,dhcrzf/zulip,brainwane/zulip,ahmadassaf/zulip,rishig/zulip,sharmaeklavya2/zulip,dattatreya303/zulip,calvinleenyc/zulip,jphilipsen05/zulip,j831/zulip,sonali0901/zulip,eeshangarg/zulip,synicalsyntax/zulip,jrowan/zulip,punchagan/zulip,verma-vars... | zerver/tests/test_push_notifications.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add boolean matrix generator - from mocogenomics"
},
{
"role": "assistant",
"content": "import itertools\n\nletters = ['A','R','N','D','C','E','Q','G','H','I','L','K','M','F','P','S','T','W','Y','V']\n\n# generates a matrix from ... | python | new_file | 3 | 10 | mit | 51b90afe8388b0425810bc1560cffe2e5a02fca8 | andretadeu/jhu-immuno,andretadeu/jhu-immuno | code/generate_boolean_matrix.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a \"image me [thing]\" handler"
},
{
"role": "assistant",
"content": "import re\nimport json\nimport asyncio\nimport random\nimport aiohttp\n\n\nGOOGLE_IMAGE_API = 'http://ajax.googleapis.com/ajax/services/search/images'\n\n\... | python | new_file | 1 | 4 | mit | e3665928c80da9df192f8edb5dc28e3200e34fdc | tgerdes/toolbot,tgerdes/toolbot | toolbot/scripts/google_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tool to fix MP4 file timestamp from GPMF GPS clock"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport datetime\nimport shutil\n\nimport gpmf.extract\nimport gpmf.parse\nimport hachoir.editor\nimport hachoir... | python | new_file | 3 | 12 | mit | cdefa248cb481f8b8a676fd674a4290f95d15145 | rambo/python-gpmf,rambo/python-gpmf | fix_mp4_timestamp.py | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Naive Bayes base class:"
},
{
"role": "assistant",
"content": "\"\"\"\nNaive Bayes Classifier\nIncludes gaussian, bernoulli and multinomial models\n\"\"\"\n\nimport abc\nimport numpy as np\n\nclass NaiveBayes:\n \"\"\"\n ... | python | new_file | 2 | 1 | mit | af5e58c2fefdffa8046ecace238a3fd1a2a43387 | christopherjenness/ML-lib | ML/naivebayes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Python script to generate (huge) test dumps."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport random\n\n\nWORLDS = [None] * 8 + ['world', 'world_nether', 'creative', 'hardcore']\n\nREGIONS = [None] * 20 ... | python | new_file | 1 | 6 | apache-2.0 | 54afce985f7f24e74cd5796e12e3c5f2c4616590 | CoolV1994/zPermissions,TWSSYesterday/zPermissions,TWSSYesterday/zPermissions,CoolV1994/zPermissions,ZerothAngel/zPermissions,ZerothAngel/zPermissions | etc/gen-test-dump.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a convenience python script to inline the imports of a file.\n\nUseful for making files to trim down into minimal test cases."
},
{
"role": "assistant",
"content": "from __future__ import with_statement\r\nimport os\r\n\r\nfi... | python | new_file | 1 | 6 | mit | f264a4a15682467549326cc530c152f647bf7832 | JasonGross/catdb,CategoricalData/catdb,CategoricalData/catdb,JasonGross/catdb | replace_imports.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Correct empty lines in imported files"
},
{
"role": "assistant",
"content": "print('\\n\\n\\n\\n')\nprint('Now:\\n')\n\n\nfor p in c.all_positions():\n try:\n # Corrects empty lines around @language python\\n@tabwidth -... | python | new_file | 2 | 0 | mit | ef8d86704c0930091b8b8f07842e46ffff5bfc34 | benzolius/leo-scripts | correct_empty_lines.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add spider for Giant Eagle"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nimport json\nimport re\n\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_M... | python | new_file | 1 | 7 | mit | 48bfe2d20cca35885ad0a460679d0a951d0c584e | iandees/all-the-places,iandees/all-the-places,iandees/all-the-places | locations/spiders/gianteagle.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for checking Python3 compatibility\n\nNote that it only actually works as intended if it's run using Python3.\n\nChange-Id: Ic41ea54e2d1eceabacfcfbb935ac1d029e563645\nReviewed-on: https://skia-review.googlesource.com/c/buildbot/+/... | python | new_file | 1 | 4 | bsd-3-clause | 846ce88f199381387f612463da51c6b17281dd21 | google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot | scripts/check_python3_compatibility.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add presubmit check for run-bindings-tests\n\nrun-bindings-tests should be run (and succeed) for any changes to\nSource/bindings. This is particularly important to make sure tests are\nrebaselined when changes are made to the code generator.... | python | new_file | 1 | 4 | bsd-3-clause | ded9c39402ca9cf7adfaaebbf06c196048d48db9 | XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,modulexcite/blink,ondra-novak/blink,nwjs/blink,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,crosswalk-project/bli... | Source/bindings/PRESUBMIT.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add scripts printing special:mode.yml from model.npz"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nimport sys\nimport argparse\nimport numpy as np\nimport yaml\n\n\nDESC = \"Prints version and model type from m... | python | new_file | 3 | 4 | mit | 43fbaa6c109c51a77832d6f09e0543794882b518 | marian-nmt/marian-train,marian-nmt/marian-train,emjotde/Marian,marian-nmt/marian-train,emjotde/amunn,emjotde/amunmt,emjotde/Marian,marian-nmt/marian-train,emjotde/amunmt,amunmt/marian,emjotde/amunn,emjotde/amunmt,emjotde/amunn,amunmt/marian,emjotde/amunn,emjotde/amunmt,amunmt/marian,marian-nmt/marian-train | scripts/contrib/model_info.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing component of previous commit"
},
{
"role": "assistant",
"content": "\"\"\"\nThis module contains small utility classes and functions which do not clearly belong to one part of the project.\n\"\"\"\n\nimport enum\n\n\n... | python | new_file | 1 | 2 | bsd-3-clause | fbd179d9d22a2eef6c2fb24152a441b85133e556 | softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat | lowfat/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test case for guessing the BuildDir associated with a subdirectory argument.\n\n\ngit-svn-id: 7892167f69f80ee5d3024affce49f20c74bcb41d@1394 fdb21ef1-2011-0410-befe-b5e4ea1792b1"
},
{
"role": "assistant",
"content": "#!/usr/... | python | new_file | 1 | 0 | mit | 956d524a8694bb63532ac5f4a8121f57d75b7ad1 | Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons | test/BuildDir/guess-subdir.py | rejected_duplicate | Near-duplicate of sample 6015 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for selecting mysql search backend"
},
{
"role": "assistant",
"content": "from wolis.test_case import WolisTestCase\nfrom wolis import utils\n\nclass SearchBackendMysqlTest(WolisTestCase):\n @utils.restrict_database('mysq... | python | new_file | 1 | 1 | bsd-2-clause | 9140b3249820d0dd86f7f85270327d9264841b50 | p/wolis-phpbb,p/wolis-phpbb | tests/search_backend_mysql.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test to validate service names"
},
{
"role": "assistant",
"content": "# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# ma... | python | new_file | 1 | 2 | apache-2.0 | 2cc6edec8295a216261fff09388a35e0805f474c | pplu/botocore,boto/botocore | tests/functional/test_service_names.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial HDF storage class"
},
{
"role": "assistant",
"content": "import numpy as np\nimport pandas as pd\nimport tables as tb\n\nclass HDFStore(object):\n def __init__(self, hdfname):\n self.pdh5 = pd.HDFStore(hdfna... | python | new_file | 2 | 3 | bsd-3-clause | 0f251e6c8620e19fc5e16e88b1ffbd5d51f7a7be | rnelsonchem/gcmstools | gcmstools/datastore.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Introduce module for CLI commands; implement data generating command"
},
{
"role": "assistant",
"content": "import os\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\n\nfrom ngx_task import settings, utils\n\n\nd... | python | new_file | 1 | 5 | apache-2.0 | ff187730fa1ebd64984dbb6e91a8f04edae84548 | shudmi/ngx-task | ngx_task/cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: migrations: Add migration to fix Attachment cache.\n\nThis migration needs to be run after the previous commit is deployed\nto a given Zulip installation, to fix any stale values of\nis_realm_public and is_web_public."
},
{
"role": "... | python | new_file | 1 | 5 | apache-2.0 | abea1f4598928fddf750358efcedbfaade019bf4 | kou/zulip,kou/zulip,zulip/zulip,kou/zulip,kou/zulip,zulip/zulip,andersk/zulip,zulip/zulip,andersk/zulip,rht/zulip,rht/zulip,zulip/zulip,rht/zulip,andersk/zulip,rht/zulip,kou/zulip,zulip/zulip,kou/zulip,andersk/zulip,andersk/zulip,zulip/zulip,andersk/zulip,andersk/zulip,rht/zulip,zulip/zulip,rht/zulip,rht/zulip,kou/zuli... | zerver/migrations/0386_fix_attachment_caches.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add YAML wrapper allowing conf strings to be used in YAML source files"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n controlbeast.utils.yaml\n ~~~~~~~~~~~~~~~~~~~~~~~\n\n :copyright: Copyright ... | python | new_file | 1 | 4 | isc | efc8d3182f79111b3a1b7df445dafd46fef9862a | daemotron/controlbeast,daemotron/controlbeast | controlbeast/utils/yaml.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Initialize unit tests for Coursera API module"
},
{
"role": "assistant",
"content": "import unittest\n\nfrom mooc_aggregator_restful_api import coursera\n\n\nclass CourseraTestCase(unittest.TestCase):\n '''\n Unit Tests for... | python | new_file | 1 | 1 | mit | 79f92d050fbf9ebe4f088aeabb5e832abeefe0d5 | ueg1990/mooc_aggregator_restful_api | tests/test_coursera.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Move some Utils outside of the main script."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Sep 11 10:23:38 2016\r\n\r\n@author: SISQUAKE\r\n\"\"\"\r\nimport os\r\ndef listFilePath(path)... | python | new_file | 1 | 4 | mit | 757812e63c42f38ad065c31744427c5902a5d322 | BrakeValve/dataflow,BrakeValve/brake-valve-server,BrakeValve/brake-valve-server,BrakeValve/dataflow | data-preprocessor/listFile.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Management Command to Dump Project and RemoteRepository Relationship in JSON format"
},
{
"role": "assistant",
"content": "import json\n\nfrom django.core.management.base import BaseCommand\n\nfrom readthedocs.projects.models... | python | new_file | 1 | 5 | mit | c86b61a23ad9b3a152bb6644cb5dde5a4b42fbc9 | rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org | readthedocs/projects/management/commands/dump_project_remote_repo_relation.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a helper script to apply changes in zuul\n\nIn order to aappropriately test dependencies in a CI scenario,\nspecificially in the case of OpenStack CI, we need to be able to\nparse and act upon the changes defined by Zuul since we manage\... | python | new_file | 5 | 0 | apache-2.0 | b6e0daa9ee06961743ad5a5f728f3385bfdb0b4c | EntropyWorks/bifrost,bcornec/bifrost,juliakreger/bifrost,devananda/bifrost,openstack/bifrost,openstack/bifrost,EntropyWorks/bifrost,devananda/bifrost,bcornec/bifrost,juliakreger/bifrost | playbooks/roles/ironic-install/files/parse_zuul_changes.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add single dataset doc gen"
},
{
"role": "assistant",
"content": "# coding=utf-8\n# Copyright 2020 The TensorFlow Datasets Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f... | python | new_file | 3 | 2 | apache-2.0 | cfec967be4602dff636adb951b582d1db114f578 | tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets | tensorflow_datasets/scripts/document_dataset_version.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Python script to investigate s3 speeds\n\nSigned-off-by: Cody W. Eilar <<EMAIL>>"
},
{
"role": "assistant",
"content": "from __future__ import print_function\nimport boto3\nimport subprocess\nimport os\nimport pandas as pd\ni... | python | new_file | 1 | 3 | mit | a189203bf2dc7ddd925ed8cfbeb191ee52d43711 | AcidLeroy/OpticalFlow,AcidLeroy/OpticalFlow,AcidLeroy/OpticalFlow,AcidLeroy/OpticalFlow | src/aws_scripts/benchmark_s3.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add template for lab 09 class A"
},
{
"role": "assistant",
"content": "\nclass Bangunan:\n def __init__(self, nama, lama_sewa, harga_sewa):\n self.nama = nama\n self.lama_sewa = lama_sewa\n self.harga_sewa... | python | new_file | null | null | mit | fd2cc81feab4b24b276c8f4a0a8efc16cacef60b | giovanism/TarungLab,laymonage/TarungLab | Lab/09/Template_09_A.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Define \"Assessment updated\" notification type"
},
{
"role": "assistant",
"content": "# Copyright (C) 2017 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"\nAdd Assessment upd... | python | new_file | 1 | 1 | apache-2.0 | 2f0bf45ec747778d38801892e97d5a902443841d | VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core | src/ggrc/migrations/versions/20170207134238_562ec606ff7c_add_assessment_updated_notification_type.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make looking for outliers easier"
},
{
"role": "assistant",
"content": "\nimport sys\n\n'''\nCheck for garbage points in a MS by SPW.\n'''\n\ntry:\n vis_name = sys.argv[1]\n corrstring = sys.argv[2]\n starting_spw = int(... | python | new_file | 2 | 0 | mit | 182d4229f6293eec791a5eba716917ace3bcfaca | e-koch/canfar_scripts,e-koch/canfar_scripts | cal_pipe/manual_outlier_flag.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a testcase for RubyGems"
},
{
"role": "assistant",
"content": "from tests.helper import ExternalVersionTestCase\n\n\nclass RubyGemsTest(ExternalVersionTestCase):\n def test_gems(self):\n self.assertEqual(self.sync_g... | python | new_file | 1 | 1 | mit | 10ac7ea7a67b7a15146ae7c9c0ba9ba74876df81 | lilydjwg/nvchecker | tests/test_gems.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add maintenance script to fix missing menu links"
},
{
"role": "assistant",
"content": "from __future__ import division\n\nfrom collections import Counter\n\nfrom indico.core.db import DBMgr\nfrom indico.util.console import confe... | python | new_file | 2 | 7 | mit | 3247ff26cbe63d875a493382c3f567f112de8b58 | DirkHoffmann/indico,mic4ael/indico,mic4ael/indico,indico/indico,mvidalgarcia/indico,ThiefMaster/indico,OmeGak/indico,DirkHoffmann/indico,mvidalgarcia/indico,pferreir/indico,OmeGak/indico,pferreir/indico,indico/indico,mvidalgarcia/indico,ThiefMaster/indico,mvidalgarcia/indico,ThiefMaster/indico,mic4ael/indico,ThiefMaste... | bin/maintenance/update_menus.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a custom gunicorn Sync worker implementation which works around some issues which occur when eventlet monkey patching is used with sync worker."
},
{
"role": "assistant",
"content": "# Licensed to the StackStorm, Inc ('StackS... | python | new_file | 1 | 3 | apache-2.0 | 34206ab96b5546e617b1478f59357a6a3f7ed8b6 | nzlosh/st2,emedvedev/st2,StackStorm/st2,peak6/st2,tonybaloney/st2,lakshmi-kannan/st2,lakshmi-kannan/st2,punalpatel/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,peak6/st2,lakshmi-kannan/st2,Plexxi/st2,StackStorm/st2,tonybaloney/st2,pixelrebel/st2,StackStorm/st2,punalpatel/st2,nzlosh/st2,punalpatel/st2,pixelrebel/st2,pixelrebel/... | st2common/st2common/util/gunicorn_workers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a module for known data models: CDS, ECMWF, etc."
},
{
"role": "assistant",
"content": "#\n# Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF).\n#\n# Licensed under the Apache License, Version 2.0... | python | new_file | 1 | 0 | apache-2.0 | fe11a1b638b1779e51da87eaa30f1f12b2d0911c | ecmwf/cfgrib | cf2cdm/datamodels.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve conflict in DB schema for circle CI"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migrati... | python | new_file | 3 | 0 | mit | 6917e3b8689ace77bda912f82163f0f91a1a881b | sonicyang/chiphub,sonicyang/chiphub,sonicyang/chiphub | digikey/migrations/0022_merge.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migrations for session changes"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.1 on 2016-03-16 21:24\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, mode... | python | new_file | 1 | 0 | apache-2.0 | 2a81e39a843e31181af455a89ad2b200b7d2f024 | stencila/hub,stencila/hub,stencila/hub,stencila/hub,stencila/hub | director/sessions_/migrations/0005_auto_20160316_2124.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make a unittest for CArray class"
},
{
"role": "assistant",
"content": "import unittest\n\nimport cupy\nfrom cupy import testing\n\n\nclass TestCArray(unittest.TestCase):\n\n def test_size(self):\n x = cupy.arange(3).as... | python | new_file | 1 | 1 | mit | 1a1ee9eff1f04d6e40c9288e15dc3fad7515c2b8 | rezoo/chainer,keisuke-umezawa/chainer,ronekko/chainer,ktnyt/chainer,chainer/chainer,wkentaro/chainer,wkentaro/chainer,okuta/chainer,ktnyt/chainer,chainer/chainer,wkentaro/chainer,aonotas/chainer,pfnet/chainer,kashif/chainer,jnishi/chainer,hvy/chainer,okuta/chainer,niboshi/chainer,keisuke-umezawa/chainer,niboshi/chainer... | tests/cupy_tests/core_tests/test_carray.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add file for rule's symbol tests"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import main, Te... | python | new_file | 3 | 0 | mit | 2cf5f7baf115511c9dd8a8a0333a9b579455b9a3 | PatrikValkovic/grammpy | tests/rules_tests/FromSymbolComputeTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add shallow tests for spin-1/2 general drudge\n\nHere, just the number of terms in the Hamiltonian is tried to be counted\nwithout actual inspection of the content."
},
{
"role": "assistant",
"content": "\"\"\"Tests for the gener... | python | new_file | 1 | 1 | mit | ced30f90907909090c0da0e468c855f400d9da92 | tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge | tests/spin_one_half_gen_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple lauch script without configuration options"
},
{
"role": "assistant",
"content": "from twisted.application import internet, service\nfrom twisted.names import dns\nfrom twisted.names import server\nfrom openvpnzone imp... | python | new_file | 1 | 2 | mit | cee5313906b2ee7e4fb01fc772e2afc6c4de1072 | mswart/openvpn2dns,mswart/openvpn2dns | launch.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for COM collections; IEnumVariant so far only.\n\n--HG--\nextra : convert_revision : svn%3Aa2f44796-8cc0-49ac-b43f-6a96d556d52d/trunk%40142"
},
{
"role": "assistant",
"content": "import unittest\nfrom comtypes.client import ... | python | new_file | 4 | 8 | mit | 7b688747a02f9ac29d4f119bf142f7ef0ad805e9 | denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes | comtypes/test/test_collections.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for very big AST trees"
},
{
"role": "assistant",
"content": "import unittest\nfrom triton import *\n\nDEPTH = 10000\n\n\nclass TestDeep(unittest.TestCase):\n\n def setUp(self):\n \"\"\"Define the arch.\"\"\"\... | python | new_file | 9 | 2 | apache-2.0 | 64c21a3e01d50cdc6a719f0e4e48f925d5dd9e03 | JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton | src/testers/unittests/test_ast_deep.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add functioning code for training sequence\n\nRNN works reasonably well"
},
{
"role": "assistant",
"content": "import tensorflow as tf\nimport numpy as np\n\ntf.set_random_seed(5)\n\nn_steps = 28\nn_inputs = 28\nn_neurons = 150\n... | python | new_file | 3 | 0 | mit | 59f9e552d16e7d4dca73b1232c0804d4ef3154a7 | KT12/hands_on_machine_learning | training_sequence_classifier.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for Link object."
},
{
"role": "assistant",
"content": "# Copyright (c) 2015, The MITRE Corporation. All rights reserved.\n# See LICENSE.txt for complete terms.\n\nimport unittest\n\nfrom mixbox.vendor.six import u\n\nfr... | python | new_file | 1 | 0 | bsd-3-clause | 231029d867171ad5ee708c61d8a0aed60127aa9a | CybOXProject/python-cybox | cybox/test/objects/link_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport platform\nimport sys\n\nNODE_VERSION = 'v0.11.13'\nBASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'bb664e4665851fe923ce904e620ba43d8d010ba5'\n\nARCH... | python | edit | 1 | 0 | mit | c2f79200689171a49c5bd72e6354ba56ee09a6b6 | simonfork/electron,anko/electron,kazupon/electron,Faiz7412/electron,JesselJohn/electron,etiktin/electron,rajatsingla28/electron,oiledCode/electron,brave/electron,Zagorakiss/electron,voidbridge/electron,thomsonreuters/electron,pirafrank/electron,sky7sea/electron,mattdesl/electron,evgenyzinoviev/electron,yan-foto/electro... | script/lib/config.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add beam information to 850um file\n\n-Add python script to add beam information into 850um FITS header."
},
{
"role": "assistant",
"content": "import os\nfrom astropy.io import fits\n\nfile_scuba2_raw='B5_850um_ext_v2_regrid.fit... | python | new_file | 1 | 0 | mit | 979dbd0ff0fba03847ca96beaf4d68a0f4e5c9eb | jpinedaf/B5_wide_multiple | data/b5_scuba2_850um_addbeam.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: CREATE new Syft Message structure"
},
{
"role": "assistant",
"content": "# stdlib\nfrom typing import Any\nfrom typing import Dict\nfrom typing import Optional\n\n# third party\nfrom nacl.signing import VerifyKey\n\n# relative\nf... | python | new_file | 1 | 1 | apache-2.0 | a0702b8ac74c4976cf747880bdfeb86088a16715 | OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft | packages/syft/src/syft/core/node/common/node_service/generic_payload/syft_message.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add function approximator to deal with off-switch\n\nI had forgotten to add this one earlier."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\n# HO … higher-order\nclass... | python | new_file | 1 | 1 | mit | 420ebb50cfb5a366b35d058ad6018857b899a19e | rmoehn/cartpole | hiora_cartpole/offswitch_hfa.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a Quartz backend for the null toolkit"
},
{
"role": "assistant",
"content": "#------------------------------------------------------------------------------\n# Copyright (c) 2011, Enthought, Inc.\n# All rights reserved.\n#\n#... | python | new_file | 1 | 4 | bsd-3-clause | d9486bc6180a2dfe38a953eb84184e0410e1cb66 | tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable | enthought/enable/null/quartz.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add helper module for keyword-only arguments."
},
{
"role": "assistant",
"content": "'''Support functions for implementing keyword-only arguments.\n\nThis module is designed to make it easy to support keyword-only\narguments in P... | python | new_file | 1 | 2 | bsd-2-clause | ddf0a5a4438531e4bfa29d8709c1c76d8ca17f59 | schandrika/volttron,schandrika/volttron,schandrika/volttron,schandrika/volttron | volttron/platform/kwonlyargs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add homebrew version of fluentd logger"
},
{
"role": "assistant",
"content": "import logging\nfrom datetime import datetime\n\nfrom fluent import sender\n\n\nclass FluentHandler(logging.Handler):\n '''\n Logging Handler for... | python | new_file | 1 | 2 | apache-2.0 | d604429f1d27f8753b8d9665a55111a3b90f0699 | erinspace/scrapi,jeffreyliu3230/scrapi,icereval/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,alexgarciac/scrapi,ostwald/scrapi,mehanig/scrapi,felliott/scrapi,fabianvf/scrapi,mehanig/scrapi,fabianvf/scrapi | scrapi/util/logging.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple api to redis with flask"
},
{
"role": "assistant",
"content": "from flask import Flask\nfrom flask import json\nfrom flask import Response\nimport redis\n\napp = Flask(__name__)\nr = redis.StrictRedis(host='localhost',... | python | new_file | 1 | 2 | mit | 8fda2e1330277e98b62d3286e5c208d320fc07db | keoghpe/daftpunk,nicr9/daftpunk,keoghpe/daftpunk,nicr9/daftpunk,keoghpe/daftpunk,nicr9/daftpunk | server.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to extract rows from terms."
},
{
"role": "assistant",
"content": "# Convert from show term to list of rows associated with each term.\n\nimport re\nterm_regex = re.compile(\"Term\\(\\\"(\\S+)\\\"\\)\")\nrowid_regex = ... | python | new_file | 1 | 0 | mit | 91773cb6a09f710002e5be03ab9ec0c19b2d6ea3 | BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel | src/Scripts/show-term-convert.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add presubmit check to catch use of PRODUCT_NAME in resources.\n\nWe should not be adding any new strings resources that use a PRODUCT_NAME\nplaceholder, because it is difficult to localize in some languages. Add a\npresubmit check which sho... | python | new_file | 3 | 4 | bsd-3-clause | bcfd9808377878f440cc030178b33e76eb4f031c | anirudhSK/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crossw... | chrome/app/PRESUBMIT.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test borda ranking and spearman."
},
{
"role": "assistant",
"content": "import numpy \nimport unittest\nimport logging\nfrom exp.influence2.RankAggregator import RankAggregator \nimport scipy.stats.mstats \nimport numpy.testing a... | python | new_file | 4 | 1 | bsd-3-clause | 039a07bde5975cb6ce40edc43bbd3d931ac5cc92 | charanpald/APGL | exp/influence2/test/RankAggregatorTest.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add way to call converters/harvesters in 0.2.0\n\nConverters in 0.2.0 cannot be run directly (breaks relative imports)\nand therefore must be imported as modules. proto_main makes this\nprocess easier."
},
{
"role": "assistant",
... | python | new_file | 1 | 7 | apache-2.0 | 558c68060903608abe0bbe15303f192eacf529eb | materials-data-facility/forge | proto_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add some basic tests around contact parsing"
},
{
"role": "assistant",
"content": "import aiosip\n\n\ndef test_simple_header():\n header = aiosip.Contact.from_header('<sip:pytest@127.0.0.1:7000>')\n assert not header['name'... | python | new_file | 1 | 1 | apache-2.0 | 02bf100a05ed6267ab3fb618c52150fc2d4884f2 | Eyepea/aiosip,sangoma/aiosip | tests/test_contact_parsing.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement code to return how many characters to delete to make 2 strings into an anagram\n\nhttps://www.hackerrank.com/challenges/ctci-making-anagrams"
},
{
"role": "assistant",
"content": "# https://www.hackerrank.com/challenges... | python | new_file | 1 | 4 | mit | 787f956539eb5e41467e04b8239ae571fad60da7 | arvinsim/hackerrank-solutions | all-domains/tutorials/cracking-the-coding-interview/strings-making-anagrams/solution.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add \"what is my purpose in life\" plugin"
},
{
"role": "assistant",
"content": "from espresso.main import robot\n\n@robot.respond(r\"(?i)pass the butter\")\ndef pass_the_butter(res):\n res.reply(res.msg.user, \"What is my pur... | python | new_file | 1 | 1 | bsd-3-clause | 052dbe05c0e1d3e2821857a035e469be2a1055ae | ratchetrobotics/espresso | plugins/pass_the_butter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing specification model tests"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom django.test import TestCase\n\nfrom django.db import IntegrityError\n\nfrom .model_factories import (\n SpecificationF,... | python | new_file | 2 | 1 | bsd-2-clause | 1f92af62d1a58e496c2ce4251676fca3b571e8f1 | ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites | django_project/localities/tests/test_model_Specification.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add testing functions for join and relabel"
},
{
"role": "assistant",
"content": "import numpy as np\nfrom numpy.testing import assert_array_equal, assert_raises\nfrom skimage.segmentation import join_segmentations, relabel_from_... | python | new_file | 1 | 1 | bsd-3-clause | b906082034822a825ec2963864b32d6619cf938a | pratapvardhan/scikit-image,oew1v07/scikit-image,paalge/scikit-image,GaZ3ll3/scikit-image,emon10005/scikit-image,rjeli/scikit-image,youprofit/scikit-image,ajaybhat/scikit-image,pratapvardhan/scikit-image,warmspringwinds/scikit-image,ofgulban/scikit-image,SamHames/scikit-image,chintak/scikit-image,vighneshbirodkar/scikit... | skimage/segmentation/tests/test_join.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for the signals"
},
{
"role": "assistant",
"content": "from django.core.cache import cache\nfrom django.test import SimpleTestCase\n\nfrom ormcache.signals import cache_hit, cache_missed, cache_invalidated\nfrom ormcach... | python | new_file | 1 | 1 | mit | b15c7c044b0c514285bcb8c29b7bcfc8cf777c8b | educreations/django-ormcache | ormcache/tests/test_signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unittests for title handling methods\n\nWe add some test for our new title cutting method."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: latin-1 -*-\n\n\"\"\"Unit tests.\"\"\"\n\nimport unittest\... | python | new_file | 1 | 2 | mit | 5b57686868b595fb4e7b431822fe4c7bf2de6cfb | Commonists/MassUploadLibrary | test/test_uploadbot.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Python: Add test showing taint for attr store\n\nIn `x.arg = TAINTED_STRING` there is a store step to the attribute `arg`\nof `x`. In our taint modeling, we allow _any_ store step with the code\nbelow. This means that we also say there is a ... | python | new_file | 13 | 1 | mit | 59160eeb24f6311dafce2db34a40f8ba879fd516 | github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql | python/ql/test/experimental/dataflow/tainttracking/defaultAdditionalTaintStep/test_attr.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for rename.\n\nSigned-off-by: mulhern <<EMAIL>>"
},
{
"role": "assistant",
"content": "\"\"\"\nTest 'rename'.\n\"\"\"\n\nimport subprocess\nimport unittest\n\nfrom ._constants import _CLI\n\nfrom ._misc import Service\... | python | new_file | 1 | 2 | apache-2.0 | bf2cc99162389c6b5c18051f01756e17d9d11ce6 | stratis-storage/stratis-cli,stratis-storage/stratis-cli | tests/integration/test_rename.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Enable Jenkins Python3 monster for i19"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import, division, print_function\n\ndef test_no_new_python3_incompatible_code_is_introduced_into_this_module():\n impo... | python | new_file | 1 | 3 | bsd-3-clause | 59e8fe848da5cfa3874c82776205082764efbe63 | xia2/i19 | tests/test_python3_regression.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a work-in-progress parser for the ClientHello message."
},
{
"role": "assistant",
"content": "import construct\n\nfrom tlsenum import hello_constructs\n\n\nclass ClientHello(object):\n\n @property\n def protocol_version... | python | new_file | 1 | 5 | mit | 391e145b6e82aaa87e2ab23cfea53cb7ae98bc2a | Ayrx/tlsenum,Ayrx/tlsenum | tlsenum/parse_hello.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to add uplaoders to a repo"
},
{
"role": "assistant",
"content": "#\n# Copyright 2012 Cisco Systems, Inc.\n#\n# Author: Soren Hansen <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"... | python | new_file | 1 | 1 | apache-2.0 | 5a2042ebd62cefdda82b6e288b4b6d5b0f527fcd | sorenh/python-django-repomgmt,sorenh/python-django-repomgmt | repomgmt/management/commands/repo-add-uploader.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: TST: Test co2 load_data for Python 3."
},
{
"role": "assistant",
"content": "from statsmodels.datasets import co2\n\ndef test_co2_python3():\n # this failed in pd.to_datetime on Python 3 with pandas <= 0.12.0\n dta = co2.lo... | python | new_file | 3 | 1 | bsd-3-clause | dbc761530b77c606038f62ed498c192b67321e8f | nvoron23/statsmodels,wwf5067/statsmodels,wkfwkf/statsmodels,hainm/statsmodels,jstoxrocky/statsmodels,musically-ut/statsmodels,musically-ut/statsmodels,ChadFulton/statsmodels,ChadFulton/statsmodels,ChadFulton/statsmodels,bert9bert/statsmodels,cbmoore/statsmodels,alekz112/statsmodels,bsipocz/statsmodels,bashtage/statsmod... | statsmodels/datasets/tests/test_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: TST: Test save, load functionality in Statespace"
},
{
"role": "assistant",
"content": "\"\"\"\nTests of save / load / remove_data state space functionality.\n\"\"\"\n\nfrom __future__ import division, absolute_import, print_func... | python | new_file | 4 | 1 | bsd-3-clause | 2322b349aac06395382d26a95b5d965ab0f0b326 | josef-pkt/statsmodels,josef-pkt/statsmodels,statsmodels/statsmodels,bashtage/statsmodels,jseabold/statsmodels,statsmodels/statsmodels,statsmodels/statsmodels,ChadFulton/statsmodels,bert9bert/statsmodels,bashtage/statsmodels,jseabold/statsmodels,jseabold/statsmodels,bashtage/statsmodels,yl565/statsmodels,jseabold/statsm... | statsmodels/tsa/statespace/tests/test_save.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration to replace '<removed>' with '<removed>@{uuid}.com'.format(uuid=str(uuid4())) in contact_information.email to pass validation"
},
{
"role": "assistant",
"content": "\"\"\"Replace '<removed>' with '<removed>@{uuid}.co... | python | new_file | 1 | 3 | mit | bb065a747215b6665eec78c5141b0a0d82296dac | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | migrations/versions/1400_repair_contact_information_emails_post_data_retention_removal.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: test: Test Lemniscate of Bernoulli trajectory"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nimport unittest\n\nfrom geometry_msgs.msg import Point\n\nfrom trajectory.lemniscate_trajectory import LemniscateTrajecto... | python | new_file | 1 | 1 | mit | e42fcd8a7dfd213c3de8ccc925410ab3dfe68a3c | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/test/trajectory/test_lemniscate_trajectory.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Define the HPACK reference structure."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nhyper/http20/hpack_structures\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nContains data structures used in hyper's HPACK implemen... | python | new_file | 1 | 2 | mit | dfe3f7fd7775ce13a670e1d27beddba5c1254a4a | irvind/hyper,fredthomsen/hyper,lawnmowerlatte/hyper,masaori335/hyper,fredthomsen/hyper,masaori335/hyper,plucury/hyper,Lukasa/hyper,irvind/hyper,jdecuyper/hyper,Lukasa/hyper,jdecuyper/hyper,lawnmowerlatte/hyper,plucury/hyper | hyper/http20/hpack_structures.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for __main__"
},
{
"role": "assistant",
"content": "import pytest\n\nfrom cutadapt.__main__ import main\n\n\ndef test_help():\n with pytest.raises(SystemExit) as e:\n main([\"--help\"])\n assert e.value.ar... | python | new_file | 1 | 1 | mit | 83cfb4d135b5eb3eaa4efb3f74ce13d44afb4c5a | marcelm/cutadapt | tests/test_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Update expenses status on database"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.6 on 2016-06-02 16:07\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, mode... | python | new_file | 1 | 0 | bsd-3-clause | 78aaccb71fc64e52497abf0d0c768f3767a3d932 | softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat | fellowms/migrations/0020_auto_20160602_1607.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add another simpler test for %f"
},
{
"role": "assistant",
"content": "a = 1.123456\nb = 10\nc = -30\nd = 34\ne = 123.456789\nf = 892122.129899\n\n# form 0\ns = \"b=%f\" % a\nprint s\n\n# form 1\ns = \"b,c,d=%f+%f+%f\" % (a, e, f... | python | new_file | 3 | 0 | mit | 4fe8df5d09c554b45d5097ca0574b47703c9b581 | buchuki/pyjaco,mattpap/py2js,chrivers/pyjaco,mattpap/py2js,qsnake/py2js,chrivers/pyjaco,chrivers/pyjaco,buchuki/pyjaco,buchuki/pyjaco,qsnake/py2js | tests/strings/string_format_f_simple.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.