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 a proof of concept for reading and writing from github api" }, { "role": "assistant", "content": "from hammock import Hammock as Github\nimport json\nimport base64\nfrom pprint import pprint\n\n# Let's create the first chain ...
python
new_file
2
0
mit
86cd7dff1ab6d0c47b51f14d8784b8bf5f61e762
maddyloo/miniBibServer,maddyloo/miniBibServer
update-readme.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add solution for problem 7" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom math import sqrt, ceil\n\ndef isPrime (x):\n for i in range (3, ceil (sqrt (x) + 1), 2):\n if x % i == 0:\n return 0...
python
new_file
1
3
mit
2a964e2030fd3764c0cdebfd98701f6ea381fd40
cifvts/PyEuler
euler007.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to verify if language was detected properly" }, { "role": "assistant", "content": "import unittest\nfrom charset_normalizer.normalizer import CharsetNormalizerMatches as CnM\nfrom glob import glob\nfrom os.path import ba...
python
new_file
1
2
mit
701238e19f4eaa6ce1f1c14e6e56d9544e402ed7
Ousret/charset_normalizer,ousret/charset_normalizer,Ousret/charset_normalizer,ousret/charset_normalizer
test/test_language.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add directory for tests of removing epsilon rules" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 20.08.2017 17:38\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"" }...
python
new_file
1
0
mit
ba9f62379b4f6b0dd8546d843840a011ce7edef2
PatrikValkovic/grammpy
tests/RemoveEpsilonRules/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add empty testcase for the MySQL Bind9 backend\n\nChange-Id: I55ef157b0c3dbf5f353553336d15c1f9681a92d4" }, { "role": "assistant", "content": "# Copyright 2012 Managed I.T.\n#\n# Author: Kiall Mac Innes <<EMAIL>>\n#\n# Licensed un...
python
new_file
1
1
apache-2.0
dcb8bc2a4bb06c9a6fd5d76d90a6c7621a2f7011
openstack/designate,richm/designate,melodous/designate,cneill/designate,NeCTAR-RC/designate,tonyli71/designate,cneill/designate-testing,muraliselva10/designate,ionrock/designate,ramsateesh/designate,grahamhayes/designate,richm/designate,ramsateesh/designate,ionrock/designate,cneill/designate-testing,melodous/designate,...
moniker/tests/test_backend/test_mysqlbind9.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a couple registrations embeds tests." }, { "role": "assistant", "content": "from nose.tools import * # flake8: noqa\nimport functools\n\nfrom framework.auth.core import Auth\n\nfrom api.base.settings.defaults import API_BASE...
python
new_file
7
3
apache-2.0
0a9d56d7e99324bf09cbb0ce6d6893e716b99f4f
cwisecarver/osf.io,mattclark/osf.io,Ghalko/osf.io,samchrisinger/osf.io,billyhunt/osf.io,billyhunt/osf.io,chrisseto/osf.io,SSJohns/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,chennan47/osf.io,binoculars/osf.io,chrisseto/osf.io,crcresearch/osf.io,pattisdr/osf.io,zamattiac/osf.io,alexschiller/osf.io,crcresearch/osf.i...
api_tests/registrations/views/test_registration_embeds.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Add simple unit test for Bananaphone codec" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport unittest\nimport twisted.trial.unittest\nfrom struct import pack\n\nfrom obfsproxy.network.buffer import Buffer\nfr...
python
new_file
3
3
bsd-3-clause
83328bdc1ce69a8a3b8f6f7465e226ef524bc728
david415/obfsproxy
obfsproxy/test/transports/test_bananaphone.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add constants for port types" }, { "role": "assistant", "content": "# Copyright 2012 Midokura Japan KK\n\nclass PortType:\n MATERIALIZED_BRIDGE = \"MaterializedBridge\";\n MATERIALIZED_ROUTER = \"MaterializedRouter\";\n ...
python
new_file
1
0
apache-2.0
b08fd9c9770f524ec63d92c11905ab8b2f6ef35f
midokura/python-midonetclient,midokura/python-midonetclient,midonet/python-midonetclient,midonet/python-midonetclient
src/midonet/api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add chapter1 folder and moise_pos.py\n\nSigned-off-by: sdphome <<EMAIL>>" }, { "role": "assistant", "content": "#!/bin/env python\r\nimport wx\r\n\r\nclass MyFrame(wx.Frame):\r\n def __init__(self):\r\n wx.Frame.__init_...
python
new_file
1
1
apache-2.0
e081d62fb4a715ceafc753ad278579885e6e69da
sdphome/wxPython_training
chapter1/mouse_pos.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Code Fights try functions problem" }, { "role": "assistant", "content": "#!/usr/local/bin/python\n# Code Fights Try Functions Problem\n\nimport math\n\n\ndef tryFunctions(x, functions):\n return [eval(func)(x) for func i...
python
new_file
3
3
mit
5f648d6c7f484ae5774d2dbb0a0d3bc7622b3de1
HKuz/Test_Code
CodeFights/tryFunctions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\r\n# See LICENSE.txt for licensing terms\r\n#$HeadURL$\r\n#$LastChangedDate$\r\n#$LastChangedRevision$\r\n\r\nimport shlex\r\n\r\nfrom reportlab.platypus import Spacer\r\n\r\nfrom flowables import *\r\n\r\n\r\ndef pa...
python
edit
5
6
mit
fcd2328549dcec2986e3b972f1a8bcfb0cf2e21b
pombreda/rst2pdf,liuyi1112/rst2pdf,pombreda/rst2pdf,liuyi1112/rst2pdf,rst2pdf/rst2pdf,rst2pdf/rst2pdf
rst2pdf/utils.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Test two windows drawing GL with different contexts." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n'''\n'''\n\n__docformat__ = 'restructuredtext'\n__version__ = '$Id$'\n\nimport pyglet.window\nfrom pyglet.window...
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 a management command to fix broken article urls when changing root site id." }, { "role": "assistant", "content": "# coding=utf-8\n\nfrom django.db import connection\nfrom django.conf import settings\nfrom django.core.managem...
python
new_file
4
4
mit
c613bd3995344bbb164a8f64b39c3a94f6b3ce48
AGoodId/begood-sites
begood_sites/management/commands/fix_root_site_id.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add a utility file to make a train data for MNIST sample." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\n'''\nDirectory structure\nTRAIN_DIR: \n label0:\n img0001.png\n img0002.png\...
python
new_file
1
2
apache-2.0
6c21b012c8ee8f4bb3f989c999f7d85ad99878b4
yoneken/train_tf
compressImg2TrainData.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests to `salt.utils.format_call()`." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n'''\n :codeauthor: :email:`Pedro Algarvio (<EMAIL>)`\n :copyright: © 2013 by the SaltStack Team, see AUTHORS for ...
python
new_file
1
1
apache-2.0
a9d5ac5a3ed0d43dfa3a7f7034d7f33771263f91
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/utils/format_call_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test clean exit at keyboard interrupt" }, { "role": "assistant", "content": "import unittest\n\nfrom pykka import Actor\n\nclass ActorInterruptTest(unittest.TestCase):\n def setUp(self):\n class ActorWithInterrupt(Actor...
python
new_file
1
2
apache-2.0
7d82be33689d5734fd5ec247dafac5c58536e3c9
jodal/pykka,tempbottle/pykka,tamland/pykka
tests/actor_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move original to this folder\n\nOriginal was pulling back USD exchanges - now only looking at EUR\nexchanges" }, { "role": "assistant", "content": "from exchanges import helpers\nfrom exchanges import bitfinex\nfrom exchanges imp...
python
new_file
2
0
mit
67d3a8d5716e9c634c70388361a2fc0edbc80961
Humantrashcan/prices
old/request.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add the weather module class" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# !/usr/bin/env python\n\n# MIT License\n#\n# Copyright (c) 2017 Maxime Busy\n#\n# Permission is hereby granted, free of charge, to any ...
python
new_file
1
1
mit
8d9f8277e5d346512f1ecc4fd0be0f757c6dfae9
Pandhariix/ARIIA
ariia/weather_module.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test capturing failed expectation." }, { "role": "assistant", "content": "\nfrom distutils import ccompiler\n\n\ndef test_set_include_dirs(tmp_path):\n \"\"\"\n Extensions should build even if set_include_dirs is invoke...
python
new_file
1
1
mit
80dd6f7c2b3b16e638ab5d836758d5b60c8a82d5
pypa/setuptools,pypa/setuptools,pypa/setuptools
distutils/tests/test_ccompiler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script for plotting time interval hists." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport climate\nimport joblib\nimport lmj.cubes\nimport lmj.plot\nimport numpy as np\n\n\ndef diffs(t):\n t.load()\n ...
python
new_file
1
4
mit
c212216b98d3323073b0c2f8d71a2d4543abfcc2
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
plots/plot-timing-histograms.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add CUDA GPU test for the .view() array method" }, { "role": "assistant", "content": "from __future__ import print_function, absolute_import, division\n\nfrom numba import unittest_support as unittest\nimport numpy as np\nfrom nu...
python
new_file
1
2
bsd-2-clause
72437b0ed11bfdc5ff82aeabf69130e683ddeb43
pombredanne/numba,stuartarchibald/numba,GaZ3ll3/numba,pitrou/numba,pombredanne/numba,seibert/numba,cpcloud/numba,gdementen/numba,cpcloud/numba,gmarkall/numba,pitrou/numba,jriehl/numba,IntelLabs/numba,GaZ3ll3/numba,GaZ3ll3/numba,stefanseefeld/numba,stefanseefeld/numba,IntelLabs/numba,IntelLabs/numba,gmarkall/numba,ssara...
numba/cuda/tests/cudapy/test_array_methods.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" These tests demonstrate pytest marker use for finding and running tests.\n\n Usage examples from this file:\n pytest -v -m marker_test_suite # Runs A, B, C, D\n pytest -v -m marker1 ...
python
edit
1
1
mit
f71045f6bef5c8b9f7274ec41a965ccbe1044a01
mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
examples/test_markers.py
rejected_duplicate
Near-duplicate of sample 5849
true
[ { "role": "user", "content": "Write python code for the following: Add script for selecting a segue subsample" }, { "role": "assistant", "content": "from astropy.io import fits, ascii\nfrom astropy.table import Table\nimport numpy as np\n\nsspp = fits.open(\"/Users/adrian/projects/segue-learn/da...
python
new_file
1
0
bsd-3-clause
0b436265ad984f8750098e56712bb3ac8f917e86
adrn/d3po,adrn/d3po,adrn/d3po
scripts/make_segue_subsample.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new MonitorAttach class for Focused monitors" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#------------------------------------------------------------------------------\n# Package: Pikos toolkit\n# Fil...
python
new_file
1
2
bsd-3-clause
eb9bae2803876f93957e6e2bdd00e57c83cff567
enthought/pikos,enthought/pikos,enthought/pikos
pikos/monitors/focused_monitor_attach.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract the tracts shapes in 2000 MSA" }, { "role": "assistant", "content": "\"\"\"shape_msa_blockgroup.py\n\nOutput one shapefile per MSA containing all the blockgroups it contains\n\"\"\"\nimport os\nimport csv\ni...
python
new_file
2
0
bsd-2-clause
6d6a566d93784022e5b769fc9d26b0f56ac3f18d
scities/2000-us-metro-atlas
bin/2000/shape_msa_tract.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Prepare for coq -> latex translation" }, { "role": "assistant", "content": "#!/usr/bin/python\nimport sys\nimport re\nfrom string import Template\n\ndef rule2latex(name, premises, conclusion):\n return Template(\nr\"\"\"\\newc...
python
new_file
1
1
mit
7d7a3a6a71dccec3c44fe8f1dd6576423d2ca278
TheoWinterhalter/formal-type-theory
formalization/coq2latex.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Enable auto-loading of raw SQL during South migration" }, { "role": "assistant", "content": "# http://djangosnippets.org/snippets/2311/\n# Ensure South will update our custom SQL during a call to `migrate`.\n\nfrom south.signals ...
python
new_file
3
4
bsd-2-clause
2b0c7304c1372997bc226d255ef22cc31f56f6fa
makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,camillemonchicourt/Geotrek,GeotrekCE/Geotrek-admin,johan--/Geotrek,johan--/Geotrek,mabhub/Geotrek,Anaethelion/Geotrek,mabhub/Geotrek,Anaethelion/Geotrek,camillemonchicourt/Geotrek,makinacorpus/Geotrek,Anaethelion/Geotrek,johan--/Geotrek,mabhub/Geotrek...
caminae/core/management.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim:fileencoding=utf-8:noet\nfrom sphinx.ext import autodoc\nfrom inspect import formatargspec\nfrom powerline.lint.inspect import getconfigargspec\nfrom powerline.lib.threaded import ThreadedSegment\n\ntry:\n\tfrom __builtin__ import uni...
python
edit
1
2
mit
f4e49e2ee6b8ae7b1ab5132b3f900b0002acda54
lukw00/powerline,xfumihiro/powerline,dragon788/powerline,prvnkumar/powerline,magus424/powerline,S0lll0s/powerline,QuLogic/powerline,EricSB/powerline,xxxhycl2010/powerline,lukw00/powerline,firebitsbr/powerline,russellb/powerline,bartvm/powerline,dragon788/powerline,prvnkumar/powerline,S0lll0s/powerline,bartvm/powerline,...
docs/source/powerline_autodoc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move state and transition enums file for re-use" }, { "role": "assistant", "content": "#!/usr/bin/env python\n#\n# Copyright 2017 Robot Garden, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you m...
python
new_file
1
0
apache-2.0
c4ff6052f6e4fd545ea1c7cb0cd2a53a28ed001d
ProgrammingRobotsStudyGroup/robo_magellan,ProgrammingRobotsStudyGroup/robo_magellan,ProgrammingRobotsStudyGroup/robo_magellan,ProgrammingRobotsStudyGroup/robo_magellan
scripts/state_and_transition.py
rejected_duplicate
Near-duplicate of sample 4547
true
[ { "role": "user", "content": "Write python code for the following: Move pod lifecycle to schemas" }, { "role": "assistant", "content": "from hestia.unknown import UNKNOWN\n\n\nclass PodLifeCycle(object):\n CONTAINER_CREATING = 'ContainerCreating'\n PENDING = 'Pending'\n RUNNING = 'Runni...
python
new_file
1
0
apache-2.0
b5e6cf14d6f6442e1fb855e0aa19368b2ce6db15
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon_schemas/pod_lifecycle.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for the segment" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.13 on 2017-10-19 11:20\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n...
python
new_file
1
0
bsd-2-clause
8db49a2336e733479d8f1dd573b20807763c7681
praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem
gem/migrations/0021_commentcountrule.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add rate_limit column to service model\n\nThe API rate limit will be removed from the config and added to services\nso that it is possible to change the rate_limit for individual services\nin rare cases.\n\nPivotal story: https://www.pivotal...
python
new_file
1
1
mit
649679d67f611e10a4d1821dcfacf01abf7ac5b2
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0157_add_rate_limit_to_service.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add fix related with CW19" }, { "role": "assistant", "content": "import datetime\n\nfrom django.core.management.base import BaseCommand\n\nfrom lowfat.models import Claimant, Fund, Expense\n\nclass Command(BaseCommand):\n help...
python
new_file
4
3
bsd-3-clause
41680da53d5059e3b1e2ce497916f26d4c06cf16
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
lowfat/management/commands/fixcw19.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Implement method for splitting files for batch processing" }, { "role": "assistant", "content": "import os\n\n# Download up to date filelist\nos.system(\"rsync -azv \" +\n \"data.analytics.hathitrust.org::features/listin...
python
new_file
1
0
mit
50b16f7e3996308ae720a3f186a7a3f8031c07a5
bacovcin/hathitrust-features-database,bacovcin/hathitrust-features-database,bacovcin/hathitrust-features-database
split-hathitrust.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement Sum Of Digits in Python" }, { "role": "assistant", "content": "def sum_of_digits(n):\n sum = 0;\n for i in str(n):\n sum += int(i)\n\n return sum\n\nprint sum_of_digits(3) #3\nprint sum_of_digits(345433...
python
new_file
3
2
cc0-1.0
b69462f1c671f84c379beca2eaf8b72386f4e2e4
ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak34...
math/sum_of_digits/python/sum_of_digits.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial version of goalie game item" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom .common import Base\n\n\nclass GoalieGame(Base):\n __tablename__ = 'goalie_games'\n __aut...
python
new_file
1
0
mit
344b6d4a9675aaf38d3cce97f18be0c365c4110c
leaffan/pynhldb
db/goalie_game.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test for ISO NC creator" }, { "role": "assistant", "content": "from posts.nc import *\r\nimport posts.iso\r\n\r\noutput('POST_TEST.txt')\r\n\r\nprogram_begin(123, 'Test program')\r\nabsolute()\r\nmetric()\r\nset_plane(0)\r\n\r\nf...
python
new_file
16
0
bsd-3-clause
df10bd85bcf94aba9661e397960a1cd3b4dd090d
danheeks/heekscnc,danheeks/heekscnc,danheeks/heekscnc,danheeks/heekscnc
POST_TEST.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Write python code for the following: Sort events by date, add missing migration" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migrat...
python
new_file
3
0
bsd-3-clause
8fc31b8a5c36467ca44f88fedaf0e9f6b47bade9
ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio,ugoertz/django-familio
genealogio/migrations/0025_auto_20160316_2247.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom twisted.internet import reactor\nfrom heufybot import HeufyBot, HeufyBotFactory\nfrom config import Config\n\nclass BotHandler(object):\n factories = {}\n globalConfig = None\n\n def __init__(self):\n print \...
python
edit
3
5
mit
f0e180387a37437fe7e8d37fa2806e7d47736bfc
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
pyheufybot/bothandler.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [client] Add basic dacapo wallclock analyzer.\n\nSigned-off-by: Michael Markert <<EMAIL>>" }, { "role": "assistant", "content": "import re\n\nBENCHMARKS = set(( 'avrora'\n , 'batik'\n , 'eclips...
python
new_file
1
1
mit
b16ac90d152bc4883162df235b837726c60ce94f
fhirschmann/penchy,fhirschmann/penchy
dacapo_analyzer.py
rejected_duplicate
Near-duplicate of sample 911
true
[ { "role": "user", "content": "Write python code for the following: Check we are using LDA correctly" }, { "role": "assistant", "content": "import gensim\nimport gensim.matutils\nimport logging \nimport sys \nimport numpy \nimport sklearn.feature_extraction.text as text \nimport scipy.sparse \nfr...
python
new_file
1
0
bsd-3-clause
f02ff643e341f92d6e75ef79b42fcd2f15d05e8d
charanpald/APGL
exp/influence2/GensimExp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for OrderedSet type." }, { "role": "assistant", "content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for ad...
python
new_file
1
1
apache-2.0
a387c0307f55d635d4a6064a3df2e77ecf9e1157
Plexxi/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2
st2common/tests/unit/test_util_types.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add base class for KQueen UI views" }, { "role": "assistant", "content": "from flask import flash, session\nfrom flask.views import View\nfrom kqueen_ui.api import get_kqueen_client, get_service_client\n\nimport logging\n\nlogger...
python
new_file
3
5
mit
02ca253332acacc95e94f0fced2d37c64d804c22
atengler/kqueen-ui,atengler/kqueen-ui,atengler/kqueen-ui,atengler/kqueen-ui
kqueen_ui/generic_views.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test by selenium builder" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom selenium.webdriver.firefox.webdriver import WebDriver\nfrom selenium.webdriver.common.action_chains import ActionChains\nimport tim...
python
new_file
4
2
apache-2.0
a2708fcbf836c9ecb9efc546606ce6011a08f15a
maximatorrus/automated_testing_python
firs_test_add_group.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add Filter that display normal vector (it needs the pre-computed normal vectors)" }, { "role": "assistant", "content": "from vtk import vtkArrowSource, vtkGlyph3D, vtkPolyData\nfrom vtk import vtkRenderer, vtkRenderWindowInteract...
python
new_file
7
2
bsd-3-clause
99454f1b62f1770e08c29db727d3b790787a6fa0
mmolero/pcloudpy
pcloudpy/core/filters/DisplayNormals.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write python code for the following: Move relevant parts of ID mapping from covid-19" }, { "role": "assistant", "content": "from indra.databases import chebi_client\nfrom indra.ontology.standardize import standardize_db_refs\n\n\nminerva_to_indra_map = {\n 'UNIPR...
python
new_file
1
5
bsd-2-clause
3849b0a5cae5ca7d214c864fa1722a9da98a3ec2
sorgerlab/belpy,sorgerlab/indra,bgyori/indra,bgyori/indra,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,johnbachman/indra,sorgerlab/belpy
indra/sources/minerva/id_mapping.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add compiled cycle detect ui." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file '.\\cycledetect.ui'\n#\n# Created by: PyQt4 UI code generator 4.11.4\n#\n# WARNI...
python
new_file
1
1
isc
1965291f9e67b1b7923353f1b8892e0fabb543d4
jaj42/dyngraph,jaj42/GraPhysio,jaj42/GraPhysio
dyngraph/cycledetect_ui.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add 'includeme' function. (Accidently put in SQLAHelper.)" }, { "role": "assistant", "content": "from akhet.static import add_static_route\n\ndef includeme(config):\n \"\"\"Add certain useful methods to a Pyramid ``Configurato...
python
new_file
1
1
mit
7389c85979127a48e0ce9b2f11e611c212a95524
Pylons/akhet,hlwsmith/akhet,hlwsmith/akhet,hlwsmith/akhet,Pylons/akhet
akhet/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add chrooting test (requires vagrant environment)" }, { "role": "assistant", "content": "import os\nimport platform\nimport tempfile\nfrom .test_utils import EnvironmentTestCase\n\n_EXPECTED_FILE_IN_MOUNT_NAME = \"{mount_name}_fi...
python
new_file
3
3
bsd-3-clause
33bc340a84b597ae649c1c394bda3978cae1f789
vmalloc/dwight,vmalloc/dwight,vmalloc/dwight
tests/test__chrooting.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for prefix Q expression" }, { "role": "assistant", "content": "from unittest import TestCase\n\nfrom django.db.models import Q\n\nfrom binder.views import prefix_q_expression\nfrom binder.permissions.views import is_q_c...
python
new_file
1
1
mit
676fd73fa8c6b5a70e5caef6d6b195e4676a0a18
CodeYellowBV/django-binder
tests/test_prefix_q_expression.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test tourney match comments retrieval as JSON" }, { "role": "assistant", "content": "\"\"\"\n:Copyright: 2006-2019 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nimport pytest\n\nfrom byceps.ser...
python
new_file
1
1
bsd-3-clause
14148af45fa9b6a0377df866e202edab561df12d
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps
tests/api/tourney/match/comments/test_view_for_match_as_json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new fonttools based tool" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nfrom fontTools import ttLib\nfrom fontTools.ttLib.tables import otTables\nfrom argparse import ArgumentParser\n\nparser = ArgumentParser()...
python
new_file
1
0
mit
a53cf07d2b6f246bae866210fef6ad9988bce885
moyogo/pysilfont,moyogo/pysilfont
scripts/ttfaddemptyot.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to download the mammal super tree" }, { "role": "assistant", "content": "#retriever\nfrom retriever.lib.templates import DownloadOnlyTemplate\n\nSCRIPT = DownloadOnlyTemplate(name=\"Mammal Super Tree\",\n ...
python
new_file
1
0
mit
41b1d7e8d4f719b979cb60db9a4e840cb69ec6d0
davharris/retriever,henrykironde/deletedret,goelakash/retriever,henrykironde/deletedret,bendmorris/retriever,davharris/retriever,bendmorris/retriever,davharris/retriever,bendmorris/retriever,embaldridge/retriever,embaldridge/retriever,embaldridge/retriever,goelakash/retriever
scripts/MammalSuperTree.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a very weak test of the Reaction API." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport dirty_water\n\nrxn = dirty_water.Reaction()\nrxn.num_reactions = 10\n\nrxn['Cas9'].std_volume = 1, 'μL'\nrxn['Cas9'...
python
new_file
1
0
mit
95a1c54cc728c11d693e19a70e0691c077251d2f
kalekundert/dirty_water
tests/quick_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add experimental version of 'Draw a square' :fire:" }, { "role": "assistant", "content": "from nxt.motor import PORT_A, PORT_B, PORT_C\nfrom .helpers.robot import Robot, SERVO_NICE\n\n\ndef main():\n robot = Robot(debug=True, ...
python
new_file
1
2
mit
c3cb492aed8140e3a58fb09212d236689a677437
richin13/nxt-scripts
scripts/draw_square.ext.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for the symbolic ranges" }, { "role": "assistant", "content": "\"\"\"Tests for the range class.\"\"\"\n\nfrom sympy import sympify\n\nfrom drudge import Range\n\n\ndef test_range_has_basic_operations():\n \"\"\"Test ...
python
new_file
1
1
mit
5d1b7b38b70dfa17bc7c468fb49e3e576c9accc0
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
tests/range_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add search index file - currently search across Articles, extend to search across Categories?" }, { "role": "assistant", "content": "from haystack.indexes import *\nfrom haystack import site\nfrom models import Article\n\nclass A...
python
new_file
5
1
bsd-2-clause
36efa6e2615bdd600d80cc87ada27984c9806135
incuna/feincms-articles,michaelkuty/feincms-articles,incuna/feincms-articles,michaelkuty/feincms-articles
articles/search_indexes.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add receiving widget for lite gui" }, { "role": "assistant", "content": "from PyQt4.QtGui import *\nfrom PyQt4.QtCore import *\nfrom i18n import _\n\nclass ReceivingWidget(QTreeWidget):\n\n def toggle_used(self):\n if s...
python
new_file
17
9
mit
32f3a42c04a1ae8729e08bf7ce67a1f01f7ac2b3
molecular/electrum,cryptapus/electrum-uno,pknight007/electrum-vtc,cryptapus/electrum-myr,molecular/electrum,cryptapus/electrum-uno,dashpay/electrum-dash,lbryio/lbryum,dabura667/electrum,procrasti/electrum,digitalbitbox/electrum,wakiyamap/electrum-mona,cryptapus/electrum-myr,kyuupichan/electrum,neocogent/electrum,spesmi...
lib/receiving_widget.py
rejected_lint
Too many lint violations: 17
true
[ { "role": "user", "content": "Write python code for the following: Add script to email users of name-conflicting packages.\n\n\ngit-svn-id: 757818eefc3e095bf4f5c16d67ad3f55b5150c3d@532 072f9a9a-8cf7-0310-8ca5-bf92c90cb7c1" }, { "role": "assistant", "content": "import sys, os, urllib, StringIO, t...
python
new_file
3
3
bsd-3-clause
328c373495e94005a97a907ac023cb52bc47e20c
ericholscher/pypi,ericholscher/pypi
find_dups.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 452. Minimum Number of Arrows to Burst Balloons\n\n452. Minimum Number of Arrows to Burst Balloons: https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/" }, { "role": "assistant", "content...
python
new_file
1
4
apache-2.0
b2bc2f08d69ea42f9cecf6f994b1ed3c8e9f8022
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/minimum-number-of-arrows-to-burst-balloons.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract input from testcases." }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport sys\n\nif len(sys.argv) != 2:\n sys.exit(\"Usage:\\n\\t%s <testcase>\" % (sys.argv[0],))\n\ntestcase = sys.arg...
python
new_file
1
0
apache-2.0
c6928a6070aaf0fadfb1d9f4071a8440224a247a
alviano/wasp,alviano/wasp,alviano/wasp,Yarrick13/hwasp,gaste/dwasp,gaste/dwasp,Yarrick13/hwasp,gaste/dwasp,Yarrick13/hwasp
tests/printInput.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a very simple test case for posix file support." }, { "role": "assistant", "content": "\nimport sys\n\nimport nose.tools\n\nfrom simuvex import SimState\n\ndef test_file_create():\n # Create a state first\n state = SimS...
python
new_file
3
7
bsd-2-clause
1360b8c4f6422dc8149ba40bb9a0717e796049e0
angr/angr,f-prettyland/angr,axt/angr,schieb/angr,schieb/angr,chubbymaggie/angr,iamahuman/angr,tyb0807/angr,axt/angr,chubbymaggie/simuvex,schieb/angr,angr/angr,chubbymaggie/simuvex,tyb0807/angr,angr/angr,chubbymaggie/simuvex,f-prettyland/angr,f-prettyland/angr,axt/angr,angr/simuvex,chubbymaggie/angr,iamahuman/angr,iamah...
tests/test_posix.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for the api-basket-add-voucher view" }, { "role": "assistant", "content": "from django.utils import timezone\n\nfrom oscar.core.loading import get_model\n\nfrom oscarapi.tests.utils import APITest\n\n\nBasket = get_mod...
python
new_file
1
1
bsd-3-clause
ff179b6215366676d92d39f255682781fe6b40eb
regulusweb/django-oscar-api,crgwbr/django-oscar-api
oscarapi/tests/testvoucher.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic backend loading function" }, { "role": "assistant", "content": "# Author: Milan Kubik, 2017\n\nimport logging\n\nfrom pkg_resources import iter_entry_points\n\nRESOURCE_GROUP = \"ipaqe_provision_hosts.backends\"\n\nlog ...
python
new_file
1
3
mit
4c1953e570a15661cffa68c151e00bbc6345ad8d
apophys/ipaqe-provision-hosts
ipaqe_provision_hosts/backend/loader.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 720. Longest Word in Dictionary\n\n720. Longest Word in Dictionary: https://leetcode.com/problems/longest-word-in-dictionary/" }, { "role": "assistant", "content": "class Solution(object):\n def longestWord...
python
new_file
1
6
apache-2.0
dbaccbddfe36c32444c61df5ac6ffd238d3d022b
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/longest-word-in-dictionary.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add ELO algorithm code, with small tests." }, { "role": "assistant", "content": "##\n# elo.py\n# provides implementation of ELO algorithm to determine\n# change in fitness given a malicious act of nature.\n##\n\n\nK_FACTOR = 50 #...
python
new_file
2
3
mit
e7be538e04e775ad63d0e7c54d7bea6b902e09fb
anishathalye/evolution-chamber,anishathalye/evolution-chamber,techx/hackmit-evolution-chamber,anishathalye/evolution-chamber,anishathalye/evolution-chamber,techx/hackmit-evolution-chamber,techx/hackmit-evolution-chamber,techx/hackmit-evolution-chamber
elo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a script to check motor (and communication!)" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf8 -*-\n#\n# Copyright (c) 2013 Nautilabs\n#\n# Licensed under the MIT License,\n# https://github.com/...
python
new_file
8
2
mit
cfc471de36961ff90a2131100fa7a87da69c656b
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
Motors/motorTest.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Write python code for the following: feat: Add simple web server for testing Neuroglancer with local data" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# @license\n# Copyright 2017 Google Inc.\n# Licensed under the Apache License, Version 2.0 (the \"...
python
new_file
1
1
apache-2.0
5516b9997671d03c06549dcd99611df56d79b779
seung-lab/neuroglancer,seung-lab/neuroglancer,google/neuroglancer,janelia-flyem/neuroglancer,seung-lab/neuroglancer,google/neuroglancer,seung-lab/neuroglancer,seung-lab/neuroglancer,google/neuroglancer,google/neuroglancer,janelia-flyem/neuroglancer,janelia-flyem/neuroglancer,seung-lab/neuroglancer,janelia-flyem/neurogl...
cors_webserver.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to copy overlay from one dataset to another" }, { "role": "assistant", "content": "\"\"\"Copy overlay from one dataset to a derived dataset.\"\"\"\n\nimport click\n\nimport dtoolcore\n\n\ndef ensure_uri(path_or_uri):\n...
python
new_file
1
2
mit
9a6c467ef34596c8adccc294f3132fe67c983608
JIC-Image-Analysis/senescence-in-field,JIC-Image-Analysis/senescence-in-field,JIC-Image-Analysis/senescence-in-field
scripts/copy_overlay.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple test for the command line interface." }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport pytest\nfrom click.testing import CliRunner\n\nfrom compaction import cli\n\n\n@pytest.fixture\ndef response()...
python
new_file
1
1
mit
f3984fd4fdcfa8ddad779fb934362d043a5f8a00
mcflugen/compaction
tests/test_cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a PES basic demo." }, { "role": "assistant", "content": "import numpy as np\nimport benchfunk\nimport reggie\n\nimport mwhutils.plotting as mp\nimport mwhutils.grid as mg\n\nfrom pybo import inits\nfrom pybo import policies\n...
python
new_file
3
0
bsd-2-clause
9397ebff413e557fff6aa08a3160cdfecb74fc7e
mwhoffman/pybo
pybo/demos/basic_pes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add currently-incorrect day 6 part 1" }, { "role": "assistant", "content": "import re\nfrom numpy import matrix\n\n\ninstructions = []\n\nwith open('input.txt', 'r') as f:\n regex = re.compile(r'([\\w ]+) (\\d+),(\\d+) .+ (\\d...
python
new_file
1
3
mit
6bf80a7f367593e71fad788a933819c6849c3723
foxscotch/advent-of-code,foxscotch/advent-of-code
day-06/p1.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to migrate data to certificatesubscription table" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.apps imp...
python
new_file
3
2
mit
f9f7493d89aa842fffc085758a1fe5791cd65704
gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,LindaTNguyen/RAPID,LindaTNguyen/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID,gdit-cnd/RAPID
monitors/migrations/post/0004_migrate_subscriptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add initial testing module for cloud creation" }, { "role": "assistant", "content": "'''\nThe generic libcloud template used to create the connections and deploy the\ncloud virtual machines\n'''\n\n# Import python libs\nimport os...
python
new_file
16
6
apache-2.0
b614fae93ff965abb45ee26e1a72198b4b4af8ec
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
saltcloud/clouds/ec2.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Write python code for the following: Resolve API import issues (quantum)\n\nRestore the imports in the api init file, without including the \"from\"\nto ensure api calls still must specify \"api.nova\", \"api.quantum\", etc.\n\nFixes bug #1125632\n\nChange-Id: I981105ce0ed7f135...
python
new_file
10
0
apache-2.0
63203ab1069999f81b9518c11da29eb8ca537077
vladryk/horizon,mrunge/openstack_horizon,redhat-openstack/horizon,citrix-openstack-build/horizon,Hodorable/0602,citrix-openstack-build/horizon,doug-fish/horizon,VaneCloud/horizon,tanglei528/horizon,karthik-suresh/horizon,j4/horizon,NeCTAR-RC/horizon,Solinea/horizon,wangxiangyu/horizon,luhanhan/horizon,newrocknj/horizon...
openstack_dashboard/api/__init__.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Write python code for the following: Add simple unit test for optimize module" }, { "role": "assistant", "content": "import unittest\n\nimport numpy as np\n\nfrom desisurvey.optimize import *\n\n\nclass TestUtils(unittest.TestCase):\n\n def test_wrap_unwrap(self)...
python
new_file
3
2
bsd-3-clause
28460efa5c8add33c36f45ac3bdefbd4c94ac0af
desihub/desisurvey,desihub/desisurvey
py/desisurvey/test/test_optimize.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement part of the s3 csv into interface" }, { "role": "assistant", "content": "from __future__ import print_function, division, absolute_import\n\nfrom into import discover, CSV, resource, convert\nimport pandas as pd\nfrom ....
python
new_file
1
1
bsd-3-clause
794b5297c96529d895705214b1fb2ff9ba1510a9
ywang007/odo,alexmojaki/odo,blaze/odo,blaze/odo,ContinuumIO/odo,cowlicks/odo,alexmojaki/odo,Dannnno/odo,cpcloud/odo,quantopian/odo,cpcloud/odo,cowlicks/odo,ContinuumIO/odo,Dannnno/odo,ywang007/odo,quantopian/odo
into/backends/aws.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for deleted gunk" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.5 on 2016-07-13 00:00\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\nclas...
python
new_file
1
0
mit
8d4255538203336e6f4d72845723c179c38547e0
impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore,impactlab/oeem-energy-datastore
datastore/migrations/0028_auto_20160713_0000.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a simple performance plotting tool." }, { "role": "assistant", "content": "\"\"\"\n@author: Bryan Silverthorn <<EMAIL>>\n\"\"\"\n\nif __name__ == \"__main__\":\n from borg.tools.plot_performance import main\n\n raise Sy...
python
new_file
3
6
mit
d2018ec07a79b1d0fd7c0ee3c34faa0c4c5bf723
borg-project/borg
src/python/borg/tools/plot_performance.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test to see if pegasus-service imports are succesful" }, { "role": "assistant", "content": "# Copyright 2007-2014 University Of Southern California\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\")...
python
new_file
3
1
apache-2.0
b7212b9aa393faea3cfaf94c3dfaf17487461d62
pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus
lib/pegasus/python/Pegasus/test/service/test_service.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple script that changes floating points in genesis.json to ints" }, { "role": "assistant", "content": "#!/usr/bin/python\n\ndef isfloat(value):\n try:\n float(value)\n return True\n except ValueError:\n return F...
python
new_file
3
2
unlicense
ee0f949da82f249684c63cefe49ee546aca76299
camponez/bitshares,jakeporter/Bitshares,jakeporter/Bitshares,frrp/bitshares,bitsuperlab/cpp-play,FollowMyVote/bitshares,frrp/bitshares,bitshares/devshares,frrp/bitshares,bitshares/bitshares,bitsuperlab/cpp-play,FollowMyVote/bitshares,bitsuperlab/cpp-play,Ziftr/bitshares,camponez/bitshares,bitshares/bitshares,bitshares/...
programs/utils/fix_json.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a command to clean attachments" }, { "role": "assistant", "content": "from pathlib import Path\n\nfrom django.core.management.base import BaseCommand\nfrom django.conf import settings\n\nfrom geotrek.common.models import Atta...
python
new_file
1
10
bsd-2-clause
436840ee3d41ca06c6a94745144ed3b8453816d8
GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin
geotrek/common/management/commands/clean_attachments.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Solve Simple Calculate in python" }, { "role": "assistant", "content": "import sys\n\ns = 0.0\n\nfor line in sys.stdin:\n a, b, c = line.split()\n a, b, c = int(a), int(b), float(c)\n s += c * b\n\nprint(f'VALOR A PAGAR:...
python
new_file
1
0
mit
cff8e237afb567ba980b8790d9c7416b8be21fdd
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1010/1010.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add missed exception module. Ooops." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013 Alexander Shorin\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING...
python
new_file
1
0
bsd-2-clause
814974c6736f1a9aef6fec7abf4153f194a231c7
samipshah/simpleubjson,brainwater/simpleubjson,498888197/simpleubjson,kxepal/simpleubjson
simpleubjson/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Test fit funcs for full_output = False" }, { "role": "assistant", "content": "from numpy.testing import assert_\nfrom statsmodels.base.model import (_fit_mle_newton, _fit_mle_nm,\n _fit_mle...
python
new_file
1
5
bsd-3-clause
59882da97dafa0e103550d24795105e4e73f6ff5
bsipocz/statsmodels,bavardage/statsmodels,jseabold/statsmodels,DonBeo/statsmodels,waynenilsen/statsmodels,detrout/debian-statsmodels,josef-pkt/statsmodels,kiyoto/statsmodels,cbmoore/statsmodels,Averroes/statsmodels,statsmodels/statsmodels,ChadFulton/statsmodels,adammenges/statsmodels,bashtage/statsmodels,YihaoLu/statsm...
statsmodels/base/tests/test_optimize.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a migration to remove Member.rw" }, { "role": "assistant", "content": "# Generated by Django 3.2.4 on 2021-07-22 14:39\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ...
python
new_file
1
0
bsd-3-clause
ce9ff3ac42d388d7898ea3e88dce3d2eb4168c30
iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,healthchecks/healthchecks,iphoting/healthchecks,healthchecks/healthchecks,iphoting/healthchecks
hc/accounts/migrations/0042_remove_member_rw.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Enforce the nocase collation on the email table" }, { "role": "assistant", "content": "\"\"\" Enforce the nocase collation on the email table\n\nRevision ID: 049fed905da7\nRevises: 49d77a93118e\nCreate Date: 2018-04-21 13:23:56.5...
python
new_file
1
1
mit
bb0d7bf6dc36e8d013befc7f13da3cb6c3830c46
kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io
core/admin/migrations/versions/049fed905da7_.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python script to compute fast fourier transforms." }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport csv\nimport numpy as np\nfrom scipy import signal\nfrom scipy.fftpack import fft, ifft\nfrom scipy import ...
python
new_file
3
0
apache-2.0
12c3d91f3a0ae571300f7729d09766aba12c81ac
HackTheStacks/darwin-notes-image-processing,HackTheStacks/darwin-notes-image-processing
CurveAnalysis/fourier_analysis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, url\n\nurlpatterns = patterns('avatar.views',\n url('^add/$', 'add', name='avatar_add'),\n url('^change/$', 'change', name='avatar_change'),\n url('^delete/$', 'delete', name='avatar_...
python
edit
1
0
bsd-3-clause
22df7a89020cbbcf80a88bcf3572dea591884861
tbabej/django-avatar,Brendtron5000/django-avatar,Nuevosmedios/django-avatar,stellalie/django-avatar,barbuza/django-avatar,allenling/django-avatar,allenling/django-avatar,tbabej/django-avatar,z4r/django-avatar,imgmix/django-avatar,hexenxp14/django-avatar,MachineandMagic/django-avatar,brajeshvit/avatarmodule,integricho/d...
avatar/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add helpers to determine verbose_name(_plural)? of arbitrary objects" }, { "role": "assistant", "content": "import itertools\n\nfrom django import template\n\n\nregister = template.Library()\n\n\nPATHS = [\n '_meta', # model\n...
python
new_file
1
5
bsd-3-clause
657e74878179b505c12cdf8e607cd9b3ae549420
matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel
towel/templatetags/verbose_name_tags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for Party meta option changes" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.5 on 2017-02-06 00:37\nfrom __future__ import unicode_literals\n\nfrom django.db import migrat...
python
new_file
1
0
mit
fd80e8088c840fb836f00f4d41b0fcfd0a132d0a
california-civic-data-coalition/django-calaccess-processed-data,california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed/migrations/0023_auto_20170206_0037.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add RGBController class for LED indicator control" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n### Class to control the RGB LED Indicator ###\n\nimport Adafruit_BBIO.GPIO as GPIO\nimport time\n\nclass RGBContro...
python
new_file
3
5
mit
8661b02ca1bcfb3fab9c41c9ec6d620d4d62355b
swbooking/RobotMaria
src/rgb.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for the instantiation of deplete.Operator\n\nConstruct a minimal cross sections xml file that only\ncontains the depletion_chain node required by\nthe Operator. The path to this file is set to the\nOPENMC_CROSS_SECTIONS file, and re...
python
new_file
1
3
mit
f7008616465267906dd7ca75e0339812549e2988
paulromano/openmc,smharper/openmc,paulromano/openmc,liangjg/openmc,mit-crpg/openmc,shikhar413/openmc,liangjg/openmc,amandalund/openmc,smharper/openmc,amandalund/openmc,walshjon/openmc,liangjg/openmc,paulromano/openmc,mit-crpg/openmc,walshjon/openmc,mit-crpg/openmc,amandalund/openmc,shikhar413/openmc,shikhar413/openmc,w...
tests/unit_tests/test_deplete_operator.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script that converts a field in a tabular data file to cptm input" }, { "role": "assistant", "content": "\"\"\"Script that converts a field in a tabular data file to cptm input files\n\nUsed for the CAP vragenuurtje data.\n\n...
python
new_file
1
0
apache-2.0
38499870ade3e96e003373d599bb94f089e57768
NLeSC/cptm,NLeSC/cptm
cptm/tabular2cpt_input.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new status to the job statuses to handle errors." }, { "role": "assistant", "content": "\"\"\"empty message\n\nRevision ID: 0071_add_job_error_state\nRevises: 0070_fix_notify_user_email\nCreate Date: 2017-03-10 16:15:22.153...
python
new_file
3
1
mit
6a0efd80ab081bc0056bc7ec346320f03fdcc503
alphagov/notifications-api,alphagov/notifications-api
migrations/versions/0071_add_job_error_state.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim:fileencoding=utf-8:noet\n\nfrom powerline.renderer import Renderer\nfrom powerline.colorscheme import ATTR_BOLD, ATTR_ITALIC, ATTR_UNDERLINE\n\n\nclass PangoMarkupRenderer(Renderer):\n\t'''Powerline Pango markup segment renderer.'''\n...
python
edit
1
12
mit
3c613bc1b729904883bca77924d892012b93cdc3
dragon788/powerline,cyrixhero/powerline,blindFS/powerline,QuLogic/powerline,magus424/powerline,areteix/powerline,dragon788/powerline,keelerm84/powerline,lukw00/powerline,xfumihiro/powerline,prvnkumar/powerline,magus424/powerline,s0undt3ch/powerline,dragon788/powerline,bartvm/powerline,bezhermoso/powerline,wfscheper/pow...
powerline/renderers/pango_markup.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Add the Kucera Francis library" }, { "role": "assistant", "content": "__author__ = 's7a'\n\n\n# The Kucera Francis class\nclass KuceraFrancis:\n\n # Constructor for the Kucera Francis class\n def __init__(self, dict_file):\...
python
new_file
1
3
mit
ebc4f60368a1ca3216621c74733059125b565940
Somsubhra/Simplify,Somsubhra/Simplify,Somsubhra/Simplify
src/lexus/kucera_francis.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement a base job validator using DRF serializers." }, { "role": "assistant", "content": "from rest_framework import serializers\n\n\nclass JobValidator(serializers.Serializer):\n \"\"\"\n A serializer class for validati...
python
new_file
1
6
mit
90f94d18f6ce4d165ad67ccfdc93c0eefdcb0c69
learningequality/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri
kolibri/core/tasks/validation.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add speed test in examples" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport initExample\nfrom lase.core import KClient\nfrom lase.drivers import Oscillo\n\nimport numpy as np\nimport...
python
new_file
2
3
mit
f144f3a36c6011203a6b1d396233e64e7a8dc089
Koheron/lase
examples/speed_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add State to transform between references" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimport rospy\nimport tf\n\n\nclass TF_transformation:\n \"\"\"\n Transformation from a reference to another\n\n -...
python
new_file
2
2
bsd-3-clause
4117649358d34bc6f18868d19f1e0e1f4b38f699
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
sara_flexbe_states/src/sara_flexbe_states/TF_transform.py
accepted
null
true