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: Revert \"Revert \"add migration for new fields\"\"\n\nThis reverts commit 31b01725ae23624358c7da819a6c6e4c9a41b0c4."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.dev20150906080247 on 20... | python | new_file | 1 | 0 | bsd-3-clause | f4b5dafbb9a1a9af00b8981dbb442fa8f8385203 | datamade/pupa,mileswwatkins/pupa,opencivicdata/pupa,datamade/pupa,mileswwatkins/pupa,opencivicdata/pupa | pupa/migrations/0002_auto_20150906_1458.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add management command to generate a random secret key"
},
{
"role": "assistant",
"content": "from django.core.management.templates import BaseCommand\nfrom django.utils.crypto import get_random_string\n\nimport fileinput\n\nfrom... | python | new_file | 1 | 3 | mit | a094b0978034869a32be1c541a4d396843819cfe | Angoreher/xcero,Angoreher/xcero,Angoreher/xcero,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,Angoreher/xcero,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3 | project/management/commands/generatesecretkey.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add function to convert between number bases."
},
{
"role": "assistant",
"content": "from __future__ import division\n\nfrom math import ceil, log\n\n__all__ = [\n 'base_expansion',\n]\n\ndef base_expansion(n, to_base, from_ba... | python | new_file | 1 | 7 | bsd-3-clause | 531d1c868b36580a8423d71c3ee324c8669ab98b | ComSciCtr/pycelle | pycelle/misc.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add utility for formatting fasta files for seqseek"
},
{
"role": "assistant",
"content": "import argparse\n\n\ndef run(path):\n print \"Formatting %s\" % path\n with open(path) as fasta:\n header = ''\n first_... | python | new_file | 2 | 2 | mit | 4aef9a5bca4927db0ff7b661850de1c8d3c61274 | 23andMe/seqseek | seqseek/format_fasta.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add wx implementation of the ArrayViewEditor."
},
{
"role": "assistant",
"content": "#-------------------------------------------------------------------------------\n# Imports:\n#------------------------------------------------... | python | new_file | 1 | 0 | bsd-3-clause | 628c092b2fd8b53e116e04b240f04b7508ab6118 | geggo/pyface,brett-patterson/pyface,geggo/pyface,pankajp/pyface | enthought/traits/ui/wx/array_view_editor.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script to compile all binary modules in test data directory\n\nGitOrigin-RevId: b4da703157f1397dac2760ca844d43143bae5cdc"
},
{
"role": "assistant",
"content": "import os\n\nfrom Cython.Build.Cythonize import main as cythoni... | python | new_file | 1 | 4 | apache-2.0 | cf160d8259fb98ef4003283063529be8c4c087fb | allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/int... | python/helpers/pycharm_generator_utils/test/data/SkeletonCaching/binaries/compile_binaries.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Change output format to csv"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport nlp.tokenizer\nimport nlp.TextVectorizer\n\nimport sys\n\ndata = []\nfilenames = sys.argv[1:]\nfor filename... | python | new_file | 3 | 0 | mit | 7941202bf8c7f3c553e768405b72b0b5b499dee6 | otknoy/ExTAT,otknoy/ExTAT | tfidf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test python script to get data from Rflink."
},
{
"role": "assistant",
"content": "import serial\nimport time\nimport logging\nimport re\nlogging.basicConfig(filename='debug.log',level=logging.DEBUG)\ndef readlineCR(port):\n r... | python | new_file | null | null | apache-2.0 | d662bf8ddcdd78b6cc75ea7b6731f5ac2379645d | matt2005/pyrflink | rflink1.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write python code for the following: Add template tag to render ``markdown``."
},
{
"role": "assistant",
"content": "from django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.utils.safestring import mark_safe\n\nfrom us_ignite... | python | new_file | 1 | 1 | bsd-3-clause | e4efa5a447e85c11723991870bd6fc632bc97ed5 | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | us_ignite/common/templatetags/common_markdown.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add CentOS config for acp-workshop\n\nSigned-off-by: Jerry Baker <<EMAIL>>"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nPRIMARY_OS = 'CENTOS-7.0'\nCS_ENGINE = '''#!/bin/sh\n#\nFQDN=\"{f... | python | new_file | null | null | apache-2.0 | 69978f33eb1b7fb7c24d06da33cec1ee48667bef | curtisz/train,curtisz/train,anokun7/train,kizbitz/train,kizbitz/train,danielpalstra/train,danielpalstra/train,anokun7/train | train/labs/acp-workshop/scripts/centos.py | rejected_code_smell | Internal duplication: ~25% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Write python code for the following: Add python test for swarm optimisation\n\nThis will still need to be hooked into the main build system"
},
{
"role": "assistant",
"content": "import unittest\nimport pyoptima as opt\n\n\nclass SwarmTest(unittest.TestCase):\n\n ... | python | new_file | 1 | 2 | mit | 6abdfdd5f33aaaf05df4821ae14f594cb5b826a7 | samueljackson92/optima,samueljackson92/metaopt,samueljackson92/optima,samueljackson92/metaopt | src/test/swarm_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a command to rebuild the mptt tree.\n\nOnly for emergencies to get your tree back in useable state should anything happen to the node indexes."
},
{
"role": "assistant",
"content": "# -----------------------------------------... | python | new_file | 3 | 2 | bsd-3-clause | 2cdc649d810e49c3879ec055741b1bdd909c55e0 | mjl/feincms,matthiask/django-content-editor,michaelkuty/feincms,matthiask/feincms2-content,nickburlett/feincms,matthiask/feincms2-content,michaelkuty/feincms,joshuajonah/feincms,joshuajonah/feincms,hgrimelid/feincms,hgrimelid/feincms,michaelkuty/feincms,feincms/feincms,pjdelport/feincms,nickburlett/feincms,matthiask/dj... | feincms/management/commands/rebuild_mptt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding=utf-8\n\nimport os\nimport sys\nimport string\nimport logging\nimport time\nimport traceback\nimport configobj\nimport socket\nimport re\nimport os\nimport sys\nimport re\nimport logging\nimport time\nimport datetime\nimport random... | python | edit | 17 | 0 | mit | a233f685f6cb514420fd534388d51ee92459d886 | szibis/Diamond,russss/Diamond,TAKEALOT/Diamond,szibis/Diamond,signalfx/Diamond,dcsquared13/Diamond,python-diamond/Diamond,eMerzh/Diamond-1,jumping/Diamond,codepython/Diamond,socialwareinc/Diamond,actmd/Diamond,cannium/Diamond,Slach/Diamond,eMerzh/Diamond-1,saucelabs/Diamond,zoidbergwill/Diamond,disqus/Diamond,bmhatfiel... | src/diamond/__init__.py | rejected_lint | Too many lint violations: 17 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add min avg slice solution."
},
{
"role": "assistant",
"content": "# It is required to find the position of a slice with min avg in the \n# numerical sequence. There is a mathematical proof for such problem\n# where only slices o... | python | new_file | 3 | 6 | apache-2.0 | ce1f05c9943b365e35758502a38122ffe02c0d85 | isendel/algorithms | prefix_sums/min_slice.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add priority queue implementation using lists"
},
{
"role": "assistant",
"content": "\"\"\"\nImplementation of priority queue\n\"\"\"\n\nclass PriorityQueueNode:\t\n\tdef __init__(self, data, priority):\n\t\tself.data = data\n\t\... | python | new_file | 1 | 5 | mit | fbace843f6febaea28f35511035c8c997ba0fdab | keon/algorithms,amaozhao/algorithms | queues/priority_queue.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test the HPACK reference structure."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom hyper.http20.hpack_structures import Reference\n\nclass TestReference(object):\n \"\"\"\n Tests of the HPACK reference... | python | new_file | 1 | 1 | mit | b0c8a5b114837ae9b6f4d7e81fc587ac0d1fc3a4 | fredthomsen/hyper,jdecuyper/hyper,plucury/hyper,jdecuyper/hyper,lawnmowerlatte/hyper,plucury/hyper,fredthomsen/hyper,irvind/hyper,masaori335/hyper,masaori335/hyper,Lukasa/hyper,lawnmowerlatte/hyper,irvind/hyper,Lukasa/hyper | test/test_hpack_structures.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test of complex types"
},
{
"role": "assistant",
"content": "import logging\nimport sys\nimport uuid\n\nimport numpy as np\nimport pytest\n\nimport rasterio\n\n\nlogging.basicConfig(stream=sys.stderr, level=logging.DEBUG)\n\n... | python | new_file | 1 | 2 | bsd-3-clause | 9645b58b73e689efafd50ee2681beb813f3e410d | brendan-ward/rasterio,brendan-ward/rasterio,brendan-ward/rasterio | tests/test_complex_dtypes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a sample Pre/Post job"
},
{
"role": "assistant",
"content": "#Python.NET\n###############################################################\n# This is an Python.net/CPython script. #\n# To use IronPython, ... | python | new_file | 7 | 1 | apache-2.0 | 1875c5f1a813abda0ecf52b5b2604011fe2f2c15 | ThinkboxSoftware/Deadline,ThinkboxSoftware/Deadline,ThinkboxSoftware/Deadline | Examples/Scripting/PostJob/Sample/Sample.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add py solution for 655. Print Binary Tree\n\n655. Print Binary Tree: https://leetcode.com/problems/print-binary-tree/"
},
{
"role": "assistant",
"content": "# Definition for a binary tree node.\n# class TreeNode(object):\n# ... | python | new_file | 3 | 8 | apache-2.0 | 05864894b876a679726f1063832f70cfecb4325e | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | py/print-binary-tree.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add talking clock via Chromecast."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n#\n# Talking clock, using my Google Home device as a media player.\n#\nimport pychromecast, uuid, time, datetime\n\n#\n# Get list of... | python | new_file | 1 | 3 | apache-2.0 | 4e0af69b8803e798fe1a90ea8c261cbcd85d149d | sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-o... | languages/python/talking-clock.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add solution for problem C1"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*- \n\n# Copyright 2014 Fabian M.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may ... | python | new_file | 1 | 0 | apache-2.0 | f888799f4c88952f3ee77578fc1aface8eb4b067 | fabianm/olympiad,fabianm/olympiad,fabianm/olympiad | olympiad/bestfit.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for rudimentary io tests added"
},
{
"role": "assistant",
"content": "import RPi.GPIO as GPIO\nimport time\n\n# This test is made for a quick check of the gpios\n\n# List of the in channels to test. When pressed they output ... | python | new_file | 3 | 1 | apache-2.0 | d03d4bf0ca7ec4d66868f384d6864c9fb456cb84 | baumartig/vpn_switcher,baumartig/vpn_switcher | src/test_io.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a simple implementation of functionality like g_markup_printf_escaped()"
},
{
"role": "assistant",
"content": "#\n# Very, very partial implementation of g_markup_printf_escaped(). Doesn't\n# handling things like a %c with an ... | python | new_file | 2 | 2 | bsd-2-clause | 726cae5bfbb4a53ba979babc87e681b19562112e | rschroll/reinteract,johnrizzo1/reinteract,jbaayen/reinteract,alexey4petrov/reinteract,alexey4petrov/reinteract,rschroll/reinteract,alexey4petrov/reinteract,jbaayen/reinteract,rschroll/reinteract,jbaayen/reinteract,johnrizzo1/reinteract,johnrizzo1/reinteract | lib/reinteract/format_escaped.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add fab file with two tasks: test_all, run_test"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python2\n#-*- coding: utf-8 -*-\n\nimport os\nfrom fabric.api import local, task\nfrom pylua.settings import LOG_CONFIG\n\nROOT... | python | new_file | 2 | 2 | mit | 089208e4cb85da5b85c20242097cbe7f0c0e0ece | malirod/pylua,malirod/pylua | fabfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add 2 new skills: concentration and all round, with sentences in English and Japanese"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrat... | python | new_file | 1 | 0 | apache-2.0 | d38751f466f2b76f71dc716b85cdd1ffbabd481d | SchoolIdolTomodachi/CinderellaProducers,SchoolIdolTomodachi/CinderellaProducers | cpro/migrations/0015_auto_20170217_0801.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: test(projects): Add tests for project serializer"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport six\n\nfrom sentry.api.serializers import serialize\nfrom sentry.... | python | new_file | 1 | 1 | bsd-3-clause | 206454788c6d054f8c562d4d5d13a737d9cb6d27 | beeftornado/sentry,ifduyue/sentry,gencer/sentry,ifduyue/sentry,beeftornado/sentry,gencer/sentry,mvaled/sentry,mvaled/sentry,gencer/sentry,looker/sentry,gencer/sentry,beeftornado/sentry,gencer/sentry,mvaled/sentry,looker/sentry,ifduyue/sentry,ifduyue/sentry,mvaled/sentry,looker/sentry,mvaled/sentry,looker/sentry,ifduyue... | tests/sentry/api/serializers/test_project.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Test for load a kern table with a bad glyph id."
},
{
"role": "assistant",
"content": "from __future__ import print_function, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools import ttLib\nimport unittest\nfrom ... | python | new_file | 4 | 1 | mit | 8bebea72536a8a6fc480631d737f2426f52a356c | googlefonts/fonttools,fonttools/fonttools | Lib/fontTools/ttLib/tables/_k_e_r_n_test.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a dummy script for continuous submission importing"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# Copyright (C) 2012 Lukas Lalinsky\n# Distributed under the MIT license, see the LICENSE file for details.\n\... | python | new_file | 4 | 2 | mit | 7d89303fddd12fc88fd04bcf27826c3c801b1eff | lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server | scripts/import_submissions.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a basic test for locking and unlocking\n\nTo improve test coverage."
},
{
"role": "assistant",
"content": "# Tests for SecretStorage\n# Author: Dmitry Shachnev, 2018\n# License: BSD\n\nimport unittest\n\nfrom secretstorage im... | python | new_file | 1 | 1 | bsd-3-clause | f5b185fa2bba29efe3c1db2cd6c6a50188be24e3 | mitya57/secretstorage | tests/test_unlocking.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic test for jsbox forms."
},
{
"role": "assistant",
"content": "from django.test import TestCase\n\nfrom go.apps.jsbox.forms import JsboxForm\n\n\nclass JsboxFormTestCase(TestCase):\n def test_to_metdata(self):\n ... | python | new_file | 1 | 1 | bsd-3-clause | 3bc86ca5bd302103a57b6e2829d549aa1e243766 | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | go/apps/jsbox/tests/test_forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration for Model changes."
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11 on 2017-05-06 14:26\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\... | python | new_file | 1 | 0 | bsd-2-clause | 085efb9bfe476232695cb66ddf28d6c1a6f84c2f | cdubz/timestrap,cdubz/timestrap,cdubz/timestrap,muhleder/timestrap,Leahelisabeth/timestrap,muhleder/timestrap,Leahelisabeth/timestrap,muhleder/timestrap,overshard/timestrap,overshard/timestrap,Leahelisabeth/timestrap,overshard/timestrap,Leahelisabeth/timestrap | core/migrations/0005_auto_20170506_1026.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#\n# See top-level LICENSE file for Copyright information\n#\n# -*- coding: utf-8 -*-\n\nimport argparse\n\nimport desispec.io\n\ndef main():\n\n parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDe... | python | edit | 8 | 7 | bsd-3-clause | 6a08dc8ae70ebb7d759514991033a54e35ef0a93 | profxj/desispec,timahutchinson/desispec,profxj/desispec,gdhungana/desispec,desihub/desispec,gdhungana/desispec,timahutchinson/desispec,desihub/desispec | bin/desi_make_bricks.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple script to sort images"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python3\nimport os\nimport shutil\nfrom PIL import Image\n\n\nwhitelist = (\n (1366, 768),\n (1600, 900),\n (1680, 1050),\n (1920,... | python | new_file | 1 | 8 | mit | a6712ce13b0c6e62488adf0ae13fabf986a1b890 | ranisalt/imgsort | imgsort.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a unittest for spacegroup. Still very basic."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n'''\nCreated on Mar 12, 2012\n'''\n\nfrom __future__ import division\n\n__author__=\"Shyue Ping Ong\"\n__copyright__... | python | new_file | 3 | 5 | mit | ad5f851b7959f7bf09d7cd669d8db126fa962982 | migueldiascosta/pymatgen,yanikou19/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,sonium0/pymatgen,Dioptas/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,Bismarrck/pymatgen,ctoher/pymatgen,mig... | pymatgen/symmetry/tests/test_spacegroup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add CLI tool for creating SciTokens."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport argparse\n\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.backends import default_ba... | python | new_file | 1 | 2 | apache-2.0 | e1e90a8d704666613e6f2f6aaf839724af05cc19 | scitokens/scitokens,scitokens/scitokens | tools/create_token.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to make SOFIA ontology"
},
{
"role": "assistant",
"content": "import sys\nimport json\nfrom os.path import join, dirname, abspath\nfrom rdflib import Graph, Namespace, Literal\nfrom indra.sources import sofia\n\n\n# No... | python | new_file | 3 | 4 | bsd-2-clause | 29f32ec5cc3b050d6307688995907d094966b369 | sorgerlab/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,bgyori/indra | indra/sources/sofia/make_sofia_ontology.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add main regression test file for cyclus"
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\n\nimport os\n\nfrom tests_list import sim_files\nfrom cyclus_tools import run_cyclus, db_comparator\n\n\"\"\"Tests\"\"\"\ndef... | python | new_file | 2 | 2 | bsd-3-clause | af127fa56d2ce9304034e19ed2e0a598d10bebba | Baaaaam/cyBaM,gonuke/cycamore,gonuke/cycamore,cyclus/cycaless,Baaaaam/cyCLASS,gonuke/cycamore,rwcarlsen/cycamore,gonuke/cycamore,jlittell/cycamore,rwcarlsen/cycamore,Baaaaam/cyBaM,Baaaaam/cycamore,Baaaaam/cyBaM,jlittell/cycamore,Baaaaam/cycamore,jlittell/cycamore,Baaaaam/cycamore,Baaaaam/cyCLASS,jlittell/cycamore,cyclu... | tests/tests_cyclus.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add spider for Sun Loan Company"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\n\nfrom locations.items import GeojsonPointItem\n\nDAYS={\n 'Monday':'Mo',\n 'Tuesday':'T... | python | new_file | 3 | 6 | mit | a71807789bd09181369fff8b18b3ab5544ba58dd | iandees/all-the-places,iandees/all-the-places,iandees/all-the-places | locations/spiders/sunloan.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Migrate greplin.defer's remaining used code to greplin-twisted-utils"
},
{
"role": "assistant",
"content": "# Copyright 2010 Greplin, Inc. All Rights Reserved.\n\n\"\"\"Mixin for waiting on deferreds, and cancelling them if need... | python | new_file | 1 | 2 | apache-2.0 | 004d8fc6edae142cff7d26e53a79183b1ca29a5b | Cue/greplin-twisted-utils | src/greplin/defer/wait.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing migration for sponsors"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.3 on 2016-05-01 16:32\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\n... | python | new_file | 1 | 0 | mit | 66a0622ba63d89b6cfcfa74f7b342f4df55c5045 | pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016 | src/sponsors/migrations/0004_auto_20160501_1632.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nClipboard xsel: an implementation of the Clipboard using xsel command line tool.\n'''\n\n__all__ = ('ClipboardXsel', )\n\nfrom kivy.utils import platform\nfrom kivy.core.clipboard import ClipboardBase\n\nif platform != 'linux':\n ra... | python | edit | 1 | 1 | mit | 7a01615d50ec374687a5676e53e103eff9082b3e | gonzafirewall/kivy,LogicalDash/kivy,aron-bordin/kivy,jffernandez/kivy,VinGarcia/kivy,vipulroxx/kivy,jehutting/kivy,rafalo1333/kivy,matham/kivy,matham/kivy,MiyamotoAkira/kivy,mSenyor/kivy,kivy/kivy,thezawad/kivy,bionoid/kivy,LogicalDash/kivy,aron-bordin/kivy,bionoid/kivy,bionoid/kivy,KeyWeeUsr/kivy,arlowhite/kivy,Farkal... | kivy/core/clipboard/clipboard_xsel.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add russian words for date_time"
},
{
"role": "assistant",
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .. import Provider as DateTimeProvider\n\n\nclass Provider(DateTimeProvider):\n\n @classme... | python | new_file | 1 | 1 | mit | df8e3a2b6f7c8dbb0b93e06e204e802104aad70f | joke2k/faker,joke2k/faker,danhuss/faker,trtd/faker | faker/providers/date_time/ru_RU/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add the start of the UVA scraper."
},
{
"role": "assistant",
"content": "from lxml import etree\n\nfrom planner.scrapers.base import Scraper\n\n\nclass UVAScraper(Scraper):\n \"\"\"Scraper for the University of Virginia\"\"\"\... | python | new_file | 1 | 3 | bsd-2-clause | 654d2070dc25a288f680b5d93e5eb4662da403eb | mblayman/lcp,mblayman/lcp,mblayman/lcp | planner/scrapers/virginia.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add basic framework for middleware."
},
{
"role": "assistant",
"content": "# -*- test-case-name: vumi.middleware.tests.test_provider_setter -*-\n\nfrom twisted.internet.defer import inlineCallbacks\n\nfrom vumi.middleware.base im... | python | new_file | 1 | 1 | bsd-3-clause | 52c34e5cd6222de35ab750e6feb88be4ef8498f1 | TouK/vumi,TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix | vumi/middleware/session_length.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add server TLS context factory"
},
{
"role": "assistant",
"content": "from twisted.internet import reactor, ssl\nfrom OpenSSL import SSL\n\n\nclass ServerContextFactory(ssl.ContextFactory):\n \"\"\"Factory for PyOpenSSL SSL co... | python | new_file | 3 | 1 | apache-2.0 | 6200630904db2452ecfb551d54974acfad978d17 | illicitonion/synapse,illicitonion/synapse,howethomas/synapse,TribeMedia/synapse,iot-factory/synapse,matrix-org/synapse,illicitonion/synapse,iot-factory/synapse,iot-factory/synapse,iot-factory/synapse,rzr/synapse,illicitonion/synapse,TribeMedia/synapse,matrix-org/synapse,rzr/synapse,howethomas/synapse,rzr/synapse,howeth... | synapse/crypto/context_factory.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve Code Fights growing plant problem"
},
{
"role": "assistant",
"content": "#!/usr/local/bin/python\n# Code Fights Growing Plant Problem\n\n\ndef growingPlant(upSpeed, downSpeed, desiredHeight):\n if upSpeed >= desiredHeigh... | python | new_file | 1 | 3 | mit | 8eb21692d01f474b2dd8f0d7e05cb0713dbb0475 | HKuz/Test_Code | CodeFights/growingPlant.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for function re-definition"
},
{
"role": "assistant",
"content": "from numba import *\nimport unittest\n\nclass TestRedefine(unittest.TestCase):\n def test_redefine(self):\n\n def foo(x):\n return x ... | python | new_file | 11 | 1 | bsd-2-clause | d6cf9df23e8c9e3b6a8d261ea79dfe16cfa1dbb1 | IntelLabs/numba,GaZ3ll3/numba,stuartarchibald/numba,pitrou/numba,seibert/numba,stefanseefeld/numba,ssarangi/numba,jriehl/numba,seibert/numba,gdementen/numba,pombredanne/numba,sklam/numba,stefanseefeld/numba,jriehl/numba,IntelLabs/numba,stefanseefeld/numba,pombredanne/numba,seibert/numba,stonebig/numba,GaZ3ll3/numba,skl... | numba/tests/test_redefine.py | rejected_lint | Too many lint violations: 11 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a silly test for vertex.q2qclient.enregister."
},
{
"role": "assistant",
"content": "# Copyright 2005-2008 Divmod, Inc. See LICENSE file for details\n# -*- vertex.test.test_q2q.UDPConnection -*-\n\n\"\"\"\nTests for L{vertex... | python | new_file | 3 | 1 | mit | c7daf4548580b0de2aa9ec02cffc17ef3e796b28 | insequent/vertex,twisted/vertex,glyph/vertex,insequent/vertex,twisted/vertex | vertex/test/test_q2qclient.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a test case for guessing the BuildDir associated with a subdirectory argument."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n#\n# __COPYRIGHT__\n#\n# Permission is hereby granted, free of charge, to any person... | python | new_file | 1 | 0 | mit | 956d524a8694bb63532ac5f4a8121f57d75b7ad1 | Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons | test/BuildDir/guess-subdir.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for backslash escapes in route paths\n\nCo-Authored-By: Stephen Finucane <<EMAIL>>"
},
{
"role": "assistant",
"content": "import unittest\nfrom routes.route import Route\n\n\nclass TestRouteEscape(unittest.TestCase):\n ... | python | new_file | 1 | 1 | mit | 3c01ff0ecee7abdd25a5812c5d3a9bfcb1df732d | bbangert/routes,webknjaz/routes | tests/test_units/test_route_escapes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add new test for CheckResult"
},
{
"role": "assistant",
"content": "from itertools import combinations\nfrom string import ascii_lowercase\n\nfrom botbot import checkinfo as ci\n\ndef test_bidirectional_problem_serialization(tmpd... | python | new_file | 1 | 2 | mit | 73f891d7eebb5d524cee2da606bc0d195aeea890 | jackstanek/BotBot,jackstanek/BotBot | tests/test_checkinfo.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)"
},
{
"role": "assistant",
"content": "\"\"\"Correct rank of CRV baseline\n\nRevision ID: 9ebdfeb28bef\nRevises: a679f493bcdd\nC... | python | new_file | 1 | 9 | bsd-3-clause | 1073485bc5ceadf771b09501e3302b792de75691 | uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal | portal/migrations/versions/9ebdfeb28bef_.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add gradient and reshape functions to match Matlab"
},
{
"role": "assistant",
"content": "from numpy import gradient as np_gradient, reshape as np_reshape\n\n\ndef gradient(f, *varargs):\n \"\"\"\n Return the gradient of an... | python | new_file | 1 | 2 | bsd-3-clause | 8510d648730059518ca6953aa716d59cc9f853ca | jabooth/menpo-archive,yuxiang-zhou/menpo,grigorisg9gr/menpo,jabooth/menpo-archive,mozata/menpo,patricksnape/menpo,grigorisg9gr/menpo,jabooth/menpo-archive,patricksnape/menpo,mozata/menpo,grigorisg9gr/menpo,menpo/menpo,menpo/menpo,mozata/menpo,yuxiang-zhou/menpo,menpo/menpo,jabooth/menpo-archive,patricksnape/menpo,yuxia... | pybug/matlab/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add numpy array of tuples"
},
{
"role": "assistant",
"content": "# Numpy converts a list of tuples *not* into an array of tuples, but into a 2D\n# array instead.\nlist_of_tuples = [(1, 2), (3, 4)]\nimport numpy as np\nprint('list... | python | new_file | 1 | 0 | mit | 91abe26fd0b06339b3283d1dbe096edfdc52dadb | cmey/surprising-snippets,cmey/surprising-snippets | numpy-array-of-tuple.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add example for high and low peak detection"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport numpy as np\nfrom vector import cb, plot_peaks\nimport peakutils.peak\n\ndef plot_peaks_low... | python | new_file | 3 | 7 | mit | 824eea86b5166bce428c466c867708a9c8b15fb0 | MonsieurV/py-findpeaks,MonsieurV/py-findpeaks | tests/lows_and_highs.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: bots: Add tests for followup bot.\n\n'followup' bot has different message handling behavior for\ndifferent messages.\nFor usual messages it calls 'send_message' function of\n'BotHandlerApi' class.\nFor empty messages it calls 'send_reply' fu... | python | new_file | 1 | 1 | apache-2.0 | f320ff11f74de4df9933fc25db6e9fabbcb89f81 | verma-varsha/zulip,eeshangarg/zulip,vabs22/zulip,punchagan/zulip,tommyip/zulip,vaidap/zulip,synicalsyntax/zulip,vabs22/zulip,punchagan/zulip,kou/zulip,vabs22/zulip,timabbott/zulip,vaidap/zulip,amanharitsh123/zulip,andersk/zulip,shubhamdhama/zulip,jrowan/zulip,rht/zulip,Galexrt/zulip,rht/zulip,rht/zulip,andersk/zulip,br... | api/bots/followup/test_followup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add python data transmission example."
},
{
"role": "assistant",
"content": "import serial\nimport time\n\nclass blinkyBoard:\n def init(self, port, baud):\n self.serial = serial.Serial(port, baud)\n self.serial.open()\n\n... | python | new_file | 1 | 2 | apache-2.0 | 45c4b092a7753c3a5dd7c36baf2bcfc17b32a871 | Blinkinlabs/BlinkyTape,Blinkinlabs/BlinkyTape,Blinkinlabs/BlinkyTape | blink_strip/python_example/flash_example.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add migration script to clear invalid unclaimed records\n\nConfirmed users should not have unclaimed records"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Script to remove unclaimed ... | python | new_file | 6 | 3 | apache-2.0 | 68c3ee25d505c680a08ef53de24c4b920099e081 | danielneis/osf.io,bdyetton/prettychart,petermalcolm/osf.io,CenterForOpenScience/osf.io,jnayak1/osf.io,lamdnhan/osf.io,icereval/osf.io,icereval/osf.io,zkraime/osf.io,icereval/osf.io,cldershem/osf.io,chrisseto/osf.io,dplorimer/osf,doublebits/osf.io,MerlinZhang/osf.io,DanielSBrown/osf.io,kwierman/osf.io,hmoco/osf.io,lynds... | scripts/clear_invalid_unclaimed_records.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script which structures the mlsp2013 data\n\n - creates a csv file which maps a file name to a label set"
},
{
"role": "assistant",
"content": "import csv\n\ndef test():\n with open(\"CVfolds_2.txt\", newline='') as id2... | python | new_file | 1 | 7 | mit | 4bf03eaf81f8d4c28e3b3b89c7442a787361eb5e | johnmartinsson/bird-species-classification,johnmartinsson/bird-species-classification | scripts/structure_mlsp2013_dataset.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Reformat source files, add some docstrings."
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\nimport numpy as nm\n\nfrom sfepy.base.base import basestr, Container, Struct\nfrom sfepy.discrete.function... | python | new_file | 9 | 0 | bsd-3-clause | 3055bc1e261c4f3eef7eb24d704cb9c19a8d4723 | sfepy/sfepy,sfepy/sfepy,vlukes/sfepy,BubuLK/sfepy,BubuLK/sfepy,vlukes/sfepy,sfepy/sfepy,BubuLK/sfepy,rc/sfepy,rc/sfepy,vlukes/sfepy,rc/sfepy | sfepy/discrete/dg/dg_conditions.py | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add missing no-op migration for realm_emoji.\n\nBecause of how Django's migration system works, changing the error\nmessage attached to a model field's validator results in an extra\nmigration."
},
{
"role": "assistant",
"content... | python | new_file | 1 | 0 | apache-2.0 | f88e5b7438617fdd10a25951fc442f59a8def1ca | joyhchen/zulip,sharmaeklavya2/zulip,vaidap/zulip,timabbott/zulip,ahmadassaf/zulip,mohsenSy/zulip,arpith/zulip,AZtheAsian/zulip,zulip/zulip,niftynei/zulip,rht/zulip,dhcrzf/zulip,vabs22/zulip,vaidap/zulip,calvinleenyc/zulip,calvinleenyc/zulip,umkay/zulip,synicalsyntax/zulip,SmartPeople/zulip,KingxBanana/zulip,niftynei/zu... | zerver/migrations/0018_realm_emoji_message.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for formatter raw"
},
{
"role": "assistant",
"content": "import unittest, argparse\nfrom echolalia.formatter.rawer import Formatter\n\nclass RawerTestCase(unittest.TestCase):\n\n def setUp(self):\n self.parser = arg... | python | new_file | 2 | 2 | mit | 0a75aa4bbb9396c448b4cef58a42068d30933a95 | eiri/echolalia-prototype | tests/formatter/test_rawer.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add little script to do basic cleanup after git svn clone"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\nimport subprocess\nimport os.path\nimport sys\nimport re\n\nfrom contextlib import contextmanager\n\nTAGS_R... | python | new_file | 1 | 4 | mit | 93642ed71a2a0ec8fe96858b20c319c061706f39 | develersrl/git-externals,develersrl/git-externals,develersrl/git-externals | cleanup_repo.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add notification for schedule being posted"
},
{
"role": "assistant",
"content": "from consts.notification_type import NotificationType\nfrom notifications.base_notification import BaseNotification\n\n\nclass SchedulePostedNotifi... | python | new_file | 1 | 1 | mit | 5968c21c2c2b0e8305229fe5976d9d13786390e5 | fangeugene/the-blue-alliance,phil-lopreiato/the-blue-alliance,nwalters512/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,the-blue-alliance/the-blue-alliance,verycumbersome/the-blue-alliance,1fish2/the-blue-alliance,josephbisch/the-blue-alliance,tsteward/the-blue-alliance,tsteward/the-blue... | notifications/schedule_posted.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Solve lisa workbook w/ too many nested loops"
},
{
"role": "assistant",
"content": "chapters, problems_per_page = list(map(int, input().strip().split(' ')))\nproblems_per_chapter = list(map(int, input().strip().split(' ')))\n\npa... | python | new_file | 1 | 0 | mit | 10fc0e0b85edb04c676fd75e95ab539084063d13 | rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank | python/lisa_workbook.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a script for EtherBone transfers profiling"
},
{
"role": "assistant",
"content": "import time\nimport cProfile\n\nimport argparse\n\nfrom utils import memread, memwrite\n\ndef run(wb, rw, n, *, burst, profile=True):\n data... | python | new_file | 1 | 3 | apache-2.0 | a68699fbea88b541c6ce8bd519c3886b0fa8f197 | antmicro/litex-rowhammer-tester,antmicro/litex-rowhammer-tester,antmicro/litex-rowhammer-tester | scripts/etherbone_perf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Upgrade script to add many:many relationship between orgs and rps."
},
{
"role": "assistant",
"content": "from alembic import op\nimport sqlalchemy as sa\n\n\n\"\"\"empty message\n\nRevision ID: 63262fe95b9c\nRevises: 13a45e9375d... | python | new_file | 1 | 1 | bsd-3-clause | 60125c0852780d88ec29757c8a11a5846a4e1bba | uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal | portal/migrations/versions/63262fe95b9c_.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them in"
},
{
"role": "assistant",
"conte... | python | new_file | 1 | 0 | mit | 71cd3709ba08bf87825816099e203eae57c05752 | brendandc/multilingual-google-image-scraper | dictionaries/scripts/create_english_superset_addendum.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test cases for the logger"
},
{
"role": "assistant",
"content": "# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import print_function\nfrom __future__ import unicode_litera... | python | new_file | 1 | 1 | mit | 4aa37bafa437614542c58f6d8ad40d9d8670df95 | thombashi/pytablewriter | test/test_logger.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to copy the files to their correct location (e.g. during testing)"
},
{
"role": "assistant",
"content": "#!/usr/bin/python2\n# Copyright (c) 2015 Kenneth Henderick <<EMAIL>>\n#\n# Permission is hereby granted, free of ... | python | new_file | 2 | 0 | mit | 546bc7ffab0a0ca287550d97946d3e8b12b6c59a | khenderick/zfs-snap-manager,tylerjl/zfs-snap-manager | tools/distribute.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for summing sector ids."
},
{
"role": "assistant",
"content": "import unittest\n\nfrom sum_sector_ids import (extract_checksum,\n create_checksum,\n is_valid_checksu... | python | new_file | 1 | 1 | mit | f27382d63224f55998320e496a82aea32d82319b | machinelearningdeveloper/aoc_2016 | 04/test_sum_sector_ids.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add functional tests for DVR router.\n\nChange-Id: Iafa10dc02626a40a90c48f74c363d977ac4f512f"
},
{
"role": "assistant",
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file ... | python | new_file | 1 | 3 | apache-2.0 | 1870cc1f25426bee9b1b4a66f2167c5cd474cd23 | stackforge/python-openstacksdk,dtroyer/python-openstacksdk,dtroyer/python-openstacksdk,briancurtin/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk | openstack/tests/functional/network/v2/test_dvr_router.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test to check when an acceptor name is bad\n\nHad this in my tree but forgot to add to the commit.\nRelated to #131\n\nSigned-off-by: Simo Sorce <<EMAIL>>"
},
{
"role": "assistant",
"content": "#!/usr/bin/python\n# Copyright ... | python | new_file | 4 | 0 | mit | d61862b138858721d6baf06ab2ad29ebb566f09b | frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi | tests/t_bad_acceptor_name.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test exhibiting cursor failure"
},
{
"role": "assistant",
"content": "from __future__ import absolute_import\n\nfrom mock import Mock\n\nfrom sentry.utils.cursors import build_cursor, Cursor\n\n\ndef build_mock(**attrs):\n ... | python | new_file | 1 | 2 | bsd-3-clause | 7f4de89928de1580dceedff3c1a581660e70f954 | BayanGroup/sentry,kevinlondon/sentry,imankulov/sentry,fotinakis/sentry,BuildingLink/sentry,BuildingLink/sentry,mvaled/sentry,fuziontech/sentry,nicholasserra/sentry,fotinakis/sentry,jean/sentry,kevinlondon/sentry,ngonzalvez/sentry,mitsuhiko/sentry,ifduyue/sentry,fotinakis/sentry,alexm92/sentry,zenefits/sentry,alexm92/se... | tests/sentry/utils/test_cursors.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tool to make dates for second Tuesday in a month"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# coding: utf-8\n\"\"\"Make dates on second Tuesday of the month for full year\"\"\"\n\n\nimport datetime\nimport ... | python | new_file | 1 | 4 | mit | 779f4323636d2476b3e51b6e57f2c130e9d4d466 | LPUG/LPUG.github.io,LPUG/LPUG.github.io | src/tools/make_dates.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competition"
},
{
"role": "assistant",
"content": "from time import sleep\nfrom SUASSyste... | python | new_file | 1 | 0 | mit | dd287c4edfb29e848eaaba93c769ebfaab0db58c | FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition | tests/non_nose_tests/test_interop_client.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a new organisation for letter branding"
},
{
"role": "assistant",
"content": "\"\"\"empty message\n\nRevision ID: 0150_another_letter_org\nRevises: 0149_add_crown_to_services\nCreate Date: 2017-06-29 12:44:16.815039\n\n\"\"\"... | python | new_file | 1 | 2 | mit | 64f13a006412112830e1d7cc2ff71ea32cb4c1b6 | alphagov/notifications-api,alphagov/notifications-api | migrations/versions/0150_another_letter_org.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tool to find scan roots.\n\nBug: 73625480\nChange-Id: I93b405feb999aaed9675d2ea52712663fa83c9e0"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# Copyright (C) 2018 The Android Open Source Project\n#\n# Licensed... | python | new_file | 2 | 4 | apache-2.0 | 238c550d8131f3b35dae437182c924191ff08b72 | google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto | tools/find_scan_roots.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add python test for notes length validation"
},
{
"role": "assistant",
"content": "import unittest\n\nfrom werkzeug.datastructures import MultiDict\n\nfrom cla_public.app import create_app\nfrom cla_public.apps.contact.forms impo... | python | new_file | 1 | 1 | mit | 7eac12bb8fe31b397c8598af14973f2337ca8c53 | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | cla_public/apps/contact/tests/test_notes.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a new snippet 'python/generators' (Fibonacci)."
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)\n\n# Permission is hereby grant... | python | new_file | 2 | 2 | mit | c3eba3d5983472da3434d4c6acb4a7ab15036ee6 | jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets | python/generators/fibonacci.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a helper tool which clears zookeeper test dirs\n\nCreate a tool that can clear any leftover garbage left\nby the testing of taskflow unit tests with zookeeper for\nwhen this is needed (for example, a test does not clean up\ncorrectly on ... | python | new_file | 1 | 5 | apache-2.0 | cb87c6e2c58593d5ef5710c4d7db0c18831e354c | openstack/taskflow,pombredanne/taskflow-1,junneyang/taskflow,junneyang/taskflow,jimbobhickville/taskflow,openstack/taskflow,jimbobhickville/taskflow,pombredanne/taskflow-1 | tools/clear_zk.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: [Feature] Add marshal fields to map with models."
},
{
"role": "assistant",
"content": "\"\"\"This module defines the format used by marshall to map the models.\"\"\"\nfrom flask_restful import fields\n\nbucketlistitem_serializer... | python | new_file | 1 | 0 | mit | cfe5f9240c2ccbb41c1dd3e0ea7b22ffddf80a09 | andela-akiura/bucketlist | app/api_v1/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tests for tileutils module"
},
{
"role": "assistant",
"content": "import pytest\nimport numpy as np\n\nfrom pytilemap.tileutils import posFromLonLat, lonLatFromPos\n\n\nLATITUDES = np.arange(-90, 90).astype(np.float64)\nLONGI... | python | new_file | 1 | 4 | mit | b1bf21e7331ef4c6191ac27a7621deb04b086ffc | allebacco/PyTileMap | tests/test_tileutils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a simple HTTP/2 file server for testing"
},
{
"role": "assistant",
"content": "\"\"\"A simple HTTP/2 file server.\"\"\"\n\nimport asyncio\nimport logging\nimport sys\nfrom concurrent.futures.thread import ThreadPoolExecutor\n... | python | new_file | 1 | 5 | mit | 31a453c2fe3a668f4c826a2b5bced7ee50f58f2e | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | samples/http2/simple_server.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add PluginManager class and IPlugin interface\n\nThis file should have been included in commit 46c1c31a2bf3c3d953d35195667ccc1af7df3c04\n\nReferences #4"
},
{
"role": "assistant",
"content": "\"\"\"\r\nCopyright 2011 Ryan Fobel\r... | python | new_file | 5 | 1 | bsd-3-clause | af9bf2a6db96b069ef62054a4ab09f66f2dd048a | wheeler-microfluidics/microdrop | plugin_manager.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit test of navbar context processor"
},
{
"role": "assistant",
"content": "from django.test import TestCase\nfrom django.http import HttpRequest\n\nfrom core.context_processors import navbar\nfrom board.models import Board\... | python | new_file | 1 | 1 | mit | 50dd055975732755f2bcb9424bd2d5df9e1ae87a | guswnsxodlf/k-board,hyesun03/k-board,darjeeling/k-board,cjh5414/kboard,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,cjh5414/kboard,kboard/kboard,guswnsxodlf/k-board,kboard/kboard,kboard/kboard,hyesun03/k-board | kboard/core/tests/test_context_processors.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add unit tests for logspace_int."
},
{
"role": "assistant",
"content": "from nose.tools import *\n\nimport numpy as np\n\nimport buhmm.misc as module\n\ndef test_logspace_int_smoke():\n # Smoke test\n x = module.logspace_in... | python | new_file | 4 | 1 | mit | 0aee93c8730625ea0efa5a6ff1e48b29f0161dd5 | chebee7i/buhmm | buhmm/tests/test_misc.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add script to automate the creation of the Neon app."
},
{
"role": "assistant",
"content": "#! /usr/bin/env python\nimport os\nimport shutil\nimport subprocess\n\nMAIN_WINDOW_UI_FILE = 'src/opencmiss/neon/ui/ui_mainwindow.py'\n\n... | python | new_file | 1 | 2 | apache-2.0 | a6e92e2464a50a7c4159958e1b60c0aa2dea96a9 | alan-wu/neon | res/os_x_app_creation.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add more complicated test of epsilon rules restoration"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 20.08.2017 16:01\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"... | python | new_file | 15 | 1 | mit | a694c8449f63cbe37ceadc98a5836cfaff8fa992 | PatrikValkovic/grammpy | tests/RemoveEpsilonRules/Reverse/OverTwoRuleTest.py | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add file for control person detection"
},
{
"role": "assistant",
"content": "import argparse\nimport json\nimport tensorflow as tf\n\nfrom aovek.preprocess.download_dataset import download_dataset\nfrom aovek.preprocess.data_proc... | python | new_file | 3 | 1 | mit | 52467da69ebab6f2884bfd791d7e18bd4e593266 | nikolaystanishev/traffic-sign-recognition | aovek.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add build flags for YouCompleteMe.\n\nAdd a .ycm_extra.conf.py script to return the same CFLAGS\nwe pass for `make debug`. These are passed to libclang\nso symbol lookup works correctly.\n\nNote this doesn't pick up changes to the build conf... | python | new_file | 1 | 1 | bsd-3-clause | 8ef0f8058854b2ef55d2d42bbe84487a9aadae12 | ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis | .ycm_extra_conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: TST: Add module-based tests to the `pass` tests"
},
{
"role": "assistant",
"content": "import numpy as np\n\nnp.char\nnp.ctypeslib\nnp.emath\nnp.fft\nnp.lib\nnp.linalg\nnp.ma\nnp.matrixlib\nnp.polynomial\nnp.random\nnp.rec\nnp.te... | python | new_file | 1 | 0 | bsd-3-clause | 59ca3b5e97e2186f439f3f2fc82259ba56a3b78f | endolith/numpy,jakirkham/numpy,anntzer/numpy,simongibbons/numpy,anntzer/numpy,numpy/numpy,numpy/numpy,seberg/numpy,mattip/numpy,charris/numpy,seberg/numpy,jakirkham/numpy,simongibbons/numpy,mhvk/numpy,mhvk/numpy,pdebuyl/numpy,pbrod/numpy,pbrod/numpy,pdebuyl/numpy,endolith/numpy,seberg/numpy,pdebuyl/numpy,charris/numpy,... | numpy/typing/tests/data/pass/modules.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add \"Circle Inversion Fractals (Apollonian Gasket)\""
},
{
"role": "assistant",
"content": "# Circle Inversion Fractals (Apollonian Gasket) (Escape-time Algorithm)\n# FB36 - 20131031\nimport math\nimport random\nfrom collections... | python | new_file | 3 | 0 | mit | ae7a2a3809ebe54c13a9ced4da5bbd48cc8d0e3a | leovp/graphics | Apollonian/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add tempest unit test to verify the test list\n\nIf there is an error in a test file it could potentially not get run\nin the tox jobs used for gating. This commit adds a test which looks\nfor ImportFailures in the test list to ensure that a... | python | new_file | 1 | 4 | apache-2.0 | 519cb3ebf56c7841240779e170fb3bc657d87830 | FujitsuEnablingSoftwareTechnologyGmbH/tempest,hayderimran7/tempest,tonyli71/tempest,alinbalutoiu/tempest,xbezdick/tempest,danielmellado/tempest,openstack/tempest,eggmaster/tempest,FujitsuEnablingSoftwareTechnologyGmbH/tempest,xbezdick/tempest,bigswitch/tempest,afaheem88/tempest,eggmaster/tempest,pczerkas/tempest,redhat... | tempest/tests/test_list_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add Alert class as well as connect and check_rule methods."
},
{
"role": "assistant",
"content": "class Alert:\n def __init__(self, description, rule, action):\n self.description = description\n self.rule = rule\... | python | new_file | 1 | 2 | mit | bfe38efc63ead69eb57c74b882f4072dd80cd469 | bsmukasa/stock_alerter | alert.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add function to read length of bytes in the buffer from the kernel"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nfrom cffi import FFI as _FFI\nimport fcntl\nimport array\n\n_ffi = _FFI()\n_ffi.cdef(\"\"\"\n#define... | python | new_file | 1 | 1 | bsd-3-clause | 3081aa14230f7374e406e15be992235eaf961551 | arkaitzj/python-butter,dasSOZO/python-butter,wdv4758h/butter | butter/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add a rudimentary trace shrinker, implemented in python"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\n\n# Given an axe trace that fails a given consistency model, try to find\n# the smallest subset of the trace th... | python | new_file | 4 | 5 | apache-2.0 | 8ff7becc414e2969cf89468c6af95c0356abebae | CTSRD-CHERI/axe,CTSRD-CHERI/axe,CTSRD-CHERI/axe,CTSRD-CHERI/axe | src/axe-shrink.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add test for PR-56(Fix binary decode)"
},
{
"role": "assistant",
"content": "#!/usr/bin/env python\nfrom unittest import TestCase\n\nfrom bson import dumps, loads\n\n\nclass TestBinary(TestCase):\n def setUp(self):\n ly... | python | new_file | 1 | 1 | bsd-3-clause | 1fdfff95e04678f107775870f0f1b4eda6af8073 | martinkou/bson | bson/tests/test_binary.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Add simple testcase for identifier"
},
{
"role": "assistant",
"content": "import angr\nimport nose\nimport identifier\n\nimport os\nbin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries-priv... | python | new_file | 5 | 3 | bsd-2-clause | 0eae8a12cbbc21469fd4401692223ef51b8bc7a7 | tyb0807/angr,iamahuman/angr,tyb0807/angr,angr/angr,f-prettyland/angr,chubbymaggie/angr,iamahuman/angr,chubbymaggie/angr,f-prettyland/angr,schieb/angr,chubbymaggie/angr,schieb/angr,axt/angr,iamahuman/angr,tyb0807/angr,axt/angr,axt/angr,angr/angr,f-prettyland/angr,angr/angr,schieb/angr | tests/test_identifier.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write python code for the following: Add small script to start calculating error from kmer motifs, prototyping"
},
{
"role": "assistant",
"content": "from __future__ import division\nimport numpy as np\nfrom utilBMF.HTSUtils import pFastqProxy, pFastqFile\n\nconsInF... | python | new_file | 4 | 0 | mit | 11bb0d7aa106e1cafee8b4f00bf75a2aa02e97cf | ARUP-NGS/BMFtools,ARUP-NGS/BMFtools,ARUP-NGS/BMFtools | SecC/ErrMer_Proto.py | rejected_lint | Too many lint violations: 4 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.