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: Write unit tests for _handle_long_response" }, { "role": "assistant", "content": "import context\n\nclass TestHandleLongResponse(context.slouch.testing.CommandTestCase):\n bot_class = context.TimerBot\n config = {'start_fmt...
python
new_file
1
2
mit
be17cf90b06a118d579c0211dd3bc2d45433fb2d
venmo/slouch
tests/test_handle_long_response.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a function to initialize the logging." }, { "role": "assistant", "content": "# encoding: utf-8\nfrom __future__ import print_function, absolute_import, unicode_literals, division\nimport logging\n\n\ndef init_logging(logger=N...
python
new_file
1
6
mit
91541cf82f435cb261d9debc85a2a8ae6dd74ab1
xgfone/xutils,xgfone/pycom
xutils/init_logging.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for 'version.\n\n! needs updating with every nightly, currentl" }, { "role": "assistant", "content": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Test the version here.\n#\n\nimport pytest\nfrom pycket.test.t...
python
new_file
3
1
mit
063899021158fe872745b335595b3094db9834d8
samth/pycket,krono/pycket,vishesh/pycket,magnusmorton/pycket,vishesh/pycket,vishesh/pycket,magnusmorton/pycket,cderici/pycket,pycket/pycket,pycket/pycket,cderici/pycket,krono/pycket,magnusmorton/pycket,krono/pycket,pycket/pycket,cderici/pycket,samth/pycket,samth/pycket
pycket/test/test_version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Feat: Create Average Movies rating etl\n\nExtracts data from 2 tables in the database, transforms the data and writes the result into another table in the same database" }, { "role": "assistant", "content": "import pyspark\n\nspa...
python
new_file
1
1
mit
fe37335645993ad10c9902aaaaf0ca2c53912d49
searchs/bigdatabox,searchs/bigdatabox
movies_avg_etl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract reads or alignments matching a barcode." }, { "role": "assistant", "content": "\"\"\"\ncode to extract a single cell from a set of alignments or reads marked via Valentine's umis \nrepository:\nhttps://githu...
python
new_file
3
4
mit
d308874989667f36da1638f22d6b2d7e823b5ebd
roryk/junkdrawer,roryk/junkdrawer
extract-barcode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [CHORE] Add whoami resource which decodes token and returns user info from token" }, { "role": "assistant", "content": "from flask import make_response, jsonify\nfrom flask_restful import Resource, reqparse, marshal, fields\nfro...
python
new_file
1
2
mit
3d027df005725cbc5dfbba0262b0c52c5392d7f0
brayoh/bucket-list-api
app/resources/check_token.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for Part, Pin, Bus and Net iterators." }, { "role": "assistant", "content": "import pytest\nfrom skidl import *\nfrom .setup_teardown import *\n\ndef test_iters_1():\n \"\"\"Test bus iterator.\"\"\"\n b_size = 4\n...
python
new_file
10
5
mit
048d0d7ce30b66af8bf48bcb0cb7f8bfb90fff0c
xesscorp/skidl,xesscorp/skidl
tests/test_iters.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract information for playbook files" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport os\nimport argparse\nimport re\nimport yaml\n\ndef get_revision_numb...
python
new_file
3
4
apache-2.0
ce28c5642c3ab543fc48e2f4f1f0b2f2a62890a2
ASaiM/framework,ASaiM/framework
src/misc/parse_tool_playbook_yaml.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Print The Message Happy New Year\n\n#Print The Message \"Happy new Year\" followed by the name of a person taken from a list for all people mentioned in the list." }, { "role": "assistant", "content": "# Print The Message \"Happy...
python
new_file
3
2
mit
f34dabd23faa7d50e507b829e576c1968bdc2d52
let42/python-course
src/iterations/exercise3.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple linear interpolation filling." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom __future__ import division\n\nimport climate\nimport lmj.cubes\nimport lmj.cubes.fill\nimport numpy as np\nimport panda...
python
new_file
4
2
mit
62c70b301ffc1e178c3bd54bd81291876b3883ea
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
analysis/03-fill-dropouts-linear.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add module for utilities related to xgboost" }, { "role": "assistant", "content": "\nxgb_to_sklearn = {\n 'eta': 'learning_rate',\n 'num_boost_round': 'n_estimators',\n 'alpha': 'reg_alpha',\n 'lambda': 'reg_lambda',\...
python
new_file
1
2
mit
98c1ff71d57749168f0ca35d97dbe77a8a67e082
rladeira/mltils
mltils/xgboost/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Insert a note at a specific position in a linked list" }, { "role": "assistant", "content": "# https://www.hackerrank.com/challenges/insert-a-node-at-a-specific-position-in-a-linked-list\n# Python 2\n\n\"\"\"\n Insert Node at a s...
python
new_file
5
4
mit
24c763ead7af8a669ff1055b3f352f513274a47f
arvinsim/hackerrank-solutions
all-domains/data-structures/linked-lists/insert-a-node-at-a-specific-positin-in-a-linked-list/solution.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for OpenStack config defaults\n\nSigned-off-by: Zack Cerza <<EMAIL>>" }, { "role": "assistant", "content": "from teuthology.config import config\n\n\nclass TestOpenStack(object):\n\n def setup(self):\n se...
python
new_file
1
1
mit
55f2325354724cfe8b90324038daf2c1acaa916a
SUSE/teuthology,dmick/teuthology,ceph/teuthology,SUSE/teuthology,dmick/teuthology,robbat2/teuthology,ktdreyer/teuthology,dmick/teuthology,caibo2014/teuthology,robbat2/teuthology,ktdreyer/teuthology,dreamhost/teuthology,SUSE/teuthology,caibo2014/teuthology,ceph/teuthology,dreamhost/teuthology
teuthology/openstack/test/test_config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utility to create administrative users." }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport rethinkdb as r\nfrom optparse import OptionParser\nimport sys\n\n\ndef create_group(conn):\n group = {}\n grou...
python
new_file
3
3
mit
102855b8d3dc7258c68a1f2bac3bb4c8953732dc
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/scripts/adminuser.py
rejected_duplicate
Near-duplicate of sample 5931
true
[ { "role": "user", "content": "Write python code for the following: Clean up db script (remove articles older than two days)." }, { "role": "assistant", "content": "from pymongo import MongoClient\nfrom fetch_stories import get_mongo_client, close_mongo_client\nfrom bson import ObjectId\nfrom dat...
python
new_file
3
1
mit
abe40e3c82ef1f351275a59b2e537f43530caa0c
hw3jung/Gucci,hw3jung/Gucci
app/cleanup_stories.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add apigateway integration test for PutIntegration" }, { "role": "assistant", "content": "# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Licen...
python
new_file
1
1
apache-2.0
c9e90ef5413bd560422e915d213df73ad88dffd7
boto/botocore,pplu/botocore
tests/integration/test_apigateway.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial draft of posterior models" }, { "role": "assistant", "content": "import scipy as sp\n\nfrom .utils import stochastic_optimization\n\nclass BolfiPosterior():\n\n def __init__(self, model, threshold, priors=None):\n ...
python
new_file
4
3
bsd-3-clause
67f5e754a5f90903e09a6a876d858d002c513f8a
lintusj1/elfi,lintusj1/elfi,elfi-dev/elfi,HIIT/elfi,elfi-dev/elfi
abcpy/posteriors.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Reset invalid default quotas for CloudServiceProjectLink [WAL-814]" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib.contenttypes import models as ct_mo...
python
new_file
3
3
mit
0c17398f68597eae175ad6a37945cf37e95e1809
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/structure/migrations/0050_reset_cloud_spl_quota_limits.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a server identity test" }, { "role": "assistant", "content": "import nose\nimport requests\n\nimport fixture\n\n\n@nose.with_setup(fixture.start_tangelo, fixture.stop_tangelo)\ndef test_server_identity():\n response = requ...
python
new_file
1
1
apache-2.0
372f4a988411e48a0c50cdc74fb2a7f4e5abf052
Kitware/tangelo,Kitware/tangelo,Kitware/tangelo
tests/server-identity.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for exit codes" }, { "role": "assistant", "content": "\"\"\"Check that the CLI returns the appropriate exit code.\"\"\"\n\nimport subprocess\n\n\ndef test_exit_code_demo():\n \"\"\"Ensure that linting the demo return...
python
new_file
1
2
bsd-3-clause
19db4647257617992e9b195828baf39907cc5db1
amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint
tests/test_exit_codes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an python example for stream testing" }, { "role": "assistant", "content": "\"\"\"Example program to show how to read a multi-channel time series from LSL.\"\"\"\n\nfrom pylsl import StreamInlet, resolve_stream\nimport sys\n#...
python
new_file
2
0
mit
2a3b89f42cde7088b304a3f224eaf52894f544ec
xfleckx/BeMoBI,xfleckx/BeMoBI
misc/utils/LSL_Tests/RecieveAppStatistics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test killing onitu during a transfer" }, { "role": "assistant", "content": "import os.path\nfrom os import unlink\n\nfrom utils.launcher import Launcher\nfrom utils.entries import Entries\nfrom utils.loop import CounterLoop, Bool...
python
new_file
1
1
mit
60068d4deeba541b9518579d6d8473c4300e189d
onitu/onitu,onitu/onitu,onitu/onitu
tests/functional/test_crash.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for utils experiment module" }, { "role": "assistant", "content": "from nose.tools import assert_equal, assert_false\n\nfrom os import remove\nfrom os.path import join\nfrom json import dump\n\nfrom cptm.utils.experimen...
python
new_file
7
2
apache-2.0
6ad72a0c624abdda0df8d5c49366bfc597a12340
NLeSC/cptm,NLeSC/cptm
cptm/tests/test_utils_experiment.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add new DemoStream example corresponding to the LSL4Unity Project" }, { "role": "assistant", "content": "\"\"\"Example program to show how to read a marker time series from LSL.\"\"\"\nimport sys\nsys.path.append('./pylsl') # hel...
python
new_file
5
0
mit
aab833a4a267ed46e83a5968e87d357ae3a5a12b
xfleckx/BeMoBI_Tools,xfleckx/BeMoBI_Tools,xfleckx/BeMoBI_Tools
utils/LSL_Tests/RecieveDemoStream.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: McARM: Write a silly Python script to compute some hard coded info from the\ngenerated ARM match table, which is substantially more efficient than dealing\nwith tblgen.\n\ngit-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@123252 91177308-...
python
new_file
3
12
apache-2.0
e6e5fbb671c2539f4f82c6eaca51fbf400133482
GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift...
utils/Target/ARM/analyze-match-table.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Monitor process using subprocess module" }, { "role": "assistant", "content": "import subprocess\n\n\"\"\" If the program is running \"ps -ef | grep program\" will return 2 or more rows \n(one with the program itself and the seco...
python
new_file
2
1
apache-2.0
2e0fbcb3ec1c2f0311d7ee4bbfeac33662f66089
PSJoshi/python_scripts
monitor_process.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to add china region" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.7 on 2017-06-24 21:52\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\n...
python
new_file
1
2
apache-2.0
ca9ed2756a12a2587f5b4d021597d2229196da50
prattl/teamfinder,prattl/teamfinder,prattl/teamfinder,prattl/teamfinder
api/common/migrations/0007_add_china_region.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for data integrity." }, { "role": "assistant", "content": "import ConfigParser\nimport csv\nimport unittest\n\nclass DataTest(unittest.TestCase):\n \n def setUp(self):\n config = ConfigParser.RawConfigP...
python
new_file
1
4
bsd-3-clause
2299343d8b10658cc6682b23dbf9be9d5fd290f6
c4fcm/WhatWeWatch-Analysis,c4fcm/WhatWeWatch-Analysis,c4fcm/WhatWeWatch-Analysis
tests/testdata.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool for clean pyc files\n\nSigned-off-by: xcgspring <<EMAIL>>" }, { "role": "assistant", "content": "\nimport re\nimport os\nimport sys\n\nprint(\"%s path\\n\" % sys.argv[0])\n\npath = sys.argv[1]\n\nfor root, dirs, files in...
python
new_file
1
0
apache-2.0
422390ff7eb4d97eaf0c5c1a1b250010ee766ec7
xcgspring/AXUI,xcgspring/AXUI,xcgspring/AXUI
tools/cleanPYC.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Access checking unit tests for SlotsTransferAdminPage." }, { "role": "assistant", "content": "# Copyright 2013 the Melange authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this f...
python
new_file
3
1
apache-2.0
56d14e7b0386588afd39f2413fafe0b9ba41806d
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
tests/app/soc/modules/gsoc/views/test_slot_transfer_admin.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test if we tried to commit with an empty message, it should raise a ValueError" }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom mock import MagicMock, patch\nfrom nose.tools import raises\n\nfrom pyoli...
python
new_file
1
1
bsd-2-clause
5ed7db70874f3ebfe9c946d38ccf12228dacac3a
PressLabs/pyolite,shawkinsl/pyolite
tests/test_git.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: DM-12166: Create Content Loader app to Herd/DM standards\n- Configure Pyinstaller" }, { "role": "assistant", "content": "hiddenimports = [\n 'numpy',\n 'pandas._libs.tslibs.timedeltas',\n 'pandas._libs.tslibs.nattype',\n...
python
new_file
1
0
apache-2.0
680b2cb1488f83aef5b45476e23bd93a90069872
FINRAOS/herd,FINRAOS/herd,FINRAOS/herd,FINRAOS/herd,FINRAOS/herd
herd-code/herd-tools/herd-content-loader/herdcl/hook-otags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 551. Student Attendance Record I\n\n551. Student Attendance Record I: https://leetcode.com/problems/student-attendance-record-i/" }, { "role": "assistant", "content": "class Solution(object):\n def checkRec...
python
new_file
1
6
apache-2.0
d3f68c385da4d2fa864ba748f41785be01c26c34
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/student-attendance-record-i.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Digital Outcomes and Specialists to frameworks\n\nThis commit checks to see if:\n- the framework exists in the enum before trying to add it\n- the framework exists in the table before trying to add\n\nThis means that it won’t fall over o...
python
new_file
3
2
mit
a7ccd7bc02476cfad85280ff1e742671453360de
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
migrations/versions/420_dos_is_coming.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\n\nfrom django.conf import settings\nfrom django.contrib.staticfiles.management.commands import runserver\nfrom django.contrib.staticfiles.handlers import StaticFilesHandler\nfrom django.http import Http404\nfrom django.views.st...
python
edit
1
3
bsd-2-clause
66b5a1089ed0ce2e615f889f35b5e39db91950ae
SoLoHiC/mezzanine,industrydive/mezzanine,jjz/mezzanine,Kniyl/mezzanine,stephenmcd/mezzanine,adrian-the-git/mezzanine,biomassives/mezzanine,emile2016/mezzanine,dekomote/mezzanine-modeltranslation-backport,Cicero-Zhao/mezzanine,nikolas/mezzanine,industrydive/mezzanine,fusionbox/mezzanine,saintbird/mezzanine,douglaskastle...
mezzanine/core/management/commands/runserver.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to create the player pitch weights." }, { "role": "assistant", "content": "import random\nfrom player.models import Player, Pitch, PlayerPitchWeight\n\n#TODO: Need to centralize this function call.\nrandom.seed(1234567...
python
new_file
3
0
mit
fc44d4463045e458796d13b3c97b34cf6ba47f61
isuraed/bluechip
bluechip/player/createpitchweights.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test `write_*` and `join_*` on bytes" }, { "role": "assistant", "content": "import re\nimport linesep\n\ntry:\n from StringIO import StringIO as BytesIO\nexcept ImportError:\n from io import BytesIO\n\n# Based on <htt...
python
new_file
3
3
mit
c5dfcffdf743e2c26b8dba6e3be8aee7d7aaa608
jwodder/linesep
test/test_join_bytes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add data migration for Audit's empty status" }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\n\"\"\"\nFix audit empty status...
python
new_file
1
1
apache-2.0
a30cd68e77242df4efadc75c4390dd8a3ce68612
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core
src/ggrc/migrations/versions/20170103101308_42b22b9ca859__fix_audit_empty_status.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a prototype for cached regex.compile()" }, { "role": "assistant", "content": "from regex import *\nfrom regex import compile as raw_compile\n\n\n_cache = {}\n\n\n# Wrap regex.compile up so we have a global cache\ndef compile(...
python
new_file
4
2
apache-2.0
dff1f9176d7ce77a242263bfc9a0760cd31f0585
Charcoal-SE/SmokeDetector,Charcoal-SE/SmokeDetector
regex_proxy.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Initialize multiple class setup; add remaining APIs" }, { "role": "assistant", "content": "from .endpoints import Endpoints\nfrom .helpers import get, scrape_filters\n\n\nclass Cobalt:\n def __init__(self, api_key=None):\n ...
python
new_file
1
3
mit
9bffe981c018213b87d015a20603c092567bbdf4
kshvmdn/cobalt-uoft-python
cobaltuoft/cobalt.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test joint refinement of 300 cspad images using Brewster 2018 methods.\n\nThis reproduces the last panel of Figure 3, refining the outer shell of the cspad. It tests auto_reduction, parameter fixing, constraints, SparseLevMar, and sauter_po...
python
new_file
1
4
bsd-3-clause
09112412a4814e3727def2547765546bf44c1e7d
dials/dials,dials/dials,dials/dials,dials/dials,dials/dials
test/algorithms/refinement/test_cspad_refinement.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python script to generate users" }, { "role": "assistant", "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\" \nAdds a sequential number of users into a test database\nwith username: newusern and password newuse...
python
new_file
null
null
mit
a801deeaa00e443b3c68c1fbcea1e6ff62d90082
veekaybee/intro-to-sql,veekaybee/intro-to-sql,veekaybee/intro-to-sql
python/addusers.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add management command to find domains impacted by 502 bug" }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom corehq.apps.domain.models import Domain\nimport csv\n\n\nclass Command(Ba...
python
new_file
1
8
bsd-3-clause
a0124a990b4afe0cd5fd3971bae1e43f417bc1b2
puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoft...
corehq/apps/domain/management/commands/find_secure_submission_image_domains.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new migration to load metrics fixtures" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.core.management import ca...
python
new_file
3
1
mit
9fdd671d9c0b91dc789ebf3b24226edb3e6a072a
sleepers-anonymous/zscore,sleepers-anonymous/zscore,sleepers-anonymous/zscore,sleepers-anonymous/zscore
sleep/migrations/0002_load_metrics.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an interface for eagerly evaluating command graph elements\n\nSetup a new interface that evaluates commands on the command graph as\nthey are issued. This is roughly the interface of the current Client." }, { "role": "assistant"...
python
new_file
1
1
mit
316a82c5465a13770404b6a302348f192618cd27
soulchainer/qtile,zordsdavini/qtile,ramnes/qtile,qtile/qtile,tych0/qtile,soulchainer/qtile,qtile/qtile,zordsdavini/qtile,ramnes/qtile,tych0/qtile
libqtile/command_interface.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add eval dispatch (copied from compyle)" }, { "role": "assistant", "content": "from keywords import *\nfrom reg import *\nfrom parse import parse\n\ndef evalExp():\n\texpr = parse(fetch(EXPR)) # make dedicated fetch_expr()?\n\t# ...
python
new_file
22
5
mit
278cd37ada508701896c2669a215365785f5a261
nickdrozd/ecio-lisp,nickdrozd/ecio-lisp
evalExp.py
rejected_lint
Too many lint violations: 22
true
[ { "role": "user", "content": "Write python code for the following: Add script to update giving and teams receiving" }, { "role": "assistant", "content": "import sys\n\nfrom gratipay import wireup\n\ndb = wireup.db(wireup.env())\n\nparticipants = db.all(\"\"\"\n SELECT p.*::participants\n ...
python
new_file
1
0
mit
f032556bf07b37f9544c71ecad7aed472021bc97
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 config command for setting the address of rf sensors." }, { "role": "assistant", "content": "import zmq\nimport time\nimport sys\nprint sys.argv[1:]\n\n# ZeroMQ Context\ncontext = zmq.Context()\n\nsock_live = context.socket(z...
python
new_file
2
0
bsd-3-clause
8632b60718fa353797ffc53281e57a37caf9452f
geekylou/sensor_net,geekylou/sensor_net,geekylou/sensor_net,geekylou/sensor_net,geekylou/sensor_net
set_address.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the parse method of the spider" }, { "role": "assistant", "content": "from webcomix.comic_spider import ComicSpider\n\n\ndef test_parse_yields_good_page(mocker):\n mock_response = mocker.patch('scrapy.http.Respon...
python
new_file
1
1
mit
c5a2167a63516c23390263408fcd2c9a4f654fc8
J-CPelletier/webcomix,J-CPelletier/webcomix,J-CPelletier/WebComicToCBZ
webcomix/tests/test_comic_spider.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create a class named \"CreateSpark\", which is to solove the problem of \"Cannot run multiple SparkContexts at once; existing SparkContext(app=spam-msg-classifier, master=local[8]) created by __init__\"" }, { "role": "assistant", ...
python
new_file
1
2
apache-2.0
724e86e31b6584012af5afe458e0823b9a2ca7ab
ysh329/spam-msg-classifier
myclass/class_create_spark.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new sanity test for demoproject views\n\nhelps boost test coverage but most importantly executes the code\npaths that were fixed in 9d9033ecd5a8592a12872293cdf6d710cebf894f" }, { "role": "assistant", "content": "from demoproj...
python
new_file
1
4
bsd-2-clause
816872186966186eb463d1fd45bea3a4c6f68e00
pgollakota/django-chartit,pgollakota/django-chartit,pgollakota/django-chartit
demoproject/tests_demo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a vim version of merge business hours" }, { "role": "assistant", "content": "from vim_turing_machine.machines.merge_business_hours.merge_business_hours import merge_business_hours_transitions\nfrom vim_turing_machine.vim_mach...
python
new_file
2
0
mit
20b450c4cd0ff9c57d894fa263056ff4cd2dbf07
ealter/vim_turing_machine,ealter/vim_turing_machine
vim_turing_machine/machines/merge_business_hours/vim_merge_business_hours.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add ref create api test" }, { "role": "assistant", "content": "async def test_create(spawn_client, test_random_alphanumeric, static_time):\n client = await spawn_client(authorize=True, permissions=[\"create_ref\"])\n\n data...
python
new_file
1
1
mit
ff98bdf9ce263648de784183ad5984864f9d387a
virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool
tests/api/test_refs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Himax motion detection example." }, { "role": "assistant", "content": "# Himax motion detection example.\n\nimport sensor, image, time, pyb\nfrom pyb import Pin, ExtInt\n\nsensor.reset()\nsensor.set_pixformat(sensor.GRAYSCALE...
python
new_file
3
1
mit
386baa36355b0e9378fff59fe768d1baa7e73fec
openmv/openmv,iabdalkader/openmv,openmv/openmv,iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv,kwagyeman/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv
scripts/examples/Arduino/Portenta-H7/21-Sensor-Control/himax_motion_detection.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration to ensure consistency on file keys.\n\nResolves https://github.com/CenterForOpenScience/openscienceframework.org/issues/1119" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"Fin...
python
new_file
8
4
apache-2.0
5c602a98098bdedeffc2b7359a4b3d8407cb1449
rdhyee/osf.io,amyshi188/osf.io,sloria/osf.io,zachjanicki/osf.io,mluo613/osf.io,asanfilippo7/osf.io,brandonPurvis/osf.io,doublebits/osf.io,mfraezz/osf.io,laurenrevere/osf.io,pattisdr/osf.io,erinspace/osf.io,bdyetton/prettychart,revanthkolli/osf.io,MerlinZhang/osf.io,caseyrygt/osf.io,TomHeatwole/osf.io,cldershem/osf.io,H...
scripts/migrate_inconsistent_file_keys.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add naive bayes SQL test." }, { "role": "assistant", "content": "import unittest\n\nfrom numpy import array\n\nimport Orange.classification.naive_bayes as nb\nfrom Orange.data.discretization import DiscretizeTable\nfrom Orange.da...
python
new_file
1
2
bsd-2-clause
cc19cdc3430df018e3a8fa63abaf796a897a475b
kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,kwikadi/orange3,cheral/orange3,qusp/orange3,marinkaz/orange3,cheral/orange3,qusp/orange3,kwikadi/orange3,kwikadi/orange3,cheral/orange3,marinkaz/orange3,qPCR4vir/orange3,qPCR4vir/orange3,kwikadi/orange3,marinkaz/orange3,cheral/orange3,qusp/orange3,qPCR4vir/orange3,qPCR4v...
Orange/tests/sql/test_naive_bayes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add code for stashing a single nuxeo image on s3." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport sys, os\nimport argparse\nimport logging\nimport json\nfrom s3stash.nxstashref_image ...
python
new_file
8
3
bsd-3-clause
f39a640a8d5bf7d4a5d80f94235d1fa7461bd4dc
barbarahui/nuxeo-calisphere,barbarahui/nuxeo-calisphere
s3stash/stash_single_image.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom cms.plugin_pool import plugin_pool\nfrom cms.plugin_base import CMSPluginBase\nfrom django.utils.translation import ugettext_lazy as _\nfrom cms.plugins.googlemap.models import GoogleMap\nfrom cms.plugins.googlemap.settings import GOOG...
python
edit
1
2
bsd-3-clause
6be70d01bdf58389db2a6adc4035f82669d02a61
cyberintruder/django-cms,chmberl/django-cms,owers19856/django-cms,jproffitt/django-cms,vstoykov/django-cms,MagicSolutions/django-cms,isotoma/django-cms,jproffitt/django-cms,chkir/django-cms,stefanw/django-cms,jeffreylu9/django-cms,divio/django-cms,Vegasvikk/django-cms,jrief/django-cms,pbs/django-cms,farhaadila/django-c...
cms/plugins/googlemap/cms_plugins.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add answer to leetcode rotate list" }, { "role": "assistant", "content": "# coding=utf-8\n\"\"\"\nchimera.leetcode_rotate_list\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nGiven a list, rotate the list to the right by k places, where k is\nn...
python
new_file
2
4
mit
736093f945ff53c4fe6d9d8d2e0c4afc28d9ace3
air-upc/chimera,air-upc/chimera
chimera/py/leetcode_rotate_list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example script for the newly added mixed_diffusivity" }, { "role": "assistant", "content": "import openpnm as op\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\n# Get Deff w/o including Knudsen effect\nspacing = 1.0...
python
new_file
1
0
mit
1e7421878e90949abc4f6fac5835bd27b472d2b6
TomTranter/OpenPNM,PMEAL/OpenPNM
example_Knudsen.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move buckling calcs to continuum_analysis" }, { "role": "assistant", "content": "from abaqus_model import *\r\nfrom abaqus_postproc import *\r\nfrom continuum_analysis import *\r\nfrom rayleighritz import RayleighRitzDiscrete\r\n...
python
new_file
7
0
mit
959aecd612f66eee22e179f985227dbb6e63202a
dashdotrobot/bike-wheel-calc
__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add test suite for bqlmath." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2016, MIT Probabilistic Computing Project\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\...
python
new_file
1
11
apache-2.0
e3b7b9e5f8ca1be061c71c764fd62d6aeed3fd43
probcomp/bayeslite,probcomp/bayeslite
tests/test_bqlmath.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: [AIRFLOW-1495] Add TaskInstance index on job_id\n\nColumn job_id is unindexed in TaskInstance, it was\nused as\ndefault sort column in TaskInstanceView.\n\nThis commit adds the required migration to add the\nindex on\ntask_instance.job_id on...
python
new_file
3
1
apache-2.0
e1772c008d607a2545ddaa05508b1a74473be0ec
asnir/airflow,janczak10/incubator-airflow,KL-WLCR/incubator-airflow,airbnb/airflow,Acehaidrey/incubator-airflow,jhsenjaliya/incubator-airflow,airbnb/airflow,adamhaney/airflow,mrares/incubator-airflow,Fokko/incubator-airflow,skudriashev/incubator-airflow,mistercrunch/airflow,mtagle/airflow,OpringaoDoTurno/airflow,dhuang...
airflow/migrations/versions/7171349d4c73_add_ti_job_id_index.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 393. UTF-8 Validation\n\n393. UTF-8 Validation: https://leetcode.com/problems/utf-8-validation/\n\nApproach:\n Observe the first item remaining in each step. The value will be added\n 1 << step either the remaining ...
python
new_file
2
11
apache-2.0
9f7bd49350b0d1b8a8986b28db75a5b369bf7bb5
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/utf-8-validation.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Add producer written in Python" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport pika\n\n# Host in which RabbitMQ is running.\nHOST = 'localhost'\n\n# Name of the queue.\nQUEUE = 'pages'\n\n# The message to sen...
python
new_file
1
0
apache-2.0
295823afe17cedaa1934afbcd19d955974089c63
jovannypcg/rabbitmq_usage,jovannypcg/rabbitmq_usage
python/send.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for internal gregorian functions." }, { "role": "assistant", "content": "import unittest\n\nfrom calexicon.internal.gregorian import is_gregorian_leap_year\n\n\nclass TestGregorian(unittest.TestCase):\n def test_is_g...
python
new_file
1
1
apache-2.0
2aa7a6260d9d5a74ee81677be2bd5f97774f9116
jwg4/calexicon,jwg4/qual
calexicon/internal/tests/test_gregorian.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import OrderedDict\nfrom urllib.parse import urlparse\nimport re\n\nfrom flask import render_template, redirect, url_for, request, abort, jsonify,\\\n flash, Markup, session\nfrom flask.views import View\nfrom flask....
python
edit
1
1
bsd-2-clause
c15c4a663c257cad6763cf92c50b7ad706017c74
eskwire/evesrp,eskwire/evesrp,paxswill/evesrp,eskwire/evesrp,paxswill/evesrp,paxswill/evesrp,eskwire/evesrp
evesrp/views/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: migrations: Remove disallowed characters from stream names.\n\ncharacter_is_printable logic is taken from similar work by @madrix01" }, { "role": "assistant", "content": "import unicodedata\n\nfrom django.db import connection, mi...
python
new_file
1
10
apache-2.0
8affb8e4a3744e604b88157a918ef690203cbfa8
zulip/zulip,andersk/zulip,zulip/zulip,rht/zulip,rht/zulip,andersk/zulip,kou/zulip,zulip/zulip,andersk/zulip,rht/zulip,zulip/zulip,rht/zulip,andersk/zulip,andersk/zulip,zulip/zulip,zulip/zulip,rht/zulip,kou/zulip,kou/zulip,zulip/zulip,kou/zulip,kou/zulip,kou/zulip,andersk/zulip,rht/zulip,rht/zulip,kou/zulip,andersk/zuli...
zerver/migrations/0375_invalid_characters_in_stream_names.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test two windows drawing GL with different contexts.\n\n--HG--\nextra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%4045" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n'''\n'''\n\n__docfor...
python
new_file
26
2
bsd-3-clause
e0b84a97e4c7ad5dcef336080657a884cff603fc
infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore
tests/gl_test_2.py
rejected_lint
Too many lint violations: 26
true
[ { "role": "user", "content": "Write python code for the following: Add basic smoke tests for doc generation" }, { "role": "assistant", "content": "# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You...
python
new_file
1
1
apache-2.0
d637cbe9c904fb0f0b67fbc10f66db299d153f4e
boto/boto3
tests/functional/test_docs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to clean up all FD phone and fax numbers." }, { "role": "assistant", "content": "from django.core.management.base import BaseCommand\nfrom firecares.firestation.models import FireDepartment\nfrom phonenumber_field.mode...
python
new_file
3
6
mit
b0577ce3b8b162ce3702430b189905f9beaae8d5
FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares,FireCARES/firecares
firecares/firestation/management/commands/cleanup_phonenumbers.py
rejected_duplicate
Near-duplicate of sample 7699
true
[ { "role": "user", "content": "Write python code for the following: Add a few simple pytest tests\n\n- These tests should eventually provide unit tests for all classes" }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport pytest\nfrom datetime import datetime\nfrom mlbgame import s...
python
new_file
3
1
mit
c6ded12845f25e305789840e1687bfee83e82be5
zachpanz88/mlbgame,panzarino/mlbgame
tests/test_standings.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for path join" }, { "role": "assistant", "content": "from gypsy.path import _join\n\ndef test_join():\n assert _join('s3://', 'bucket', 'prefix') == 's3://bucket/prefix'\n assert _join('s3://bucket', 'prefix') == ...
python
new_file
1
1
mit
7d128f2386fd3bbcbff1a407018f9ab9ed580810
tesera/pygypsy,tesera/pygypsy
tests/test_path.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a TensorFlow Probability sample" }, { "role": "assistant", "content": "#!/usr/bin/python3\r\n# coding: utf-8\r\n\r\n'''\r\nImplementation of the article below with TensorFlow Probability\r\n'Bayesian Methods for Hackers'\r\nh...
python
new_file
3
1
mit
3ce048f8c0346c30173b52a691bd18ece1cbc13d
zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend
scripts/stock_price/tough_question_tfp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for bandit.core.issue\n\nBrings coverage for bandit.core.issue to 100%.\n\nChange-Id: I67dfbb64cb276d1c16b28e4bbc6b50c8254bd3f1" }, { "role": "assistant", "content": "# -*- coding:utf-8 -*-\n#\n# Copyright 2015 Hew...
python
new_file
1
2
apache-2.0
86d8f0fd48ccb577a8300362ea9d181e63d2fa5d
stackforge/bandit,chair6/bandit,pombredanne/bandit,pombredanne/bandit,stackforge/bandit
tests/unit/core/test_issue.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python to make vv h5 file" }, { "role": "assistant", "content": "import tables\n\nvv_desc = dict(\nobsid=tables.IntCol(pos=0),\nrevision=tables.IntCol(pos=1),\nmost_recent=tables.IntCol(pos=2),\nslot=tables.IntCol(pos=3),\nty...
python
new_file
1
0
bsd-3-clause
c9b3bd8309d3d1448823787160021a8688e8f3c1
sot/mica,sot/mica
vv_h5_setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Backup of some unused code" }, { "role": "assistant", "content": "import argparse\nimport itertools\n\nif __name__ == '__main__':\n\tparser = argparse.ArgumentParser(description='Generate the cartesian product of two ID files')\n...
python
new_file
2
0
mit
2e821ab48542c89ac41ebc17036bddc164506a22
jakelever/knowledgediscovery,jakelever/knowledgediscovery,jakelever/knowledgediscovery,jakelever/knowledgediscovery
combine_data/cartesianProductOfIDs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add partial benchmarking file for gala" }, { "role": "assistant", "content": "import os\n\nfrom gala import imio, features, agglo, classify\n\n\nrundir = os.path.dirname(__file__)\ndd = os.path.abspath(os.path.join(rundir, '../te...
python
new_file
1
1
bsd-3-clause
76ce9117ed92a743734cd5ba7e209617a7664ad1
janelia-flyem/gala,jni/gala
benchmarks/bench_gala.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 406. Queue Reconstruction by Height\n\n406. Queue Reconstruction by Height: https://leetcode.com/problems/queue-reconstruction-by-height/" }, { "role": "assistant", "content": "from collections import defaultd...
python
new_file
6
5
apache-2.0
94d40dfcf574d61df7def99a43d5b9fa0c75e244
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/queue-reconstruction-by-height.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Migrate Req/Ass to have verified/finished date" }, { "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 <se...
python
new_file
1
1
apache-2.0
645efb8ffcc3c9a3e41db2619430ffcb7a6d570f
andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,prasannav7/ggrc-core,prasannav...
src/ggrc/migrations/versions/20160314140338_4fd36860d196_add_finished_date_to_request_and_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create Python object detection script." }, { "role": "assistant", "content": "'''\nCreated on Feb 28, 2014\n\n@author: Vance Zuo\n'''\n\nimport numpy\nimport cv2\n\nclass ObjectDetector(object):\n '''\n classdocs\n '''\n...
python
new_file
4
1
mit
37baa669ed1e00fabddd33478fa75f4047075ce3
vancezuo/cs473-vision
cs473vision/ObjectDetector.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add tests for logging of rest requests" }, { "role": "assistant", "content": "import datetime\nimport pytest\nfrom girder import auditLogger\n\n\n@pytest.fixture\ndef recordModel():\n from girder.plugins.audit_logs import Reco...
python
new_file
1
2
apache-2.0
197fb6ec004c0bf47ec7e2fd25b75564a3ecf6c4
RafaelPalomar/girder,manthey/girder,manthey/girder,Kitware/girder,girder/girder,kotfic/girder,jbeezley/girder,manthey/girder,Kitware/girder,data-exp-lab/girder,jbeezley/girder,data-exp-lab/girder,Kitware/girder,RafaelPalomar/girder,kotfic/girder,girder/girder,RafaelPalomar/girder,kotfic/girder,manthey/girder,RafaelPalo...
test/audit_logs/test_audit_log.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add an ABC for all sub classes of `DataController`" }, { "role": "assistant", "content": "from typing import Dict, Optional\n\nfrom data_controller.enums import Medium, Site\nfrom utils.helpers import await_func\n\n\nclass DataCo...
python
new_file
1
5
mit
3ef1e39d476a8b3e41ff0b06dcd6f700c083682d
MaT1g3R/Roboragi
data_controller/abc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add utils to allow multiclass classification." }, { "role": "assistant", "content": "from __future__ import division\n\nimport numpy as np\n\nfrom sklearn.multiclass import OneVsOneClassifier\nfrom sklearn.multiclass import _fit_...
python
new_file
2
3
mit
a1820a0e5f9bd891b20f70ab68dfd4bb385047a0
davidgasquez/kaggle-airbnb
utils/multiclassification.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: tests: Add basic test for OrderedDict.\n\nMostly to have coverage of newly added code in map.c." }, { "role": "assistant", "content": "try:\n from collections import OrderedDict\nexcept ImportError:\n try:\n from _co...
python
new_file
1
0
mit
d48035b06b952b9ac4d95897d08de50d5977bf9f
selste/micropython,mgyenik/micropython,swegener/micropython,dhylands/micropython,feilongfl/micropython,neilh10/micropython,jmarcelino/pycom-micropython,paul-xxx/micropython,tdautc19841202/micropython,blmorris/micropython,ceramos/micropython,Timmenem/micropython,noahchense/micropython,tdautc19841202/micropython,emfcamp/...
tests/basics/ordereddict1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add shootout attempt item definition" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport uuid\n\nfrom db.common import Base\nfrom db.specific_event import SpecificEvent\nfrom db.player ...
python
new_file
1
4
mit
785a5767ee3482fddee37327b4bf3edeed94ff46
leaffan/pynhldb
db/shootout_attempt.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a unit test for KaggleKernelCredentials." }, { "role": "assistant", "content": "import unittest\n\nfrom kaggle_secrets import GcpTarget\nfrom kaggle_gcp import KaggleKernelCredentials\n\nclass TestKaggleKernelCredentials(unit...
python
new_file
1
1
apache-2.0
125c75ea246c2d95f0addbb31b2d82dde588f21d
Kaggle/docker-python,Kaggle/docker-python
tests/test_kaggle_kernel_credentials.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Bring table test coverage to 100%" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport nose.tools as nose\nfrom table import Table\n\n\ndef test_init_default():\n \"\"\"should initialize table with required ...
python
new_file
1
1
mit
fbbaa3fc5b99eed88e039c232f129aaeab0a6f54
caleb531/cache-simulator
tests/test_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python script to extract" }, { "role": "assistant", "content": "import json\nf=open('raw.json')\ng=open('extracted1','a')\ni=1\nfor s in f:\n j=json.loads(s)\n j=j['text']\n h=json.dumps(j)\n number=str(i) + ':' +...
python
new_file
1
0
mit
d9e11e2c5f14cee0ead87ced9afe85bdd299ab35
sukanyapatra/Disatweet
extract_text.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for BMI version of storm" }, { "role": "assistant", "content": "#! /usr/bin/env python\n#\n# Tests for the BMI version of `storm`.\n#\n# Call with:\n# $ nosetests -sv\n#\n# Mark Piper (<EMAIL>)\n\nfrom nose.tools...
python
new_file
5
1
mit
6d3f6951d846c50fcc1ff011f9129a4e1e3f7de1
mdpiper/storm,csdms-contrib/storm,mdpiper/storm,csdms-contrib/storm
testing/test_storm_bmi.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add basic first tests for new report driven by \"events\"" }, { "role": "assistant", "content": "from django.test import TestCase\n\nfrom deep_collector.core import RelatedObjectsCollector\n\nfrom .factories import BaseModelFacto...
python
new_file
1
1
bsd-3-clause
ad7f9f785f9a4a4494127a9b2196e1fc64c9f3de
iwoca/django-deep-collector
tests/test_report.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for our more general views." }, { "role": "assistant", "content": "import pytest\n\nfrom django.core.urlresolvers import reverse\n\n\ndef test_site_view(client):\n response = client.get(reverse('site-home'))\n as...
python
new_file
3
2
apache-2.0
e56a9781f4e7e8042c29c9e54966659c87c5c05c
hello-base/web,hello-base/web,hello-base/web,hello-base/web
tests/test_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement channel mode +s (or what's left of it)" }, { "role": "assistant", "content": "from txircd.modbase import Mode\n\nclass SecretMode(Mode):\n\tdef listOutput(self, command, data):\n\t\tif command != \"LIST\":\n\t\t\treturn...
python
new_file
null
null
bsd-3-clause
1f9240f0b954afa9f587f468872c3e1e215f2eaa
Heufneutje/txircd,DesertBus/txircd,ElementalAlchemist/txircd
txircd/modules/cmode_s.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add python script to get ECC608 Public Key\n\nChange-Id: I0826503e9b8d1bb5de3f83b82d0083754a7e2b8f" }, { "role": "assistant", "content": "#!/usr/bin/env python3\nimport base64\nimport ctypes\nimport sys\n\nCRYPTO_ADDRESS_DICT = {...
python
new_file
1
10
apache-2.0
1043acdfe324e02bc2a8629ef8a47d6ae9befd7c
google/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian,google/aiyprojects-raspbian
src/aiy/_drivers/_ecc608_pubkey.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Revert \"Remove pgjsonb returner unit tests\"\n\nThis reverts commit ab4a670ff22878d5115f408baf0304a0ba3ec994." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\ntests.unit.returners.pgjsonb_test\n~~~~~~~~~~~~~~...
python
new_file
1
1
apache-2.0
086371f56748da9fb68acc4aaa10094b6cf24fcb
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/returners/test_pgjsonb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add draft test module for linter" }, { "role": "assistant", "content": "import logging\nimport pytest\nfrom mappyfile.validator import Validator\n\n\ndef validate(d):\n v = Validator()\n return v.validate(d)\n\n\ndef get_fr...
python
new_file
1
3
mit
8660c7fda8cc7290fadeed7a39f06218087d9401
geographika/mappyfile,geographika/mappyfile
tests/test_linter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a hex dump utility class." }, { "role": "assistant", "content": "# This hack by: Raymond Hettinger\nclass hexdumper:\n \"\"\"Given a byte array, turn it into a string. hex bytes to stdout.\"\"\"\n def __init__(self):\n\...
python
new_file
6
4
bsd-3-clause
722b1d55c771e628ba82bbd5b8f8f5de047112af
gvnn3/PCS,gvnn3/PCS
tests/hexdumper.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add migration for Comment schema upgrade. ...\n\nThis allows Comment to masquerade as an epistle and is required to use\nthe last several commits. I forgot to push the migration out. :p" }, { "role": "assistant", "content": "from...
python
new_file
10
1
apache-2.0
a70490e52bde05d2afc6ea59416a50e11119d060
sjuxax/raggregate
raggregate/rg_migrations/versions/002_Add_metadata_to_Comment_to_allow_it_to_masquerade_as_epistle.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add dependency installer for linux and mac osx" }, { "role": "assistant", "content": "import platform\nimport subprocess\n\n\"\"\"\nThis is a standalone script that installs the required dependencies to run. It\n*should* be platf...
python
new_file
1
3
mit
4683fc67d5171d8bb0391ac45f587fbc3e3c97fc
GCI-2015-GPW/DevAssist
install_dependencies.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add valid directory cleaner helper test\n\ngit-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1563517 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: a23ba7556854cb30faaa0dfc19fdbcc6cb67382c" }, { "role": ...
python
new_file
1
1
apache-2.0
dbfa14401c0b50eb1a3cac413652cb975ee9d41f
huikyole/climate,agoodm/climate,MJJoyce/climate,MBoustani/climate,agoodm/climate,MJJoyce/climate,kwhitehall/climate,MBoustani/climate,lewismc/climate,agoodm/climate,pwcberry/climate,MBoustani/climate,Omkar20895/climate,MJJoyce/climate,agoodm/climate,kwhitehall/climate,lewismc/climate,pwcberry/climate,huikyole/climate,r...
ocw-ui/backend/tests/test_directory_helpers.py
accepted
null
true