messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Write python code for the following: Add unit test for Pattern filterer."
},
{
"role": "assistant",
"content": "# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport pytest\n\nfrom bark.log import Log\nfr... | python | new_file | 3 | 1 | apache-2.0 | 0a610a44f0d20170ba9c3e6f9ec4eafaac937be1 | 4degrees/mill,4degrees/sawmill | test/unit/filterer/test_pattern.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a fontname to TachyFont Jar file mapper."
},
{
"role": "assistant",
"content": "\"\"\"\n Copyright 2014 Google Inc. All rights reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not u... | python | new_file | 1 | 2 | apache-2.0 | 98c07739702fbf3951ccd0359d04be80a303d9ce | bstell/TachyFont,bstell/TachyFont,moyogo/tachyfont,bstell/TachyFont,moyogo/tachyfont,bstell/TachyFont,googlei18n/TachyFont,googlefonts/TachyFont,moyogo/tachyfont,googlefonts/TachyFont,googlei18n/TachyFont,googlefonts/TachyFont,googlei18n/TachyFont,googlefonts/TachyFont,bstell/TachyFont,googlefonts/TachyFont,googlei18n/... | run_time/src/gae_server/font_mapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Example: Create a folder in a datacenter if not exists"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\nWritten by Chinmaya Bharadwaj\nGithub: https://github.com/chinmayb/\nEmail: <EMAIL>\n\nCreate a folder i... | python | new_file | 1 | 4 | apache-2.0 | 10c83fbc01dee9d95290466338f262abffc12a3e | vmware/pyvmomi-community-samples,pfitzer/pyvmomi-community-samples,jm66/pyvmomi-community-samples,ddcrjlalumiere/pyvmomi-community-samples,prziborowski/pyvmomi-community-samples,pathcl/pyvmomi-community-samples | samples/create_folder_in_datacenter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add 'git cl format' presubmit check to src/device\n\nReview URL: https://codereview.chromium.org/1097743004\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#325940}"
},
{
"role": "assistant",
"content": "# Copyri... | python | new_file | 1 | 1 | bsd-3-clause | aa5c4fde763467cae63c205df8e4aaf7328ab713 | chuan9/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-c... | device/PRESUBMIT.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Automate the update of the version number in setup.py."
},
{
"role": "assistant",
"content": "import fileinput\nimport re\nimport sys\n\npattern = re.compile(\"\\s*version='([0-9.]+)',\")\nline = \"\"\nmaj = \"\" \nmin = \"\" \nv... | python | new_file | 1 | 0 | apache-2.0 | a610154749d081e613b8bf58acf62af55958de9c | jeffreydwalter/arlo | rev.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for symbol selection"
},
{
"role": "assistant",
"content": "import pytest\n\nfrom tests.symbols import get_symbols\nfrom thinglang.compiler.errors import NoMatchingOverload\nfrom thinglang.compiler.references import Refe... | python | new_file | 1 | 3 | mit | f7a1595e39eeb754290c62e9194868d98d9755f4 | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | tests/symbols/test_symbol_selection.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom flask import request\nfrom flask import jsonify\nimport json\nimport subprocess\n\napp = Flask(__name__)\nconfig = None\n\n@app.route('/', methods=['POST'])\ndef hook_listen():\n if request.method == 'POST':... | python | edit | 1 | 6 | mit | d168599b9167ede2098aa2fe82375aa95e5ab8b3 | nicocoffo/docker-puller,nicocoffo/docker-puller,glowdigitalmedia/docker-puller,glowdigitalmedia/docker-puller | dockerpuller/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for sender_callable check"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport pytest\n\nfrom webhooks.exceptions import SenderNotCallable\nfrom webhooks import webhook, unhashe... | python | new_file | 3 | 1 | bsd-3-clause | 0bc0691c7714b7b5885ce2a9c05eb7eb35738c74 | pydanny/webhooks | tests/test_decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to get certificate expiration date"
},
{
"role": "assistant",
"content": "from cryptography import x509\nfrom cryptography.hazmat.backends import default_backend\n\nfrom bluebottle.clients import properties\nfrom blueb... | python | new_file | 4 | 4 | bsd-3-clause | c84e3394ed4829ff9a66167864a11a4ef6a2b62c | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | scripts/get_saml_cert_expiration.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Rother District Council logo for letters"
},
{
"role": "assistant",
"content": "\"\"\"empty message\n\nRevision ID: 0180_another_letter_org\nRevises: 0179_billing_primary_const\nCreate Date: 2017-06-29 12:44:16.815039\n\n\"\"... | python | new_file | 1 | 2 | mit | 80fd2d73f7a206b5b517cb455da457fed9dc6403 | alphagov/notifications-api,alphagov/notifications-api | migrations/versions/0180_another_letter_org.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for UnionFind fix."
},
{
"role": "assistant",
"content": "from nose.tools import *\n\nimport networkx as nx\n\ndef test_unionfind():\n # Fixed by: 2cddd5958689bdecdcd89b91ac9aaf6ce0e4f6b8\n # Previously (in 2.x),... | python | new_file | 2 | 1 | bsd-3-clause | 16e52502bf55075c58022fa35e1673a8a0d5f4bc | beni55/networkx,jni/networkx,aureooms/networkx,wasade/networkx,RMKD/networkx,dhimmel/networkx,RMKD/networkx,Sixshaman/networkx,sharifulgeo/networkx,blublud/networkx,jfinkels/networkx,harlowja/networkx,dmoliveira/networkx,kernc/networkx,jakevdp/networkx,ghdk/networkx,aureooms/networkx,blublud/networkx,jni/networkx,ghdk/... | networkx/utils/tests/test_unionfind.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new abstraction with recursion"
},
{
"role": "assistant",
"content": "import networkx as nx\nimport os\nfrom pygraphc.preprocess.CreateGraphModel import CreateGraphModel\nfrom pygraphc.clustering.Louvain import Louvain\n\n\nc... | python | new_file | 2 | 4 | mit | fb3b3d2f9798872742541f7eae2d7b3e2a8a95ab | studiawan/pygraphc | pygraphc/abstraction/AutoAbstractionRecursion.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for generate events."
},
{
"role": "assistant",
"content": "#!/usr/bin/python3\n\nfrom random import randint\n\noutput = \"\"\nfilename = \"data\"\n\n\nclass Generator:\n\n def gen_date(self):\n return str(ra... | python | new_file | 1 | 2 | mit | 3f685e3873c18e1eb28b7a4121c552bbb697e0a4 | Intey/OhMyBank,Intey/OhMyBank,Intey/OhMyBank,Intey/OhMyBank | scripts/generator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Consumer Product Safety Commission."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport datetime\nimport logging\nimport os\nfrom urllib.parse import urljoin\n\nfrom bs4 import BeautifulSoup\nfrom utils imp... | python | new_file | 1 | 4 | cc0-1.0 | f5284cc7da9166a43e3cfbd901205f4446295f7a | divergentdave/inspectors-general,lukerosiak/inspectors-general | inspectors/cpsc.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve py set discard remove pop"
},
{
"role": "assistant",
"content": "num_elements = int(input())\ns = set(map(int, input().split()))\nnum_operations = int(input())\nfor _ in range(num_operations):\n operation = input().split... | python | new_file | 1 | 0 | mit | 98bd10cdf2c380b17c16a47a8f962dc384b3a18d | rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank | python/py-set-discard-remove-pop.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add news date and title scrapper from ist's news page."
},
{
"role": "assistant",
"content": "from urllib.request import urlopen\nfrom bs4 import BeautifulSoup\nimport sys, io\n\nsys.stdout = io.TextIOWrapper(sys.stdout.buffer,'c... | python | new_file | 1 | 0 | mit | b1a851d6f5dd47790459564a55405627d9b7a9e4 | iluxonchik/python-general-repo | scripts/webscraping/ist_news_titles.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add experimental polling DB backend.\n\nSigned-off-by: Chris Lamb <<EMAIL>>"
},
{
"role": "assistant",
"content": "import time\nimport datetime\n\nfrom django.db import connection, models, ProgrammingError\n\nfrom ..job import Jo... | python | new_file | 1 | 4 | bsd-3-clause | 6f2a9cbf9e571855074e898d22480d61277a3eda | thread/django-lightweight-queue,thread/django-lightweight-queue,lamby/django-lightweight-queue,prophile/django-lightweight-queue,prophile/django-lightweight-queue | django_lightweight_queue/backends/db.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 462. Minimum Moves to Equal Array Elements II\n\n462. Minimum Moves to Equal Array Elements II: https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/\n\nCould be optimized to O(n) by q-select"
},
{
... | python | new_file | 1 | 2 | apache-2.0 | 8c71a177c16762ab50dafe2528d24fab4ccf0925 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/minimum-moves-to-equal-array-elements-ii.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for generating chords, used to make some of the sounds."
},
{
"role": "assistant",
"content": "from collections import OrderedDict\nfrom itertools import cycle\nimport sys\n\n# build the pitch table\nnote_names = ['A',... | python | new_file | 7 | 0 | bsd-3-clause | 8e94da2cf788115a1562db253c96b1932b495ef3 | apendleton/valve-installation,apendleton/valve-installation | make_chord.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script useful for downloading large avatar images from Atom feeds"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport PIL.Image\nimport io\nimport json\nimport requests\n\nimport post_list\nimport web_cach... | python | new_file | 4 | 4 | mit | 3c8eb0563f3997fc068d039b18452eaa98da3122 | squirrel2038/thearchdruidreport-archive,squirrel2038/thearchdruidreport-archive,squirrel2038/thearchdruidreport-archive | download_avatars.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add problem 40, decimal fraction digits"
},
{
"role": "assistant",
"content": "from time import time\n\n\ndef main():\n fractional_part = ''\n\n i = 1\n while len(fractional_part) < 1000000:\n fractional_part += s... | python | new_file | 3 | 3 | mit | a2296ae2165b60ba182d540f729a099183169c92 | dimkarakostas/project-euler | problem_40.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add another example that works offline"
},
{
"role": "assistant",
"content": "import pytest\r\n\r\n\r\n@pytest.mark.offline\r\ndef test_request_fixture(request):\r\n sb = request.getfixturevalue('sb')\r\n sb.open(\"data:tex... | python | new_file | 1 | 1 | mit | a5c99fe8e37079a2663fe90644d3925d6dc7a5d0 | seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase | examples/offline_examples/test_request_fixture.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to get list of HRS station IDs\n\nFrom providers that license their data as Creative Commons"
},
{
"role": "assistant",
"content": "import pandas as pd\nfrom kiwis_pie import KIWIS\n\nk = KIWIS('http://www.bom.gov.au/w... | python | new_file | 1 | 4 | bsd-3-clause | d14130c30f776d9b10ab48c993096dce251aba28 | amacd31/hydromet-toolkit,amacd31/hydromet-toolkit | get_hrs_cc_streamflow_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add default value of access requests enabled to exsisting projects made before model added\n\n[#PLAT-835]\n\nAlso alter permissions on noderequestaction model, since choices were altered from when the original migration was made"
},
{
... | python | new_file | 1 | 1 | apache-2.0 | b0dfbb63a306255bc08eae2e7dd9360ca56a366f | aaxelb/osf.io,caseyrollins/osf.io,cslzchen/osf.io,sloria/osf.io,caseyrollins/osf.io,mfraezz/osf.io,mfraezz/osf.io,cslzchen/osf.io,icereval/osf.io,adlius/osf.io,mattclark/osf.io,erinspace/osf.io,felliott/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,saradbowman/osf.io,Johnetordoff/osf.io,baylee-d/osf.io,Johnetordoff/osf.io... | osf/migrations/0100_set_access_request_enabled.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Script to generate a container schema from DockerFile"
},
{
"role": "assistant",
"content": "#!/usr/bin/env/python\r\n\r\nfrom datetime import datetime\r\nimport os\r\nimport argparse\r\nimport re\r\nfrom graphviz import Digr... | python | new_file | 3 | 6 | mit | aec88e4f9cf2d9ee7f9fe876a7b884028b6c190c | webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile | bin/buildHierarchiqueDiagram.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add code to test van der pol model"
},
{
"role": "assistant",
"content": "\nfrom __future__ import division\n\nimport sys\nimport numpy as np\nsys.path.append('/media/ixaxaar/Steam/src/nest/local/lib/python2.7/site-packages/')\ni... | python | new_file | 2 | 0 | mit | 39c50fe7d4713b9d0a8e4618a829d94b4fe7456c | synergetics/nest_expermiments,synergetics/nest_expermiments | van_der_pol_sync.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a baseline set of _MultiCall performance tests\n\nThis begins an effort to incorporate run-time speed tests using\n`pytest-benchmark`. This initial test set audits the `_MultiCall`\nloop with hookimpls, hookwrappers and the combination o... | python | new_file | 1 | 2 | mit | 6babb6e64e93ed74a72203fdc67955ae8ca3bfb3 | RonnyPfannschmidt/pluggy,nicoddemus/pluggy,hpk42/pluggy,pytest-dev/pluggy,pytest-dev/pluggy,RonnyPfannschmidt/pluggy,tgoodlet/pluggy | testing/benchmark.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to convexify the energies of a conservation tracking JSON model"
},
{
"role": "assistant",
"content": "import sys\nimport commentjson as json\nimport os\nimport argparse\nimport numpy as np\n\ndef listify(l):\n retu... | python | new_file | 2 | 6 | mit | 9d77092729e534b19d75b38dd700df25a009fa49 | chaubold/hytra,chaubold/hytra,chaubold/hytra | toolbox/convexify_costs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test of simple textcat workflow"
},
{
"role": "assistant",
"content": "from __future__ import unicode_literals\nfrom ...language import Language\n\ndef test_simple_train():\n nlp = Language()\n\n nlp.add_pipe(nlp.create... | python | new_file | 1 | 3 | mit | 1831dbd065a8776a77d18e10b44f84c99bca4c75 | aikramer2/spaCy,aikramer2/spaCy,aikramer2/spaCy,honnibal/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/sp... | spacy/tests/textcat/test_textcat.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for the Django directory"
},
{
"role": "assistant",
"content": "from jacquard.directory.base import UserEntry\nfrom jacquard.directory.django import DjangoDirectory\n\nimport pytest\nimport unittest.mock\n\ntry:\n im... | python | new_file | 3 | 2 | mit | c4d583966ef1a4d9bdb57715ef5e766ba62fbed6 | prophile/jacquard,prophile/jacquard | jacquard/directory/tests/test_django.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missed language update migrations\n\nThis migration should have been included in `2627b1c`."
},
{
"role": "assistant",
"content": "# Generated by Django 3.0.2 on 2020-01-20 14:22\n\nfrom django.db import migrations, models\n\... | python | new_file | 1 | 0 | bsd-2-clause | 609784dc106e01800eed0a7ccf88f82d6977d408 | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | babybuddy/migrations/0008_auto_20200120_0622.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to get evidence sources"
},
{
"role": "assistant",
"content": "from util import pklload\nfrom collections import defaultdict\nimport indra.tools.assemble_corpus as ac\n\n\nif __name__ == '__main__':\n # Load cached ... | python | new_file | 3 | 0 | bsd-2-clause | 3e5d6e5dd31193f42ebddaeff856bfe53703a19e | sorgerlab/indra,sorgerlab/indra,bgyori/indra,pvtodorov/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,johnbachman/belpy,bgyori/indra,johnbachman/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,johnbachman/indra,johnbachman/belpy | models/fallahi_eval/evidence_sources.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for moving recomended articles recomended section"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfrom molo.core.models im... | python | new_file | 1 | 6 | bsd-2-clause | 7c10150d5e667921450e8663fa9440253a495160 | praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem | gem/migrations/0014_convert_recomended_articles.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement preview of entries for restricted users in EntryPreviewMixin"
},
{
"role": "assistant",
"content": "\"\"\"Preview mixins for Zinnia views\"\"\"\nfrom django.http import Http404\nfrom django.utils.translation import uget... | python | new_file | 1 | 4 | bsd-3-clause | ccd1822d65f5565d4881e5a6a32b535e55cc2b50 | 1844144/django-blog-zinnia,ghachey/django-blog-zinnia,petecummings/django-blog-zinnia,marctc/django-blog-zinnia,bywbilly/django-blog-zinnia,ghachey/django-blog-zinnia,Zopieux/django-blog-zinnia,ghachey/django-blog-zinnia,extertioner/django-blog-zinnia,1844144/django-blog-zinnia,ZuluPro/django-blog-zinnia,extertioner/dj... | zinnia/views/mixins/entry_preview.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add revision for new boardmoderator columns"
},
{
"role": "assistant",
"content": "\"\"\"Add board moderator roles\n\nRevision ID: da8b38b5bdd5\nRevises: 90ac01a2df\nCreate Date: 2016-05-03 09:32:06.756899\n\n\"\"\"\n\n# revision... | python | new_file | 1 | 1 | mit | 1a1e9123313fdedab14700ead90748d9e6182a42 | Floens/uchan,Floens/uchan,Floens/uchan,Floens/uchan,Floens/uchan | migrations/versions/da8b38b5bdd5_add_board_moderator_roles.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script that extracts clips from HDF5 file."
},
{
"role": "assistant",
"content": "from pathlib import Path\nimport wave\n\nimport h5py\n\n\nDIR_PATH = Path('/Users/harold/Desktop/Clips')\nINPUT_FILE_PATH = DIR_PATH / 'Clips.h... | python | new_file | 1 | 3 | mit | 730548fe74dda462d7aac1e3c5ee8e8ba47f4371 | HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper | scripts/extract_clips_from_hdf5_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example showing scraping/parsing of an HTML table into a Python dict"
},
{
"role": "assistant",
"content": "#\n# htmlTableParser.py\n#\n# Example of parsing a simple HTML table into a list of rows, and optionally into a littl... | python | new_file | 1 | 1 | mit | abd05378eb6acf742f2deff4228a0bca4492521b | pyparsing/pyparsing,pyparsing/pyparsing | examples/htmlTableParser.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for previous commit\n\ninb4 this is backwards"
},
{
"role": "assistant",
"content": "from django.test import SimpleTestCase\nfrom mock import ANY, patch\n\nfrom corehq.apps.es.tests.utils import es_test\nfrom corehq.ela... | python | new_file | 1 | 2 | bsd-3-clause | 79637efbdda03cea88fa6a59b24a27f1d393c79f | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/util/tests/test_es_interface.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a spider for Planned Parenthood\n\nFixes #184"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\n\nfrom locations.items import GeojsonPointItem\n\n\nclass PlannedParenthoodS... | python | new_file | 3 | 2 | mit | a8b48d9174ce9c30166c0c2a8011c2c40624c4bd | iandees/all-the-places,iandees/all-the-places,iandees/all-the-places | locations/spiders/planned_parenthood.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add in a script to run the linter manually\n\nExample uses:\n$ runlint.py file1.js file2.js\n$ runlint.py --autofix file3.js"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport optparse\nimport sys\n\nfrom clos... | python | new_file | 1 | 2 | apache-2.0 | 1acbad02071a4d1ef953bc2c0643525e5d681d54 | Khan/khan-linter,Khan/khan-linter,Khan/khan-linter,Khan/khan-linter | runlint.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: perftest: Add simple Python web server for performance testing\n\nIn order to profile bottlenecks in CCF's HTTP communication, a simple\nPython webserver comes very handy. One can reason that the existing HTTP\nserver in CCF does not meet th... | python | new_file | 3 | 2 | apache-2.0 | fd3eaa3810ce82db864b3fcafe61d16ab53d85e5 | akisaarinen/ccf,akisaarinen/ccf | perftest/scripts/webserver.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test threading in app server rather than in serverTest."
},
{
"role": "assistant",
"content": "import _10gen\nimport ed.appserver.AppContext\nimport ed.lang.python.Python\nimport java.io.File\n\n# FIXME: this test produces a lot ... | python | new_file | 3 | 0 | apache-2.0 | 064386acbe509f872e40f3f577e7b6189ed91434 | babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble | src/test/ed/lang/python/thread2_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Print with vs without a comma"
},
{
"role": "assistant",
"content": "end1 = \"C\"\nend2 = \"H\"\nend3 = \"E\"\nend4 = \"E\"\nend5 = \"S\"\nend6 = \"E\"\nend7 = \"B\"\nend8 = \"U\"\nend9 = \"R\"\nend10 = \"G\"\nend11 = \"E\"\nend1... | python | new_file | 5 | 0 | mit | 72be8a8fd8345542096ba31e3f1428ea25ea9498 | nguyennam9696/Learn_Python_The_Hard_Way | ex6.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Set all events to show banner text"
},
{
"role": "assistant",
"content": "\"\"\"empty message\n\nRevision ID: 0060 set all show_banner_text\nRevises: 0059 add show_banner_text\nCreate Date: 2021-10-03 00:31:22.285217\n\n\"\"\"\n\... | python | new_file | 1 | 1 | mit | b72a4bb06fda18ebca91649808cd2f2c531b392e | NewAcropolis/api,NewAcropolis/api,NewAcropolis/api | migrations/versions/0060.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to upload files to shell applet"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: latin-1 -*-\n\nimport os, sys, time, subprocess, json, requests\n\nHEADERS = {\n 'Content-type': 'applicati... | python | new_file | 1 | 0 | mit | 96035f6bb2a298cea859b1e5e9812e2dd83982d2 | ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline | dnanexus/shell/resources/home/dnanexus/upload_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test to validate against schema"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# encoding: utf-8\n#\n# This file is part of ckanext-doi\n# Created by the Natural History Museum in London, UK\n\nimport ckanext.d... | python | new_file | 1 | 1 | mit | 85f6b2437b57c6e33ff56422b15aaab690704218 | NaturalHistoryMuseum/ckanext-doi,NaturalHistoryMuseum/ckanext-doi,NaturalHistoryMuseum/ckanext-doi | ckanext/doi/tests/test_schema.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test template for the Damage class"
},
{
"role": "assistant",
"content": "import unittest\nfrom damage import Damage\n\n\nclass DamageTests(unittest.TestCase):\n def test_init(self):\n dmg = Damage(phys_dmg=1.34, magic_... | python | new_file | 1 | 1 | mit | ac0d0b78b7b4eef913460894fca3af1ace222c7f | Enether/python_wow | tests/test_damage.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test for drawing routines"
},
{
"role": "assistant",
"content": "import batoid\nimport time\nimport os\nimport yaml\nimport numpy as np\nimport pytest\nfrom test_helpers import timer\n\n# Use matplotlib with a non-intera... | python | new_file | 5 | 1 | bsd-2-clause | a7629ef3acedaa688a455c01afb65c40a53c14b0 | jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace | tests/test_draw.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple BIRD client class"
},
{
"role": "assistant",
"content": "# coding: utf-8\n\nimport subprocess\n\nimport netaddr\n\nimport lglass.route\n\nclass BirdClient(object):\n\tdef __init__(self, executable=\"birdc\"):\n\t\tself... | python | new_file | 1 | 10 | mit | 41f0533edc9ebe788722711af95e040d4f06abb9 | fritz0705/lglass | lglass/bird.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example of how to read from a external GPS outputting NMEA messages.\n\nParsing using pynmea2"
},
{
"role": "assistant",
"content": "from __future__ import print_function\nimport requests\nimport argparse\nimport time\nimport... | python | new_file | 3 | 8 | mit | 6f3579e6ac32211779481307f8e508469dde7605 | waterlinked/examples | externalNMEA.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make getting started easier with a handy script"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport subprocess\n\n\ndef sudo(command_text):\n parts = ['sudo']\n parts.extend(command_text.split(command_tex... | python | new_file | 1 | 1 | mit | a8bd9defcf3359296acf7633041b036213868075 | projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse | install.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add code to fix the python 2.6.6 auth failure issue.\n\n\ngit-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@10708 4f837ed2-42f5-46e7-a7a5-fa17313484d4"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# $Id: fix_... | python | new_file | 1 | 3 | bsd-3-clause | 3b5234a370db18fc51d8ad8573981c85544abb47 | edina/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon | test/frameworks/lib/fix_auth_failure.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .base import CA, RDA, CCA\n\n__all__ = ['CA', 'RDA', 'CCA']\n\n#\n#from numpy.testing import Tester\n#test = Tester().test\n\n__version__ = '0.1-dev'\n\n```\n\nApply this change: MAINT: Make version compatible with PEP386"
},
{
... | python | edit | 1 | 0 | bsd-3-clause | 9349adb2efa5f0242cf9250d74d714a7e6aea1e9 | xguse/scikit-bio,wdwvt1/scikit-bio,johnchase/scikit-bio,xguse/scikit-bio,colinbrislawn/scikit-bio,Achuth17/scikit-bio,Achuth17/scikit-bio,jdrudolph/scikit-bio,Kleptobismol/scikit-bio,jensreeder/scikit-bio,Jorge-C/bipy,jairideout/scikit-bio,kdmurray91/scikit-bio,averagehat/scikit-bio,wdwvt1/scikit-bio,Kleptobismol/sciki... | ordination/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add join_segmentations example to the gallery"
},
{
"role": "assistant",
"content": "\"\"\"\n==========================================\nFind the intersection of two segmentations\n==========================================\n\nWh... | python | new_file | 1 | 1 | bsd-3-clause | c5e047ff0e1cfe35692838365b907db8c3746c4b | Midafi/scikit-image,rjeli/scikit-image,youprofit/scikit-image,GaZ3ll3/scikit-image,keflavich/scikit-image,michaelaye/scikit-image,chintak/scikit-image,rjeli/scikit-image,youprofit/scikit-image,vighneshbirodkar/scikit-image,newville/scikit-image,almarklein/scikit-image,ClinicalGraphics/scikit-image,Britefury/scikit-imag... | doc/examples/plot_join_segmentations.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for user utilities sum_ and prod_"
},
{
"role": "assistant",
"content": "\"\"\"Tests for user utility functions.\"\"\"\n\nfrom drudge import Vec, sum_, prod_\nfrom drudge.term import parse_terms\n\n\ndef test_sum_prod_u... | python | new_file | 1 | 2 | mit | 8f597e766e9ef8014da4391a7109d9b77daf127e | tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge | tests/user_utils_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple parser to return some activity numbers from our git log."
},
{
"role": "assistant",
"content": "#!/usr/bin/python\nimport sys\nimport getopt\nimport re\nimport email.utils\nimport datetime\n\nclass Usage(Exception):\n ... | python | new_file | 4 | 13 | apache-2.0 | b95e5cd706a1cf81e41debae30422345cef3a1ee | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/committerparser.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add start of Python solution for day 9 (parsing only)"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python3\n\n\ndef parse_input(text):\n \"\"\"Parse a list of destinations and weights\n\n Returns a list of tuples... | python | new_file | 1 | 2 | mit | a3e9097247f4abe660696e5bd19f06e7e5756249 | robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions | python/day9.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create tests for JavaScript parser."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\n\nimport pytest # type: ignore\n\nfrom sensibility.language import Language\nfrom sensibility.language.j... | python | new_file | 1 | 1 | apache-2.0 | efbf98235b82c954364f35cb09f63006e23346e2 | eddieantonio/ad-hoc-miner,naturalness/sensibility,naturalness/sensibility,eddieantonio/ad-hoc-miner,naturalness/sensibility,eddieantonio/ad-hoc-miner,eddieantonio/ad-hoc-miner,naturalness/sensibility | tests/test_lang_javascript.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example of slide-hold-slide test"
},
{
"role": "assistant",
"content": "import numpy as np\nimport matplotlib.pyplot as plt\nimport rsf\n\nmodel = rsf.RateState()\n\n# Set model initial conditions\nmodel.mu0 = 0.6 # Friction ... | python | new_file | 3 | 0 | mit | 09ee7c5972f3a508355f6dfd49ff05d8de482cd9 | jrleeman/rsfmodel | shs_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add organizer permissions to staff group\n\nBB-16555 #resolve"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.15 on 2019-11-11 12:19\nfrom __future__ import unicode_literals\n\nfrom djan... | python | new_file | 1 | 1 | bsd-3-clause | 97b9ee00277fa35c92886b1ed39864eba3707dce | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/activities/migrations/0020_auto_20200224_1005.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add SSH auto detect feature"
},
{
"role": "assistant",
"content": "\"\"\"\nThis module is used to auto-detect the type of a device in order to automatically create a\nNetmiko connection.\n\nThe will avoid to hard coding the 'devi... | python | new_file | 1 | 4 | mit | 661943403b9a4b7c28bf9e0a59ba937dc2298fef | isidroamv/netmiko,ktbyers/netmiko,fooelisa/netmiko,ktbyers/netmiko,isidroamv/netmiko,fooelisa/netmiko | netmiko/ssh_autodetect.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example of sending push notification via Firebase Cloud Messaging"
},
{
"role": "assistant",
"content": "import requests\n\nurl = 'https://fcm.googleapis.com/fcm/send'\nheaders = {'Content-Type': 'application/json',\n ... | python | new_file | 1 | 0 | apache-2.0 | 2b146388d1804ca4cb069fa07ea5e614a8ee1d14 | sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile | tools/send_to_fcm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom _utils import _output_eq, IntegrationSpec\n\n\nclass ShellCompletion(IntegrationSpec):\n \"\"\"\n Shell tab-completion behavior\n \"\"\"\n\n def no_input_means_just_task_names(self):\n _output_eq('-c simple_ns_list -... | python | edit | 1 | 2 | bsd-2-clause | 4f7b103d6c5fa3b07abb23e346caa995a7f803ef | mkusz/invoke,kejbaly2/invoke,mkusz/invoke,pyinvoke/invoke,mattrobenolt/invoke,kejbaly2/invoke,tyewang/invoke,frol/invoke,singingwolfboy/invoke,pyinvoke/invoke,frol/invoke,pfmoore/invoke,pfmoore/invoke,mattrobenolt/invoke | tests/completion.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output."
},
{
"role": "assistant",
"content": "import unittest\nfrom nose.tools import (assert_is_not_none, assert_raises, assert_... | python | new_file | 6 | 1 | bsd-3-clause | 0d32800fec1419eac39711fd8c94ce07896cddaf | gticket/scikit-neuralnetwork,IndraVikas/scikit-neuralnetwork,capitancambio/scikit-neuralnetwork,agomariz/scikit-neuralnetwork,freakynit/scikit-neuralnetwork,KhanSuleyman/scikit-neuralnetwork,aigamedev/scikit-neuralnetwork | sknn/tests/test_gaussian.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test long jid passed on CLI"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n# Import Salt Libs\nfrom salt.utils import args\n\n# Import Salt Testing Libs\nfrom salttesting import TestCase, skipIf\nfrom salttesti... | python | new_file | 1 | 1 | apache-2.0 | 3020b2084b24f1e00f0b9fc1d06186b1e697647e | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/unit/utils/args.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Remove control_id column from assessments table"
},
{
"role": "assistant",
"content": "# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"\nRemove control_id ... | python | new_file | 1 | 2 | apache-2.0 | 74ffdab0c54f332b8787aea04582ee7312a34b4c | selahssea/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,se... | src/ggrc/migrations/versions/20161123124848_1f5c3e0025da_remove_control_id_column_from_.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial working solution 4"
},
{
"role": "assistant",
"content": "class Solution(object):\n def findMedianSortedArrays(self, nums1, nums2):\n \"\"\"\n :type nums1: List[int]\n :type nums2: List[int]\n ... | python | new_file | 1 | 2 | mit | 372bd768acae6fbf425271b193d1734e5001c71a | xliiauo/leetcode,xliiauo/leetcode,xiao0720/leetcode,xliiauo/leetcode,xiao0720/leetcode | 4/Solution.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic WinEvent object tests."
},
{
"role": "assistant",
"content": "# Copyright (c) 2015, The MITRE Corporation. All rights reserved.\n# See LICENSE.txt for complete terms.\n\nimport unittest\n\nfrom cybox.objects.win_event_o... | python | new_file | 1 | 0 | bsd-3-clause | 93d80604003e1b3b21498df01f7647e7cea69a5f | CybOXProject/python-cybox | cybox/test/objects/win_event_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Load the source from a highlighted URL into a new window"
},
{
"role": "assistant",
"content": "import sublime\nimport sublime_plugin\nimport urllib\n\nclass GetWebpageSourceCommand(sublime_plugin.TextCommand):\n def run(self, e... | python | new_file | 1 | 2 | mit | 6906f574fad033f0b68fe7a5a35f4fcef1207ee0 | RichardHyde/SublimeText.Packages | Get_Webpage_Source.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility function for get latest Build"
},
{
"role": "assistant",
"content": "from typing import Optional\n\nfrom manager.models import Package, Build\n\n\ndef get_latest_build(package: Package) -> Optional[Build]:\n try:\n... | python | new_file | 1 | 2 | mit | 9ffe40aaf5ece521020258c4b31fbdb514e02b69 | colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager | manager/utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create a placeholder for pyauto test scripts.\n\nIncluding a hello world script.\n\nReview URL: http://codereview.chromium.org/668004\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40579 0039d316-1c4b-4281-b951-d872f2087c98"
},
... | python | new_file | 1 | 1 | bsd-3-clause | 0b55d97573fcd196a318b3c901f6dcac1b0a4eef | ropik/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromi... | chrome/test/functional/test_basic.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 167. Two Sum II - Input array is sorted\n\n167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/"
},
{
"role": "assistant",
"content": "class Solution(object)... | python | new_file | 1 | 5 | apache-2.0 | 305c3e0ce2705dd23e00ec801f5588ec1dbcc3a8 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/two-sum-ii-input-array-is-sorted.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for zoom backend"
},
{
"role": "assistant",
"content": "import json\n\nfrom .oauth import OAuth2Test\n\n\nclass ZoomOAuth2Test(OAuth2Test):\n backend_path = 'social_core.backends.zoom.ZoomOAuth2'\n user_data_url = ... | python | new_file | 1 | 1 | bsd-3-clause | 9c6f0cf829f4f0c7ff71ad65bed36269425dae13 | python-social-auth/social-core,python-social-auth/social-core | social_core/tests/backends/test_zoom.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Work towards integration NDTable <-> Minivect"
},
{
"role": "assistant",
"content": "import sys\nimport time\n\nimport numpy as np\n\nfrom minivect import miniast\nfrom minivect import specializers\nfrom minivect import minitypes... | python | new_file | 10 | 3 | bsd-2-clause | 89d4c1420805a6f2e491f1ab250722cdcf950bd8 | seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core | ndtable/engine/mv.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add remove vlan compliance test"
},
{
"role": "assistant",
"content": "# Copyright 2019 Internap.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ... | python | new_file | 1 | 1 | apache-2.0 | a9388f7d4c4747e6710d20d618b57f19360cb69c | lindycoder/netman,internaphosting/netman,internap/netman | tests/adapters/compliance_tests/remove_vlan_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add module for Source Engine game logic entities"
},
{
"role": "assistant",
"content": "\"\"\"\n\nHelper classes for creating maps in any Source Engine game.\n\n\"\"\"\n\nfrom vmf.vmf import Entity\nfrom vmf.types import Origin\n... | python | new_file | 1 | 1 | bsd-2-clause | b66ad576230fb7c96a8f5c6c7b6af8a8e4c8d0b5 | BHSPitMonkey/vmflib | vmf/games/source.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an helper class to write pexpect-based test cases\nOver time, we should improve this class and port all pexpect based testing over to using this\n\n\n\ngit-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@227875 91177308-0d34-0410-b5e6-9... | python | new_file | 11 | 3 | apache-2.0 | 0749111442c638569b6e42a11adee70e71e50813 | llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb | test/lldbpexpect.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Copy of main.py from fergal, reworked"
},
{
"role": "assistant",
"content": "\n\"\"\"\nThis is a template top level script.\n\nPlease don't edit this file. Instead, copy it to\nyouname_main.py, then run and edit that file.\n\n\"\... | python | new_file | 1 | 3 | mit | 6824c741c455339eaaff5481f6e84c42fe1e26cf | barentsen/dave,barentsen/dave,barentsen/dave,barentsen/dave | susanplay/mainSusan.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for the `dirty_unzip` rule"
},
{
"role": "assistant",
"content": "import os\nimport pytest\nimport zipfile\nfrom thefuck.rules.dirty_unzip import match, get_new_command, side_effect\nfrom tests.utils import Command\n\n\... | python | new_file | 1 | 1 | mit | 1146ab654c8b0d6f982f19bafed91f18edb877f3 | gogobebe2/thefuck,bigplus/thefuck,Aeron/thefuck,manashmndl/thefuck,subajat1/thefuck,PLNech/thefuck,princeofdarkness76/thefuck,mcarton/thefuck,lawrencebenson/thefuck,thinkerchan/thefuck,Clpsplug/thefuck,vanita5/thefuck,levythu/thefuck,BertieJim/thefuck,hxddh/thefuck,Clpsplug/thefuck,zhangzhishan/thefuck,barneyElDinosaur... | tests/rules/test_dirty_unzip.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to extract useful lsf job information"
},
{
"role": "assistant",
"content": "import os\nimport sys\nfrom subprocess import Popen, PIPE\n\n# ------------------------------------------------------------------------------... | python | new_file | 3 | 2 | apache-2.0 | 4a8c3043962efa7e2a443a10a0ad13d025699730 | Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production | support/get_lsf_job_info.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test suite for Wikipedia triggers\n\n* This marks the start of the test cases for\n Wikipedia IFTTT triggers."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n Wikipedia channel for IFTTT\n ~~~~~~~~~~~~~... | python | new_file | 2 | 1 | apache-2.0 | a4a956899008102b993d2268fbf6ae92d191ee6a | ch3nkula/ifttt,ch3nkula/ifttt,ch3nkula/ifttt | ifttt/ifttt-tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration file for the model of CoC record"
},
{
"role": "assistant",
"content": "# Generated by Django 3.0.2 on 2020-02-23 11:12\n\nfrom django.conf import settings\nimport django.core.validators\nfrom django.db import migra... | python | new_file | 1 | 0 | mit | 52d947daa8ea6642472660d0c16c2b05e34bea41 | pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016 | src/users/migrations/0010_cocrecord.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a fabric file to test the generated output"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*\n\n\"\"\"\nSimple fabric file to test oinspect output\n\"\"\"\n\nfrom __future__ import print_function\n\nimport webbrow... | python | new_file | 1 | 1 | bsd-3-clause | 5c0ef34788202abefbc36f80899f9b9b54ba17be | spyder-ide/docrepr,spyder-ide/docrepr,techtonik/docrepr,spyder-ide/docrepr,techtonik/docrepr,techtonik/docrepr | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add some basic tests for flow_exports"
},
{
"role": "assistant",
"content": "import netlib.tutils\nfrom libmproxy import flow_export\nfrom . import tutils\n\nreq_get = netlib.tutils.treq(\n method='GET',\n headers=None,\n ... | python | new_file | 1 | 1 | mit | abc155280052ab2f216342acd7933db3e090d94e | mitmproxy/mitmproxy,StevenVanAcker/mitmproxy,mitmproxy/mitmproxy,xaxa89/mitmproxy,zlorb/mitmproxy,dwfreed/mitmproxy,dwfreed/mitmproxy,ddworken/mitmproxy,jvillacorta/mitmproxy,ddworken/mitmproxy,mhils/mitmproxy,mhils/mitmproxy,mitmproxy/mitmproxy,gzzhanghao/mitmproxy,laurmurclar/mitmproxy,ddworken/mitmproxy,mosajjal/mit... | test/test_export_flow.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add day 5 part 1."
},
{
"role": "assistant",
"content": "\"\"\"Module to find the passowrd on a bunny door.\"\"\"\n\n\nimport hashlib\n\n\ndef main():\n \"\"\"Run the main function.\"\"\"\n id = 'cxdnnyjw'\n password = [... | python | new_file | 1 | 3 | mit | 51faed84f4d56fe3455a6568bdadbc9b16196175 | SayWhat1/adventofcode2016 | day5-1.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test file for update.py"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\n\nbasedir = os.path.realpath('..')\nif basedir not in sys.path:\n sys... | python | new_file | 1 | 0 | mit | 47d770c6008116dd72c6c6b4572a0a92faa39e66 | CristianCantoro/sbntoolkit,CristianCantoro/sbntoolkit | test/test_update.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add performance test for epsilon convolution"
},
{
"role": "assistant",
"content": "#!/usr/bin/python3\n\n'''\nConvolution\n'''\n\nfrom __future__ import print_function\n\nimport numpy as np\nimport cProfile\nimport random\nimpor... | python | new_file | 1 | 2 | bsd-2-clause | 97b933815dcbc179e25bc9c1c16cfa1153036ae1 | timqian/neurons,johannesmik/neurons | performance_tests/epsilon_convolution.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add pretend ram module to try out the progress bar"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division\nimport random\n\n\nclass Py3status:\n \"\"\"\n \"\"\"\n format = \"{ba... | python | new_file | 1 | 4 | bsd-3-clause | b7bc68872a45396358ce20a215e3a3a2c3734b8a | guiniol/py3status,guiniol/py3status | py3status/modules/pretend_ram.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test case for deepcopy"
},
{
"role": "assistant",
"content": "from tests.models import (\n Cat,\n Location,\n)\nimport copy\n\nfrom rest_framework.test import APITestCase\n\n\nclass DeepcopyTestCase(APITestCase):\n ... | python | new_file | 1 | 1 | mit | 76ccb3e14da170000c8071203e931eeb8bc7c642 | AltSchool/dynamic-rest-client | tests/test_deepcopy.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add work for Exercise 25."
},
{
"role": "assistant",
"content": "def break_words(stuff):\n \"\"\"This function will brea up words for us.\"\"\"\n words = stuff.split(' ')\n return words\n\ndef sort_words(words):\n \"\... | python | new_file | 3 | 1 | mit | 5a2394f8445350387adc30dd5bc818971aefc91d | jaredmanning/learning,jaredmanning/learning | lpthw/ex25.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add management command to import geolocation data"
},
{
"role": "assistant",
"content": "# Copyright 2017 Raphaël Hertzog\n#\n# This file is subject to the license terms in the LICENSE file found in\n# the top-level directory of ... | python | new_file | 4 | 8 | mit | 2e7252fab4667047c04b540040d5ad2287a73299 | rhertzog/parrainage,rhertzog/parrainage,rhertzog/parrainage | parrainage/app/management/commands/import_geoloc.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add management command for running the task for validating all data catalogs."
},
{
"role": "assistant",
"content": "from django.core.management.base import NoArgsCommand\nfrom thezombies.tasks.main import validate_data_catalogs\... | python | new_file | 1 | 1 | bsd-3-clause | bdd532cccf504dc9fbf21a9e72b8185dc910ec94 | sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies | thezombies/management/commands/validate_all_data_catalogs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add file for nontermianl adding when grammar is create"
},
{
"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 un... | python | new_file | 2 | 0 | mit | c168efd883bcc1fc5ed8fe3c80de95db905bb468 | PatrikValkovic/grammpy | tests/grammar_creation_test/NonterminalAddingTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for retrieving/updating reverse fks"
},
{
"role": "assistant",
"content": "from copy import deepcopy\nfrom django.db import models\nfrom django.test import TestCase\nfrom rest_framework import serializers\n\n\n# Foreign... | python | new_file | 1 | 2 | bsd-2-clause | 24e14b7d53e43f1574971ff5b6eee6d0185df23a | sehmaschine/django-rest-framework,qsorix/django-rest-framework,lubomir/django-rest-framework,nhorelik/django-rest-framework,James1345/django-rest-framework,canassa/django-rest-framework,yiyocx/django-rest-framework,thedrow/django-rest-framework-1,vstoykov/django-rest-framework,qsorix/django-rest-framework,jpulec/django... | rest_framework/tests/nested_relations.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add original script version, still not fit for general use"
},
{
"role": "assistant",
"content": "from bs4 import BeautifulSoup\nimport urllib.request\nimport MySQLdb\n\ndb = MySQLdb.connect(user=\"\", passwd=\"\", db=\"\")\nc = ... | python | new_file | 1 | 0 | mit | 0d7706db887bb5d1522f3de39b9fe1533f80fd8d | Vilkku/Dota-2-Hero-Parser | dota2parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom defcon import Glyph, Image, registerRepresentationFactory\nfrom defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory\nfrom defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory\nfr... | python | edit | 1 | 3 | mit | c5ed01ce81b1c0e459d93bf26bf96cdeb80a0344 | typesupply/defconAppKit,typemytype/defconAppKit | Lib/defconAppKit/representationFactories/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utilities to convert from python2 to python3.\n\nThis commit only has one utility that allows to convert sorted()\nfunction with custom elements comparison from parameter cmp (python2)\nto parameter key (python3)."
},
{
"role": "... | python | new_file | 1 | 1 | bsd-3-clause | a3706e1c743ef7ec7f38375b116538a71ccb8455 | Quasimondo/RasterFairy | rasterfairy/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a multiprocessor for particle learning."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complian... | python | new_file | 2 | 3 | apache-2.0 | b7c6b5115ce5aec129af64d6b85c672901a435d3 | probcomp/cgpm,probcomp/cgpm | gpmcc/experiments/particle_engine.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to update images in the js code"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport urllib\n\ndef img2base64(img):\n return open(img, \"rb\").read().encode(\"base64\").replace('\\n', '')\n\ndisabl... | python | new_file | 3 | 1 | bsd-2-clause | b68244965b4f69711f0c4d9d42f24e6b3f5742f4 | richq/toggle-js-addon | update-images.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Put the contents of a pyui file onto the clipboard\n\nFor pasting up to GitHub, etc."
},
{
"role": "assistant",
"content": "import clipboard\nfilename = 'put_your_filename_here.pyui' # edit this line before running\nwith open(fi... | python | new_file | 1 | 0 | apache-2.0 | 0f84eb57024bb856c10a6326a3827cb91e4d20c2 | cclauss/Ten-lines-or-less | pyui_to_clipboard.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.