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 initial tests for bbs_benchmarks.py"
},
{
"role": "assistant",
"content": "\"\"\"Tests of time-series prediction benchmarking functions\"\"\"\n\nfrom pandas import DataFrame\nfrom pandas.util.testing import assert_frame_equal... | python | new_file | 14 | 1 | mit | 4e1dd595631949e7c4ccea62e58e60f7736ecefd | davharris/bbs-forecasting,davharris/bbs-forecasting,davharris/bbs-forecasting | test/test_benchmarks.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Write python code for the following: Update tickets to drop old_event_id"
},
{
"role": "assistant",
"content": "\"\"\"empty message\n\nRevision ID: 0033 drop tickets.old_event_id\nRevises: 0032 orders,tickets,ticket_types\nCreate Date: 2019-09-25 01:01:37.092066\n\n... | python | new_file | 1 | 1 | mit | ef38a5fea94b6e824b8df87fa8a3370767151317 | NewAcropolis/api,NewAcropolis/api,NewAcropolis/api | migrations/versions/0033.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Send VOEvents by direct use of the Comet module.\n\nThis works, but a more 'decoupled' approach via command line might be\nmore sensible - more robust to internal Comet interface changes,\nbetter direct testing against manual command line en... | python | new_file | 5 | 5 | bsd-2-clause | c732496e054956898f414cf90b15b1fcf9b45b4f | timstaley/pysovo | pysovo/comms/comet.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add small script to test micro:bit accelerometer"
},
{
"role": "assistant",
"content": "from microbit import accelerometer as acc, sleep\n\ntx = 10\nty = 10\ntz = 40\nx = y = z = 0\n\nwhile True:\n nx, ny, nz = acc.get_values(... | python | new_file | 1 | 0 | mit | 7b6975e8bfa35ca211f407db1b9399bc8bb766da | SpotlightKid/microbit-worldtour-monifa | test_accelerometer.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Break off helper functions from dakota.py"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\n\"\"\"Helper functions for processing Dakota parameter and results files.\"\"\"\n\nimport re\n\n\ndef get_response_descripto... | python | new_file | 3 | 5 | mit | 4f246ae37b060e677c3c3cd7f6dcdc2f21337cf6 | csdms/dakota,csdms/dakota | dakota/dakota_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add demo Fernet encryption demo"
},
{
"role": "assistant",
"content": "from cryptography.fernet import Fernet\nimport sys\n\nmsg = sys.argv[1].encode(\"utf-8\")\nkey = Fernet.generate_key()\nprint(\"Key: \" + key.decode(\"ascii\"... | python | new_file | 1 | 0 | mit | 2e53b59e2466e121f27236c12b21f731ac18745c | iluxonchik/python-general-repo | scripts/crypto/cryptography_demo.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add snippet for python -> find if program is installed in system"
},
{
"role": "assistant",
"content": "def which(program):\n \"\"\"From:\n http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python\"... | python | new_file | 1 | 5 | mit | 761ae0d762324ef1eba93ab1b9cf2cf28d2fa30e | thescouser89/snippets,thescouser89/snippets,thescouser89/snippets,thescouser89/snippets,thescouser89/snippets,thescouser89/snippets | python/snippets/find_if_program_installed.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility for sending commands for testing"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport sys\nimport getmetric\n\n\ndef main():\n output = getmetric.sshcmd(sys.argv[1], sys.argv[2])\n print output... | python | new_file | 2 | 1 | bsd-3-clause | c8b8f7897bd4eb26f65480f90e0f6d71394f8971 | ekollof/pymetrics | sendcmd.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple initial command line interface."
},
{
"role": "assistant",
"content": "import click\nimport os\nfrom pathlib import Path\nimport logging\n\nfrom eodatasets.package import package_ortho, package_nbar, package_raw, get_d... | python | new_file | 1 | 5 | apache-2.0 | 1a8fea9c752845247c592f0a0bd6ffd8e8f259e2 | jeremyh/eo-datasets,GeoscienceAustralia/eo-datasets,GeoscienceAustralia/eo-datasets,jeremyh/eo-datasets | eodatasets/__main__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial; most methods not implemented"
},
{
"role": "assistant",
"content": "\"\"\"Create a new folder of images that consist of only the cell chamber\nName of save folder is specified in commandline\"\"\"\nimport sys\nimport... | python | new_file | 4 | 3 | mit | 4b58d8153bcf7612a2d3ab360df941089e45ed3e | justinjoh/get-ROI | trim.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add prebuilt libraries deployment helper script."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport os\nimport shutil\n\nscript_dir = os.path.dirname(os.path.realpath(__file__))\nchromium_dir = os.path.abspath... | python | new_file | 2 | 3 | mit | d24da0e339a0470b94fe79016a5343755640ba0f | cybertk/libchromium,cybertk/libchromium,cybertk/libchromium,cybertk/libchromium | deploy_prebuilt.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for desired support of class based routers"
},
{
"role": "assistant",
"content": "\"\"\"tests/test_decorators.py.\n\nTests that class based hug routes interact as expected\n\nCopyright (C) 2015 Timothy Edmund Crosley\n\n... | python | new_file | 1 | 1 | mit | 815a9c802440375cc283179c15d3b1a371863418 | timothycrosley/hug,timothycrosley/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug | tests/test_class_based.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add deployment test to verify job resource config."
},
{
"role": "assistant",
"content": "# tile-generator\n#\n# Copyright (c) 2015-Present Pivotal Software, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Vers... | python | new_file | 6 | 3 | apache-2.0 | 23a5417e2f870a88d88aaf0683d57cc4177f020c | cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator | ci/deployment-tests/app5_deploymenttest.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example with no minimum."
},
{
"role": "assistant",
"content": "from simplex.algorithm import NelderMeadSimplex\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom matplotlib import rc\nrc('font',**{'family':'sans-... | python | new_file | 1 | 1 | mit | c97d77f058c73e5c8da4c108681870ff8f0abd71 | kubkon/simplex | examples/no-minimum.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test for smooth_l1."
},
{
"role": "assistant",
"content": "import keras_retinanet.losses\nimport keras\n\nimport numpy as np\n\nimport pytest\n\ndef test_smooth_l1():\n regression = np.array([\n [\n ... | python | new_file | 1 | 1 | apache-2.0 | e3d90957c4fa78a85bb250a6ec82eff43ec5be7d | delftrobotics/keras-retinanet | tests/test_losses.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: :white_check_mark: Add extra tests for edge cases that don't belong on docs"
},
{
"role": "assistant",
"content": "from typing import Optional\n\nimport typer\nfrom typer.main import solve_typer_info_defaults, solve_typer_info_he... | python | new_file | 1 | 2 | mit | ea0f2a6566ed6d4770d6f5f5b59550c54579a6b8 | tiangolo/typer,tiangolo/typer | tests/test_others.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create WSGI file for deployment"
},
{
"role": "assistant",
"content": "import os\nimport sys\n\nhere = os.path.dirname(os.path.abspath(__file__))\nsys.path.insert(0, os.path.join(here, 'demonstrare'))\nconfig = os.path.join(here,... | python | new_file | 1 | 0 | mit | 2e570988c4be84a6bdbe7bc252feb553d59c4ef2 | josuemontano/pyramid-angularjs-starter,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/API-platform,josuemontano/API-platform,josuemontano/api-starter,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform | wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a plugin that toggles mixed cap letters to underscore styles."
},
{
"role": "assistant",
"content": "import sublime, sublime_plugin\nimport re\n\ndef toggle(pattern, word, transformer):\n for match in pattern.finditer(word):... | python | new_file | 3 | 5 | mit | 01dbfc5617c094913832302383410f19a2cde088 | shaochuan/sublime-plugins | toggle_cap_letters.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add xfail test for deprojectivization SBD bug"
},
{
"role": "assistant",
"content": "'''Test that deprojectivization doesn't mess up sentence boundaries.'''\nimport pytest\nfrom ...syntax.nonproj import projectivize, deprojectivi... | python | new_file | 1 | 1 | mit | 6cd920e088d0a755644e380807db61a472a03eae | honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,honnibal/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy | spacy/tests/regression/test_issue2772.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [Test] Add test cases for DrawingSystem"
},
{
"role": "assistant",
"content": "import unittest\nfrom xie.graphics.drawing import DrawingSystem\nfrom xie.graphics.canvas import EncodedTextCanvasController\n\nfrom xie.graphics.fact... | python | new_file | 1 | 1 | apache-2.0 | 4b2d23abbb5ef3267eae2b53bf70dfa9c62c868b | xrloong/Xie | tests/test/xie/graphics/drawing.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for getting pf label counters"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"igcollect - FreeBSD Packet Filter\n\nCopyright (c) 2018 InnoGames GmbH\n\"\"\"\n\nfrom __future__ import print_function\... | python | new_file | 1 | 3 | mit | 27f162e8eafbc456c63043bd48bf6f09cc6ab318 | innogames/igcollect | igcollect/pf_labels.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration to set region on existing NodeSettings"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.11 on 2018-04-30 18:34\nfrom __future__ import unicode_literals\n\nimport logging\n\n... | python | new_file | 3 | 4 | apache-2.0 | 05454d3a00b85ab21a16eb324546be102d85f778 | brianjgeiger/osf.io,mfraezz/osf.io,caseyrollins/osf.io,cslzchen/osf.io,CenterForOpenScience/osf.io,sloria/osf.io,HalcyonChimera/osf.io,pattisdr/osf.io,brianjgeiger/osf.io,aaxelb/osf.io,felliott/osf.io,icereval/osf.io,sloria/osf.io,adlius/osf.io,Johnetordoff/osf.io,sloria/osf.io,erinspace/osf.io,felliott/osf.io,adlius/o... | osf/migrations/0103_set_osf_storage_node_settings_region.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\nfrom ggrc.models import Relationship\nfrom ggrc.converters import errors\nfrom integration.ggrc.converters import TestCase\n... | python | edit | 1 | 2 | apache-2.0 | 97c25703904a0f2508238d4268259692f9e7a665 | edofic/ggrc-core,josthkko/ggrc-core,andrei-karalionak/ggrc-core,kr41/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,edofi... | test/integration/ggrc/converters/test_import_automappings.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [feaLib] Add an ast test for the previous commit"
},
{
"role": "assistant",
"content": "from __future__ import print_function, division, absolute_import\nfrom __future__ import unicode_literals\nfrom fontTools.feaLib import ast\n... | python | new_file | 1 | 2 | mit | b68596cc80ac13544744004338602245d17bf6b2 | googlefonts/fonttools,fonttools/fonttools | Tests/feaLib/ast_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add db migration for adding email address field in Account Table"
},
{
"role": "assistant",
"content": "\"\"\"Add email address in Account Table for sending mailers.\n\nRevision ID: 8cf43589ca8b\nRevises: 3828e380de20\nCreate Dat... | python | new_file | 1 | 1 | apache-2.0 | 513d8a37d612253b87f0d30d3cab42ba25e98dcf | stackArmor/security_monkey,stackArmor/security_monkey,stackArmor/security_monkey,stackArmor/security_monkey,stackArmor/security_monkey | migrations/versions/8cf43589ca8b_add_email_address_in_account_table.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility script to create initial agasc_supplement.h5"
},
{
"role": "assistant",
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\"\"\"\nCreate the initial version of agasc_supplement.h5.\n\nThis... | python | new_file | 1 | 0 | bsd-3-clause | b61ac879fb2869acf84bb30386b08789e618aed0 | sot/mica,sot/mica | utilities/make_agasc_supplement.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script that define java source code standard header"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python2\n# coding:utf-8\nimport os\nimport re\nimport shutil\n\nJQM_ROOT_DIR = os.path.abspath(os.path.dirname(__file__... | python | new_file | 1 | 0 | apache-2.0 | 59097ff3523926d70ec267bb96e015232d6d74c0 | enioka/jqm,enioka/jqm,enioka/jqm,enioka/jqm,enioka/jqm | jqm-all/checkHeader.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create manage.py command to create an application"
},
{
"role": "assistant",
"content": "from django.core.management.base import BaseCommand, CommandError\nfrom oauth2_provider.models import Application\nfrom django.contrib.auth.... | python | new_file | 3 | 4 | mit | c967c86e9dd4ae6ec85049a062cd3155a905268a | PhilipGarnero/django-rest-framework-social-oauth2 | rest_framework_social_oauth2/management/commands/createapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test script for blake2b_256 against CPython 3.6 hashlib"
},
{
"role": "assistant",
"content": "\n\"\"\"\nThis script checks compatibility of crypto.blake2b_256 against hashlib.blake2b in CPython 3.6.\n\"\"\"\n\nimport hashlib... | python | new_file | 1 | 2 | bsd-3-clause | 05ce8e0ff96b0d283cedfc0058a06234bb4d0630 | edgewood/borg,RonnyPfannschmidt/borg,raxenak/borg,edgimar/borg,RonnyPfannschmidt/borg,edgewood/borg,RonnyPfannschmidt/borg,edgewood/borg,raxenak/borg,RonnyPfannschmidt/borg,edgimar/borg,edgimar/borg,RonnyPfannschmidt/borg,edgewood/borg,raxenak/borg,raxenak/borg,edgimar/borg | scripts/py36-blake2.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial matploblib average plots for wind speed."
},
{
"role": "assistant",
"content": "import csv\nimport matplotlib.pyplot as plt\nfrom datetime import datetime\nimport sys\nimport numpy as np\nimport pandas as pd \nfrom pa... | python | new_file | 7 | 6 | mit | ed1a2c227ca7e83418d5741116e34962ce9c0039 | avishek1013/windly | data/visualizations.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to subsample signals"
},
{
"role": "assistant",
"content": "\"\"\"\nSubsample the signals files to demultipliate the number of\ntraining samples.\n\nJust indicate the input and output directory.\n\nUse python 3 (but sh... | python | new_file | 3 | 6 | apache-2.0 | 52d4e1e3b962963de9c17c12106bdf957434a62e | Conchylicultor/DeepLearningOnGraph,Conchylicultor/DeepLearningOnGraph,Conchylicultor/DeepLearningOnGraph | subsample_signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Include test to see if the package can be imported and used."
},
{
"role": "assistant",
"content": "from matplotlib import pyplot as plt\nfrom greengraph import Greengraph\n\nmygraph=Greengraph('New York','Chicago')\ndata = mygra... | python | new_file | 1 | 0 | apache-2.0 | 1b4962c62e9fad96fa1282823bd3adac4030abb4 | paulsbrookes/greengraph | ny_to_chi_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example in Python for read from RS485"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n#\n# Python sample application that reads from the raspicomm's RS-485 Port\n#\n# Thanks to Acmesystems, program edited b... | python | new_file | 1 | 0 | cc0-1.0 | 4cb361b8d6402392c5b4922f2f6793eb38c82c8e | hardelettrosoft/project2,hardelettrosoft/project2,giovannimanzoni/project2,giovannimanzoni/project2,hardelettrosoft/project2,giovannimanzoni/project2 | test/RS485/readFromRS485.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test Mozilla Marketplace with simple python\n\nSearch Text \"Hello\""
},
{
"role": "assistant",
"content": "from selenium import webdriver\n\n\n\ndriver = webdriver.Firefox()\ndriver.get(\"https://marketplace-dev.allizom.org/\")\... | python | new_file | 2 | 0 | mit | a93f81b18262b1e29d11bd101691162b2b5face3 | bishnucit/Python-Preludes | MozillaPage1.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add depth first search for graphs"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# edX Intro to Computational Thinking and Data Science\n# Graphs - Depth First Search to find shortest path lecture code\n\nimport ... | python | new_file | 1 | 9 | mit | 58a9c449c59767129fe75f6efecb44eb3fa6f3e4 | HKuz/Test_Code | Graphs/depthFirstSearch.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial unit tests for SortedSet."
},
{
"role": "assistant",
"content": "# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport pytest\n\nfrom clique.sorted_set imp... | python | new_file | 2 | 1 | apache-2.0 | fd85068b56d4a01bd5ade5773ae1299f0ac1b5e8 | 4degrees/clique | test/unit/test_sorted_set.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add dummy script to benchmark operation times()"
},
{
"role": "assistant",
"content": "import time\nimport math\nimport matplotlib.pyplot as plt\n\nfrom dgim.dgim import Dgim\nfrom dgim.utils import generate_random_stream\n\ndef ... | python | new_file | 2 | 4 | bsd-3-clause | 988a55aa42e04c57dc58b04d631c30a899bba664 | simondolle/dgim,simondolle/dgim | bench_runtime.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script for simple summary query testing\n\nSigned-off-by: Jan Losinski <<EMAIL>>"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\nimport traffic\nimport argparse\nfrom datetime import datetime, timedelta\n\nparse... | python | new_file | 2 | 0 | bsd-3-clause | 21b25852f7b1b9457c5d233c9b5ef14d2a33a9a5 | agdsn/traffic-service-client,agdsn/traffic-service-client | src/test_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the Licens... | python | edit | 1 | 1 | apache-2.0 | ec14651411d3489e85cabc323bb6fa90eeb7041a | freedomtan/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,te... | third_party/gpus/compress_find_cuda_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for has_message_body helper function."
},
{
"role": "assistant",
"content": "from sanic.helpers import has_message_body\n\n\ndef test_has_message_body():\n tests = (\n (100, False),\n (102, False),\n ... | python | new_file | 1 | 2 | mit | cf439f01f8370971799182abc0e0c635037d2b2f | yunstanford/sanic,lixxu/sanic,yunstanford/sanic,channelcat/sanic,lixxu/sanic,channelcat/sanic,lixxu/sanic,ashleysommer/sanic,yunstanford/sanic,yunstanford/sanic,channelcat/sanic,ashleysommer/sanic,ashleysommer/sanic,lixxu/sanic,channelcat/sanic | tests/test_helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add mini test suite. First for autoclean."
},
{
"role": "assistant",
"content": "\nfrom uuid import uuid1\nimport time\n\nfrom saferedisqueue import SafeRedisQueue\n\n\ndef test_autocleanup():\n queue = SafeRedisQueue(\n ... | python | new_file | 1 | 1 | bsd-3-clause | 8c77b20a33917d7536e21574cc9a9e592f3f6ae7 | hellp/saferedisqueue | test_saferedisqueue.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for pooling"
},
{
"role": "assistant",
"content": "import Queue\nimport pylibmc\nfrom nose.tools import eq_, ok_\nfrom tests import PylibmcTestCase\n\nclass PoolTestCase(PylibmcTestCase):\n pass\n\nclass ClientP... | python | new_file | 4 | 1 | bsd-3-clause | d09b36eb6aec1f7ffa20113495c24989f46709e5 | lericson/pylibmc,lericson/pylibmc,lericson/pylibmc | tests/test_pooling.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add ParameterContext object to pass information in a top-down favor"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\n\n\nclass ParameterContext(object):\n \"\"\" A parameter object in swagger 2.0 ... | python | new_file | 1 | 1 | mit | 2cb03e58454083293a97f9f5f95285cead046c05 | mission-liao/pyopenapi | pyopenapi/scanner/v2_0/upgrade/parameter_context.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic test for piecewise in dynamical equations"
},
{
"role": "assistant",
"content": "import unittest\n\nfrom SloppyCell.ReactionNetworks import *\n\nimport TestNetwork\n\nclass test_PiecewiseDynamics(unittest.TestCase):\n ... | python | new_file | 3 | 1 | bsd-3-clause | ab82983418c4c104e741c70b797057b9c424c647 | GutenkunstLab/SloppyCell,GutenkunstLab/SloppyCell | Testing/test_PiecewiseDynamics.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add lspr example regression test"
},
{
"role": "assistant",
"content": "import os\nimport pickle\nimport pytest\nimport functools\n\ntry:\n import pycuda\nexcept ImportError:\n ans = input('PyCUDA not found. Regression tes... | python | new_file | 3 | 3 | bsd-3-clause | 5cc3ae018c09a3d642fd83c890ef137681e07bdc | barbagroup/pygbe,barbagroup/pygbe,barbagroup/pygbe | tests/test_lspr.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add class to represent a blog"
},
{
"role": "assistant",
"content": "\"\"\"\npyblogit.blog_model\n~~~~~~~~~~~~~~~~~~~\n\nThis module contains the data model to represent a blog and methods to\nmanipulate it.\n\"\"\"\n\nclass blog... | python | new_file | null | null | mit | 3c5d21b41c78b87e1567453b4a6f15ca3d97c966 | jamalmoir/pyblogit | pyblogit/blog_model.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add script to merge geocodes with accident data."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\n############################################################################\n#\n# File: MergeGeocodes.py\n# Last E... | python | new_file | 1 | 4 | unlicense | 27e6a713ff082139785c214d7f9a4cc86fcc823a | CodeforBirmingham/traffic-accident-reports,CodeforBirmingham/traffic-accident-reports | tools/MergeGeocodes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add \"driver\" field in Seat and then delete \"contender\". (migration)"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10 on 2017-05-29 22:11\nfrom __future__ import unicode_literals\n\nfr... | python | new_file | 1 | 0 | mit | 9fb5e95e54f126a967a17a5f27cbf3539e3dc970 | SRJ9/django-driver27,SRJ9/django-driver27,SRJ9/django-driver27 | driver27/migrations/0007_auto_20170529_2211.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Refactor encoding in string library."
},
{
"role": "assistant",
"content": "import base64\nimport unittest\n\n\ndef decode_hex(string):\n return base64.b16decode(string, casefold=True)\n\n\ndef encode_hex(string):\n return ... | python | new_file | 3 | 2 | mit | e928094c43c076c72841efb1cc477f92d6a3281f | Renelvon/matasano | set1/stringlib.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test to check pix conversion routines"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\r\n#\r\n# Test program to ensure that the Pix to/from numpy conversion routines are\r\n# actually functioning as we think... | python | new_file | 4 | 2 | apache-2.0 | d0c00a73d9dc5b4bde076fce3c06dff34c9d48f6 | virtuald/python-tesseract-sip,cookbrite/python-tesseract-sip,cookbrite/python-tesseract-sip,virtuald/python-tesseract-sip | test/test_pix_to_np.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for `version` command"
},
{
"role": "assistant",
"content": "\"\"\"\nTest `version` command.\n\"\"\"\nimport os\nimport re\nfrom pkg_resources import parse_version\nfrom textx.cli import textx\nfrom click.testing import ... | python | new_file | 4 | 1 | mit | 66ee31b1cc8d3921eb9c34725e91c08297f33cf0 | igordejanovic/textX,igordejanovic/textX,igordejanovic/textX | tests/functional/registration/test_version.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for merge sort"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom merge_sort import merge_sort\n\n\ndef test_sorted():\n my_list = list(range(100))\n merge_sort(my_list)\n assert my_list == li... | python | new_file | 1 | 1 | mit | 183c02d56848035e4ec162776317df82d5b43d4d | nbeck90/data_structures_2 | test_merge_sort.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: tests: Add test for rendering WListBox in case of non-str content."
},
{
"role": "assistant",
"content": "import unittest\nfrom picotui.widgets import WListBox\nfrom picotui.defs import KEY_DOWN\nfrom picotui.context import Conte... | python | new_file | 1 | 1 | mit | cd97e8d8f8578abef246f3780b4c0ec10eebc8fa | pfalcon/picotui | tests/test_WListBox.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Send the messages from the serial port as UDP messages to port 9050 Recieves UDP messages on port 9050 and sends them over the serial line"
},
{
"role": "assistant",
"content": "import serial #Serial port API http://pyserial.sour... | python | new_file | 4 | 2 | mit | 1889e03c139e0fb66d4241aa10b29345ef3bde5b | rlangoy/socLabWeek43 | python_src/SerialUDPBridge.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Cover default.py with a test"
},
{
"role": "assistant",
"content": "from logstapo import defaults\n\n\ndef test_defaults():\n # in case you wonder why there's a test for this:\n # changing the default config file path would... | python | new_file | 1 | 1 | mit | 8c93e873a71d19f390c69c6774b92f28dc0110de | ThiefMaster/logstapo | tests/test_defaults.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a basic test case."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nimport os\nimport unittest\nimport tempfile\nfrom datetime import datetime\n\nfrom flask.ext.sqlalchemy import SQLAlchemy\n\nfrom app import a... | python | new_file | 1 | 1 | mit | a60e7b34a5c2f0a80f30ae7fa61efe507cd66161 | renstrom/passbook_flask_example | tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for translation cleanup"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\nimport d... | python | new_file | 1 | 0 | bsd-3-clause | b0e6556a908c1c520b060ea868fb18ea00bea4d9 | f3r3nc/connect,nlhkabu/connect,f3r3nc/connect,nlhkabu/connect,f3r3nc/connect,nlhkabu/connect,nlhkabu/connect,f3r3nc/connect | moderation/migrations/0007_auto_20141207_1025.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Include test file for token_update API"
},
{
"role": "assistant",
"content": "from django.core.urlresolvers import reverse\nfrom rest_framework.test import APITestCase, APIRequestFactory, force_authenticate\nfrom api.tests.factor... | python | new_file | 1 | 5 | apache-2.0 | ce3af1f615b0979f8fcaf0fcec2efb1d73c13a36 | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | api/tests/v2/test_token_update.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to display a USB camera."
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\n\n\n#\n# Show the USB camera\n#\n\n\n#\n# External dependencies\n#\nimport sys\nfrom PySide import QtGui\nimport VisionToolkit a... | python | new_file | 1 | 0 | mit | e29dc1788292930d4d9585b5ef764ffdf567ade3 | microy/VisionToolkit,microy/PyStereoVisionToolkit,microy/VisionToolkit,microy/StereoVision,microy/StereoVision,microy/PyStereoVisionToolkit | show_usbcamera.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a 'general' unit tests file\n\nThis 'general' unit tests is responsible for all\nmiscellaneous/general functionalities"
},
{
"role": "assistant",
"content": "import os\nimport unittest\nfrom mpower.opr import OPR\nfrom mpower... | python | new_file | 1 | 2 | mit | b5a5f381d69260df65248d0e2ff99b9a7c47ffe7 | mawuli/mpower-python,rpip/mpower-python | tests/test_general.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic unit tests for Log."
},
{
"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\n\n\ndef ... | python | new_file | 1 | 1 | apache-2.0 | 50ed5c6566fb684bfea125d7084a5972edbe5c2a | 4degrees/mill,4degrees/sawmill | test/unit/test_log.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a testcase for Hackage"
},
{
"role": "assistant",
"content": "from tests.helper import ExternalVersionTestCase\n\n\nclass HackageTest(ExternalVersionTestCase):\n def test_hackage(self):\n self.assertEqual(self.sync_... | python | new_file | 1 | 1 | mit | 5ae52b9e16b073322550f0a7ed9d560f5f823847 | lilydjwg/nvchecker | tests/test_hackage.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add function to not verify ssl"
},
{
"role": "assistant",
"content": "import ssl\n\n\ndef fix_ssl_verify():\n try:\n _create_unverified_https_context = ssl._create_unverified_context\n except AttributeError:\n ... | python | new_file | 1 | 2 | mit | d766bfc19ce627e5141e6ab355957eb1fa5d716d | gisce/sii | sii/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add MLX IR table generator."
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\nimport sys\n\nit = iter(l)\n\nfor i,j in zip(it, it):\n aij.append(i/2**39+j/2**32),\n\nfor i in range(0, len(aij)):\n sys.stdout.wr... | python | new_file | 5 | 0 | mit | 9320338b7edebdf864bfe8d3dd6cfb1a5c2f868d | iabdalkader/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv | util/calc_ir_table.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the script for the THANKS file"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# Usage: git log --format=\"%an <%ae>\" | python update_thanks.py\n# You will get a result.txt file, you can work with the file (upd... | python | new_file | 3 | 0 | mit | 1d94290cdf5b0a111924ff9aa73d69b9e0f41165 | prezi/gunicorn,malept/gunicorn,jamesblunt/gunicorn,mvaled/gunicorn,prezi/gunicorn,harrisonfeng/gunicorn,GitHublong/gunicorn,keakon/gunicorn,zhoucen/gunicorn,malept/gunicorn,zhoucen/gunicorn,ccl0326/gunicorn,jamesblunt/gunicorn,mvaled/gunicorn,ccl0326/gunicorn,gtrdotmcs/gunicorn,1stvamp/gunicorn,WSDC-NITWarangal/gunicor... | scripts/update_thanks.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a migration for Count."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport datetime\nfrom django.utils.timezone import ut... | python | new_file | 1 | 0 | apache-2.0 | db9772f5cd856f4fa66625d229982e2546574f59 | bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv | avalonstar/apps/subscribers/migrations/0005_count.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add circle roi builder script"
},
{
"role": "assistant",
"content": "# @Float(label=\"Diameter of the circle ROI (pixel)\", value=7) circle_diam\n\nfrom ij.plugin.frame import RoiManager\nfrom ij.gui import OvalRoi\n\nrm = RoiMan... | python | new_file | 5 | 0 | bsd-3-clause | 8e3f9cdc55fae71634559c83637e8ab3d69b732d | hadim/fiji_scripts,hadim/fiji_tools,hadim/fiji_scripts,hadim/fiji_scripts,hadim/fiji_tools | src/main/resources/script_templates/Hadim_Scripts/ROI/Circle_ROI_Builder.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add minimal script to get top 200 Python-related Meetup groups"
},
{
"role": "assistant",
"content": "import ConfigParser\nimport requests\nimport urllib\n\ndef get_settings(_config_cache=[]):\n config = ConfigParser.RawConfig... | python | new_file | 1 | 1 | apache-2.0 | 964a0f848786cdbbf0b41c46cb66d3ec1a255120 | paulproteus/pug-meta-organizing | hacks.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple script to print text and a point"
},
{
"role": "assistant",
"content": "# On some systems, need to import like this:\n# import Image\n# import ImageDraw\n\n# On others, import like this:\nfrom PIL import Image, ImageDr... | python | new_file | 1 | 0 | mit | 1bef42bceaa3b188f3f54d97d6927dc9c86a8598 | redpig2/pilhacks | text-and-point.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test that the float slider uses the NumberFormat traitlet"
},
{
"role": "assistant",
"content": "\nfrom unittest import TestCase\n\nfrom traitlets import TraitError\n\nfrom ipywidgets import FloatSlider\n\n\nclass TestFloatSlider... | python | new_file | 1 | 1 | bsd-3-clause | 43eddc3663f64e92a673c09ce52ddcd50b935842 | ipython/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets | ipywidgets/widgets/tests/test_widget_float.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add LOESS module for model free bandwidth reduction."
},
{
"role": "assistant",
"content": "from pylab import *\n\ndef loessInternal( x, h, xp, yp ):\n w = exp( -0.5*( ((x-xp)/(2*h))**2 )/sqrt(2*pi*h**2) )\n b = sum(w*xp)*s... | python | new_file | 5 | 2 | mit | f4f6b1af7c11389666cf5ec562fef874388eb5a3 | bennomeier/pyNMR,kourk0am/pyNMR | loess.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Write a script to verify identity"
},
{
"role": "assistant",
"content": "\"\"\"verify-identity.py <participant_id>, <country_code>\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimp... | python | new_file | 1 | 0 | mit | eb25f8bd1ab344d951f78cfe1e655e4f755bebd6 | gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com | bin/verify-identity.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add (currently failing) test for file moving"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n#encoding:utf-8\n#author:dbr/Ben\n#project:tvnamer\n#repository:http://github.com/dbr/tvnamer\n#license:Creative Commons G... | python | new_file | 1 | 1 | unlicense | db3749beefb5d8d33dae2044aa4ac09b1d3a0d80 | dbr/tvnamer,lahwaacz/tvnamer,m42e/tvnamer | tests/test_movingfiles.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Save plots of amp vs time for each scan"
},
{
"role": "assistant",
"content": "\nimport numpy as np\nimport re\n\n\nms_active = raw_input(\"MS? : \")\nfield_str = raw_input(\"Field? : \")\n\n\ntb.open(vis+\"/FIELD\")\nnames = tb.... | python | new_file | 2 | 0 | mit | 20b3b6415f68a25de82e5f6a3e2a3ded93d1620f | e-koch/canfar_scripts,e-koch/canfar_scripts | cal_pipe/plot_scans.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add start for the job status updater"
},
{
"role": "assistant",
"content": "from django.contrib.auth.models import User\n\nfrom models import Job\nfrom interface import get_all_jobs\n\n\ndef run_all():\n for user in User.objec... | python | new_file | 1 | 5 | mit | 9b46d66f89dba1f5bd2507f0a3dcddfd2758fe2b | crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp | cluster/update_jobs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve Code Fights two lines problem"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Code Fights Two Lines Problem\n\nfrom functools import partial\n\n\ndef line_y(m, b, x):\n return m * x + b\n\n\ndef twoLine... | python | new_file | 1 | 6 | mit | 0eddc59a97fca233b5979d61a19f58179c57bc08 | HKuz/Test_Code | CodeFights/twoLines.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='XBlock',\n version='0.1',\n description='XBlock Core Library',\n packages=['xblock'],\n entry_points={\n 'xblock.v1': [\n 'helloworld = xblock.content:HelloWorl... | python | edit | 1 | 0 | apache-2.0 | a99b2cb06acf5e4018f203c4298c62dc69655281 | open-craft/XBlock,Lyla-Fischer/xblock-sdk,nagyistoce/edx-xblock-sdk,cpennington/XBlock,nagyistoce/edx-XBlock,4eek/XBlock,edx/XBlock,Lyla-Fischer/xblock-sdk,stvstnfrd/xblock-sdk,edx-solutions/xblock-sdk,edx-solutions/XBlock,dcadams/xblock-sdk,stvstnfrd/xblock-sdk,Pilou81715/hackathon_edX,edx-solutions/XBlock,cpennington... | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to clean a simulation"
},
{
"role": "assistant",
"content": "#!/usr/bin/env/ python\n\n# file: cleanSimulation.py\n# author: Olivier Mesnard (<EMAIL>)\n# description: Clean a cuIBM simulation.\n\n\nimport os\nimport ar... | python | new_file | 3 | 7 | mit | 955c4584a304c3b6a6dbbcf12eae3eed5e9a4cf5 | barbagroup/cuIBM,barbagroup/cuIBM,barbagroup/cuIBM | scripts/python/cleanSimulation.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add python binary tree data structure"
},
{
"role": "assistant",
"content": "\"\"\"Implementation of a Binary Tree in Python.\"\"\"\n\nclass BinaryTree:\n def __init__(self, root_node):\n self.key = root_node\n s... | python | new_file | 1 | 2 | mit | 2594b559722efa75322e669792cf8b9ba14f5014 | salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook,salman-bhai/DS-Algo-Handbook | Data-Structures/Trees/Binary_Trees/binary_tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test to reproduce bug"
},
{
"role": "assistant",
"content": "# -*- coding: utf8 -*-\nfrom __future__ import unicode_literals\n\nfrom future.standard_library import install_aliases\ninstall_aliases()\n\nimport sys\nimport time... | python | new_file | 1 | 1 | mit | 048939778e5637eff997d674395d0f6df860a3eb | victorlin/bugbuzz-python,victorlin/bugbuzz-python | tests/integration/test_debugger.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for prepare_book"
},
{
"role": "assistant",
"content": "from caspy.domain import command, models\n\nclass TestBook:\n def test_prepare_new_book(self):\n empty_book = models.Book()\n result = comman... | python | new_file | 1 | 1 | bsd-3-clause | d7ab04186f3b8c7c58b654a7372b1d4f3ffad64e | altaurog/django-caspy,altaurog/django-caspy,altaurog/django-caspy | tests/unit/test_domain_commands.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | aaea0100aed4ff33c4f67518d7859b78baffd2b6 | electronick1/todoist-python,Doist/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Write python code for the following: Make Venn diagram of IDs in PMC"
},
{
"role": "assistant",
"content": "\"\"\"Plot a Venn diagram showing the IDs associated with articles in PMC.\"\"\"\n\nimport matplotlib_venn as mv\nimport csv\nfrom matplotlib import pyplot as... | python | new_file | 2 | 4 | bsd-2-clause | eac5962530542e1732326c1c0173294682d6256b | jmuhlich/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,bgyori/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/belpy,jmuhlich/indra,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,bgyori/indra,jmuhlich/indra... | models/ras_220_genes/pmc_ids_venn.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: TST: Add test for printing of scalar values."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\" Test printing of scalar types.\n\n\"\"\"\n\nimport numpy as np\nfrom numpy.testing import TestCase, assert_, run_... | python | new_file | 1 | 4 | bsd-3-clause | d55b5aa49d2ba1c98d568660b1a91b4b552872f0 | ViralLeadership/numpy,githubmlai/numpy,bringingheavendown/numpy,sigma-random/numpy,groutr/numpy,anntzer/numpy,drasmuss/numpy,chatcannon/numpy,pdebuyl/numpy,ChristopherHogan/numpy,dato-code/numpy,ViralLeadership/numpy,tacaswell/numpy,tdsmith/numpy,rudimeier/numpy,leifdenby/numpy,jakirkham/numpy,solarjoe/numpy,mwiebe/num... | numpy/core/tests/test_scalarprint.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing test for getchatserver\n\nForgot to track it -.-"
},
{
"role": "assistant",
"content": "import mock\nimport pytest\nimport requests\n\nfrom pytwitcherapi import session\n\n\n@pytest.fixture(scope=\"function\")\ndef ts... | python | new_file | 1 | 2 | bsd-3-clause | 013f2e526c862ed8e2c9b79aba43618b381d4bd3 | Pytwitcher/pytwitcherapi,Pytwitcher/pytwitcherapi | test/test_session_getchatserver.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for splitting an auth dump on primary field presence"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nfrom __future__ import unicode_literals, print_function\nimport re\nfrom os import makedirs, path as P\... | python | new_file | 1 | 7 | apache-2.0 | 2ca84d16ff355a3e5a271ba800acb7c3cf4f8441 | libris/librisxl,libris/librisxl,libris/librisxl | librisxl-tools/scripts/split_auth_source.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a `TransportConfig' class which should contain configuration options (such as the state location) meant for pluggable transport modules."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nProvides a cla... | python | new_file | 1 | 1 | bsd-3-clause | f293d3d6aff79f424ab290347f99b85ca993e196 | david415/obfsproxy,catinred2/obfsproxy,infinity0/obfsproxy,Yawning/obfsproxy-wfpadtools,sunsong/obfsproxy,isislovecruft/obfsproxy,qdzheng/obfsproxy,masterkorp/obfsproxy,Yawning/obfsproxy,NullHypothesis/obfsproxy | obfsproxy/common/transport_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add CWTV .json to .srt script."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# encoding: utf-8\n\n'''\nThis script will convert a close captioning subtitle .json file as found on the\nCWTV streaming website, to a... | python | new_file | 1 | 1 | mit | 1ddae2ddab2f0681d52f46baf2f0ec3926508d1b | alimony/dotfiles,alimony/dotfiles | bin/cwtv_json_to_srt.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test jenkis_api ApiJob and Invocation classes __repr__ methods"
},
{
"role": "assistant",
"content": "# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT\n# All rights reserved. This work is under a BSD license, see LI... | python | new_file | 1 | 1 | bsd-3-clause | 9502c0e816097cf65fa92c6dd255c3356cf20964 | lhupfeldt/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow,lechat/jenkinsflow,lhupfeldt/jenkinsflow | test/api_class_repr_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a new file for constants and other utilities to be thrown into."
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\nfrom snappy import *\nfrom math import log\n\n# Global constants:\nPARI_PRECISION = 100\nLINDEP_PRECI... | python | new_file | 11 | 0 | mit | 0507bf58c7d73f91e645d64c69fcccb35542703a | s-gilles/maps-reu-code | VolumeUtilities.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to plot metrics of dataset"
},
{
"role": "assistant",
"content": "from __future__ import print_function\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n\nparent_dir = os.path.dir... | python | new_file | 1 | 5 | mit | 8f117d62a60699b3d6b87e15962fca43339616a6 | quqixun/BrainTumorClassification,quqixun/BrainTumorClassification | new_src/plot_multi_curves.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for monthly data"
},
{
"role": "assistant",
"content": "\"\"\"\nAdd _week_start_at field to all documents in all collections\n\"\"\"\nfrom backdrop.core.bucket import utc\nfrom backdrop.core.records import Record\ni... | python | new_file | 1 | 3 | mit | 4fe20a71ef3a432a8e53bf498d847d9a66b099e9 | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | migrations/002_add_month_start.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test to assert that transactions are balanced"
},
{
"role": "assistant",
"content": "# Copyright (c) 2012 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms o... | python | new_file | 2 | 1 | apache-2.0 | 43bba1633233a03be5d585a2341ba56860b93c6b | lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | tests/test_finance_model.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for input setup workflow"
},
{
"role": "assistant",
"content": "import os\nimport unittest\n\nimport cea.config\nfrom cea.utilities import create_polygon\nfrom cea.datamanagement import zone_helper, surroundings_helper, ... | python | new_file | 1 | 1 | mit | ac40e54d22717fbf1a2444a67198cdba66506df8 | architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst | cea/tests/test_inputs_setup_workflow.py | rejected_duplicate | Near-duplicate of sample 7710 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add memoization version to find nth Fibonacci number"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python3\n\n\ndef main():\n # Test suite\n tests = [\n [None, None], # Should throw a TypeError\n [4,... | python | new_file | 1 | 4 | mit | 9655b7349f48fe57a72897800d353aa1df4d5783 | HKuz/Test_Code | Problems/fibMemoization.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create DataApp app hook for CMS"
},
{
"role": "assistant",
"content": "from cms.app_base import CMSApp\nfrom cms.apphook_pool import apphook_pool\n\n\nclass DataApp(CMSApp):\n name = 'Data App'\n urls = ['cms_lab_data.urls'... | python | new_file | 1 | 0 | bsd-3-clause | 96c4e54ed7bde9e41c6c235ff1654f47da2e23f3 | mfcovington/djangocms-lab-data,mfcovington/djangocms-lab-data,mfcovington/djangocms-lab-data | cms_lab_data/cms_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make it a python package"
},
{
"role": "assistant",
"content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='typesystem',\n version='0.1',\n description=\"An abstract type system\",\n long_descripti... | python | new_file | 1 | 0 | mit | 26a847a9b5f9db3279849c6cc7505d41653887c9 | pudo/typecast,influencemapping/typesystem | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add crop multi roi alternative script"
},
{
"role": "assistant",
"content": "# @DatasetService datasetservice\n# @ImageDisplayService displayservice\n# @ImageJ ij\n# @AbstractLogService log\n# @DefaultLegacyService legacyservice\... | python | new_file | null | null | bsd-3-clause | 810eeddaff32f9b608b0b61cfcb48826ec1b15bf | hadim/fiji_tools,hadim/fiji_scripts,hadim/fiji_scripts,hadim/fiji_scripts,hadim/fiji_tools | various/Crop_Big_ROIs.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add file for testing libcwap from the python side"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport libcwap\n\ndef reader(size):\n print \"Got read\"\n return 'T' * size\n\ndef callback(name):\n def ... | python | new_file | 3 | 1 | mit | b737cbbd3425d2c661ffa73bff39b18b30d8f914 | xim/tsoc,xim/tsoc,xim/tsoc,xim/tsoc | cwappy/libcwap_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add minimal test for new postgresql.py module"
},
{
"role": "assistant",
"content": "import pytest\nfrom mock import MagicMock\n\nimport zmon_aws_agent.postgresql as postgresql\n\n\ndef test_get_databases_from_clusters():\n pg... | python | new_file | 3 | 1 | apache-2.0 | fbb07f1448d7759c13db735f34d30a86938b8bf4 | zalando/zmon-aws-agent,zalando/zmon-aws-agent | tests/test_postgresql.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.