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: Test cases to verify parsing of bitwise encoded PIDs" }, { "role": "assistant", "content": "from shadetree.obd.scanner import decode_bitwise_pids\n\nDURANGO_SUPPORTED_PIDS_RESPONSE = 'BE 3E B8 10 '\nJETTA_DIESEL_SUPPORTED_PIDS_RE...
python
new_file
1
1
mit
b57c24b23fa9566178455da895ea63baf6e16ff4
corbinbs/shadetree,s-s-boika/obdlib,QualiApps/obdlib,QualiApps/obdlib,s-s-boika/obdlib
tests/scanner_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Change file location and rename" }, { "role": "assistant", "content": "'''\nThis file creates a .csv file containing the name of each laptop and its last changed date\n'''\nimport argparse\nimport csv\nfrom datetime import dateti...
python
new_file
3
3
bsd-3-clause
7c1b0d4efd000fee8f065f2f5815075833811331
sibis-platform/ncanda-data-integration,sibis-platform/ncanda-data-integration
scripts/reporting/svn_report.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test cases for reported issues" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\nfrom pyrql import parse\n\n\nCMP_OPS = ['eq', 'lt', 'le', 'gt', 'ge', 'ne']\n\n\nclass TestReportedErrors:\n\n def test_lik...
python
new_file
1
1
mit
925da64adf0b74ba18eb78acd9127e3a6dc6f903
pjwerneck/pyrql
tests/test_reported.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add code to get 99th percentile absolute pointing for POG" }, { "role": "assistant", "content": "import numpy as np\nfrom Chandra.Time import DateTime\nimport plot_aimpoint\n\n# Get 99th percential absolute pointing radius\n\nplo...
python
new_file
2
0
bsd-2-clause
ca002a18b7e392bbdca9d7e0ed8c39739dc5b4a3
sot/aimpoint_mon,sot/aimpoint_mon
pog_absolute_pointing.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial tests for test module" }, { "role": "assistant", "content": "\"\"\"tests/test_test.py.\n\nTest to ensure basic test functionality works as expected.\n\nCopyright (C) 2019 Timothy Edmund Crosley\n\nPermission is hereby...
python
new_file
1
1
mit
7401d1ecd6b3323b266cf02eabd42a2c4e40d988
timothycrosley/hug,timothycrosley/hug,timothycrosley/hug
tests/test_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migration for column description." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Mig...
python
new_file
1
0
bsd-3-clause
ace782a3f4c616f9e22e1a1ce29f053b71391845
pbs/django-cms,pbs/django-cms,pbs/django-cms,pbs/django-cms
cms/migrations/0002_update_template_field.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new user-defined file\n\ncapillaries.py for capillary samples" }, { "role": "assistant", "content": "#6.342 mm apart\n\n#6.074\n\ndef capillary6_in():\n mov(diff.xh,12.41)\n mov(diff.yh,-12.58)\n\ndef capillary7_in():...
python
new_file
21
1
bsd-2-clause
72dcd6857f5f895f0fb9325681302f5875bc50ec
NSLS-II-CHX/ipython_ophyd,NSLS-II-CHX/ipython_ophyd
profile_collection/startup/31-capillaries.py
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Write python code for the following: Add python code to plot the histogram" }, { "role": "assistant", "content": "import matplotlib.pyplot as plt\nimport sys\n\nif __name__ == \"__main__\":\n with open(sys.argv[1]) as f:\n data = map(float, f.readlines())\...
python
new_file
1
0
mit
f1ee6ce108626342b42a2d2a7b5aa4779af87e6c
chengluyu/SDU-Computer-Networks
plot-histogram.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python / `requests` example" }, { "role": "assistant", "content": "import requests # http://python-requests.org/\n\n# Premium user authentication process and API access example\nr = requests.post('https://api.masterleague.ne...
python
new_file
1
0
mit
7da94fd5576f4c052e79a8068164c101054d5ae7
masterleague-net/api-examples
python/simple.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a skeleton for node propagation integration tests" }, { "role": "assistant", "content": "class TestPropagation(object):\n def test_node_propagation(self):\n \"\"\"\n Tests that check node propagation\n\n ...
python
new_file
1
1
mit
daa4565abe4059e8588ddf374fde0f51d9ec784e
thiderman/network-kitten
test/integration/test_node_propagation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for nova connector" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\n :codeauthor: :email:`Bo Maryniuk <<EMAIL>>`\n'''\n\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Impor...
python
new_file
1
1
apache-2.0
5e574a24d95e686bc2592af439e148e68036c61d
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/cloud/clouds/nova_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add class containing test state and report + print methods\n\nClass Ptest represents the state of unit testing for one module. It\nhas two methods, report and print_statistics. Report records the\nstatus of a single unit test, and report_sta...
python
new_file
1
3
unlicense
8fe5e768f20abfdd790870075950b6537c5cad6a
Mikko-Finell/ptest
ptest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial code for getting batting stats over a specified timeframe" }, { "role": "assistant", "content": "\n\"\"\"\nTODO\npull batting stats over specified time period \nallow option to get stats for full seasons instead of ra...
python
new_file
1
6
mit
44b6b0ff5efc6d9fcda4f886640663b68e7d6c14
jldbc/pybaseball
pybaseball/league_batting_stats.py
rejected_duplicate
Near-duplicate of sample 6869
true
[ { "role": "user", "content": "Write python code for the following: Add the original game code to the files to show progress made during the week using classes and other skills" }, { "role": "assistant", "content": "import random\n\nGuessesTaken = 0\n\nprint (\"Hello and welcome to my higher or l...
python
new_file
1
0
mit
380a87e71c347eab5d9c5d22a255753e62e1d739
Baseyoyoyo/Higher-or-Lower,Baseyoyoyo/Higher-or-Lower
Original_python_game.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write a brief demo using nltk" }, { "role": "assistant", "content": "#!/usr/bin/python3\n\nimport sys, os\nimport nltk\n\nif len(sys.argv) < 2:\n print(\"Please supply a filename.\")\n sys.exit(1)\n\nfilename = sys.argv[1]\...
python
new_file
3
0
mit
8aada38d951d039e11e03a6bae9445c784bb4cce
alexander-bauer/syllabus-summary
parse-demo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add minimal (no asserts) test for play plugin" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Tests for the play plugin\"\"\"\n\nfrom __future__ import (division, absolute_import, print_function,\n ...
python
new_file
3
1
mit
25495d675c44a75d7dedfe123f30a858f9cd60be
MyTunesFreeMusic/privacy-policy,diego-plan9/beets,sampsyo/beets,sampsyo/beets,jcoady9/beets,swt30/beets,jcoady9/beets,LordSputnik/beets,jackwilsdon/beets,MyTunesFreeMusic/privacy-policy,parapente/beets,ibmibmibm/beets,ibmibmibm/beets,lengtche/beets,Freso/beets,xsteadfastx/beets,LordSputnik/beets,madmouser1/beets,lengtc...
test/test_play.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add common module for our tests" }, { "role": "assistant", "content": "\"\"\"Common functionality.\"\"\"\r\nimport os.path\r\nimport tempfile\r\nimport shutil\r\nimport sys\r\n\r\nclass TestCase(unittest2.TestCase):\r\n \"\"\"...
python
new_file
2
2
bsd-2-clause
a15e363718ab41c5e02b9eaa919fb689cd266af6
ptthiem/nose2,ojengwa/nose2,ezigman/nose2,ojengwa/nose2,leth/nose2,ezigman/nose2,ptthiem/nose2,little-dude/nose2,leth/nose2,little-dude/nose2
nose2/tests/_common.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python code for doing tensor decomposition with scikit-tensor." }, { "role": "assistant", "content": "import logging\nimport numpy\nfrom numpy import genfromtxt\nfrom sktensor import sptensor, cp_als\n# Set logging to DEBUG t...
python
new_file
5
0
mit
784fd8b08ee0f268350a2003a9c06522c0678874
monsendag/goldfish,ntnu-smartmedia/goldfish,monsendag/goldfish,ntnu-smartmedia/goldfish,monsendag/goldfish,ntnu-smartmedia/goldfish
python/run.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add an event-driven recording tool" }, { "role": "assistant", "content": "#!/usr/bin/env python3\nimport subprocess\nimport time\nimport argparse\n\nif __name__ == '__main__':\n bwa_is_recorded = False\n smb_is_recorded = F...
python
new_file
1
0
apache-2.0
b9feeb2a37f0596b48f9582e8953d29485167fc8
cyliustack/sofa,cyliustack/sofa,cyliustack/sofa,cyliustack/sofa,cyliustack/sofa
tools/sofa-edr.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missing migrations for limit_choices_to on BlogPage.author" }, { "role": "assistant", "content": "# Generated by Django 2.2.2 on 2019-06-05 08:04\n\nimport blog.abstract\nfrom django.conf import settings\nfrom django.db impor...
python
new_file
1
0
apache-2.0
b72f8a9b0d9df7d42c43c6a294cc3aab2cb91641
thelabnyc/wagtail_blog,thelabnyc/wagtail_blog
blog/migrations/0002_auto_20190605_1104.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add zero system test to neural net" }, { "role": "assistant", "content": "from net import NeuralNet\nimport numpy as np\n\n#TODO(Wesley) More tests\n\nclass TestNeuralNet(object):\n def test_zero_system(self):\n net = N...
python
new_file
1
3
mit
59a228312bb3091db8bfb6bf9a75ce4ae47431f4
WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox,WesleyAC/toybox
neuralnets/net_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate a standalone timeline view.\n\nTBR=<EMAIL>\n\nReview URL: https://codereview.appspot.com/6497071" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Copyright (c) 2012 The Chromium Authors. All ...
python
new_file
2
6
bsd-3-clause
d50814603217ca9ea47324a0ad516ce7418bc9bf
sahiljain/catapult,danbeam/catapult,catapult-project/catapult-csm,scottmcmaster/catapult,sahiljain/catapult,catapult-project/catapult-csm,0x90sled/catapult,benschmaus/catapult,catapult-project/catapult-csm,0x90sled/catapult,zeptonaut/catapult,danbeam/catapult,catapult-project/catapult-csm,SummerLW/Perf-Insight-Report,b...
build/generate_standalone_timeline_view.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new migration for Django 1.8" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n ...
python
new_file
1
0
bsd-3-clause
fadac460052cb1a778bf8398879e1cb616c26228
nabucosound/django-propaganda
propaganda/migrations/0002_auto_20150802_1841.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add function to save/restore environment between configuration checks." }, { "role": "assistant", "content": "from copy import deepcopy\n\ndef save_and_set(env, opts, keys=None):\n \"\"\"Put informations from option configurat...
python
new_file
1
7
bsd-3-clause
945fe81c4a0f970e57ff7c5a13d8c3aa03df5fc6
cournape/numscons,cournape/numscons,cournape/numscons
numscons/checkers/new/common.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to subset kerning plist." }, { "role": "assistant", "content": "import sys\nfrom plistlib import writePlist\nfrom defcon import Font\n\n\n__doc__ = '''\nSubset kerning in UFO given a list of glyphs provided.\nWill expo...
python
new_file
3
4
mit
fc9dd735c96ae21b4a64286e4c9ebcedc0e1fbca
adobe-type-tools/kern-dump
subsetKerning.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for parsing the man page" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport unittest\n\nimport mock\n\nfrom tldr.parser import parse_...
python
new_file
1
1
mit
b6500cc5ae48212b7cabefc313b417a42273274b
lord63/tldr.py
tests/test_parse.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add parser for the advisory mail recipients.\n\n* tools/dist/security/mailinglist.py: New.\n\n\ngit-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1717919 13f79535-47bb-0310-9956-ffa450edef68" }, { "role": "assistant", "content...
python
new_file
1
3
apache-2.0
d97b9f6c508dd24da0f86bc1587ea64708c84a89
YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion
tools/dist/security/mailinglist.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write solution to DEC14 XOR question." }, { "role": "assistant", "content": "# http://www.codechef.com/DEC14/problems/XORSUB\nimport operator\ndef f(p):\n\tif p == []:\n\t\treturn 0\n\telif len(p) == 1:\n\t\treturn p[0]\n\telse:\...
python
new_file
2
3
mit
9e2669539c5d7662bb6d6a89877b30235eef1bc2
paramsingh/cp,paramsingh/codechef-solutions,paramsingh/cp,paramsingh/codechef-solutions,paramsingh/cp,paramsingh/cp,paramsingh/codechef-solutions,paramsingh/codechef-solutions,paramsingh/cp
xor.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom flexget import plugin\nfrom flexget.plugin import priority, register_plugin\n\nlog = logging.getLogger('builtins')\n\n\nclass PluginDisableBuiltins(object):\n \"\"\"\n Disables all builtin plugins from a feed....
python
edit
2
5
mit
009182d0c603f9c1f8fa650f6a9771b38a74c6cc
thalamus/Flexget,offbyone/Flexget,drwyrm/Flexget,Danfocus/Flexget,poulpito/Flexget,drwyrm/Flexget,malkavi/Flexget,sean797/Flexget,oxc/Flexget,jawilson/Flexget,jacobmetrick/Flexget,ZefQ/Flexget,JorisDeRieck/Flexget,gazpachoking/Flexget,asm0dey/Flexget,drwyrm/Flexget,vfrc2/Flexget,JorisDeRieck/Flexget,jawilson/Flexget,xf...
flexget/plugins/plugin_disable_builtins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for setopt to demonstrate that edit_config retains non-ASCII characters." }, { "role": "assistant", "content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport io\n\nimport six\n\nfrom setuptools.com...
python
new_file
1
2
mit
7b09ba64c0327ecea04cc95057ffa7d5c8d939c8
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/tests/test_setopt.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add in small utility that creates an index on the MongoDB collection, specifically on the Steam ID number key" }, { "role": "assistant", "content": "#!/usr/env python3.4\nimport sys\nfrom pymongo import ASCENDING\nfrom util.mongo...
python
new_file
1
1
mit
3004dec0e0deadc4df61bafb233cd6b277c9bfef
mulhod/reviewer_experience_prediction,mulhod/reviewer_experience_prediction
util/create_mongodb_index.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for python runner action wrapper process script performance." }, { "role": "assistant", "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE fi...
python
new_file
1
1
apache-2.0
fc21bb14600f79a3d9970272fb7edd4eba548262
tonybaloney/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,lakshmi-kannan/st2,peak6/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,lakshmi-kannan/st2,StackStorm/st2,peak6/st2,StackStorm/st2,Plexxi/st2,peak6/st2,nzlosh/st2,nzlosh/st2,nzlosh/st2,tonybaloney/st2,tonybaloney/st2,lakshmi-kannan/st2
st2actions/tests/integration/test_python_action_process_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write bodies given by coordinates to a VTK file" }, { "role": "assistant", "content": "# stardard library\nimport sys, os\n\n# external libraries\nimport numpy as np\nfrom ray import imio, evaluate\n\ndef add_anything(a, b):\n ...
python
new_file
6
1
bsd-3-clause
5af92f3905f2d0101eeb42ae7cc51bff528ea6ea
jni/synapse-geometry,janelia-flyem/synapse-geometry
syngeo/io.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom sentry.api.serializers import Serializer, register\nfrom sentry.models import GroupTagKey, TagKey\n\n\n@register(GroupTagKey)\nclass GroupTagKeySerializer(Serializer):\n def get_attrs(self, ...
python
edit
1
6
bsd-3-clause
238d031651cb74d0ca9bed9d38cda836049c9c37
daevaorn/sentry,gencer/sentry,zenefits/sentry,beeftornado/sentry,imankulov/sentry,BuildingLink/sentry,looker/sentry,looker/sentry,fotinakis/sentry,JamesMura/sentry,mvaled/sentry,alexm92/sentry,ifduyue/sentry,jean/sentry,beeftornado/sentry,fotinakis/sentry,BuildingLink/sentry,ifduyue/sentry,alexm92/sentry,BuildingLink/s...
src/sentry/api/serializers/models/grouptagkey.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for core module" }, { "role": "assistant", "content": "\"\"\"Test CLI module\"\"\"\n\n\nimport os\nimport sys\nimport tempfile\nimport unittest\nfrom mock import mock_open, patch\nfrom context import dfman\nfrom df...
python
new_file
7
1
mit
b663bf77fe60a108598db4ae8310e8877d06cddd
jniedrauer/dfman
tests/core_test.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Check that relationships in SsWang are up-to-date" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\"\"\"Test S-value for Table 1 in Wang_2007\"\"\"\n\n__copyright__ = \"Copyright (C) 2020-present, DV Klopfenstein. ...
python
new_file
1
3
bsd-2-clause
6ea2d5af752e4765be8ef433139f72538fa3a2dd
tanghaibao/goatools,tanghaibao/goatools
tests/test_semsim_wang_termwise.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to automate the generation of source distributions for Windows and Linux." }, { "role": "assistant", "content": "\"\"\"Script to automate the creation of Windows and Linux source distributions.\n\nThe TOPKAPI_example...
python
new_file
1
6
bsd-3-clause
f342a3bb330eab74f31f632c81792f93a6e086e8
scottza/PyTOPKAPI,sahg/PyTOPKAPI
create_distributions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a command to retrieve all triggers" }, { "role": "assistant", "content": "from IRCResponse import IRCResponse, ResponseType\nfrom CommandInterface import CommandInterface\nimport GlobalVars\n\nclass Command(CommandInterface):...
python
new_file
1
7
mit
07fd61306e645b7240883d5d468f94be5ce8a34c
HubbeKing/Hubbot_Twisted
Commands/Triggers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set up test suite to ensure server admin routes are added." }, { "role": "assistant", "content": "\"\"\"General functional tests for the API endpoints.\"\"\"\n\n\nfrom django.test import TestCase, Client\n# from django.urls impor...
python
new_file
3
2
apache-2.0
2fa7855de542bb5ecd303e26d1e9913687478589
sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,salopensource/sal
server/tests/test_admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add command to pre-generate all jpeg images" }, { "role": "assistant", "content": "\"\"\"Convert a video file to flv\"\"\"\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.management.base import BaseCo...
python
new_file
3
2
bsd-3-clause
62e17c30ba45458254c0da5b14582aeeac9eab4c
Signbank/BSL-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank,Signbank/Auslan-signbank,Signbank/BSL-signbank
signbank/video/management/commands/makejpeg.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add minimal dead code elimination" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nDead code elimination.\n\"\"\"\n\nfrom pykit.analysis import loop_detection\n\neffect_free = set([\n 'alloca', 'load',...
python
new_file
3
4
bsd-3-clause
ecac8bc83491c9cb2312cf2a1c477c53c4832b4d
Inaimathi/pykit,Inaimathi/pykit,flypy/pykit,ContinuumIO/pykit,ContinuumIO/pykit,flypy/pykit
pykit/transform/dce.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to update taking for all team owners" }, { "role": "assistant", "content": "import sys\n\nfrom gratipay import wireup\nfrom gratipay.models.participant import Participant\n\ndb = wireup.db(wireup.env())\n\nteams = db.a...
python
new_file
3
0
mit
c5bbbe4f6430ef20da55ea0f8039091d4f79c491
gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com
sql/branch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple basicmap python example" }, { "role": "assistant", "content": "\"\"\"\n>>> from pyspark.context import SparkContext\n>>> sc = SparkContext('local', 'test')\n>>> b = sc.parallelize([1, 2, 3, 4])\n>>> sorted(basicSquar...
python
new_file
null
null
mit
1d3719bcd03b92d04efae10933928f953d95c7a4
SunGuo/learning-spark,asarraf/learning-spark,SunGuo/learning-spark,jaehyuk/learning-spark,asarraf/learning-spark,negokaz/learning-spark,kod3r/learning-spark,diogoaurelio/learning-spark,databricks/learning-spark,zaxliu/learning-spark,JerryTseng/learning-spark,anjuncc/learning-spark-examples,gaoxuesong/learning-spark,hui...
src/python/BasicMap.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nimport requests\n\n\ndef scrape(url, extractor):\n \"\"\"\n Function to request and parse a given URL. Returns only the \"relevant\"\n text.\n\n Parameters\n ----------\n\n url : String.\n URL to...
python
edit
5
3
mit
335881f4644a6bb2b5f2abb5b193f39d304dbc71
chilland/scraper,openeventdata/scraper
pages_scrape.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add function to delete collection" }, { "role": "assistant", "content": "def delete_collection(ee, id):\n if 'users' not in id:\n root_path_in_gee = ee.data.getAssetRoots()[0]['id']\n id = root_path_in_gee + '/' ...
python
new_file
1
3
apache-2.0
4c33fe7a927cde83aa53374e9fcaedfa18e51e77
tracek/gee_asset_manager
utilities.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add context manager for logging\n\nAllows temporarily changing logging levels in order to suppress expected\nmessages from 3rd party dependencies." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Context ma...
python
new_file
4
5
apache-2.0
c36e390910b62e1ad27066a0be0450c81a6f87c6
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
d1_common_python/src/d1_common/logging_context.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration to create roles" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom corehq.apps.hqadmin.management.commands.cchq_...
python
new_file
3
0
bsd-3-clause
e88ba0984f3e6045b407342fa7231887142380e2
dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/accounting/migrations/0031_create_report_builder_roles.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic unit test for LimitOffsetPagination" }, { "role": "assistant", "content": "from collections import OrderedDict\n\nfrom rest_framework.request import Request\nfrom rest_framework.test import APIRequestFactory\nfrom rest_...
python
new_file
1
1
bsd-2-clause
36d0fc3c54dc0c91196c16875c1b1e2d9b0d38ea
martinmaillard/django-rest-framework-json-api,abdulhaq-e/django-rest-framework-json-api,django-json-api/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,scottfisk/django-rest-framework-json-api,django-json-api/rest_framework_ember,django-json-api/django-rest-framework-json-api,leo-naeka/rest_fr...
example/tests/unit/test_pagination.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create initial night sensor code for Pi" }, { "role": "assistant", "content": "\"\"\"\n@author: Sze \"Ron\" Chau\n@e-mail: <EMAIL>\n@source: https://github.com/wodiesan/sweet-skoomabot\n@desc Night sensor-->RPi...
python
new_file
3
2
mit
9c0bcd4e0317aa8b76ebbf3c9ecae82d1b90027d
wodiesan/senior_design_spring
night_sensor/night_feature.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test of new persistence layer." }, { "role": "assistant", "content": "from ndtable.carray import carray, cparams\nfrom bloscpack import pack_list, unpack_file\nfrom numpy import array, frombuffer\n\ndef test_simple():\n filena...
python
new_file
6
2
bsd-2-clause
5f9c7d10957c7b0b0da46b031120fe2434315d0d
seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core
ndtable/persistence/simple.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add a command to list all the documents." }, { "role": "assistant", "content": "\"\"\"\nList the Documents and Folders\n\"\"\"\n\nfrom paper_to_git.commands.base import BaseCommand\nfrom paper_to_git.models import PaperDoc, Paper...
python
new_file
1
8
apache-2.0
e51f3869b4a047489b9bb1e4b88af0e0bdc3078b
maxking/paper-to-git,maxking/paper-to-git
paper_to_git/commands/list_command.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add profiling script for savings code\n\nThis is useful for finding out where the code is spending its time and\nfor testing possible performance improvements." }, { "role": "assistant", "content": "\"\"\"\nBasic profiling code f...
python
new_file
1
2
mit
7655e376696a04aa1c3596274861515953f592e8
ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc
openprescribing/frontend/price_per_unit/profile.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple tests for DrsSymbol and DrsIndexed\n\nBasically it is tested that the class for drudge scripts are basically\nindistinguishable from the original SymPy classes." }, { "role": "assistant", "content": "\"\"\"Tests for dr...
python
new_file
1
4
mit
1298cf9c7a40ce73d46067035ded2318c62f7380
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
tests/drs_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set 2, challenge 9 completed." }, { "role": "assistant", "content": "#!/usr/local/bin/python\n\n__author__ = 'Walshman23'\n\nimport sys\nsys.path.insert(1, \"../common\") # Want to locate modules in our 'common' directory\n\n\n# ...
python
new_file
1
0
bsd-3-clause
188d583caea0e640f41e400839552fe593154eda
walshman23/Cryptopals
set2/crypto9.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom django.conf import settings\n\n\nclass MediaRemovalMixin(object):\n \"\"\"\n Removes all files associated with the model, as returned by the\n get_media_files() method.\n \"\"\"\n\n # Models that use this mi...
python
edit
1
5
mit
2766e8797515497e5569b31696416db68641c9b4
matus-stehlik/roots,rtrembecky/roots,matus-stehlik/glowing-batman,tbabej/roots,rtrembecky/roots,rtrembecky/roots,matus-stehlik/roots,matus-stehlik/roots,tbabej/roots,matus-stehlik/glowing-batman,tbabej/roots
base/models.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for Square Detector." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport sys\n\nclass QuizzesParser:\n def __init__(self, src):\n self.src = src\n with op...
python
new_file
1
19
mit
5046ff8ba17899893a9aa30687a1ec58a6e95af2
changyuheng/hacker-cup-solutions
2014/qualification-round/square-detector.py
rejected_complexity
Cyclomatic complexity too high: 19
true
[ { "role": "user", "content": "Write python code for the following: Add solution for porblem 31" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nLIMIT = 200\ncoins = [1, 2, 5, 10, 20, 50, 100, 200]\n\n\ndef rec_count(total, step):\n if total == LIMIT:\n return 1\n if total...
python
new_file
1
5
mit
c44001ec697faf7552764f91e52fa927056b1538
cifvts/PyEuler
euler031.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Improve: Add instance method unit tests" }, { "role": "assistant", "content": "# Imports\nimport random\nimport unittest\nfrom funky import memoize, timed_memoize\n\n\nclass Dummy(object):\n @memoize\n def a(self):\n ...
python
new_file
3
1
apache-2.0
a1eaf66efa2041849e906010b7a4fb9412a9b781
FriendCode/funky
tests/test_instancemethod.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add cuit validator to utils module" }, { "role": "assistant", "content": "# -*- coding: utf-8-*-\n\n\ndef validate_cuit(cuit):\n \"from: http://python.org.ar/pyar/Recetario/ValidarCuit by Mariano Reingart\"\n # validaciones...
python
new_file
1
7
mit
24c642063ffcb3313545b2e1ba3abbb62aa98437
coyotevz/nobix-app
nbs/utils/validators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for programmatic application and approval" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport pytest\nfrom members.tests.fixtures.memberlikes import MembershipApplicationFactory\nfrom members.test...
python
new_file
1
1
mit
3df4cc086bf6c85eebc12094cc3ca459bd2bcd3d
HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,jautero/asylum,rambo/asylum,jautero/asylum,hacklab-fi/asylum,rambo/asylum,HelsinkiHacklab/asylum,rambo/asylum,jautero/asylum,jautero/asylum,hacklab-fi/asylum,hacklab-fi/asylum,rambo/asylum,HelsinkiHacklab/asylum
project/members/tests/test_application.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial test for web response" }, { "role": "assistant", "content": "import unittest\nfrom unittest import mock\nfrom aiohttp.web import Request, StreamResponse\nfrom aiohttp.protocol import Request as RequestImpl\n\n\nclass ...
python
new_file
1
1
apache-2.0
78f730b405c6e67988cdc9efab1aa5316c16849f
elastic-coders/aiohttp,jashandeep-sohi/aiohttp,mind1master/aiohttp,pfreixes/aiohttp,panda73111/aiohttp,AlexLisovoy/aiohttp,arthurdarcet/aiohttp,z2v/aiohttp,saghul/aiohttp,noplay/aiohttp,alexsdutton/aiohttp,Eyepea/aiohttp,jettify/aiohttp,AlexLisovoy/aiohttp,noplay/aiohttp,juliatem/aiohttp,jashandeep-sohi/aiohttp,arthurd...
tests/test_web_response.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Jaro-Winkler distance based on code on RosettaCode" }, { "role": "assistant", "content": "from __future__ import division\nfrom itertools import combinations\nfrom time import time\n\n\ndef jaro(s, t):\n s_len = len(s)\n ...
python
new_file
2
12
mit
aa292c2f180ffcfdfc55114750f22b6c8790a69b
studiawan/pygraphc
pygraphc/similarity/RosettaJaroWinkler.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add script to calculate recalls of track zip files." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame\nfrom vdetlib.utils.common import i...
python
new_file
2
0
mit
0c2fb46c977d8d8ee03d295fee8ddf37cee8cc06
myfavouritekk/TPN
tools/stats/zip_track_recall.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic tag testing script\n\nChange-Id: I55d17f33a931aaa7fcdf9b5833d5dedef40f9c8a" }, { "role": "assistant", "content": "import sys\nimport requests\n\nfrom wikibugs import Wikibugs2\nfrom channelfilter import ChannelFilter\ni...
python
new_file
1
0
mit
4249c6456ca21ad6bbec0eccdf66aef629deb511
wikimedia/labs-tools-wikibugs2,wikimedia/labs-tools-wikibugs2
test_tags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a PySide GUI window." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport sys\nfrom PySide import QtGui\n\napp = QtGui.QApplication(sys.argv)\n\nwid = QtGui.QWidget()\nwid.resize(250, 150)\nwid.setWindowT...
python
new_file
1
0
apache-2.0
0bca09339bb49e4540c5be8162e11ea3e8106200
mattdeckard/wherewithal
budget.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test script with only a few packages" }, { "role": "assistant", "content": "from dependencies import extract_package\nimport xmlrpc.client as xmlrpclib\n\nimport random\nclient = xmlrpclib.ServerProxy('http://pypi.python.org/...
python
new_file
1
0
mit
f804300765f036f375768e57e081b070a549a800
hdashnow/python-dependencies
test-extract-dependencies.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for treating Ordering as a collection" }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom ordering import Ordering\n\n\nclass TestOrderingAsCollection(TestCase):\n def setUp(self) -> None...
python
new_file
1
4
mit
09592b081a68f912bf9bb73c5269af8398c36f64
madman-bob/python-order-maintenance
tests/test_collection.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for appending entries to .gitignore.\n\nTBR=kjellander\n\nReview URL: https://webrtc-codereview.appspot.com/1629004\n\ngit-svn-id: 917f5d3ca488f358c4d40eaec14422cf392ccec9@4193 4adac7df-926f-26a2-2b94-8c16560cd09d" }, { "r...
python
new_file
1
4
bsd-3-clause
029c3f46731cd3a4746043833e912447ababf1a7
jchavanton/webrtc,lukeweber/webrtc-src-override,AOSPU/external_chromium_org_third_party_webrtc,lukeweber/webrtc-src-override,MIPS/external-chromium_org-third_party-webrtc,bpsinc-native/src_third_party_webrtc,krieger-od/webrtc,AOSPU/external_chromium_org_third_party_webrtc,AOSPU/external_chromium_org_third_party_webrtc,...
build/extra_gitignore.py
rejected_duplicate
Near-duplicate of sample 6073
true
[ { "role": "user", "content": "Write python code for the following: Add script to replace text" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# This Python 3 script replaces text in a file, in-place.\n\n# For Windows, use:\n#!python\n\nimport fileinput\nimport os\nimport sys\n\nde...
python
new_file
1
3
mit
644a678d3829513361fdc099d759ca964100f2e6
jleung51/scripts,jleung51/scripts,jleung51/scripts
text-files/replace-text.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to update cvsanaly databases" }, { "role": "assistant", "content": "from jiradb import *\n\nif __name__ == \"__main__\":\n log.setLevel(logging.DEBUG)\n # Add console log handler\n ch = logging.StreamHandler()...
python
new_file
18
0
mit
cafb83befb2cee459d44a1332e5fc7e57edf81a6
benmishkanian/ASF-JIRA-mine,benmishkanian/ASF-JIRA-mine,benmishkanian/ASF-JIRA-mine
updateGit.py
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Write python code for the following: Add tests for createaccount command" }, { "role": "assistant", "content": "from unittest.mock import ANY, Mock\n\nimport requests\nfrom django.core.management import call_command\n\nfrom saleor.account.models import ServiceAccoun...
python
new_file
1
1
bsd-3-clause
b41b2edde5ac7c786b5ce23adec116fe8311d5d7
mociepka/saleor,mociepka/saleor,mociepka/saleor
tests/test_account_service_account.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Split IP validation to a module" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport socket\n\ndef parse(ip):\n # parse and validate ip address\n try:\n socket.inet_pton(socket.AF_INET,ip)\n re...
python
new_file
3
3
apache-2.0
ef4aeb1e16245c76e7d10091b6fc8b0b289d635f
danclegg/py-sony
validateIp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add server tests for JOIN." }, { "role": "assistant", "content": "\"\"\"\nSection 3.2 of RFC 2812\n<https://tools.ietf.org/html/rfc2812#section-3.2>\n\"\"\"\n\nfrom irctest import cases\nfrom irctest.irc_utils.message_parser impo...
python
new_file
4
2
mit
469eedab89d22a1051e9d3f6f7f6c94ba946fb37
ProgVal/irctest
irctest/server_tests/test_channel_operations.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Write initial Bible book HTML parser\n\nThis parser will be utilized by the add_language utility so as to\nwork towards eliminating PyQuery as a dependency." }, { "role": "assistant", "content": "# utilities.book_parser\n# coding...
python
new_file
1
3
mit
0b3bfeb06a4594a2c188e623835c3a54262cca5d
caleb531/youversion-suggest,caleb531/youversion-suggest
utilities/book_parser.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to convert a GRLevelX colortable file to a dict data structure (and optionally boundaries for norm) for use with Matplotlib.\n\ngit-svn-id: acf0ef94bfce630b1a882387fc03ab8593ec6522@323 150532fb-1d5b-0410-a8ab-efec50f980d4" }, ...
python
new_file
10
0
bsd-3-clause
596f432eb7d4b3fa5d1bf5dec33cc882546e8233
ahill818/MetPy,ahaberlie/MetPy,ahaberlie/MetPy,Unidata/MetPy,Unidata/MetPy,jrleeman/MetPy,ShawnMurd/MetPy,dopplershift/MetPy,deeplycloudy/MetPy,jrleeman/MetPy,dopplershift/MetPy
trunk/metpy/vis/util/gr2_to_mpl_colortable.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add script to plot MS flag rate and acq fail rate" }, { "role": "assistant", "content": "from __future__ import division\n\nimport matplotlib.pyplot as plt\nfrom astropy.table import Table\nimport numpy as np\nfrom Ska.DBI import...
python
new_file
1
0
bsd-3-clause
81ade3168faa68ef43456cc35a122b9ef493a23e
sot/aca_stats,sot/aca_stats,sot/aca_stats
plot_ms_flag_acq_fails.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a dummy label printer server." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n# It does work with Python 2.7, too.\n\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\ntry:\n ...
python
new_file
1
3
mit
6f7afea4aed4dd77cd06e8dce66e9ed1e6390a00
chaosdorf/labello,chaosdorf/labello,chaosdorf/labello
dummyprint.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration file for new database model" }, { "role": "assistant", "content": "# Generated by Django 3.2.5 on 2021-10-12 23:24\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(m...
python
new_file
1
0
mit
a00dc9b0b1779ee8218917bca4c75823081b7854
inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree
InvenTree/part/migrations/0072_bomitemsubstitute.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add automatic leak detection python script in examples" }, { "role": "assistant", "content": "import sys\nimport rpc.ws\nimport edleak.api\nimport edleak.slice_runner\n\ndef usage():\n print('autodetect [period] [duration]')\n\...
python
new_file
1
2
mit
b514cf783d53a5c713911729422239c9b0f0ff99
edkit/edkit-agent,edkit/edkit-agent,edkit/edkit-agent
client/python/examples/edleak_autodetect.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for pygame sound play hook" }, { "role": "assistant", "content": "import pygame\nimport random\nfrom demodulate.cfg import *\nfrom gen_tone import *\n\nif __name__ == \"__main__\":\n\tpygame.mixer.pre_init(frequency = in...
python
new_file
5
0
mit
4175f27a03be52baa8b4245df96a03e6bbd22310
nickodell/morse-code
modulation_test.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add function to generate uniform addresses\n\nGiven maximum and minimum latitudes and longitudes as well as\nresolutions for latitude and longitude in degrees, this function\noutputs a .csv file with uniformly spaced latitude-longitude pairs...
python
new_file
1
3
mit
76be22f3d1aa86616ecd06a326344f24ff03adbe
opencleveland/RTAHeatMap,skorasaurus/RTAHeatMap
DataGeneration/GenerateUniformAddresses.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for dials.report on integrated data" }, { "role": "assistant", "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport procrunner\n\n\ndef test_report_integrated_data(dials_regre...
python
new_file
1
1
bsd-3-clause
8f3f9d79d8ce1960ad225e236ca3e11c72de28e0
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
test/command_line/test_report.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: :rocket: Add migration file (fix fields)" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11 on 2017-05-12 14:38\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations,...
python
new_file
1
0
mit
4dfc0c49cec86f3c03b90fa66e1fc9de2ac665e6
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
samples/migrations/0012_auto_20170512_1138.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test case for LSPI on gridworld." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n__author__ = \"William Dabney\"\n\nfrom Domains import GridWorld\nfrom Tools import Logger\nfrom Agents import LSPI\nfrom Representa...
python
new_file
1
1
bsd-3-clause
a962de79938c73b5c0e0459be7b82265bde76b40
silgon/rlpy,MDPvis/rlpy,imanolarrieta/RL,BerkeleyAutomation/rlpy,imanolarrieta/RL,MDPvis/rlpy,rlpy/rlpy,BerkeleyAutomation/rlpy,BerkeleyAutomation/rlpy,rlpy/rlpy,imanolarrieta/RL,silgon/rlpy,silgon/rlpy,MDPvis/rlpy,rlpy/rlpy
cases/gridworld/lspi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add border operation... Damn that was easy" }, { "role": "assistant", "content": "import slicer\nimport shapely.ops\nimport shapely.geometry\n\ndef border(sli, amount):\n cuts = [cut.polygon(True) for cut in sli.cuts]\n cut...
python
new_file
3
2
mit
05f87be4c85036c69abc9404acb824c58d71f101
meshulam/sly
slice_ops.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple recipe tagger experiment" }, { "role": "assistant", "content": "import nltk\nfrom nltk.classify import MaxentClassifier\n\n# Set up our training material in a nice dictionary.\ntraining = {\n 'ingredients': [\n ...
python
new_file
1
1
isc
bc0aa69adc5b1e290941c221ddd498d3fb92244e
recipi/recipi,recipi/recipi,recipi/recipi
test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example OOP python script" }, { "role": "assistant", "content": "#!/usr/bin/python\n#\n# Copyright 2016 BMC Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file e...
python
new_file
1
1
apache-2.0
7bace5ca301124f03d7ff98669ac08c0c32da55f
boundary/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,jdgwartney/tsi-lab,jdgwartney/tsi-lab,boundary/tsi-lab,boundary/tsi-lab
labs/lab-5/oop.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bottle\nfrom bottle import response, request\nimport json\nimport jedi\nimport logging\n\n\napp = bottle.Bottle( __name__ )\nlogger = logging.getLogger( __name__ )\n\n\n@app.get( '/healthy' )\ndef healthy():\n return _Json({})\n\n\n...
python
edit
1
2
apache-2.0
a83a48f6c9276b86c3cc13aeb000611036a6e3c4
micbou/JediHTTP,micbou/JediHTTP,vheon/JediHTTP,vheon/JediHTTP
jedihttp/handlers.py
rejected_duplicate
Near-duplicate of sample 132
true
[ { "role": "user", "content": "Write python code for the following: Add memoize function for python 2.x" }, { "role": "assistant", "content": "from functools import wraps\n\n\ndef memoize(obj):\n # This is taken from the Python Decorator Library on the official Python\n # wiki. https://wik...
python
new_file
1
2
mit
71b0af732e6d151a22cc0d0b28b55020780af8b6
ironman5366/W.I.L.L,ironman5366/W.I.L.L
ftools.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for exercise 2b of hw3" }, { "role": "assistant", "content": "import sympy\n\nx1, x2 = sympy.symbols('x1 x2')\nf = 8*x1 + 12*x2 + x1**2 -2*x2**2\n\ndf_dx1 = sympy.diff(f,x1)\ndf_dx2 = sympy.diff(f,x2)\nH = sympy.hess...
python
new_file
4
0
bsd-2-clause
b6b65f0ca7253af5325eafc6b19e7cfecda231b3
escorciav/amcs211,escorciav/amcs211
hw3/hw3_2b.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for glacier vault\n\nJust verifies the args are forwarded to layer1 properly." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserv...
python
new_file
1
1
mit
d35f2d7310c277625ea6e2e15b887ac9620696a7
felix-d/boto,lochiiconnectivity/boto,weebygames/boto,abridgett/boto,appneta/boto,alex/boto,j-carl/boto,appneta/boto,rayluo/boto,lochiiconnectivity/boto,weka-io/boto,jameslegg/boto,drbild/boto,alfredodeza/boto,ocadotechnology/boto,janslow/boto,disruptek/boto,campenberger/boto,trademob/boto,elainexmas/boto,israelbenatar/...
tests/unit/glacier/test_vault.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create list of random num" }, { "role": "assistant", "content": "#List of randoms\n\nimport random\nimport math\n\nnumList = []\n\nfor i in range(10):\n numList.append(random.randrange(1, 20))\n\nfor i in numList:\n print(\...
python
new_file
3
0
mit
d0c2ee2e0d848a586cc03ba5ac5da697b333ef32
JLJTECH/TutorialTesting
Misc/listOfRandomNum.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an example for dynamic RPC lookup." }, { "role": "assistant", "content": "import asyncio\nimport aiozmq\nimport aiozmq.rpc\n\n\nclass DynamicHandler(aiozmq.rpc.AttrHandler):\n\n def __init__(self, namespace=()):\n s...
python
new_file
1
2
bsd-2-clause
872dd45173e889db06e9b16105492c241f7badae
claws/aiozmq,aio-libs/aiozmq,asteven/aiozmq,MetaMemoryT/aiozmq
examples/rpc_dynamic.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for mach angle" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"Test Mach angle functions.\n\nTest data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.\n\"\"\"\n\n\nimport n...
python
new_file
1
1
mit
8aac73fdc26fd838c3f91ffa9bc58e25777a5179
iwarobots/TunnelDesign
properties/tests/test_mach_angle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for java mode" }, { "role": "assistant", "content": "import editor_manager\nimport editor_common\nimport curses\nimport curses.ascii\nimport keytab\nfrom ped_test_util import read_str,validate_screen,editor_test_suite,p...
python
new_file
9
5
mit
cd3f59026b9026d62537b38d4e9d70a740e88018
jpfxgood/ped
tests/test_java_mode.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add high level signing capabilities" }, { "role": "assistant", "content": "# Import libnacl libs\nimport libnacl.sign\n\n# Import pythonlibs\nimport unittest\n\n\nclass TestSigning(unittest.TestCase):\n '''\n '''\n def t...
python
new_file
1
1
apache-2.0
f03f976696077db4146ea78e0d0b1ef5767f00ca
cachedout/libnacl,saltstack/libnacl,johnttan/libnacl,mindw/libnacl,coinkite/libnacl,RaetProtocol/libnacl
tests/unit/test_sign.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create script that checks for dev and docs dependencies." }, { "role": "assistant", "content": "from __future__ import print_function\n\nimport sys\n\ntry:\n import colorama\n def blue(text): return \"%s%s%s\" % (colorama.F...
python
new_file
4
5
bsd-3-clause
bb7031385af7931f9e12a8987375f929bcfb6b5a
justacec/bokeh,schoolie/bokeh,aiguofer/bokeh,ChinaQuants/bokeh,lukebarnard1/bokeh,roxyboy/bokeh,jakirkham/bokeh,khkaminska/bokeh,srinathv/bokeh,msarahan/bokeh,Karel-van-de-Plassche/bokeh,CrazyGuo/bokeh,rothnic/bokeh,clairetang6/bokeh,quasiben/bokeh,birdsarah/bokeh,azjps/bokeh,mindriot101/bokeh,khkaminska/bokeh,timothyd...
scripts/devdeps.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add util convenience functions for accessing data without decorators" }, { "role": "assistant", "content": "from decorators import _backend\n\n\"\"\"Access limits and increment counts without using a decorator.\"\"\"\n\ndef get_l...
python
new_file
1
2
bsd-3-clause
545af0493cf08cb15d262f3a5333df6d1fce6848
SilentCircle/django-brake,SilentCircle/django-brake,skorokithakis/django-brake,skorokithakis/django-brake
brake/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add custom command to daily check scores" }, { "role": "assistant", "content": "from constance import config\nfrom datetime import datetime\nfrom django.core.management.base import BaseCommand\nfrom django.core.mail import EmailM...
python
new_file
2
8
apache-2.0
27788308891d9cd82da7782d62b5920ea7a54f80
belatrix/BackendAllStars
employees/management/commands/dailycheck.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Configuration file for ipython-notebook.\n\nc = get_config()\nc.NotebookApp.ip = '*'\nc.NotebookApp.open_browser = False\nc.NotebookApp.port = 8888\n\n# Whether to trust or not X-Scheme/X-...
python
edit
2
0
bsd-3-clause
d41005d14239a93237fb839084f029208b94539d
dietmarw/jupyter-docker-images,iamjakob/docker-demo-images,Zsailer/docker-jupyter-teaching,odewahn/docker-demo-images,jupyter/docker-demo-images,tanyaschlusser/docker-demo-images,iamjakob/docker-demo-images,Zsailer/docker-demo-images,CognitiveScale/docker-demo-images,Zsailer/docker-jupyter-teaching,ericdill/docker-demo...
common/profile_default/ipython_notebook_config.py
accepted
null
true