messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Write python code for the following: Add WmataError class and start of Wmata class.\n\nStarts module code. Error class is added, and the main class, Wmata, is added,\nwith the default class variables and the init function added." }, { "role": "assistant", "content"...
python
new_file
5
2
mit
876365a7f19a3786db15dc7debbd2686fa5d02ef
ExperimentMonty/py3-wmata
wmata.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for the precomputed_io module" }, { "role": "assistant", "content": "# Copyright (c) 2018 CEA\n# Author: Yann Leprince <<EMAIL>>\n#\n# This software is made available under the MIT licence, see LICENCE.txt.\n\nimpo...
python
new_file
1
1
mit
ecbc691307c43ad06d7f539f008fccbff690d538
HumanBrainProject/neuroglancer-scripts
unit_tests/test_precomputed_io.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add some tests for hil_client" }, { "role": "assistant", "content": "\"\"\"\nGeneral info about these tests\n\nThe tests assusme that the nodes are in the <from_project> which is set to be the\n\"slurm\" project, since that is wh...
python
new_file
3
1
mit
c4ee87fa4398eca3193331888086cb437436722e
mghpcc-projects/user_level_slurm_reservations,mghpcc-projects/user_level_slurm_reservations
test/hil_client_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to calculate perplexity results\n\nAdded a script that calculates perplexity at intervals for different\nconfigurations of nTopics and save the results to csv" }, { "role": "assistant", "content": "import pandas as pd\...
python
new_file
1
0
apache-2.0
11111351f67afd3dc8ee2ec904a9cea595d68fb3
NLeSC/cptm,NLeSC/cptm
DilipadTopicModelling/experiment_calculate_perplexity.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for type-checking chain" }, { "role": "assistant", "content": "from thinc.api import chain, ReLu, MaxPool, Softmax, chain\n\n# This example should be run with mypy. This is an example of type-level checking \n# for ne...
python
new_file
4
0
mit
4c60f8f643fe05b69ca475242d8c46b02697d5d4
spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc
examples/howto/type_chain.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a memory test script" }, { "role": "assistant", "content": "#!/usr/bin/env python2.7\n# -*- mode: python; coding: utf-8 -*-\n\nfrom __future__ import print_function, division, absolute_import\n\nfrom memory_profiler import pr...
python
new_file
1
2
bsd-2-clause
84ae279c0044e63e00c7d21823c3159e34c73d03
HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata
scripts/uvfits_memtest.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add interactive script to get papers from Mendeley API" }, { "role": "assistant", "content": "###\n# Copyright 2015-2020, Institute for Systems Biology\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# yo...
python
new_file
1
6
apache-2.0
cb98b4a1580e4976de375722012483bf51ef9254
isb-cgc/ISB-CGC-Webapp,isb-cgc/ISB-CGC-Webapp,isb-cgc/ISB-CGC-Webapp,isb-cgc/ISB-CGC-Webapp
scripts/get_mendeley_papers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add dummy Keras inputs builder" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\"\"\"Generate fake NN files to test the lightweight classes\"\"\"\n\nimport argparse\nimport json\nimport h5py\nimport numpy as np\n...
python
new_file
1
3
mit
0115d088061595fe6c6f8589d0599d1b8e970813
lwtnn/lwtnn,jwsmithers/lwtnn,jwsmithers/lwtnn,jwsmithers/lwtnn,lwtnn/lwtnn,lwtnn/lwtnn
scripts/lwtnn-build-dummy-inputs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove monthly_billing table from the database" }, { "role": "assistant", "content": "\"\"\"\n\nRevision ID: 0209_remove_monthly_billing\nRevises: 84c3b6eb16b3\nCreate Date: 2018-07-27 14:46:30.109811\n\n\"\"\"\nfrom alembic impo...
python
new_file
1
1
mit
885ed1e8e3256352d2fde771bef57997809c3c1e
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0209_remove_monthly_billing_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial framerate webcam test structure" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport qrtools, gi, os\ngi.require_version('Gtk', '3.0')\ngi.require_version('Gst', '1.0')\nfrom gi.repository import Gtk...
python
new_file
4
3
mit
c6c87e1aafa6b8a4f7929c491398574921417bd4
daveol/Fedora-Test-Laptop,daveol/Fedora-Test-Laptop
tests/webcam_framerate.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add demo on how to write unstructured point meshes in Vtk." }, { "role": "assistant", "content": "import numpy as np\nfrom pyvisfile.vtk import ( \n UnstructuredGrid, DataArray,\n AppendedDataXMLGenerator,\n VTK_VERTEX, ...
python
new_file
1
0
mit
287cd795c92a86ee16a623230d0c59732a2f767d
inducer/pyvisfile,inducer/pyvisfile,inducer/pyvisfile
examples/vtk-unstructured-points.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write script to convert PMF-based result to expected value" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport argparse\n\nimport numpy as np\nimport pandas as pd\n\n\nif __name__ == '__main__':\n parser = a...
python
new_file
1
0
mit
985f23ee5e107c647d5f5e5b245c3fb7ff2d411b
kemskems/otdet
bin/to_expected.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add functions for storing/getting blogs and posts" }, { "role": "assistant", "content": "\"\"\"\npyblogit.database_handler\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis module handles the connection and manipulation of the local database.\n...
python
new_file
null
null
mit
72b701652271178e08d9cccd088d24177d4a2fc6
jamalmoir/pyblogit
pyblogit/database_handler.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add a script to generate all known codes and their decoding" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport lsi_decode_loginfo as loginfo\n\ndef generate_values(data):\n title = data[0]\n mask = data[...
python
new_file
4
4
mit
b522fed0a1ca2570b8652ddb64b8c847d5964d11
baruch/lsi_decode_loginfo
list_all_codes.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add input handling for ssh connections" }, { "role": "assistant", "content": "from threading import Thread\n\nclass Juliet_Input (Thread):\n def __init(self):\n Thread.__init(self)\n \n def run(self):\n whi...
python
new_file
2
3
bsd-2-clause
71a55a1252ef87629f10e48c1041416c34742ea7
halfbro/juliet
modules/juliet_input.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a base regressions package\n\nThis contains only various imports / definitions that will be useful\nin the child modules and should be able to be used via\n'from .. import *' without issues." }, { "role": "assistant", "conten...
python
new_file
4
0
isc
731bc1308e94cdb341511618ba5739f6fd37b0b7
jhumphry/regressions
regressions/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add an example of a blocking tcp server\n\nThe example implements a basic telnet server." }, { "role": "assistant", "content": "\"\"\"\nA Simple example for testing the SimpleServer Class. A simple telnet server.\nIt is for study...
python
new_file
1
5
mit
3f6ec1a3e9bcdd2dee714e74fac7215b19ae432f
facundovictor/non-blocking-socket-samples
blocking_socket.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check to make sure the input file is sorted" }, { "role": "assistant", "content": "import sys\n\nprev_val = 0\nprev_val2 = 0\ncounter = 0\n\nfor line in sys.stdin:\n parts = line.split()\n curr_val = int(parts[0])\n curr...
python
new_file
2
0
mit
701f6a06b8405620905a67b47c5702c100a1447a
hms-dbmi/clodius,hms-dbmi/clodius
scripts/check_sorted.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add code for pulling pitcher stats for specified date range" }, { "role": "assistant", "content": "import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\ndef get_soup(start_dt, end_dt):\n\t# get most recent standi...
python
new_file
1
6
mit
cc3b29aaa2c0ffa3cde6b901bf4bdf3ce3fb4345
jldbc/pybaseball
pybaseball/league_pitching_stats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the IFTTT campaign success server plugin" }, { "role": "assistant", "content": "import collections\n\nimport king_phisher.plugins as plugin_opts\nimport king_phisher.server.plugins as plugins\nimport king_phisher.server.signa...
python
new_file
9
5
bsd-3-clause
03de607d14805779ed9653b65a5bd5cee3525903
securestate/king-phisher-plugins,zeroSteiner/king-phisher-plugins,securestate/king-phisher-plugins,wolfthefallen/king-phisher-plugins,zeroSteiner/king-phisher-plugins,wolfthefallen/king-phisher-plugins
server/ifttt_on_campaign_success.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add migration for request notification types" }, { "role": "assistant", "content": "\n\"\"\"Add request notification types\n\nRevision ID: 50c374901d42\nRevises: 4e989ef86619\nCreate Date: 2016-03-04 12:45:23.024224\n\n\"\"\"\n\n...
python
new_file
1
1
apache-2.0
1b36f7e837f6c15cab838edfaf6464bef0c88c6d
NejcZupec/ggrc-core,prasannav7/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,edofic/ggrc-core,prasannav7/ggrc-core,selahssea/ggrc-core,prasannav7/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,prasannav...
src/ggrc/migrations/versions/20160304124523_50c374901d42_add_request_notification_types.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add problem 1 sum muliples of 3 or 5 python solution" }, { "role": "assistant", "content": "#\n'''\nProject Euler - Problem 1 - Multiples of 3 and 5\nhttps://projecteuler.net/problem=1\n\nIf we list all the natural numbers below ...
python
new_file
1
7
mit
b647416b719c9f0b2534c13a67d3396fefaada47
ChrisFreeman/project-euler
p001_multiples_of_3_and_5.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement a genre string parser" }, { "role": "assistant", "content": "import re\nfrom django.utils.encoding import smart_str\n\nclass GenreParser:\n @staticmethod\n def parse(genre):\n genre = smart_str(genre).lower...
python
new_file
1
11
mit
726316b50209dfc5f6a8f6373cd7e3f53e267bb3
6/GeoDJ,6/GeoDJ
geodj/genre_parser.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write python code for the following: Adjust phases to make campaign non-editable" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nimport datetime\nfrom south.db import db\nfrom south.v2 import DataMigration\nfrom django.db import models\n\nfrom bluebo...
python
new_file
5
1
bsd-3-clause
121a80669b4b50665a7baafd3434cb3e574087f4
jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle
bluebottle/bb_projects/migrations/0004_adjust_phases.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add a new sub example regarding custom ACL modification" }, { "role": "assistant", "content": "# Copyright 2016 Netfishers\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exce...
python
new_file
null
null
apache-2.0
fefcc9ab57b5dc818690c4febc4250fffb0f9543
AlainMoretti/cli-wrapper
subs/modify_acl.py
rejected_code_smell
Internal duplication: ~55% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write python code for the following: Add tests for mixin order\n\nTest that mixin order on models does not hide any eager queries." }, { "role": "assistant", "content": "# Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under...
python
new_file
1
6
apache-2.0
73f75483156056b61f3b6bec4fe2f09522c2c34a
AleksNeStu/ggrc-core,j0gurt/ggrc-core,j0gurt/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,josthkko/ggrc-core,sel...
test/integration/ggrc/models/test_eager_query.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for comment notification type" }, { "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 <see L...
python
new_file
1
2
apache-2.0
0c2f07fabb94698b8cf1b42a4f671ad0cd5e365f
edofic/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,prasannav7/ggrc-core,josthkko/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,NejcZupec/ggrc-core,j0gurt/ggrc-core...
src/ggrc/migrations/versions/20160321011353_3914dbf78dc1_add_comment_notification_type.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add back a filesystem backend for testing and development" }, { "role": "assistant", "content": "import os\nimport json\n\nfrom scrapi.processing.base import BaseProcessor\n\n\nclass StorageProcessor(BaseProcessor):\n NAME = '...
python
new_file
3
2
apache-2.0
d94123ba898032e7837aa8a2fd0fe585ed81e2d5
ostwald/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,fabianvf/scrapi,icereval/scrapi,erinspace/scrapi,felliott/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,fabianvf/scrapi,alexgarciac/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi
scrapi/processing/storage.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to get public registrations for staff members\n\n[skip ci]" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Get public registrations for staff members.\n\n python -m scripts.staff_public_regs\n\...
python
new_file
1
7
apache-2.0
b2d60408688cc1bf27842d8744d1048a64b00e94
KAsante95/osf.io,jolene-esposito/osf.io,HarryRybacki/osf.io,jinluyuan/osf.io,leb2dg/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,amyshi188/osf.io,caseyrygt/osf.io,haoyuchen1992/osf.io,jinluyuan/osf.io,laurenrevere/osf.io,SSJohns/osf.io,lyndsysimon/osf.io,HalcyonChimera/osf.io,amyshi188/osf.io,cslzchen/osf.io,zamatt...
scripts/staff_public_regs.py
rejected_duplicate
Near-duplicate of sample 3473
true
[ { "role": "user", "content": "Write python code for the following: Move win32 audio experiment to trunk." }, { "role": "assistant", "content": "#!/usr/bin/python\r\n# $Id:$\r\n\r\n# Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU.\r\n# Caveats:\r\n# - Requires a filena...
python
new_file
3
0
bsd-3-clause
d5c7d429be93a2b2de4a1c09bd73f72c02664499
adamlwgriffiths/Pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet,niklaskorz/pyglet,niklaskorz/pyglet,adamlwgriffiths/Pyglet,seeminglee/pyglet64,adamlwgriffiths/Pyglet,seeminglee/pyglet64,niklaskorz/pyglet
experimental/directshow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for committee subscriptions page" }, { "role": "assistant", "content": "import datetime\nfrom tests import PMGLiveServerTestCase\nfrom tests.fixtures import dbfixture, HouseData, CommitteeData\n\nTHIS_YEAR = datetime.dat...
python
new_file
5
1
apache-2.0
6ed99163b10209566a0575a9a67d1ab2ad552fd9
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
tests/views/test_committee_subscriptions_page.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add skeleton for new python scripts." }, { "role": "assistant", "content": "#!/usr/bin/python\n\n\"\"\"Usage:\n <SCRIPT_NAME> [--log-level=<log-level>]\n\n-h --help\n Show this message.\n-v --version\n Show version.\n--l...
python
new_file
3
2
mit
0a0d31077746e69bf5acc7d90fa388e121544339
lweasel/misc_bioinf,lweasel/misc_bioinf,lweasel/misc_bioinf
script_skeleton.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for config generation" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Copyright 2018 New Vector Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file ...
python
new_file
1
1
apache-2.0
1b4bf232b9fd348a94b8bc4e9c851ed5b6d8e801
matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse
tests/config/test_room_directory.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 645. Set Mismatch\n\n645. Set Mismatch: https://leetcode.com/problems/set-mismatch/" }, { "role": "assistant", "content": "class Solution(object):\n def findErrorNums(self, nums):\n \"\"\"\n :...
python
new_file
1
6
apache-2.0
dcc5065c7cc4cc167affcbf906eaf81e73fa6d3e
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/set-mismatch.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for base Handler." }, { "role": "assistant", "content": "# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nfrom mock import Mock\n\nfrom bark.log import Log...
python
new_file
1
2
apache-2.0
46be255fd0cfaeb2352f2f49b4ec5996a804768d
4degrees/sawmill,4degrees/mill
test/unit/handler/test_base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom telemetry import benchmark\nfrom telemetry.unittest import tab_test_...
python
edit
1
1
bsd-3-clause
f9bdf777a13404ba25e0e8cdf99a3554320529c9
jaruba/chromium.src,Chilledheart/chromium,dednal/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu120...
tools/telemetry/telemetry/core/backends/chrome/inspector_memory_unittest.py
rejected_duplicate
Near-duplicate of sample 3347
true
[ { "role": "user", "content": "Write python code for the following: Add dictionary mapping abbreviations to station names" }, { "role": "assistant", "content": "station_map = {\n '12th': '12th St. Oakland City Center',\n '16th': '16th St. Mission (SF)',\n '19th': '19th St. Oakland',\n ...
python
new_file
1
0
mit
8cc020949f1d7eb9c66121a7d3a762738cb44c2c
ganemone/SublimeBart,ganemone/SublimeBart,ganemone/SublimeBart,ganemone/SublimeBart
src/station_map.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add first file Only read a .docx until now" }, { "role": "assistant", "content": "from docx import Document\n\nif __name__ == \"__main__\":\n if sys.args[0] == 0:\n print(\"Must specify file!\")\n return\n #op...
python
new_file
4
0
apache-2.0
500df3f340d7782c759634529ae40ce56f7bec3e
Psidium/NTL
plag.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add basic infrastructure for rest API" }, { "role": "assistant", "content": "#!../env/bin/python\nfrom flask import Flask, jsonify\n\napp = Flask(__name__)\n\n@app.route('/hoot/api/v1.0/', methods=['GET'])\ndef index():\n retu...
python
new_file
1
1
mit
a627fa4c681bdd9de323750c3ab3f2cb0d5fca86
CatalystOfNostalgia/hoot,CatalystOfNostalgia/hoot
server/hoot/app.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add snip code for http.cookies" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Sep 14 20:49:34 2016\n\n@author: troon\n\"\"\"\n\nimport BaseHTTPServer, SimpleHTTPServer\nfrom http.cookies im...
python
new_file
7
6
cc0-1.0
fc97a838d54417cb063a7757040ff279f298d0bb
JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology,JohnTroony/Scriptology
cookie_skel.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add error formatting tests for httperror" }, { "role": "assistant", "content": "import unittest\n\nfrom fleece import httperror\n\n\nclass HTTPErrorTests(unittest.TestCase):\n \"\"\"Tests for :class:`fleece.httperror.HTTPError...
python
new_file
1
1
apache-2.0
45dc85ded5a766191cd58d76a16470fc063d6e70
racker/fleece,racker/fleece
tests/test_httperror.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [Core] Create a quick script to train a COBE brain from a folder of formatted IRC logs" }, { "role": "assistant", "content": "from __future__ import unicode_literals\nimport argparse\nimport os\nfrom cobe.brain import Brain\n\nif...
python
new_file
2
0
mit
5c269bfeb517b70cfcb8fd730bf3eb983a5515dc
HubbeKing/Hubbot_Twisted
markov_batch_learn.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for some util functions.\n\n\ngit-svn-id: 353d90d4d8d13dcb4e0402680a9155a727f61a5a@1082063 13f79535-47bb-0310-9956-ffa450edef68" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Licensed to the Apache So...
python
new_file
1
1
apache-2.0
08636c9740b3103fd05c81791f43faeb29920305
aleGpereira/libcloud,sahildua2305/libcloud,pquentin/libcloud,Verizon/libcloud,wuyuewen/libcloud,aleGpereira/libcloud,iPlantCollaborativeOpenSource/libcloud,Verizon/libcloud,Jc2k/libcloud,Cloud-Elasticity-Services/as-libcloud,aviweit/libcloud,vongazman/libcloud,techhat/libcloud,ZuluPro/libcloud,pquentin/libcloud,illfeld...
test/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test. This continues to need pytz and tzlocal." }, { "role": "assistant", "content": "import datetime\n\nimport pytz\nimport tzlocal\n\nfrom caldav.elements.cdav import _to_utc_date_string\n\nSOMEWHERE_REMOTE = pytz.timezone(...
python
new_file
1
1
apache-2.0
04740a33ab8b4d43cda71668ff7027ac7e5982d5
python-caldav/caldav
tests/test_cdav.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for extension loading and unloading" }, { "role": "assistant", "content": "import os.path\n\nimport nose.tools as nt\n\nimport IPython.testing.tools as tt\nfrom IPython.utils.syspathcontext import prepended_to_syspath\nf...
python
new_file
4
1
bsd-3-clause
ddc3e45f5f84e5574090ee79875039e401864a49
ipython/ipython,ipython/ipython
IPython/core/tests/test_extension.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add migration for replace location with country and city" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-08-04 14:47\nfrom __future__ import unicode_literals\n\nfrom django.db i...
python
new_file
1
0
bsd-3-clause
4c4891f24c0e5b093d3a9fcb0de86609b01a69c3
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
fellowms/migrations/0053_auto_20160804_1447.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write Pytac script to write all readback pvs to file" }, { "role": "assistant", "content": "import pytac.load_csv\nimport pytac.epics\n\n\ndef write_data_to_file(file_name, data):\n fin = open(file_name, 'w')\n for row in d...
python
new_file
1
3
apache-2.0
b1f964e9725a18014de17d454bb733b7ad43cd38
razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects,razvanvasile/Work-Mini-Projects
pytac/write_to_file_readback_pvs.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command for importing Holvi Invoices and Orders\n\nInvoices may have multiple payments, abstracttransaction is generated\nfor each payment line.\n\nOrders are paid in one go (they're from the webshop), one transaction\nis gene...
python
new_file
1
5
mit
d1b7ed5f705c8e0935778636ade00a7452e2ea7f
rambo/asylum,rambo/asylum,hacklab-fi/asylum,jautero/asylum,HelsinkiHacklab/asylum,jautero/asylum,rambo/asylum,rambo/asylum,jautero/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,hacklab-fi/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum
project/holviapp/management/commands/import_holvidata.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add sample on veh handle setup in remote process" }, { "role": "assistant", "content": "import windows\nimport windows.test\n\nfrom windows.generated_def.winstructs import *\n\n#c = windows.test.pop_calc_64()\n\n\nc = windows.tes...
python
new_file
3
0
bsd-3-clause
ee62d6a972e5af72fc9a5e2e36d1a7822a1703af
hakril/PythonForWindows
samples/remote_veh_segv.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple demo of piglow - lighting arms" }, { "role": "assistant", "content": "from piglow import PiGlow\nimport time\n\ndef brighten_arm( arm ):\n\n for i in range( 1, 10 ):\n piglow.arm( arm, i )\n time.sleep...
python
new_file
1
2
mit
0083a6fadad8bb0f202bab2af183a10f09e19459
claremacrae/raspi_code,claremacrae/raspi_code,claremacrae/raspi_code
piglow/demo_piglow.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add PyUnit for deep feature extraction of a LeNet model with mxnet." }, { "role": "assistant", "content": "from __future__ import print_function\nimport sys, os\nsys.path.insert(1, os.path.join(\"..\",\"..\",\"..\"))\nimport h2o\...
python
new_file
1
2
apache-2.0
16f29bfc832a64accd6ef67c2140f70ea07f2f05
michalkurka/h2o-3,mathemage/h2o-3,h2oai/h2o-3,h2oai/h2o-3,spennihana/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,mathemage/h2o-3,spennihana/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3,spennihana/h2o-3,michalkurka/h2o-3,spennihana/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,spennihana/h2o-3,mathemage...
h2o-py/tests/testdir_algos/deepwater/pyunit_lenet_deepwater_feature_extraction.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add exercice The Paranoid Android" }, { "role": "assistant", "content": "class Elevator(object):\n def __init__(self, floor, pos):\n super(Elevator, self).__init__()\n self.floor = floor\n self.pos = pos\n...
python
new_file
4
3
mit
5ee78767ebaa5c1bbceb7ce2c82fa6687169b0c2
AntoineAugusti/katas,AntoineAugusti/katas,AntoineAugusti/katas
codingame/medium/paranoid_android.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add management command to update corpus logic hashes" }, { "role": "assistant", "content": "import logging\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom plyara import YaraParser\nfrom rules.models imp...
python
new_file
3
2
apache-2.0
b3f8be5b6ab7e4e713004447a3cfbda743d80394
PUNCH-Cyber/YaraGuardian,PUNCH-Cyber/YaraGuardian,PUNCH-Cyber/YaraGuardian,PUNCH-Cyber/YaraGuardian
rules/management/commands/CorpusLogicUpdate.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test case for task.info.json files\n\nEnsures all tasks have .info.json file and have a valid structure." }, { "role": "assistant", "content": "import os\nimport sys\nimport glob\nimport json\nimport unittest\nsys.path.append(os....
python
new_file
1
3
apache-2.0
114ea6c10658d2c199c68637d04bdd968fcc4452
voyagersearch/voyager-py,voyagersearch/voyager-py
voyager_tasks/test/test_info_files.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Python script for questions linting" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\n\nimport os\nimport sys\nimport json\nimport collections\nimport unicodedata\n\n\nTEXT_FIELD = \"t\"\nOPTIONS_FIELD = \"o\"\...
python
new_file
1
12
bsd-3-clause
52a8a1cd093f8bdbaf0abfc85eff2d3682e24b12
PavloKapyshin/rusk,PavloKapyshin/rusk,PavloKapyshin/rusk
scripts/check-questions.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nAUTHOR = u'IPython development team and Enthought, Inc.'\nSITENAME = u'DistArray'\nSITEURL = ''\n\nPATH = 'content'\n\nTIMEZONE = 'America/Chicago'...
python
edit
1
0
bsd-3-clause
3dc9204c80f2f7be5f82200c059a6a62f02bf6c1
enthought/distarray,enthought/distarray,RaoUmer/distarray,RaoUmer/distarray
www/pelicanconf.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for project model" }, { "role": "assistant", "content": "from server.models import Project\nfrom server.tests.helpers import fixtures, FlaskTestCase\n\n\nclass TestProject(FlaskTestCase):\n @fixtures('single_project....
python
new_file
8
1
mit
6c4edaefe30905f62b885b931a1c5ca6d65cd220
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
server/tests/models/test_project.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Implement simple gaussian process regression." }, { "role": "assistant", "content": "import csv\nimport sys\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport sklearn\nimport sklearn.gaussian_process.kernels\n\n\nkern...
python
new_file
3
5
bsd-3-clause
ce9ac96a6f1e57ebbce162b7e097675c23f1f2f4
alasdairtran/mclearn,chengsoonong/mclass-sky,alasdairtran/mclearn,alasdairtran/mclearn,chengsoonong/mclass-sky,chengsoonong/mclass-sky,alasdairtran/mclearn,chengsoonong/mclass-sky
projects/jakub/gaussian_processes/gaussian_process_regression.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests directory to sourceterm package and start test module." }, { "role": "assistant", "content": "'''\nCreated on 25 Aug 2010\n\n@author: ith\n'''\nimport unittest\n\n\nclass Test(unittest.TestCase):\n\n\n def testName(s...
python
new_file
1
1
bsd-3-clause
3a662b5820ea90c0cd63116a610ede25558c5562
ihuston/pyflation,ihuston/pyflation
sourceterm/tests/test_srcequations.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for quick sort" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom quick_sort import quick_sort\n\n\ndef test_sorted():\n my_list = list(range(100))\n quick_sort(my_list)\n assert my_list == li...
python
new_file
1
1
mit
265bedb193f8615f99daa63c921b572408921605
nbeck90/data_structures_2
test_quick_sort.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests of CSVFile and StdOut recorders" }, { "role": "assistant", "content": "import pytest\nfrom plumbium.processresult import record, pipeline, call\nfrom plumbium.recorders import CSVFile, StdOut\nfrom collections import Or...
python
new_file
1
1
mit
86cae13f7dde04f7031ae111e596f2d8c03d5420
jstutters/Plumbium
tests/test_recorders.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic functionality to query the (horrible) website." }, { "role": "assistant", "content": "from datetime import date\nimport bs4\nimport itertools as it\nimport re\nimport requests\n\n\ndef grouper(iterable, n, fillvalue=Non...
python
new_file
1
3
mit
c4015ed868b65ce5c7ed660c84e252a950294642
kdungs/R1D2
r1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for box migration script" }, { "role": "assistant", "content": "from nose.tools import *\n\nfrom scripts.box.migrate_to_external_account import do_migration, get_targets\n\nfrom framework.auth import Auth\n\nfrom tests.b...
python
new_file
11
2
apache-2.0
fa4b4de37b38f0ff800bbd2ac007ab6521720258
ticklemepierce/osf.io,haoyuchen1992/osf.io,Nesiehr/osf.io,wearpants/osf.io,zachjanicki/osf.io,acshi/osf.io,chennan47/osf.io,ZobairAlijan/osf.io,cwisecarver/osf.io,njantrania/osf.io,TomHeatwole/osf.io,chrisseto/osf.io,felliott/osf.io,erinspace/osf.io,TomBaxter/osf.io,abought/osf.io,jnayak1/osf.io,rdhyee/osf.io,aaxelb/os...
scripts/tests/test_box_migrate_to_external_account.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write python code for the following: Integrate switch 10 and introduce couplings." }, { "role": "assistant", "content": "#!/usr/bin/python3\n#\n# start pytrain\n#\nimport os\nimport sys\n\nMYDIR = os.path.dirname(sys.argv[0])\n\nos.system(MYDIR+\"/run.sh\")\nif len(...
python
new_file
1
0
apache-2.0
724dc6ff77e9494e9519cb507cf43644034d5ca6
wglas85/pytrain,wglas85/pytrain,wglas85/pytrain,wglas85/pytrain
run_2.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set up first test level, started to create constraints" }, { "role": "assistant", "content": "from constraint import *\n\n# Empty space is 0\n# Brick is a 1\n# Block is a 2\n# West facing player - 3\n# East facing player - 4\n# D...
python
new_file
3
0
mit
4bd9e4db4af430ae34ed87f695d72ae99ba5bb70
joeYeager/BlockDudeSolver
solver.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple perf measuring tool" }, { "role": "assistant", "content": "#!/usr/bin/env python2\n\nimport sys\nimport subprocess\n\n\"\"\"\nUsage:\n ./ref.py ./main -B 1000000 -t 3 -T 31\n\"\"\"\n\nsystem = subprocess.check_outpu...
python
new_file
2
0
mit
2fb5557aed14d047d1ae120f0ff91c0e355d779f
cemeyer/xkcd-skein-brute,cemeyer/xkcd-skein-brute,cemeyer/xkcd-skein-brute
ref.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add one liner to add ability to print a normal distribution with mean zero and varience one" }, { "role": "assistant", "content": "#!/usr/bin/env python3 \n\n#Copyright 2015 BRendan Perrine\n\nimport random \n\nrandom.seed()\n\np...
python
new_file
1
0
mit
76d2386bfa9e61ac17bca396384772ae70fb4563
ianorlin/pyrandtoys
gauss.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\nimport calendarium\n\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except IOError:\n return ''\n\n\nsetup(\n ...
python
edit
1
2
mit
9fb6d0ea74aacc77f06d36805760270854e53eba
claudep/django-calendarium,claudep/django-calendarium,bitmazk/django-calendarium,bitmazk/django-calendarium,claudep/django-calendarium,bitmazk/django-calendarium,claudep/django-calendarium
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python script to check big-O notation" }, { "role": "assistant", "content": "import timeit\nimport random\n\nfor i in range (10000, 100000, 20000):\n t = timeit.Timer(\"random.randrange(%d) in x\"%i, \"from __main__ import r...
python
new_file
2
0
mit
95fdd1f96ad4d54fb75ea134ea2195808d4c1116
prabhugs/scripts,prabhugs/scripts
bigO.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Remove redundant subscription fields from user model." }, { "role": "assistant", "content": "\"\"\"remove redundant user subscription fields\n\nRevision ID: 3fc4c97dc6bd\nRevises: 3d723944025f\nCreate Date: 2015-01-27 18:11:15.82...
python
new_file
1
1
apache-2.0
aee2363f6c6995a124b3c0ad358e83dc815ea808
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
alembic/versions/3fc4c97dc6bd_remove_redundant_user_subscription_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a management command to create realm administrators.\n\n(imported from commit ab2dd580a206f29086c0d5a4e717c1bfd65a7435)" }, { "role": "assistant", "content": "from __future__ import absolute_import\n\nimport sys\nfrom optpars...
python
new_file
null
null
apache-2.0
f22abf2b8a31d9621a891191db84364edb167390
wdaher/zulip,xuxiao/zulip,showell/zulip,jonesgithub/zulip,levixie/zulip,Gabriel0402/zulip,ryansnowboarder/zulip,zacps/zulip,rht/zulip,suxinde2009/zulip,hustlzp/zulip,bowlofstew/zulip,sharmaeklavya2/zulip,seapasulli/zulip,SmartPeople/zulip,dxq-git/zulip,sup95/zulip,dhcrzf/zulip,timabbott/zulip,tommyip/zulip,zacps/zulip,...
zephyr/management/commands/knight.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Add script for comparing test vectors.\n\nNote: does not yet include the `plot_pulse_files_compare` method because that\nneeds some cleanup." }, { "role": "assistant", "content": "import os\nimport sys\nimport glob\nimport h5py\n...
python
new_file
6
6
apache-2.0
7b0005eb7d2b2e05a9fd833a2771573aec69c199
BBN-Q/QGL,BBN-Q/QGL
tests/compare_test_data.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add about page functional test\n\nTest the about page navigation and expected content" }, { "role": "assistant", "content": "from .base import FunctionalTest\n\n\nclass AboutPageTest(FunctionalTest):\n\n def test_about_page_na...
python
new_file
1
1
bsd-3-clause
514f744bc39129a241e704e4ea282befcd31b1b7
andela-kndungu/compshop,kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop
tests/functional/test_about_page.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for generate_admin_metadata helper function" }, { "role": "assistant", "content": "\"\"\"Test the generate_admin_metadata helper function.\"\"\"\n\ndef test_generate_admin_metadata():\n import dtoolcore\n from...
python
new_file
1
1
mit
e0786c5798b35b911193de1b4e3694b7ad8cad76
JIC-CSB/dtoolcore
tests/test_generate_admin_metadata.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a fake source code so you can embed it in the example" }, { "role": "assistant", "content": "# Get the hash \n# 01/07/2017\n# Melissa Hoffman\n\n# Get the current repo\n\nimport os\nimport subprocess \n\ntestdir='/Users/melis...
python
new_file
3
2
mit
21bee0c5b92d03a4803baf237c460223308ebb9f
MetaPlot/MetaPlot
examples/fakecode.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add existing python file for performing a very crude analysis on a set of lsl files (as taken from an untarred OAR, for example)" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport re\nimport sys\n\n\"\"\" Taken fr...
python
new_file
6
3
bsd-3-clause
410b354cb0e72ba741439a337aba4ef4c3cda8b1
justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools
src/ossa.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: examples/bench: Add a new benchmark - readline server" }, { "role": "assistant", "content": "import argparse\nimport asyncio\nimport gc\nimport uvloop\nimport os.path\nimport socket as socket_module\n\nfrom socket import *\n\n\nP...
python
new_file
6
6
apache-2.0
71d8ef8a872656df8a2319032855cb2b5ea5ed4b
MagicStack/uvloop,1st1/uvloop,MagicStack/uvloop
examples/bench/rlserver.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add script to assist in packaging." }, { "role": "assistant", "content": "\"\"\"This tool sets up a distribution of the software by automating\nseveral tasks that need to be done.\n\nThe directory should be in pristine condition ...
python
new_file
1
0
mit
b044ba312b126cb17bf906b1984e7b407509fcc6
davidalber/Geneagrapher,davidalber/Geneagrapher
Geneagrapher/makedist.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple implementation for a pre-commit hook\n\nThis will be routed via the main entryway, mothermayi" }, { "role": "assistant", "content": "import mothermayi.entryway\nimport mothermayi.git\n\ndef handle_plugins(entries):\n ...
python
new_file
3
2
mit
a0c23d3fc448f916ffdd668a2daf56408dd9c0c0
EliRibble/mothermayi
mothermayi/pre_commit.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add US state capitals from vega-lite." }, { "role": "assistant", "content": "\"\"\"\nU.S. state capitals overlayed on a map of the U.S\n================================================-\nThis is a geographic visualization that sh...
python
new_file
1
0
bsd-3-clause
a78d93dbc23d832ca5eaae6535a45bfa478e4e56
altair-viz/altair,ellisonbg/altair,jakevdp/altair
altair/vegalite/v2/examples/us_state_capitals.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights count visitors problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Count Visitors Problem\n\n\nclass Counter(object):\n def __init__(self, value):\n self.value = value...
python
new_file
1
3
mit
002e903c978a30f27ed24316bb85958e5c69a259
HKuz/Test_Code
CodeFights/countVisitors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# coding=utf-8\n################################################################################\n\nfrom test import CollectorTestCase\nfrom test import get_collector_config\nfrom test import unittest\nfrom mock import pa...
python
edit
1
1
mit
eb87d38a65620c7e4a716dca8a8b9488b3a338d3
tellapart/Diamond,socialwareinc/Diamond,python-diamond/Diamond,works-mobile/Diamond,tuenti/Diamond,Ensighten/Diamond,TinLe/Diamond,sebbrandt87/Diamond,actmd/Diamond,Nihn/Diamond-1,EzyInsights/Diamond,bmhatfield/Diamond,zoidbergwill/Diamond,jaingaurav/Diamond,krbaker/Diamond,TAKEALOT/Diamond,thardie/Diamond,thardie/Diam...
src/collectors/numa/test/testnuma.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights fibonacci list problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Fibonacci List Problem\n\nfrom functools import reduce\n\n\ndef fibonacciList(n):\n return [[0] * x for x i...
python
new_file
1
3
mit
f53aef9fdcd01fdb8607984e38b4fb8c5813aacf
HKuz/Test_Code
CodeFights/fibonacciList.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the management views" }, { "role": "assistant", "content": "import unittest\nfrom pyramid import testing\n\nclass ManagementViewsTest(unittest.TestCase):\n def setUp(self):\n self.config = testing.setUp()\...
python
new_file
1
1
isc
412828bea81f5aad917188881c1e7e4d6ce52400
usingnamespace/usingnamespace
usingnamespace/tests/test_views_management.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for inplace subset" }, { "role": "assistant", "content": "import numpy as np\nimport pytest\nfrom sklearn.utils.testing import (\n assert_array_equal\n)\nfrom scipy import sparse\n\nfrom anndata.tests.helpers import ...
python
new_file
5
4
bsd-3-clause
16615d7794b127e9752b1a2b0bd8e70adfb0954c
theislab/anndata
anndata/tests/test_inplace_subset.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: test: Add tests for mpi4py.dl module" }, { "role": "assistant", "content": "from mpi4py import dl\nimport mpiunittest as unittest\nimport sys\nimport os\n\nclass TestDL(unittest.TestCase):\n\n def testDL1(self):\n if sy...
python
new_file
1
2
bsd-2-clause
b66b02be95e7b0c36a9ced53b07d91298190ca4a
mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py
test/test_dl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: DOC: Add a script that uses the Flickr API." }, { "role": "assistant", "content": "import os\nimport photomosaic as pm\nimport photomosaic.flickr\nimport matplotlib.pyplot as plt\n\n\n# For these published examples we use os.envi...
python
new_file
2
0
bsd-3-clause
430b5daebbd5385551203c2a0cf23bb355a2c027
danielballan/photomosaic
doc/source/scripts/06-cat-of-cats.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Add some coverage for olog callback." }, { "role": "assistant", "content": "from bluesky import Msg\nfrom bluesky.callbacks.olog import logbook_cb_factory\n\ntext = []\n\n\ndef f(**kwargs):\n text.append(kwargs['text'])\n...
python
new_file
1
1
bsd-3-clause
cf3cae6493a369173244e05d190cceae41b9abbd
ericdill/bluesky,ericdill/bluesky
bluesky/tests/test_olog_cb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for the save_character() function" }, { "role": "assistant", "content": "import unittest\n\nimport database.main\nfrom tests.create_test_db import engine, session, Base\ndatabase.main.engine = engine\ndatabase.main.session =...
python
new_file
8
1
mit
11296e24228ee10be009b04a9909504a8e8d5ace
Enether/python_wow
tests/models/character/test_saver.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Add script to draw NACA foil" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nThis script generates a force and velocity vector diagram for a cross-flow\nturbine.\n\"\"\"\n\nimport gizeh as gz\nimport numpy a...
python
new_file
1
2
mit
e3d92ce2cd17a967ac19aecad2998c4094f2ae11
petebachant/CFT-vectors
run.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add integration tests for pylast.py" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\nIntegration (not unit) tests for pylast.py\n\"\"\"\nimport datetime\nimport time\nimport unittest\n\nimport pylast\n\nclass...
python
new_file
null
null
apache-2.0
4074c4fae998ac1bb6f49bb47b34f4890dc90532
knockoutMice/pylast,hugovk/pylast,pylast/pylast,yanggao1119/pylast,knockoutMice/pylast,yanggao1119/pylast
test_pylast.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: Create pretty table of tie averages + function for pretty averages" }, { "role": "assistant", "content": "from s5v2 import *\nfrom prettytable import PrettyTable\n\ndef my_table(): # no arguments are passed in, which seems a bit ...
python
new_file
8
1
mit
e7faa99d9816745338ada38d1a7d974bf3a739ae
alexmilesyounger/ds_basics
s5v3.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: Send ERROR when the user disconnects" }, { "role": "assistant", "content": "from twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom zope.interface import implements\n\nclass ErrorResp...
python
new_file
1
1
bsd-3-clause
d6120537ec982f50d08fa188e91c68c023809db3
Heufneutje/txircd,ElementalAlchemist/txircd
txircd/modules/rfc/response_error.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Migration File this time." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.6 on 2017-03-30 05:56\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n...
python
new_file
1
0
apache-2.0
c87f42579826cf236953bc955d15a9cc98c67d05
ropable/statdev,xzzy/statdev,xzzy/statdev,brendanc-dpaw/statdev,parksandwildlife/statdev,ropable/statdev,parksandwildlife/statdev,xzzy/statdev,parksandwildlife/statdev,brendanc-dpaw/statdev
applications/migrations/0029_application_proposed_development_description.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 409. Longest Palindrome\n\n409. Longest Palindrome: https://leetcode.com/problems/longest-palindrome/" }, { "role": "assistant", "content": "from collections import Counter\nclass Solution(object):\n def lo...
python
new_file
1
3
apache-2.0
8223e9ffa61a2772a7a6f52244c5f1bbde4956b8
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/longest-palindrome.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add datetime header to Crank" }, { "role": "assistant", "content": "\"\"\"\nutil\n===\nCommon utilities across the Crank system.\n\"\"\"\nfrom datetime import datetime\n\n\nDATETIME_FORMAT = '%Y %b %d @ %H%M'\n\n\ndef get_timesta...
python
new_file
1
1
mit
312bbdefa256413b4891cd0e13e6ccf3c614541f
jad-b/Crank
util.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example from listing 11.4" }, { "role": "assistant", "content": "\"\"\"\nListing 11.4: An eight-element radix sort\n\"\"\"\n\nfrom io import open\nimport numpy as np\nimport pyopencl as cl\nimport utility\n\nNUM_SHORTS = 8\n\...
python
new_file
3
0
mit
f09ee3772d6e15a104af284ed6864005cf8450ef
oysstu/pyopencl-in-action
ch11/radix_sort8.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add management command for removing content rotation's settings on sections" }, { "role": "assistant", "content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.core.management.base import BaseCommand\nf...
python
new_file
1
1
bsd-2-clause
3def1498495e0abf230a3deb3873f6c502f3c6ad
praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo
molo/core/management/commands/remove_content_rotation_settings_from_sections.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add module for mocking node.get() with Responses" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This work was created by participants in the DataONE project, and is\n# jointly copyright...
python
new_file
6
2
apache-2.0
f78a485000ef8dacb584db1f03b7157b79bd5fe7
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
d1_libclient_python/src/d1_client/tests/mock_get.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Write a function that print something n times including relatives spaces" }, { "role": "assistant", "content": "\"\"\"Module docstring.\n\nThis serves as a long usage message.\n\"\"\"\nimport sys\nimport getopt\n\ndef main():\n ...
python
new_file
5
5
mit
8223d62c22d4c4f7a66e1e468de53556796a03a9
let42/python-course
src/functions/exercise7.py
rejected_lint
Too many lint violations: 5
true