messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Write python code for the following: Add failing test for desired behavior"
},
{
"role": "assistant",
"content": "from django.test import override_settings\n\nfrom corehq import privileges\nfrom corehq.apps.accounting.models import SoftwarePlanEdition\nfrom corehq.a... | python | new_file | 1 | 1 | bsd-3-clause | 4a7fb72b496f036e33a8d48b120717f328828756 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/accounting/tests/test_enterprise_mode.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom lib.base import DockerBasePythonAction\n\n\n__all__ = [\n 'DockerBuildImageAction'\n]\n\n\nclass DockerBuildImageAction(DockerBasePythonAction):\n def run(self, dockerfile_path, tag):\n if os.path.isdir(docker... | python | edit | 1 | 2 | apache-2.0 | 08581be11f891e21014a7863ab102d4586388d47 | StackStorm/st2contrib,jtopjian/st2contrib,armab/st2contrib,Aamir-raza-1/st2contrib,tonybaloney/st2contrib,StackStorm/st2contrib,pearsontechnology/st2contrib,digideskio/st2contrib,meirwah/st2contrib,tonybaloney/st2contrib,dennybaa/st2contrib,jtopjian/st2contrib,armab/st2contrib,tonybaloney/st2contrib,digideskio/st2contr... | packs/docker/actions/build_image.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to print the ZK tree\n\nThis script uses a nodepool config file to connect to ZK and print\nthe entire contents of the ZK tree for debugging purposes.\n\nChange-Id: I31566e15d915e701639325f757d1b917ad93c780"
},
{
"role":... | python | new_file | 3 | 3 | apache-2.0 | 19a9d49fe84f0ba89de04001d2a5d0c8cc3f135a | Tesora/tesora-nodepool,Tesora/tesora-nodepool | tools/print-zk.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to fetch lon/lat from DBPedia."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\nScript to fetch DBpedia data\n\"\"\"\n\nimport sys, time\nfrom urllib.request import urlopen\nfrom urllib.parse impor... | python | new_file | 1 | 4 | apache-2.0 | 7606021f677955967fc0a21d962d3638fd4d0cbf | ViralTexts/vt-passim,ViralTexts/vt-passim,ViralTexts/vt-passim | scripts/dbdata.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for base spmatrix"
},
{
"role": "assistant",
"content": "import unittest\n\nimport scipy.sparse\n\nimport cupy.sparse\nfrom cupy import testing\n\n\nclass DummySparseCPU(scipy.sparse.spmatrix):\n\n def __init__(self, ... | python | new_file | 2 | 1 | mit | d5db2a91729671e7a47e8c7d442ab76b697dc58f | cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy | tests/cupy_tests/sparse_tests/test_base.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add custom dm upload script to be used by the android framework\n\nReview URL: https://codereview.chromium.org/979153002"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# Copyright 2014 The Chromium Authors. All rig... | python | new_file | 1 | 1 | bsd-3-clause | 7bdc8dfaabdee59d1961a390418ae6aafe0f9e62 | YUPlayGodDev/platform_external_skia,MarshedOut/android_external_skia,Infinitive-OS/platform_external_skia,noselhq/skia,PAC-ROM/android_external_skia,tmpvar/skia.cc,MinimalOS-AOSP/platform_external_skia,UBERMALLOW/external_skia,rubenvb/skia,ominux/skia,YUPlayGodDev/platform_external_skia,geekboxzone/mmallow_external_ski... | platform_tools/android/tradefed/upload_dm_results.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add use case of spider with limits"
},
{
"role": "assistant",
"content": "# coding: utf-8\nimport setup_script\nfrom grab.spider import Spider, Task\nimport logging\n\nclass TestSpider(Spider):\n def task_generator(self):\n ... | python | new_file | 2 | 1 | mit | 7f2700ee4b6aafed259d78affef462197194d2fc | kevinlondon/grab,SpaceAppsXploration/grab,liorvh/grab,subeax/grab,alihalabyah/grab,pombredanne/grab-1,SpaceAppsXploration/grab,subeax/grab,codevlabs/grab,giserh/grab,istinspring/grab,istinspring/grab,DDShadoww/grab,shaunstanislaus/grab,huiyi1990/grab,huiyi1990/grab,giserh/grab,maurobaraldi/grab,lorien/grab,pombredanne/... | usecase/spider_limit.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests to check for CONF getattr during import\n\nSince the early days in tempest we've been fighting getattrs on CONF\nduring imports. We're able to get around this during test runs by lazy\nloading the conf file. However, in things... | python | new_file | 1 | 1 | apache-2.0 | 9cf0703f20f47143385260a6b63189f1c780f73e | Juniper/tempest,cisco-openstack/tempest,openstack/tempest,openstack/tempest,cisco-openstack/tempest,Juniper/tempest,masayukig/tempest,masayukig/tempest | tempest/tests/test_imports.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [rtntracer] Add script to parse rtntracefull output into a call tree"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport sys, os, subprocess\n\ndef ex_ret(cmd):\n return subprocess.Popen(cmd, stdout = subproce... | python | new_file | 2 | 1 | mit | 1b0560da645ecadc2bd9d01dde77274afb8970ba | abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper | tools/parse_rtntrace_stack.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for Euronews plugin"
},
{
"role": "assistant",
"content": "import unittest\n\nfrom streamlink.plugins.euronews import Euronews\n\n\nclass TestPluginEuronews(unittest.TestCase):\n def test_can_handle_url(self):\n... | python | new_file | 1 | 1 | bsd-2-clause | e8f323207f8b59452a040aadd0e411dc5abdb218 | streamlink/streamlink,beardypig/streamlink,back-to/streamlink,gravyboat/streamlink,beardypig/streamlink,bastimeyer/streamlink,bastimeyer/streamlink,streamlink/streamlink,wlerin/streamlink,wlerin/streamlink,javiercantero/streamlink,melmorabity/streamlink,chhe/streamlink,back-to/streamlink,chhe/streamlink,melmorabity/str... | tests/test_plugin_euronews.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Think Like a Programmer section and start chp 2 exercises"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Think Like a Programmer Chapter 2: Pure Puzzles exercises\n\n\ndef main():\n poundV()\n print()... | python | new_file | 1 | 2 | mit | 144608f98f5b8aff555ee4954d0a07aebb828aff | HKuz/Test_Code | ThinkLikeProg/chp2ex.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial tests for to_text"
},
{
"role": "assistant",
"content": "from datetime import datetime\nfrom recurrence import Recurrence, Rule\nimport recurrence\n\n\ndef test_rule_to_text_simple():\n assert Rule(\n recurr... | python | new_file | 4 | 1 | bsd-3-clause | 59dc769f3ccf0e0251c527b7e1e23544dedab048 | django-recurrence/django-recurrence,FrankSalad/django-recurrence,linux2400/django-recurrence,Nikola-K/django-recurrence,django-recurrence/django-recurrence,FrankSalad/django-recurrence,Nikola-K/django-recurrence,linux2400/django-recurrence | tests/test_to_text.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Change meta option for Github"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.5 on 2017-05-24 15:03\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclas... | python | new_file | 1 | 0 | bsd-3-clause | 8ba5b29200520d853791943341d41798ff80a248 | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | src/repository/migrations/0003_auto_20170524_1503.py | rejected_duplicate | Near-duplicate of sample 6540 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add excel converter which converts tab spaced text file data to excel file"
},
{
"role": "assistant",
"content": "import csv\nimport xlwt\nimport os\nimport sys\nimport subprocess\n\t\ndef convert(filename):\t\n\t# Look for input... | python | new_file | 1 | 3 | mit | 474d3379d6cc04c1f4bac441c83399860333de3d | prashanth-nani/sentiment-analysis,prashanth-nani/snapdeal-review-grabber | excel_convert.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add file with test problems"
},
{
"role": "assistant",
"content": "import nets\nimport random\nimport math\n\ndef XOR():\n '''Exclusive or'''\n net = nets.FeedForwardNet(2, 3, 1)\n \n domain = ((1,1), (1,-1), (-1,1), ... | python | new_file | 1 | 4 | mit | 40761c39bcc3703e8fd99544aa1d08f955538779 | tmerr/trevornet | TrevorNet/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a template tag to conditionally *parse* the tag's nested content."
},
{
"role": "assistant",
"content": "# Loosely based on noparse.py from https://code.djangoproject.com/ticket/14502\n\nfrom django import template\nfrom djan... | python | new_file | 1 | 5 | mit | 7b2f561bb7d36eb9fe978e622789932c02c11411 | PrecisionMojo/pm-www,PrecisionMojo/pm-www | vsub/templatetags/parse_if.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to use Dropbox API"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW!\n# Go to dropbox.com/developers/apps to create an app.\n\nimport webbrowser\nfrom d... | python | new_file | 4 | 3 | mit | 882944fb5c3afcd9eed086d996998f9921df6198 | philipbl/instagram2dayone | dropbox_login.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve by exploiting ascii values"
},
{
"role": "assistant",
"content": "\"\"\"\r\nWhen you select a contiguous block of text in a PDF viewer, the selection is highlighted with a blue rectangle. In this PDF viewer, each word is hi... | python | new_file | 6 | 3 | mit | 7036bfe5740ff1a3027485dab60615c2596bce11 | lemming52/white_pawn,lemming52/white_pawn | hackerrank/pdfviewer/solution.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n'''Communicate with local or remote peercoin-daemon via JSON-RPC'''\n\nfrom operator import itemgetter\n\ntry:\n from peercoin_rpc import Client\nexcept:\n raise EnvironmentError(\"peercoin_rpc library is required for this to work,\... | python | edit | 1 | 4 | bsd-3-clause | 02fad660afbb6b5ca1fc4f1c3a1fcf3c95f9fd0d | PeerAssets/pypeerassets,backpacker69/pypeerassets | pypeerassets/providers/node.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a state for update entire list of persons."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# encoding=utf8\n\nimport json\n\nimport requests\nfrom flexbe_core import EventState, Logger\n\n\"\"\"\nCreated on 17/0... | python | new_file | 3 | 20 | bsd-3-clause | a78f918849e35dca110eec38741001ab11279c65 | WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors | sara_flexbe_states/src/sara_flexbe_states/WonderlandAddUpdatePeople.py | rejected_complexity | Cyclomatic complexity too high: 20 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a file to extract error strings"
},
{
"role": "assistant",
"content": "from __future__ import with_statement\nimport os, sys, tempfile, subprocess, re\n\n__all__ = [\"has_error\", \"get_error_line_number\", \"make_reg_string\... | python | new_file | 4 | 2 | mit | 942315bb5baa45df4dfde9b04b99685a6be6f574 | JasonGross/coq-tools,JasonGross/coq-tools | diagnose_error.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the script on Python 2.x."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# The MIT License (MIT)\n# \n# Copyright (c) 2014 Keita Kita\n# \n# Permission is hereby granted, free of charge, to any person obtaini... | python | new_file | 2 | 0 | mit | 5ad7e4f7b1be1203b63ff4f530d57d0bd3e092c4 | mikanbako/add-filename-suffix | add_filename_suffix.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a difficult test case from parakeet"
},
{
"role": "assistant",
"content": "#from https://github.com/iskandr/parakeet/blob/master/benchmarks/nd_local_maxima.py\n#pythran export local_maxima(float [][][][])\n#runas import numpy... | python | new_file | 1 | 4 | bsd-3-clause | df07313b0fdb7ca5caba3aefcbf8eb3a3f7f3191 | artas360/pythran,artas360/pythran,pbrunet/pythran,serge-sans-paille/pythran,serge-sans-paille/pythran,artas360/pythran,pbrunet/pythran,hainm/pythran,pombredanne/pythran,pombredanne/pythran,pombredanne/pythran,pbrunet/pythran,hainm/pythran,hainm/pythran | pythran/tests/cases/nd_local_maxima.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial tests for endpoint code."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Copyright 2014 Metaswitch Networks\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use ... | python | new_file | 1 | 1 | apache-2.0 | c7c7c3aaf466af37fb8e632b959b08ce34d143dc | ocadotechnology/calico,alexhersh/calico,nbartos/calico,neiljerram/felix,beddari/calico,alexaltair/calico,alexhersh/calico,matthewdupre/felix,TrimBiggs/calico,kasisnu/calico,alexaltair/calico,neiljerram/felix,neiljerram/felix,beddari/calico,anortef/calico,ocadotechnology/calico,fasaxc/felix,matthewdupre/felix,Metaswitch... | calico/felix/test/test_endpoint.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create basic view on opps article"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom django.views.generic.detail import DetailView\n\nfrom opps.article.models import Post\n\n\nclass Opps... | python | new_file | 1 | 0 | mit | 4ca101b1e7527deba3bf660745b0048def309170 | williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps,opps/opps,williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,jeanmask/opps | opps/article/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add vcf clean script to take out variants from vcf that dont match fasta"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python2.7\n\n\"\"\"\n The 1000 Genomes VCF files have some SNPs which are not congruant with\n the fas... | python | new_file | 9 | 7 | mit | 532e84e2dedb83c2584fcd4122f0f3f905413b63 | glennhickey/vg2sg,glennhickey/vg2sg,glennhickey/vg2sg,glennhickey/vg2sg | data/vcfClean.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script that detects a shapefile UTM zone"
},
{
"role": "assistant",
"content": "# modified code from https://pcjericks.github.io/py-gdalogr-cookbook/\n# vector_layers.html\n\nimport os\nfrom osgeo import ogr\nfrom sys import ... | python | new_file | 5 | 4 | mit | e75860ada9b64054c9f45e1af2ddf485e5efb6d0 | jbranigan/geo-scripts-python | latlng2utm/detect-utm-zone.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Introduce new manage.py command which creates users with default passwords.\n\n(imported from commit ba5ed9cb6ee91435b184845019391e5dc38fc3aa)"
},
{
"role": "assistant",
"content": "import sys\n\nfrom django.core.management.base ... | python | new_file | 7 | 8 | apache-2.0 | 5b70b4a04fe7d6eb9d5836bef297647dee85124a | Gabriel0402/zulip,j831/zulip,swinghu/zulip,sup95/zulip,tiansiyuan/zulip,krtkmj/zulip,yuvipanda/zulip,Batterfii/zulip,kou/zulip,ashwinirudrappa/zulip,Batterfii/zulip,levixie/zulip,he15his/zulip,dotcool/zulip,kokoar/zulip,KJin99/zulip,lfranchi/zulip,itnihao/zulip,grave-w-grave/zulip,vaidap/zulip,niftynei/zulip,rht/zulip,... | zephyr/management/commands/create_user.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new field for email - migration file"
},
{
"role": "assistant",
"content": "\"\"\"empty message\n\nRevision ID: f092dbba3026\nRevises: ad8c63f1135e\nCreate Date: 2018-11-20 13:01:18.328112\n\n\"\"\"\n\n# revision identifiers,... | python | new_file | 1 | 1 | mit | 2998801fa337a6f89093380d5d05c5299e3617b1 | CSC-IT-Center-for-Science/pouta-blueprints,CSC-IT-Center-for-Science/pouta-blueprints,CSC-IT-Center-for-Science/pouta-blueprints,CSC-IT-Center-for-Science/pouta-blueprints | migrations/versions/f092dbba3026_.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a testcase for Command"
},
{
"role": "assistant",
"content": "from tornado.ioloop import IOLoop\nfrom tests.helper import ExternalVersionTestCase\n\n\nclass CMDTest(ExternalVersionTestCase):\n def get_new_ioloop(self):\n ... | python | new_file | 1 | 1 | mit | f5fb79cc637aa0305b4cbea144330208d2da0378 | lilydjwg/nvchecker | tests/test_cmd.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution to lintcode question 174"
},
{
"role": "assistant",
"content": "\"\"\"\nDefinition of ListNode\nclass ListNode(object):\n\n def __init__(self, val, next=None):\n self.val = val\n self.next = next\n\"... | python | new_file | 2 | 3 | mit | a926e216426c66dd93ea2e2ac5bad4aedd0c13b9 | Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode | lintcode/Easy/174_Remove_nth_Node_from_End_of_List.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: TMP: Add temporary scratch test for dev."
},
{
"role": "assistant",
"content": "from bluesky import RunEngine\nRE = RunEngine({})\nfrom ophyd.sim import det\nfrom bluesky.plans import count\nfrom suitcase.jsonl import Serializer\... | python | new_file | 1 | 0 | bsd-3-clause | c6113680e79ba076e4de06396ba75c18db4c98d0 | ericdill/databroker,ericdill/databroker | scratch_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the const module: List of control constants."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# Copyright (c) 2015 Angel Terrones (<<EMAIL>>)\n#\n# Permission is hereby granted, free of charge, to any person obta... | python | new_file | 1 | 0 | mit | 5601271051fee2e24024843b0a74ca6a3047f25c | AngelTerrones/Algol,AngelTerrones/Algol | Algol/consts.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add some pseudo core for the core"
},
{
"role": "assistant",
"content": "import time\nimport RPi.GPIO as io\n\nfrom urllib.parse import urlencode\nfrom urllib.request import Request, urlopen\n\nio.setmode(io.BCM)\n\ncontact_pin =... | python | new_file | 8 | 4 | mit | 04a46726e95b42d3566456338df04c222d5a2863 | arnaudoff/watcher,arnaudoff/watcher,arnaudoff/watcher | core/main.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simulator result parser tool"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\n\nimport os\nimport os.path\nimport sys\nimport json\n\nsuccess = 0\n\ndef _extractGenome(header):\n headers = header.split('|')\n... | python | new_file | 3 | 4 | apache-2.0 | 1ff0b5fe7651b836ac9010b2970ad6b45a0739e7 | iychoi/biospectra,iychoi/biospectra,iychoi/biospectra | tools/verify_simulator_result.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add pygments rst support plugin (from zine)"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n The Pygments reStructuredText directive\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n This fragment is ... | python | new_file | 1 | 4 | mit | c8f53c175b948b771c7d1eee7d1156f76287ca97 | gdamjan/vezilka | vezilka/lib/pygments_rst.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Script for Testing Line Segment Features"
},
{
"role": "assistant",
"content": "from image_process.hough_transform import get_hough_lines\nfrom lines.line import Point, LineSegment\nimport matplotlib.pyplot as plt\nimport os\... | python | new_file | 6 | 0 | mit | 1337bed0e13f8e0f3d1294464e817b782b765b47 | Molecular-Image-Recognition/Molecular-Image-Recognition | scripts/read_in_lines.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to create party sequences for a shop"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n\"\"\"Create article and order sequences for a party's shop.\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License:... | python | new_file | 1 | 1 | bsd-3-clause | aead6b8dab78056e0034ef21ea82d9151123f8a3 | m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps | scripts/create_shop_sequences.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Migrate datbase to add Weather model and delete weather field from Incident model"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations... | python | new_file | 1 | 0 | mit | 22656ecba485c56b654cf4b57b2906a7f0e7effc | SPARLab/BikeMaps,SPARLab/BikeMaps,SPARLab/BikeMaps | mapApp/migrations/0005_auto_20150819_1829.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script for contig statistics for FAI\n\n\nFormer-commit-id: e7b46625514f8db9b99d474ad181629e483ecbf7"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python3\n\nimport argparse\nimport statistics\n\nparser = argparse.Ar... | python | new_file | 1 | 0 | mit | f3d00e7f0b76db522e55ed0f1988dfdf7e5cf3ff | karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle,karel-brinda/prophyle | bin/contig_statistics.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new tools for working with current data."
},
{
"role": "assistant",
"content": "\"\"\"\nTools to work with current data. Reuses some functions from tide_tools.\n\n\"\"\"\n\nfrom tide_tools import addHarmonicResults, getObserv... | python | new_file | 14 | 1 | mit | bd94cd20c3021e7fef470963b67164f431ec86fa | pwcazenave/PyFVCOM | PyFVCOM/current_tools.py | rejected_lint | Too many lint violations: 14 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add automated tests for database references."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n\"\"\"\nCreated by: Lee Bergstrand (2017)\n\nDescription: A simple unittest for testing the database reference module.\n... | python | new_file | 1 | 1 | apache-2.0 | 6342fb6890ad4966b655ccfcea1b585dac155729 | LeeBergstrand/pygenprop | modules/testing/test_database_reference.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test worker (replies with received content) for vas2nets transport."
},
{
"role": "assistant",
"content": "# -*- test-case-name: vumi.workers.vas2nets.test_vas2nets -*-\n# -*- encoding: utf-8 -*-\n\nfrom twisted.python import log... | python | new_file | 3 | 1 | bsd-3-clause | 7219cea7d4480739e39ac3e4c3c431002b786241 | harrissoerja/vumi,vishwaprakashmishra/xmatrix,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,TouK/vumi | vumi/workers/vas2nets/workers.py | rejected_duplicate | Near-duplicate of sample 3197 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Python script for running VGG_Face demo."
},
{
"role": "assistant",
"content": "# Xiang Xiang (<EMAIL>), March 2016, MIT license.\n\nimport numpy as np\nimport cv2 \nimport caffe\nimport time\n\nimg = caffe.io.load_image( \"a... | python | new_file | 2 | 0 | mit | 789e6c43c03d9d0c238919fd85a48f4d9b37cabd | eglxiang/vgg_face,eglxiang/vgg_face,eglxiang/vgg_face | classify_vgg.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test which checks for growing memory usage for block funcs"
},
{
"role": "assistant",
"content": "import lz4.block\nimport pytest\n\n\ntest_data = [\n (b'a' * 1024 * 1024),\n]\n\n\n@pytest.fixture(\n params=test_data,\n... | python | new_file | 1 | 4 | bsd-3-clause | 3aa6135d8104cac474326d915f290ecbb5014fde | python-lz4/python-lz4,python-lz4/python-lz4 | tests/block/test_block_3.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add log splitter for 8mote experiment."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2014, Niklas Hauser\n# All rights reserved.\n#\n# The file is part of my bachelor thesi... | python | new_file | 2 | 0 | bsd-2-clause | bc857e06d5f464647bb0297006975f4132dbea8d | salkinium/bachelor,salkinium/bachelor,salkinium/bachelor | link_analysis/experiment_parser_temp_big.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport discord\nfrom discord.ext import commands\n\nfrom pony import orm\n\nDESCRIPTION = \"\"\"\nHi, I'm Yutu!\nI'm the bot for the Velvet fan discord.\nI'm still learning so sorry if I do something wrong.\nYou can ask my programmer @Harko... | python | edit | 1 | 4 | mit | c881dbef22ac7ca26ad6abceb3c2e02d0b759040 | HarkonenBade/yutu | yutu/bot.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add lumi for file for dataset tool"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# Before running:\n# source /cvmfs/cms.cern.ch/crab3/crab.sh\n\nimport pprint\nfrom dbs.apis.dbsClient import DbsApi\n\nurl=\"http... | python | new_file | 1 | 0 | mit | 868c9bf69a04be5aa62d0796daf8dc0e06b2401f | rovere/utilities,rovere/utilities,rovere/utilities,rovere/utilities | lumisAndFiles.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for reading the depth map"
},
{
"role": "assistant",
"content": "from __future__ import division, absolute_import, print_function\nfrom past.builtins import xrange\n\nimport unittest\nimport numpy.testing as testing\nimport ... | python | new_file | 4 | 1 | apache-2.0 | 4fb4ce10862ad03bb889b6e8deae4a1e09a9685c | erykoff/redmapper,erykoff/redmapper | tests/test_depthmap.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Write test for reduced framerate."
},
{
"role": "assistant",
"content": "try:\n from unittest import mock\nexcept ImportError:\n import mock\n\nfrom sensor_msgs.msg import Image\n\nfrom reduce_framerate import FramerateRedu... | python | new_file | 1 | 2 | mit | b0a0154b93cf536ece580ba96fdf3251788c29dc | masasin/spirit,masasin/spirit | src/tests/test_reduce_framerate.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test suggestions for missing activity"
},
{
"role": "assistant",
"content": "from indra.statements import *\nfrom bioagents.mra.model_diagnoser import ModelDiagnoser\n\ndrug = Agent('PLX4720')\nraf = Agent('RAF')\nmek = Agent('ME... | python | new_file | 12 | 1 | bsd-2-clause | d6050249f44304813d2bba120f9c232c0f158a34 | bgyori/bioagents,sorgerlab/bioagents | bioagents/tests/test_model_diagnoser.py | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add private module with landlab info."
},
{
"role": "assistant",
"content": "version = '1.0.2'\nname = 'landlab'\ncite_as = [\n \"\"\"@article{hobley2017creative,\n title={Creative computing with Landlab: an open-source too... | python | new_file | 1 | 0 | mit | 6c1f5364a3a8862b54121ab28ade5d41c101c056 | landlab/landlab,landlab/landlab,cmshobe/landlab,amandersillinois/landlab,cmshobe/landlab,amandersillinois/landlab,landlab/landlab,cmshobe/landlab | landlab/_info.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 520. Detect Capital\n\n520. Detect Capital: https://leetcode.com/problems/detect-capital/"
},
{
"role": "assistant",
"content": "class Solution(object):\n def detectCapitalUse(self, word):\n \"\"\"\n... | python | new_file | 1 | 4 | apache-2.0 | c9b844ca7a5693de59cca2e4c3d5e1cdf4b13270 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/detect-capital.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add smart functions to get the correct gene annotation"
},
{
"role": "assistant",
"content": "from contextlib import closing\nimport subprocess\nimport logging\n\nimport do\n\nlogger = logging.getLogger(\"Main\")\n\ndef g37_map(o... | python | new_file | 7 | 6 | cc0-1.0 | 26a66b90f3e1a63ae91eb2eac08a580b4be6a3c4 | NCBI-Hackathons/rnaseqview,NCBI-Hackathons/rnaseqview,NCBI-Hackathons/rnaseqview,NCBI-Hackathons/rnaseqview,NCBI-Hackathons/rnaseqview | counting/mapper.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Create delete data from url test script"
},
{
"role": "assistant",
"content": "__author__ = 'chuqiao'\nimport script\n# DELETE ALL DATA\nscript.deleteDataInSolr()\n# ADD DATA FROM 2 SORCES\nscript.addDataToSolrFromUrl(\"http://ww... | python | new_file | 1 | 0 | mit | fe4f86b9635fadd6a0c79065e4c9888327e31b80 | elixirhub/events-portal-scraping-scripts | DeleteDataFromUrlTest.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Put gst code into Avocado test format. Needs to be edited to take a snapshot and read the qr code."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n\"\"\"\nThis module sets up a video stream from internal or connec... | python | new_file | 2 | 3 | mit | 427ee2412af3143b3808e18a26ed2079b510ee43 | daveol/Fedora-Test-Laptop,daveol/Fedora-Test-Laptop | tests/webcam_read_qr.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Change volume per process example\n\nMutes the volume of all processes, but unmutes chrome.exe process."
},
{
"role": "assistant",
"content": "\"\"\"\nMutes the volume of all processes, but unmutes chrome.exe process.\n\"\"\"\nfr... | python | new_file | 1 | 4 | mit | b88118fb323625f0571961b7f8ac40294c85b741 | AndreMiras/pycaw | examples/volume_by_process_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to print results."
},
{
"role": "assistant",
"content": "from __future__ import division\n\nimport argparse\nimport h5py\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('results_hdf5_fna... | python | new_file | 4 | 6 | mit | a993765b8ebb02baf64c3fdd13406734f8ae9136 | alexlee-gk/visual_dynamics | print_results.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test class for MeasurementGet"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n#\n# Copyright 2014-2015 Boundary, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use th... | python | new_file | 1 | 1 | apache-2.0 | e50d37fb89fc9bd80499b2db282afa310965017d | boundary/pulse-api-cli,jdgwartney/boundary-api-cli,boundary/pulse-api-cli,boundary/boundary-api-cli,jdgwartney/boundary-api-cli,jdgwartney/pulse-api-cli,boundary/boundary-api-cli,wcainboundary/boundary-api-cli,jdgwartney/pulse-api-cli,wcainboundary/boundary-api-cli | tests/unit/boundary/measurement_get_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright 2016 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy ... | python | edit | 2 | 6 | apache-2.0 | e412a68afe691913525245d2a8a3a8e9e3ba532d | google/xi-editor,google/xi-editor,fuchsia-mirror/third_party-xi-editor,modelorganism/xi-editor,modelorganism/xi-editor,fuchsia-mirror/third_party-xi-editor,fuchsia-mirror/third_party-xi-editor,google/xi-editor,google/xi-editor,fuchsia-mirror/third_party-xi-editor,modelorganism/xi-editor | python/xicore.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Complete cartesian product for repeated"
},
{
"role": "assistant",
"content": "\"\"\"Cartesian product of same numbers with repeated times.\"\"\"\n\nclass CartesianProduct(object):\n def _product_two(self, nums1, nums2):\n ... | python | new_file | 2 | 4 | bsd-2-clause | 4486009178284e83fdcae7b7a6e6b755a74f22a7 | bowen0701/algorithms_data_structures | alg_cartesian_product.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for `__file__` behavior in `ipython <file>`"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\"\"\"Tests for shellapp module.\n\nAuthors\n-------\n* Bradley Froehle\n\"\"\"\n#------------------------------... | python | new_file | 3 | 2 | bsd-3-clause | dbfdeea5f080c444a4d4abf6bdf81632bbab917a | ipython/ipython,ipython/ipython | IPython/core/tests/test_shellapp.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Twilio text message beacon\n\nThis beacon will poll a Twilio account for text messages\nand emit an event on Salt's event bus as texts are received."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n'''\nBeacon ... | python | new_file | 5 | 10 | apache-2.0 | c5433454a14f4dd6c3d84735e920144914ca6f2d | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/beacons/twilio_txt_msg.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests to ensure ActivityTask attaches the context"
},
{
"role": "assistant",
"content": "from sure import expect\n\nfrom simpleflow import activity\nfrom simpleflow.swf.task import ActivityTask\n\n\n\n@activity.with_attribute... | python | new_file | 1 | 1 | mit | 9c9cdd1f1979aa880726fc0039255ed7f7ea2f6d | botify-labs/simpleflow,botify-labs/simpleflow | tests/test_simpleflow/swf/test_task.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add two methods for rotating an array."
},
{
"role": "assistant",
"content": "class Solution(object):\n def rotate(self, nums, k):\n \"\"\"\n :type nums: List[int]\n :type k: int\n :rtype: void Do n... | python | new_file | 2 | 2 | mit | a4e77ce700a1d54d97dd9ddd4de73e5bfb6edf61 | comicxmz001/LeetCode,comicxmz001/LeetCode | Python/189_Rotate_Array.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .. import env\nfrom ..exceptions import EnvironmentFileNotFound\n\n\nclass YamlFileSpec(object):\n _environment = None\n\n def __init__(self, filename=None, **kwargs):\n self.filename = filename\n self.msg = None\n\... | python | edit | 1 | 2 | bsd-3-clause | f2cbc1a1b23f182730ccc5f4fc9f71ad15f3e188 | mikecroucher/conda-env,mikecroucher/conda-env,dan-blanchard/conda-env,conda/conda-env,phobson/conda-env,conda/conda-env,isaac-kit/conda-env,nicoddemus/conda-env,nicoddemus/conda-env,asmeurer/conda-env,ESSS/conda-env,asmeurer/conda-env,dan-blanchard/conda-env,isaac-kit/conda-env,phobson/conda-env,ESSS/conda-env | conda_env/specs/yaml_file.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add args to main code, and make executable"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n#\n#\nfrom zooq import ZooQ\nfrom zooqdb_sqlite import ZooQDB_SQLite\nimport time\nfrom argparse import ArgumentParser\n\na... | python | new_file | 1 | 0 | mit | 6594eee668a563d73237669b0dd05a84fbe1e5fb | ckane/zooq,ckane/zooq | zooq_main.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a tool for extracting subsequences from vcf2multialign output"
},
{
"role": "assistant",
"content": "#\n# Copyright (c) 2017 Tuukka Norri\n# This code is licensed under MIT license (see LICENSE for details).\n# \n\nimport arg... | python | new_file | 3 | 10 | mit | 70705f896aa5f45c6365f9c584982289b0711030 | tsnorri/vcf2multialign,tsnorri/vcf2multialign,tsnorri/vcf2multialign,tsnorri/vcf2multialign | tools/extract_from_multialign.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution for 232, implement stack using queue.?"
},
{
"role": "assistant",
"content": "class Stack(object):\n def __init__(self):\n \"\"\"\n initialize your data structure here.\n \"\"\"\n self.... | python | new_file | 3 | 1 | mit | 9e1b9086fb699fa79c38d3f57f2ea76d3ea9d09c | comicxmz001/LeetCode,comicxmz001/LeetCode | Python/232_ImplementStackUsingQueue.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for the whole process with separated modules."
},
{
"role": "assistant",
"content": "\n\"\"\"\nTest 2\n======\n- Separation between Mscthesis and pySpatialTools\n\"\"\"\n\n## Mscthesis application\n##########################... | python | new_file | 5 | 0 | mit | 779f9868cd348cdbe24255d52bc2ce21c4ca85bd | tgquintela/Mscthesis | Tests/test_process2.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Check the return value of SCardGetStatusChange() for unknown readers\n\n\ngit-svn-id: f2d781e409b7e36a714fc884bb9b2fc5091ddd28@5882 0ce88b0d-b2fd-0310-8134-9614164e65ea"
},
{
"role": "assistant",
"content": "#! /usr/bin/env pytho... | python | new_file | 8 | 0 | bsd-3-clause | 65a156201dc91b54d8edd7d45689eb920ec0dbe3 | vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android,vicamo/pcsc-lite-android | UnitaryTests/SCardGetStatusChange2.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a CI script to copy the CLI release\n\nThis moves the script out of the core CLI.\n\nhttps://github.com/dcos/dcos-core-cli/pull/66\nhttps://jira.mesosphere.com/browse/DCOS_OSS-4278"
},
{
"role": "assistant",
"content": "#!/us... | python | new_file | 3 | 0 | apache-2.0 | 268f9c7d7354fef5a87b8a56282aad617c5953f4 | kensipe/dcos-cli,dcos/dcos-cli,dcos/dcos-cli,kensipe/dcos-cli,dcos/dcos-cli,dcos/dcos-cli,kensipe/dcos-cli,dcos/dcos-cli,kensipe/dcos-cli,kensipe/dcos-cli | ci/copy-release.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a unit test for the ChildCacheGarbageColleector class."
},
{
"role": "assistant",
"content": "import smugmug\nimport unittest\n\nclass MockNode(object):\n def __init__(self):\n self._reset_times = 0\n\n def reset_cache(s... | python | new_file | 1 | 1 | mit | 7946b8fe8a8cddeef675cc60b5ebb64a250ea2c4 | graveljp/smugcli | smugmug_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add statistics computation from traces"
},
{
"role": "assistant",
"content": "\"\"\"\nCompute statistics from linear traces of embryos. The most basic\nstatistic is min/max, but others will be compiled here.\n\"\"\"\n\nimport num... | python | new_file | 1 | 2 | bsd-3-clause | 804a91299c97a8008633d6e61b68b7923c804152 | jni/lesion | lesion/stats.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test for cluster command using VCR"
},
{
"role": "assistant",
"content": "import os\nimport tempfile\n\nfrom buddy.command.cluster import cli\nimport pytest\nimport vcr\nimport yaml\nimport boto3\n\n\ndef teardown():\n e... | python | new_file | 6 | 3 | mit | 59d92d862d5e744a11a59b41ca8e01acd6c2b105 | pior/buddy | tests/test_command_cluster.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add aura compile testing by default to likely areas (4).\n\nBUG=chromium:107599\nTEST=None\n\nReview URL: http://codereview.chromium.org/8907044\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@114847 0039d316-1c4b-4281-b951-d872f2087... | python | new_file | 1 | 1 | bsd-3-clause | fb3fc2bd34fd9ad8f5e8ad088fb1db35a1a1ceb6 | adobe/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,adobe/chro... | chrome/browser/extensions/PRESUBMIT.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add an example test checking that ast equality works"
},
{
"role": "assistant",
"content": "import unittest\n\nimport sure\n\nfrom compiler import parse, lex, error, ast, type\n\n\nclass TestAST(unittest.TestCase):\n def test_... | python | new_file | 7 | 1 | mit | 27d9b013f05d3fb2ef3cfdfe23af506743fb12ed | dionyziz/llama,Renelvon/llama,Renelvon/llama,dionyziz/llama | tests/test_ast.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a little utility to help update resolved crashers.\n\nSwift SVN r28923"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n\n# A small utility to take the output of a Swift validation test run\n# where some compiler cra... | python | new_file | 1 | 1 | apache-2.0 | 4a8bba2e2354ec3a73c01c8183d100254e1314df | shahmishal/swift,karwa/swift,devincoughlin/swift,xwu/swift,jopamer/swift,benlangmuir/swift,mightydeveloper/swift,stephentyrone/swift,dduan/swift,emilstahl/swift,dduan/swift,tkremenek/swift,shajrawi/swift,amraboelela/swift,ahoppen/swift,nathawes/swift,practicalswift/swift,kstaring/swift,parkera/swift,harlanhaskins/swift... | utils/resolve-crashes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add data migrations for vote"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.3 on 2016-03-19 07:58\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef mi... | python | new_file | 1 | 1 | mit | b2b75a41f661b7945a3e1bca632aef13e8a9a70d | pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016 | src/reviews/migrations/0010_auto_20160319_0758.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [devil] Add signal handler context manager.\n\nBUG=chromium:620723\n\nReview-Url: https://codereview.chromium.org/2069133005"
},
{
"role": "assistant",
"content": "# Copyright 2016 The Chromium Authors. All rights reserved.\n# Us... | python | new_file | 1 | 2 | bsd-3-clause | b2bcbcedccffba4dce7b5c2d391de6444520f177 | sahiljain/catapult,catapult-project/catapult-csm,sahiljain/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,sahiljain/catapult,catapult-project/catapult,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,bensc... | devil/devil/utils/signal_handler.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Read line by line from the NREL polymer text file and create list of dictionaries using the header keys."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport sys\nimport os\nimport json\n\n\ndef main(argv):\n ... | python | new_file | 1 | 9 | apache-2.0 | 5da5b3426ab6134d1a2e08ce5b57a63a32493178 | materials-data-facility/forge | prototypes/nrel_polymer_converter.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Call of Duty: Modern Warfare 3 plugin"
},
{
"role": "assistant",
"content": "import os\nfrom lib.base_plugin import BasePlugin\nfrom lib.paths import SteamGamesPath\n\n\nclass CoDMW3Plugin(BasePlugin):\n Name = \"Call of Duty:... | python | new_file | 1 | 2 | mit | 5df378c356d22cd1e668ba8e591ef61bb2da324b | Pr0Ger/SGSB | plugins/CoD_MW3.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve Code Fights sum of two representations 2 problem"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Code Fights Count of Two Representations 2 Problem\n\n\ndef countSumOfTwoRepresentations2(n, l, r):\n ret... | python | new_file | 1 | 3 | mit | c66eba027465779938f6ca211595982526d05cac | HKuz/Test_Code | CodeFights/countSumOfTwoRepresentations2.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add python test for copyto with mask"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n'''\nTest for copyto with mask\n'''\n\n# Python 2/3 compatibility\nfrom __future__ import print_function\n\nimport cv2 as cv\nim... | python | new_file | 3 | 1 | apache-2.0 | 936523ae5212791337a852060052bc5f379ffaf7 | opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv | modules/python/test/test_copytomask.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add docopt implementation in main file"
},
{
"role": "assistant",
"content": "\"\"\"space_allocator.py\n\nUsage:\n create_room <room_type> <room_name>\n Create rooms in the dojo\n add_person <person_name> <FELLOW|STA... | python | new_file | 1 | 0 | mit | 11aed227058304d691ed0dc42f533ee0832ac5ae | EdwinKato/Space-Allocator,EdwinKato/Space-Allocator | space_allocator.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add classes representing column options\n\nWe will use these instances of these classes, instead of the\nDataSourceProperty named tuples to represent the available columns\nin the report."
},
{
"role": "assistant",
"content": "cl... | python | new_file | 1 | 1 | bsd-3-clause | 14ccbca8b2cb7318bd1dd11970cd359b36ce9b8e | qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq | corehq/apps/userreports/reports/builder/columns.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add submission script that currently only performs login."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nimport getpass\nimport json\nimport requests\nimport sys\nfrom argparse import ArgumentParser, FileType\nfrom... | python | new_file | 3 | 5 | bsd-2-clause | ea66e543df237cc066b17e3bc814a885eb60cc95 | ucsb-cs/submit,ucsb-cs/submit,ucsb-cs/submit,ucsb-cs/submit | scripts/submit.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Complete members bypass for larger than chorus"
},
{
"role": "assistant",
"content": "# Generated by Django 2.0.2 on 2018-02-24 21:22\n\nfrom django.db import migrations\nimport django.db.models.manager\n\n\nclass Migration(migra... | python | new_file | 1 | 0 | bsd-2-clause | 003e1b5c25b5a5515f9938871516c8607a560643 | dbinetti/barberscore-django,dbinetti/barberscore-django,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api | project/api/migrations/0002_auto_20180224_1322.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for extra roots"
},
{
"role": "assistant",
"content": "from support import lib,ffi\nfrom qcgc_test import QCGCTest\nimport unittest\n\nclass ExtraRootTestCase(QCGCTest):\n def test_extra_root(self):\n # XXX: Vi... | python | new_file | 1 | 2 | mit | 9dc756b627e39c62ffce3af617089c331822fa33 | ntruessel/qcgc,ntruessel/qcgc,ntruessel/qcgc | test/test_extra_root.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Create setup channel models test"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom django.test import TestCase\nfrom django.contrib.sites.models import Site\n\nfrom opps.core.models.cha... | python | new_file | 1 | 1 | mit | eea2d8de93806f19f431efff7afe66c1dfef1630 | williamroot/opps,jeanmask/opps,opps/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps,williamroot/opps,YACOWS/opps,opps/opps,opps/opps | opps/core/tests/channel_models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import print_function, division\n\nfrom sympy.logic.utilities import load_file\nfrom sympy.logic import satisfiable\nimport time\nimport os\nimport sys\n\ninput_path = os.getcwd() + '/' + '/'.join(sys.argv[0].split('/')[:-1]... | python | edit | 1 | 0 | bsd-3-clause | 0bdb41a9e1820abf7d068e58f3cdac9d2c8f7221 | MridulS/sympy,cccfran/sympy,yashsharan/sympy,shipci/sympy,sahilshekhawat/sympy,Sumith1896/sympy,ga7g08/sympy,chaffra/sympy,souravsingh/sympy,sahilshekhawat/sympy,atreyv/sympy,lidavidm/sympy,postvakje/sympy,jerli/sympy,rahuldan/sympy,chaffra/sympy,Sumith1896/sympy,ga7g08/sympy,sunny94/temp,abhiii5459/sympy,sahmed95/symp... | sympy/logic/benchmarks/run-solvers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add skeleton for sync daemon."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n#\n# Copyright 2012 Jim Lawton. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n... | python | new_file | 3 | 2 | apache-2.0 | 4519910f34ca35224d9b0fdd1cea4a36a425f4da | jimlawton/gdrive-linux-googlecode,babycaseny/gdrive-linux,jimlawton/gdrive-linux,jmfield2/gdrive-linux | gdrived.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example tests for canvas actions"
},
{
"role": "assistant",
"content": "from seleniumbase import BaseCase\r\n\r\n\r\nclass CanvasTests(BaseCase):\r\n def get_pixel_colors(self):\r\n # Return the RGB colors of the ca... | python | new_file | 1 | 3 | mit | 349cf99e67279a7d26abbff9d9ca09eed8300dda | seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase | examples/test_canvas.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Transform units of cavity regions in Shin et al's 2016."
},
{
"role": "assistant",
"content": "# Copyright (C) 2016 Zhixian MA <<EMAIL>>\n\n\"\"\"\nTransform cavities regions of samples selected from paper\narXiv-1610.03487.\n\nR... | python | new_file | 1 | 4 | mit | ffebf307137d0435d7b2f0d10ac912ca7f87f1c7 | myinxd/cavdet,myinxd/cavdet | cnn/getReg.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add initial testing for persistence."
},
{
"role": "assistant",
"content": "import os\nimport shutil\nimport tempfile\nimport time\n\n\nfrom lwr.persistence import PersistedJobStore\nfrom lwr.queue_manager import QueueManager\n\n... | python | new_file | 1 | 3 | apache-2.0 | 0b7b471af3a4b1a2490b9a0dd2dd4b8f64453c17 | natefoo/pulsar,jmchilton/pulsar,ssorgatem/pulsar,natefoo/pulsar,jmchilton/pulsar,galaxyproject/pulsar,jmchilton/lwr,ssorgatem/pulsar,jmchilton/lwr,galaxyproject/pulsar | test/persistence_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migrations for website app"
},
{
"role": "assistant",
"content": "# Generated by Django 2.0.6 on 2018-06-21 07:59\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [... | python | new_file | 1 | 0 | apache-2.0 | 5c063317bbf1c67b1e17992ec338b00451735296 | PLUS-POSTECH/study.plus.or.kr,PLUS-POSTECH/study.plus.or.kr,PLUS-POSTECH/study.plus.or.kr | src/website/migrations/0005_auto_20180621_1659.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add alembic migration for role type\n\nrefs #295"
},
{
"role": "assistant",
"content": "\"\"\"add_role_type\n\nRevision ID: 551bc42a839\nRevises: 41af1c8d394\nCreate Date: 2016-02-02 17:19:21.998718\n\n\"\"\"\n\n# revision identi... | python | new_file | 1 | 1 | apache-2.0 | fb4212e1e3de5a63652561066d8a30c833607b28 | rickmak/skygear-server,SkygearIO/skygear-server,rickmak/skygear-server,rickmak/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server | alembic/versions/551bc42a839_add_role_type.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic tests for views."
},
{
"role": "assistant",
"content": "from django.test.client import Client\nfrom django.core.urlresolvers import reverse\n\nfrom go.apps.tests.base import DjangoGoApplicationTestCase\n\n\nclass JsBoxT... | python | new_file | 1 | 1 | bsd-3-clause | be7a803888793a09ac714220be08f3914034c1bb | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/apps/jsbox/tests/test_views.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Move all formatting logic into a single module"
},
{
"role": "assistant",
"content": "import os\r\n\r\nfrom gooey.gui.util.quoting import quote\r\n\r\n\r\ndef checkbox(metadata, value):\r\n return metadata['commands'][0] if va... | python | new_file | 3 | 6 | mit | 3942b52249a061dabb0560941aeb9dd135245de9 | chriskiehl/Gooey,codingsnippets/Gooey,partrita/Gooey | gooey/gui/formatters.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"Modals for deleting objects\"\"\"\n\nfrom lib import base\nfrom lib import decorator\nfrom lib.constants import locato... | python | edit | 1 | 1 | apache-2.0 | 481df944700297300892bd14783310aad14c093c | VinnieJohns/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,kr41/ggrc-core,p... | test/selenium/src/lib/page/modal/delete_object.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.