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: *added: Test script for the stress test"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\r\n__author__ = 'sm9'\r\n\r\nimport asyncore, socket\r\nimport string, random\r\nimport struct, time\r\n\r\nHOST = '192.168.0.... | python | new_file | 3 | 4 | mit | 1663cb8557de85b1f3ccf5822fa01758e679ccd7 | zrma/EasyGameServer,zeliard/EasyGameServer,zeliard/EasyGameServer,zrma/EasyGameServer,Lt-Red/EasyGameServer,Lt-Red/EasyGameServer | TestScript/multi_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test utility to look for bad stacksize calculations."
},
{
"role": "assistant",
"content": "import compiler\nimport dis\nimport types\n\ndef extract_code_objects(co):\n l = [co]\n for const in co.co_consts:\n if type... | python | new_file | 6 | 5 | mit | 3a3f529498522dada5e6af6765cd537f47d368d8 | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Tools/compiler/stacktest.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example, Jeffress net with 180 neurons"
},
{
"role": "assistant",
"content": "\"\"\"\nIn this test we create a bigger Jeffress model.\n\n - It consists of 180 output neurons.\n - The axonal delay between the input neurons and... | python | new_file | 5 | 2 | bsd-2-clause | febfaffb2bdbb9529cbb7df004b62ae8a2a07ad0 | timqian/neurons,johannesmik/neurons | tests/test_jeffress_big.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Remove unused fields from model and drop columns from db"
},
{
"role": "assistant",
"content": "\"\"\"Remove unused fields\n\nRevision ID: 1010\nRevises: 1000\nCreate Date: 2017-10-04 15:14:48.532073\n\n\"\"\"\nfrom alembic impor... | python | new_file | 1 | 1 | mit | e6c79dc248d51b38da2d6fa0e92468176b0b21bc | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | migrations/versions/1010_remove_unused_fields.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create small script to compute distance to some US holidays"
},
{
"role": "assistant",
"content": "import pandas as pd\nfrom datetime import date\nimport holidays\n\ndef process_holidays(df):\n year = df['year']\n user_date... | python | new_file | 2 | 7 | mit | 5a2e3da28fa2471d97b5d0e1b3cae76602dc9c79 | davidgasquez/kaggle-airbnb | snippets/list_holidays.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial version of forge download scraper"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors import LinkExtr... | python | new_file | 5 | 4 | apache-2.0 | 14a1e5fb2afe9c372646ce26a9b2b92c517067b3 | jbeda/itzg-dockerfiles,zerocoolys/dockerfiles-1,sekka1/dockerfiles,zerocoolys/dockerfiles-1,jbeda/itzg-dockerfiles,jbeda/itzg-dockerfiles,ajthemacboy/dockerfiles,itzg/dockerfiles,sekka1/dockerfiles,sekka1/dockerfiles,zerocoolys/dockerfiles-1 | minecraft-server/minecraftforge_spider.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for reading and writing avro bytes to hdfs"
},
{
"role": "assistant",
"content": "import posixpath\nimport subprocess\n\nimport numpy as np\nimport pandas as pd\nimport pandas.util.testing as pdt\n\nimport cyavro\n\nfrom... | python | new_file | null | null | apache-2.0 | 2d557b68fd9b7e0e900215afeb5185e466907a49 | danielfrg/libhdfs3.py,danielfrg/libhdfs3.py,danielfrg/cyhdfs3,danielfrg/cyhdfs3 | cyhdfs3/tests/test_avro.py | rejected_code_smell | Internal duplication: ~20% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Write python code for the following: Add the usage example of sqlalchemy ORM."
},
{
"role": "assistant",
"content": "# encoding: utf8\nfrom __future__ import print_function\n\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy import create_engine, Column, Int... | python | new_file | 1 | 1 | mit | 027aa7152e3873c3bfa96c04e4d2ea0b6c345020 | xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet | snippet/example/python/sqlalchemy-orm-example.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 322. Coin Change\n\n322. Coin Change: https://leetcode.com/problems/coin-change/"
},
{
"role": "assistant",
"content": "class Solution(object):\n def coinChange(self, coins, amount):\n \"\"\"\n ... | python | new_file | 2 | 13 | apache-2.0 | 52ca0942faaa52138805f966cb0b242009516a06 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/coin-change.py | rejected_complexity | Cyclomatic complexity too high: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nBase Library (:mod:`ibei`)\n==========================\n\n.. currentmodule:: ibei\n\"\"\"\n\nfrom .version import __version__\nfrom .uibei import uibei\nfrom .sqsolarcell import SQSolarcell\nfrom .devossolar... | python | edit | 4 | 0 | mit | 63709e388ed86892e9771b86daad4a9ec3c0bd44 | jrsmith3/ibei | ibei/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script that moves files to Azure storage using Copy Blob API"
},
{
"role": "assistant",
"content": "import sys\nimport time\nfrom azure.storage import BlobService\nfrom azure import WindowsAzureMissingResourceError\n\nfrom ... | python | new_file | 4 | 0 | mit | 8aaa76b3adb7f7c661eba8d1f4c50e8b0f03fee4 | Smerity/cc-quick-scripts,Smerity/cc-quick-scripts | s3_to_azure/move_files.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add IcedID downloader ida string decoding"
},
{
"role": "assistant",
"content": "def gen_key(k):\r\n\treturn(((k << 0x1d) | (k >> 3)) & 0xffffffff)\r\n\r\n#Unpacked of 32a683ac11d966d73fedf4e249573022891ac902086167e4d20b18be28bd2... | python | new_file | null | null | mit | cd0e3ec8359eeec31ad383310c2bab4588dc095a | sysopfb/Malware_Scripts | IcedID_Downloader/ztrak_downloader_strings_ida.py | rejected_code_smell | Internal duplication: ~86% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Write python code for the following: Add tool-info module for CBMC Path\n\nThis module inherits from CBMC's tool-info module, except that it\nreturns \"CBMC Path\" as the tool name. The --paths switch is specified in\nthe wrapper script `cbmc`, which invokes `cbmc-binary`."
}... | python | new_file | 3 | 1 | apache-2.0 | 8ddda76d25fd2572eccd24353d2347242af063fa | dbeyer/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,dbeyer/benchexec,sosy-lab/benchexec | benchexec/tools/cbmc-path.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to help to refactor source code."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport re,glob,os,sys\n\ndef rename(dir_path, search_pattern):\n for file_path in glob.iglob(os.path.join(dir_path, ... | python | new_file | 6 | 6 | mit | 2a51077d78b7b30a1ca751595b6872b9532b070c | YanShenChun/cppthread,YanShenChun/cppthread,YanShenChun/cppthread | zthread/refactor/rename.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add timing test of password scrambling with pbkdf2, sha-256 and hmac(sha-256)"
},
{
"role": "assistant",
"content": "import binascii, hashlib, hmac, os, time\n\ndef scramble_with_kdf(passw, salt, iters):\n return hashlib.pbkdf... | python | new_file | 1 | 2 | mit | 5b619029441261659bf0f326f784e5322a952096 | reider-roque/crypto-challenges | coursera-crypto-i/w4/pbdkf2_hmac_sha256.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add management command to fill data for given ticket nums\n\n`fill_data` management command takes input file which has a list of\nticket numbers and outputs a csv with all details of given ticket numbers"
},
{
"role": "assistant",
... | python | new_file | 3 | 7 | mit | c3ec949a888896cc2457c391f797c504538bcf51 | nava45/junction,nava45/junction,ChillarAnand/junction,pythonindia/junction,pythonindia/junction,pythonindia/junction,pythonindia/junction,ChillarAnand/junction,ChillarAnand/junction,nava45/junction,nava45/junction,ChillarAnand/junction | junction/tickets/management/commands/fill_data.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test case for Trust Middleware\n\nThis patch adds a test case for Trust Middleware in order to verify its correctness.\n\nChange-Id: I26a65d8ac617e3011dc2be104138e9d177c98c80\nCloses-Bug: #1469947"
},
{
"role": "assistant",
"... | python | new_file | 1 | 1 | apache-2.0 | e86c87f4d97677f18522321ca06f79373722a610 | stackforge/senlin,openstack/senlin,Alzon/senlin,openstack/senlin,tengqm/senlin-container,openstack/senlin,tengqm/senlin-container,Alzon/senlin,stackforge/senlin | senlin/tests/middleware/test_trust_middleware.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test module for tools module"
},
{
"role": "assistant",
"content": "from windpowerlib.tools import smallest_difference\nimport collections\n\n\nclass TestTools:\n\n @classmethod\n def setup_class(self):\n self.re... | python | new_file | 1 | 1 | mit | 797599802c4702d4a4452aafa276ceedd829e27f | wind-python/windpowerlib | tests/test_tools.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test to source folder."
},
{
"role": "assistant",
"content": "import unittest\nimport nose.tools\nfrom sklearn import manifold, datasets\n\nfrom mia.coranking import trustworthiness, continuity, LCMC, coranking_matrix\nfrom m... | python | new_file | 2 | 1 | mit | 49b916ce00d919a73ddc8923f62e0b4c6115b608 | samueljackson92/coranking | src/coranking_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement importer as a management command.\n\nHeroku has limitations on the ammount of time that a request\nshould take.\n\nBy using a management command the application can workaround\nthe time it takes to perform the import."
},
{
... | python | new_file | 3 | 2 | bsd-3-clause | a8f152e9a6a2db98305ee84dfb5b3be3cee91a84 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/apps/management/commands/app_import.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests to agent module. Just sunny day case for now"
},
{
"role": "assistant",
"content": "import json\n\nimport pytest\nimport zmq\n\nfrom zephyrus.addresses import Participants\nfrom zephyrus.agent import Agent\nfrom zephyru... | python | new_file | 1 | 1 | mit | e6bfcede8cb01fa38a5401315422a13d28983182 | wairton/zephyrus-mas | tests/test_agent.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add data migration for existing zotero user and node settings models - \"personal\" library is the only library that was previously available, but now group libraries are accessible."
},
{
"role": "assistant",
"content": "# -*- c... | python | new_file | 7 | 5 | apache-2.0 | 9ade5a79e74281f8503c798b06f6b568122b0594 | chennan47/osf.io,saradbowman/osf.io,Johnetordoff/osf.io,icereval/osf.io,erinspace/osf.io,chennan47/osf.io,CenterForOpenScience/osf.io,CenterForOpenScience/osf.io,brianjgeiger/osf.io,icereval/osf.io,felliott/osf.io,erinspace/osf.io,sloria/osf.io,mfraezz/osf.io,CenterForOpenScience/osf.io,pattisdr/osf.io,mfraezz/osf.io,m... | addons/zotero/migrations/0005_auto_20180216_0849.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test views return response for searched query"
},
{
"role": "assistant",
"content": "from django.test import TestCase, Client\nfrom ..models import Category, Book\n\n\n\nclass CompassTest(TestCase):\n @classmethod\n def set... | python | new_file | 1 | 1 | mit | ddbda12b1cb83886b8edab6e50bdde8a6a2d2672 | andela-osule/bookworm,andela-osule/bookworm | compass/tests/test_views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\nimport tornadoredis.pubsub\nimport tornadoredis\nfrom .base_provider import BaseProvider\nfrom .redis_settings import get_redis_host, get_redis_port, get_redis_db\n\n\nclass RedisSubProvider(BaseProvider):\n def __init__(sel... | python | edit | 1 | 5 | bsd-3-clause | 3ed70bcc0c699744fd4dc3259ca2f0b6ee7e5d6a | denizs/swampdragon,jonashagstedt/swampdragon,jonashagstedt/swampdragon,denizs/swampdragon,denizs/swampdragon,jonashagstedt/swampdragon | swampdragon/pubsub_providers/redis_sub_provider.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to sort results. This is useful for sorting by the \"total_time\" key."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\nSort a result list by a particular top level key.\nThe key must have a total ... | python | new_file | 7 | 4 | bsd-3-clause | a9efd01f22a4fe311b97bb6ef4f14e3abe1a5dc1 | symbooglix/boogie-runner,symbooglix/boogie-runner | analysis/sort-by.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add abstracted server and client library"
},
{
"role": "assistant",
"content": "# Server and Client Abstraction Library\n\nimport socket\n\nHOST = \"userinterface.local\"\nPORT = 12345\n\nclass Server(object):\n\t\"\"\"A server-s... | python | new_file | 3 | 2 | mit | 7578cef2d5006af632b45ce6b279d54253db3b5b | the-raspberry-pi-guy/lidar | pi_approach/Libraries/serverxclient.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for indexed access compilation"
},
{
"role": "assistant",
"content": "from tests.compiler import compile_local, A_ID, LST_ID, SELF_ID, VAL1_ID\nfrom thinglang.compiler.opcodes import OpcodePushLocal, OpcodePushIndexImme... | python | new_file | 1 | 1 | mit | c4b83a909eb7149ac3da33b90e912d1275a8dc16 | ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang | tests/compiler/test_access_compilation.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Develop key_proliferate function to create new keys."
},
{
"role": "assistant",
"content": "import numpy as np\nfrom key import Key\n\ndef remove_duplicates(values):\n output = []\n seen = []\n for value in values:\n ... | python | new_file | 3 | 5 | apache-2.0 | efdb0a8c8857ca04614108769e898cc409615b18 | paulsbrookes/subcipher | functions.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test cases for Pane."
},
{
"role": "assistant",
"content": "import unittest\nimport copy\n\nfrom xie.graphics.shape import Pane\n\nclass PaneTestCase(unittest.TestCase):\n\tdef setUp(self):\n\t\tself.generateTestData()\n\n\td... | python | new_file | 1 | 1 | apache-2.0 | 2ad3cb462469a2d4f3f457e1e520979871410d20 | xrloong/Xie | tests/test/xie/graphics/shape.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Move get_battery_percentage to module method Add test"
},
{
"role": "assistant",
"content": "import ev3.ev3dev\nimport unittest\nfrom util import get_input\n\n\nclass TestI2CS(unittest.TestCase):\n\n def test_battery(self):\n ... | python | new_file | 3 | 1 | apache-2.0 | ba388774ac7326efae78cfc69768985e71c988f4 | MaxNoe/python-ev3,topikachu/python-ev3,topikachu/python-ev3,evz/python-ev3,MaxNoe/python-ev3,evz/python-ev3 | test/test_ev3_battery_percentage.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for issue types"
},
{
"role": "assistant",
"content": "from taiga.requestmaker import RequestMaker, RequestMakerException\nfrom taiga.models.base import InstanceResource, ListResource\nfrom taiga.models.models import Is... | python | new_file | 12 | 1 | mit | dc1b04727f21038c815119b522ad276ceb01de41 | jespino/python-taiga,nephila/python-taiga,bameda/python-taiga,mlq/python-taiga,bameda/python-taiga,erikw/python-taiga,erikw/python-taiga,mlq/python-taiga,jespino/python-taiga | tests/test_issue_types.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add boilerplate to access youtube api"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\nimport os\nimport sys\n\nimport httplib2\nfrom apiclient.discovery import build # pylint: disable=import-error\nfrom oauth2clie... | python | new_file | 1 | 3 | unlicense | 61d9f394f186b754580c11c40932754072194f72 | ipwnponies/youtube-sort-playlist,ipwnponies/youtube-sort-playlist | playlist_updates.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add role to example deploy."
},
{
"role": "assistant",
"content": "from pyinfra.modules import server, pkg\n\n\n# OpenBSD packages?\npkg.packages(\n ['py-pip', 'git'],\n sudo=True,\n op='core_packages' # this and above b... | python | new_file | 1 | 0 | mit | d2bedbc07192a703f00a04e1fb262048da890f3d | Fizzadar/pyinfra,Fizzadar/pyinfra | example/roles/bsd_role.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test whether a Cyrillic text correctly appears in a Unicode literal."
},
{
"role": "assistant",
"content": "#! -*- coding: koi8-r -*-\nassert u\"\".encode(\"utf-8\") == '\\xd0\\x9f\\xd0\\xb8\\xd1\\x82\\xd0\\xbe\\xd0\\xbd'\n"
}
... | python | new_file | 1 | 0 | mit | aba72a7172dc0760441bd9a8bb9fef4a2c38c70b | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/test/test_pep263.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add integ smoke tests to verify basic service calls\n\nVerify we can make a successful servie call to each supported\nservice (except support).\n\nThe point of these tests to verify nothing's majorly broken. This\nwill make a Describe/List ... | python | new_file | 1 | 3 | apache-2.0 | 67b1e01382b718bc8facbdb48e0c88f716e5a247 | pplu/botocore,boto/botocore | tests/integration/test_smoke.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a demo to showcase how to handle local commands with Assistant Library."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"L... | python | new_file | 1 | 13 | apache-2.0 | 6af695bdceaabdd4144def6a11f930e9d02a2d5c | google/aiyprojects-raspbian,t1m0thyj/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian,t1m0thyj/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian | src/assistant_library_with_local_commands_demo.py | rejected_complexity | Cyclomatic complexity too high: 13 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test that gets all the car params"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport unittest\nfrom selfdrive.car.fingerprints import all_known_cars\nfrom selfdrive.car.car_helpers import interfaces\nfrom s... | python | new_file | 1 | 3 | mit | 16b6c70884f870461cd3fa7d18daf61faa5c25d0 | commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot | selfdrive/car/tests/test_car_params.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add fullstack tests of the resource protectables RESTAPI\n\nChange-Id: Ibe660a07311544f82246e82538b565847488040b\nCloses-Bug: #1578888"
},
{
"role": "assistant",
"content": "# Licensed under the Apache License, Version 2.0 (the \... | python | new_file | 1 | 1 | apache-2.0 | d1a9fc8e3e64e3eb4187f7db7c0176f05d68ccef | openstack/smaug,openstack/smaug | smaug/tests/fullstack/test_protectables.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Implement test for the cli"
},
{
"role": "assistant",
"content": "import pytest\nfrom click.testing import CliRunner\n\nfrom cli import main\n\n\n@pytest.fixture\ndef runner():\n return CliRunner()\n\n\n@pytest.fixture(params=... | python | new_file | 1 | 1 | mit | dadeb85fdbe6a4fed129cbeffbc305b36cef36c4 | hackebrot/cookiedozer,hackebrot/cookiedozer | {{cookiecutter.repo_name}}/tests/test_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add python wrapper for WebP image format support\n\nSigned-off-by: Yong Tang <<EMAIL>>"
},
{
"role": "assistant",
"content": "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, ... | python | new_file | 4 | 1 | apache-2.0 | 5b7697661c90e27ce36e6eae3b854470862f4191 | tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io | tensorflow_io/image/python/ops/image_dataset_ops.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a sample code for still images"
},
{
"role": "assistant",
"content": "from FaceAlignment import FaceAlignment\nimport numpy as np\nimport cv2\nimport utils\n\nmodel = FaceAlignment(112, 112, 1, 1, True)\nmodel.loadNetwork(\".... | python | new_file | 1 | 0 | mit | 2e208d7458a91f08a75bcee39a1cb9134565b857 | MarekKowalski/DeepAlignmentNetwork | DeepAlignmentNetwork/ImageDemo.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: WIP: Add PipeServer class to manage a pipe server process"
},
{
"role": "assistant",
"content": "'''Wraps a process to make it act as a pipe server. Takes care of supressing\nconsole windows under Windows and other housekeeping.\... | python | new_file | 1 | 2 | bsd-3-clause | 44c7cb73a309a02e907ab6d4ded5957e62ec39e3 | guillermooo-forks/dart-sublime-bundle,guillermooo/dart-sublime-bundle,guillermooo-forks/dart-sublime-bundle,guillermooo/dart-sublime-bundle,guillermooo/dart-sublime-bundle,guillermooo/dart-sublime-bundle,guillermooo-forks/dart-sublime-bundle,guillermooo-forks/dart-sublime-bundle | lib/analyzer/pipe_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Feature: Add migrations for url and referer length"
},
{
"role": "assistant",
"content": "# Generated by Django 2.2.14 on 2020-08-25 08:00\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\... | python | new_file | 1 | 0 | bsd-2-clause | d5b366c317e8fefaede6ae34cf25a67b5db1df28 | pinry/pinry,pinry/pinry,pinry/pinry,pinry/pinry | core/migrations/0009_auto_20200825_0800.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for setting up rethinkdb"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nimport rethinkdb as r\n\nconn = r.connect()\nr.db_create('muzhack').run(conn)\nr.db('muzhack').table_create('users').run(conn)\nr.d... | python | new_file | 1 | 0 | mit | a81d8aef2462bce852f52b551eb067659973978f | muzhack/muzhack,muzhack/musitechhub,muzhack/musitechhub,muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack,muzhack/muzhack,muzhack/musitechhub | rethinkdb/setup-rethinkdb.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a manage.py command to add read flags up to the current pointer\n\nThis is required because our migration is going to go in two phases.\nWhen we do the database migration (on pushing to master), we update\nall messages at that point. But... | python | new_file | 6 | 12 | apache-2.0 | 153983a933cd708cffbfde84a69930b33f747ca1 | zorojean/zulip,developerfm/zulip,ikasumiwt/zulip,yocome/zulip,codeKonami/zulip,ipernet/zulip,PaulPetring/zulip,brockwhittaker/zulip,christi3k/zulip,bastianh/zulip,johnny9/zulip,ufosky-server/zulip,vabs22/zulip,Drooids/zulip,stamhe/zulip,Juanvulcano/zulip,RobotCaleb/zulip,TigorC/zulip,joshisa/zulip,Frouk/zulip,peiwei/zu... | zephyr/management/commands/set_unread_to_pointer.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add default settings module for API"
},
{
"role": "assistant",
"content": "# Eve W-Space\n# Copyright (C) 2013 Andrew Austin and other contributors\n#\n# This program is free software: you can redistribute it and/or mod... | python | new_file | 1 | 2 | apache-2.0 | 34299b315cc02044050181ffe73b09042bb19a0a | evewspace/eve-wspace,nyrocron/eve-wspace,Maarten28/eve-wspace,nyrocron/eve-wspace,Zumochi/eve-wspace,Maarten28/eve-wspace,Maarten28/eve-wspace,acdervis/eve-wspace,hybrid1969/eve-wspace,hybrid1969/eve-wspace,marbindrakon/eve-wspace,Unsettled/eve-wspace,mmalyska/eve-wspace,Maarten28/eve-wspace,marbindrakon/eve-wspace,gpa... | evewspace/API/default_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add RTM v2 client example too"
},
{
"role": "assistant",
"content": "# ------------------\n# Only for running this script here\nimport sys\nfrom os.path import dirname\n\nsys.path.insert(1, f\"{dirname(__file__)}/../../..\")\n# -... | python | new_file | 2 | 1 | mit | 10c7d2f33d34e5a158795701b2d9bc71bbb1c120 | slackapi/python-slackclient,slackapi/python-slackclient,slackhq/python-slackclient,slackapi/python-slackclient | integration_tests/samples/rtm_v2/rtm_v2_proxy_app.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create script that helps to create an admin user."
},
{
"role": "assistant",
"content": "from getpass import getpass\nfrom md5 import md5\n\nfrom redis import Redis\n\ndef main():\n database = Redis()\n database.set(\"user:... | python | new_file | 1 | 1 | mit | 5a641395fb336313f091d28ffb17625df836d2a3 | Computiva/carbono,Computiva/carbono,Computiva/carbono,Computiva/carbono | create_admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add scratch Reddit comment scraper"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport praw\n\n# Connect to Reddit\n# ----------------------------\n\nuser_agent = \"Quick comment thread... | python | new_file | 1 | 0 | mit | 828521e71b2afd93f53b13222fbdfaf9e855d442 | PsyBorgs/redditanalyser,PsyBorgs/redditanalyser | scripts/comment_scraper.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to annotate allele frequencies."
},
{
"role": "assistant",
"content": "from cyvcf2 import VCF, Writer\n\n\ndef subclone_vaf(gt):\n \"\"\"Calculate subclone allele frequency\"\"\"\n if np.all(gt[:2] == [1, 1]):\n ... | python | new_file | 7 | 4 | mit | 5367b40e7dec274cb36df6e5dfdd53fca986345b | PROSIC/prosic-evaluation,PROSIC/prosic-evaluation | scripts/annotate-true-allele-freqs.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Read ampstat -m -i <device> and print out the mac addresses on the powerline network"
},
{
"role": "assistant",
"content": "import shlex\nimport sys\nimport re\nfrom subprocess import Popen, PIPE\n\ndef extractMacAddress(ampStatL... | python | new_file | 2 | 5 | mit | 1867707bd33bb4908e63f82f3d975fcf5d9e829a | alanbertadev/plc_upo_alarm | plc-upo-alarm.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script for building the sbt images"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\"\"\"\nBuild a Docker image for one of our sbt applications.\n\nUsage:\n build_sbt_image.py --pro... | python | new_file | 3 | 0 | mit | fa470267fff5107e1c4e258e66c677291972c558 | wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api | scripts/build_sbt_image.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for class based views"
},
{
"role": "assistant",
"content": "import asyncio\nimport pytest\n\nfrom aiohttp import web\nfrom aiohttp.web_urldispatcher import View\nfrom unittest import mock\n\n\ndef test_ctor():\n req... | python | new_file | 1 | 1 | apache-2.0 | d6e6c5caa26469b101333df5a901a94f3fe532f3 | jashandeep-sohi/aiohttp,rutsky/aiohttp,decentfox/aiohttp,alex-eri/aiohttp-1,arthurdarcet/aiohttp,juliatem/aiohttp,esaezgil/aiohttp,pfreixes/aiohttp,mind1master/aiohttp,z2v/aiohttp,KeepSafe/aiohttp,mind1master/aiohttp,decentfox/aiohttp,mind1master/aiohttp,elastic-coders/aiohttp,rutsky/aiohttp,jettify/aiohttp,pfreixes/ai... | tests/test_classbasedview.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the ability to create Tar files"
},
{
"role": "assistant",
"content": "import os\nimport sys\nimport tarfile\nimport cStringIO\n\nclass GlideinTar:\n \"\"\"\n potential exception needs to be caught by calling routin... | python | new_file | 4 | 4 | bsd-3-clause | 082bdc7c12074f7df3d0a308b00f0d512ae98a16 | bbockelm/glideinWMS,bbockelm/glideinWMS,bbockelm/glideinWMS,bbockelm/glideinWMS | lib/tarSupport.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new migrations with db indexes"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.7 on 2017-06-30 09:41\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, mod... | python | new_file | 1 | 0 | mit | 000ceb19945af56a0196654fa2f4e924aaa1f4ae | mbourqui/django-publications-bootstrap,mbourqui/django-publications-bootstrap,mbourqui/django-publications-bootstrap | publications_bootstrap/migrations/0003_db_index.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for file based configuration"
},
{
"role": "assistant",
"content": "from unittest.mock import call\nfrom unittest.mock import Mock\nfrom unittest.mock import patch\n\nfrom osfclient import cli\n\n\n@patch('osfclient.cli.... | python | new_file | 1 | 2 | bsd-3-clause | 10df3cd5e4c8517652efdb8381155253aa6a8157 | betatim/osf-cli,betatim/osf-cli | osfclient/tests/test_cli.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to import activities"
},
{
"role": "assistant",
"content": "import pandas as pd\n\nfrom django.core.management.base import BaseCommand\n\nfrom lowfat.models import Fund\n\nclass Command(BaseCommand):\n help = \"Add ... | python | new_file | 1 | 8 | bsd-3-clause | cf7fd8a8ba0943303dd5baaee831e7070460c0a0 | softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat | lowfat/management/commands/addactivities.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create DoFn to group and batch data based on Execution equality"
},
{
"role": "assistant",
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fi... | python | new_file | 1 | 4 | apache-2.0 | 011c1701813c3107433d261581189c57e3b3302f | google/megalista,google/megalista | megalist_dataflow/utils/group_by_execution_dofn.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Send mass email Django command"
},
{
"role": "assistant",
"content": "import sys\nimport json\nimport requests\n\nfrom bs4 import BeautifulSoup\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom users.mode... | python | new_file | 3 | 3 | mit | f79465a56f45aaa74593bf0176015dabd5845b25 | project-lovelace/lovelace-website,project-lovelace/lovelace-website,project-lovelace/lovelace-website | src/lovelace/management/commands/send_mass_email.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Complete converter for VASP prototype\n\nPrototyping autoconverter for VASP files. Does not yet handle URIs\noutside of data.materialsdatafacility.org."
},
{
"role": "assistant",
"content": "import os\nimport json\nimport sys\nfr... | python | new_file | 1 | 8 | apache-2.0 | cb991585c786d1c899da85a2abdf58cc9725d44a | materials-data-facility/forge | prototypes/converters/autovasp_converter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Q6 for Section II"
},
{
"role": "assistant",
"content": "D = {'a': 0, 'b': 1, 'c': 2}\n# Attempting to access a key that does not exist\n# will result in a KeyError Exception\ntry:\n D['d']\nexcept KeyError as err:\n pr... | python | new_file | 1 | 0 | bsd-3-clause | b96d62fb4797360e17bd7ffa2a22f9a89977605a | skellykiernan/pylearn,skellykiernan/pylearn | excerises/src/II/q6.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add bitbucket identity creation tests"
},
{
"role": "assistant",
"content": "from urllib.parse import urlparse\n\nfrom django.urls import reverse\n\nfrom tests.utils import BaseViewTest\n\n\nclass BitbucketIdentityTest(BaseViewTe... | python | new_file | 1 | 1 | apache-2.0 | ccf986954bfc4a5e56ed608aefbb416bf7acab3c | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | tests/test_sso/test_bitbucket_id_creation.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create URL routes to the two server app views"
},
{
"role": "assistant",
"content": "''' Servers URL Configuration\n'''\n\nfrom django.conf.urls import url\nfrom . import views\n\nurlpatterns = [\n url(r'^$', views.index, name... | python | new_file | 1 | 0 | mit | 0a8ca89881c08c78816c47e5b54aa7f78fdb8cc0 | Jonpro03/Minecrunch_Web,Jonpro03/Minecrunch_Web,Jonpro03/Minecrunch_Web | src/servers/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to run a series of experiments\n\nThe script does Gibbs sampling for different values of nTopics."
},
{
"role": "assistant",
"content": "import logging\nimport glob\nfrom multiprocessing import Process\n\nfrom CPTCorpu... | python | new_file | 2 | 1 | apache-2.0 | e0d71d17ef62bb4e515462c2a53a5dd7172cd15d | NLeSC/cptm,NLeSC/cptm | DilipadTopicModelling/experiment_number_of_topics.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add dummy wrapper for correlation filters"
},
{
"role": "assistant",
"content": "import numpy as np\nfrom menpofit.math.correlationfilter import mccf, imccf\n\n\n# TODO: document me!\nclass IncrementalCorrelationFilterThinWrapper... | python | new_file | 1 | 2 | bsd-3-clause | ac9d87bf486f8062d1c2d8122e2dc5660546a22f | grigorisg9gr/menpofit,yuxiang-zhou/menpofit,yuxiang-zhou/menpofit,grigorisg9gr/menpofit | menpofit/clm/expert/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [vigir_ltl_specification][test] Add unit tests for ts_specification"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport unittest\n\nfrom vigir_ltl_specification.ts_specification import *\n\nclass SpecificationC... | python | new_file | 4 | 1 | bsd-3-clause | 8f72e083e436198adcf113cb0abaa8af96f8caf1 | team-vigir/vigir_behavior_synthesis,team-vigir/vigir_behavior_synthesis | vigir_ltl_specification/test/unit/ts_specification_test.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: [tests] Add unit tests for the store class"
},
{
"role": "assistant",
"content": "# pylint: disable=C0103,C0111,W0703\n\nimport unittest\n\nfrom bumblebee.store import Store\n\nclass TestStore(unittest.TestCase):\n def setUp(s... | python | new_file | 1 | 1 | mit | c7621caf782e44c76d2477813726ea35de00d49c | tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status | tests/test_store.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic tests for spans"
},
{
"role": "assistant",
"content": "import unittest\nimport datetime\nimport hiro\nfrom sifr.span import Minute, Year, Month, Day, Hour\n\n\nclass SpanTests(unittest.TestCase):\n def test_minute(se... | python | new_file | 1 | 1 | mit | d6020572b9882a26939c71cb5d6ea795f0ef2d44 | alisaifee/sifr,alisaifee/sifr | tests/test_spans.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Utility Method For Retrieving Error Vertices"
},
{
"role": "assistant",
"content": "# Copyright (c) 2012-2013 SHIFT.com\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software an... | python | new_file | 1 | 1 | mit | cd2e527f86427257de0686269e6b3a9d74314249 | StartTheShift/thunderdome-logging,StartTheShift/thunderdome-logging | thunderdome_logging/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic script without the ability to send the data anywhere"
},
{
"role": "assistant",
"content": "from modularodm import Q\n\nfrom website.app import init_app\nfrom website.models import User, Node, Institution\n\n\ndef get_i... | python | new_file | 1 | 2 | apache-2.0 | b08e7fd64da5342508807420e5c9aa6c3686a68e | Johnetordoff/osf.io,hmoco/osf.io,laurenrevere/osf.io,mattclark/osf.io,baylee-d/osf.io,icereval/osf.io,laurenrevere/osf.io,sloria/osf.io,HalcyonChimera/osf.io,caseyrollins/osf.io,binoculars/osf.io,caseyrollins/osf.io,alexschiller/osf.io,acshi/osf.io,CenterForOpenScience/osf.io,cslzchen/osf.io,crcresearch/osf.io,felliott... | scripts/analytics/institutions.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Debug script to modify jbrowse track config manually."
},
{
"role": "assistant",
"content": "\"\"\"Functions for manipulating JBrowse configs.\n\nNOTE: User responsible for managing backups / not breaking anything.\n\"\"\"\n\nimp... | python | new_file | 1 | 2 | mit | 1fa31c04dbd323af36a5b0cb606aa49e0b1c0359 | churchlab/millstone,woodymit/millstone_accidental_source,churchlab/millstone,woodymit/millstone,woodymit/millstone,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone_accidental_source,woodymit/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone | genome_designer/debug/modify_jbrowse_track_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add functions for generating missing data in worst case scenario absence of previous data"
},
{
"role": "assistant",
"content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\... | python | new_file | 1 | 3 | apache-2.0 | 7d998deb5cfc5dafe24f0ba21e120020ba695447 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks | project/scripts/data_generator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create a searchable index on the request text field."
},
{
"role": "assistant",
"content": "\"\"\"Create request search column and trigger.\n\nRevision ID: 5563ca9e7626\nRevises: 30d3af507801\nCreate Date: 2014-03-06 13:13:52.831... | python | new_file | 3 | 1 | apache-2.0 | fafb2c00597a99947f3e7a344e97551a390bda08 | CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords | alembic/versions/5563ca9e7626_create_request_searc.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for VerifyUserAdmin fieldsets"
},
{
"role": "assistant",
"content": "from django.contrib.admin.sites import AdminSite\nfrom django.test import TestCase\n\nfrom ..admin import VerifyUserAdmin\nfrom .factories import User... | python | new_file | 1 | 1 | bsd-2-clause | 4b5650b57c28e33003795075c439632f4b2dd1e8 | incuna/django-user-management,incuna/django-user-management | user_management/models/tests/test_admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add automated tests for proposal_speaker_manage."
},
{
"role": "assistant",
"content": "from django.contrib.auth import get_user_model\nfrom django.urls import reverse\nfrom django.utils.crypto import get_random_string\n\nfrom sy... | python | new_file | 1 | 1 | mit | 67153408c30726728a1bf9ec9e03ff869b306174 | pydata/conf_site,pydata/conf_site,pydata/conf_site | conf_site/proposals/tests/test_proposal_management.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for paramter sharing"
},
{
"role": "assistant",
"content": "import unittest\n\nimport chainer\nimport chainer.links as L\nimport numpy as np\n\nimport async\n\n\nclass TestAsync(unittest.TestCase):\n\n def setUp(sel... | python | new_file | null | null | mit | 79724ffb33766eb2b71ab6571564cc7dd77c401f | toslunar/chainerrl,toslunar/chainerrl | test_async.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: tests/basics: Add test for containment of a subclass of a native type."
},
{
"role": "assistant",
"content": "# test containment operator on subclass of a native type\n\nclass mylist(list):\n pass\n\nclass mydict(dict):\n p... | python | new_file | 1 | 0 | mit | 505671b698490918fe0ea6c6dfdab8c0b25339be | MrSurly/micropython,dmazzella/micropython,infinnovation/micropython,bvernoux/micropython,selste/micropython,pfalcon/micropython,bvernoux/micropython,pozetroninc/micropython,kerneltask/micropython,torwag/micropython,infinnovation/micropython,ryannathans/micropython,pfalcon/micropython,swegener/micropython,dmazzella/micr... | tests/basics/subclass_native_containment.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add first skeleton of selenium-based test"
},
{
"role": "assistant",
"content": "import unittest\nimport time\nimport re\n\nfrom selenium import webdriver\nfrom selenium.webdriver.common.by import By\nfrom selenium.webdriver.supp... | python | new_file | 11 | 3 | bsd-2-clause | 26d5b3964bbe2a42702dd90cb9274287b402d944 | gateway4labs/labmanager,go-lab/labmanager,morelab/labmanager,morelab/labmanager,labsland/labmanager,gateway4labs/labmanager,morelab/labmanager,labsland/labmanager,labsland/labmanager,labsland/labmanager,go-lab/labmanager,porduna/labmanager,morelab/labmanager,go-lab/labmanager,go-lab/labmanager,porduna/labmanager,pordun... | labmanager/tests/integration/util.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to scrape top 10k players"
},
{
"role": "assistant",
"content": "import csv\nimport time\n\nimport requests\nimport lxml.html\n\n\ntop10k = {}\nfor page_index in range(1, 201):\n print('Requesting page {}'.format(pa... | python | new_file | 1 | 0 | mit | d0435bdd72576b84b1add45e6871c2647706b728 | Cyanogenoid/osu-modspecific-rank | scrape-10k.py | rejected_duplicate | Near-duplicate of sample 4808 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a migration for model meta options that should have been added earlier"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nc... | python | new_file | 3 | 0 | mit | 2bda9d0e746d4abe64f0a21803fbc07e244bc96b | AparatTechnologies/django-connectwise,KerkhoffTechnologies/django-connectwise,KerkhoffTechnologies/django-connectwise | djconnectwise/migrations/0008_auto_20170215_1430.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example for outwardly-propagating cylindrical flame"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\nOutwardly-propagating cylindrical geometry for a strained lean methane flame.\nThe converged axial velo... | python | new_file | 11 | 0 | mit | 773003b45d472807b17b41db3a96ea1795571ddf | speth/ember,speth/ember,speth/ember | python/ember/examples/example_cylindrical_outward.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Test FileParser returns correct object type"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n#encoding:utf-8\n#author:dbr/Ben\n#project:tvnamer\n#repository:http://github.com/dbr/tvnamer\n#license:Creative Commons G... | python | new_file | 1 | 1 | unlicense | 92bbe67fe2e5528e8d87c3f9897b8791f022f6a5 | m42e/tvnamer,dbr/tvnamer,lahwaacz/tvnamer | tests/test_fileparse_api.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve 328 wtf so easy"
},
{
"role": "assistant",
"content": "# Definition for singly-linked list.\n# class ListNode(object):\n# def __init__(self, x):\n# self.val = x\n# self.next = None\n\n\nclass Solution(ob... | python | new_file | 1 | 6 | apache-2.0 | 8a4f814630ffd106f9711a2fb339c12c4df3efb0 | HappyCompanions/LeetCode,HappyCompanions/LeetCode,HappyCompanions/LeetCode,HappyCompanions/LeetCode,HappyCompanions/LeetCode,HappyCompanions/LeetCode,HappyCompanions/LeetCode | 328-Odd_Even_Linked_List.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for authentication helpers."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Tests for vumi.transports.httprpc.auth.\"\"\"\n\nfrom twisted.web.resource import IResource\nfrom twisted.cred.credenti... | python | new_file | 1 | 1 | bsd-3-clause | 5d394aa1f2df7a36a90b3dee2436ae3b5742d60e | harrissoerja/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,TouK/vumi,TouK/vumi,TouK/vumi | vumi/transports/httprpc/tests/test_auth.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test to ensure equations with line breaks are parsed correctly"
},
{
"role": "assistant",
"content": "import os\nimport unittest\nimport tempfile\nfrom io import StringIO\n\nfrom pysd.py_backend.xmile.xmile2py import translate_xm... | python | new_file | 3 | 1 | mit | ab88061c78cd17913faf6249f4d70a48779b4e56 | JamesPHoughton/pysd | tests/unit_test_xmile2py.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add command to find datasource mismatches"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport csv\nfrom datetime import datetime\n\nfrom django.core.manag... | python | new_file | 1 | 9 | bsd-3-clause | 67f82f569dbf75ee5555862e21bd1bafbaa5464b | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/userreports/management/commands/find_datasource_mismatches.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add helper module with humanize_time function"
},
{
"role": "assistant",
"content": "\"\"\"Generally useful helper functions, possibly for use in plugins.\"\"\"\n\ndef humanize_time(delta):\n \"\"\"\n Converts a timespan pr... | python | new_file | 1 | 3 | mit | 9e7aa9ca8b4301be8c219f4ce37edb271e6cb1ba | howard/p1tr-tng,howard/p1tr-tng | p1tr/helpers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [AC-9046] Remove migrations that arenot relevant to the work"
},
{
"role": "assistant",
"content": "# Generated by Django 2.2.10 on 2021-11-05 12:29\n\nfrom django.db import migrations\n\n\ndef update_url_to_community(apps, schem... | python | new_file | 1 | 3 | mit | 7c8dac37d4e9cfced65e1c7ec5655c3e78c8de2a | masschallenge/django-accelerator,masschallenge/django-accelerator | accelerator/migrations/0074_update_url_to_community.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add framework for wordcloud visualisation"
},
{
"role": "assistant",
"content": "import sys\nfrom os.path import isdir, isfile\nfrom corpus import Corpus\nfrom lda_corpus import LDACorpus\n\n\nclass WordCloud(object):\n\n def ... | python | new_file | 5 | 5 | mit | debcc4d639945e676fb4579f71bfa711e29e343f | PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project,PinPinIre/Final-Year-Project | src/project/word_cloud.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Create sample for new functions"
},
{
"role": "assistant",
"content": "from thrift.transport import TSocket\nfrom thrift.transport import TTransport\nfrom thrift.protocol import TBinaryProtocol\nfrom modeldb.thrift.modeldb import... | python | new_file | 2 | 0 | mit | cebb99ca378bd9048351bc8f1aa25b282b21186f | mitdbg/modeldb,mitdbg/modeldb,mitdbg/modeldb,mitdbg/modeldb,mitdbg/modeldb | client/python/samples/basic/LoggingSample.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 412. Fizz Buzz\n\n412. Fizz Buzz: https://leetcode.com/problems/fizz-buzz/"
},
{
"role": "assistant",
"content": "import sys\nclass Solution(object):\n def fizzBuzz(self, n):\n \"\"\"\n :type ... | python | new_file | 4 | 6 | apache-2.0 | 84f824495793eaa780b6681be691fe4d5a10fc28 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/fizz-buzz.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Create weekday node and createweekday class"
},
{
"role": "assistant",
"content": "from django.core.exceptions import ValidationError\n\nimport graphene\nfrom graphene_django import DjangoObjectType\n\nfrom app.timetables.models ... | python | new_file | 1 | 2 | mit | e7d60f59e5bedc3a0893185303746c1cbb0d15af | teamtaverna/core | app/api/cruds/weekday_crud.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test (work on progress)"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n\n\"\"\"\nfrom __future__ import print_function\n\nimport pytest\nimport numpy as np\nimport itertools\n\n... | python | new_file | 1 | 3 | mit | 1b57a7263b4a3a5f0f124cac27d9b1324ccfe4a6 | LeBarbouze/tunacell | tunacell/tests/test_simu.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Document from the reality that while breaking apps down is a good idea, even then you often have a sufficient number of topic areas to cover that can't be easily split into more apps, i.e. TestCase classes are insufficient to group the relev... | python | new_file | 1 | 1 | mit | 1b0e6966d6bd73598e3f9ec49a73a78b0478da10 | pzrq/discover-road-runner | discover_road_runner/famishius/tests/test_vulgaris.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add some tests for url."
},
{
"role": "assistant",
"content": "import unittest\n\nfrom django.test import Client\nfrom django.contrib.auth.models import User\n\nADMIN_PASSWORD = '123456'\n\nclass SimpleTest(unittest.TestCase):\n ... | python | new_file | 1 | 1 | bsd-3-clause | aedf1819edd0bf1668e530cbdb7f6998410e5ada | softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat | fellowms/tests_urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: ADD a prototype for a plotting script of the learned model"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport logging\nimport sys\nimport os\nimport inspect\ncmd_folder = os.path.realpath(os.path.abspath(os.pa... | python | new_file | 1 | 7 | bsd-2-clause | 4e29832d5a6ace0bc0adc44a2525872f47dc9b03 | mlindauer/AutoFolio | scripts/plot_config.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create load balanced function to perform cross validation. Use main block to display best result"
},
{
"role": "assistant",
"content": "from IPython import parallel\nfrom sklearn.datasets import fetch_20newsgroups_vectorized\n\n\... | python | new_file | 4 | 1 | mit | 7561e95b6fc12852c82ce4d16c38bcb223514358 | MikeDelaney/sentiment | parallel.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add experiment groups search managers tests"
},
{
"role": "assistant",
"content": "from django.test import override_settings\nfrom polyaxon_schemas.settings import SettingsConfig\n\nfrom experiment_groups.iteration_managers impor... | python | new_file | 6 | 1 | apache-2.0 | 00997a5416447ecfb00565bface9ee109a187b61 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | tests/test_experiment_groups/test_search_managers.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add model/simulation of cache eviction with a Bit-Pseudo-LRU cache"
},
{
"role": "assistant",
"content": "# Copyright 2015, Google, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use t... | python | new_file | 4 | 5 | apache-2.0 | 6a7f25bd6303fd932632b2bd9dfe9ca010522c00 | kevinmel2000/rowhammer-test,shekkbuilder/rowhammer-test,kevinmel2000/rowhammer-test,kevinmel2000/rowhammer-test,kevinmel2000/rowhammer-test,shekkbuilder/rowhammer-test,shekkbuilder/rowhammer-test,shekkbuilder/rowhammer-test | cache_analysis/cache_model.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add raw data filter plugin"
},
{
"role": "assistant",
"content": "\"\"\"Show how to add a custom raw data filter for the TraceView and Waveform View\n\nUse Alt+R in the GUI to toggle the filter.\n\n\"\"\"\n\nimport numpy as np\nf... | python | new_file | 1 | 1 | bsd-3-clause | 5fdbb45c38c2bf542184ed8e7d750b3cfaa6fbb4 | kwikteam/phy,kwikteam/phy,kwikteam/phy | plugins/raw_data_filter.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.