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 some color utility functions."
},
{
"role": "assistant",
"content": "# -*- coding:utf-8 -*- \n\n# ***************************************************************************\n# Color.py\n# ... | python | new_file | 1 | 6 | mit | 8533068444eacf4a7731d3543b9308cd6d41b51d | microy/MeshToolkit,microy/PyMeshToolkit,microy/MeshToolkit,microy/PyMeshToolkit | Core/Color.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add baseline test for initializing plugin"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2017 Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see LICENSE.txt for de... | python | new_file | 3 | 1 | mit | 8479da007990d561147951440f1f520ebbcfdadc | jitseniesen/spyder-unittest | spyder_unittest/tests/test_unittestplugin.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add wrapper to allow easy loading of yaml files.\n\nFixes #327.\n\nSigned-off-by: Tim 'mithro' Ansell <<EMAIL>>"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport io\nimport re\nimport yaml\nimport json\nimport... | python | new_file | 1 | 1 | isc | 70294b332920d23f97c93c720e6078e6358b7272 | SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray,SymbiFlow/prjxray | prjxray/xyaml.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first basic unittests using py.test"
},
{
"role": "assistant",
"content": "\"\"\"\n test_validators\n ~~~~~~~~~~~~~~\n \n Unittests for bundled validators.\n \n :copyright: 2007-2008 by James Crasta, Thomas ... | python | new_file | 1 | 1 | bsd-3-clause | 1fafccc7df5179ce89b100537e45307417658512 | clones/wtforms | tests/test_validators.py | rejected_duplicate | Near-duplicate of sample 5919 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a simple test case for LawrenceTransitProvider"
},
{
"role": "assistant",
"content": "import busbus\nfrom busbus.provider.lawrenceks import LawrenceTransitProvider\n\nimport arrow\nimport pytest\n\n\n@pytest.fixture(scope='mo... | python | new_file | 1 | 1 | mit | 4736ed07ea8b83ca8c32c2d675f67883050b8c26 | spaceboats/busbus | tests/test_provider_lawrenceks.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test cases for override_config\n\nTest usage of override_config in different forms\nEnsure flexibility between decorator and context manager"
},
{
"role": "assistant",
"content": "from django.test import TestCase\n\nfrom cons... | python | new_file | 1 | 1 | bsd-3-clause | 2bbffd5eec2e42897969e504551c16d4abbf5ba9 | pombredanne/django-constance,winzard/django-constance,jonzlin95/django-constance,pombredanne/django-constance,jonzlin95/django-constance,jazzband/django-constance,dmugtasimov/django-constance,jezdez/django-constance,APSL/django-constance,jazzband/django-constance,dmugtasimov/django-constance,winzard/django-constance,th... | tests/test_test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Natural Language API wrapper."
},
{
"role": "assistant",
"content": "import httplib2\ntry:\n import simplejson as json\nexcept:\n import json\n\n\nfrom googleapiclient import discovery\nfrom oauth2client.client ... | python | new_file | 3 | 1 | apache-2.0 | b189e7043115f788093b129815ff0bde5895ee0b | alexcchan/google | glanguage/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for vat utils functions"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import, division, print_function\n\nimport unittest\n\nimport numpy as np\n\nfrom cleverhans.utils_tf import kl_with_logits,... | python | new_file | 1 | 1 | mit | 15d782aaddf1e8a4215df2fa3ef60b8801fe382a | fartashf/cleverhans,carlini/cleverhans,openai/cleverhans,cleverhans-lab/cleverhans,cleverhans-lab/cleverhans,cihangxie/cleverhans,carlini/cleverhans,cleverhans-lab/cleverhans | tests_tf/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test for get_calls"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nimport codecs, json\nfrom PokeFacts import RedditBot\nfrom PokeFacts import DataPulls\n\ndef getDataPullsObject():\n store = DataPull... | python | new_file | 1 | 1 | mit | 809781cc832d79e1f746df385317ce4dae6223b3 | rpokemon/PokeFacts | tests/test_GetCalls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create test cases for the wifi_password_getter plugin"
},
{
"role": "assistant",
"content": "import unittest\nfrom tests import PluginTest\nfrom plugins import wifi_password_getter\nfrom colorama import Fore\n\n\nclass TestWifiPa... | python | new_file | 1 | 1 | mit | 77b6e4995743bca4036e5b5dc498cfcdd4e2908e | sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis | jarviscli/tests/test_wifi_password_getter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve Code Fights least factorial problem"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Code Fights Least Factorial (Core) Problem\n\n\ndef leastFactorial(n):\n def factGen():\n m, res = 1, 1\n ... | python | new_file | 1 | 3 | mit | e9f30ec92520f8caa4f5d08fdf43b08ced84fd6b | HKuz/Test_Code | CodeFights/leastFactorial.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to download wheels from appveyor"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nimport asyncio\nimport json\nimport pathlib\nimport sys\nfrom tornado.httpclient import AsyncHTTPClient\n\nBASE_URL = \"... | python | new_file | 1 | 4 | apache-2.0 | 8f1e94f79ddd398112ed33485bfc3d735e1edda2 | mivade/tornado,tornadoweb/tornado,bdarnell/tornado,mivade/tornado,dongpinglai/my_tornado,mivade/tornado,dongpinglai/my_tornado,tornadoweb/tornado,NoyaInRain/tornado,NoyaInRain/tornado,NoyaInRain/tornado,allenl203/tornado,bdarnell/tornado,dongpinglai/my_tornado,lilydjwg/tornado,tornadoweb/tornado,dongpinglai/my_tornado,... | maint/scripts/download_wheels.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to get count of objects in a collection."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf8 -*-\n\nimport sys, os\nimport argparse\nfrom deepharvest.deepharvest_nuxeo import DeepHarvestNux... | python | new_file | 4 | 2 | bsd-3-clause | b47dbd6b6f2e19632e90036f14cd85bbf3f8cbd1 | barbarahui/nuxeo-calisphere,barbarahui/nuxeo-calisphere | utils/get_collection_object_count.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for objs with strs rather than unicode"
},
{
"role": "assistant",
"content": "def has_str(obj):\n if type(obj) == str:\n return True\n # Check for an iterable\n if hasattr(obj, '__iter__'):\n for item ... | python | new_file | 1 | 8 | bsd-2-clause | 50e16f8212c87ceb1f3fd1c896149b626e6e4178 | jmuhlich/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/belpy,pvtodorov/indra,bgyori/indra,pvtodorov/indra,sorgerlab/indra,jmuhlich/indra,johnbachman/belpy,johnbachman/indra,jmuhlich/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,sorgerlab/belpy,bgyori/indra,bgyori/indra,jo... | indra/util/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add command line tool to import metadata"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport os\nimport csv\n\nfrom django.core.management.base import BaseCommand\n\nfrom emgapimetadata imp... | python | new_file | 4 | 7 | apache-2.0 | 0798e457957b3db8f5de1891900d639961d78a0f | EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi | emgapimetadata/management/commands/test-data.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test case for the failure to compile code including unicode characters."
},
{
"role": "assistant",
"content": "# coding: utf-8\n\"\"\"These tests have to be run separately from the main test suite (iptest),\nbecause that sets the... | python | new_file | 1 | 1 | bsd-3-clause | a86525047658bf5adcd2133f71fe392a11883916 | ipython/ipython,ipython/ipython | tools/unicode_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create script to log imu values"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nfrom sense_hat import SenseHat\nfrom pymongo import MongoClient\nimport time\n\n\nDELAY = 1 # in seconds\n\nsense = SenseHat()\ncl... | python | new_file | 1 | 0 | bsd-3-clause | b3f185033ee758e9407240243e263e07c8a28e35 | gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2 | services/imu-logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add command to print the syntax tree for a script"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyrigh... | python | new_file | 1 | 1 | apache-2.0 | 1846e6fe7f6b6a31f7921303556393e7f6fd9845 | DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python | dev_tools/src/d1_dev/src-print-redbaron-tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a demo script for gym continous tasks"
},
{
"role": "assistant",
"content": "import argparse\n\nimport chainer\nfrom chainer import serializers\nimport gym\nimport numpy as np\n\nimport random_seed\nfrom train_a3c_continuous ... | python | new_file | 1 | 3 | mit | a24b3122176b7435469b5275264dd6f53ff78165 | toslunar/chainerrl,toslunar/chainerrl | demo_a3c_continuous.py | rejected_duplicate | Near-duplicate of sample 6751 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial settings test file"
},
{
"role": "assistant",
"content": "import pytest\n\nfrom isort import exceptions\nfrom isort.settings import Config\n\n\nclass TestConfig:\n def test_init(self):\n assert Config()\n\n ... | python | new_file | 1 | 1 | mit | 9bce480b245e20f6c6ef93d34e92c27cea9f6d77 | PyCQA/isort,PyCQA/isort | tests/test_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\ntry:\n from docutils.core import publish_parts\n def render_rest(markup, **docutils_settings):\n parts = publish_parts(source=markup, writer_name=\"html4css1\", settings_overrides=docu... | python | edit | 1 | 1 | bsd-3-clause | eb1daa3edfaa72cad2cb39507b2db0bf95204561 | WimpyAnalytics/django-markitup,carljm/django-markitup,WimpyAnalytics/django-markitup,zsiciarz/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,WimpyAnalytics/django-markitup,carljm/django-markitup,zsiciarz/django-markitup | markitup/renderers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: ADD attributeExploration algorithm wrapped in a class"
},
{
"role": "assistant",
"content": "#-------------------------------------------------------------------------------\n# Name: AttributeExploration.py\n# Purpose: ... | python | new_file | 1 | 10 | mit | f82c43f3cc1fc74cd23b7ae4b957c464e09fe179 | jakobkogler/AttributeExploration,jakobkogler/AttributeExploration | AttributeExploration.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the dataset for online products dataset"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 14 17:30:49 2017\n\n@author: sakurai\n\"\"\"\n\nfrom fuel.datasets import H5PYDataset\nfrom fu... | python | new_file | 1 | 2 | mit | c332b83cc543f8e43405cf72e6e7c80b0cafba80 | ronekko/deep_metric_learning | datasets/online_products_dataset.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''Custom decorators.'''\n\nfrom __future__ import absolute_import\nfrom textblob.exceptions import MissingCorpusException\n\n\nclass cached_property(object):\n '''A property that is only computed once per instan... | python | edit | 1 | 2 | mit | be70b1528f51385c8221b7337cdc8669f53fa1c6 | jcalbert/TextBlob,freakynit/TextBlob,nvoron23/TextBlob,IrisSteenhout/TextBlob,adelq/TextBlob,beni55/TextBlob,jonmcoe/TextBlob,dipeshtech/TextBlob,sargam111/python,sloria/TextBlob,Windy-Ground/TextBlob,laugustyniak/TextBlob | textblob/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to detect changed options."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# file: changed_options.py\n# vim:fileencoding=utf-8:fdm=marker:ft=python\n#\n# Author: R.F. Smith <<EMAIL>>\n# Created: 2018-03... | python | new_file | 1 | 5 | mit | 31d67e804ba44645b701c2624ee30c31023e994e | rsmith-nl/scripts,rsmith-nl/scripts | changed_options.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Clear all NLCD19 2019 TR-55 results\n\nSince we're switching TR-55 projects back to NLCD11 2011,\nthis migration clears the results for all TR-55 projects\nmade since 1.33.0, which switched the default to NLCD19 2019.\nThese results will be ... | python | new_file | 1 | 1 | apache-2.0 | 18f983cf035704588f904d966f8bf10ca4a16b01 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | src/mmw/apps/modeling/migrations/0040_clear_nlcd2019_tr55_results.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for inheritance case."
},
{
"role": "assistant",
"content": "import sqlalchemy as sa\nfrom sqlalchemy_continuum import version_class\nfrom tests import TestCase\n\n\nclass TestCommonBaseClass(TestCase):\n def create_m... | python | new_file | 1 | 1 | bsd-3-clause | 6eb358fbbe7351c65885d63726d895335832cf3c | kvesteri/sqlalchemy-continuum | tests/inheritance/test_multi_level_inheritance.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add FMI weather table timestamp fixing script"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\n\"\"\"This is a script for fixing odd weather timestamp values in the database. Sometimes\nthe timestamp is off by man... | python | new_file | 1 | 4 | mit | c7b57a9fcff6741869394ee2e6619db684e3d522 | terop/env-logger,terop/env-logger,terop/env-logger,terop/env-logger,terop/env-logger,terop/env-logger,terop/env-logger | scripts/fix_weather_timestamp_errors.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 423. Reconstruct Original Digits from English\n\n423. Reconstruct Original Digits from English: https://leetcode.com/problems/reconstruct-original-digits-from-english/"
},
{
"role": "assistant",
"content": "fr... | python | new_file | 2 | 8 | apache-2.0 | 2865af9eba55f1b3bbf14d26fd9691925fde8f5e | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/reconstruct-original-digits-from-english.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tool to generate .manhole files.\n\nThis is cleaner than creating them one by one.\n\nR=<EMAIL>\nBUG=\nTEST=\n\n\nReview URL: http://codereview.chromium.org/8347006\n\ngit-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@106120 0039d316-... | python | new_file | 3 | 8 | bsd-3-clause | 727e57b8f639a471423c4b5a87af594632ae609d | eunchong/build,eunchong/build,eunchong/build,eunchong/build | scripts/tools/make_manhole.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom sentry.utils.imports import import_string\n\n\nclass PatchContext(object):\n def __init__(self, target, callback):\n target, attr = target.rsplit('.', 1)\n target = import_stri... | python | edit | 1 | 3 | bsd-3-clause | 10782310cfee0d2c2938748056f6549b5918b969 | looker/sentry,zenefits/sentry,mvaled/sentry,alexm92/sentry,alexm92/sentry,looker/sentry,gencer/sentry,ifduyue/sentry,jean/sentry,JackDanger/sentry,JackDanger/sentry,ifduyue/sentry,BuildingLink/sentry,gencer/sentry,beeftornado/sentry,BuildingLink/sentry,mvaled/sentry,JamesMura/sentry,jean/sentry,zenefits/sentry,zenefits... | src/sentry/debug/utils/patch_context.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a small script for rapidly verifyinh IGV screenshots"
},
{
"role": "assistant",
"content": "import os\nimport click\nimport cv2\nfrom AppKit import NSScreen\n\n\ndef check_image(filename, height):\n image = cv2.imread(file... | python | new_file | 1 | 4 | mit | 09911a0fe8135fa2534c9d6e708e688fcfe54ca7 | bardin-lab/readtagger,bardin-lab/readtagger | analysis/check_calls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility function for retrieving get parameters"
},
{
"role": "assistant",
"content": "\"\"\"Module for retrieving a GET request query parameter.\"\"\"\n\nfrom django.http import Http404\n\n\ndef retrieve_query_parameter(reque... | python | new_file | 1 | 4 | mit | e471fa49409d45b2b76b12ac63fb6487466be174 | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | csunplugged/utils/retrieve_query_parameter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make migrations for changes to models"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.utils.timezone import utc\nimp... | python | new_file | 1 | 0 | bsd-3-clause | 8a9329a5c2b97d32a1fd32ae16c21222fb10b6b2 | mfcovington/djangocms-lab-carousel,mfcovington/djangocms-lab-carousel | cms_lab_carousel/migrations/0003_auto_20150417_1240.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script showing usage in examples"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nimport string\nfrom dynmen import Menu\nrofi = Menu(command=('rofi', '-fullscreen', '-dmenu', '-i'))\n\nd_string = vars(string)\... | python | new_file | 1 | 0 | mit | 4cc2861ed79d54c5f59a29b5d56dde5aae9c0c81 | frostidaho/dynmen | examples/ex_rofi.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to configure omerok8s for public_group and public_user"
},
{
"role": "assistant",
"content": "\"\"\"Configure Omero on a k8s server for the way it is used in IMPC\n\n\"\"\"\nimport sys\nimport argparse\n\nimport omero.... | python | new_file | 4 | 2 | apache-2.0 | bc6a9324c00909a62dc26477224bbfc58def9eb2 | mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData | external_tools/src/main/python/omero56/scripts/omerok8s_impc_config.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement an example of the modified SerialIterator"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jan 21 21:16:43 2017\n\n@author: ryuhei\n\"\"\"\n\nimport numpy as np\n\nfrom chainer.data... | python | new_file | 4 | 3 | mit | 9cd5678fbeb3ad5a26bf9578a1f562c46a2de26e | ronekko/deep_metric_learning | example_iterator_with_custom_order.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for event type parser"
},
{
"role": "assistant",
"content": "import unittest2\n\nfrom models.event import Event\nfrom helpers.event_helper import EventHelper\n\nclass TestUsfirstEventTypeParser(unittest2.TestCase):\n ... | python | new_file | 1 | 1 | mit | 3eefb913a11a91cfe543b5efe926e233953e6b0c | josephbisch/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,bdaroz/the-blue-alliance,fangeugene/the-blue-alliance,1fish2/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance,tsteward/the-blue-alliance,tsteward/the-blue-alliance,1f... | tests/test_usfirst_event_type_parser.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example using callbacks/IRQs for easier debug"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nLog radiation hits or noise signals to the console.\n\nReleased under MIT License. S... | python | new_file | 1 | 3 | mit | cca072b6cf5b0162e1cf10d6873739d762a7a05e | MonsieurV/PiPocketGeiger | examples/console_logger_signals.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Migrate dask array odo backend from dask."
},
{
"role": "assistant",
"content": "from __future__ import absolute_import, division, print_function\n\nimport numpy as np\nfrom datashape import discover\nfrom toolz import merge, acc... | python | new_file | 11 | 2 | bsd-3-clause | 8768b66ae982d19964f85feb325a1b0f35ed1c87 | cpcloud/odo,ContinuumIO/odo,ywang007/odo,cpcloud/odo,alexmojaki/odo,quantopian/odo,ContinuumIO/odo,Dannnno/odo,cowlicks/odo,quantopian/odo,blaze/odo,cowlicks/odo,alexmojaki/odo,Dannnno/odo,ywang007/odo,blaze/odo | odo/backends/dask_array.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add more tests for mkdir."
},
{
"role": "assistant",
"content": "from __future__ import with_statement\n\nfrom nose.tools import (\n eq_ as eq,\n )\n\nfrom fs.test.util import (\n maketemp,\n assert_raises,\n )\n\n... | python | new_file | 1 | 1 | mit | 6b0673334d14dca0e64ab9a760d8652b29e26b07 | tv42/fs,nailor/filesystem | fs/test/test_mkdir.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to view URL in HTMLViewer\n\nThis script takes advantage of the fact that Mojo binaries are published in the\ncloud to add functionality for viewing a URL in HTMLViewer embedded in the\nkiosk window manager.\n\nReview URL: https:/... | python | new_file | 1 | 1 | bsd-3-clause | fe3f7ae8eb9390a4fe3f59e6244d4bbd6af7a9cd | TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,Just-D/chro... | mojo/services/html_viewer/view_url.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve Code Fights range bit count problem"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Code Fights Range Bit Count (Core) Problem\n\n\ndef rangeBitCount(a, b):\n return (''.join([bin(n) for n in range(a, b... | python | new_file | 1 | 3 | mit | 63ffa531eebfba19344dee67b3f417072012a7f4 | HKuz/Test_Code | CodeFights/rangeBitCount.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for epsilon greedy explorers"
},
{
"role": "assistant",
"content": "from __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import... | python | new_file | 1 | 2 | mit | 69aa2be4eca4ecfa9a73ad38c34bb7a4e46bef97 | toslunar/chainerrl,toslunar/chainerrl | tests/test_epsilon_greedy.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create a form for the JobTemplate"
},
{
"role": "assistant",
"content": "from django import forms\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Layout, Div\n\n\nclass JobTemplateForm(forms.Form):\n ... | python | new_file | 1 | 0 | mit | e3afe5628d42abb109f7e2b3be735ef02941051d | crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp | data/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for name injection\n\nSince the name injection facility could taint the entire global\nnamespace of the module, its test is put into a separate module."
},
{
"role": "assistant",
"content": "\"\"\"Test for the name inje... | python | new_file | 3 | 1 | mit | 6a835fd8913cdd3a9dc76530230ae2c73d88b48f | tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge | tests/name_injection_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Print the logs for a certain date"
},
{
"role": "assistant",
"content": "#!/bin/env python\n#\n# cat_logs.py\n#\n# Print out the logs for a certain date\n#\n# Usage: cat_logs.py <factory> YY/MM/DD [hh:mm:ss]\n#\n\nimport sys,os,o... | python | new_file | 4 | 4 | bsd-3-clause | 86da129dd4d9665dc15218c1d5b4673ee33780f4 | holzman/glideinwms-old,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS | factory/tools/cat_logs.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add custom implementation from stack overflow."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nimport sys\nshows = []\n\nfor line in sys.stdin:\n line = line.strip()\n key_value = line.split(',')\n\n ... | python | new_file | 1 | 0 | mit | 864ab5e404ecf87e226a8cdb74e65cc343a8b377 | dimitardanailov/learn-hadoop | JoiningData/join2_mapper.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test of shared variables. Used in UNITY operations."
},
{
"role": "assistant",
"content": "import sys\nimport os\nsys.path.append(os.path.abspath(\"../helper_functions\"))\nsys.path.append(os.path.abspath(\"../core\"))\nsys.path.... | python | new_file | 2 | 4 | bsd-3-clause | 288e0b7b5847fde184769cb67dc5ef40f9de3c30 | AssembleSoftware/IoTPy | IoTPy/tests/shared_variables_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for generic parametrization"
},
{
"role": "assistant",
"content": "from tests.mapper import get_symbols, SOURCE_PAIR, SOURCE_FULL\nfrom thinglang.lexer.values.identifier import Identifier\nfrom thinglang.symbols.symbol i... | python | new_file | 1 | 1 | mit | 51056fd6e51752b44ba6d10f70c40111db6f9e07 | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | tests/mapper/test_parameterization.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example for repeatable url fetcher implemented on top of streams"
},
{
"role": "assistant",
"content": "import asyncio\nimport aiohttp\n\n\ndef fetch_url(client, url):\n resp = yield from client.get(url)\n try:\n ... | python | new_file | 1 | 2 | apache-2.0 | caf1325a0ba81dba20492cd3013fb4f1f7f11b99 | ifosch/europython2015,hguemar/europython2015,asvetlov/europython2015 | repeatable_fetcher.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create Tool-info module for LibKluzzer"
},
{
"role": "assistant",
"content": "\"\"\"\nBenchExec is a framework for reliable benchmarking.\nThis file is part of BenchExec.\n\nCopyright (C) 2007-2019 Dirk Beyer\nAll rights reserve... | python | new_file | 1 | 1 | apache-2.0 | bc721bb9e31c54a2eaab9ec84743f635f807abf8 | dbeyer/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec | benchexec/tools/libkluzzer.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first training data generator."
},
{
"role": "assistant",
"content": "import sys\nimport os\nimport json\nimport numpy as np\n\nMAX_ACTIONS = 20\nPLAYER_RANGE = (4, 7)\n\ndef init_vec(num_players):\n input_vec = [0]*8\n ... | python | new_file | 3 | 11 | apache-2.0 | dfd7ee9d60c1ea0b2ecd5b09eb9a5468f6045852 | session-id/poker-predictor | gen_training_data_1.py | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add management command to update custom recipient type"
},
{
"role": "assistant",
"content": "from django.core.management import BaseCommand\nfrom corehq.messaging.scheduling.scheduling_partitioned.models import (\n CaseTimedS... | python | new_file | 1 | 9 | bsd-3-clause | 39aa4000a0625e9589803c9a823733a63d68d8ef | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/reports/management/commands/update_custom_recipient_type.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example script to illustrate how to use the API library."
},
{
"role": "assistant",
"content": "# ATCA Rapid Response Service\n# <EMAIL>\n\n# example1.py\n# This example script shows how to make a schedule and request time... | python | new_file | 2 | 0 | mit | 02e58eb884046d04c988f3b8dde76e047d7c591f | ste616/atca-rapid-response-api | python/example1.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for cuda.cusolver_enabled flag"
},
{
"role": "assistant",
"content": "import unittest\r\n\r\nfrom cupy import cuda\r\n\r\n\r\nclass TestCusolver(unittest.TestCase):\r\n\r\n def test_cusolver_enabled(self):\r\n ... | python | new_file | 1 | 1 | mit | 512ebb46c4f1bd851cc91afc67a2ce444fe077dd | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | tests/cupy_tests/cuda_tests/test_cusolver.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 593. Valid Square\n\n593. Valid Square: https://leetcode.com/problems/valid-square/"
},
{
"role": "assistant",
"content": "from operator import itemgetter\nclass Solution(object):\n def validSquare(self, p1... | python | new_file | 1 | 6 | apache-2.0 | f6b0fbc208012610e7658c02318226d0085ed7a0 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/valid-square.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution for Problem 62."
},
{
"role": "assistant",
"content": "# coding=utf-8\n\n'''\nProblem 62\n30 January 2004\n\nThe cube, 41063625 (345^(3)), can be permuted to produce two other cubes: 56623104 (384^(3)) and 66430125 (... | python | new_file | 2 | 0 | mit | 7358f2197f3faef3003ffa29188737616833ae42 | robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles,robertdimarco/puzzles | project-euler/062.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add driving component as an example"
},
{
"role": "assistant",
"content": "'''\t\n\tDriving component\n'''\n\nclass Drive(object):\n\n\tdef __init__(self, robotDrive):\n\t\tself.robotDrive = robotDrive\n\n\t#\n\t# Verb functions\... | python | new_file | 1 | 1 | bsd-3-clause | f72f48a0bc7ab92439e3af04538b8b46e6673d62 | frc1418/2014 | robot/robot/src/component/drive.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create Combination like 001 for Leetcode"
},
{
"role": "assistant",
"content": "class Solution(object):\n def combine(self, n, k):\n \"\"\"\n :type n: int\n :type k: int\n :rtype: List[List[int]]\n ... | python | new_file | 1 | 5 | mit | 45a9c2b3b8e0033c6dca5b87d52f515d23a9356c | Chasego/codirit,Chasego/codi,Chasego/cod,cc13ny/Allin,cc13ny/algo,Chasego/codirit,Chasego/codirit,Chasego/cod,Chasego/codi,Chasego/codirit,Chasego/cod,Chasego/codi,cc13ny/algo,Chasego/codi,cc13ny/Allin,Chasego/codirit,cc13ny/algo,cc13ny/Allin,cc13ny/Allin,cc13ny/algo,cc13ny/algo,cc13ny/Allin,Chasego/codi,Chasego/cod,Ch... | leetcode/077-Combinations/Combinations_002.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to print all text in folia xml file\n\nExtract text in acts from folia xml files. Processes all folia xml files\nin the input directory and put output texts in the output directory."
},
{
"role": "assistant",
"content"... | python | new_file | 5 | 7 | apache-2.0 | 45a68b285306ed3030cba1fdcc388c4ea1df3855 | NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts | folia2text.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add bamova phi plotting script"
},
{
"role": "assistant",
"content": "import sys\n\nimport numpy as np\nfrom sklearn.neighbors.kde import KernelDensity\nimport matplotlib\nfrom matplotlib import pyplot\n\ndef estimate_distributio... | python | new_file | 11 | 2 | apache-2.0 | 8d193a6eb59028eb2c21203bc8543d34603f86bd | rnowling/pop-gen-models | bamova/plot_sampled_phis.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to parse the results"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n# coding: utf-8\n\nimport fileinput\nimport sys\n\nbuffer_size = 0\nthreshold = 0\nelapsed_time = 0.0\n\nfor line in fileinput.input():\n ... | python | new_file | 2 | 0 | bsd-2-clause | a81826e4667d4ec195a5524ae05f5b7f972e8ce0 | mrjimenez/arduino_serial | parse_results.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for no formatting cases"
},
{
"role": "assistant",
"content": "import pytest\n\nimport wee_slack\n\n\n@pytest.mark.parametrize(\"text\", [\n \"\"\"\n * an item\n * another item\n \"\"\",\n \"* Run this co... | python | new_file | 1 | 1 | mit | fb5612d641296a022a869bd0a4b9a0aed9255e51 | wee-slack/wee-slack,rawdigits/wee-slack,trygveaa/wee-slack | _pytest/test_formatting.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: gpu: Add WebGL robustness telemetry test\n\nThis patch adds a telemetry-based WebGL robustness test. It executes an\noptional test from the WebGL conformance test suite to trigger a GPU\ncontext loss and verifies this doesn't crash the brows... | python | new_file | 1 | 1 | bsd-3-clause | 08f6fb805938b89ede5cb69eed9929d32104278b | anirudhSK/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,patrickm/chromium.src,ond... | content/test/gpu/gpu_tests/webgl_robustness.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add problem 33, digit cancelling fractions"
},
{
"role": "assistant",
"content": "from time import time\nimport fractions\n\n\ndef digit_cancel():\n digit_cancelling_fractions = []\n for numerator in range(10, 100):\n ... | python | new_file | 5 | 9 | mit | b877cbafc3bf3a1109b168a2a9a7c0bb1da476da | dimkarakostas/project-euler | problem_33.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for network CIA installation using FBI"
},
{
"role": "assistant",
"content": "import os, socket, sys, struct, getopt\n\ndef sendfile(filename, ip):\n\tstatinfo = os.stat(filename)\n\tfbiinfo = struct.pack('!q', statinf... | python | new_file | 1 | 8 | mit | 9ebe165f7534539012eddb70e8e4ba5b73280ce0 | cpp3ds/cpp3ds,cpp3ds/cpp3ds,cpp3ds/cpp3ds,cpp3ds/cpp3ds | scripts/sendfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the ability to do basic testing locally"
},
{
"role": "assistant",
"content": "import BaseHTTPServer\nimport sys\nimport time\nimport json\nfrom irc_hooky.github.main import handler as gh_handler\n\n\nHOST_NAME = sys.argv[1]\... | python | new_file | 1 | 2 | mit | 153d7c34d89ec4b9af525abebddad9fa83377594 | marvinpinto/irc-hooky,marvinpinto/irc-hooky | server.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first monitoring state - experimental"
},
{
"role": "assistant",
"content": "'''\nDisk monitoring state\n\nMonitor the state of disk resources\n'''\n\ndef status(name, max=None, min=None):\n '''\n Return the current dis... | python | new_file | 4 | 16 | apache-2.0 | f93aaab606f799e338de1b1161ee5cdf50405c24 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/states/disk.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for modified RegexValidator"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nimport project.teams.models\nimport dj... | python | new_file | 1 | 0 | mit | fc245d78542b9468174d0abb282a35272374a626 | compsci-hfh/app,jonsimington/app,jonsimington/app,compsci-hfh/app | project/teams/migrations/0008_auto_20150907_1914.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the answer to the fifth question of Assignment 3"
},
{
"role": "assistant",
"content": "\"\"\" Q5- Define a function isVowel(char) that returns True if char is a vowel ('a', 'e', 'i', 'o', or 'u'), and False\notherwise. You c... | python | new_file | 1 | 5 | mit | 7a12c23c59dddbefa201644bf52260d3ad812842 | SuyashD95/python-assignments | isVowel.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Update migrations to match current model"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.4 on 2017-08-20 01:05\nfrom __future__ import unicode_literals\n\nfrom django.db import migration... | python | new_file | 1 | 0 | mit | 33f9196d69ad9d7fa6b45b41f0110780e1ab6c5f | xfxf/veyepar,CarlFK/veyepar,xfxf/veyepar,xfxf/veyepar,CarlFK/veyepar,CarlFK/veyepar,CarlFK/veyepar,xfxf/veyepar,xfxf/veyepar,CarlFK/veyepar | dj/main/migrations/0009_auto_20170820_0105.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add naive code for generating and rendering casual model and state graph visualization"
},
{
"role": "assistant",
"content": "from graphviz import Digraph\n#Add the path of graphviz to render the graph\nimport os\nos.environ[\"PA... | python | new_file | 1 | 0 | mit | b7e0a6767445acb856661238d3e73e6aa514e360 | Kaleidophon/puzzled-platypus | plot_graph.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add decision tree helper functions"
},
{
"role": "assistant",
"content": "def http://www.arthotel.bg/premium-paket-vino-i-lyubovmode(dataset):\n counts = { 0: 0, 1:0 }\n for entity in dataset:\n counts[entity[0]]++\n... | python | new_file | null | null | mit | 53e082344a85544fae84c6ffc2ad221dc33a184f | victoria92/survival-predictor,victoria92/survival-predictor | algorithms/decision_tree.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add filter program to remove small polygons"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\n# Polyfilter - filters polygon files for very small polygons\n\nimport sys\n\nf = open(sys.argv[1])\n\ndef PolygonArea(corner... | python | new_file | 2 | 2 | mit | d08b0a11176225302b01657e9d396066923ae7ce | jmacarthur/ld34,jmacarthur/ld34,jmacarthur/ld34 | polyfilter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to fix plugins with vim.org ID duplicates\n\nSummary:\nIf you look at vimawesome.com/?p=3 right now, you will see many duplicated\n\"taglist.vim\" plugins.\n\nA long time ago, when we scraped a github repo whose homepage was a vim... | python | new_file | 4 | 0 | mit | 3008cfd977fa265c6069231436f103e6be801929 | vim-awesome/vim-awesome,divad12/vim-awesome,starcraftman/vim-awesome,shaialon/vim-awesome,starcraftman/vim-awesome,shaialon/vim-awesome,vim-awesome/vim-awesome,divad12/vim-awesome,vim-awesome/vim-awesome,starcraftman/vim-awesome,jonafato/vim-awesome,jonafato/vim-awesome,divad12/vim-awesome,jonafato/vim-awesome,vim-awes... | db/migrations/dedupe_vimorg_id.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test response oject for dict into dict into dict"
},
{
"role": "assistant",
"content": "from nose.tools import eq_\n\nfrom buffer.response import ResponseObject\n\ndef test_reponse_check_for_inception():\n '''\n Given a dict ... | python | new_file | 1 | 1 | mit | d1a5402bfa8779e3857ce4330b1a9e7b0baec153 | vtemian/buffpy,bufferapp/buffer-python | buffer/tests/test_response.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add letter logo for environment agency\n\nDepends on:\nhttps://github.com/alphagov/notifications-template-preview/pull/87"
},
{
"role": "assistant",
"content": "\"\"\"empty message\n\nRevision ID: 0160_another_letter_org\nRevises... | python | new_file | 1 | 2 | mit | f0f3e03931560106276be9d9054127cdab6e0d5d | alphagov/notifications-api,alphagov/notifications-api | migrations/versions/0160_another_letter_org.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add bathy download script for Gulf"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n\"\"\"Simple implementation of a file fetcher\"\"\"\n\nimport sys\nimport os\nimport urllib\nimport subprocess\n\ndef get_bathy(ur... | python | new_file | 5 | 12 | mit | 75973597cc2542d589033eecc9169f09fec57857 | mandli/surge-examples | gulf/bathy/get_bathy.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution to lintcode question 170"
},
{
"role": "assistant",
"content": "# Definition for singly-linked list.\n# class ListNode:\n# def __init__(self, x):\n# self.val = x\n# self.next = None\n\nclass Solut... | python | new_file | 1 | 5 | mit | 0170835d59519a7f69badf17d0be6bc49f92ea58 | Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode | lintcode/Medium/170_Rotate_List.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add db model for TestMessage database\n\nSummary:\nAdds a model for the testmessage table and support for getting the\nmessage\n\nDepends on D206477\nDepends on D206407\n\nReviewers: anupc, paulruan\n\nReviewed By: paulruan\n\nSubscribers: c... | python | new_file | 1 | 2 | apache-2.0 | 2d8648a9295a49c03cdb0d8afa19629f89ae08bc | dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes | changes/models/testmessage.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create tags test. test for create single tag and create tag in category"
},
{
"role": "assistant",
"content": "# tests/test_vendor.py\n\n\nimport unittest\n\nfrom tests.base import BaseTestCase\nfrom project.models import LineIte... | python | new_file | 3 | 1 | mit | 85378ec16884089074c527d05da564d596f07bef | paris3200/flask-inventory,paris3200/flask-inventory,cisko3000/flask-inventory,cisko3000/flask-inventory,cisko3000/flask-inventory,paris3200/flask-inventory | tests/test_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add (currently empty) test placeholder."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# Copyright 2020 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f... | python | new_file | 1 | 1 | apache-2.0 | de75d383b9b6461c25e71bcc71958282d2265147 | chronicle/api-samples-python | googleapis/rules/rule_lib_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add inventory job creation command"
},
{
"role": "assistant",
"content": "import boto\nimport datetime\n\nclass CommandCreateInventoryJobForVault(object):\n\n def execute(self, args, config):\n glacier_connection = boto.conne... | python | new_file | 3 | 6 | mit | 4bde5fdb6eb8d87be42621c8c5ec9d68e5810d3a | carsonmcdonald/glacier-cmd | glaciercmd/command_create_inventory_job_for_vault.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for native postgres JSON type"
},
{
"role": "assistant",
"content": "\"\"\"Use native postgres JSON type for Entry.content\n\nRevision ID: 588336e02ca\nRevises: 2b7f5e38dd73\nCreate Date: 2014-01-09 22:40:07.690000\... | python | new_file | 1 | 1 | mit | dd7686b609245c4c37364167603a7b5b0165ebbc | streamr/marvin,streamr/marvin,streamr/marvin | migrations/versions/588336e02ca_use_native_postgres_json_type_for_entry_.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Input and Output virtual devices"
},
{
"role": "assistant",
"content": "class Output:\n \"\"\"A device which prints whatever gets passed to it\"\"\"\n def write(self, index, value):\n print(value)\n\n def re... | python | new_file | 1 | 2 | bsd-3-clause | 57222e314e78cf5a2894112dc05892a08a297b52 | darbaga/simple_compiler | virtual_devices.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [WIP] Add push urls unit test"
},
{
"role": "assistant",
"content": "# coding=utf-8\n\nfrom django.test.client import Client\nfrom django.test import TestCase\nfrom push.views import *\n\nclass UrlResolveTests(TestCase):\n def... | python | new_file | 2 | 1 | apache-2.0 | 3d96b070af8c954c9132f3986e598a0c4f37f570 | nnsnodnb/django-mbaas,nnsnodnb/django-mbaas,nnsnodnb/django-mbaas | push/tests/test_urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a basic test for follow_file()\n\nSigned-off-by: Jason Bernardino Alonso <<EMAIL>>"
},
{
"role": "assistant",
"content": "\"\"\"\nTests for dhcp2nest.util\n\"\"\"\nfrom nose.tools import with_setup, eq_\nfrom tempfile import ... | python | new_file | 1 | 1 | mit | db94954ccd03d27324ce142009093fdaeca83e98 | jbalonso/dhcp2nest | tests/test_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Use processor to implement page generating time"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\r\n\r\n\r\n##############################\r\n# Reqirement:\r\n# pip install web.py\r\n##############################\... | python | new_file | 1 | 5 | apache-2.0 | f8ab7808643358d1c01a8d6d75a3ccdbf7b83fbd | goncha/webpy-examples | app-page-generating-time.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for lib.unzip"
},
{
"role": "assistant",
"content": "# Run the following command to test:\n#\n# (in /usr/local/googkit)\n# $ python -m {test_module_name}\n#\n# See also: http://docs.python.org/3.3/library/unitt... | python | new_file | 3 | 1 | mit | bd6a5843b1e1ec38959655e93082e96c9cbf501d | googkit/googkit,googkit/googkit,googkit/googkit | test/lib/unzip_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test cases for the logger"
},
{
"role": "assistant",
"content": "# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import print_function\nfrom __future__ import unicode_litera... | python | new_file | 1 | 1 | mit | 8a1eb115fec1345587d75b445c9c6cc9bc1ac1a1 | thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader | test/test_logger.py | rejected_duplicate | Near-duplicate of sample 6033 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for Django 2.0"
},
{
"role": "assistant",
"content": "# Generated by Django 2.0 on 2017-12-08 13:13\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ... | python | new_file | 1 | 0 | mit | af7db45b89352421be479af74db0469b63cc8717 | mimischi/django-clock,mimischi/django-clock,mimischi/django-clock,mimischi/django-clock | clock/users/migrations/0005_auto_20171208_1413.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an integration test to satisfy Travis"
},
{
"role": "assistant",
"content": "\"\"\"\n\"\"\"\n\nfrom zazo import main\n\ndef test_main(capsys):\n retval = main()\n\n assert retval == 0\n assert capsys.readouterr() == ... | python | new_file | 1 | 1 | mit | 3765426ca0afa7e54e95d64831ff12e65c2a92e8 | pradyunsg/zazo,pradyunsg/zazo | tests/integration/test_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for enums module."
},
{
"role": "assistant",
"content": "\"\"\"\n test_enums\n ~~~~~~~~~~\n\n Contains tests for the :mod:`~adbwp.enums` module.\n\"\"\"\nimport pytest\n\nfrom adbwp import enums\n\n\n@pytest.ma... | python | new_file | 1 | 1 | apache-2.0 | 88cfa6ef3d04e9c2bb8bb0757479d1d191b27059 | adbpy/wire-protocol | tests/test_enums.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Put xpdAcq startup script under version control."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n##############################################################################\n#\n# xpdacq by Billinge Gro... | python | new_file | 13 | 0 | bsd-2-clause | f05a522301e09b7577959490f8527a226d289d57 | NSLS-II-XPD/ipython_ophyd,NSLS-II-XPD/ipython_ophyd | profile_collection/startup/99-start-xpdacq.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for changing ordering of Family field."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrati... | python | new_file | 3 | 0 | bsd-3-clause | 39d81fe577d6201b320e84617317170ac5264394 | ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio | genealogio/migrations/0022_auto_20160228_1652.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Front Gate Manager python file"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\nimport urllib2\nimport RPi.GPIO as GPIO\nfrom time import sleep\n\nclass Sonos:\n apiPort = 5005\n apiHost = '127.0.0.1'... | python | new_file | 11 | 4 | mit | f67a6748b7282cbc256423b3c98c3321d4c028c0 | tdlm/front_gate_pi | FrontGateManager.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Change label for date fields"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n d... | python | new_file | 1 | 0 | mit | a61be6f1106764f3da4c66f37ef8a768208ff9b3 | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/glamkit-collections,ic-labs/django-icekit,ic-labs/glamkit-collections | glamkit_collections/contrib/work_creator/migrations/0008_auto_20161114_1240.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport extlib.vimlparser\n\n\nclass Parser(object):\n def __init__(self, plugins=None):\n \"\"\" Initialize Parser with the specified plugins.\n The plugins can add attributes to the AST.\n \"\"\"\n self.plugi... | python | edit | 1 | 2 | mit | 232c0a600946e2a679947fe638938e56d2fa7709 | RianFuro/vint,Kuniwak/vint,RianFuro/vint,Kuniwak/vint | vint/ast/parsing.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unittest for the YAMLReporter"
},
{
"role": "assistant",
"content": "import yaml\nimport time\n\nfrom twisted.trial import unittest\n\nfrom ooni.reporter import YAMLReporter\n\nclass MockTest(object):\n _start_time = time.... | python | new_file | 1 | 3 | bsd-2-clause | 8484bfe2870968e43c46b764688202d3c74213c0 | Karthikeyan-kkk/ooni-probe,lordappsec/ooni-probe,kdmurray91/ooni-probe,0xPoly/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,juga0/ooni-probe,0xPoly/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,juga0/ooni-probe,juga0/ooni-probe,kdmurray91/ooni-probe,lordappsec/ooni-probe,Karthikeyan-kkk/ooni-... | ooni/tests/test_reporter.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.