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 scipy sin cos example" }, { "role": "assistant", "content": "\"\"\" Given the set of points generated by\nf(x) = 0.5 * cos(2 * x) + 2 * sin(0.5 * x) with some noise,\nuse Levenberg-Marquardt algorithm to find the model of the...
python
new_file
3
2
mit
3764459fb9a8995a1476cc7a36c88a98dc9d4685
truongduy134/levenberg-marquardt,truongduy134/levenberg-marquardt,truongduy134/levenberg-marquardt
scipy-example/fitsincos.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test file to get started with APIs" }, { "role": "assistant", "content": "from ringcentral import SDK\nfrom config import USERNAME, EXTENSION, PASSWORD, APP_KEY, APP_SECRET, SERVER\n\n# Before you start\n# Rename credentials-samp...
python
new_file
1
0
mit
a066aba57d828d25a692ae1dda31797ea7046ddf
ringcentral/ringcentral-python
test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for pypuppetdbquery.parse()" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n#\n# This file is part of pypuppetdbquery.\n# Copyright © 2016 Chris Boot <<EMAIL>>\n#\n# Licensed under the Apache Licen...
python
new_file
1
1
apache-2.0
980cf50a2bf6c42cbd689c1b7e1abcadd45f0f1e
bootc/pypuppetdbquery
tests/test_frontend.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add field to render image many-to-many as checkboxes with thumbnails." }, { "role": "assistant", "content": "from django import forms\nfrom django.template import Context, Template\n\nclass ProductImageMultipleChoiceField(forms.M...
python
new_file
1
3
bsd-3-clause
4091fa177dcaeaac0a36fefee8f5b3cac4c6202b
sonofatailor/django-oscar,sonofatailor/django-oscar,sonofatailor/django-oscar,sonofatailor/django-oscar
oscar/apps/dashboard/catalogue/fields.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add work for Exercise 24" }, { "role": "assistant", "content": "print \"Let's practice everything.\"\nprint 'You\\'d need to know \\'bout escapes with \\\\ that do \\n newlines and \\t tabs.\"\n\npoem = \"\"\"\n\\t the lovely wor...
python
new_file
null
null
mit
dd0fd45f1324696144267da78a6fe62a8fc346cf
jaredmanning/learning,jaredmanning/learning
lpthw/ex24.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write python code for the following: ENH: Add testing for C extensions\n\nTesting compares matrices calculated by python algorithms to\nthose calculated by the C extension. Tests the calculation of\nsurface area in a similar manner. Testing fails if C extension\nis not availabl...
python
new_file
1
5
bsd-3-clause
767f241a930ac0dea5fd3cb7fcb3dc6837d5648b
Radiomics/pyradiomics,Radiomics/pyradiomics,Radiomics/pyradiomics,Radiomics/pyradiomics
tests/test_cmatrices.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new dev server to replace tape" }, { "role": "assistant", "content": "\"\"\"Hacked-together development server for feedreader.\n\nRuns the feedreader server under the /api prefix, serves URI not containing a\ndot public/index...
python
new_file
1
1
mit
55ee1a6609a5dfd922cce78fd4faeb64cd2d3c7d
tdryer/feeder,tdryer/feeder
run.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a RequireModule decorator for use by helpers\n\nThis eliminates the need for _require in helpers." }, { "role": "assistant", "content": "class RequireModule(object):\n \"\"\"Decorator that raises import error if specified ...
python
new_file
1
2
mit
b54f1755d6f792a97eaa06a83cadbb72d045402f
blaix/testtube,thomasw/testtube,beck/testtube
testtube/decorators.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for setting retina annotation permissions" }, { "role": "assistant", "content": "# Generated by Django 2.1.7 on 2019-02-25 12:28\n\nfrom django.db import migrations\nfrom django.contrib.auth.models import User, Grou...
python
new_file
3
7
apache-2.0
c49f193c1ad516bfec52eab64c7dc2508d35f53d
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
app/grandchallenge/retina_core/migrations/0002_auto_20190225_1228.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add monitor script for website." }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport urllib2\nfrom BeautifulSoup import BeautifulSoup\nfrom StringIO import StringIO\nfrom datetime import datetime, timedelta\nimport ...
python
new_file
4
2
mit
7fc5855aa3aa7e554aeb6faf9ae05567c7a4910c
bjowi/newsdiffs,flupzor/newsdiffs,amandabee/newsdiffs,flupzor/bijgeschaafd,bjowi/newsdiffs,flupzor/bijgeschaafd,catcosmo/newsdiffs,flupzor/newsdiffs,catcosmo/newsdiffs,catcosmo/newsdiffs,flupzor/bijgeschaafd,COLABORATI/newsdiffs,COLABORATI/newsdiffs,flupzor/newsdiffs,bjowi/newsdiffs,flupzor/bijgeschaafd,flupzor/newsdif...
monitor_website_status.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add dummy Simprocedure for java.lang.string.equals" }, { "role": "assistant", "content": "from ..java import JavaSimProcedure\nimport logging\n\nl = logging.getLogger('angr.procedures.java.string.equals')\n\nclass StringEquals(J...
python
new_file
1
1
bsd-2-clause
d95181d8de55c77e10aca390a40074d5ef0a7bb2
schieb/angr,schieb/angr,iamahuman/angr,angr/angr,angr/angr,schieb/angr,angr/angr,iamahuman/angr,iamahuman/angr
angr/procedures/java_lang/string_equals.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example of catalog copying into MovieLister example" }, { "role": "assistant", "content": "\"\"\"A naive example of dependency injection in Python.\n\nExample implementation of dependency injection in Python from Martin Fowle...
python
new_file
9
1
bsd-3-clause
f89ba4c5a9ada2ce84c9d46d6100fc5aec13f758
rmk135/dependency_injector,rmk135/objects,ets-labs/python-dependency-injector,ets-labs/dependency_injector
examples/stories/movie_lister/apps_db_csv.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add unit tests for queue.file\n\ntests/queue/test_file.py\n\t-Add a bunch of `unittest` unit tests for most/all of the\n\tfunctions in `tilequeue.queue.file`, as per all of the recent\n\twork there." }, { "role": "assistant", "co...
python
new_file
1
3
mit
2a25e583933325c032c53e885b6dcac04e8061bb
tilezen/tilequeue,mapzen/tilequeue
tests/queue/test_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement reading from data files\n\nReads files and stores contents in new DataSentence/DataToken constructions." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom collections import OrderedDict\n\n\nclass Data...
python
new_file
1
5
mit
1340ff25daef84e66841476eaff9446886cda0b5
pdarragh/MinSem
minsem.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple driller list serializer" }, { "role": "assistant", "content": "from rest_framework import serializers\nfrom registries.models import Organization\nfrom gwells.models import ProvinceState\n\nclass DrillerListSerializer(...
python
new_file
3
0
apache-2.0
868c29b23d74ef2dced64eed545995d43f0256ef
rstens/gwells,rstens/gwells,bcgov/gwells,rstens/gwells,rstens/gwells,bcgov/gwells,bcgov/gwells,bcgov/gwells
registries/serializers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test cases for UrbanDict plugin" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n###\n# Copyright (c) 2004, Kevin Murphy\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or with...
python
new_file
6
1
bsd-3-clause
4dd4557796acca3046806a9504d8d6bcb78ca16d
kblin/supybot-gsoc,ProgVal/Limnoria-test,raboof/supybot,Ban3/Limnoria,Ban3/Limnoria,jeffmahoney/supybot,mazaclub/mazabot-core,buildbot/supybot,mazaclub/mazabot-core,frumiousbandersnatch/supybot-code,prashantpawar/supybot-rothbot,ProgVal/Limnoria-test,haxwithaxe/supybot
test/test_UrbanDict.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add Elasticsearch mapping test case" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"Elasticsearch client test cases.\"\"\"\n\nimport unittest\n\nfrom sqlalchemy import types as sql_types\n\nfrom esis.es impo...
python
new_file
1
1
mit
263194056dbd749681f36823b77bb0ba2c76e379
jcollado/esis
tests/test_es.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add copying of selected photos to a new directory" }, { "role": "assistant", "content": "import pandas as pd\n\ndef main():\n \n # create a directory for selected photos\n print 'mkdir photos_las_vegas_food_drinks'\n\n ...
python
new_file
3
2
mit
390430b676d88dbe26d28a5551257b3013aee19b
aysent/yelp-photo-explorer
copy_selected_photos.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add en and en-US locales back to locale list.\n\nBoth are source locales and shouldn't have been removed." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db i...
python
new_file
3
1
bsd-3-clause
32f48a7f16fe5657ac02ea5c8521ecb068e4ac77
mozilla/pontoon,Osmose/pontoon,mastizada/pontoon,mathjazz/pontoon,vivekanand1101/pontoon,sudheesh001/pontoon,mastizada/pontoon,participedia/pontoon,participedia/pontoon,jotes/pontoon,m8ttyB/pontoon,yfdyh000/pontoon,sudheesh001/pontoon,jotes/pontoon,vivekanand1101/pontoon,Osmose/pontoon,Osmose/pontoon,sudheesh001/pontoo...
pontoon/base/migrations/0013_add_en_US.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add fake params from test." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\n\nDATASET_PATH = os.path.join(\n os.path.dirname(__file__),\n 'test_dataset',\n)\n\nDATASET_SU...
python
new_file
1
0
mit
b12dd992da93d43e5acf1d42cee0f7d34f8367bf
benigls/spam,benigls/spam
spam/tests/fake_params.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix PlotReport.available and write test" }, { "role": "assistant", "content": "import unittest\n\nfrom chainer.training import extensions\n\n\nclass TestPlotReport(unittest.TestCase):\n\n def test_available(self):\n try...
python
new_file
1
2
mit
610396a7caa1c23532369d4bc5e382dbc21cba60
ktnyt/chainer,hvy/chainer,jnishi/chainer,anaruse/chainer,chainer/chainer,okuta/chainer,cupy/cupy,niboshi/chainer,cupy/cupy,ysekky/chainer,niboshi/chainer,keisuke-umezawa/chainer,tkerola/chainer,okuta/chainer,chainer/chainer,ktnyt/chainer,rezoo/chainer,wkentaro/chainer,jnishi/chainer,aonotas/chainer,keisuke-umezawa/chai...
tests/chainer_tests/training_tests/extensions_tests/test_plot_report.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Call quicksort from Python; it works!" }, { "role": "assistant", "content": "#!/usr/bin/env python3\n\nimport numpy as np\nimport rust_sorting as rs\n\n\narray = np.zeros((5,), dtype=np.int8)\n\n\nrs.quicksort(array)\n\nprint(\"P...
python
new_file
1
0
bsd-3-clause
82943db5942f6d0749776efb1b1acf928af97a1c
nbigaouette/rust-sorting,nbigaouette/rust-sorting,nbigaouette/rust-sorting
example.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add hooks for inference experiments." }, { "role": "assistant", "content": "from bayeslite.shell.hook import bayesdb_shell_cmd\nfrom bdbcontrib.general_utils import ArgparseError, ArgumentParser\n\nimport bdbexp\n\nexperiments = ...
python
new_file
3
5
apache-2.0
78e84abea9b0cc41bdb1aa8b9ea5c9953a37941d
probcomp/bdbcontrib,probcomp/bdbcontrib
bdbcontrib/contrib_exp.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tool to fix IO tilegrid\n\nSigned-off-by: David Shah <<EMAIL>>" }, { "role": "assistant", "content": "import database\nimport tiles\nimport json\nfrom os import path\n\n\"\"\"\nDespite Lattice assigning them the same tile typ...
python
new_file
1
0
isc
c860d536710d2d9546924b00aef7de4f516e38a5
gatecat/prjoxide,gatecat/prjoxide,gatecat/prjoxide
tools/fixup_io_tilegrid.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Select a subset for each label. If the label image count is greater\nthan min, return the greatest number of images less than or equal to the max.\nThe images will be evenly distributed across years, seasons and days." }, { "role": ...
python
new_file
1
5
mit
c0f06b64c15d74be26be2cd9e6d593e5c5cae2a9
hypraptive/bearid,hypraptive/bearid,hypraptive/bearid
tools/xml_select_minmax.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Use the model to classify face in local camera." }, { "role": "assistant", "content": "import openface\nimport numpy as np\nimport os\nimport cv2\nimport pickle\n\nid_name = [\"Alec\", \"Greg\", \"Phong\", \"Emil\"]\n\n\ndef clas...
python
new_file
3
1
apache-2.0
5e1c8f5bbe3cd8927b60a08b2784f7d2ea8263f2
xphongvn/smart-attendance-system-ta,xphongvn/smart-attendance-system-ta,xphongvn/smart-attendance-system-ta
src/backend/live_classify_local_camera.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a Nano installer for Windows\n\n1. Downloads and installs Nano into the users home directory\n2. Adds Nano to the path\n3. Makes Nano the default editor" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\n\"\"\"So...
python
new_file
1
2
bsd-2-clause
f4e0254eada3a6dd3aaa794926c5cc82e993b180
selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest,selimnairb/2014-02-25-swctest
setup/bin/swc-nano-installer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a regression test case for alias execution and live action context user.\n\nVerify that the user inside the context is correctly set to the authenticated\nuser which triggered the alias execution." }, { "role": "assistant", "...
python
new_file
1
1
apache-2.0
50b2dccd24c756f5f09e6b9f4e2442abeed7f5c7
Plexxi/st2,StackStorm/st2,lakshmi-kannan/st2,nzlosh/st2,pixelrebel/st2,dennybaa/st2,pixelrebel/st2,pixelrebel/st2,peak6/st2,StackStorm/st2,peak6/st2,punalpatel/st2,dennybaa/st2,lakshmi-kannan/st2,armab/st2,emedvedev/st2,tonybaloney/st2,dennybaa/st2,tonybaloney/st2,armab/st2,lakshmi-kannan/st2,punalpatel/st2,peak6/st2,P...
st2api/tests/unit/controllers/v1/test_alias_execution_rbac.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import g, Blueprint\nfrom flask.ext.login import login_required, login_user\n\nfrom social.actions import do_auth, do_complete, do_disconnect\nfrom social.apps.flask_app.utils import strategy\n\n\nsocial_auth = Blueprint('social'...
python
edit
1
4
bsd-3-clause
c73b8a7503f21e16171ea1b0b40180bd1624f4d3
lamby/python-social-auth,lneoe/python-social-auth,henocdz/python-social-auth,ononeor12/python-social-auth,cjltsod/python-social-auth,JJediny/python-social-auth,henocdz/python-social-auth,henocdz/python-social-auth,ariestiyansyah/python-social-auth,mathspace/python-social-auth,rsteca/python-social-auth,jneves/python-soc...
social/apps/flask_app/routes.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement Token and Not, And, Or classes" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n\nclass TreeElement(object):\n def __repr__(self):\n return u'{}'.format(self.__class__.__name__)\n\n\nclass Tok...
python
new_file
1
3
mit
fbbd0a3f55c1e79ebf6ae7b872697611740edb24
hackebrot/i-am-bool
foobar.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add gateway monitor Windows service" }, { "role": "assistant", "content": "#\r\n# A sample service to be 'compiled' into an exe-file with py2exe.\r\n#\r\n# See also\r\n# setup.py - the distutils' setup script\r\n# setup.cfg...
python
new_file
1
1
mit
910793402dccc02c853618f93917c5f42c42a3da
isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway,isis-ammo/ammo-gateway
GatewayMonitor/GatewayMonitorService.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: [RM-11742] Add tests for argparse purge\n\nSigned-off-by: Travis Rhoden <<EMAIL>>" }, { "role": "assistant", "content": "import pytest\n\nfrom ceph_deploy.cli import get_parser\n\n\nclass TestParserPurge(object):\n\n def setup...
python
new_file
1
1
mit
201e63722b102ee453610a955e3014d3c772a8fa
osynge/ceph-deploy,codenrhoden/ceph-deploy,Vicente-Cheng/ceph-deploy,SUSE/ceph-deploy,branto1/ceph-deploy,imzhulei/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,ceph/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,Vicente-Cheng/ceph-deploy,isyippee/ceph-deploy,zhouyuan/ceph-deploy,ceph/ceph-deploy,zhouyuan/ceph-deploy,shenhequ...
ceph_deploy/tests/parser/test_purge.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create method for redirect after signin" }, { "role": "assistant", "content": "from django.conf import settings\n\nfrom grandchallenge.subdomains.utils import reverse\n\n\ndef signin_redirect(redirect=None, user=None):\n \"\"\...
python
new_file
1
4
apache-2.0
b1083460378166b23bfe379dfb228d4cf5236255
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
app/grandchallenge/profiles/utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add simple plugin that times ansible-playbook runs." }, { "role": "assistant", "content": "import os\nimport datetime\nfrom datetime import datetime, timedelta\n\n\nclass CallbackModule(object):\n \"\"\"\n This callback mod...
python
new_file
3
1
mit
d2c83bf007a36a47754ec862d592c7c97b3145b9
thaim/ansible,thaim/ansible
plugins/callbacks/timer.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Build code depending on resources from the appcompat library with both Buck and Gradle\n\nReviewed By: sdwilsh\n\nDifferential Revision: D2844961\n\nfb-gh-sync-id: 686a9f253eb370a9dc8cc33ca1c4e8453f89210a" }, { "role": "assistant", ...
python
new_file
1
1
bsd-3-clause
b9a8be97bc445edac024a35d644d5c86419a7f3a
hammerandchisel/react-native,jaggs6/react-native,ultralame/react-native,alin23/react-native,yamill/react-native,doochik/react-native,iodine/react-native,Swaagie/react-native,facebook/react-native,exponentjs/react-native,corbt/react-native,makadaw/react-native,arthuralee/react-native,jevakallio/react-native,forcedotcom/...
ReactAndroid/src/main/third-party/android-support-for-standalone-apps/v7/appcompat/res-unpacker.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add extension to search JIRA for bug reports" }, { "role": "assistant", "content": "import re\nimport urllib.parse\n\nfrom discord.ext import commands\nfrom discord.ext.commands import Context\n\nfrom cogbot.cog_bot import CogBot...
python
new_file
1
2
mit
64f820b18190034a2285e996cd2f66fc100c2f54
Arcensoth/cogbot
cogbot/extensions/jira.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for User model" }, { "role": "assistant", "content": "from django.test import TestCase\n\nfrom administrator.models import User, UserManager\n\n\nclass UserManagerTestCase(TestCase):\n valid_email = 'example@example....
python
new_file
1
1
mit
cf4dc3f65049c23f4a20140cf5092f3c5a771a6a
Social-projects-Rivne/Rv-025.Python,Social-projects-Rivne/Rv-025.Python,Social-projects-Rivne/Rv-025.Python
administrator/tests/models/test_user.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Write tests for active and inactive list routes" }, { "role": "assistant", "content": "import pytz\nfrom datetime import datetime, timedelta\nfrom django.test import TestCase\n\nfrom api.factories import TopicFactory\nfrom rest_f...
python
new_file
1
2
mit
1103c498635480d516eeebbec615f8d13db51bb7
frostblooded/kanq,frostblooded/kanq,frostblooded/kanq,frostblooded/kanq,frostblooded/kanq
api/tests/test_topic_api.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic api version test coverage\n\nChange-Id: Idb04e81ce5954ca8b5e387dc7c0776fdf7d08779" }, { "role": "assistant", "content": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file e...
python
new_file
1
1
apache-2.0
fb876d0ddc12fa89db5e3bec519ad4e93e914b8d
openstack/designate,openstack/designate,openstack/designate
designate/tests/unit/api/test_version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Migrate documentation_type from Project to Version" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.27 on 2020-01-14 17:40\n\nfrom django.db import migrations\nfrom django.db.models impor...
python
new_file
1
1
mit
964895852bb9acbe866c1a7bc7ba98b972100fa8
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
readthedocs/builds/migrations/0014_migrate-doctype-from-project-to-version.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add url rewriter for shortened urls" }, { "role": "assistant", "content": "from __future__ import unicode_literals, division, absolute_import\nimport logging\nfrom urlparse import urlparse\n\nfrom flexget import plugin\nfrom flex...
python
new_file
3
1
mit
6e02077b0aab178a2d8100a26811a485a74852f2
ratoaq2/Flexget,gazpachoking/Flexget,qvazzler/Flexget,Flexget/Flexget,X-dark/Flexget,poulpito/Flexget,LynxyssCZ/Flexget,offbyone/Flexget,poulpito/Flexget,X-dark/Flexget,sean797/Flexget,malkavi/Flexget,tsnoam/Flexget,JorisDeRieck/Flexget,Pretagonist/Flexget,jawilson/Flexget,OmgOhnoes/Flexget,Pretagonist/Flexget,qvazzler...
flexget/plugins/urlrewrite_shortened.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example test for non-terminating checks" }, { "role": "assistant", "content": "from seleniumbase import BaseCase\n\n\nclass MyTestClass(BaseCase):\n\n def test_non_terminating_checks(self):\n self.open('http://xkcd....
python
new_file
1
1
mit
48a37b00bb73ea0398644e0eb22c50c34919b325
mdmintz/SeleniumBase,possoumous/Watchers,possoumous/Watchers,ktp420/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,ktp420/SeleniumBase,ktp420/SeleniumBase,possoumous/Watchers,mdmintz/seleniumspot,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/Sele...
examples/non_terminating_checks_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for download of game summaries" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport itertools\nimport tempfile\nfrom zipfile import ZipFile\n\nfrom utils.summary_dow...
python
new_file
null
null
mit
c008d60fda4f3e3d58d123ab4a972016e669a7dc
leaffan/pynhldb
tests/test_summary_downloader.py
rejected_code_smell
Internal duplication: ~29% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write python code for the following: Add jury to 2012-2014 - take the data from results pages" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom functools import partial\n\nfrom django.db import migrations...
python
new_file
1
3
unlicense
adca0c2ff48b716e9ac3ef706d66d86943fb29b7
kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by
cpm_data/migrations/0015_add_jury_members_to_seasons_12_14.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for protected tags" }, { "role": "assistant", "content": "from gitlabform.gitlabform.test import (\n run_gitlabform,\n)\n\n\nclass TestArchiveProject:\n def test__archive_project(self, gitlab, group, project):\n ...
python
new_file
1
1
mit
3075a2dfcd51b932fd142e51e6bdc1694ab4e750
egnyte/gitlabform,egnyte/gitlabform
gitlabform/gitlabform/test/test_tags.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Read Dakota tabular graphics output file" }, { "role": "assistant", "content": "\"\"\"Make plots of the results of Dakotathon experiments.\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as mpl\n\n\n\ndef read_dat_header(da...
python
new_file
3
2
mit
1ac9175d661cc3d42416f3f55c5c8212467c612c
mdpiper/AGU-2016
make_plots.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: TST: Add a test for TripWire." }, { "role": "assistant", "content": "\"\"\" Testing tripwire module.\n\"\"\"\n\nfrom ..tripwire import TripWire, is_tripwire, TripWireError\n\nfrom nose import SkipTest\nfrom nose.tools import (ass...
python
new_file
5
2
bsd-3-clause
359726a1085b00936e7e7ee3f876b09f72988921
StongeEtienne/dipy,villalonreina/dipy,villalonreina/dipy,nilgoyyou/dipy,FrancoisRheaultUS/dipy,matthieudumont/dipy,StongeEtienne/dipy,nilgoyyou/dipy,matthieudumont/dipy,FrancoisRheaultUS/dipy
dipy/utils/tests/test_tripwire.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: Add database migration to make all Massgov Eopss URLs absolute." }, { "role": "assistant", "content": "\"\"\"absolute_massgov_eopss_url\n\nRevision ID: a1b42c9006a7\nRevises: 9b30b0fe231a\nCreate Date: 2017-06-26 00:02:45.998655\...
python
new_file
3
2
mit
2ffcae174d7ff10aa816b8fb839c9c0ae6fb3689
RagtagOpen/bidwire,RagtagOpen/bidwire,RagtagOpen/bidwire
bidwire/alembic/versions/a1b42c9006a7_absolute_massgov_eopss_url.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add updated help text for order in networkgroup" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.M...
python
new_file
1
0
mit
d0b98a062eaca03dba53f610bb4b326d769464e9
okfn/website,okfn/foundation,okfn/website,okfn/website,okfn/foundation,okfn/foundation,okfn/foundation,okfn/website
foundation/organisation/migrations/0008_auto_20160707_0752.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add unit test for get_annual_publication_count" }, { "role": "assistant", "content": "import kpub\n\n\ndef test_annual_count():\n # Does the cumulative count match the annual count?\n db = kpub.PublicationDB()\n annual =...
python
new_file
1
1
mit
cfca3ecf6d36611ff0ffe3537f01c2711e94f87e
KeplerGO/kpub
kpub/tests/test_counts.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to generate script from pbm files" }, { "role": "assistant", "content": "import sys\nimport re\n\nwith open(sys.argv[1]) as f:\n magic = f.readline().strip()\n if magic != \"P1\":\n print \"Expected file t...
python
new_file
6
0
mit
38978ce807966a1367ae2ad95dc81f87a08c2ca3
pib/gpio_ssd1306,pib/gpio_ssd1306
pbm2sh.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add a dumps_bytes() helper method to handle Python 2/3 compatibility." }, { "role": "assistant", "content": "# Copyright Least Authority Enterprises.\n# See LICENSE for details.\n\n\"\"\"\nHelpers for Python 2/3 compatibility.\n\...
python
new_file
1
2
mit
5de36454db293c03039bec3c8c628995f07825b0
LeastAuthority/txkube
src/txkube/_compat.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add script to subsample bam file entries" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\"\"\"\n\nThis script subsamples the alignments of a BAM file. For this a\nlikelihood (0.0 < p(keep) < 1.0) of keeping all ali...
python
new_file
3
0
isc
d7f184dd7c41bb3cacba5f77c81ae961b3a12760
konrad/kuf_bio_scripts
subsample_bam_file.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test case for auth protected inputs." }, { "role": "assistant", "content": "from disco.test import DiscoJobTestFixture, DiscoTestCase\n\nfrom disco.ddfs import DDFS\nfrom disco.util import ddfs_name\n\nfrom cStringIO import...
python
new_file
4
1
bsd-3-clause
cf5a5594ebecc03c1087f09575dba1a480b575f3
seabirdzh/disco,pombredanne/disco,ktkt2009/disco,ErikDubbelboer/disco,pooya/disco,pombredanne/disco,pooya/disco,oldmantaiter/disco,pooya/disco,seabirdzh/disco,beni55/disco,ktkt2009/disco,ErikDubbelboer/disco,oldmantaiter/disco,discoproject/disco,simudream/disco,mwilliams3/disco,pavlobaron/disco_playground,ktkt2009/disc...
tests/test_authjob.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Write python code for the following: Add management command to add a refendeum election\n\n- Added to allow us to add Croydon referendum initially, with\nthe possibility of being able to use again in the future as required" }, { "role": "assistant", "content": "from...
python
new_file
1
2
bsd-3-clause
67120e72883d4a5fd86dca2fba26599e65e7ea39
DemocracyClub/EveryElection,DemocracyClub/EveryElection,DemocracyClub/EveryElection
every_election/apps/elections/management/commands/add_referendum.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Decrypt NACL passwords on ext_pillar" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\n'''\nDecrypt pillar data through the builtin NACL renderer\n\nIn most cases, you'll want to make this the last external pillar...
python
new_file
3
1
apache-2.0
827802f111fbe5c2f9a50b74a46afdef5eae2a2d
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/pillar/nacl.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add testcase for pow builtin" }, { "role": "assistant", "content": "# adapted from cython/tests/run/builtin_pow.pyx\n\n\"\"\"\n>>> pow3(2,3,5)\n3\n>>> pow3(3,3,5)\n2\n\n>>> pow3_const()\n3\n\n>>> pow2(2,3)\n8\n>>> pow2(3,3)\n27\n...
python
new_file
5
1
bsd-2-clause
71b308f123aff1b4498fe14188380a6352d34d49
stefanseefeld/numba,GaZ3ll3/numba,sklam/numba,gdementen/numba,numba/numba,gmarkall/numba,cpcloud/numba,gmarkall/numba,pitrou/numba,jriehl/numba,sklam/numba,pombredanne/numba,stonebig/numba,pitrou/numba,gdementen/numba,shiquanwang/numba,cpcloud/numba,stefanseefeld/numba,stefanseefeld/numba,pitrou/numba,stuartarchibald/n...
numba/tests/builtins/test_builtin_pow.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write python code for the following: TST: Add tests for combining functions" }, { "role": "assistant", "content": "from __future__ import division, print_function, absolute_import\n\nfrom nose.plugins.attrib import attr\nfrom nose.tools import assert_raises, raises\...
python
new_file
5
1
bsd-2-clause
9d501aaa9d443e450224388854f053683ca2baae
qqqube/permute,statlab/permute,kellieotto/permute,jarrodmillman/permute,kellieotto/permute
permute/tests/test_npc.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\nimport optparse\nimport sys\n# Install the Python unittest2 package before you run this script.\nimport unittest2\n\nUSAGE = \"\"\"%prog SDK_PATH\nRun unit tests for App Engine apps.\nThe SDK Path is probably /usr/local/g...
python
edit
2
2
mit
3e45602583a7760a5fb7b5beb47405b4dddd0f63
josephbisch/the-blue-alliance,1fish2/the-blue-alliance,nwalters512/the-blue-alliance,verycumbersome/the-blue-alliance,phil-lopreiato/the-blue-alliance,fangeugene/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,bdaroz/the-blue-alliance,1fish2/the-blue-alliance,jaredhasenklein/the-blue-alli...
run_tests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Set up logging for a MongoDB cluster" }, { "role": "assistant", "content": "import logging\n\nclass MongoCluster(object):\n\n log = logging.getLogger('Clusters.Mongo')\n log.setLevel(logging.DEBUG)\n ch = logging.StreamH...
python
new_file
1
0
unlicense
4f189c20fc535f780e905e6fee7351329240d8fc
hudl/Tyr
tyr/clusters/mongo.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add queue thread convenience classes." }, { "role": "assistant", "content": "#! /usr/bin/env python\n\nimport threading\nimport time\n\nfrom pika.adapters import BlockingConnection\n\nclass QueueThread(threading.Thread):\n def _...
python
new_file
2
2
bsd-2-clause
02a8a627bfffb1b0cda4455a2c639e92ef1d7a46
flz/portbuild-ng
lib/portbuild/qthreads.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add socket io client example" }, { "role": "assistant", "content": "import websocket, httplib, sys, asyncore\n\n'''\n connect to the socketio server\n 1. perform the HTTP handshake\n 2. open a websocket connection '''\nd...
python
new_file
1
1
mit
feafbefbc7de1f71cfa50af51139c4a09a306012
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
socketio-client.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: feat: Add (currently empty) neural netowrks module" }, { "role": "assistant", "content": "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Apr 27 14:10:49 2017\n\n@author: daniele\n\"\"\"\n\nimport tensorfl...
python
new_file
6
0
mit
ce8dc2152a508ea359159a917ea469a106065503
dangall/Kaggle-MobileODT-Cancer-Screening
modules/neural_network.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add a Python script to get ROM and RAM usage." }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nfrom subprocess import Popen, PIPE\n\n\nclass app(object):\n def __init__(self):\n pass\n\n\nmotolink = app()...
python
new_file
6
1
apache-2.0
17c69212ff5ea1a5991dc89ba1ca7365c8d666c2
romainreignier/robot2017,romainreignier/robot2017,romainreignier/robot2017,romainreignier/robot2017
firmware/common/binsize.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\n\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nimport agate\nimport agateremote\n\nclass TestArchive(agate.AgateTestCase):\n def setUp(self):\n ...
python
edit
3
1
mit
f8b6d9a1bb12087c25e60df03f9f40c435f1a949
wireservice/agate-remote,onyxfish/agate-remote
tests/test_archive.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for player draft items" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom db.player_draft import PlayerDraft\nfrom db.team import Team\n\n\ndef test_find_by_id():\n pdft = P...
python
new_file
1
1
mit
533160e303fd73a8e6f53ebc7e6430bba8888bbb
leaffan/pynhldb
tests/test_player_draft.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add python dynamic class sample" }, { "role": "assistant", "content": "# -*- coding:utf-8 -*-\n\n\nclass CanDoSomething(object):\n\n message = \"You don't have permission\"\n\n def has_permission(self, request, view):\n ...
python
new_file
1
2
mit
c56efa68fbc878d307391910de9c521e5f2a6673
aiden0z/snippets,aiden0z/snippets,aiden0z/snippets,aiden0z/snippets,aiden0z/snippets,aiden0z/snippets
python/dynamic_class.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow different schedulers for compute and volume." }, { "role": "assistant", "content": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright (c) 2010 Openstack, LLC.\n# Copyright 2010 United States Government as represent...
python
new_file
1
3
apache-2.0
e6a57c43a693f71069778ddca3a28d5c73b75830
n0ano/ganttclient
nova/scheduler/multi.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Convert script for .gif -> spritesheet." }, { "role": "assistant", "content": "from AppKit import NSApplication, NSImage, NSImageCurrentFrame, NSGIFFileType; import sys, os\n\ndirname = sys.argv[1]\nfiles = os.listdir(dirname)\nf...
python
new_file
1
0
mit
a04dddb09c276300c9a11dcbbe331ce2a32cff29
Mytherin/PokemonAI,Mytherin/PokemonAI,Mytherin/PokemonAI
convert.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='udiskie',\n version='0.3.8',\n description='Removable disk automounter for udisks',\n author='Byron Clark',\n author_email='<EMAIL>',\n url='http://bitbucket.org/byronclar...
python
edit
1
0
mit
95edd6f6d3076e78b995b9b02e7d32938734cbf2
coldfix/udiskie,khardix/udiskie,coldfix/udiskie,pstray/udiskie,pstray/udiskie,mathstuf/udiskie
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a test for git_branch_list rule" }, { "role": "assistant", "content": "from thefuck import shells\nfrom thefuck.rules.git_branch_list import match, get_new_command\nfrom tests.utils import Command\n\ndef test_match():\n as...
python
new_file
1
1
mit
ba9214f7fca609948130d2ae56bb19805b79d59c
beni55/thefuck,mlk/thefuck,zhangzhishan/thefuck,AntonChankin/thefuck,suxinde2009/thefuck,nvbn/thefuck,NguyenHoaiNam/thefuck,levythu/thefuck,PLNech/thefuck,redreamality/thefuck,thinkerchan/thefuck,princeofdarkness76/thefuck,BertieJim/thefuck,ostree/thefuck,bigplus/thefuck,vanita5/thefuck,beni55/thefuck,sekaiamber/thefuc...
tests/rules/test_git_branch_list.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test on anonymous file" }, { "role": "assistant", "content": "# Copyright 2021 Sean Vig\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Licens...
python
new_file
1
1
apache-2.0
d86d117963ac87bfb11e731ea98d1803b2fcd609
flacjacket/pywayland
test/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Windows support to group add\nAdd, remove and get info on Local Windows Groups" }, { "role": "assistant", "content": "'''\nManage groups on Windows\n'''\n\ndef __virtual__():\n '''\n Set the group module if the kernel ...
python
new_file
6
7
apache-2.0
1dd8120dab6cdec4097bea1193a5b5b68d3bfe4f
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/win_groupadd.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add py solution for 485. Max Consecutive Ones\n\n485. Max Consecutive Ones: https://leetcode.com/problems/max-consecutive-ones/" }, { "role": "assistant", "content": "class Solution(object):\n def findMaxConsecutiveOnes(self, ...
python
new_file
1
3
apache-2.0
acf0b48055c339e67ead4b85c90a07ffdce60bf1
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
py/max-consecutive-ones.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add example for pulling interfaces." }, { "role": "assistant", "content": "#!/usr/bin/env python\nimport requests\nfrom orionsdk import SwisClient\n\n\nnpm_server = 'localhost'\nusername = 'admin'\npassword = ''\n\nverify = False...
python
new_file
1
2
apache-2.0
43cb60efabfdaab77fa2c8eee1a5d8730a321db1
solarwinds/orionsdk-python
samples/query_interfaces.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add silly un-mathy rotation function" }, { "role": "assistant", "content": "from numpy import array, cross, eye, dot\nfrom scipy.linalg import expm3,norm\nfrom math import sin, cos\n\ndef rotate(axis, vector, angle):\n if axis...
python
new_file
6
4
mit
b6e8d93b661b4e65ecc6f5c150fcc1b1a4f26dc3
kirberich/3dscanner
utils.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write python code for the following: Add pythonic way to install" }, { "role": "assistant", "content": "from setuptools import setup\n\nsetup(name='LpSchedule',\n version='0.1',\n description='A API for Lviv Polytechnik schedule',\n author='Stepanov V...
python
new_file
1
0
mit
cecd767ef94f4bc890b8b19d2404528a7c4170bb
stenvix/lpschedule,stepanov-valentin/lpschedule,stepanov-valentin/lpschedule,stenvix/lpschedule,stepanov-valentin/lpschedule,stepanov-valentin/lpschedule,stenvix/lpschedule,stenvix/lpschedule
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a new example of powering on many VMs at once" }, { "role": "assistant", "content": "#!/usr/bin/python\n\nimport time\nimport sys\n\nfrom psphere.client import Client\nfrom psphere.managedobjects import VirtualMachine\n\nscat...
python
new_file
2
0
apache-2.0
d79a7f4e8be3cc9f0eb27da562bd0f1143005368
graphite-server/psphere,jkinred/psphere
examples/power_on_swarm.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name=\"livejson\",\n version=\"0.1\",\n description=\"Bind Python objects to JSON files\",\n long_description=(\"An interface to transparantly bind Python objects to\"\n ...
python
edit
1
0
mit
3811f7072e0d416a04c342ff6cfaec05deda3619
controversial/livejson
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add subprocess trial for webserver app" }, { "role": "assistant", "content": "import subprocess\nimport datetime\nfrom flask import Flask, render_template, redirect, url_for, request\n\napp = Flask(__name__)\n\n\n@app.route('/')\...
python
new_file
1
4
bsd-3-clause
ed7cc112adb6d54f1c2b79b941ab5455a17d9442
kbsezginel/raspberry-pi,kbsezginel/raspberry-pi,kbsezginel/raspberry-pi,kbsezginel/raspberry-pi
FlaskApp/app_ls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Test of the pwd module" }, { "role": "assistant", "content": "import pwd\nimport string\n\nverbose = 0\nif __name__ == '__main__':\n verbose = 1\n\nentries = pwd.getpwall()\n\nfor e in entries:\n name = e[0]\n uid = e[2]...
python
new_file
32
0
mit
eb77b1335afb9d9e29d39ca9ff4e3f0fa3d89a8d
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_pwd.py
rejected_lint
Too many lint violations: 32
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nDefault settings for the ``mezzanine.twitter`` app. Each of these can be\noverridden in your project's settings module, just like regular\nDjango settings. The ``editable`` argument for each controls whether\nthe setting is editable...
python
edit
1
0
bsd-2-clause
358cdd4b89221cbb02e7b04fc83cebb06570b03a
readevalprint/mezzanine,theclanks/mezzanine,dovydas/mezzanine,scarcry/snm-mezzanine,industrydive/mezzanine,ryneeverett/mezzanine,mush42/mezzanine,AlexHill/mezzanine,industrydive/mezzanine,spookylukey/mezzanine,eino-makitalo/mezzanine,Cajoline/mezzanine,Cajoline/mezzanine,webounty/mezzanine,gradel/mezzanine,dekomote/mez...
mezzanine/twitter/defaults.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add basic, and probably incomplete setyp.py." }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom setuptools import setup\nfrom setuptools.command.te...
python
new_file
1
2
bsd-3-clause
673dea4b1415b32adb4eb9cc38c6cfa0f5076f93
achabotl/pambox
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add migration for CaseOffenceFilter model" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migrati...
python
new_file
1
0
mit
ea5bd5fe05c6d2a9580f5ca6c2238971c28e36bc
ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas,ministryofjustice/manchester_traffic_offences_pleas
apps/plea/migrations/0026_caseoffencefilter.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add program to calculate Linear Prediction Coefficients" }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Feb 27 22:01:37 2016\n\n@author: ORCHISAMA\n\"\"\"\n\n#calculate LPC coefficients from...
python
new_file
3
4
mit
4a43bc36f0f3a413b222f2cb1fac316240168aa2
orchidas/Speaker-Recognition
LPC.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Analysis and InPlaceAnalysis base classes for analyzing experiment results." }, { "role": "assistant", "content": "import os\nimport retrying\nimport sys\nfrom .. import BaseAction\nfrom .. import experiments\nfrom ..helpers ...
python
new_file
3
3
mit
512abbbda1fe249ef59b8a416c7c92b195940f27
tsoontornwutikul/mlxm
analysis/__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Check if n and double of n exists" }, { "role": "assistant", "content": "# https://leetcode.com/problems/check-if-n-and-its-double-exist/\n# Given an array arr of integers, check if there exists two integers N and M such that\n# ...
python
new_file
1
7
mit
dd129aa3bb7d2115294a091a347648c423480b6e
anu-ka/coding-problems,anu-ka/coding-problems,anu-ka/coding-problems
Python/check_n_double_n.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Move template filters out of init file" }, { "role": "assistant", "content": "\nimport re\nimport json\n\n\ndef nl2br(value):\n if value:\n _newline_re = re.compile(r'(?:\\r\\n|\\r|\\n)')\n return _newline_re.sub...
python
new_file
1
2
apache-2.0
53be0ba69200c907c8172e255aab84beb19506fb
oldarmyc/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,rackerlabs/pitchfork
pitchfork/template_filters.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests to make CI happy" }, { "role": "assistant", "content": "from bioframe.region import parse_region\nimport pytest\n\n\ndef test_parse_region():\n # UCSC-style names\n assert parse_region(\"chr21\") == (\"chr21\", 0,...
python
new_file
1
1
mit
f4fcb99cc9dec1cf68697520b959569e937dcd33
open2c/bioframe
tests/test_region.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Create test harness for 'Read' and 'ReadParser' classes. (Note: Need to finish writing tests.)" }, { "role": "assistant", "content": "# Tests for the ReadParser and Read classes.\n\n\nimport khmer\nfrom khmer import ReadParser\ni...
python
new_file
3
3
bsd-3-clause
ed05b50ca560db868e760629de883695a787c0cd
kdmurray91/khmer,ged-lab/khmer,jas14/khmer,Winterflower/khmer,Winterflower/khmer,F1000Research/khmer,kdmurray91/khmer,F1000Research/khmer,souravsingh/khmer,souravsingh/khmer,ged-lab/khmer,souravsingh/khmer,ged-lab/khmer,Winterflower/khmer,F1000Research/khmer,kdmurray91/khmer,jas14/khmer,jas14/khmer
tests/test_read_parsers.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add Diagonal Difference HackerRank Problem\n\n* https://www.hackerrank.com/challenges/diagonal-difference" }, { "role": "assistant", "content": "#!/usr/bin/env python\nfrom typing import List\n\ndef get_matrix_row_from_input() ->...
python
new_file
1
2
mit
3b2b72436459dcf58ab07466d5a2ed0425b17962
PlattsSEC/HackerRank,PlattsSEC/HackerRank,PlattsSEC/HackerRank,PlattsSEC/HackerRank,PlattsSEC/HackerRank,PlattsSEC/HackerRank
algorithms/diagonal_difference/kevin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nclass Config(object):\n DEBUG = False\n ASSETS_DEBUG = False\n cache = False\n manifest = True\n\n SQLALCHEMY_COMMIT_ON_TEARDOWN = False\n SQLALCHEMY_RECORD_QUERIES = True\n SQLALCHEMY_DATABASE_URI = 'pos...
python
edit
1
0
mit
7c7d0701dddf54006ba87e3e785caab6e53bd68a
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin
config.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add tests for classify() method" }, { "role": "assistant", "content": "#!/usr/bin/env python\n# -*- encoding: utf-8\n\nimport unittest\nfrom src.emo_cls import EmoClassifier\nfrom src.ec_settings import POS, NEG, NO_CLASS\n\nec =...
python
new_file
3
1
mit
19c652d9b5740e08219d1bc5688f663c7c7ab848
wojtekwalczak/EmoClassifier
test/test_emo_cls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test to check range ghost are removed" }, { "role": "assistant", "content": "from dtest import Tester\nfrom tools import *\nfrom assertions import *\n\nimport os, sys, time\nfrom ccmlib.cluster import Cluster\n\nclass TestRan...
python
new_file
9
3
apache-2.0
511522f2e0d6399191d79e393ed6f14d3a843550
thobbs/cassandra-dtest,snazy/cassandra-dtest,carlyeks/cassandra-dtest,krummas/cassandra-dtest,beobal/cassandra-dtest,thobbs/cassandra-dtest,tjake/cassandra-dtest,pcmanus/cassandra-dtest,spodkowinski/cassandra-dtest,aweisberg/cassandra-dtest,stef1927/cassandra-dtest,pauloricardomg/cassandra-dtest,snazy/cassandra-dtest,m...
range_ghost_test.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Write python code for the following: Add script to extract table of propulsion methods\n\nTODO: Organize code" }, { "role": "assistant", "content": "from lxml import etree\nfrom urllib.request import urlopen\n\nimport pandas as pd\n\nDATA_URL = \"https://en.wikipedi...
python
new_file
1
0
mit
3c94874e1ad30325cb0464eec956d55c97130233
Juanlu001/pfc-uc3m
clean_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a logistic regression example" }, { "role": "assistant", "content": "import os\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom keras.models import Sequential\nfrom keras.layers.core import Dense, Activation\n\n\"...
python
new_file
1
5
mit
72c6c2a4ea2e3ddaacad4fb5376b6a48a12db200
aidiary/keras_examples,aidiary/keras_examples
logistic_regression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom os.path import dirname, abspath\n\nfrom django.conf import settings\n\nif not settings.configured:\n settings.configure(\n DATABASE_ENGINE = 'sqlite3',\n INSTALLED_APPS = [\n ...
python
edit
1
2
mit
02b57a47f3ee117b6b32e248c698366469be1a5b
jayfk/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m,coleifer/django-generic-m2m,jayfk/django-generic-m2m
runtests.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add test for nonce generation" }, { "role": "assistant", "content": "import unittest\nfrom nonce import *\n\nclass NonceTestCase(unittest.TestCase):\n\n def test_nonces(self):\n nonces = generate_nonces(42560, 661771, 4...
python
new_file
3
1
mit
4a8a2aa12134dab63632e594c900dbfd93129f97
openaps/openomni,openaps/openomni,openaps/openomni
openomni/nonce_test.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Include script to get users from jamdb lookit" }, { "role": "assistant", "content": "import requests\nimport json\n\nJAMDB_AUTHORIZATION_TOKEN = 'JWT_SECRET_TOKEN'\n# To set this make this request\n# POST https://metadata.osf.io/...
python
new_file
1
4
apache-2.0
901c484590367e5e6c98d6f30d355fd6b9707861
CenterForOpenScience/lookit-api,CenterForOpenScience/lookit-api,CenterForOpenScience/lookit-api
get_jamdb_users.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Dummy(object):\n sum = max = min = count = distinct = mean = variance = stdev = None\n\ntry:\n from pyspark import SparkContext\n import pyspark\n from pyspark.rdd import RDD\n RDD.min\nexcept (AttributeError, ImportErr...
python
edit
1
1
bsd-3-clause
56d444a1233b027718e0f7bfdf2c7d27b4de45d4
cpcloud/odo,blaze/odo,ContinuumIO/odo,ContinuumIO/odo,blaze/odo,quantopian/odo,alexmojaki/odo,ywang007/odo,cpcloud/odo,ywang007/odo,cowlicks/odo,Dannnno/odo,alexmojaki/odo,Dannnno/odo,quantopian/odo,cowlicks/odo
into/backends/spark.py
accepted
null
true