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 basic test script for mcmc_serial. Code now passes with conditions on prior.\n\nCode runs with all prior inputs on ups2 and simulated data. However, variance\nhyperparameters exhibit issues when used with improper priors on the rate\npar...
python
new_file
3
0
bsd-3-clause
a53fba0f648b3472834443fa3dc31c0611bcb6a3
awblocker/quantitation,awblocker/quantitation,awblocker/quantitation
test/test_mcmc_serial.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test to ensure git-project exits early if out of date\n\nSee: (CLD-2913)" }, { "role": "assistant", "content": "#!bin/env python\n\nimport subprocess\nimport os.path\nimport unittest, re\n\n\nclass TestOldVersion(unittest.TestCas...
python
new_file
4
2
mit
342d96b2bc0665ec43ef51415bbc8a7c4f6f9b63
3ptscience/git-project,aranzgeo/git-project
test/test_old_version.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Test deletion with only unapplied patches, and without the --backup option" }, { "role": "assistant", "content": "import os, os.path\nfrom quilt.patch import Patch\nfrom six.moves import cStringIO\nimport sys\n\nfrom helpers impo...
python
new_file
1
1
mit
1c3871b5f9effcbd859d530b3105c67eaf385ed2
bjoernricks/python-quilt
tests/test_delete.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TEST added test for dsi" }, { "role": "assistant", "content": "import numpy as np\nfrom nose.tools import assert_true, assert_false, assert_equal, assert_raises\nfrom numpy.testing import assert_array_equal, assert_array_almost_e...
python
new_file
15
1
bsd-3-clause
4bb1c93f1e88b6472c1e3ec058a52156160a0aaf
rfdougherty/dipy,oesteban/dipy,nilgoyyou/dipy,samuelstjean/dipy,matthieudumont/dipy,sinkpoint/dipy,beni55/dipy,mdesco/dipy,oesteban/dipy,samuelstjean/dipy,rfdougherty/dipy,JohnGriffiths/dipy,jyeatman/dipy,maurozucchelli/dipy,StongeEtienne/dipy,Messaoud-Boudjada/dipy,villalonreina/dipy,samuelstjean/dipy,demianw/dipy,nil...
dipy/reconst/tests/test_dsi.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Write python code for the following: Add algorithm for merging arrays in place" }, { "role": "assistant", "content": "a = [1, 3, 8, 12, 15]\nb = [4, 12, 17, 0, 0, 0, 0, 0]\n\ni = len(a) - 1\nj = len(b) - len(a) - 1\nk = len(b) - 1\n\nwhile i >= 0:\n if j >= 0:\n ...
python
new_file
1
0
mit
42f32ddcd33d1c8325400405b27e20a3cd54ce36
dnl-blkv/algorithms
merge_in_place.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate README figure." }, { "role": "assistant", "content": "\"\"\"\nDraw the example used in the README file.\n\"\"\"\n\n# Standard library modules.\n\n# Third party modules.\nimport numpy as np\nimport matplotli...
python
new_file
1
0
bsd-2-clause
b5b65ce4c7a592372690b6d1fecc68a6d3f33bfb
ppinard/matplotlib-colorbar
doc/example1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a SeleniumBase logo for console interfaces" }, { "role": "assistant", "content": "\"\"\" SeleniumBase Logo Processing (for the console scripts interface)\n Logo generated from:\n http://www.patorjk.com/software/taag...
python
new_file
1
1
mit
d8bcdced24e9787711cbf5787011d88a086d4956
mdmintz/seleniumspot,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase
seleniumbase/console_scripts/logo_helper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a mixin to test exported metrics.\n\nMost of this mixin should be moved to prometheus_client eventually,\nsince it relies heavily on its internals." }, { "role": "assistant", "content": "from prometheus_client import REGISTRY...
python
new_file
1
7
apache-2.0
984dd9d20814e3190ee197b47c756f2b8f4ecb52
wangwanzhong/django-prometheus,obytes/django-prometheus,obytes/django-prometheus,wangwanzhong/django-prometheus,korfuri/django-prometheus,DingaGa/django-prometheus,DingaGa/django-prometheus,korfuri/django-prometheus
django_prometheus/testutils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for inheriting Nap class" }, { "role": "assistant", "content": "\"\"\"\nTests for nap module.\n\nThese tests only focus that requests is called properly.\nEverything related to HTTP requests should be tested in requests...
python
new_file
4
1
mit
cb7515358fcc9ee2daf030c5eb0ffa68db0d95d3
kimmobrunfeldt/nap
test/test_nap_inherit.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add test for the config file" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport os\nfrom os import path\nimport unittest\n\nimport click\nfrom...
python
new_file
5
2
mit
ffb8292bc4d91771458126677016d8f883c29bbf
lord63/tldr.py
tests/test_config.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add Deep Learning with Neural Networks and TensorFlow" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Deep Learning with Neural Networks and TensorFlow.\n\nDeep learning is part of a broader family of machin...
python
new_file
1
0
mit
bc97749944eeb5b5b1366f4da6f2f5c04eaba434
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
deepLearningWithNeuralNetworks/regularDeepLearningWithNeuralNetworks.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights delete digit problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Delete Digit Problem\n\n\ndef deleteDigit(n):\n s = str(n)\n return max(int(''.join(s[:i] + s[i + 1:])) fo...
python
new_file
1
3
mit
dc6b2014b7b8cefeb1314a09184cfc2755501735
HKuz/Test_Code
CodeFights/deleteDigit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move into uk_2017 folder and transforming the notebook into a class" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n__author__: 'Olivier PHILIPPE'\n__licence__: 'BSD3-clause'\n\n\"\"\"\nSc...
python
new_file
8
1
bsd-3-clause
dde3f2e15c0c8db29140cd2d26e2c75e89661a41
softwaresaved/international-survey
analysis/data_process/uk_2017/generate_notebook.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add git api request helpers\n\nAdd helper functions for getting info on a user, and all public repos\nowned by a user" }, { "role": "assistant", "content": "import http.client\n\nimport requests\n\nfrom . import exceptions\n\nUSE...
python
new_file
1
2
mit
d691fa14cc7ecf1b2dc53473553407008591b503
robbie-c/git-lang-guesser
git-lang-guesser/gitRequester.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create script to add and remove mentor's ssh key from DO droplets." }, { "role": "assistant", "content": "# Allows a mentor to ssh into a Digital Ocean droplet. This is designed to be\n# executed on the target machine.\n#\n# This...
python
new_file
1
4
apache-2.0
ba1a32ca744d001697e52be7a0c36dd76c81446c
andersk/zulip,zulip/zulip,rishig/zulip,eeshangarg/zulip,dhcrzf/zulip,timabbott/zulip,rishig/zulip,hackerkid/zulip,tommyip/zulip,jackrzhang/zulip,showell/zulip,andersk/zulip,brainwane/zulip,punchagan/zulip,jackrzhang/zulip,showell/zulip,brainwane/zulip,eeshangarg/zulip,timabbott/zulip,mahim97/zulip,rht/zulip,synicalsynt...
tools/droplets/add_mentor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for exception raising." }, { "role": "assistant", "content": "\"\"\"\nTests for the RAW sql functions.\n\"\"\"\n\nfrom django.conf import settings\nfrom django.test import TestCase\nfrom django.db.models import connectio...
python
new_file
3
1
bsd-3-clause
66543a7330a0898146076adb5269b75708f763a9
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
boardinghouse/tests/test_sql.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for switching production server" }, { "role": "assistant", "content": "#!/usr/bin/env python3\nimport argparse\nimport subprocess\n\nparser = argparse.ArgumentParser()\nparser.add_argument('server', choices=['blue', 'g...
python
new_file
1
0
mit
c711928fd84f37d1e9f7035eaa3fc010d7a4355f
muzhack/musitechhub,muzhack/muzhack,muzhack/muzhack,muzhack/muzhack,muzhack/muzhack,muzhack/musitechhub,muzhack/musitechhub,muzhack/musitechhub
docker/switch-server.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing SCP deployment file." }, { "role": "assistant", "content": "from grow.deployments import base\nimport errno\nimport os\nimport paramiko\n\n\nclass ScpDeployment(base.BaseDeployment):\n\n def get_destination_address(s...
python
new_file
5
4
mit
0f6056989079323277329825534f9290cad8c019
codedcolors/pygrow,grow/grow,grow/pygrow,vitorio/pygrow,denmojo/pygrow,codedcolors/pygrow,codedcolors/pygrow,grow/pygrow,denmojo/pygrow,vitorio/pygrow,grow/grow,vitorio/pygrow,denmojo/pygrow,grow/grow,grow/grow,grow/pygrow,denmojo/pygrow
grow/deployments/scp.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add script to convert GTF to BED file." }, { "role": "assistant", "content": "import tempfile\nfrom argparse import ArgumentParser\nimport gffutils\nimport os\n\ndef disable_infer_extent(gtf_file):\n \"\"\"\n guess if we ne...
python
new_file
2
7
mit
cb99e3f0ae298fb7065b661190a88d144d663183
roryk/junkdrawer,roryk/junkdrawer
gffutils-utils/scripts/gtf_to_bed.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add projects field to samples and usergroups." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport rethinkdb as r\nfrom optparse import OptionParser\n\n\ndef main(conn):\n groups = list(r.table('usergroups')....
python
new_file
1
3
mit
b4f7bbe1d018316dce0c82b64c74efabbeea523e
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/conversion/addprojs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a unit test for tracked()." }, { "role": "assistant", "content": "\nfrom openrcv.resource import tracked\nfrom openrcv.utiltest.helpers import skipIfTravis, UnitCase\n\n\nclass TrackedTest(UnitCase):\n\n \"\"\"Tests for tr...
python
new_file
3
2
mit
ce736e08082b9c5048851a2db77aefbb389b39cb
cjerdonek/open-rcv,cjerdonek/open-rcv
openrcv/test/test_resource.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set branding_type to org if it’s none\n\nSo later we can:\n- make it non-nullable later\n- remove `govuk` as an option\n\nThis is mostly for people’s local databases, the manual work here has\nbeen done on production already." }, { "...
python
new_file
1
1
mit
a0deef06e23e4c81e55d83afb63d4bbab1bdaaa5
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0217_default_email_branding.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix the from_default field in the database" }, { "role": "assistant", "content": "import datetime\nfrom appcomposer import app\nfrom appcomposer.db import db\nfrom appcomposer.models import ActiveTranslationMessage, TranslationBu...
python
new_file
2
0
bsd-2-clause
f595b62b53b25155e6e5aa65cd15e7393b979e82
morelab/appcomposer,go-lab/appcomposer,porduna/appcomposer,morelab/appcomposer,porduna/appcomposer,go-lab/appcomposer,go-lab/appcomposer,morelab/appcomposer,morelab/appcomposer,porduna/appcomposer,porduna/appcomposer,go-lab/appcomposer
tools/fix_from_default.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cli progress bar example" }, { "role": "assistant", "content": "# Print iterations progress\ndef printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█'):\n \"\"\"\n Call in ...
python
new_file
1
2
mit
40a1730100091c6eee03ee5fe7687bd542e92077
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
cli_progress_bar.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic setup.py file to create application bundles on OS X." }, { "role": "assistant", "content": "\"\"\"\nThis is a setup.py script generated by py2applet\n\nUsage:\n python setup.py py2app\n\"\"\"\n\nfrom setuptools impor...
python
new_file
3
0
apache-2.0
abe8bbd2e602b2f747947a584d752dad5159edfb
alan-wu/neon
src/setup.py2app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an initial \"Hook\" object and MokshaHookMapperExtension.\n\nThese area designed to make it simple to write plugins that\nmonitor and analyze database activity." }, { "role": "assistant", "content": "# This file is part of Mo...
python
new_file
1
2
apache-2.0
18be114d831d9c7204a3eaefae769b83ca674651
pombredanne/moksha,ralphbean/moksha,mokshaproject/moksha,pombredanne/moksha,lmacken/moksha,ralphbean/moksha,pombredanne/moksha,ralphbean/moksha,pombredanne/moksha,lmacken/moksha,lmacken/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha
moksha/hook.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [RM-11742] Add tests for argparse uninstall\n\nSigned-off-by: Travis Rhoden <<EMAIL>>" }, { "role": "assistant", "content": "import pytest\n\nfrom ceph_deploy.cli import get_parser\n\n\nclass TestParserUninstall(object):\n\n d...
python
new_file
1
1
mit
a024a9a23cccbb8d72098dc1831770ece8b1aec8
isyippee/ceph-deploy,ghxandsky/ceph-deploy,trhoden/ceph-deploy,imzhulei/ceph-deploy,shenhequnying/ceph-deploy,codenrhoden/ceph-deploy,osynge/ceph-deploy,Vicente-Cheng/ceph-deploy,zhouyuan/ceph-deploy,isyippee/ceph-deploy,ghxandsky/ceph-deploy,zhouyuan/ceph-deploy,trhoden/ceph-deploy,codenrhoden/ceph-deploy,SUSE/ceph-de...
ceph_deploy/tests/parser/test_uninstall.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new table for industry index history" }, { "role": "assistant", "content": "\"\"\"industry_index\n\nRevision ID: 53eb8abce4de\nRevises: 1e3725cda0b7\nCreate Date: 2015-06-19 10:38:31.398000\n\n\"\"\"\n\n# revision identifiers...
python
new_file
1
1
bsd-3-clause
9f2231ecd546f9d29d3ebbd354c3376cb7ebd417
Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith
migrations/versions/53eb8abce4de_industry_index.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the example test of SeleniumBase in French" }, { "role": "assistant", "content": "# French Language Test - Python 3 Only!\nfrom seleniumbase.translate.french import CasDeBase\n\n\nclass ClasseDeTest(CasDeBase):\n\n def tes...
python
new_file
1
1
mit
dff6d985b5b7152a3e5d378aa4919664cb2e1b51
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
examples/translations/french_test_1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test case for the test/forward directory with @expectedFailure decorator\nfor test_with_dwarf_and_run_command(self).\n\n\ngit-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@116416 91177308-0d34-0410-b5e6-96231b3b80d8" }, { "r...
python
new_file
13
1
apache-2.0
71f3befd5bc3763c302a78d1147d4f203eac71c1
apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb
test/forward/TestForwardDeclaration.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Write python code for the following: Add script to check assembly of each file" }, { "role": "assistant", "content": "#!/usr/bin/env python\n'''\nCheck that each file assembles and that the output binary\nis identical to the original file.\n'''\nimport filecmp\nimpo...
python
new_file
1
7
bsd-3-clause
9022e13eb14ce0f031b968d9eb1375ebcae7e770
mnaberez/corvus
disasm/tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write tests for text extraction for deft" }, { "role": "assistant", "content": "from nose.plugins.attrib import attr\n\nfrom indra.literature.deft_tools import universal_extract_text\nfrom indra.literature import pmc_client, else...
python
new_file
1
2
bsd-2-clause
ca92d32b73bc6e62fb842f2e7382fbcb076973e1
pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/belpy,sorgerlab/indra,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,pvtodorov/indra,pvtodorov/indra,bgyori/indra
indra/tests/test_deft_tools.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add compound selection usage example to examples." }, { "role": "assistant", "content": "from kivy.uix.gridlayout import GridLayout\nfrom kivy.uix.button import Button\nfrom kivy.uix.behaviors import CompoundSelectionBehavior\nfr...
python
new_file
5
4
mit
bd7e802e81d313805c47b3822b70e9180bf9af98
arcticshores/kivy,mSenyor/kivy,Cheaterman/kivy,inclement/kivy,xpndlabs/kivy,habibmasuro/kivy,KeyWeeUsr/kivy,bob-the-hamster/kivy,xpndlabs/kivy,angryrancor/kivy,Cheaterman/kivy,Farkal/kivy,viralpandey/kivy,rafalo1333/kivy,adamkh/kivy,VinGarcia/kivy,bliz937/kivy,Shyam10/kivy,yoelk/kivy,bionoid/kivy,Shyam10/kivy,iamutkars...
examples/widgets/compound_selection.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a visitor to generate commit messages on each 'edit\" node." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\nfrom AbstractVisitor import AbstractVisitor\n\nfrom duralex.alinea_parser import *\n\nimport durale...
python
new_file
6
7
mit
8bdeefa23ce44a0c0aad3913ec59d4167d2b0eff
Legilibre/duralex
duralex/AddCommitMessageVisitor.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Enable python -m eccodes selfcheck." }, { "role": "assistant", "content": "#\n# Copyright 2017-2019 European Centre for Medium-Range Weather Forecasts (ECMWF).\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"...
python
new_file
1
4
apache-2.0
8a6121cbd594fcd5402d0170614f4e1340282145
ecmwf/eccodes-python,ecmwf/eccodes-python
eccodes/__main__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add documentation plan for ValidatedDictionary\n\nThis is supposed to implement the latest idea for how we're going to do that flexible configuration properly..." }, { "role": "assistant", "content": "#!/usr/bin/env python\n#-*- ...
python
new_file
1
0
cc0-1.0
44662a9b82f22de611a99722eb7763f31d723be6
Ghostkeeper/Luna
plugins/configuration/configurationtype/validated_dictionary.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution and unit tests for problem 7" }, { "role": "assistant", "content": "\"\"\"\nProject Euler Problem 7\n=======================\n\nBy listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see\nthat the 6th...
python
new_file
1
8
mit
ea06febec1d9bb3c288bade012f1d9c1144577fd
BeataBak/project-euler-problems
007.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add image scraper for Reddit\n\nCurrently breaks after pulling a few images" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n__author__ = \"Patrick Guelcher\"\n__copyright__ = \"(C) 2016 Patrick Guelcher\"\n__licen...
python
new_file
1
8
mit
adc85e4680f7fd7bde12dcc374fa097afb876b22
aerovolts/python-scripts
redditscrape.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to output point clouds as vtu files" }, { "role": "assistant", "content": "import pyevtk\nimport numpy as np\n\n# Input and output file are hardcoded at this time but that can be changed if\n# necessary\ninput_filename...
python
new_file
1
0
bsd-3-clause
6294766c3e30963380fda5b6c6f4f57d16be81d1
ORNL-CEES/DataTransferKit,ORNL-CEES/DataTransferKit,dalg24/DataTransferKit,Rombur/DataTransferKit,Rombur/DataTransferKit,ORNL-CEES/DataTransferKit,dalg24/DataTransferKit,ORNL-CEES/DataTransferKit,Rombur/DataTransferKit,dalg24/DataTransferKit,dalg24/DataTransferKit,Rombur/DataTransferKit
scripts/export_point_cloud_to_vtu.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command for dumping the scoring sheet" }, { "role": "assistant", "content": "from cfp.models import CallForPaper\nfrom django.core.management.base import BaseCommand\nfrom django.db.models import StdDev, Count, Avg\n\n\nclass...
python
new_file
1
9
bsd-3-clause
a2afb7983735f82695068e945fa5fe325f6b9813
WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web
cfp/management/commands/applications_for_scoring.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for the __init__ function of the Paladin class" }, { "role": "assistant", "content": "import unittest\n\nfrom classes import Paladin\nfrom models.spells.loader import load_paladin_spells_for_level\n\n\nclass PaladinTests(uni...
python
new_file
1
4
mit
db6dafeabdade2cc8f2e14be3ed06938d3dff644
Enether/python_wow
tests/test_classes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Solution to lintcode question 124" }, { "role": "assistant", "content": "class Solution:\n \"\"\"\n @param num, a list of integer\n @return an integer\n \"\"\"\n def longestConsecutive(self, num):\n # wr...
python
new_file
2
8
mit
cdb12a5536931c62652f4e7a329eb13969cac6cb
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
lintcode/Medium/124_Longest_Consecutive_Sequence.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: SQL-PDF-Python: Add package initializer (according to PEP 420)." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# reporter-cli/sql-pdf/python/src/reportlabpkq/__init__.py\n# =======================================...
python
new_file
1
0
unlicense
289a17fe296f579b43d62c00d27ca691da2ac944
rgolubtsov/reporter-multilang,rgolubtsov/reporter-multilang,rgolubtsov/reporter-multilang,rgolubtsov/reporter-multilang
reporter-cli/sql-pdf/python/src/reportlabpkq/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test to execute all migrations." }, { "role": "assistant", "content": "from alembic import command as alembic_command\nfrom alembic.config import Config\nfrom alembic.script import ScriptDirectory\nfrom sqlalchemy import in...
python
new_file
1
2
apache-2.0
e51e1c14b1375249af90eff21978a316471c16b9
mozilla/ichnaea,therewillbecode/ichnaea,mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea,therewillbecode/ichnaea,therewillbecode/ichnaea
ichnaea/tests/test_migration.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Copy List with Random Pointer LeetCode problem\n\n- No tests though" }, { "role": "assistant", "content": "\"\"\"\nhttps://leetcode.com/explore/challenge/card/february-leetcoding-challenge-2021/585/week-2-february-8th-februar...
python
new_file
1
5
mit
bd243742f65a8fd92f4a773ce485cdc6f03f4a84
kalyons11/kevin,kalyons11/kevin
kevin/leet/copy_list_with_random_pointers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for generating spectra on a grid" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Class to create spectra spaced on a regular grid through the box\"\"\"\n\nimport numpy as np\nimport hdfsim\nimport...
python
new_file
1
4
mit
03f1f9558b717cd2d6b08db609eb8bd706ad641e
sbird/fake_spectra,sbird/fake_spectra,sbird/fake_spectra
griddedspectra.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Put Synchrophasor in a seperate file" }, { "role": "assistant", "content": "from collections import UserList\nclass Synchrophasor(UserList):\n \"\"\"\n time_tag is the time tag of the synchrophasor message\n arr_time is ...
python
new_file
1
1
mit
1e1d58c3a3d2134c98f42206b1dd5226d5e23c27
sonusz/PhasorToolBox
phasortoolbox/synchrophasor.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new script to delete no available image file." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport os\nimport re\nimport shutil\nimport imagehash\nfrom PIL impo...
python
new_file
4
5
mit
5b2d5446b178cc49934192d42de73b29ed0707e1
satojkovic/DeepLogo
del_no_available.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Write function to parse cl-json." }, { "role": "assistant", "content": "from .kqml_string import KQMLString\nfrom .kqml_list import KQMLList\nfrom .kqml_token import KQMLToken\nfrom .kqml_exceptions import KQMLException\n\n\ndef ...
python
new_file
1
11
bsd-2-clause
4071277c8fe920e19293e46ac1fa937008418616
bgyori/pykqml
kqml/cl_json.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Create a Custom Command to use the classifier" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\n\nfrom crawler.models import App\nfrom crawler.tasks import AppClassifier\n\n\nclass Comman...
python
new_file
1
1
apache-2.0
540a13e49d5f08fc030c273c4b24b62feab117b4
bkosawa/admin-recommendation
crawler/management/commands/classify.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility script for mass season data retrieval" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport concurrent.futures\n\nfrom db.common import session_scope\nfrom db.player import Pl...
python
new_file
1
4
mit
7e9bd459b13efa191fb2293e675166e21de4ec28
leaffan/pynhldb
setup/create_player_seasons.py
rejected_duplicate
Near-duplicate of sample 3812
true
[ { "role": "user", "content": "Write python code for the following: Add build script using python fabric." }, { "role": "assistant", "content": "#\n# Edit `config` line to fit in your environemnt.\n\n# To install fabric and cuisne,\n#\n# # update setuptools\n# $ sudo pip install -U setuptools...
python
new_file
4
4
bsd-2-clause
b0c54c2d88db58a56e05f5da7d0d069a16c2b852
avr-aics-riken/SURFACE,avr-aics-riken/SURFACE,avr-aics-riken/SURFACE,avr-aics-riken/SURFACE
fabfile.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add simple test for get_platform" }, { "role": "assistant", "content": "from unittest import TestCase, mock\n\nfrom mycroft.util import get_arch\n\n\nclass TestPlatform(TestCase):\n @mock.patch('os.uname')\n def test_get_ar...
python
new_file
1
1
apache-2.0
05695f5b5f6ebac318b9ff3290d2be9834125307
MycroftAI/mycroft-core,forslund/mycroft-core,MycroftAI/mycroft-core,forslund/mycroft-core
test/unittests/util/test_platform.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tests for context manager" }, { "role": "assistant", "content": "import unittest\nfrom mycroft.skills.intent_service import IntentService, ContextManager\n\n\nclass MockEmitter(object):\n def __init__(self):\n ...
python
new_file
3
1
apache-2.0
ddb514e470502160385731d6e01d8b6831a36079
linuxipho/mycroft-core,MycroftAI/mycroft-core,forslund/mycroft-core,aatchison/mycroft-core,forslund/mycroft-core,linuxipho/mycroft-core,Dark5ide/mycroft-core,Dark5ide/mycroft-core,MycroftAI/mycroft-core,aatchison/mycroft-core
test/skills/intent_service.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a code of train y separation" }, { "role": "assistant", "content": "# Built-in modules\nfrom os import path, pardir\nimport sys\nimport logging\n\n# not used in this stub but often useful for finding various files\nPROJECT_RO...
python
new_file
1
3
mit
14cedb385e8345b11d9c9dfe5903f416e5d56780
gciteam6/xgboost,gciteam6/xgboost
src/models/separate_train_y.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: migration_test: Add test for 0145 migration." }, { "role": "assistant", "content": "from zerver.lib.test_classes import MigrationsTestCase\nfrom zerver.lib.test_helpers import use_db_models, make_client\nfrom django.utils.timezon...
python
new_file
1
2
apache-2.0
b489eded170200dcc90d04cf7382c5592edefd46
kou/zulip,hackerkid/zulip,jackrzhang/zulip,hackerkid/zulip,tommyip/zulip,punchagan/zulip,eeshangarg/zulip,punchagan/zulip,kou/zulip,eeshangarg/zulip,punchagan/zulip,tommyip/zulip,tommyip/zulip,shubhamdhama/zulip,kou/zulip,synicalsyntax/zulip,brainwane/zulip,tommyip/zulip,eeshangarg/zulip,zulip/zulip,zulip/zulip,zulip/z...
zerver/tests/test_migrations_0145.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for the statusbar" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"Statusbar tests for vimiv's test suite.\"\"\"\n\nfrom unittest import main\nfrom vimiv_testcase import VimivTestCas...
python
new_file
1
1
mit
4f46ab95f012c67d6bf6188987c618e3150cb63a
karlch/vimiv,karlch/vimiv,karlch/vimiv
tests/statusbar_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for ProductSelectView" }, { "role": "assistant", "content": "from django.core.urlresolvers import reverse\nfrom django.test import TestCase\n\nimport json\n\nfrom myshop.models.polymorphic.product import Product\nfrom ...
python
new_file
1
1
bsd-3-clause
65dea8930509eee7b35af8876b15edda032aa368
awesto/django-shop,nimbis/django-shop,awesto/django-shop,jrief/django-shop,jrief/django-shop,jrief/django-shop,khchine5/django-shop,nimbis/django-shop,divio/django-shop,khchine5/django-shop,khchine5/django-shop,nimbis/django-shop,divio/django-shop,divio/django-shop,jrief/django-shop,nimbis/django-shop,awesto/django-sho...
example/tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add full example to download file" }, { "role": "assistant", "content": "from __future__ import print_function\n\nfrom openload import OpenLoad\n\ndef solve_captcha(captcha_url):\n \"\"\"Return solved captcha string\"\"\"\n ...
python
new_file
1
1
mit
9c7e73bb778ca8cdc60353dbfec484b965d11e4c
mohan3d/PyOpenload
examples/download_full.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: 4: Create script to save documentation to a file \n\nTask-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4" }, { "role": "assistant", "content": "######\n# Create a file (html or markdown) with the output of\n# - JVMH...
python
new_file
5
0
apache-2.0
5f69110a4a343a8ab6d3cc6b6efc6ca145897d94
stoeps13/ibmcnx2,stoeps13/ibmcnx2
ibmcnx/doc/Documentation.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Define Delta and QualitativeDelta classes" }, { "role": "assistant", "content": "class Delta(object):\n \"\"\"The parent class of all delta types.\"\"\"\n pass\n\n\nclass QualitativeDelta(Delta):\n \"\"\"Qualitative delt...
python
new_file
1
4
bsd-2-clause
75290add3f338abb6542c2b1981fdde7c1117626
johnbachman/belpy,bgyori/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy,sorgerlab/indra
indra/statements/delta.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add spriting plugin based on glue" }, { "role": "assistant", "content": "import os\nimport pipes\nimport shutil\nimport subprocess\n\n\"\"\"\nThis plugin uses glue to sprite images:\nhttp://glue.readthedocs.org/en/latest/quicksta...
python
new_file
null
null
bsd-3-clause
888beffa2ab3362c23d85b73b388f67f534e29a0
danielmorosan/Cactus,dreadatour/Cactus,PegasusWang/Cactus,page-io/Cactus,andyzsf/Cactus-,fjxhkj/Cactus,juvham/Cactus,Knownly/Cactus,Knownly/Cactus,fjxhkj/Cactus,Knownly/Cactus,koobs/Cactus,koenbok/Cactus,chaudum/Cactus,eudicots/Cactus,dreadatour/Cactus,chaudum/Cactus,eudicots/Cactus,ibarria0/Cactus,andyzsf/Cactus-,koen...
skeleton/plugins/sprites.disabled.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add brief experiments with creating types with newtype and annottated" }, { "role": "assistant", "content": "# IPython log file\nimport numpy as np\n\n\nimport typing as t\nImageData = t.Annotated[np.ndarray, 'image']\nx : ImageD...
python
new_file
4
1
bsd-3-clause
dabd96a85f15c7f9c198fa49982250d5cbad8b6b
jni/useful-histories
newtype-annotated-experiments.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add camelCase to snake_case function." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nutils.py\n~~~~~~~~\n\nDefines utility functions used by UPnPy.\n\"\"\"\n\n\ndef camelcase_to_underscore(text):\n \"\...
python
new_file
1
4
mit
550cda891d53dce79466687a694f7be2eb6e4d9d
Lukasa/upnpy,WenhaoYu/upnpy
upnpy/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract the linkage matrix from the average US exposure matrix" }, { "role": "assistant", "content": "\"\"\"find_classes.py\n\nFind the emergent classes from the exposure matrix averaged over all MSAs in the\nUS\n\"...
python
new_file
3
0
bsd-3-clause
4f6a577df1c40fcc5d26107f71b3fa7eb3ca85e1
rlouf/patterns-of-segregation
find_classes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement NICK command for both users and servers" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom twisted.words.protocols import irc\nfrom txircd.module_interface import Command, ICommand, IModuleD...
python
new_file
4
10
bsd-3-clause
9031a8def9b797cbd8280a29e62c436e168f4096
ElementalAlchemist/txircd,Heufneutje/txircd
txircd/modules/rfc/cmd_nick.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Allow unstarted/incomplete samplesets in db" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2016-03-14 20:49\nfrom __future__ import unicode_literals\n\nfrom django.db import migrati...
python
new_file
1
0
mit
0f9b7486d7f396598f32148422588da66c23477e
dionyziz/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,dimkarakostas/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,e...
backend/breach/migrations/0008_auto_20160314_2049.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add two functions to calculate percentiles and filter a dict using IQR\n\nThe idea is to get a dictionary with a tweets count for each user and filter that users whose number of tweets is not inside the interquartile range." }, { "ro...
python
new_file
1
3
mit
74837658fc50dc26278e3a2a56ddb0645c5fde2c
davidmogar/lexgen,davidmogar/lexgen
lexgen/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# coding=utf-8\n################################################################################\n\nfrom test import CollectorTestCase\nfrom test import get_collector_config\nfrom test import unittest\nfrom mock import Mo...
python
edit
3
2
mit
0b44d2f2f99426cd2385b881c721f64979fb3d92
jumping/Diamond,krbaker/Diamond,sebbrandt87/Diamond,Clever/Diamond,codepython/Diamond,CYBERBUGJR/Diamond,szibis/Diamond,gg7/diamond,zoidbergwill/Diamond,bmhatfield/Diamond,TAKEALOT/Diamond,TinLe/Diamond,Ormod/Diamond,tuenti/Diamond,dcsquared13/Diamond,szibis/Diamond,ceph/Diamond,jaingaurav/Diamond,tusharmakkar08/Diamon...
src/collectors/users/test/testusers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test of the parser." }, { "role": "assistant", "content": "from kqml import cl_json, KQMLList\n\n\ndef test_parse():\n json_dict = {'a': 1, 'b': 2,\n 'c': ['foo', {'bar': None, 'done': False}],\n ...
python
new_file
1
1
bsd-2-clause
6c1d1c0662a0ae05dcfbb55484164a302bf5e0d3
bgyori/pykqml
tests/test_cl_json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a snippet (python datetime timezones)." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# coding: utf-8\n\nimport datetime\n\n\n# UTC #################################\n\n# Naive\nprint(datetime.datetime.utcnow()...
python
new_file
1
0
mit
4bd4e7f459eee610d5cf19f845299ca942ff4b64
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/datetime_timezone.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a client plugin to log to files\n\nUsing logging.VALUE instead of fixed value for levels\n\nUpdated logger name value with root logger name\n\nAdded basis for RotatingFileHandler with logger\n\nAdded description of plugin\n\nUpdated comm...
python
new_file
3
2
bsd-3-clause
8d19727e44d961d6bba263990cca954893782613
securestate/king-phisher-plugins,zeroSteiner/king-phisher-plugins,zeroSteiner/king-phisher-plugins,securestate/king-phisher-plugins,wolfthefallen/king-phisher-plugins,wolfthefallen/king-phisher-plugins
client/file_logging.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Put writing code in own module" }, { "role": "assistant", "content": "import readers\nimport filtering\nimport writers\n\n\ndef merge_multiple_fractions(fns):\n \"\"\"Performs the work to merge parallelized percolator fraction...
python
new_file
1
2
mit
cd0e32e21c315e888e351c5266c38195294450a3
glormph/msstitch
drivers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for zipfile.py, by Jim Ahlstrom." }, { "role": "assistant", "content": "import zipfile, os\n\nsrcname = \"junk9630.tmp\"\nzipname = \"junk9708.tmp\"\n\ntry:\n fp = open(srcname, \"w\")\t\t# Make a source file with some line...
python
new_file
1
0
mit
3bdf1e98b3379fde17107fcdb1e32d9273a826b4
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_zipfile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for session timeout http headers\n\nThese tests check for the absence or presence\nof the session timeout redirect headers.\n\n[MAPDEV326]" }, { "role": "assistant", "content": "from django.test import TestCase\nfr...
python
new_file
3
1
mit
6ce83f65f12fe02c4f9417c610322f21ef6c02c6
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
apps/plea/tests/test_timeout.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command to mark failed renders as expired" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand, CommandError\nfrom ...models import Render\n\n\nclass Command(BaseCommand):\n help = 'Ma...
python
new_file
4
1
apache-2.0
68dfe9c86ec1d2042b3f1eef21738300a3c6caf2
arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity
arxiv_vanity/papers/management/commands/mark_failed_renders_as_expired.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights correct lineup problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Correct Lineup Problem\n\n\ndef correctLineup(athletes):\n return [a for t in zip(athletes[1::2], athletes[...
python
new_file
1
3
mit
1ddec2ec4cae3d200f56a58f2de48334ab3d4af2
HKuz/Test_Code
CodeFights/correctLineup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: ZON-3409: Add test to ensure timebased jobs are called with delay." }, { "role": "assistant", "content": "import datetime\nimport mock\nimport pytz\nimport transaction\nimport zeit.content.article.cds\nimport zeit.content.article...
python
new_file
1
1
bsd-3-clause
a31d112ab188755a6d843599c1472334abcefd3b
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
src/zeit/workflow/tests/test_timebased.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a dirty cubes of the whole HI 14B-088 data" }, { "role": "assistant", "content": "\n'''\nCreate a dirty HI cube for comparison and use in feathering.\n\n*Note*: Ran with casa-prerelease-5.0.0-187.el7 to take advantage of t...
python
new_file
1
0
mit
7c8c6fb26dbf22e9fa09b1121683957123d9b903
e-koch/VLA_Lband,e-koch/VLA_Lband
14B-088/HI/imaging/HI_dirty_cube.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for NE data min/max zoom join to places." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom . import FixtureTest\n\n\nclass MinZoomFromNETest(FixtureTest):\n\n def setUp(self):\n import dsl\n\...
python
new_file
2
2
mit
d619307b77851e014cabc3e864e4c11dfea7764d
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
integration-test/977-min-zoom-from-ne-join.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script for downloading all CalISO 30min generation data." }, { "role": "assistant", "content": "# printurls.py - returns command for downloading CalISO \"renewables watch\" data.\n\nimport datetime\n\nURL_FORMAT = \"http://...
python
new_file
2
2
mit
d3ab0989bdeaf1aefb287b5bf6ae511c0441d370
gonzojive/cal-iso-daily-renewables
printurls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.db import models\nfrom django.contrib.auth.models import AbstractUser\n\n\nclass User(AbstractUser):\n pass\n\n\nclass Organization(models.Model):\n display_name = models.CharField(max_len...
python
edit
1
0
mit
8d000ebe16657f5cbe7fdf06ddd91322f141fb11
kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting
accounting/apps/books/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing validation (see 58227d2)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2016-06-04 17:17\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, mo...
python
new_file
1
0
isc
100f4dc9f81728db3ae3a1c73ace92e52d46a4d4
hobarrera/django-afip,hobarrera/django-afip
django_afip/migrations/0014_no_partially_validated_receiptvalidations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for pca-ing jacobians." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport climate\nimport joblib\nimport lmj.pca\n\nimport database\n\n\ndef jac(trial):\n trial.load()\n cols = [c for c in tri...
python
new_file
3
3
mit
bd23cb0214ce0a3eb14b069599f4bded8bd2b26a
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/compress-jacobians.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nhomeassistant.components.light.insteon\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nSupport for Insteon Hub lights.\n\"\"\"\n\nfrom homeassistant.components.insteon import (INSTEON, InsteonToggleDevice)\n\n\ndef setup_platform(hass, confi...
python
edit
1
4
mit
eebb736bf83c572b797931c571e7416223436461
emilhetty/home-assistant,Duoxilian/home-assistant,rohitranjan1991/home-assistant,toddeye/home-assistant,ct-23/home-assistant,florianholzapfel/home-assistant,kennedyshead/home-assistant,keerts/home-assistant,lukas-hetzenecker/home-assistant,jabesq/home-assistant,JshWright/home-assistant,open-homeautomation/home-assistan...
homeassistant/components/light/insteon.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Verify endpoint prefix matches service name\n\nThis protects us from cases where we mis-name the artifacts that we\nbase our service names on. Generally these should be named based on\nthe endpoint prefix, except in a handful of special case...
python
new_file
1
2
apache-2.0
b555659518097db41a02d505ebfaf88e828b2f30
boto/botocore,pplu/botocore
tests/functional/test_endpoints.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate XKCD password." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n See https://xkcd.com/936/ for why you might want to generate these\n passphrases.\n\n Does require /usr/share/d...
python
new_file
2
5
mit
ad37a8cf39e79c0988bd76e11615873993c394b6
ddryden/legendary-octo-engine,ddryden/legendary-octo-engine
randomXKCDPassword.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add base class for testing mixins and attributes" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <...
python
new_file
1
2
apache-2.0
cbc4269b78e3ce2edb116323353f92c9b2a4d15b
NejcZupec/ggrc-core,NejcZupec/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-co...
test/unit/ggrc/models/base_mixins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to workaround lack of account search\n\nDiscovered the need for this in the course of #312. See also:\nhttps://github.com/balanced/balanced-api/issues/141" }, { "role": "assistant", "content": "#!./env/bin/python\n\"...
python
new_file
2
0
cc0-1.0
07d2cb651903545d38a7e12f656d0fde920e7102
mccolgst/www.gittip.com,bountysource/www.gittip.com,studio666/gratipay.com,mccolgst/www.gittip.com,MikeFair/www.gittip.com,mccolgst/www.gittip.com,bountysource/www.gittip.com,MikeFair/www.gittip.com,eXcomm/gratipay.com,gratipay/gratipay.com,bountysource/www.gittip.com,gratipay/gratipay.com,eXcomm/gratipay.com,MikeFair/...
find-in-balanced-by-username.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create conflict in a more user-friendly way" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Copyright 2010-2012 RethinkDB, all rights reserved.\nimport sys, os, time\nsys.path.append(os.path.abspath(os.path.join(o...
python
new_file
7
0
apache-2.0
fd3f0ab94beb19181636f190c79d3cd17ee03b36
marshall007/rethinkdb,grandquista/rethinkdb,pap/rethinkdb,nviennot/rethinkdb,spblightadv/rethinkdb,rrampage/rethinkdb,jmptrader/rethinkdb,bpradipt/rethinkdb,grandquista/rethinkdb,sebadiaz/rethinkdb,niieani/rethinkdb,elkingtonmcb/rethinkdb,lenstr/rethinkdb,yaolinz/rethinkdb,scripni/rethinkdb,lenstr/rethinkdb,gavioto/ret...
test/interface/conflict-util.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add examples folder for small service demos" }, { "role": "assistant", "content": "import os\nimport ujson\n\nHERE = os.path.abspath(os.path.dirname(__file__))\n\n\ndef load_api(filename):\n '''\n Helper to load api specifi...
python
new_file
1
1
mit
b20a8a86675c931c033600669b3909cb3c4e010d
numberoverzero/pyservice
examples/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write simple least-squares fit, from \"Theoretical and Experimental Modal Analysis\"" }, { "role": "assistant", "content": "import numpy as np\n\nimport matplotlib.pyplot as plt\n\ndef func(w, wr, nr, c):\n return c / (wr**2 -...
python
new_file
1
1
bsd-3-clause
9893af1b94fc460d017d7bdc9306bb00660bd408
torebutlin/cued_datalogger
circle_fit/circle_fit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights message from binary code problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Message from Binary Code Problem\n\n\ndef messageFromBinaryCode(code):\n sz = 8\n return ''.jo...
python
new_file
1
3
mit
d4b3b0d9560ecf059c73d7c2e4395bb955575a78
HKuz/Test_Code
CodeFights/messageFromBinaryCode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add preliminary script to convert Ville de Montreal KML" }, { "role": "assistant", "content": "import hashlib\nimport sys\nimport tempfile\n\nfrom django.contrib.gis.gdal import DataSource\nfrom lxml import etree\nimport lxml.htm...
python
new_file
2
6
mit
f824dc45b49ab6fdac14ddea81fcca470253fd1f
Open511/open511-server,Open511/open511-server,Open511/open511-server
open511/scripts/mtl_kml_to_open511.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test checking the external archive size\n\nThis should prevent size regressions" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf8 -*-\n\"\"\"\nThis script checks that all the external archive ...
python
new_file
1
1
bsd-3-clause
f54c8f3b40bf44c4ba0f9fd1d1b6187991c327d5
Luthaf/Chemharp,chemfiles/chemfiles,chemfiles/chemfiles,chemfiles/chemfiles,Luthaf/Chemharp,Luthaf/Chemharp,chemfiles/chemfiles
tests/lints/check-external-size.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an awesome way to apply different functions over an array." }, { "role": "assistant", "content": "\"\"\"\n Apply different function over an array\n\"\"\"\n\ndef square(num):\n return num ** 2\n\ndef cube(num):\n retu...
python
new_file
1
1
mit
9e23f0a0546c80cb348de5faad351b0ceb0b4837
xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book,xdanielsb/Marathon-book
Arrays/different_func.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to populate the database" }, { "role": "assistant", "content": "import sys\n\nsys.path.append('./sqlbase')\n\nfrom sqlalchemy import create_engine\nfrom sqlbase import Base, WeatherData\n\nDB_Connection = 'postgresql:/...
python
new_file
3
0
apache-2.0
0d38954e4c595920fa707333835d043959c71d71
josecastroleon/GroveWeatherPi
sqlinit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution to exercise 4.4." }, { "role": "assistant", "content": "# 3-4 Guest List\n\nguest_list = [\"Albert Einstein\", \"Isac Newton\", \"Marie Curie\", \"Galileo Galilei\"]\n\nmessage = \"Hi \" + guest_list[0] + \" you are ...
python
new_file
1
0
mit
2e72dcb52c23690c6f1b41cfff1948f18506293b
HenrikSamuelsson/python-crash-course
exercises/chapter_03/exercise_03_04/exercise_04_04.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement generating the ontology map" }, { "role": "assistant", "content": "from indra.sources import eidos\nfrom indra.sources.hume.make_hume_tsv import make_file\nfrom indra.java_vm import autoclass\n\neidos_package = 'org.clu...
python
new_file
1
0
bsd-2-clause
a3c1a83a44764564e8110cc0668a8ba463759d9b
pvtodorov/indra,johnbachman/belpy,bgyori/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/belpy,sorgerlab/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,bgyori/indra,bgyori/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra
indra/preassembler/make_wm_ontmap.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move communication controller to the core" }, { "role": "assistant", "content": "import socket\nimport httplib\n\nclass CommunicationControl():\n\tdef sendTCPMessage(self, ipAddress, port, message):\n\t\tBUFFER_SIZE = 1024\n\t\tp...
python
new_file
1
1
mit
cc764d3101324bc10e64664e7aac7af6a9fee85b
Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation,Tomcuzz/OctaHomeAutomation
Core/communication_controller.py
accepted
null
true