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: migration: Add migration to remove user values for deleted options.\n\nThis commit adds migration to delete CustomProfileFieldValue\nobjects for deleted options of SELECT type custom profile\nfields."
},
{
"role": "assistant",
"c... | python | new_file | 1 | 2 | apache-2.0 | 0afda70c3fa96bba8908c7b1c8d310389a74b694 | andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,rht/zulip,zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,rht/zulip,rht/zulip,zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,zulip/zulip,andersk/zulip,andersk/zulip | zerver/migrations/0397_remove_custom_field_values_for_deleted_options.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add keycode table generator for Windows"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nimport re, sys, os\nif len(sys.argv) != 2:\n print >>sys.stderr, \"Usage: win.py path/to/WinUser.h\"\n sys.exit(1)\nOUT =... | python | new_file | 4 | 0 | bsd-2-clause | 357a37d607b4b85d46e26fa4d2409f23d923d176 | depp/sglib,depp/sglib | src/client/keyboard/win.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add limited unit test for tank structure."
},
{
"role": "assistant",
"content": "import unittest\nimport tank_structure as ts\nfrom units import inch2meter, psi2pascal\n\n\nclass TestStringMethods(unittest.TestCase):\n\n def t... | python | new_file | 1 | 1 | mit | 92726afbbf7e51ff21aba9e08ea0aad6c5c49dfc | mvernacc/proptools | tank_structure_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom .core import (ChannelDone, Channel, ReadChannel, MapChannel, FlatMapChannel,\n FilterChannel, FutureChannel, ReadyFutureChannel, TeeChannel,\n ProducerChanne... | python | edit | 17 | 0 | mit | 3620bafe1ce573d08fca7db357f4df40d6949cfb | ethanrowe/flowz,PatrickDRusk/flowz | flowz/channels/__init__.py | rejected_lint | Too many lint violations: 17 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django\nfrom django import template\nfrom django_countries.fields import Country, countries\n\n\nregister = template.Library()\n\nif django.VERSION < (1, 9):\n # Support older versions without implicit assignment support in simple... | python | edit | 3 | 1 | mit | 4725a80e6a02a08ef6081eac9261cb420bdc1fee | SmileyChris/django-countries | django_countries/templatetags/countries.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a Python 3000 emitter."
},
{
"role": "assistant",
"content": "\"\"\"\\\nPython code emitter for C'Dent\n\"\"\"\n\nfrom cdent.emitter import Emitter as Base\n\nclass Emitter(Base):\n LANGUAGE_ID = 'py3'\n BLOCK_COMMENT_B... | python | new_file | 1 | 1 | bsd-2-clause | 950cef23b570dc744357ab7a1dd7e8ad3d7c71d7 | ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py,ingydotnet/cdent-py | cdent/emitter/python3.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add experimental version of line.py (fancier :fire:)"
},
{
"role": "assistant",
"content": "from nxt import locator\nfrom nxt.sensor.common import PORT_1, PORT_2, PORT_3, PORT_4\nfrom nxt.motor import PORT_A, PORT_B, PORT_C\nfrom... | python | new_file | 7 | 6 | mit | 54beba6ca344e6b0269e9500b3ec9f103348f217 | richin13/nxt-scripts | scripts/line.rw.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic test for inelastic_cs_fn, similar to phonon"
},
{
"role": "assistant",
"content": "from cstool.parse_input import (parse_to_model, check_settings, cstool_model)\nfrom cstool.inelastic import (inelastic_cs_fn)\nfrom csli... | python | new_file | 1 | 2 | apache-2.0 | d3903dcb846fec36e176a45118414c925f23aa8a | eScatter/cstool | test/test_inelastic.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# vim:fileencoding=utf-8:noet\n\nimport os\nimport sys\n\nsys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(os.getcwd()))))\nsys.path.insert(0, os.path.abspath(os.getcwd()))\n\nextensions = ['powerline_autodoc', 'sphinx.ext... | python | edit | 1 | 0 | mit | 538a41b25a4aae3f98e32602880f2464723a0f9d | magus424/powerline,seanfisk/powerline,cyrixhero/powerline,bezhermoso/powerline,QuLogic/powerline,firebitsbr/powerline,junix/powerline,lukw00/powerline,EricSB/powerline,darac/powerline,xxxhycl2010/powerline,xxxhycl2010/powerline,IvanAli/powerline,seanfisk/powerline,dragon788/powerline,QuLogic/powerline,russellb/powerlin... | docs/source/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a snippet (walk directory)."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport argparse\nimport os\n\n# GET THE ROOT DIRECTORY ####################################################... | python | new_file | 1 | 0 | mit | 191363e349735d6b51d3dbbfe471f1b51f59bffc | jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets | python/walk_directories.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for spam check"
},
{
"role": "assistant",
"content": "from sendgrid.helpers.mail.spam_check import SpamCheck\n\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\n\nclass UnitTests(... | python | new_file | 1 | 1 | mit | 3363e01f99cd60d23029d25c7102abdafa5aeacc | sendgrid/sendgrid-python,sendgrid/sendgrid-python,sendgrid/sendgrid-python | test/test_spam_check.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: FIx fiscal offset. Could be negative too"
},
{
"role": "assistant",
"content": "# Generated by Django 2.2.24 on 2022-09-23 12:20\n\nimport bluebottle.bb_accounts.models\nfrom django.db import migrations, models\nimport django.db.... | python | new_file | 4 | 0 | bsd-3-clause | 5b3069d96d03c3f3dc15370d48c47b8cec21ed86 | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | bluebottle/members/migrations/0068_auto_20220923_1420.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests derived from RFC 3720, section B.4."
},
{
"role": "assistant",
"content": "import pytest\n\n\ndef _call_extend(crc, chunk):\n import crc32c\n return crc32c.extend(crc, chunk, len(chunk))\n\n\ndef test_extend_w_emp... | python | new_file | 1 | 1 | apache-2.0 | b24997980f57b4ebfdb88f688b936ba345422acf | googleapis/python-crc32c,googleapis/python-crc32c,googleapis/python-crc32c | tests/test___init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Newton solver for non-linear equations"
},
{
"role": "assistant",
"content": "import timeit\n\nimport numpy as np\nfrom scipy.linalg import lu_factor, lu_solve\n\n\ndef newton(x0, func, jacobian, tol=1e-2, verbose=False):\n\t... | python | new_file | 1 | 4 | mit | 84251f94bf82bf521533f707fc0c93d13ec39efc | matthiasplappert/math-algorithms | newton.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution to first problem"
},
{
"role": "assistant",
"content": "def calc():\n return sum(x for x in range(1000) if (x % 3) == 0 or (x % 5) == 0)\n\nif __name__ == \"__main__\":\n print(calc())\n"
}
] | python | new_file | 1 | 4 | mit | 9f09494c538ab6dc99ffdd46f91850691c748428 | gsnedders/projecteuler | src/p1.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to generate a tinyquery table literal from data in bigquery\n\nSummary:\nCreating tinyquery tables by hand is kind of a pain for tables of any\ncomplexity. This revision adds a script that takes a dataset and table on the\ncomm... | python | new_file | 2 | 2 | mit | 754437642a69338deca196d7758ee37c7d3baffe | Khan/tinyquery | tools/make_test_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a small script to pull translation state from compile logs."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# Extracts the progress of translations from the compilation\n# log in easily readable form. Make sure ... | python | new_file | 7 | 2 | bsd-3-clause | becbda54738ab976342420faf684e9be417132e0 | niko20010/mumble,feld/mumble,mbax/mumble,richard227/mumble,bheart/mumble,feld/mumble,Githlar/mumble,LuAPi/mumble,richard227/mumble,feld/mumble,richard227/mumble,unascribed/mumble,Keridos/mumble,LuAPi/mumble,Lartza/mumble,unascribed/mumble,SuperNascher/mumble,Lartza/mumble,ccpgames/mumble,SuperNascher/mumble,Lartza/mumb... | scripts/transtate.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Write a Python function that returns the sum of the pairwise products of two lists"
},
{
"role": "assistant",
"content": "# Problem 5\n# 10.0 points possible (graded)\n# Write a Python function that returns the sum of the pairwis... | python | new_file | 1 | 2 | mit | fe13379bd4b1cd323c433bfaa8ab75368df3d8c5 | Kunal57/MIT_6.00.1x | midterm/problem5.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to generate images suitable for carousel."
},
{
"role": "assistant",
"content": "\"\"\" XXX: Helper script ... \"\"\"\n\nfrom os.path import basename\nfrom PIL import Image\n\nASPECT_RATIOS = (1.5, 2, 2.5)\nPREFIX = '/... | python | new_file | 1 | 3 | bsd-3-clause | 532649313b4660f0f2aa360940c8d90d2091dda9 | punchagan/mumbaiultimate.in,punchagan/mumbaiultimate.in | utils/carouselify_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for simulate_dialog"
},
{
"role": "assistant",
"content": "\nfrom .examples import load_email_client\nfrom ..policy import MDPDialogBuilder\nfrom ..util import simulate_dialog, cross_validation\n\n\nEMAIL_CLIENT = load... | python | new_file | 3 | 1 | apache-2.0 | c1e1d4d40b8344437f8f2fb3fa44f60a42d5112d | yasserglez/configurator,yasserglez/configurator | config_diag/tests/test_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to plot benchmark results with matplotlib"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport pickle\nfrom matplotlib import pyplot as plt\n\nif len(sys.argv) < 2... | python | new_file | 1 | 0 | mit | 0235330fa2b58e166a25a90714436e9503c6c5a9 | benmoran56/esper | examples/plot-results.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a unittest for spacegroup. Still very basic.\n\n\nFormer-commit-id: f539c5f894a6ebd867dfee0eeb5dc1248de11c97 [formerly 2a214050a30048eab177f696d891a33c2860bb55]\nFormer-commit-id: 26ca50b3c5eceb253d7371b8c0f2a4d08e7f48d7"
},
{
"r... | python | new_file | 3 | 5 | mit | ad5f851b7959f7bf09d7cd669d8db126fa962982 | migueldiascosta/pymatgen,yanikou19/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,sonium0/pymatgen,Dioptas/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,Bismarrck/pymatgen,ctoher/pymatgen,mig... | pymatgen/symmetry/tests/test_spacegroup.py | rejected_duplicate | Near-duplicate of sample 6001 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the analysis driver script"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\n# Brokers communication between HydroTrend and Dakota through files.\n# Mark Piper (<EMAIL>)\n\nimport sys\nimport os\nimport shutil\nf... | python | new_file | 1 | 2 | mit | 5f8dd68c094c5da5dd21970eb8038b226521de8b | mdpiper/dakota-experiments,mdpiper/dakota-experiments,mdpiper/dakota-experiments,mcflugen/dakota-experiments,mcflugen/dakota-experiments | hydrotrend-2/run_hydrotrend.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add character encoding error handler"
},
{
"role": "assistant",
"content": "\"\"\"Character encoding error handlers.\"\"\"\n\n__all__ = [\n 'make_error_logger',\n]\n\n\ndef make_error_logger(logger):\n \"\"\"Make handlers t... | python | new_file | 1 | 1 | mit | 1254177287c7c40bd5658035cedc1fc26598b81e | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | py/garage/garage/codecs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add skeletal output test cases."
},
{
"role": "assistant",
"content": "\"\"\"Test the output module.\"\"\"\n\nfrc_out = outputs.frc_eia923_df(pudl_engine)\ngens_out = outputs.gens_eia860_df(pudl_engine)\ngf_out = outputs.gf_eia92... | python | new_file | 15 | 0 | mit | fc7904ed8753edba2e3a2ed7f6ca702c2f942903 | catalyst-cooperative/pudl,catalyst-cooperative/pudl | test/test_outputs.py | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement annealing learning rate schedules."
},
{
"role": "assistant",
"content": "import abc\nfrom math import exp\n\n\"\"\"Classes for annealing learning rate schedules.\"\"\"\n\nclass AnnealingSchedule(object):\n\tdef __init_... | python | new_file | 2 | 2 | mit | 0db8f4b170793e1e31cb86479d931239f69efa77 | prasanna08/MachineLearning | annealing_lr.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple predict method to multi models"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n#!/usr/bin/env python\n#\n# Copyright 2012 BigML\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); yo... | python | new_file | 1 | 6 | apache-2.0 | 5894f4148f6b6311b2985f3b23d9c3545ce55fb1 | xaowoodenfish/python-1,ShaguptaS/python,mmerce/python,jaor/python,bigmlcom/python | bigml/multiple_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple test for included model IRF methods."
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\nimport os\n\nimport pytest\n\nfrom pymt import models\n\n\n@pytest.mark.parametrize(\"cls\", models.__all__)\ndef test... | python | new_file | 1 | 1 | mit | 05624ed9e24886dc8ac0f89b097b8f165aa719fe | csdms/pymt,csdms/coupling,csdms/coupling | tests/test_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Send sms to phones via twilio api\n\nfirst install twilio using cmd pip install twilio after this step run the above script to send sms , update sid and token wrt your accounts"
},
{
"role": "assistant",
"content": "from twilio.r... | python | new_file | null | null | mit | 23003c2ad9c69a198e2b84a3a1c59ab13b165eb0 | Naveenkhasyap/python_scripts,Naveenkhasyap/python_scripts | send_sms.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add script used to add user counts stored in json file. Still need to modify this so that it is built directly."
},
{
"role": "assistant",
"content": "\"\"\"\nTo each region, let's add the number of users that tweeted in the regi... | python | new_file | 2 | 7 | unlicense | d576b654c9ae9b53630dd9133d50c7ddc34e1d3a | chebee7i/twitter,chebee7i/twitter,chebee7i/twitter | scripts/addUserCounts.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom tapiriik.database import db\nfrom tapiriik.messagequeue import mq\nfrom tapiriik.sync import Sync\nfrom datetime import datetime\nfrom pymongo.read_preferences import ReadPreference\nimport kombu\nimport time\n\nSync.InitializeWorkerBi... | python | edit | 3 | 0 | apache-2.0 | bcda46423bd28b60aac8a9befd3e06670a9675c8 | abs0/tapiriik,mduggan/tapiriik,marxin/tapiriik,niosus/tapiriik,marxin/tapiriik,gavioto/tapiriik,dmschreiber/tapiriik,dlenski/tapiriik,campbellr/tapiriik,abhijit86k/tapiriik,gavioto/tapiriik,dlenski/tapiriik,abhijit86k/tapiriik,marxin/tapiriik,dmschreiber/tapiriik,dmschreiber/tapiriik,olamy/tapiriik,campbellr/tapiriik,c... | sync_scheduler.py | rejected_duplicate | Near-duplicate of sample 6779 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add thermal conductivity trend analysis library."
},
{
"role": "assistant",
"content": "# Analyze thermal conductivity results\n# Date: June 2017\n# Author: Kutay B. Sezginel\nimport os\nimport numpy as np\nfrom teemof.read impor... | python | new_file | 1 | 6 | mit | 5368a3728560f0da460a19b67af4c607dc01a0c7 | kbsezginel/tee_mof,kbsezginel/tee_mof | teemof/analyze.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add draft of MNE example"
},
{
"role": "assistant",
"content": "\"\"\"\nUsing NeuroDSP with MNE\n=======================\n\nThis example explores some example analyses using NeuroDSP, integrated with MNE.\n\"\"\"\n\n#############... | python | new_file | 1 | 0 | apache-2.0 | b6353857dc124c8a9295cab865418ee888adf1e9 | srcole/neurodsp,srcole/neurodsp,voytekresearch/neurodsp | examples/plot_mne_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a session based source\n\nThis will pull the auth information from the current session."
},
{
"role": "assistant",
"content": "from zope.interface import implementer\n\nfrom .interfaces (\n IAuthSourceService,\n ... | python | new_file | null | null | isc | 89e8b3ef400c6025161c3af819c15ad8c7b74425 | usingnamespace/pyramid_authsanity | pyramid_authsanity/sources.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\nfrom settings import *\n\nimport jsonrpclib\n\napp = Flask(__name__)\n\n@app.route('/')\ndef index():\n xbmc = jsonrpclib.Server(SERVER_ADDRESS)\n episodes = xbmc.VideoLibrary.GetRecentlyAdded... | python | edit | 5 | 2 | mit | e14ee15116ee2137d528d298ca38e26e4f02f09f | robweber/maraschino,insertnamehere1/maraschino,mrkipling/maraschino,gugahoi/maraschino,runjmc/maraschino,runjmc/maraschino,insertnamehere1/maraschino,gugahoi/maraschino,mboeru/maraschino,awagnon/maraschino,mrkipling/maraschino,insertnamehere1/maraschino,mboeru/maraschino,awagnon/maraschino,robweber/maraschino,awagnon/m... | htpcfrontend.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add line SPW setup info for 16B"
},
{
"role": "assistant",
"content": "\n# Line SPW setup for 16B projects\nlinespw_dict = {0: [\"HI\", \"1.420405752GHz\"],\n 3: [\"OH1612\", \"1.612231GHz\"],\n 5: ... | python | new_file | 1 | 0 | mit | e01798c18faa59b2bedd8bd5e592a967512d94ef | e-koch/VLA_Lband,e-koch/VLA_Lband | 16B/spw_setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to make cbr archive out of jpegs\n\nThe cbr commic archive format is just jpegs compressed with rar.\nThis script will automate the process of creating one from a folder of\njpegs."
},
{
"role": "assistant",
"content":... | python | new_file | 1 | 0 | bsd-3-clause | ed9375ef9ed0c7d6b98c827db2db0f59369eedb6 | FreekKalter/linux-scripts,FreekKalter/linux-scripts,FreekKalter/linux-scripts,FreekKalter/linux-scripts | make-cbr.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Structure class using pandas DataFrame"
},
{
"role": "assistant",
"content": "import numpy as np\nfrom pandas import DataFrame\nfrom javelin.unitcell import UnitCell\n\n\nclass Structure(object):\n def __init__(self):\n ... | python | new_file | 3 | 5 | mit | f75d8e315a290bb1b5b78cacfbd52191abef0fdf | rosswhitfield/javelin | javelin/structure.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: feat: Add script to transform csv files in dict structure\n\nReads a csv file to transform in dict structure and then print it\nin a frienly format"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n'''\nTransform cs... | python | new_file | 1 | 2 | mit | 5be4fde44d7ce7cb7937f2dccdd097aa47faf0d7 | aguijarro/DataSciencePython | DataWrangling/process_csv.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add integration test for plotting utilities"
},
{
"role": "assistant",
"content": "\"\"\"Integration tests for plotting tools.\"\"\"\nfrom emdp import examples\nfrom emdp.gridworld import GridWorldPlotter\nfrom emdp import action... | python | new_file | 1 | 3 | mit | 982d57604c95ce7f3dd4a422cee82f5bec2b6553 | zafarali/emdp | tests/test_plotting.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test case for authors mapping"
},
{
"role": "assistant",
"content": "from os.path import dirname, join\nimport subprocess\nimport unittest\n\nfrom cvsgit.command.clone import Clone\nfrom cvsgit.git import Git\nfrom cvsgit.uti... | python | new_file | 1 | 1 | isc | 066c248ca31b13bcde7ace756c27cf4d8b46ef9d | ustuehler/git-cvs,ustuehler/git-cvs | tests/test_authors.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test written by darikg. Not actually executed, please confirm it."
},
{
"role": "assistant",
"content": "from pgcli.packages.tabulate import tabulate\nfrom textwrap import dedent\n\n\ndef test_dont_strip_leading_whitespace(... | python | new_file | 1 | 1 | bsd-3-clause | 74c67a6dc619d5da6dbff67c1679859c3ac26281 | dbcli/pgcli,koljonen/pgcli,dbcli/pgcli,darikg/pgcli,koljonen/pgcli,d33tah/pgcli,d33tah/pgcli,darikg/pgcli | tests/test_tabulate.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a python script to list all items\n\nSaves the item name, item path, and image path into \"items.json\""
},
{
"role": "assistant",
"content": "import os\nimport json\nimport re\n\n#############################################... | python | new_file | 1 | 4 | mit | dec17e4d8eb88610fbe81aeef84ea41b76b0e398 | McSimp/starbound-research | ListItems.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Write in gpio on raspberry"
},
{
"role": "assistant",
"content": "import RPi.GPIO as GPIO\nfrom time import sleep\n\nGPIO.setmode(GPIO.BCM)\n\nGPIO.setup(9, GPIO.OUT)\nGPIO.setup(11, GPIO.OUT)\n\nwhile 1:\n GPIO.output(9, True)\... | python | new_file | 1 | 0 | mit | 21bdda2f1a001dde6ed2aea34d3dccd7e63a5a37 | nich2000/ncs,nich2000/ncs,nich2000/ncs,nich2000/ncs,nich2000/ncs,nich2000/ncs,nich2000/ncs | src_py/writeGPIO.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a handy CLI test client"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport json, argparse\nimport httplib, subprocess, os\n\ndef execute(args):\n IP = args.agent.split(':')[0]\n if len(args.agent.spl... | python | new_file | 7 | 15 | apache-2.0 | 1adbe7b5974403ac58963679d2b945cf94c36826 | eaufavor/chrome-webpage-profiler-webui,eaufavor/chrome-webpage-profiler-webui,eaufavor/chrome-webpage-profiler-webui,eaufavor/chrome-webpage-profiler-webui | test/tests_and_pull.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nSUPPORT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'support'))\n\ndef support_file(*path_parts):\n return os.path.join(SUPPORT, *path_parts)\n\n```\n\nApply this change: Add utility function for executing test... | python | edit | 1 | 3 | bsd-2-clause | 83a2a04ec5b416e68588142ececb055d646a5449 | ezigman/nose2,ojengwa/nose2,leth/nose2,leth/nose2,little-dude/nose2,little-dude/nose2,ptthiem/nose2,ojengwa/nose2,ptthiem/nose2,ezigman/nose2 | nose2/tests/functional/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test case for EPCanvas."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\" Test case for Energy Profle Canvas.\n\"\"\"\n\nimport unittest\n\nfrom catplot.ep_components.ep_canvas im... | python | new_file | 1 | 1 | mit | fcbb6f845cce5c5a4bb996cf394ecbe2d33fdbfa | PytLab/catplot | tests/ep_canvas_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add module capable of creating a window when ran"
},
{
"role": "assistant",
"content": "import pygame\n\n\npygame.init()\n\n#-- SCREEN CHARACTERISTICS ------------------------->>>\nbackground_color = (255,255,255)\n(width, height... | python | new_file | 1 | 0 | mit | 437b9c92e59215b41464f54a4040bf1be9d41d2d | withtwoemms/pygame-explorations | create_window.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create xml of all jpg/png from list of files & directories."
},
{
"role": "assistant",
"content": "#! /usr/bin/python3\n\nimport sys\nimport argparse\nimport xml_utils as u\nimport datetime\nimport pdb\nimport os\nfrom argparse i... | python | new_file | 6 | 2 | mit | 5063bed38d64843387a681f72734b3cc1e9d6394 | hypraptive/bearid,hypraptive/bearid,hypraptive/bearid | tools/create_images_xml.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first sensor reader (SDS011) client script"
},
{
"role": "assistant",
"content": "import sys\nfrom sds011 import Sds011Reader\nfrom mqttsender import client\n\nif len(sys.argv) > 1:\n port = sys.argv[1]\nelse:\n port = ... | python | new_file | 1 | 0 | mit | 49ae354a13c33cceffe616b0906819257432318c | aapris/VekotinVerstas,aapris/VekotinVerstas | RpiAir/client_sds011.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add some random benchmark module\n\nThis module existed for some time in my local working dir. TBH, I forgot\nabout its precise purpose, but it doesn't really hurt to add it right\nnow, so whatever…"
},
{
"role": "assistant",
"co... | python | new_file | 1 | 1 | unlicense | fdd8aecba5aea0faae5c17062af33d61f70f0e70 | coldfix/black-magic | test/benchmark/decorate.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add USB VCP test script."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python2.7\nimport sys, serial, struct\nport = '/dev/ttyACM0'\nsp = serial.Serial(port, baudrate=115200, bytesize=serial.EIGHTBITS, parity=serial.PARIT... | python | new_file | 3 | 0 | mit | 0774f8d159e9f749b89416bbdf0fe394e8083f6a | kwagyeman/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv | tools/usbd_vcp_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Put in sanity-check for project scores."
},
{
"role": "assistant",
"content": "from toolshed.importer import create_project\nfrom toolshed.updater import update_projects_score\n\n\ndef test_oauth_rankings():\n flask_dance = cr... | python | new_file | 1 | 2 | mit | 946b693e52fca4e55f0d4dd9c07edd609f26297f | PythonClutch/python-clutch,PythonClutch/python-clutch,PythonClutch/python-clutch | tests/test_score.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for the depends() function."
},
{
"role": "assistant",
"content": "\"\"\"Using depends() to mark dependencies at runtime.\n\"\"\"\n\nimport pytest\n\n\ndef test_skip_depend_runtime(ctestdir):\n \"\"\"One test is skipp... | python | new_file | 3 | 1 | apache-2.0 | fe1b6725855a64898d385efe4e616dc04513b61d | RKrahl/pytest-dependency | tests/test_03_runtime.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Bring coverage for the converters module up to 100%."
},
{
"role": "assistant",
"content": "import unittest\n\nfrom beaker.converters import asbool, aslist\n\n\nclass AsBool(unittest.TestCase):\n def test_truth_str(self):\n ... | python | new_file | 1 | 2 | bsd-3-clause | 2b29bd4c1a15136a066a61e02920721ef8117d23 | lann/python-beaker | tests/test_converters.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for our main public API so we can start to re-impliment the parser"
},
{
"role": "assistant",
"content": "from xml.etree import ElementTree\n\nfrom junit2htmlreport import parser as j2h\n\n\ndef test_public_api():\... | python | new_file | 3 | 1 | mit | 1a41aa1088965e0b30bd3b53ac400cd6a0f8ce69 | inorton/junit2html | tests/test_parser_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a simulator for measuring perfect deduplication"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport gzip\nimport itertools\nimport timer\nimport sys\nimport utils\n\n\n# A set of files already in the storage... | python | new_file | 4 | 0 | apache-2.0 | 9862a89b6eab4b8c1b87f338ee71e683ca387765 | sjakthol/dedup-simulator,sjakthol/dedup-simulator | simulator-perfect.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for utils module"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\n colorful\n ~~~~~~~~\n\n Terminal string styling done right, in Python.\n\n :copyright: (c) 2017 by Timo Furrer <<EM... | python | new_file | 1 | 1 | mit | f670fabfecb6dbcf2ce5bcc3e312d61064463820 | timofurrer/colorful | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add generic settings-related GUI util module"
},
{
"role": "assistant",
"content": "# gui.py\r\n# Generic GUI crap\r\nfrom gi.repository import Gtk\r\n\r\nclass CheckEntry(Gtk.Box):\r\n def __init__(self, labeltxt, togglef = N... | python | new_file | 1 | 2 | apache-2.0 | 95652f83865913dd6989374faa3ac2be8d50d981 | twoodford/nxt-timelapse,twoodford/nxt-timelapse,twoodford/nxt-timelapse | buildlapse/gui.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add journal script (needs next version of ftw pinned), remove conftest.py"
},
{
"role": "assistant",
"content": "from ftw import ruleset, logchecker, testrunner\nimport pytest\nimport sys\nimport re\nimport os\nimport ConfigParse... | python | new_file | 5 | 6 | apache-2.0 | f88b7f0b70205e9ac6f41f8acffdf96e8b263e9e | csjperon/OWASP-CRS-regressions,SpiderLabs/OWASP-CRS-regressions | CRS_Tests_Journal.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new unit tests for reading alternate file map."
},
{
"role": "assistant",
"content": "import os\nimport re\nimport sys\nimport pytest\nfrom mock import Mock, mock_open, patch\napp_path = os.path.dirname(os.path.abspath(__file... | python | new_file | 13 | 1 | mit | 629f4b2361d9fc7a021b8fb5c302f00a6240e96c | eigenholser/jpeg_rename,eigenholser/jpeg_rename,eigenholser/jpeg_rename,eigenholser/jpeg_rename | tests/test_filemap_read_alt_file_map.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add file for running fits with OpenMPI"
},
{
"role": "assistant",
"content": "\"\"\"\nScript to run all redshift fits in parallel with OpenMPI\n\nUsage: \n\n mpiexec -n 10 python -m mpi4py.futures $GRIZLICODE/grizli/pipeline/... | python | new_file | 4 | 4 | mit | 62009e7ea13360a71a5294d73411f4b802610aae | albertfxwang/grizli | grizli/pipeline/run_MPI.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for user frontend forms\n\nIssue #479"
},
{
"role": "assistant",
"content": "import pytest\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.http import H... | python | new_file | 3 | 1 | apache-2.0 | cc543e52b82761473b0a6dfd47f7451b2a5411f8 | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | app/tests/cases_tests/test_forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add functionality of importing hackerone reports add-hackeroneparcer-359"
},
{
"role": "assistant",
"content": "import json\nimport hashlib\nfrom urllib.parse import urlparse\nfrom dojo.models import Endpoint, Finding\n\n__author... | python | new_file | 4 | 10 | bsd-3-clause | 76a4b872101a41eddf583866d675aebeeb815f59 | rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo,rackerlabs/django-DefectDojo | dojo/tools/h1/parser.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Copy over test from the PR into its own module"
},
{
"role": "assistant",
"content": "def test_generate_copy_without_render_extensions(self):\n generate.generate_files(\n context={\n 'cookiecutter': {\n ... | python | new_file | 6 | 2 | bsd-3-clause | 3e06c319b08bbb3e1cb2691a7db8c5cd1675c241 | cguardia/cookiecutter,christabor/cookiecutter,michaeljoseph/cookiecutter,dajose/cookiecutter,ramiroluz/cookiecutter,vintasoftware/cookiecutter,luzfcb/cookiecutter,Vauxoo/cookiecutter,0k/cookiecutter,venumech/cookiecutter,vintasoftware/cookiecutter,agconti/cookiecutter,tylerdave/cookiecutter,cguardia/cookiecutter,cichm/... | tests/test_generate_copy_without_render.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add resnet training scheme (draft)"
},
{
"role": "assistant",
"content": "\n'''Trains a simple convnet on the MNIST dataset.\n\nGets to 99.25% test accuracy after 12 epochs\n(there is still a lot of margin for parameter tuning).\... | python | new_file | 7 | 0 | mit | c77c4e0bf8d9fe12b7f11ee1fb0827e259c6727c | johnmartinsson/bird-species-classification,johnmartinsson/bird-species-classification | resnet_sound.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test to crack the xor obfuscation crackme"
},
{
"role": "assistant",
"content": "\nimport smt2lib\nfrom triton import *\n\n# PoC. Doesn't work yet\n# $ triton ./examples/crackme_xor_obfu.py ./samples/crackmes/crackme_xor_obfu a\n... | python | new_file | 6 | 4 | apache-2.0 | 862611ce97a45f5cbc78cae298a7f4936454ad19 | JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton | examples/crackme_xor_obfu.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Create script that print analysis_files (rep per rep)"
},
{
"role": "assistant",
"content": "import synthetic_data_experiments as sde\n\nimport logging\n\nif __name__ == \"__main__\":\n args = sde.get_integrous_arguments_value... | python | new_file | 7 | 0 | mit | 8baf19e38ea7c51679d2e5ed32e8519a3290f20c | chagaz/sfan,chagaz/sfan,chagaz/sfan,chagaz/sfan,chagaz/sfan | code/print_analysis_files.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: [DEV] Add a script to dump DB in bib file"
},
{
"role": "assistant",
"content": "# !/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"Dump SQL database into bibtex file.\"\"\"\n\nimport sys\nimport bibtexparser\nfrom bibtexp... | python | new_file | 9 | 3 | mit | e425efee30dacb16b5e3f677ffea8ab39c66c6ac | frapac/bibtex-browser,frapac/bibtex-browser,frapac/bibtex-browser | dump_db.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Fibonacci script to Python"
},
{
"role": "assistant",
"content": "phi = (1 + 5**0.5) / 2\n\ndef F(n):\n return int(round((phi**n - (1-phi)**n) / 5**0.5))\ndef fib(n):\n a = 0\n fibs = []\n if n > 0:\n while... | python | new_file | 1 | 5 | mit | f5172547163660cacee8c6e8dda157322ac7e0a1 | Strikingwolf/Messing-With-Python | fib/fib.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to generate plate barcodes for the Zebra printer"
},
{
"role": "assistant",
"content": "import argparse\n\ndef makeBarcode(label):\n print(\"^XA\") #start of label\n print(\"^DFFORMAT^FS\") #download and store fo... | python | new_file | 1 | 1 | apache-2.0 | a817600e1b30544a0244e76c414244b5182cdf08 | jgruselius/misc,jgruselius/misc,jgruselius/misc,jgruselius/misc,jgruselius/misc | Python/makeBarcode.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create PaperPass class. It contains outputjson method."
},
{
"role": "assistant",
"content": "import json\n\nclass PaperPass:\n\n # class var\n outline = {}\n\n def __init__(self, outline):\n self.outline = outlin... | python | new_file | 1 | 1 | mit | 3e147eba049c51c3b1c7c7278f48e40ef5b1263f | lucaskotw/paperpass | paperpass.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create the Home Page > Create the Home Page View"
},
{
"role": "assistant",
"content": "from django.views.generic.base import TemplateView\n\nclass HomePage(TemplateView):\n \"\"\"\n Because our needs are so simple, all we ... | python | new_file | 1 | 0 | mit | 6fc0c3884c38448956273d99a57e0c758ecbc658 | tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django | crmapp/marketing/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add helper for log retrieval"
},
{
"role": "assistant",
"content": "\"\"\" provide functions for history handling.\n\tnote that history stuff is only possible\n\tif maki is not running remote.\n\"\"\"\nimport os\nfrom ..com impor... | python | new_file | 6 | 8 | bsd-2-clause | 84b1d56be22320a21bc4a0b100bd1ac488b72711 | sushi-irc/tekka | tekka/helper/history.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Build a connection model system which will help with generating new Fiascos based on a playset and a set of characters."
},
{
"role": "assistant",
"content": "from . import model\n\nclass Connection(object):\n def __init__(sel... | python | new_file | 3 | 2 | mit | 5e31b9bc0817047c1e63f69ad38a4a9e9dbd29ec | RemyPorter/FiascoGenerator | fiasco/generator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for checking installed CUDA version."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n\"\"\"\nSimple script for checking installed CUDA version.\n\"\"\"\n\nimport ctypes\n\ntry:\n _libcudart = ctypes.... | python | new_file | 4 | 0 | bsd-3-clause | f6fcd5324993a6804b8ec5b17e63b8235ca4b730 | cerrno/neurokernel | check_cuda_version.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example script for python -m recipy usage"
},
{
"role": "assistant",
"content": "\"\"\"\nUsage: python -m recipy example_script3.py OUTPUT.npy\n\"\"\"\n\nfrom __future__ import print_function\nimport sys\n\nimport numpy\n\nif... | python | new_file | 1 | 0 | apache-2.0 | 28e9129a71cac0ab60071d6e2a6bd258312703a8 | github4ry/recipy,musically-ut/recipy,github4ry/recipy,MBARIMike/recipy,MichielCottaar/recipy,MBARIMike/recipy,recipy/recipy,recipy/recipy,MichielCottaar/recipy,musically-ut/recipy | example_script3.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test that childless pages get built, even if paginated"
},
{
"role": "assistant",
"content": "\"\"\"Test for issue `#410`_.\n\nThis tests for at least one of the bugs reported in `#410`_, namely\n that paginated pages were not be... | python | new_file | 1 | 2 | bsd-3-clause | c8bb2fdf3a3e48945c2bed100c1856c14a75e8f7 | lektor/lektor,lektor/lektor,lektor/lektor,lektor/lektor | tests/test_issue_410.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility for looking up grades for files in a directory."
},
{
"role": "assistant",
"content": "from __future__ import print_function\nimport os\nimport sys\nfrom movie_util import filenames_to_search_strings, print_movies\nfr... | python | new_file | 1 | 4 | mit | 3316b3fdde76125515e056abf403f509a6b7c454 | EmilStenstrom/nephele | lookup_from_filesystem.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create module for points interpolation using B-spline of 2nd degree."
},
{
"role": "assistant",
"content": "''' Module provides functions for points interpolation using b-splines of 2nd order '''\n\nimport numpy as np\nfrom matpl... | python | new_file | 3 | 3 | mit | 46c241e7cfae717d5dfd5352846c2568079280a4 | petroolg/robo-spline | b_spline.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement non-deterministic turing machine in Python"
},
{
"role": "assistant",
"content": "# Non-Deterministic Turing Machine Simulator\n\nclass Queue():\n def __init__(self):\n self.queue = []\n\n def enqueue(self,... | python | new_file | 1 | 10 | mit | d59103daa62897996b3585c2a826b092caf95a76 | yedhukrishnan/turing-machine,yedhukrishnan/turing-machine | non_deterministic.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic script to get roza durations for assigned parameters."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nfrom rajab_roza import RajabRoza\n\nlat = 51.0 + 32.0/60.0\nlng = -22.0/60.0\nstart_year = 1435\nend_... | python | new_file | 1 | 0 | mit | e9c0aaf5434f30d66e9b3827261c8576e16e7083 | mygulamali/rajab_roza | get_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a Python script which downloads only the latest Linux snapshots (derived from other scripts here)"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport os, tarfile, hashlib, re, shutil, sys\nfrom snapshot imp... | python | new_file | 15 | 3 | apache-2.0 | 62bef762a3d999e1d9f3b551320e22619d83b7ca | pshc/rust,TheNeikos/rust,AerialX/rust,jroesch/rust,reem/rust,rprichard/rust,mahkoh/rust,LeoTestard/rust,jroesch/rust,philyoon/rust,P1start/rust,P1start/rust,pythonesque/rust,zachwick/rust,ebfull/rust,mvdnes/rust,pshc/rust,aepsil0n/rust,robertg/rust,carols10cents/rust,emk/rust,sarojaba/rust-doc-korean,rohitjoshi/rust,se... | src/etc/latest-unix-snaps.py | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add creation tests for Terminal"
},
{
"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\"\"\"\nfrom unittest import TestCase\nf... | python | new_file | 1 | 1 | mit | 9bffaf3054960b88daec22e1206fe15e345716fc | PatrikValkovic/grammpy | tests/terminal_tests/TerminalCreationTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script that profiles basic test run"
},
{
"role": "assistant",
"content": "from pyresttest import resttest\nfrom pyresttest.benchmarks import Benchmark\nfrom pyresttest.binding import Context\nfrom pyresttest.contenthandling ... | python | new_file | 7 | 0 | apache-2.0 | 934cafa73a15705c4d7c33733c61f8c272b9971e | svanoort/pyresttest,suvarnaraju/pyresttest,suvarnaraju/pyresttest,alazaro/pyresttest,satish-suradkar/pyresttest,MorrisJobke/pyresttest,netjunki/pyresttest,wirewit/pyresttest,janusnic/pyresttest,TimYi/pyresttest,wirewit/pyresttest,MorrisJobke/pyresttest,TimYi/pyresttest,sunyanhui/pyresttest,netjunki/pyresttest,janusnic/... | profile_basic_test.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add init file to container/experimental directory to recognize as a python module.\n\nPiperOrigin-RevId: 447585056"
},
{
"role": "assistant",
"content": "# Copyright 2022 The Kubeflow Authors. All Rights Reserved.\n#\n# Licensed ... | python | new_file | 1 | 0 | apache-2.0 | 8c20a2c570aac422106e866d63a8c1e40cc2a98f | kubeflow/pipelines,kubeflow/pipelines,kubeflow/pipelines,kubeflow/pipelines,kubeflow/pipelines,kubeflow/pipelines | components/google-cloud/google_cloud_pipeline_components/container/experimental/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a REST API for GO"
},
{
"role": "assistant",
"content": "# https://www.ebi.ac.uk/QuickGO/WebServices.html\n\nimport os\nimport csv\n\nimport restapi\n\nclass GORESTAPI(restapi.RESTAPI):\n\n def __init__(self, download_fold... | python | new_file | 3 | 2 | isc | e46f171f87d756bcd2f25dbc5d5a56422e1bcbd8 | konrad/kufpybio | kufpybio/gorestapi.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test the pipeline code for the RNA-seq pipeline"
},
{
"role": "assistant",
"content": "\"\"\"\n.. Copyright 2017 EMBL-European Bioinformatics Institute\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n y... | python | new_file | 1 | 2 | apache-2.0 | 90a0ed45ed56467f3083b262708f81434aa9aaa9 | Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq | tests/test_pipeline_rnaseq.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new illustrative test: monkeypatching stdout"
},
{
"role": "assistant",
"content": "import sys\nimport io\n\nimport hacks\n\n\ndef test_stdout_monkeypatching():\n \n # Let's first patch stdout manually:\n real_stdout... | python | new_file | 1 | 1 | mit | 0125d6a8617d6ebc95c74f923ce3107ec538a297 | t184256/hacks | test_hacks_monkeypatching.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test for complicated comparisons"
},
{
"role": "assistant",
"content": "from itertools import combinations\nfrom unittest import TestCase\n\nfrom ordering import Ordering\n\n\nclass TestComparisons(TestCase):\n def se... | python | new_file | 1 | 2 | mit | 2fa1e73c44b03ab81e72d14863fd80cff010f0d7 | madman-bob/python-order-maintenance | tests/test_comparisons.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unittests for the commonsdownloader module\n\nAdd a unittest module to test the methods in the commonsdownloader module.\nAdd test for method clean_up_filename()"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n#... | python | new_file | 1 | 2 | mit | b9093b09b1bfa1e7bb50a41d03eab61c3a3d9fc5 | Commonists/CommonsDownloader | test/test_commonsdowloader.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution for problem 29"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\npower_list = set()\n\nfor a in range(2, 101):\n for b in range(2, 101):\n power_list.add(a ** b)\n\nprint(len(power_list))\n"
}
] | python | new_file | 1 | 0 | mit | 5fa0ad818cbb1afd17d819ec6649430d16726f7c | cifvts/PyEuler | euler029.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test script stub for testing the adjacency reader"
},
{
"role": "assistant",
"content": "\"\"\"\n.. Copyright 2017 EMBL-European Bioinformatics Institute\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n ... | python | new_file | 3 | 1 | apache-2.0 | 66c5e80afc4f520ddc239e6f458a4a2e2142fab1 | Multiscale-Genomics/mg-dm-api,Multiscale-Genomics/mg-dm-api | tests/test_hdf5_adjacency.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: WORK WORK WOKR ROWK KROW"
},
{
"role": "assistant",
"content": "import curses\n# -*- coding: utf-8 -*-\n\ndogdance1=[\n' ▄','▄', '▄', #3\n'▄▄▄▄', '▄', '▄', #6\n'▄\\n', ' ', ' ',\n' ', '▄', '▄\\n',#12\n' ', ' ' , '▄',#15\... | python | new_file | 1 | 2 | mit | 11f2470adb5b52e32e08a041bf868591e858e4ed | David-OC/dancingdog,David-OC/dancingdog | doggunk4.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement a Pop class to unapply patches"
},
{
"role": "assistant",
"content": "# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:\n\n# python-quilt - A Python implementation of the quilt patch system\n#\n# Copyright (C) 2012 Björn R... | python | new_file | null | null | mit | 368ade3641c017d534bb42b8c448a9bbdbb39631 | vadmium/python-quilt,bjoernricks/python-quilt | quilt/pop.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Create basic user agent spoofer with Mechanize"
},
{
"role": "assistant",
"content": "#!/usr/bin/env\nimport mechanize\n\n\ndef test_agent(url, user_agent):\n browser = mechanize.Browser()\n browser.addheaders = user_agent\... | python | new_file | 2 | 1 | mit | 8656688c82334dcb1bf064687bc05b1ea9b6a9d0 | jwarren116/network-tools-deux | mechanize.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test script for existing samples"
},
{
"role": "assistant",
"content": "#!\\usr\\bin\\env python\n\n\"\"\"A test script to parse the existing samples and convert them to JSON.\n\nNot all of the examples currently work.\n\nExa... | python | new_file | 6 | 7 | bsd-3-clause | 23ee1e71fd7811789c5425b6fc2cfcde2057b57f | CybOXProject/python-cybox | examples/convert_samples.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test Robot interactions with wait_start"
},
{
"role": "assistant",
"content": "import time\nimport unittest\nfrom unittest import mock\n\nfrom robot import game_specific\nfrom robot.board import Board\nfrom robot.robot import Rob... | python | new_file | 1 | 1 | mit | 74a624b57e1f5ccc0f62665d3ff52eef38ca9192 | sourcebots/robot-api,sourcebots/robot-api | tests/test_robot.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add structure for query harness"
},
{
"role": "assistant",
"content": "import argparse\nimport datetime\nfrom os import getcwd\nfrom os.path import isdir, exists\nfrom project import corpus, knn_corpus, lda_corpus, word2vec_corpu... | python | new_file | 2 | 3 | mit | 6b3424f3cc33574c825b7c41d9d848e9d6b002a1 | PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project | src/run_similarity.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: tests: Add tests for TaskWikiChooseProject command"
},
{
"role": "assistant",
"content": "from tests.base import IntegrationTest\nfrom time import sleep\n\n\nclass TestChooseProject(IntegrationTest):\n\n viminput = \"\"\"\n ... | python | new_file | null | null | mit | a5f380db22e20265b4d543827f052300b2fb3fa4 | Spirotot/taskwiki,phha/taskwiki | tests/test_choose.py | rejected_code_smell | Internal duplication: ~125% of the file is inside repeated 12+ line blocks | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.