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: Create script to convert from old FAST{A,Q} name format to new one (as of Casava 1.8)."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n\nimport functools\nimport re\nimport argparse\n\nfrom khmer import ReadParser... | python | new_file | 1 | 2 | bsd-3-clause | 2fc3767b42b556afcd5d0f34b6cb86d71a79aa51 | kdmurray91/khmer,jas14/khmer,F1000Research/khmer,souravsingh/khmer,F1000Research/khmer,souravsingh/khmer,souravsingh/khmer,jas14/khmer,Winterflower/khmer,ged-lab/khmer,ged-lab/khmer,jas14/khmer,Winterflower/khmer,F1000Research/khmer,Winterflower/khmer,kdmurray91/khmer,ged-lab/khmer,kdmurray91/khmer | sandbox/to-casava-1.8-fastq.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Move migration 21 to it's proper file"
},
{
"role": "assistant",
"content": "import json\n\nfrom raiden.storage.sqlite import SQLiteStorage\n\nSOURCE_VERSION = 20\nTARGET_VERSION = 21\n\n\ndef _transform_snapshot(raw_snapshot: st... | python | new_file | 1 | 9 | mit | 7531ed0c9ae25f04884250c84b39a630ae7ef34b | hackaugusto/raiden,hackaugusto/raiden | raiden/storage/migrations/v20_to_v21.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unique cad name tests"
},
{
"role": "assistant",
"content": "# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Integration tests for custom attribute def... | python | new_file | 1 | 1 | apache-2.0 | 0c669b20b021b07fde251b7b005f2877da1b7202 | AleksNeStu/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,kr41/ggrc-core,VinnieJohns/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,josthkko/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,AleksNeStu/... | test/integration/ggrc/models/test_cad.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport version\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nwith open('requirements.txt') as f:\n requirements = f.read().splitlines()\n\nsetup(name='ro... | python | edit | 1 | 0 | apache-2.0 | 15db0f300b23693160872754a57cb3afc1944a07 | Accruent/zoomba,Accruent/zoomba | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for latex output"
},
{
"role": "assistant",
"content": "\"\"\"\nunit tests of the latex writer\n\"\"\"\n\nimport unittest\nimport subprocess\nimport tempfile\nimport os\nimport sys\nimport BeautifulSoup\n\nfrom pyt... | python | new_file | 20 | 1 | mit | 30ceb2772b3f6084a613a625160b8fc0da4890b0 | kippr/pyth,pombredanne/pyth,kippr/pyth,prechelt/pyth,brendonh/pyth,prechelt/pyth,eriol/pyth,sheepeatingtaz/pyth | tests/test_writelatex.py | rejected_lint | Too many lint violations: 20 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a couple of basic tests for sanitize_object"
},
{
"role": "assistant",
"content": "from bugsnag.utils import sanitize_object\n\ndef test_sanitize_object():\n filters = [\"password\", \"credit_card\"]\n crazy_dict = {\n ... | python | new_file | 1 | 1 | mit | bf621217d9ccb605ec16afb20852485b1708ce79 | overplumbum/bugsnag-python,overplumbum/bugsnag-python,bugsnag/bugsnag-python,bugsnag/bugsnag-python | tests/test_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test cases for format module"
},
{
"role": "assistant",
"content": "from unittest.mock import MagicMock, patch\n\nimport pytest\nfrom hypothesis_auto import auto_pytest_magic\n\nimport isort.format\n\nauto_pytest_magic(isort.... | python | new_file | 1 | 1 | mit | fef896afa8a763fdd93bc52e6d47a69f7dda5f9b | PyCQA/isort,PyCQA/isort | tests/test_format.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add even numbers between two numbers exercise"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfirst = input(\"Write a number: \")\nsecond = input(\"Write another number: \")\n\nfor x in ra... | python | new_file | 2 | 0 | apache-2.0 | cc283447dc2c7d70387a8d11f1cc7fdc06bf9dbe | MindCookin/python-exercises | chapter02/evenNumbersBetweenTwoNumbers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test-case for multiple-inheritance on an array-scalar."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\" Test printing of scalar types.\n\n\"\"\"\n\nimport numpy as np\nfrom numpy.testing import TestCase,... | python | new_file | 1 | 1 | bsd-3-clause | 3a64972a6220764582b31a6ad3f354e9b1259264 | leifdenby/numpy,gmcastil/numpy,BabeNovelty/numpy,kiwifb/numpy,groutr/numpy,tynn/numpy,njase/numpy,mhvk/numpy,Dapid/numpy,rgommers/numpy,sinhrks/numpy,WarrenWeckesser/numpy,rudimeier/numpy,larsmans/numpy,mhvk/numpy,GrimDerp/numpy,gfyoung/numpy,SiccarPoint/numpy,AustereCuriosity/numpy,Eric89GXL/numpy,WarrenWeckesser/nump... | numpy/core/tests/test_scalarinherit.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix User object attribute reference"
},
{
"role": "assistant",
"content": "#\n# Copyright 2012 Cisco Systems, Inc.\n#\n# Author: Soren Hansen <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");... | python | new_file | 1 | 1 | apache-2.0 | 74e08aa31375c0d368d9cb4719e8c3766ea20b78 | sorenh/python-django-repomgmt,sorenh/python-django-repomgmt | repomgmt/management/commands/add-key-to-user.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Move iterator tests into separate file"
},
{
"role": "assistant",
"content": "from unittest import TestCase, main\nimport re\nfrom uuid import UUID\n\nfrom jsonrpcclient.id_iterators import hex_iterator, uuid_iterator, \\\n ra... | python | new_file | 3 | 1 | mit | 821911ae6e46bf8e180c9f582b5112dc1942777f | bcb/jsonrpcclient | test/unit/test_id_iterators.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add modern Greek language toolkit module."
},
{
"role": "assistant",
"content": "\"\"\" This module offers a number tools for processing modern Greek text. \"\"\"\n\ndef normalize(text):\n \"\"\" Remove intonation from Greek t... | python | new_file | 1 | 2 | mit | 52a483fd26fee44e387067f7efa270ad1c8df571 | theovasi/browsewiki,theovasi/browsewiki,theovasi/browsewiki | toolset/mogreltk.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a toy server to use in tests"
},
{
"role": "assistant",
"content": "from twisted.web.server import Site\nfrom twisted.internet import reactor\nfrom twisted.internet.defer import inlineCallbacks, returnValue\n\nfrom klein impo... | python | new_file | 1 | 1 | bsd-3-clause | b1ed5c94d3ba4f47202c4f4e23ff0d2837894c85 | praekelt/vumi-http-retry-api,praekelt/vumi-http-retry-api | vumi_http_retry/tests/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 438. Find All Anagrams in a String\n\n438. Find All Anagrams in a String: https://leetcode.com/problems/find-all-anagrams-in-a-string/"
},
{
"role": "assistant",
"content": "class Solution(object):\n def fi... | python | new_file | 2 | 7 | apache-2.0 | ee0745bee8a73b5ee579d7e34f2975295b72e51b | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/find-all-anagrams-in-a-string.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Revert \"Removed unneeded WSGI file\"\n\nThis reverts commit 078f9ecdba5eedd957fa88af8bc45ed1ad8a3e6e."
},
{
"role": "assistant",
"content": "\"\"\"\nWSGI config for Bitket project.\n\nThis module contains the WSGI application us... | python | new_file | 1 | 0 | mit | d324d9dd8d738c59cc27e4b429107a0218310d6c | ovidner/bitket,ovidner/bitket,ovidner/bitket,ovidner/bitket | bitket/wsgi.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add bcbio project summary metrics -> CSV converter."
},
{
"role": "assistant",
"content": "from __future__ import print_function\nfrom argparse import ArgumentParser\nimport yaml\n\nif __name__ == \"__main__\":\n parser = Argu... | python | new_file | 1 | 0 | mit | e36e1fb1358123d70d1d580fdd9c00a0a6712f59 | roryk/junkdrawer,roryk/junkdrawer | bcbio/project-summary-to-csv.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve Code Fights swap adjacent bits problem"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Code Fights Swap Adjacent Bits (Core) Problem\n\n\ndef swapAdjacentBits(n):\n # even = n & 0xaaaaaaaa # mask to ke... | python | new_file | 1 | 3 | mit | 7eaef25771840ceb9974814a1e68916017016082 | HKuz/Test_Code | CodeFights/swapAdjacentBits.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add module for hadoop execution"
},
{
"role": "assistant",
"content": "import threading, subprocess\n\nhostname = \"star@192.168.122.10\"\n\ndef start_hadoop(path, args, callback):\n command = [\"ssh\", hostname, \"hadoop\", \... | python | new_file | 1 | 1 | mit | 96223421604171d2c98deab03de2256c20ad1c38 | pbl-cloud/paas-manager,pbl-cloud/paas-manager,pbl-cloud/paas-manager | paas_manager/hadoop_modules.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test dimension perserving for persistence."
},
{
"role": "assistant",
"content": "import os.path\nimport shutil\nimport numpy as np\nimport blaze as blz\n\ndef test_perserve():\n shape = (3,4)\n arr = np.ones(shape)\n\n ... | python | new_file | 3 | 2 | bsd-2-clause | c2116148b8e1d7cfbf6c260c878d199bc6d39ac5 | seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core | blaze/tests/test_disk_dimension.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for the threading mechanism"
},
{
"role": "assistant",
"content": "import threading\n\ndef affiche(nb, nom = ''):\n for i in range(nb): print nom, i\n\na = threading.Thread(None, affiche, None, (200,), {'nom':'threa... | python | new_file | 2 | 2 | mit | 8f34d5a5dd0b7f774d452c75065b64d4c28d4082 | baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite | ObjectTracking/testThreading.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add in setup application file to handle the app setup so that it can be used with browser testing as well"
},
{
"role": "assistant",
"content": "from flask import Flask, g\nfrom inspect import getmembers, isfunction\nfrom happymo... | python | new_file | 1 | 4 | apache-2.0 | 90e6dd52a202c2503c1c4881f70b1c13b68147dc | rackerlabs/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork | pitchfork/setup_application.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first tests for PurchasingProfileBuilder and stubs for PurchasingProfileGenerator and ProductCategoryMarkovModelGenerator"
},
{
"role": "assistant",
"content": "import unittest\n\nfrom algorithms.markovmodel import MarkovMode... | python | new_file | 1 | 2 | apache-2.0 | 0c124f11e9c22cc739b82e8b089f0b85af90de4c | rnowling/bigpetstore-data-generator,rnowling/bigpetstore-data-generator,rnowling/bigpetstore-data-generator | src/python/tests/generators/test_purchasing_profile_generator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration to delete hanging bundle auths"
},
{
"role": "assistant",
"content": "from django.db import migrations\n\n\ndef delete_hanging_bundle_auths(apps, schema_editor):\n Authorization = apps.get_model(\"users\", \"Auth... | python | new_file | 1 | 1 | mit | 25692e7b89c6c3e79f608f5bfca98d6b58825874 | WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight | TWLight/users/migrations/0062_delete_hanging_userless_bundle_auths.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: tests: Add test for cmath module."
},
{
"role": "assistant",
"content": "# test the functions imported from cmath\n\ntry:\n from cmath import *\nexcept ImportError:\n print(\"SKIP\")\n import sys\n sys.exit()\n\n# mak... | python | new_file | 13 | 0 | mit | ae3150cb5c7d39da1a3b4cd70fdfb92d36b9ce57 | slzatz/micropython,hiway/micropython,kostyll/micropython,pozetroninc/micropython,jimkmc/micropython,dmazzella/micropython,tobbad/micropython,orionrobots/micropython,puuu/micropython,AriZuu/micropython,turbinenreiter/micropython,paul-xxx/micropython,warner83/micropython,matthewelse/micropython,puuu/micropython,trezor/mi... | tests/float/cmath_fun.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add qiprofile imaging sync test case."
},
{
"role": "assistant",
"content": "from datetime import datetime\nfrom mongoengine import connect\nfrom nose.tools import assert_equal\nfrom qiprofile_rest_client.model.subject import Sub... | python | new_file | 8 | 1 | bsd-2-clause | cc8fd9051e086fdf51d5ca5a20c85544a789fa22 | ohsu-qin/qipipe | test/unit/qiprofile/test_imaging.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add drop hints script from Noto"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n#\n# Copyright 2014 Google Inc. All rights reserved.\n# Copyright 2021 The Google Font Tools Authors\n#\n# Licensed under the Apache L... | python | new_file | 6 | 4 | apache-2.0 | ce131fc380d8717ade6058e5dd8e65b3ce4e0a7d | googlefonts/gftools,googlefonts/gftools | bin/gftools-drop-hints.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to migrate relative disk paths to absolute\n\nPreviously disk paths were relative to BETTY_IMAGE_ROOT/MEDIA_ROOT, now they absolute."
},
{
"role": "assistant",
"content": "from optparse import make_option\nimport os.pa... | python | new_file | 3 | 9 | mit | cb5ec479fbe4bc70b2501d1ab885c9d0a7d26567 | theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper | betty/cropper/management/commands/make_disk_storage_paths_absolute.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Reset the emisson state as well\n\nSimilar to 96eff63790e28741f45f0875fe888687b803eb6e but for emission users.\nIdeally this should only include the analysis_db, but we need the pipeline\ninfo, and Josh created two extra collections for the ... | python | new_file | 2 | 1 | bsd-3-clause | db4d3a226dbebcb0a2cd89d02362293e2f80082e | sunil07t/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server | bin/reset_analysis_database.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example script for using the REST API to get the 20 of a users' friends and their latest status.\n\nSigned-off-by: Robert Dempsey <<EMAIL>>"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\... | python | new_file | 1 | 2 | mit | 0eb0fbb222d4e03257ffeab7c24a5fe9fcee14f1 | rdempsey/web-scraping-data-mining-course,rdempsey/web-scraping-data-mining-course,rdempsey/web-scraping-data-mining-course | week4/tweepy_rest_api_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Convert literate coffeescript in to regular coffeescript"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python -w\n\nimport itertools, re\n\ndef print_docs(docs_, outfp):\n '''print out docs, skipping the hashes for lea... | python | new_file | 1 | 6 | unlicense | 84e646f9bf94e50e0fcb344fa18beaaaafe4c1a2 | cporter/Random | scripts/de-lit.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: feat: Add a script which contains a function that takes a string with street name as an argument and should return the fixed name"
},
{
"role": "assistant",
"content": "\"\"\"\nYour task in this exercise has two steps:\n\n- audit... | python | new_file | 1 | 6 | mit | a292fff44aff6eb4f971aff3ccf3d3871ec68836 | aguijarro/DataSciencePython | DataWrangling/CaseStudy/audit.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simplified 1-99 example, extracted from number_words.py"
},
{
"role": "assistant",
"content": "#\n# one_to_ninety_nine.py\n#\n# Copyright 2021, Paul McGuire\n#\n# Parser/evaluator for expressions of numbers as written out in ... | python | new_file | 1 | 2 | mit | f28e4ac920454b34d6290959eba650702d08fd85 | pyparsing/pyparsing,pyparsing/pyparsing | examples/one_to_ninety_nine.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add timeout test (packet drop scenario.)"
},
{
"role": "assistant",
"content": "import mpipe\nimport time\n\ndef echo(value):\n time.sleep(0.125)\n print(value)\n return True\n\npipe2 = mpipe.Pipeline(mpipe.OrderedStage(... | python | new_file | 1 | 7 | mit | 7b08257332d227f039849553402483a7b0c97a41 | vmlaker/mpipe | test/packetdrop.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add n9k IP iptables block\n\nChange-Id: Ife7168aebd5de6d017c48d3d7b6b1a0227c25f7c"
},
{
"role": "assistant",
"content": "def start(context, log, args):\n import time\n\n duration = args['duration']\n period = 20\n\n n... | python | new_file | 1 | 4 | apache-2.0 | 45bdbad2aac5aaf78ef12cb0ea87d7e5212939d3 | CiscoSystems/os-sqe,CiscoSystems/os-sqe,CiscoSystems/os-sqe | lab/disruptors/n9k_ip_block.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for entity->biluo transformation"
},
{
"role": "assistant",
"content": "from __future__ import unicode_literals\n\nfrom ...gold import biluo_tags_from_offsets\nfrom ...vocab import Vocab\nfrom ...tokens.doc import Doc\n... | python | new_file | 1 | 1 | mit | 2163fd238f01681dc101b5f3e06556ff21473597 | recognai/spaCy,spacy-io/spaCy,raphael0202/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,raphael0202/spaCy,banglakit/spaCy,aikramer2/spaCy,banglakit/spaCy,aikramer2/spaCy,honnibal/spaCy,oroszgy/spaCy.hu,banglakit/spaCy,explosion/spaCy,recognai/spaCy,Gregory-Howard/spaCy,banglakit/spaCy,explosion/spaCy,rapha... | spacy/tests/gold/test_biluo.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add management command to generate SQL constraints for SHARE versioning"
},
{
"role": "assistant",
"content": "from django.apps import apps\nfrom django.core.management.base import BaseCommand\nfrom django.db.migrations import Mi... | python | new_file | 1 | 4 | apache-2.0 | 1c91f8112988b81af7440fc6e15e03dafc9ff680 | laurenbarker/SHARE,zamattiac/SHARE,laurenbarker/SHARE,zamattiac/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,laurenbarker/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,CenterForOpenScience/SHARE,zamattiac/SHARE | share/management/commands/build_views.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create TPR when watching it and not present in cluster yet"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8\nfrom __future__ import absolute_import\n\nimport six\n\nfrom .common import ObjectMeta\... | python | new_file | 1 | 0 | apache-2.0 | 15e3c99f478596b93e022d8f917c8bc1774ddba1 | fiaas/k8s | k8s/models/third_party_resource.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add wrapper functions for youtube-dl"
},
{
"role": "assistant",
"content": "# vim: fileencoding=utf-8\n\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport sys\nimport re\nimport subprocess a... | python | new_file | 1 | 4 | mit | 26bcb00d983a08e1dbc38d78934d7b363d394544 | east825/youtube-dl-gui | src/viewer/youtubedl_util.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to assist in packaging."
},
{
"role": "assistant",
"content": "\"\"\"This tool sets up a distribution of the software by automating\nseveral tasks that need to be done.\n\nThe directory should be in pristine condition ... | python | new_file | 1 | 0 | mit | b044ba312b126cb17bf906b1984e7b407509fcc6 | davidalber/Geneagrapher,davidalber/Geneagrapher | Geneagrapher/makedist.py | rejected_duplicate | Near-duplicate of sample 6910 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test script for GPIOs"
},
{
"role": "assistant",
"content": "import RPi.GPIO as GPIO\n\nclass Test:\n\n # Mapping\n PINS = {2,3,4,14,15,17,18,27,22,23,24,10,9,25,11,8,7,5,6,12,13,19,16,26,20,21}\n\n def __init__(self):\... | python | new_file | 1 | 2 | mit | cbe1889e2c575e91488d29e757eb8c2cad155ce4 | tchapi/pianette,tchapi/pianette,tchapi/pianette,tchapi/pianette | testGPIO.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for rest api"
},
{
"role": "assistant",
"content": "from rest_framework.test import APITestCase\n\ndef has(d, key):\n if d.get(key) is not None:\n return True\n else:\n return False\n\n\nclass TestAp... | python | new_file | 1 | 2 | mit | cc558a1dc03bb8dec058c80e74e5cbdca7641011 | wkevina/feature-requests-app,wkevina/feature-requests-app,wkevina/feature-requests-app | features/tests/test_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Point class based on GEOS package"
},
{
"role": "assistant",
"content": "class Point(object):\n\n def __init__(self, x, y=None):\n \"\"\"\n The Point object may be initialized with either a tuple, or individu... | python | new_file | 4 | 5 | bsd-3-clause | dd07e43e9bf326ec12b34796d6b1c2b2c802f53b | django-oscar/django-oscar-stores,django-oscar/django-oscar-stores,django-oscar/django-oscar-stores | stores/fields.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add ExceptionLoggingMiddleware: Useful for debugging."
},
{
"role": "assistant",
"content": "class ExceptionLoggingMiddleware(object):\n \"\"\"\n Small middleware that logs exceptions to the console. Useful in local\n de... | python | new_file | 2 | 1 | bsd-3-clause | 8582fd56109440e372215ed06617ae8e7e89f780 | mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks,mozilla/firefox-flicks | flicks/base/middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for finding tests with explicit ana.activated"
},
{
"role": "assistant",
"content": "#!/usr/bin/python3\n\nfrom pathlib import Path\nimport re\nimport shlex\nimport json\n\n\ntests_root_path = Path(\"./tests/regression... | python | new_file | 1 | 0 | mit | a03581a1f64596717a8e4656e285f543cf6b3b77 | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | scripts/test-param-activated.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create tests for tag parsing"
},
{
"role": "assistant",
"content": "\r\nfrom io import BytesIO\r\n\r\nimport pytest\r\n\r\nfrom nbtlib.tag import *\r\n\r\n\r\ntag_parsing_inputs = [\r\n\r\n # Byte tag\r\n (b'\\x00', Byte(0)... | python | new_file | 18 | 1 | mit | 5c65c8f371b253df3e861e1d998d0a174eed3f97 | vberlier/nbtlib | tests/test_tag.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to run all of the programs"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\nfrom __future__ import print_function, unicode_literals\nfrom os import chdir, getcwd, getenv\nfrom subprocess import call\n\nPYTHO... | python | new_file | 3 | 0 | mit | 9fc0733d5a38b7e72855784e9b6819a692dfee2a | rnelson/adventofcode,rnelson/adventofcode,rnelson/adventofcode,rnelson/adventofcode | run2015.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a fixture that yields a requests Mocker() object."
},
{
"role": "assistant",
"content": "\"\"\"Configuration module for pytests\"\"\"\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __fut... | python | new_file | 1 | 2 | mit | 95b71b9b832b3ccf9315f430f753cf133d6621a2 | openspending/gobble | tests/conftest.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve TDA Rational in python"
},
{
"role": "assistant",
"content": "import sys\n\nn = int(sys.stdin.readline())\n\nfor _ in range(n):\n a, _, b, o, c, _, d = sys.stdin.readline().split()\n a, b, c, d = map(int, [a, b, c, d]... | python | new_file | 1 | 0 | mit | 071157e5a752252a7864d5b0ad85fe4c364c1aec | deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr... | solutions/uri/1022/1022.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example script to demonstrate a run with pure Python"
},
{
"role": "assistant",
"content": "\"\"\" The main purpose of this file is to demonstrate running SeleniumBase\n scripts without the use of Pytest by calling the ... | python | new_file | 1 | 0 | mit | f419dce0164d00a56a90fb34f19e2a8adecda584 | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/seleniumspot,mdmintz/seleniumspot,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase | examples/raw_parameter_script.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Migration For Office Hours Locations"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.8 on 2018-04-10 20:18\nfrom __future__ import unicode_literals\n\nfrom django.db import migration... | python | new_file | 1 | 0 | mit | 4938e7e66d187a375db24832c0bfdba79687756e | masschallenge/django-accelerator,masschallenge/django-accelerator | accelerator/migrations/0003_auto_20180410_1618.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to search EC2 instances by instance ID"
},
{
"role": "assistant",
"content": "import sys\nimport json\nfrom subprocess import check_output\n\nfrom xml.etree import ElementTree\nfrom xml.etree.ElementTree import Eleme... | python | new_file | 3 | 3 | mit | 52ab8b2f492b3c7d36b240f577f51e3120fd1302 | saidie/alfred-aws | src/ec2.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add partial backport of Python 3's open() interface"
},
{
"role": "assistant",
"content": "class open(object):\n \"\"\"Wrapper providing key part of Python 3 open() interface.\n\n From IPython's py3compat.py module. License... | python | new_file | 2 | 1 | mit | 086fb81110aeaf2cf16e32e8c9468e7ec06042c4 | krischer/python-future,QuLogic/python-future,krischer/python-future,PythonCharmers/python-future,QuLogic/python-future,PythonCharmers/python-future,michaelpacer/python-future,michaelpacer/python-future | future/builtins/backports/newopen.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a class for representing changes to GameState."
},
{
"role": "assistant",
"content": "from abc import ABCMeta, abstractmethod\n\nclass GameStateChange(object):\n __metaclass__ = ABCMeta\n\n @abstractmethod\n def appl... | python | new_file | 1 | 1 | mit | c39d60870e89e66df46f147a4917f00218b4ad01 | CheeseLord/warts,CheeseLord/warts | src/shared/game_state_change.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add negative API tests for profile validation\n\nAdd negative API tests for profile validation\n\nChange-Id: I3ad3c9d891c857d9c6cfc08dcee2e3762d566115"
},
{
"role": "assistant",
"content": "# Licensed under the Apache License, Ve... | python | new_file | 1 | 1 | apache-2.0 | 1260f2dfd29b007a3fd1954b869a19e631c3c66c | stackforge/senlin,openstack/senlin,openstack/senlin,stackforge/senlin,openstack/senlin | senlin/tests/tempest/api/profiles/test_profile_validate_negative.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution to transcribing DNA into RNA"
},
{
"role": "assistant",
"content": "\"\"\"\nAn RNA string is a string formed from the alphabet containing 'A', 'C', 'G', and 'U'.\n\nGiven a DNA string t corresponding to a coding stra... | python | new_file | 2 | 0 | mit | bc00b0732ef1e8e89f37ff7a9a9d089eff5b85b7 | MichaelAquilina/rosalind-solutions | problem2.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add python program for find first occurance of k"
},
{
"role": "assistant",
"content": "\"\"\"\n== Given a sorted list, find the first occurance of k ==\n\"\"\"\n\ndef find_first(l, k):\n \"\"\" Assumes that 'l' is a list of i... | python | new_file | 3 | 5 | mit | d7bc8c5f7d04c72c49f88d9c6c0a962ba5bc539f | tdeh/quickies,tdeh/quickies | py/1st_k.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add merge migration for GDPR"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.13 on 2018-05-25 20:29\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclas... | python | new_file | 1 | 0 | apache-2.0 | cd57ebb8471094982c4f489b12b397ad3cde0091 | brianjgeiger/osf.io,cslzchen/osf.io,felliott/osf.io,HalcyonChimera/osf.io,cslzchen/osf.io,mfraezz/osf.io,aaxelb/osf.io,sloria/osf.io,felliott/osf.io,mfraezz/osf.io,pattisdr/osf.io,baylee-d/osf.io,icereval/osf.io,HalcyonChimera/osf.io,aaxelb/osf.io,saradbowman/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,Cente... | osf/migrations/0105_merge_20180525_1529.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add helper script to convert all corpora from the relannis/ folder to the data/ folder"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\nimport os\nfrom subprocess import call;\n\nfor d in os.listdir('relannis/'):\... | python | new_file | 1 | 0 | apache-2.0 | 91e4c491dadc4806fa1ca113d8681ee199856243 | thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS | misc/convertAll.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add BlobDB format definitions for AppGlanceSlice and AppGlance"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\n__author__ = 'katharine'\n\n\"\"\"\nThis file is special in that it actually contains d... | python | new_file | 9 | 3 | mit | 63fdc6417888b672bed8d50d8cad9e2506d6b0f2 | pebble/libpebble2 | libpebble2/protocol/appglance.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Field default init test"
},
{
"role": "assistant",
"content": "\"\"\" \nUnit tests for the field module.\n\nThomas Ogden <<EMAIL>>\n\n\"\"\"\n\nimport unittest\n\nfrom maxwellbloch import field\n\nclass TestInit(unittest.Test... | python | new_file | 2 | 1 | mit | 0902e23ba850b4d3a8ba22a93bc90005e37b13b8 | tommyogden/maxwellbloch,tommyogden/maxwellbloch | maxwellbloch/tests/test_field.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Remove unused page/parent fields from Articles"
},
{
"role": "assistant",
"content": "# Generated by Django 2.1.7 on 2019-03-07 02:05\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migrat... | python | new_file | 1 | 0 | mit | 04d2405b560e508a43fcd7b9be8036ea6d9335be | DrDos0016/z2,DrDos0016/z2,DrDos0016/z2 | museum_site/migrations/0026_auto_20190307_0205.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add decorator to apply normalization"
},
{
"role": "assistant",
"content": "\"\"\"Decorators for neurodsp.sim.\"\"\"\n\nfrom functools import wraps\n\nfrom neurodsp.sim.utils import demean, normalize_variance\n\n#################... | python | new_file | 1 | 5 | apache-2.0 | 5cfb870134d40ecc2330ac2ff0b98cea62232c8d | voytekresearch/neurodsp,srcole/neurodsp,srcole/neurodsp | neurodsp/sim/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add module for quick plotting of bmi values."
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\nimport matplotlib.pyplot as plt\n\n\ndef quick_plot(bmi, name, **kwds):\n gid = bmi.get_var_grid(name)\n gtype = bm... | python | new_file | 1 | 3 | mit | a4e4a67b631083535a413d56aaa1afff3b88a67f | csdms/coupling,csdms/coupling,csdms/pymt | pymt/framework/bmi_plot.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for python editor."
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\n\nimport os\nimport sys\n\nfrom traits.testing.unittest_tools import unittest, UnittestTools\n\nfrom ..gui import GUI\nfro... | python | new_file | 3 | 1 | bsd-3-clause | 5e8d869c63154820f67308b4293a156b185fab1f | geggo/pyface,brett-patterson/pyface,geggo/pyface | pyface/tests/test_python_editor.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for the password reset emails"
},
{
"role": "assistant",
"content": "from django.test import TestCase, override_settings\nfrom django.core import mail\n\nfrom wagtail.tests.utils import WagtailTestUtils\nfrom wagtail.wa... | python | new_file | 3 | 1 | bsd-3-clause | 77340cfe9580ec8510f4af9333cf1aba2d09e70b | quru/wagtail,mixxorz/wagtail,timorieber/wagtail,nilnvoid/wagtail,gasman/wagtail,timorieber/wagtail,Klaudit/wagtail,nutztherookie/wagtail,wagtail/wagtail,marctc/wagtail,zerolab/wagtail,jorge-marques/wagtail,nrsimha/wagtail,mayapurmedia/wagtail,rjsproxy/wagtail,takeshineshiro/wagtail,bjesus/wagtail,kurtw/wagtail,ianspric... | wagtail/wagtailadmin/tests/test_password_reset.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to generate data for helping development."
},
{
"role": "assistant",
"content": "''' Generate image and ground truth from the scene, for development purpose '''\n\nfrom unrealcv import client\nimport numpy as np\nimp... | python | new_file | 1 | 2 | mit | f94d5b3c4eb3fff94c98e9efcdffdafa89f4841b | unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv | test/vis_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for crypto endpoints"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"Tests for `tiingo` package.\"\"\"\n\nfrom unittest import TestCase\n\nfrom tiingo import TiingoClient\n\n\n# CRYPTO ENDPOINTS\ncla... | python | new_file | 1 | 1 | mit | 50aacf395fef416781b86bb0c09035f2d7cf129e | hydrosquall/tiingo-python,hydrosquall/tiingo-python | tests/test_crypto.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a Round Carrier board file to the RP2040 Stamp build"
},
{
"role": "assistant",
"content": "from board import *\nimport busio\n\n\n_SPI = None\n_UART = None\n_I2C = None\n\n\nD0 = GP0\nSDA = D0\nD1 = GP1\nSCL = D1\nD8 = GP8\n... | python | new_file | 18 | 2 | mit | d2d3b27822d5773302f2e1cd28de8b231becb5ea | adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython | ports/raspberrypi/boards/solderparty_rp2040_stamp/stamp_round_carrier_board.py | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom oscar.core.loading import get_model\n\n\nclass WeightBasedForm(forms.ModelForm):\n\n class Meta:\n model = get_model('shipping', 'WeightBased')\n fields = ['name', 'description', 'default_we... | python | edit | 1 | 1 | bsd-3-clause | af712fedf4963d66f56f5ab9054318c493572ab1 | okfish/django-oscar,sonofatailor/django-oscar,solarissmoke/django-oscar,sasha0/django-oscar,anentropic/django-oscar,anentropic/django-oscar,solarissmoke/django-oscar,john-parton/django-oscar,sonofatailor/django-oscar,okfish/django-oscar,django-oscar/django-oscar,john-parton/django-oscar,solarissmoke/django-oscar,solari... | src/oscar/apps/dashboard/shipping/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test Collection.list_indexes with multiple batches."
},
{
"role": "assistant",
"content": "# Copyright 2015 MongoDB, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except... | python | new_file | 1 | 2 | apache-2.0 | 661cbfec0f78e37bf6b322b9a59e1b2b1a10c665 | ajdavis/pymongo-mockup-tests | tests/test_list_indexes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: feat(logging): Add a more complex example\n\nThis example shows how to use multiple loggers, multiple output\ndestinations and filters."
},
{
"role": "assistant",
"content": "import logging\n\nclass MyFilter(object):\n\n def _... | python | new_file | 1 | 1 | mit | dd14093e23c651e266752267f98170b73c25dc0a | sblancov/hello_world,sblancov/hello_world,sblancov/hello_world,sblancov/hello_world | python/logging/multiple_files.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to make images file"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n'''\n ====================================================================\n Copyright (c) 2003-2016 Barry A Scott. All rights reserve... | python | new_file | 1 | 4 | apache-2.0 | 94d4d79614a86ddee5f03d60c272558c5acf2397 | barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/git-workbench,barry-scott/scm-workbench,barry-scott/scm-workbench | Source/Scm/make_wb_git_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Remove service.postage and choose_postage permission from database\n\nAlso change constraint on template postage so it cannot be null for\nletters\n\nAlso add postage to all letters in template_history to respect new constraint"
},
{
... | python | new_file | 1 | 1 | mit | 97b1e034b8028aff4566d0dcf24d3e1d41c803e9 | alphagov/notifications-api,alphagov/notifications-api | migrations/versions/0259_remove_service_postage.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for asimov MC analysis."
},
{
"role": "assistant",
"content": "import os\nimport sys\nimport copy\nfrom fermipy.gtanalysis import GTAnalysis\nfrom haloanalysis.fit_funcs import fit_halo\n\nimport numpy as np\nimport it... | python | new_file | 4 | 0 | bsd-3-clause | f27c01b188b1ecbb42bb5b672ef3c95bf2a271a6 | woodmd/haloanalysis,woodmd/haloanalysis | run_mc_asimov_analysis.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic tests for ModelBackend"
},
{
"role": "assistant",
"content": "from django.test import TestCase\n\nfrom django_backend.backend.base.backends import ModelBackend\nfrom django_backend.sitebackend import SiteBackend\n\nfrom... | python | new_file | 1 | 1 | bsd-3-clause | f4082455ebfed1ca878534f13bd2019609131f20 | team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend,team23/django_backend | tests/test_modelbackend.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a ImgurAPI simple interface\n\nThis is just an interface that performs RESTful operations to the Imgur\nAPI."
},
{
"role": "assistant",
"content": "from models.image import Image\nfrom utils.utils import tidy_up_url\n\n\nclas... | python | new_file | 3 | 3 | apache-2.0 | 15de4bbd6ef7e64a7b824eebf9cefb14c474baaf | CharlieCorner/pymage_downloader | src/api/imgur/imgur_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial tests for ccm cli"
},
{
"role": "assistant",
"content": "from . import TEST_DIR\nfrom . import ccmtest\nfrom ccmlib.cluster import Cluster\nimport subprocess\nfrom six import print_\n\nCLUSTER_PATH = TEST_DIR\n\n\ncla... | python | new_file | 3 | 3 | apache-2.0 | 3b8939567bc77407db0179d8e8e72551d1da3798 | pcmanus/ccm,AtwooTM/ccm,jeffjirsa/ccm,thobbs/ccm,tolbertam/ccm,mike-tr-adamson/ccm,spodkowinski/ccm,slivne/ccm,mike-tr-adamson/ccm,thobbs/ccm,mambocab/ccm,mikefero/ccm,mike-tr-adamson/ccm,mikefero/ccm,bcantoni/ccm,jorgebay/ccm,pombredanne/ccm,kishkaru/ccm,pcmanus/ccm,umitunal/ccm,aboudreault/ccm,tolbertam/ccm,josh-mcke... | tests/test_cmds.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a Python json benchmark.\n\nAlas, it's about 3x faster than us, due to being written in C."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport json, sys, time\n\ncount = int(sys.argv[1])\n\nfor n in sys.arg... | python | new_file | 3 | 0 | bsd-3-clause | cbe5617222047bc174e470051b5724f84f70609e | jkarni/aeson,beni55/aeson,nurpax/aeson,lykahb/aeson,roelvandijk/aeson,plaprade/aeson,abbradar/aeson,sol/aeson,dmjio/aeson,sol/aeson,sol/aeson,aelve/json-x,neobrain/aeson,bwo/aeson,timmytofu/aeson,23Skidoo/aeson,JPMoresmau/aeson,neobrain/aeson,roelvandijk/aeson,SeanRBurton/aeson | benchmarks/parse.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for an invalid merge"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nfrom opentreetesting import test_http_json_method, config\nimport sys\n\nDOMAIN = config('host', 'apihost')\nSUBMIT_URI = DOMAIN + '/me... | python | new_file | 1 | 0 | bsd-2-clause | 6b2cb0bfc41a26eb5cb259a66feb937a8564c705 | OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api | ws-tests/test_invalid_merge.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add YAML & JSON Read script"
},
{
"role": "assistant",
"content": "\n\nimport yaml\nimport json\n\nfrom pprint import pprint\n\ndef output_format(my_list, my_str):\n '''\n Make the output easier to read\n '''\n print ... | python | new_file | 6 | 1 | apache-2.0 | be7226c8537809dd551ec68c690cbb6b2cca5a7c | terblac/mypynetcourse | yaml_test/ex7_yam_json_read.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Update comment maxlength to 1000 characters"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.7 on 2017-12-07 19:31\nfrom __future__ import unicode_literals\n\nfrom django.db import migrat... | python | new_file | 1 | 0 | apache-2.0 | a72ba142d7765ee551f74629507211ed48f2c7a6 | CenterForOpenScience/osf.io,TomBaxter/osf.io,pattisdr/osf.io,CenterForOpenScience/osf.io,Johnetordoff/osf.io,brianjgeiger/osf.io,binoculars/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,chennan47/osf.io,mattclark/osf.io,sloria/osf.io,aaxelb/osf.io,HalcyonChimera/osf.io,icereval/osf.io,leb2dg/osf.io,chennan... | osf/migrations/0074_auto_20171207_1331.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add calc area of shapes"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n\n\ndef main():\n shape = input()\n if shape == 'прямоугольник':\n a, b = int(input()), int(input())\n print('{}'.format(a... | python | new_file | 1 | 4 | apache-2.0 | 280f6fa36a204aa170eff3339e2c2fd7d4943491 | fedusia/python | stepik/Programming_on_Python/part1/1.4.shape_area.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: ENH: Add a simple selection example."
},
{
"role": "assistant",
"content": "from vtk import *\n\nfrom vtk import *\n\nsource = vtkRandomGraphSource()\nsource.SetNumberOfVertices(25)\nsource.SetStartWithTree(True)\nsource.SetIncl... | python | new_file | 9 | 0 | bsd-3-clause | e37b6363749cc4194f63d37ce6d5b3c9499a460c | demarle/VTK,biddisco/VTK,hendradarwin/VTK,jmerkow/VTK,ashray/VTK-EVM,aashish24/VTK-old,cjh1/VTK,msmolens/VTK,sankhesh/VTK,daviddoria/PointGraphsPhase1,berendkleinhaneveld/VTK,SimVascular/VTK,demarle/VTK,Wuteyan/VTK,ashray/VTK-EVM,mspark93/VTK,spthaolt/VTK,johnkit/vtk-dev,demarle/VTK,arnaudgelas/VTK,biddisco/VTK,hendrad... | Examples/Infovis/Python/simple_selection.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test case for geolocation."
},
{
"role": "assistant",
"content": "from . import TheInternetTestCase\nfrom helium.api import click, get_driver, S\n\nclass AbTestingTest(TheInternetTestCase):\n\tdef get_page(self):\n\t\treturn ... | python | new_file | 1 | 1 | mit | 6fa314f29d1036a89e43e8a1c7152911f0ffe430 | bugfree-software/the-internet-solution-python | tests/test_geolocation.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to load log parse data into the database"
},
{
"role": "assistant",
"content": "import csv\n\nfrom chemtools.mol_name import get_exact_name\nfrom models import DataPoint\n\n\nwith open(\"data/data.csv\", \"r\") as csvf... | python | new_file | 3 | 0 | mit | 34113a2042bdd4bbb6480a7cc7c0d8ff9b6e7586 | crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp | data/load_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example script with missing constants"
},
{
"role": "assistant",
"content": "import numpy as np\n\nfrom molml.features import Connectivity\nfrom molml.constants import BOND_LENGTHS\n\n# Currently, there are two recommended... | python | new_file | 1 | 0 | mit | cbd8521891c97c1655a3b89863e1a2170d9edc6b | crcollins/molml | examples/missing_constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test case for status codes."
},
{
"role": "assistant",
"content": "from . import TheInternetTestCase\nfrom helium.api import Link, find_all\nfrom httplib import HTTPConnection\nfrom urlparse import urlparse\n\nclass StatusCod... | python | new_file | 4 | 2 | mit | cb7a1654a3bf606a74c8f2cdbdceb4cd4a27d24c | bugfree-software/the-internet-solution-python | tests/test_status_codes.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for object-based conversions between various stellar model formats, including via other formats"
},
{
"role": "assistant",
"content": "from tomso.adipls import load_amdl\nfrom tomso.fgong import load_fgong\nfrom tomso.gy... | python | new_file | 1 | 4 | mit | 172c47ae803691a36d52496f6de74b82707a77f4 | warrickball/tomso | tests/test_conversions.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test runner script for integration with the waterfall\n\nR=<EMAIL>\n\nReview URL: https://codereview.chromium.org/800983002"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# Copyright 2014 The Crashpad Authors... | python | new_file | 4 | 3 | apache-2.0 | 8d0e213213c1f1cb295373f8f50f2215564cd8d4 | Chilledheart/crashpad,hankbao/Crashpad,hokein/crashpad,Chilledheart/crashpad,chromium/crashpad,hokein/crashpad,hankbao/Crashpad,chromium/crashpad,chromium/crashpad,hankbao/Crashpad,atom/crashpad,atom/crashpad,hokein/crashpad,Chilledheart/crashpad,atom/crashpad | build/run_tests.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add routine to calculate enclosed mass."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -----------------------------------------------------------------------------\n# GENHERNQUIST.ENCMASS\n# Laura L Watkins [<EM... | python | new_file | 3 | 1 | bsd-2-clause | c59ccacfa46efd6dde167c5460c4d862e4658061 | lauralwatkins/genhernquist | encmass.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test AutoML usage of Backend to load models"
},
{
"role": "assistant",
"content": "# -*- encoding: utf-8 -*-\nfrom __future__ import print_function\nimport unittest\nimport mock\nfrom autosklearn.automl import AutoML\nfrom autosk... | python | new_file | 1 | 2 | bsd-3-clause | 85aaa8d8ec3bc179729d4a3d731153406560dd2c | automl/auto-sklearn,automl/auto-sklearn,hmendozap/auto-sklearn,hmendozap/auto-sklearn | test/automl/test_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add client grant to db choices"
},
{
"role": "assistant",
"content": "# Generated by Django 2.2.24 on 2021-11-24 19:31\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = ... | python | new_file | 1 | 0 | bsd-3-clause | 47afc368ab508a1b13f936e1cc8c0530dd8175ac | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/motech/migrations/0010_auto_20211124_1931.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add trace config for pox l2_learning switch"
},
{
"role": "assistant",
"content": "from config.experiment_config_lib import ControllerConfig\nfrom sts.topology import StarTopology, BufferedPatchPanel, MeshTopology, GridTopology, ... | python | new_file | 7 | 0 | apache-2.0 | 0f7ae57f269fdce2691358a9a51a3f9e0bcaace0 | jmiserez/sts,jmiserez/sts | config/trace_pox_l2_learning.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utilities for checking inputs\n\nThese functions all uses a consistent style of error reporting, which\nwill be used throughout drudge."
},
{
"role": "assistant",
"content": "\"\"\"Small utilities.\"\"\"\n\nfrom collections.a... | python | new_file | 1 | 4 | mit | 75393b7ff34009aa5cb2993011107882941c949d | tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge | drudge/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add plot for trial durations, needs more work!"
},
{
"role": "assistant",
"content": "import climate\nimport collections\nimport lmj.plot\nimport numpy as np\n\nimport database\nimport plots\n\n\n@climate.annotate(\n root='loa... | python | new_file | 3 | 6 | mit | 444168c4e53283e99c5fb8e0c63585cda97138dd | lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment | analysis/plot-trial-durations.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add qp controller input snooper"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\n''' Listens to QP Controller Inputs and draws, in different but\norder-consistent colors, the cubic splines being followed by each\nbody ... | python | new_file | 6 | 4 | bsd-3-clause | ce0aee46e26f10d247ffcfb15b62df77f507257f | openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro,openhumanoids/oh-distro | software/control/src/qp_controller_input_snooper.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement more sophisticated annotation generation"
},
{
"role": "assistant",
"content": "from indra.assemblers.english import EnglishAssembler\nfrom indra.databases import identifiers\nfrom indra.statements.agent import get_grou... | python | new_file | 3 | 6 | bsd-2-clause | 2274eb1fcc2330188d9b84da261f5a370da61092 | sorgerlab/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,sorgerlab/belpy | indra/sources/hypothesis/annotator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add revenge of the pancakes"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# Google Code Jam\n# Google Code Jam 2016\n# Qualification Round 2016\n# Problem B. Revenge of the Pancakes\n\n# Solved all test sets\n\n... | python | new_file | 1 | 2 | apache-2.0 | 0ebfe4a0777850aa851c7d7bc0f642d692a1515a | laichunpongben/CodeJam | 2016/qualification_round/revenge_of_the_pancakes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration clearing all sessions."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.29 on 2020-05-08 17:49\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n... | python | new_file | 1 | 2 | mit | 8f6b308a9b0f2a4469bae8b844776245e69a8eaf | WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight | TWLight/users/migrations/0056_expire_all_sessions.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add function to checkout a family"
},
{
"role": "assistant",
"content": "\"\"\"\nCopyright [2009-2019] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use thi... | python | new_file | 5 | 1 | apache-2.0 | 20b10fcedc6395dc693185e01fc4c56479660c52 | Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production | scripts/release/rethreshold_family.py | rejected_lint | Too many lint violations: 5 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.