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": "Here is the current file:\n```python\nimport json\nimport pytest\nfrom path import Path\n\nfrom formica import cli\n\n\n@pytest.fixture\ndef logger(mocker):\n return mocker.patch('formica.cli.logger')\n\n\ndef test_template_calls_template(tmpdir, logger):\n with Path(tmpd...
python
edit
1
1
mit
d63463d8dc8acb4445b01fcebeeb6a20ea1d7b9b
flomotlik/formica
tests/unit/test_template.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Fix error identified by flake8." }, { "role": "assistant", "content": "import tilequeue.query.postgres\n\nmake_db_data_fetcher = tilequeue.query.postgres.make_db_data_fetcher\n" } ]
python
new_file
1
0
mit
cd71740daaf4f1f770b7d6959e2865ed50b76bd7
mapzen/tilequeue,tilezen/tilequeue
tilequeue/query/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nA light wrapper for Cybersource SOAP Toolkit API\n\"\"\"\nfrom setuptools import setup\nimport pycybersource\n\nsetup(\n name='pycybersource',\n version=pycybersource.__version__,\n description='A lig...
python
edit
1
0
bsd-3-clause
148866c1c2b18afcc6da5c55632d20bfdec4004a
SideStudios/pycybersource
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import patterns, include, url\n\nfrom .views import *\n\n\nurlpatterns = patterns('',\n url(r'^pjson/push$', pjson_provider_push, n...
python
edit
9
0
apache-2.0
3581c3c71bdf3ff84961df4b328f0bfc2adf0bc7
TransparentHealth/hhs_oauth_client,TransparentHealth/hhs_oauth_client,TransparentHealth/hhs_oauth_client,TransparentHealth/hhs_oauth_client
apps/provider/urls.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Test that sos kernel is installed\n\nimport jupyter_client\n\ntry:\n jupyter_client.kernelspec.get_kernel_spec('sos')\nexcept jupyter_client.kernelspec.NoSuchKernel:\n print('sos kernel was not installed')\n print('The following ...
python
edit
3
1
bsd-3-clause
0946379d23131aeec07dc29bebd4e57d95298d00
SylvainCorlay/staged-recipes,synapticarbors/staged-recipes,jochym/staged-recipes,mcs07/staged-recipes,ceholden/staged-recipes,igortg/staged-recipes,goanpeca/staged-recipes,johanneskoester/staged-recipes,isuruf/staged-recipes,scopatz/staged-recipes,chrisburr/staged-recipes,petrushy/staged-recipes,asmeurer/staged-recipes...
recipes/sos-notebook/run_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2010 Peter Teichman\n\nimport math\nimport time\n\ndef singleton(cls):\n instances = {}\n def getinstance():\n if cls not in instances:\n instances[cls] = cls()\n return instances[cls]\n ret...
python
edit
3
3
mit
0e6646de573dc04360634828cdb3b7da8cc31d2b
meska/cobe,pteichman/cobe,DarkMio/cobe,wodim/cobe-ng,LeMagnesium/cobe,tiagochiavericosta/cobe,wodim/cobe-ng,DarkMio/cobe,LeMagnesium/cobe,meska/cobe,tiagochiavericosta/cobe,pteichman/cobe
cobe/instatrace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport skyfield # safe, because __init__.py contains no import statements\n\nsetup(\n name='skyfield',\n version=skyfield.__version__,\n description=skyfield.__doc__.split('\\n', 1)[0],\n long_...
python
edit
1
0
mit
c54ea6322177f8665173ae0faa2d34d37a70dea6
skyfielders/python-skyfield,skyfielders/python-skyfield
setup.py
rejected_duplicate
Near-duplicate of sample 23516
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport sys\nf = open ('/var/local/meTypesetTests/tests/testOutput/'+sys.argv[1] +'/nlm/out.xml', \"r\")\nprint (\"open operation complete\")\nfd = f.read()\ns = ''\n\nfd = \npattern = re.compile(r'(?:(&#\\d*|>))(.*?)(?=(&#\\d*|<)...
python
edit
1
0
mit
3d2f9087e62006f8a5f19476ae23324a4cfa7793
jnicolls/meTypeset-Test,jnicolls/Joseph
regex.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def run(s...
python
edit
1
1
bsd-3-clause
f13f80db99ed43479336b116e38512e3566e4623
consbio/parserutils
setup.py
rejected_duplicate
Near-duplicate of sample 5411
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nwith open('README.rst') as readme:\n description = readme.read()\n\n\nsetup(\n name='mfl',\n version='2.0.0',\n description='Master falicity list',\n long_description=(descriptio...
python
edit
1
0
mit
b729b8bb5a3b65b6e8c09455b0db21e7df59dd8a
urandu/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api,urandu/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,urandu/mfl_api
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\n\nversion = '1.3'\n\n\nlong_desc = \"\"\"\nnose-perfdump is a Nose plugin that collects per-test performance metrics into an\nSQLite3 database and reports the slowest t...
python
edit
1
0
bsd-3-clause
b7da1cac55665b71678abbda144c9f589e6c8b11
etscrivner/nose-perfdump
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='djangorestframework-httpsignature',\n version='0.2.1',\n url='https://github.com/etoccalino/django-rest-framework-httpsignature',\n\n license='LICENSE.txt',\n description='HTTP...
python
edit
1
0
mit
d04d3ac7eefce9d37e2c62d68a856fafd41d3877
pombredanne/django-rest-framework-httpsignature,etoccalino/django-rest-framework-httpsignature,etoccalino/django-rest-framework-httpsignature,pombredanne/django-rest-framework-httpsignature
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='pyaavso',\n version=__import__('pyaavso').__version__,\n descripti...
python
edit
1
1
mit
13e1fc4ca4ed80f24b6b1532d162197af8df55f2
zsiciarz/pyaavso
setup.py
rejected_duplicate
Near-duplicate of sample 5654
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',...
python
edit
1
2
mit
8da94ee88cf4bf768e16e21ad8b3626970692e27
Doist/todoist-python
setup.py
rejected_duplicate
Near-duplicate of sample 2235
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport codecs\nfrom setuptools import find_packages\nfrom setuptools import setup\nimport sys\n\ninstall_requires = [\n 'cached-property',\n 'chainer>=2.0.0',\n 'future',\n 'gym>=0.9.7',\n 'numpy>=1.10.4',\n 'pillow',\n ...
python
edit
1
0
mit
7f3f2802fb3c00baf440ebdc10920ad0b48118f9
toslunar/chainerrl,toslunar/chainerrl
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\ndef read(name):\n return open(os.path.join(os.path.dirname(__file__), name)).read()\n\nsetup(\n name='python-dxf',\n version='7.5.0',\n description=\"Package for accessing a Docker v2 r...
python
edit
1
1
mit
bd7cab646b6ead140b62ed19b5378567c76bad9d
davedoesdev/dxf,davedoesdev/dxf,davedoesdev/dxf,davedoesdev/dxf
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nDJ-Database-URL\n===============\n\nThis simple Django utility allows you to utilize the\n`12factor <http://www.12factor.net/backing-services>`_ inspired\n``REDIS_URL`` environment variable to configure your D...
python
edit
1
0
bsd-2-clause
ccd5dce9b4e2392abdf205d2913736a6ce47ae0b
dstufft/dj-redis-url
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom codecs import open\nfrom os import path\n\n\n_HERE = path.abspath(path.dirname(__file__))\n\n\ndef read(*names, **kwds):\n return open(\n path.join(_HERE, *names),\n encodin...
python
edit
1
2
mit
df9379a370163ac0d9ca3daf99745c1d1fb7dc19
csdms/wmt-exe,csdms/wmt-exe,csdms/wmt-exe,csdms/wmt-exe
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport actorcore.ICC\n\nclass OurActor(actorcore.ICC.ICC):\n def __init__(self, name,\n productName=None, configFile=None,\n modelNames=(),\n debugLevel=30):\n\n ...
python
edit
1
1
mit
eb0ffe3da8b25a4d673b543faeef169279c63919
CraigLoomis/ics_hxActor,CraigLoomis/ics_hxActor
python/hxActor/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Uploading package to PyPi.\n\nfrom setuptools import setup\n\nsetup(name='schoolopy',\n version='0.1.0',\n description='A Python wrapper for Schoology\\'s API.',\n url='https://github.com/ErikBoesen/schoolopy',\n autho...
python
edit
1
0
mit
816e77d6cb5321b57cbccfed56d01cbfbd058aa1
ErikBoesen/schoolopy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python2.7 -u\n__author__ = \"Peter Shipley\"\n\n\nimport os\nimport keyring\nimport ConfigParser\n\nfrom ISY.IsyEvent import ISYEvent\n\ndef main() :\n\n config = ConfigParser.ConfigParser()\n config.read(os.path.exp...
python
edit
7
2
bsd-2-clause
f994ab4a70a55706eeff133dd484dfd80a68e108
fxstein/ISYlib-python
bin/isy_showevents.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport thermochem\n\nsetup(\n name=\"thermochem\",\n version=thermochem.__version__,\n description=\"Python utilities for thermodynamics and thermochemistry\",\n author=\"Adel Qalieh\...
python
edit
1
0
bsd-3-clause
8dffe003fdb42cb9edd4fa0e720d6eceb9719381
adelq/thermopy
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom argparse import ArgumentParser\nimport serial\n\ndef run(device, baud):\n with serial.Serial(device, baud, timeout=0.1) as ser:\n while True:\n line = ser.readline()\n if line:\n...
python
edit
1
3
unlicense
ff9f64da2d43591cacfbec1a147fda4b82539c1d
recursify/serial-debug-tool
serial_reader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-slack',\n\n url=\"https://chris-lamb.co.uk/projects/django-slack\",\n version='5.2.0',\n description=\"Provides easy-to-use integratio...
python
edit
1
0
bsd-3-clause
3c33bc1a8cdc33b5519b7a0802b7b71d0193a6c6
lamby/django-slack
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nFlask-Twilio\n-------------\n\nMake Twilio voice/SMS calls with Flask\n\"\"\"\nfrom setuptools import setup\nexec(open('flask_twilio.py').readline())\n\n\nsetup(\n name='Flask-Twilio',\n version=__version__,\n url='http://e...
python
edit
2
0
bsd-3-clause
8a8d5bfa1d091f2c701196f58fdf10bfb228d9b5
lpsinger/flask-twilio
setup.py
rejected_duplicate
Near-duplicate of sample 21527
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSouth-specific signals\n\"\"\"\n\nfrom django.dispatch import Signal\n\n# Sent at the start of the migration of an app\npre_migrate = Signal(providing_args=[\"app\"])\n\n# Sent after each successful migration of an app\npost_migrate...
python
edit
1
1
apache-2.0
8ffd26f4fddb0c367e61a46af6427eab6c244ea8
theatlantic/django-south,theatlantic/django-south
south/signals.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nfrom django.core.urlresolvers import NoReverseMatch, reverse\n\n\ndef local_site_reverse(viewname, request=None, local_site_name=None,\n args=None, kwargs=None, *func_args, **...
python
edit
1
12
mit
46a568690a9a284ddc350519a15e092e1211d073
custode/reviewboard,custode/reviewboard,bkochendorfer/reviewboard,custode/reviewboard,brennie/reviewboard,reviewboard/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,custode/reviewboard,sgallagher/reviewboard,brennie/reviewboard,davidt/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,chipx86/reviewboard,KnowNo/...
reviewboard/site/urlresolvers.py
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Write python code for the following: Allow to import commands APIs from a single module\n\nThe APIs available to run various stestr commands are distributed\nin multiple modules. For ease of use make them all accessible from\nthe commands module." }, { "role": "assistan...
python
new_file
1
0
apache-2.0
56215f65ea1513adfd574cf6fc3d118121119290
masayukig/stestr,mtreinish/stestr,mtreinish/stestr,masayukig/stestr
stestr/commands/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('distutils',parent_package,top_path)\n config.add_subpackage('command')\n ...
python
edit
1
1
bsd-3-clause
c488252462a2cb860111a4826f01883e7c16b3aa
chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,illume/numpy3k,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,chadnetzer/numpy-gaurdro,Ademan/NumPy-GSoC,illume/numpy3k,jasonmccampbell/numpy-refactor-sprint,efiring/numpy-work,efiring/numpy-work,chadnetzer/numpy-gaurdro,efiring/numpy-w...
numpy/distutils/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob\nimport os\nimport pep8\n\n\nclass TestCodeFormat:\n def test_pep8(self):\n def match(*p):\n s = list(p) + ['*.py']\n return glob.glob(os.path.join(*s))\n pep8style = pep8.StyleGuide(config...
python
edit
1
1
mit
92d5991a37c3f269e9a7e59ab5edd90b45699930
EmbodiedCognition/pagoda,EmbodiedCognition/pagoda
test/style_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Test docstrings in functions and classes, which are used to infer types \"\"\"\n\ndef f(a, b):\n \"\"\" asdfasdf\n :param a: blablabla\n :type a: str\n \"\"\"\n #? str()\n a\n #? \n b\n\ndef g(a, b):\n \"\"...
python
edit
1
1
mit
a7f7d8ff9f8279ec2c1f3981b1507001f1f94394
mfussenegger/jedi,flurischt/jedi,dwillmer/jedi,tjwei/jedi,WoLpH/jedi,jonashaag/jedi,mfussenegger/jedi,flurischt/jedi,jonashaag/jedi,tjwei/jedi,dwillmer/jedi,WoLpH/jedi
test/completion/docstring.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport os, glob, string, shutil\n\n# Packages\n\npackages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'ne...
python
edit
6
1
bsd-3-clause
a25e6fb5f9e63ffa30a6c655a6775eead4206bcb
gef756/statsmodels,kiyoto/statsmodels,hainm/statsmodels,wdurhamh/statsmodels,detrout/debian-statsmodels,kiyoto/statsmodels,cbmoore/statsmodels,edhuckle/statsmodels,alekz112/statsmodels,hainm/statsmodels,bsipocz/statsmodels,phobson/statsmodels,huongttlan/statsmodels,ChadFulton/statsmodels,wkfwkf/statsmodels,josef-pkt/st...
setup.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nsetup(\n name = 'missingno',\n packages = ['missingno'], # this must be the same as the name above\n install_requires=['numpy', 'matplotlib'],\n py_modules=['missingno'],\n version = '0.1.1',\n descri...
python
edit
1
0
mit
a848ab0489b0419592dec6f2b5b728863bf0bebf
ResidentMario/missingno
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nexec(open('keras_vggface/version.py').read())\nsetup(name='keras_vggface',\n version=__version__,\n description='VGGFace implementation with Keras framework',\n url='https://github...
python
edit
2
0
mit
a74ad2850521eea430c0144b433707e0e9d5bb88
rcmalli/keras-vggface
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n with open(fname) as fp:\n content = fp.read()\n return content\n\nsetup(\n name='munerator',\n version=\"0.10.11\",\n description='Manager of OpenAren...
python
edit
1
1
mit
ce966cd73ff3dc37fd534fc7ae41e47b05782a4e
aequitas/munerator,aequitas/munerator,aequitas/munerator,aequitas/munerator
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nPACKAGE = 'TracBacklog'\nVERSION = '0.1'\n\nsetup(name=PACKAGE,\n version=VERSION,\n packages=['backlog'],\n package_data={\n 'backlog': [\n 'htdocs/css/*.css',\n '...
python
edit
1
0
bsd-3-clause
4ffdbaf30c46ff886c7eb2e9e9686679a5045e49
jszakmeister/trac-backlog,jszakmeister/trac-backlog
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom setuptools import setup, find_packages\n\nversionPattern = re.compile(r\"\"\"^__version__ = ['\"](.*?)['\"]$\"\"\", re.M)\nwith open(\"fusion_index/_version.py\", \"rt\") as f:\n version = versionPattern.search(f.read())....
python
edit
1
0
mit
d1fb5fbef04fde818abd1eb6ac38805058addafb
fusionapp/fusion-index
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom src.dojo import Dojo\n\n\nclass TestCreateRoom (unittest.TestCase):\n\n def setUp(self):\n self.dojo = Dojo()\n self.test_office = self.dojo.create_room(\"office\", \"test\")\n self.test_living_...
python
edit
1
1
mit
5958f80d456a43654c5013d38569554940e754f4
EdwinKato/Space-Allocator,EdwinKato/Space-Allocator
tests/dojo_test.py
rejected_duplicate
Near-duplicate of sample 3021
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\nfrom setuptools import setup\n\nsetup(\n name='pybreaker',\n version='0.6.0',\n description='Python implementation of the Circuit Breaker pattern',\n long_description=open('README....
python
edit
1
0
bsd-3-clause
2ee7bba787a29f715805b038fb98eda767534f10
danielfm/pybreaker
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom setuptools import setup\nfrom betfairlightweight.__init__ import __version__\n\n\nINSTALL_REQUIRES = [\n 'requests',\n]\nTEST_REQUIRES = [\n 'mock'\n]\n\nif sys.version_info < (3,4):\n INSTALL_REQUIRES.extend([\n...
python
edit
1
0
mit
97f5bbf5c99a40b8204c1e818e3bc8d897f822f0
liampauling/betfairlightweight,liampauling/betfair
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding=utf-8\nfrom __future__ import print_function\nimport os\nimport sys\nfrom setuptools import setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.md')).read()\...
python
edit
1
0
mit
2f75cf84d37869e49dd3820d00a2fa69ab57a219
mwclient/mwclient
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\n\"\"\" Setup script for csft \"\"\"\n\nimport sys\n\nfrom setuptools import find_packages, setup\n\nimport csft\n\nrequires = [\n 'argparse >= 1.2.1',\n 'pandas >= 0.20.1',\n 'pathli...
python
edit
1
0
mit
3a34bed3e0fdcfdc1d13b50f0b16b367d1133609
yanqd0/csft
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom filedes.test.base import BaseFDTestCase\nfrom filedes import FD\nimport os\nimport errno\n\n\nclass TestFDIO(BaseFDTestCase):\n def testReadWrite(self):\n r, w = os.pipe()\n self.assertEquals(FD(w).write(\"OK\"), 2)\n ...
python
edit
1
2
isc
67a12d44699e4bb8e3b6895ab10c9bb2477ed7fc
fmoo/python-filedes,fmoo/python-filedes
tests/fd_io.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\npackages = find_packages()\ndesc = open(\"README.md\").read(),\n\nsetup(name='cooperhewitt-swatchbook',\n version='0.3',\n description='Cooper Hewitt\\'s Pyth...
python
edit
1
0
bsd-3-clause
9dcd5a0f963a716e669d59429b3a8242cd65ffab
cooperhewitt/py-cooperhewitt-swatchbook
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom django.conf import settings\n\nfrom ...models import TranscriptPhrase\nfrom ...tasks import assign_current_game\n\nphrase_positive_limit = settings.TRANSCRIPT_PHRASE_POSITIVE_CONFIDE...
python
edit
1
3
mit
5004b500284ec1d0f709b3069867757770601c44
WGBH/FixIt,WGBH/FixIt,WGBH/FixIt
mla_game/apps/transcript/management/commands/recalculate_phrase_game_mappings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport setuptools\n\n\nsetuptools.setup(\n name=\"Mongothon\",\n version=\"0.7.16\",\n author=\"Tom Leach\",\n author_email=\"<EMAIL>\",\n description=\"A MongoDB object-document mapping layer for Python\",\n license=\"BSD...
python
edit
1
0
mit
7bbdd8b41e6cb2afb64a7b860e51553748a160bc
gamechanger/mongothon
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='Numspell',\n version='0.9',\n description='A Python module for spelling numbers',\n author='Alexei Sholik',\n author_email='<EMAIL>',\n url='h...
python
edit
1
0
mit
912b8a90472fc39f7c5d3b8e1e44b57aa88c0b02
alco/numspell,alco/numspell
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='uvp_adb',\n version='1.0',\n description='adb functions for uvp phone',\n url='https://www.linkedin.com/in/sajjad-ziyaei-amiri-a1a16b9b',\n author='Sajjad Ziyaei amiri',\n ...
python
edit
1
0
mit
a3064f6feeabc47b01fb01e75771646400c80949
inforfang/uvp_adb
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Sealed envelope example from Princeton course\n'Intro to Crypto and Cryptocurrencies'\nhttps://www.youtube.com/watch?v=fOMVZXLjKYo\n\"\"\"\n\nimport hashlib\n\ndef commit(key, msg):\n m = hashlib.sha256()\n m.update(key)\n m...
python
edit
1
2
mit
1d8f7d4a57b145fa3f8cce12a55b02eb0a754581
b-ritter/python-notes,b-ritter/python-notes
crypto/envelope.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tweepy\n\n# == OAuth Authentication ==\n#\n# This mode of authentication is the new preferred way\n# of authenticating with Twitter.\n\n# The consumer keys can be found on your application's Details\n# page located at https://dev.twi...
python
edit
2
0
mit
05b5a4390c7109bb8c0778c547883c41272769fb
vishnugonela/tweepy,iamjakob/tweepy,srimanthd/tweepy,sa8/tweepy,awangga/tweepy,zhenv5/tweepy,kcompher/tweepy,damchilly/tweepy,edsu/tweepy,cogniteev/tweepy,yared-bezum/tweepy,truekonrads/tweepy,tweepy/tweepy,Choko256/tweepy,elijah513/tweepy,tsablic/tweepy,hackebrot/tweepy,rudraksh125/tweepy,atomicjets/tweepy,IsaacHaze/t...
examples/oauth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The client of DDuplicated tool.\nfrom os import path as opath, getcwd\nfrom sys import argv\n\nfrom dduplicated import commands\n\ndef get_paths(params):\n\tpaths = []\n\tfor param in params:\n\t\tpath = opath.join(getcwd(), param)\n\t\ti...
python
edit
1
7
mit
2997b84a5ead65f6c17128baef3e3039957d97f8
messiasthi/dduplicated-cli
dduplicated/cli.py
rejected_duplicate
Near-duplicate of sample 16752
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dimod.core.sampler import Sampler\nfrom dimod.core.composite import Composite\nfrom dimod.core.structured import Structured\nfrom dimod.decorators import bqm_structured\n\n\nclass StructureComposite(Sampler, Composite, Structured):\n ...
python
edit
1
1
apache-2.0
4673b980252f5fd4c490652d9af63eac02506614
dwavesystems/dimod,dwavesystems/dimod
dimod/reference/composites/structure.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport bleach\n\n\nDESCR_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']\nUSER_DESCR_ALLOWED_TAGS = bleach.ALLOWED_TAGS + ['h2', 'h3', 'h4', 'h5', 'h6']\n\n\ndef clean_for_user_description(html):\n \"\"\"\n R...
python
edit
1
1
bsd-3-clause
b1efc997c510fbdcaeb8d3ba9b4202ac810bb9ff
fsr/course-management,fsr/course-management
util/html_clean.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom fluent_contents.models import ContentItem\nfrom fluent_contents.tests.utils import AppTestCase\n\n\nclass ModelTests(AppTestCase):\n \"\"\"\n Testing the data model.\n...
python
edit
1
1
apache-2.0
6d38920c1867921235c002b6ad411fd08378dd1f
django-fluent/django-fluent-contents,edoburu/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,django-fluent/django-fluent-contents,edoburu/django-fluent-contents
fluent_contents/tests/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom argparse import ArgumentParser\nfrom dodo_commands.framework import Dodo\nfrom dodo_commands.framework.config import Paths\nimport os\n\n\ndef _args():\n parser = ArgumentParser()\n parser.add_argument('-m', dest='message')\n ...
python
edit
1
1
mit
9710589f34e50bdf2fa19b1fcd827b07d4248ab6
mnieber/dodo_commands
dodo_commands/extra/dodo_standard_commands/commit-config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom util import full_stack\nfrom util import call_script\nfrom django.conf import settings\nfrom drivers import factory_for\nfrom system.models import Configuration\nfrom notification.util import ge...
python
edit
1
5
bsd-3-clause
a16a822ede8ad987b2234f29a31f9fe79c27cbd5
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/util/clone/clone_database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nimport click\n\n\ndef parse_page(page):\n \"\"\"Parse the command man page.\"\"\"\n with open(page) as f:\n lines = f.readlines()\n ...
python
edit
1
6
mit
870c89649032480587bdb03ae31f4eecf21eebf7
lord63/tldr.py
tldr/parser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n__author__ = 'Michael Meisinger'\n\nfrom ion.core.bootstrap_process import BootstrapPlugin, AbortBootstrap\nfrom pyon.public import IonObject, RT\nfrom pyon.util.containers import get_safe\n\nfrom interface.objects ...
python
edit
4
2
bsd-2-clause
5d901fddb0c863f811b0de40c063bb00b50e5394
ooici/coi-services,ooici/coi-services,ooici/coi-services,ooici/coi-services,ooici/coi-services
ion/processes/bootstrap/plugins/bootstrap_core.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom celery.registry import tasks\nfrom datetime import datetime, timedelta\n\n__all__ = [\"TaskManager\", \"PeriodicTaskManager\"]\n\n\nclass TaskManager(models.Manager):\n \n def get_task(self, task_id)...
python
edit
1
3
bsd-3-clause
52ffc2b264cbacaee56017cd4a67df4511d60392
WoLpH/celery,cbrepo/celery,cbrepo/celery,ask/celery,frac/celery,WoLpH/celery,mitsuhiko/celery,ask/celery,mitsuhiko/celery,frac/celery
celery/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport requests\nimport lxml.html\nimport pandas as pd\nimport sys\n\nURL = \"http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countries-with-transmission.aspx\"\n\ncolumns = [\n ...
python
edit
1
3
mit
5fc1735082c001d81d9cded4c694c12b7afac8a0
BuzzFeedNews/zika-data
scripts/scrape-ecdc-list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth import get_user_model\nimport ldap\n\nUser = get_user_model()\n\nclass UChicagoLDAPBackend(object):\n\tLDAP_SERVER = \"ldaps://ldap.uchicago.edu:636\"\n\n\tdef authenticate(self, cnetid=None, password=None):\n\t\tif...
python
edit
3
6
mit
2ea8ad7608f73fea2657e8e67a6c2bfef01b08d8
kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz
uchicagohvz/users/backend.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pygame\nfrom pygame.locals import *\nfrom wars.block import Block\n\nclass Device(object):\n # Static params\n height = 60\n\n # Object params\n blocks = []\n title = None\n pos_y = None\n\n def __init__(self, ...
python
edit
5
3
mit
697fbacc04bc41dea056377e85ba6b29949d8feb
cmol/wifi-wars
wars/device.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: UTF-8\nimport os\n\n\ndef load_config():\n \"\"\"Load config.\"\"\"\n mode = os.environ.get('MODE')\n try:\n if mode == 'PRODUCTION':\n from .production import ProductionConfig\n return Produc...
python
edit
1
4
mit
59854731162c25c75304798b62f6541bb9646eee
hustlzp/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost
flask_boost/project/config/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib import admin\nfrom powerdns.models import Domain, Record, Supermaster\n\nclass RecordAdmin(admin.ModelAdmin):\n list_display = ('name', 'type', 'content', 'ttl', 'prio', 'change_date',)\n l...
python
edit
1
0
bsd-2-clause
35974efcbae0c8a1b3009d7a2f38c73a52ff5790
dominikkowalski/django-powerdns-dnssec,zefciu/django-powerdns-dnssec,zefciu/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,allegro/django-powerdns-dnssec,allegro/django-powerdns-dnssec,dominikkowalski/django-powerdns-dnssec,allegro/django-powerdns-dnssec,allegro/dja...
powerdns/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nDEBUG = True\n\nDIRNAME = os.path.abspath(os.path.dirname(__file__))\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': ':memory:',\n }\n}\n\n# MEDIA_URL = '/media/'\n# MEDIA...
python
edit
1
0
bsd-2-clause
cda678a3ea9b01a684c6e2d3ed636834f41c96f8
powderflask/django-wkhtmltopdf,denisbalyko/django-wkhtmltopdf,halfnibble/django-wkhtmltopdf,halfnibble/django-wkhtmltopdf,denisbalyko/django-wkhtmltopdf,unrealsolver/django-wkhtmltopdf,tclancy/django-wkhtmltopdf,incuna/django-wkhtmltopdf,powderflask/django-wkhtmltopdf,unrealsolver/django-wkhtmltopdf,fankcoder/django-wk...
wkhtmltopdf/test_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\n# The note off event contains no data, except for the least significant bits\n# represening the polyphonic ID, so that all notes with that particular\n# polyphonic ID can be turned off.\ndef parse_noteOff(bmsfile, read, strict, commandI...
python
edit
1
2
bsd-3-clause
17457815b8eccabf137fdd91053796389d3c8de5
RenolY2/py-playBMS
EventParsers/ParserHelper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\nfrom django.contrib import admin\n\nfrom setmagic import settings\nfrom setmagic.models import Setting\n\n\n_denied = lambda *args: False\n\n\nclass SetMagicAdmin(admin.ModelAdmin):\n list_display = 'label', 'cu...
python
edit
1
4
mit
d66355e4758b37be39d17d681ede1dbbd6b9b311
7ws/django-setmagic
setmagic/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom skimage.feature import hog\nfrom skimage import colos\n\nfrom pelops.etl.feature_producer import FeatureProducer\n\n\nclass HOGFeatureProducer(FeatureProducer):\n\n def __init__(self, chip_producer):\n super().__init__(chip_p...
python
edit
11
1
apache-2.0
65137b42bd5ebee37cba0fd462e8f7484a3f9aaa
d-grossman/pelops,d-grossman/pelops,dave-lab41/pelops,Lab41/pelops,dave-lab41/pelops,Lab41/pelops
pelops/etl/hog.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# coding=utf-8\nfrom decimal import Decimal\n\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.forms.fields import Field, ValidationError\n\nfrom tempo.django.widgets import ScheduleSetWidget\nfro...
python
edit
1
6
bsd-3-clause
bb3ffdea2a76a86c1911426ce030c29abbd1074f
AndrewPashkin/python-tempo,AndrewPashkin/python-tempo
tempo/django/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport numpy as np\n\n\ndef _check_stc(stc1, stc2):\n # XXX What should we check? that the data is having the same size?\n if stc1.data.shape != stc2.data.shape:\n raise ValueError('Data in stcs must have the same size')\n ...
python
edit
7
3
bsd-3-clause
ff084f6fa7b61cef1550477265a65fa25b440b86
Teekuningas/mne-python,kingjr/mne-python,teonlamont/mne-python,alexandrebarachant/mne-python,jniediek/mne-python,rkmaddox/mne-python,olafhauk/mne-python,leggitta/mne-python,kingjr/mne-python,Teekuningas/mne-python,jaeilepp/mne-python,Eric89GXL/mne-python,nicproulx/mne-python,adykstra/mne-python,pravsripad/mne-python,la...
mne/simulation/simulation_metrics.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPython EDA Package\n\ncommon.py\nboolfunc.py -- Boolean functions\nexpr.py -- Boolean logic expressions\nvexpr.py -- Boolean vector logic expressions\ntable.py -- Boolean tables\n\"\"\"\n\n__copyright__ = \"Copyright (c) 2012, Chris...
python
edit
1
0
bsd-2-clause
8f3b6912ac7dd9fa63143a7e482d880658e69ac4
sschnug/pyeda,pombredanne/pyeda,pombredanne/pyeda,GtTmy/pyeda,cjdrake/pyeda,pombredanne/pyeda,GtTmy/pyeda,cjdrake/pyeda,sschnug/pyeda,karissa/pyeda,sschnug/pyeda,karissa/pyeda,cjdrake/pyeda,GtTmy/pyeda,karissa/pyeda
pyeda/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*-: coding utf-8 -*-\n\"\"\" Auto-generated intent class. \"\"\"\n\n# *****************************************************************************\n# *****************************************************************************\n# *****...
python
edit
null
null
mit
f155c200dc6f8b7b9461f399a3d3642d23e64942
snipsco/snipsskills,snipsco/snipsskills,snipsco/snipsskills,snipsco/snipsskills
snipsskills/templates/intent_template.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/python\n\"\"\"\nThis script accepts a string with the following syntax:\n\nGet the list of classes that a PHP class depends on.\n\nGenerate PHP code that \n\n defines the fields with corresponding\nnames ( same name as the clas...
python
edit
3
2
apache-2.0
ac1dcd9f7acb8e8867996c70aa0a35eb45fcdc53
HappyRay/php-di-generator
generator/php_di_gen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.mail import mail_managers\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import ugettext_lazy as _\n\n\ndef inform_managers(report):\n mail_managers(...
python
edit
3
3
mit
71c9b12056de1e1fdcc1effd2fda4c4dd284afab
stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,stefanw/froide,fin/froide,stefanw/froide,fin/froide,fin/froide
froide/problem/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport requests\n\nclass RT:\n def __init__(self, apikey):\n self.apikey = apikey\n \n @staticmethod\n def make_request(url, params=None):\n req = requests.get(url, params=params)\n retu...
python
edit
3
1
bsd-2-clause
f029a204289abb91d57e117d45772d24372a1a43
mahmoudhossam/requests-RT
requests-RT/rt.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('auth', '0006_require_contenttypes_0002'),\n (...
python
edit
1
0
apache-2.0
a9354124f4905f4befe9ff2ca8274406fbbb0dad
emory-libraries/readux,emory-libraries/readux,emory-libraries/readux
readux/annotations/migrations/0003_annotation_group_and_permissions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nSimple script to combine JUnit test results into a single XML file.\n\nUseful for Jenkins.\n\nTODO: Pretty indentation\n\"\"\"\n\nimport os\nfrom xml.etree import cElementTree as ET\n\ndef find_all(name, path)...
python
edit
3
3
bsd-3-clause
6194aa67ce54ce5c2fb0de58bfb2d75607d7b882
mkreider/cocotb2,stuarthodgson/cocotb,mkreider/cocotb2,mkreider/cocotb2,stuarthodgson/cocotb,stuarthodgson/cocotb
bin/combine_results.py
rejected_duplicate
Near-duplicate of sample 11181
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2008, Jarek Zgoda <<EMAIL>>\n\n__revision__ = '$Id: views.py 21 2008-12-05 09:21:03Z jarek.zgoda $'\n\n\nfrom django.shortcuts import render_to_response\nfrom django.template import RequestContext...
python
edit
1
4
apache-2.0
5531f188c7bf3030cb9fc3b46d92a1db60817b7c
schatt/zulip,deer-hope/zulip,PaulPetring/zulip,adnanh/zulip,jeffcao/zulip,hafeez3000/zulip,fw1121/zulip,KJin99/zulip,ufosky-server/zulip,mahim97/zulip,dhcrzf/zulip,dawran6/zulip,firstblade/zulip,akuseru/zulip,eastlhu/zulip,showell/zulip,dawran6/zulip,vikas-parashar/zulip,esander91/zulip,eastlhu/zulip,so0k/zulip,johnny9...
confirmation/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .dcct import DCCT\nfrom .li_llrf import LiLLRF\nfrom .rf import RF\nfrom .sofb import SOFB\nfrom .kicker import Kicker\nfrom .septum import Septum\nfrom .screen import Screen\nfrom .bpm import BPM\nfrom .ict import ICT\nfrom .ict impor...
python
edit
16
0
mit
e9ec19e68ccefaee9a975a6adc26cb6e5f1f7f33
lnls-fac/sirius
pymodels/middlelayer/devices/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A set of functions to standardize some options for python scripts.\"\"\"\n\n\ndef setup_parser_help(parser, additional_docs=None):\n \"\"\"\n Set formatting for parser to raw and add docstring to help output\n\n Parameters\n ...
python
edit
1
2
bsd-3-clause
6ea9492ae32ad744da4803dcab3cf57334dd69e5
mwcraig/msumastro
script_helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom activity.activity_DepositAssets import activity_DepositAssets\nimport settings_mock\nfrom ddt import ddt, data, unpack\n\n\n@ddt\nclass TestDepositAssets(unittest.TestCase):\n def setUp(self):\n self.deposita...
python
edit
1
1
mit
b06eb92ec878a06a2fa1ce9b7eb4d253d5481daa
gnott/elife-bot,gnott/elife-bot,jhroot/elife-bot,gnott/elife-bot,jhroot/elife-bot,jhroot/elife-bot
tests/activity/test_activity_deposit_assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\n# -*- coding: utf-8 -*-\nimport argparse\nfrom time import sleep\nimport pyttsx\n\nparser = argparse.ArgumentParser(description='Presentation timer with spoken warnings.')\nparser.add_argument('minutes', type=int, ...
python
edit
2
0
bsd-3-clause
07538222d07b0a565cadadd40df9bedeb12a4f60
audreyr/useful
talk_timer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'crmapp.views.home', name='home'),\n # url(r'^blog/', include('blog.urls')),\n\n ur...
python
edit
3
0
mit
a09274fbc9277de2cbd3336fca4922094b0db8d1
tabdon/crmeasyapp,tabdon/crmeasyapp,deenaariff/Django
crmapp/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under an MIT open source license - see LICENSE\n\n'''\nReturns a list of all available distance metrics\n'''\n\nstatistics_list = [\"Wavelet\", \"MVC\", \"PSpec\", \"Bispectrum\", \"DeltaVariance\",\n \"Genus\",...
python
edit
1
0
mit
a51d280ca7c7f487e6743e4f377f70641a8b4edd
Astroua/TurbuStat,e-koch/TurbuStat
turbustat/statistics/statistics_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom k2catalogue import models\n\ndef test_safe_float_good():\n assert models.safe_float(\"2\") == 2.0\n\ndef test_safe_float_bad():\n assert models.safe_float('this is not convertable to a float') is None\n\n\n```\n\nApply this chang...
python
edit
1
1
mit
50d69badbaeb41736269c99f7b301f09c9b24ecb
mindriot101/k2catalogue
testing/test_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom asyncio import Future, gather, new_event_loop, sleep\nfrom twisted.internet.defer import Deferred, ensureDeferred\n\nfrom pyee import EventEmitter\n\ndef test_asyncio_emit():\n \"\"\"Test that event_emitters...
python
edit
1
2
mit
95c5b9c139bf69ac11338a4b2eaa9b8179d27284
jfhbrook/pyee
tests/test_async.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nmsg = 'This is not yet implemented'\n\ndef validate(sketch):\n \"\"\"\n - sketch: a `dict`\n \"\"\"\n raise NotImplementedError(msg)\n\ndef readsketch_iter(iterable):\n \"\"\"\n - iterable: as return by ijson.parser\n\n ...
python
edit
1
1
mit
855cea2b603453ce7ed907fc153962596de31f00
lgautier/mashing-pumpkins,lgautier/mashing-pumpkins,lgautier/mashing-pumpkins
src/json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .grassmann import Grassmann\nfrom .sphere import Sphere\nfrom .stiefel import Stiefel\nfrom .psd import PSDFixedRank, PSDFixedRankComplex, Elliptope, PositiveDefinite\nfrom .oblique import Oblique\nfrom .euclidean import Euclidean, Sym...
python
edit
1
0
bsd-3-clause
7cacf4f78f03e95eec51aac211779539954aee38
j-towns/pymanopt,nkoep/pymanopt,tingelst/pymanopt,nkoep/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,pymanopt/pymanopt
pymanopt/manifolds/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom tests.common import load_check\nimport time\n\nclass TestMySql(unittest.TestCase):\n def setUp(self):\n # This should run on pre-2.7 python so no skiptest\n self.skip = False\n try:\n ...
python
edit
2
8
bsd-3-clause
fea76a8c9c03fef5c70e2fdd93d97cd3e096de7d
brettlangdon/dd-agent,truthbk/dd-agent,jraede/dd-agent,relateiq/dd-agent,cberry777/dd-agent,tebriel/dd-agent,urosgruber/dd-agent,jraede/dd-agent,ess/dd-agent,Shopify/dd-agent,joelvanvelden/dd-agent,jyogi/purvar-agent,eeroniemi/dd-agent,citrusleaf/dd-agent,indeedops/dd-agent,eeroniemi/dd-agent,Mashape/dd-agent,Aniruddha...
tests/test_mysql.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport pubrunner\nimport pubrunner.command_line\n\ndef test_countwords():\n\t#pubrunner.pubrun('examples/CountWords/',True,True)\n\tsys.argv = ['--test','examples/CountWords/']\n\tpubrunner.command_line.main()\n\n\n```\n\nApply ...
python
edit
1
1
mit
7cde7a232a53138c2c199c16f55e0aecdcbf1aee
jakelever/pubrunner,jakelever/pubrunner
tests/test_basic.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (C) 2017 BMW AG\n# Author: Thomas Hafner\n\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n#...
python
edit
3
2
apache-2.0
711afeb0e01bc35b1f82588d814be4275f59f758
spdx/tools-python
spdx/tv_to_rdf.py
rejected_duplicate
Near-duplicate of sample 7986
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Tornado handlers for the terminal emulator.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom tornado import web\nimport terminado\nfrom ..base.handlers import IPyth...
python
edit
1
2
bsd-3-clause
c46398091fbe591bbe79744ed4371fddcc454912
ipython/ipython,ipython/ipython
IPython/html/terminal/handlers.py
rejected_duplicate
Near-duplicate of sample 14855
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.11.14 on 2018-08-28 19:01\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('z...
python
edit
1
1
apache-2.0
42f49d19b3657c62208aacee0f2dd77081bb5aa2
brainwane/zulip,brainwane/zulip,shubhamdhama/zulip,zulip/zulip,shubhamdhama/zulip,rht/zulip,showell/zulip,eeshangarg/zulip,punchagan/zulip,hackerkid/zulip,synicalsyntax/zulip,tommyip/zulip,showell/zulip,rishig/zulip,shubhamdhama/zulip,jackrzhang/zulip,synicalsyntax/zulip,dhcrzf/zulip,kou/zulip,andersk/zulip,dhcrzf/zuli...
zerver/migrations/0189_userprofile_add_some_emojisets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# This file mainly exists to allow `python setup.py test` to work.\nimport os\nimport sys\n\nimport dddp\nimport django\nfrom django.test.utils import get_runner\nfrom django.conf import settings\n\n\ndef run_tests():\n os.environ['DJANG...
python
edit
1
1
mit
d04d56bdb79d6e6ac04af1642cb8c3ceff325d75
django-ddp/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp,django-ddp/django-ddp,commoncode/django-ddp
dddp/test/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef setup():\n from .qt_widget import DendroWidget\n from glue.config import qt_client\n qt_client.add(DendroWidget)\n\n```\n\nApply this change: Add missing import of dendrogram data factory" }, { "role": "assistant", ...
python
edit
3
1
bsd-3-clause
b2bc500c6a715493c4187e5b1c62e02717d8e31c
stscieisenhamer/glue,saimn/glue,saimn/glue,stscieisenhamer/glue
glue/plugins/dendro_viewer/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask import Flask\nfrom flask_login import LoginManager\n\nfrom passlib.context import CryptContext\n\nfrom .core import db\nfrom .blueprints import register_blueprints\nfrom .errors import ERROR_HANDLERS\n\n\nclass User(...
python
edit
2
3
mit
539c7a85a84fdb2fbe8ee3f5803778baf0c66841
mcflugen/wmt-rest,mcflugen/wmt-rest
wmt/flask/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ._daisy import daisy\nfrom ._hog import hog\nfrom .texture import greycomatrix, greycoprops, local_binary_pattern\nfrom .peak import peak_local_max\nfrom .corner import (corner_kitchen_rosenfeld, corner_harris, corner_shi_tomasi,\n ...
python
edit
1
0
bsd-3-clause
2ba3dd9bafddd4dfd1ab712c59c6efadd58b1f46
WarrenWeckesser/scikits-image,michaelpacer/scikit-image,chintak/scikit-image,Midafi/scikit-image,bsipocz/scikit-image,almarklein/scikit-image,paalge/scikit-image,vighneshbirodkar/scikit-image,GaZ3ll3/scikit-image,ofgulban/scikit-image,GaZ3ll3/scikit-image,jwiggins/scikit-image,ClinicalGraphics/scikit-image,SamHames/sci...
skimage/feature/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n\tsphinxcontrib.openstreetmap\n\t===========================\n\n\tEmbed OpenStreetMap on your documentation.\n\n\t:copyright: Copyright 2015 HAYASHI Kentaro <<EMAIL>>\n\t:license: BSD, see LICENSE for detail...
python
edit
1
1
bsd-2-clause
8785f602900ab3bf3e297ee8f90ecf47c059cdde
kenhys/sphinxcontrib-openstreetmap,kenhys/sphinxcontrib-openstreetmap
sphinxcontrib/openstreetmap.py
rejected_duplicate
Near-duplicate of sample 18918
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function\n\nfrom ..utils import ignoring\nfrom .core import (Array, stack, concatenate, tensordot, transpose, from_array,\n choose, where, coarsen, broadcast_to, constant, fromf...
python
edit
87
0
bsd-3-clause
24f0c0d311886571cc0c5f8badca026a6c534a52
mraspaud/dask,marianotepper/dask,minrk/dask,freeman-lab/dask,pombredanne/dask,ContinuumIO/dask,hainm/dask,ssanderson/dask,clarkfitzg/dask,jakirkham/dask,jakirkham/dask,PhE/dask,cowlicks/dask,ContinuumIO/dask,mikegraham/dask,cpcloud/dask,pombredanne/dask,hainm/dask,marianotepper/dask,simudream/dask,jcrist/dask,wiso/dask...
dask/array/__init__.py
rejected_lint
Too many lint violations: 87
true
[ { "role": "user", "content": "Here is the current file:\n```python\npatches = [\n # duplicate GlobalSecondaryIndex\n {\n \"op\": \"move\",\n \"from\": \"/PropertyTypes/AWS::DynamoDB::GlobalTable.GlobalSecondaryIndex\",\n \"path\": \"/PropertyTypes/AWS::DynamoDB::GlobalTable.Global...
python
edit
1
0
bsd-2-clause
36550f71f4161b0b5c7af872b78dd1e7d96b788a
cloudtools/troposphere,cloudtools/troposphere
scripts/patches/dynamodb.py
accepted
null
true