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\n# -*- coding: utf-8 -*-\n\"\"\"\nUSDA National Agricultural Statistics Service API wrapper\n\nThis Python wrapper implements the public API for the USDA National\nAgricultural Statistics Service. It is a very thin layer over the Requests\np...
python
edit
3
0
mit
ea3deb560aaddab4d66a84e840e10854cfad581d
nickfrostatx/nass
nass/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom openedoo_project import db\nfrom openedoo_project import config\n\n\nclass Setting(db.Model):\n __tablename__ = 'module_employee_site_setting'\n __table_args__ = {'extend_existing': True}\n id = db.Column(db.Integer, primary_k...
python
edit
1
1
mit
48cc6633a6020114f5b5eeaaf53ddb08085bfae5
openedoo/module_employee,openedoo/module_employee,openedoo/module_employee
models/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nKey bindings for auto suggestion (for fish-style auto suggestion).\n\"\"\"\nfrom __future__ import unicode_literals\nfrom prompt_toolkit.application.current import get_app\nfrom prompt_toolkit.key_binding.key_bindings import KeyBind...
python
edit
1
4
bsd-3-clause
5a3935caab0bf720db6707bb7974eec2400f3701
jonathanslenders/python-prompt-toolkit
prompt_toolkit/key_binding/bindings/auto_suggest.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\n__version__ = '1.25.1'\n\n```\n\nApply this change: Set dev version to 1.26.0dev after releasing 1.25.1\n\nSigned-off-by: Ulysses Souza <<EMAIL>>" }, { ...
python
edit
1
0
apache-2.0
67cce913a6ab960b7ddc476fa9a16adb39a69862
vdemeester/compose,thaJeztah/compose,vdemeester/compose,thaJeztah/compose
compose/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tests\n\nclass CallbackTests(tests.TestCase):\n def test_hello_world(self):\n result = []\n\n def hello_world(loop):\n result.append('Hello World')\n loop.stop()\n\n self.loop.call_soon(h...
python
edit
1
1
apache-2.0
d8a93f06cf6d78c543607d7046017cad3acc6c32
overcastcloud/aioeventlet
tests/test_callback.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import session\nfrom flask_oauthlib.client import OAuth\nimport f8a_jobs.defaults as configuration\n\noauth = OAuth()\ngithub = oauth.remote_app(\n 'github',\n consumer_key=configuration.GITHUB_CONSUMER_KEY,\n consumer_s...
python
edit
1
1
apache-2.0
fd302e3f9cbc5bcf06d47600adc3e0f0df33c114
fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs
f8a_jobs/auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom core.build.subnet import build_subnet\nfrom core.network.models import Network\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.http import HttpResponse\n\nimport pdb\n\n\ndef build_network(request, netw...
python
edit
3
2
bsd-3-clause
6a2782b11bcec2c1493258957ce7e8652d6990e8
zeeman/cyder,murrown/cyder,akeym/cyder,OSU-Net/cyder,murrown/cyder,drkitty/cyder,murrown/cyder,drkitty/cyder,akeym/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,akeym/cyder,zeeman/cyder,drkitty/cyder,OSU-Net/cyder,murrown/cyder,OSU-Net/cyder
core/build/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test.utils import setup_test_environment, teardown_test_environment\nfrom django.db.backends.creation import create_test_db, destroy_test_db\nimport nose\n\ndef run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[...
python
edit
1
1
bsd-3-clause
5b0d308d1859920cc59e7241626472edb42c7856
Almad/django-sane-testing
djangosanetesting/testrunner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery import task\nfrom django.conf import settings\nfrom django.core import mail\n\nimport smtplib\n\n\n@task(rate_limit=0.2)\ndef do_sympa_update(user, listname, subscribe):\n\tif subscribe:\n\t\tbody = \"QUIET ADD %s %s %s\" % (lis...
python
edit
1
2
mit
5344c97e7486229f9fae40bef2b73488d5aa2ffd
kz26/uchicago-hvz,kz26/uchicago-hvz,kz26/uchicago-hvz
uchicagohvz/users/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nparagoo plugin for retrieving card on an Android app\n\"\"\"\nimport os\nimport requests\nfrom bs4 import BeautifulSoup\n\n\nclass AppNotFoundException(Exception):\n pass\n\n\ndef render(site_path, params):\n \"\"\"\n Look ...
python
edit
4
2
apache-2.0
b92fb486107ef6feb4def07f601e7390d80db565
aquatix/paragoo,aquatix/paragoo
plugins/androidapp.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# wwwhisper - web access control.\n# Copyright (C) 2013 Jan Wrobel <<EMAIL>>\n\nimport os\n\nfrom django.utils.decorators import method_decorator\nfrom django.views.decorators.cache import cache_control\nfrom django.views.decorators.cache i...
python
edit
3
1
mit
131129b96995c0055ea0a7e27d7491a833e46566
wrr/wwwhisper,wrr/wwwhisper,wrr/wwwhisper,wrr/wwwhisper
wwwhisper_auth/assets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom flask_wtf import Form\nfrom wtforms import StringField, validators\n\nfrom .validation import not_spam\n\n\nclass ShortenedUrlForm(Form):\n url = StringField(\n 'Url to be shortened',\n [\n ...
python
edit
1
0
mit
68fe680266f705bea2b33e614d7aac2ae13b46a2
piotr-rusin/url-shortener,piotr-rusin/url-shortener
url_shortener/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__title__ = 'unihan-db'\n__package_name__ = 'unihan_db'\n__description__ = 'SQLAlchemy models for UNIHAN database'\n__version__ = '0.1.0'\n__author__ = 'Tony Narlock'\n__email__ = '<EMAIL>'\n__license__ = 'MIT'\n__copyright__ = 'Copyright 2...
python
edit
1
0
mit
5c9bc019ea1461a82b9dbdd4b3df5c55be2a8274
cihai/unihan-db
unihan_db/__about__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging; logger = logging.getLogger(\"robot.\" + __name__)\n\nfrom robots.exception import RobotError\n\nfrom robots.actions.look_at import sweep\nfrom robots.action import *\n\n#######################################################...
python
edit
11
1
isc
1cf354d834fbb81260c88718c57533a546fc9dfa
chili-epfl/pyrobots,chili-epfl/pyrobots-nao
src/robots/actions/attitudes.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2011 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Utility class to build the Skia master BuildFactory's for Andro...
python
edit
1
3
bsd-3-clause
cf03026a27f8f7d35430807d2295bf062c4e0ca9
google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Ti...
master/skia_master_scripts/android_factory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: <encoding-name> -*-\n\n'''\nCopyright 2015 Hewlett Packard Enterprise Development LP\n\nLicensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with...
python
edit
1
0
apache-2.0
8c51722bff4460b33a33d0380b75047649119175
HPNetworking/HP-Intelligent-Management-Center,HPENetworking/PYHPEIMC,netmanchris/PYHPEIMC
pyhpeimc/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pretix.settings import * # noqa\n\nSECRET_KEY = \"{{secret_key}}\"\n\nLOGGING[\"handlers\"][\"mail_admins\"][\"include_html\"] = True # noqa\nSTATICFILES_STORAGE = (\n \"django.contrib.staticfiles.storage.ManifestStaticFilesStorag...
python
edit
1
0
mit
b3a9027940f854f84cbf8f05af79c1f98a56d349
patrick91/pycon,patrick91/pycon
pretix/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom path import path\r\nfrom nose.tools import raises\r\n\r\nfrom dmf_device import DmfDevice\r\nfrom utility import Version\r\n\r\ndef test_load_dmf_device():\r\n \"\"\"\r\n test loading DMF device files\r\n \"\"\"\r\n\r\n # v...
python
edit
1
3
bsd-3-clause
e40797a40e1e8f76a48ffeaec2dcdb179b702062
wheeler-microfluidics/microdrop
microdrop/tests/test_dmf_device.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nCreated on Aug 12, 2010\n\n@author: jnaous\n'''\nimport logging\nimport re\nfrom django.contrib.auth.backends import RemoteUserBackend\nfrom django.conf import settings\nfrom expedient.common.permissions.shortcuts import give_permissio...
python
edit
1
4
bsd-3-clause
4a0f4bb837151a28b8c9f495db4f9bd33eb45a77
avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf
src/python/expedient_geni/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport fastobo\n\nfrom .base import BaseParser\nfrom ._fastobo import FastoboParser\n\n\nclass OboParser(FastoboParser, BaseParser):\n @classmethod\n def can_parse(cls, path, buffer):\n return buffer.lstrip().start...
python
edit
1
6
mit
83080df101aca13b9b044996a013794c94ab82ed
althonos/pronto
pronto/parsers/obo.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nimport datetime\n\n\nclass Row(dict):\n\n def __init__(self, *args, **kwargs):\n super(Row, self).__init__(*args, **kwargs)\n self._start_date = None\n self._end_date = None\n\n def _cast_date(self, s)...
python
edit
1
2
unlicense
44e062dd5f302c5eed66e2d54858e1b8f78b745b
datascopeanalytics/chicago-new-business,datascopeanalytics/chicago-new-business
src/data.py
rejected_duplicate
Near-duplicate of sample 13420
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .headerfooter import IncludeHeaderFooter\nfrom .lockcells import LockCells\nfrom .clearsolutions import ClearSolutions\nfrom .findstudentid import FindStudentID\nfrom .saveautogrades import SaveAutoGrades\nfrom .displayautogrades impor...
python
edit
13
0
bsd-3-clause
639824dfa86b2aa98b1ae2ca3d4a5cec6ca329ea
EdwardJKim/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,ellisonbg/nbgrader,alope107/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,dementrock/nbgrader,ellisonbg/nbgrader,EdwardJKim/nbgrader,jhamrick/nbgrader,jdfreder/nbgrader,jdfreder/nbgrader,ellisonbg/nbgrader,alope107/nbgrader,jupyter/nbgrader,module...
nbgrader/preprocessors/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nclass Base(object):\n def load(self, data):\n for name, value in data.items():\n if hasattr(self, name):\n setattr(self, name, value)\n\n return self\n\n def value_to_time(self, value):\n...
python
edit
1
3
bsd-2-clause
fec974d5eceed68fdfc2b30e4c4a0f78dfbb8808
messagebird/python-rest-api
messagebird/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nGewebehaken\n~~~~~~~~~~~\n\nThe WSGI application\n\n:Copyright: 2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_\n:License: MIT, see LICENSE for details.\n\"\"\"\n\nimport logging\nfrom logging im...
python
edit
1
2
mit
733d48510c4d6d8f4b9f07b6e33075cc20d1720a
homeworkprod/gewebehaken
gewebehaken/app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nMinion side functions for salt-cp\n'''\nimport os\n\ndef recv(files, dest):\n '''\n Used with salt-cp, pass the files dict, and the destination\n '''\n ret = {}\n for path, data in files.items():\n final = ''\n ...
python
edit
7
7
apache-2.0
75db5105d609a2b28f19ee675de866425e2c5c3e
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/cp.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\n :codeauthor: :email:`Jayesh Kariya <<EMAIL>>`\n'''\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing Libs\nfrom salttesting import TestCase, skipIf\nfrom salttesting.moc...
python
edit
1
1
apache-2.0
1f3eb1c526171b0ee8d2cab05e182c067bfb6c2e
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/modules/defaults_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Import python libs\nfrom __future__ import absolute_import, print_function, unicode_literals\nfrom salt.ext.six import text_type as text\n\n# Import Salt Libs\nfrom salt.utils.sanitizers import clean\n\n# Import...
python
edit
1
1
apache-2.0
794a233a70ac8cdd4fc0812bd651757b35e605f2
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/unit/utils/test_sanitizers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport argparse\nimport os\nfrom harvester.couchdb_init import get_couchdb\nimport couchdb\nfrom harvester.couchdb_sync_db_by_collection import delete_collection\n\ndef confirm_deletion(cid):\n prompt = \"Are you sure you wan...
python
edit
4
3
bsd-3-clause
e7a09ad3e3d57291aa509cd45b8d3ae7a4cadaf8
mredar/harvester,mredar/harvester,ucldc/harvester,barbarahui/harvester,ucldc/harvester,barbarahui/harvester
scripts/delete_couchdb_collection.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import print_function, unicode_literals\n\nfrom gittip.elsewhere import twitter\nfrom gittip.testing import Harness\n\n\nclass TestElsewhereTwitter(Harness):\n\n def test_get_user_info_gets_user_info(self):\n twitt...
python
edit
1
1
mit
26d7b8a1e0fef6b32b5705634fe40504a6aa258d
gratipay/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,eXcomm/gratipay.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com,studio666/gratipay.com,gratipay/...
tests/test_elsewhere_twitter.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'presentations.views.home', name='home'),\n # url(r'^blog/', i...
python
edit
1
0
mit
a6bed0c1de2fc437d3ad84f0b22d27d4706eb5ab
masonsbro/presentations
presentations/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\n\ndef test_notifications_admin_index():\n # response = requests.request(\"GET\", \"http://localhost:6012\")\n response = requests.request(\"GET\", \"http://notifications-admin.herokuapp.com/\")\n assert response....
python
edit
1
1
mit
bf9addce584961e30456c74b767afe05ca5dbb71
alphagov/notifications-functional-tests,alphagov/notifications-functional-tests
tests/test_it.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add a couple things for Bottle-like behavior." }, { "role": "assistant", "content": "from functools import wraps\n\nfrom twisted.internet import reactor\nfrom twisted.web.server import Site\n\nfrom klein.decorators import expose\...
python
new_file
1
1
mit
7cf3741070cba4d4e0016a7175158ec5993fd7f2
macmania/klein,brighid/klein,hawkowl/klein,macmania/klein,joac/klein,alex/klein,joac/klein,brighid/klein
klein/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom service.settings.production import *\n\nDEBUG = { 0: False, 1: True }[int(os.getenv('DEBUG'))]\n\n\nif DEBUG:\n MIDDLEWARE += [\n 'debug_toolbar.middleware.DebugToolbarMiddleware',\n ]\n INSTALLED_APPS += [...
python
edit
4
2
unlicense
ed8139a505a93c3a99fbb147817cc5695aa0ffc7
Mystopia/fantastic-doodle
service/settings/local.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom redis import StrictRedis\n\nclass QuizDB(StrictRedis):\n def get_all_quizzes(self):\n return self.smembers('quiz')\n\n```\n\nApply this change: Add function to get a question" }, { "role": "assistant", "content": ...
python
edit
1
1
bsd-2-clause
b222fbbbcca019a1849e70cc46b1527fa5fe2082
estreeper/quizalicious,estreeper/quizalicious,estreeper/quizalicious
database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBlueprint implementing the API wrapper.\n\n:author: 2013, Pascal Hartig <<EMAIL>>\n:license: BSD\n\"\"\"\n\nimport json\nfrom flask import Blueprint, request, abort\nfrom .utils import JSONError\nfrom .calc import calculate_scores\n...
python
edit
1
4
bsd-3-clause
7669e6c65d46615c8e52e53dba5a1b4812e34a02
passy/soccer-stats-backend
soccerstats/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nfrom sys import stdin\n\n\ndef estimateConf(conf):\n \"\"\"Estimate configuration from a string.\"\"\"\n confElements = [int(x) for x in conf.split(sep=\" \")]\n disk = confElements[0]\n print(disk)\n pr...
python
edit
3
3
mit
3eaf0ea514b0f78906af7e614079f3a90624bcc7
MattHeard/EstimateDiskExhaustion
estimate.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport Pyro4\nPyro4.config.SERIALIZERS_ACCEPTED.add('pickle')\nPyro4.config.SERIALIZERS_ACCEPTED.add('dill')\nPyro4.config.SERIALIZER = 'dill'\nPyro4.config.THREADPOOL_SIZE = 16\nPyro4.config.SERVERTYPE = 'thread'\nPyro4.config.R...
python
edit
12
0
apache-2.0
93ac186e90790c17014d905fd2f85e7e7dde1271
opensistemas-hub/osbrain
osbrain/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport pytest\n\nfrom .test_bot import TestBot\n\n\nclass TestBotSupport(TestBot):\n\n @pytest.mark.parametrize('url,result', [\n ('https://google.com', ['https:/...
python
edit
1
1
apache-2.0
8e2596db204d2f6779280309aaa06d90872e9fb2
instagrambot/instabot,ohld/instabot,instagrambot/instabot
tests/test_bot_support.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport sys\nimport json\n\n\ndef main():\n prefix = os.environ['PREFIX']\n info_file = os.path.join(prefix, 'conda-meta',\n 'always_include_files_regex-0.1-0.json')\n with open(info_file, 'r')...
python
edit
1
3
bsd-3-clause
76d9ff900204678423208967b4578764013984ad
dan-blanchard/conda-build,mwcraig/conda-build,dan-blanchard/conda-build,sandhujasmine/conda-build,dan-blanchard/conda-build,ilastik/conda-build,frol/conda-build,mwcraig/conda-build,rmcgibbo/conda-build,shastings517/conda-build,shastings517/conda-build,shastings517/conda-build,sandhujasmine/conda-build,frol/conda-build,...
tests/test-recipes/metadata/always_include_files_glob/run_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# Copyright (c) 2009 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\"\"\"Presubmit script for perf_expectations.\n\nS...
python
edit
1
4
bsd-3-clause
28fe69ab1bb9362a1ee105821ec4631b574417d3
littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,keishi/chromium,markYoungH/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,keishi/chromium,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,pozdnyakov/chromium-crossw...
tools/perf_expectations/PRESUBMIT.py
rejected_duplicate
Near-duplicate of sample 864
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom xml.etree.ElementTree import ParseError\nimport xml.etree.ElementTree as ET\nimport glob\nimport sys\n\ndef eprint(*args, **kwargs):\n print(*args,...
python
edit
1
4
apache-2.0
7d756efb7361c13b0db0f37ead9668351c3a6887
wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework,wkrzemien/j-pet-framework
unitTestUtils/parseXML.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom commands import getstatusoutput\nfrom django import template\nfrom django.conf import settings\nfrom django.utils._os import safe_join\n\nregister = template.Library()\n\ndef scss(file_path):\n \"\"\"\n Converts an...
python
edit
1
3
bsd-3-clause
1a16d598c902218a8112841219f89044724155da
lincolnloop/django-smatic
smatic/templatetags/smatic_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom zope.interface import implements\nfrom twisted.plugin import IPlugin\nfrom twisted.application.service import IServiceMaker\n\nfrom twisted.python import reflect\n\ndef serviceMakerProperty(propname):\n def getProperty(self):\n ...
python
edit
1
2
apache-2.0
025c3f6b73c97fdb58b1a492efcb6efe44cfdab0
trevor/calendarserver,trevor/calendarserver,trevor/calendarserver
twisted/plugins/caldav.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Standard imports\nimport json\nimport logging\nimport uuid\n\n# Our imports\nimport emission.core.get_database as edb\n\ndef get_platform_query(platform):\n return {\"curr_platform\": platform}\n\ndef get_sync_interval_query(interval):...
python
edit
4
3
bsd-3-clause
817de880b1bce7b16348ae3e0b1494753e7fe6b8
e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,sunil07t/e-mission-server
emission/net/ext_service/push/notify_queries.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport re\nfrom . import export\n\n@export\ndef fuzzyfinder(text, collection):\n \"\"\"\n Args:\n text (str): A partial string which is typically entered by a user.\n collection (iterable): A col...
python
edit
1
4
bsd-3-clause
a0172116503f0b212a184fc4a1d2179115675e17
adammenges/fuzzyfinder,amjith/fuzzyfinder,harrisonfeng/fuzzyfinder
fuzzyfinder/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport socket\n\nfrom httplib import HTTPConnection, HTTPSConnection\nfrom urllib import urlencode\nfrom urlparse import urlparse\n\n\nclass Replayer(object):\n def __init__(self, url, method, da...
python
edit
1
3
bsd-3-clause
e2722385831a0930765d2c4bb78a582d41f4b64b
beeftornado/sentry,nicholasserra/sentry,Kryz/sentry,JackDanger/sentry,imankulov/sentry,JamesMura/sentry,zenefits/sentry,kevinlondon/sentry,mvaled/sentry,JamesMura/sentry,ifduyue/sentry,looker/sentry,daevaorn/sentry,fotinakis/sentry,gencer/sentry,looker/sentry,JackDanger/sentry,mvaled/sentry,Natim/sentry,beeftornado/sen...
src/sentry/replays.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A module to demonstrate exceptions.\"\"\"\n\nimport sys\n\n\ndef convert(item):\n '''\n Convert to an integer.\n Args:\n item: some object\n\n Returns:\n an integer representation of the object\n\n Throws:...
python
edit
1
2
mit
133617660fe96a817b47d4d0fba4cfa7567dcafb
kentoj/python-fundamentals
exceptional.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport random\nfrom string import ascii_letters, digits\n\n\n# From http://tools.ietf.org/html/rfc6750#section-2.1\nBEARER_TOKEN_CHARSET = ascii_letters + digits + '-._~+/'\n\n\ndef random_hash(length):\n return ''.join(ra...
python
edit
1
1
mit
e885701a12fcb2d2557c975fadbabc7ee28ebf8b
vden/djoauth2-ng,vden/djoauth2-ng,Locu/djoauth2,seler/djoauth2,Locu/djoauth2,seler/djoauth2
djoauth2/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Generator for Proteus coefficient evaluator\"\"\"\n\nfrom .sfl_printer import SFLPrinter\nfrom ...code_tools import comment_code, indent_code, PythonCodePrinter\n\n\ncoefficient_header = \"\"\"\\\nProteus Coefficient file generated fr...
python
edit
1
1
bsd-3-clause
caf0829191e9f3276fb144486ad602dcd482b60d
IgnitionProject/ignition,IgnitionProject/ignition,IgnitionProject/ignition
ignition/dsl/sfl/proteus_coefficient_printer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A custom ILAMB confrontation for net ecosystem productivity (nep).\"\"\"\nimport os\nimport numpy as np\nfrom ILAMB.Confrontation import Confrontation\nfrom ILAMB.Variable import Variable\nimport ilamblib as il\n\n\nclass ConfNEP(Conf...
python
edit
4
1
mit
373e4e0e58cfec09b60983494f7b3bb4712e0ccd
permamodel/ILAMB-experiments
2/ConfNEP.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.backends import ModelBackend\n\n\nclass CaseInsensitiveEmailBackend(ModelBackend):\n \"\"\"\n This authentication backend assumes that usernames are email addresses and simply lowercases\n a username before...
python
edit
1
2
bsd-2-clause
23ec0899eaf60a9dc79f6671461a33eea7e7f464
fusionbox/django-authtools,vuchau/django-authtools,moreati/django-authtools,eevol/django-authtools,kivikakk/django-authtools
authtools/backends.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"jay URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.8/topics/http/urls/\nExamples:\nFunction views\n 1. Add an import: from my_app import ...
python
edit
1
0
mit
e7d171b8b3721093c126560d1982e8eaebc4de6b
kuboschek/jay,OpenJUB/jay,OpenJUB/jay,kuboschek/jay,kuboschek/jay,OpenJUB/jay
jay/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom ...language import Language\n\ndef test_simple_train():\n nlp = Language()\n\n nlp.add_pipe(nlp.create_pipe('textcat'))\n nlp.get_pipe('textcat').add_label('is_good')\n\n nlp.begin_t...
python
edit
1
3
mit
42a0fbf29168f12a4bc3afc53bbf7148b9d008f6
aikramer2/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/sp...
spacy/tests/pipeline/test_textcat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom enum import Enum\n\n\nclass Transactions(Enum):\n def __str__(self):\n return self.name\n\n\nclass PlenumTransactions(Transactions):\n # These numeric constants CANNOT be changed once they have been used,\n # because ...
python
edit
1
1
apache-2.0
0b5b25b5cc3b5fe59c0a263983dae05ebfdc8de9
evernym/zeno,evernym/plenum
plenum/common/transactions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport requests\nfrom celery.task import Task\nfrom django.conf import settings\n\n\nclass DeliverHook(Task):\n def run(self, target, payload, instance=None, hook=None, **kwargs):\n \"\"\"\n target: the url...
python
edit
1
2
bsd-3-clause
11312893661ac339212fad7d81a21c9ddc2533d3
praekelt/seed-identity-store,praekelt/seed-identity-store
identities/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom django.conf.urls import patterns, url\nfrom . import views\nfrom django.contrib.admin.views.decorators import staff_member_required\n\n\nurlpatterns = patterns(\n \"\",\n url(r\"^hello/$\"...
python
edit
1
0
mit
4874f1b1a7a3ff465493f601f5f056bf8f3f1921
tgs/django-badgekit-webhooks
badgekit_webhooks/urls.py
rejected_duplicate
Near-duplicate of sample 11171
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport threading\n\nclass TerminableThreadMixin:\n \"\"\"\n TerminableThreadMixin is useful for threads that need to be terminated\n from the outside. It provides a method called 'terminate', which communicates\n to t...
python
edit
3
2
bsd-2-clause
e1c58062db9c107c358e3617793aaed7cdb3a133
adamnew123456/jobmon
jobmon/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shutil\nimport tempfile\n\nfrom django.test import TestCase\nfrom django.core.management import call_command\nfrom django.test.utils import override_settings\n\n\nTMP_STATIC_DIR = tempfile.mkdtemp()\n\n\n@override_settings...
python
edit
1
2
bsd-3-clause
76ed5eb9d9d2f3a453de6976f52221e6970b6b71
tangentlabs/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages,socradev/django-fancypages,socradev/django-fancypages,tangentlabs/django-fancypages
tests/unit/test_offline_compression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Humbug Inc's internal git plugin configuration.\n# The plugin and example config are under api/integrations/\n\n# Leaving all the instructions out of this file to avoid having to\n# sync them as we update the comments.\n\nHUMBUG_USER = \"...
python
edit
1
2
apache-2.0
6ad84b8cc930922296fbe8c583c8c69f5b94d9c9
MariaFaBella85/zulip,SmartPeople/zulip,blaze225/zulip,calvinleenyc/zulip,natanovia/zulip,moria/zulip,dnmfarrell/zulip,samatdav/zulip,tbutter/zulip,deer-hope/zulip,guiquanz/zulip,sharmaeklavya2/zulip,zulip/zulip,guiquanz/zulip,rishig/zulip,developerfm/zulip,schatt/zulip,AZtheAsian/zulip,praveenaki/zulip,glovebx/zulip,sh...
bots/humbug_git_config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom uuid import uuid4\nfrom unittest import TestCase\nimport webtest\nfrom daybed.db import DatabaseConnection\n\n\nHERE = os.path.dirname(os.path.abspath(__file__))\n\n\nclass BaseWebTest(TestCase):\n \"\"\"Base Web Test to ...
python
edit
1
1
bsd-3-clause
68d1943b591afe55f75fa31dfb3c4c61b8f4297f
spiral-project/daybed,spiral-project/daybed
daybed/tests/support.py
rejected_duplicate
Near-duplicate of sample 16440
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport logbook\n\nfrom .base import SubsystemBase\n_logger = logbook.Logger(__name__)\n\n\nclass TasksSubsystem(SubsystemBase):\n\n NAME = 'tasks'\n\n\n def activate(self, flask_app):\n from ..celery.app import cel...
python
edit
1
3
bsd-3-clause
ce3c7daff5eaaf8eefecf3f4e5bd9fbca40a7a2a
getweber/weber-cli
cob/subsystems/tasks_subsystem.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2019 The Keras Tuner Authors\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# You may obtain a copy of the License at\n#\n# https:...
python
edit
1
2
apache-2.0
b193df5080cc8076739509523cf391f5b7132d56
keras-team/keras-tuner,keras-team/keras-tuner
kerastuner/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom haystack.indexes import SearchIndex, CharField, MultiValueField, BooleanField\nfrom haystack import site\nfrom .models import MuseumObject\n\n\nclass MuseumObjectIndex(SearchIndex):\n text = CharField(document=True, use_template=Tru...
python
edit
5
2
bsd-3-clause
232a9fd87f15a8b118c835d6f888d6bb9e236d19
uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam
cat/search_indexes.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\" __init__.py\n\nSeam\n====\n\nSeam is a simple layer between existing neuroimaging tools and your data.\n\nWhile it is opinionated in how to execute tools, it makes no decisions\nas to...
python
edit
1
0
mit
233e74abcc4a70f573e199074f5184b30bdfe1d2
VUIIS/seam,VUIIS/seam
seam/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\nclass RequiresType(object):\n \"\"\"\n Checks that the first (or position given by the keyword argument 'position'\n argument to the function is an instance of one of the types given in the\n positiona...
python
edit
2
3
bsd-3-clause
418e7a7d8c8261578df046d251041ab0794d1580
rasher/reddit-modbot
decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\ndef test_bar_fixture(testdir):\n \"\"\"Make sure that pytest accepts our fixture.\"\"\"\n\n # create a temporary pytest test module\n testdir.makepyfile(\"\"\"\n def test_sth(bar):\n a...
python
edit
1
1
mit
455c8ed93dcac20b6393cf781e19971fa3b92cdb
hackebrot/pytest-cookies
tests/test_cookies.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import app, mongo\nfrom alexandria.decorators import *\nfrom flask import request, jsonify, url_for, session\nfrom flask.ext.classy import FlaskView, route\nimport json\nfrom bson import json_util\n\nclass BooksView(FlaskView):\n\n ...
python
edit
10
2
mit
134fcbd6e82957ac3abd2eebdc296fd4ccb457e9
citruspi/Alexandria,citruspi/Alexandria
alexandria/api/books.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# Copyright (C) 2010 John Reese\n# Licensed under the MIT license\n\nimport sys\nimport MarkdownPP\n\nif len(sys.argv) > 2:\n\tmdpp = open(sys.argv[1], \"r\")\n\tmd = open(sys.argv[2], \"w\")\n\nelif len(sys.argv) >...
python
edit
1
0
mit
3a21137a09c58612044580f5835be1bbe2765500
triAGENS/markdown-pp,jreese/markdown-pp
markdown-pp.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nimport factory\n\nfrom django.contrib.auth.models import User\n\n\nclass UserFactory(factory.Factory):\n FACTORY_FOR = User\n\n first_name = \"Boy\"\n last_name = \"Factory\"\n email = factory.LazyAttribute(\n...
python
edit
1
0
mit
0d0d43f957cb79a99eaacef0623cd57351ca40f6
sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/Rynda,sarutobi/flowofkindness,sarutobi/ritmserdtsa
test/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom swingtime import views\n\nurlpatterns = patterns('',\n url(\n r'^(?:calendar/)?$',\n views.CalendarView.as_view(),\n name='swingtime-calendar'\n ),\n\n url(\n ...
python
edit
1
0
mit
94d54e20fe5590fad0449bef79366654b3c7f23d
jonge-democraten/mezzanine-fullcalendar
swingtime/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import *\n\n\nclass TestUserArgs(IntegrationTest):\n def __init__(self, *args, **kwargs):\n IntegrationTest.__init__(\n self, os.path.join(examples_dir, '10_custom_args'),\n configure=False, *args, **k...
python
edit
11
1
bsd-3-clause
9145be89c1a5ba1a2c47bfeef571d40b9eb060bc
jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000
test/integration/test_user_args.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint\n\nfrom unbound_legacy_api.utils.response import create_response\n\nstats_bp = Blueprint('stats', __name__, url_prefix='/stats')\n\n@stats_bp.route('/ping')\ndef ping():\n \"\"\"Generic ping route to check if ...
python
edit
1
1
mit
95c23b465bc0e0ce0e1ae633ddd1573cfdc997e2
UnboundLegacy/api
unbound_legacy_api/blueprints/stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom .app import setup, teardown\n\n\n@pytest.fixture(autouse=True, scope='session')\ndef db_migration(request):\n setup()\n request.addfinalizer(teardown)\n\n```\n\nApply this change: Add live and expired framework p...
python
edit
1
1
mit
f4fdba652a1822698778c65df66a2639ec0fc5ad
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Provide the class IdxItem which represents an item in the index.\n\"\"\"\n\nimport hashlib\n\n\ndef _md5file(fname):\n \"\"\"Calculate the md5 hash for a file.\n \"\"\"\n m = hashlib.md5()\n chunksize = 8192\n with open...
python
edit
1
3
apache-2.0
24c8122db0f38a1f798461a23d08535e4e6781d5
RKrahl/photo-tools
photo/idxitem.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport featureflow as ff\nfrom random_samples import ShuffledSamples\nfrom random_samples import InfiniteSampler\nfrom preprocess import PreprocessingPipeline\n\n\ndef learning_pipeline():\n class LearningPipeline(ff.BaseModel):\n ...
python
edit
1
4
mit
6a17674897bbb3a44fb2153967e3985dfdb3d5df
JohnVinyard/zounds,JohnVinyard/zounds,JohnVinyard/zounds,JohnVinyard/zounds
zounds/learn/graph.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses th...
python
edit
5
2
apache-2.0
376fa8dead817ae0b1e1e97547d7c95858b1fb0e
nathanbjenx/cairis,failys/CAIRIS,failys/CAIRIS,nathanbjenx/cairis,nathanbjenx/cairis,nathanbjenx/cairis,failys/CAIRIS
cairis/data/ImportDAO.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nfrom django.template.loader import render_to_string\nfrom tasks.const import STATUS_SUCCESS, STATUS_FAILED\nfrom .base import library\n\n\n@library.register('py_unittest')\ndef py_unittest_violation(data):\n \"\"\"Python unitt...
python
edit
1
7
mit
013fa911c7b882a0b362549d4d9b1f9e1e688bc8
nvbn/coviolations_web,nvbn/coviolations_web
violations/py_unittest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport webapp2\nfrom freetalks import handler\n\napplication = webapp2.WSGIApplication([\n webapp2.Route(r'/', handler.general.Home, 'home'),\n webapp2.Route(r'/talk/<talk:[a-z\\d-]*>', handler.talk.Display, 'talk-display'),\n])\n\n``...
python
edit
1
0
mit
1c627347a55faadc28cd975d313ec45a84fcba21
preichenberger/freetalks,preichenberger/freetalks
freetalks/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .hirlite import Rlite, HirliteError\nfrom .version import __version__\n\n__all__ = [\"Rlite\", \"HirliteError\", \"__version__\"]\n\n```\n\nApply this change: Add support for calling commands by attr access" }, { "role": "assis...
python
edit
1
1
bsd-2-clause
bfaf9d326fc0a2fc72a6f7b6ed92640c3fe9b87b
seppo0010/rlite-py,seppo0010/rlite-py,pombredanne/rlite-py,pombredanne/rlite-py
hirlite/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\r\nimport io\r\n\r\nfrom steel.fields.numbers import BigEndian\r\nfrom steel import fields\r\nfrom steel.chunks import base\r\n\r\n__all__ = ['Chunk', 'ChunkList', 'Form']\r\n\r\n\r\nclass Chunk(base.Chunk):\r\n id = f...
python
edit
4
1
bsd-3-clause
a75dbd5aa5e9b84d08919ea14743afb75182ee8b
gulopine/steel
steel/chunks/iff.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import current_app\nfrom .. import db, login_manager\n\nclass Bookmarks(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n listing_id = db.Column(db.Integer, unique=True)\n merchant_id = db.Column(db.Integer, db...
python
edit
4
1
mit
15ebd5a3509b20bad4cf0123dfac9be6878fa91c
hack4impact/reading-terminal-market,hack4impact/reading-terminal-market,hack4impact/reading-terminal-market
app/models/bookmarks.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport logging\nfrom pathlib import Path\nfrom shutil import copyfile\nfrom tempfile import TemporaryDirectory\n\nfrom rdflib.exceptions import ParserError\n\nfrom rdflib import Graph\n\n\nclass FileParserGuessFormatTest(un...
python
edit
1
1
bsd-3-clause
700f6e6ef40a2d33e5678e260f03cd15148e0b3a
RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib
test/test_parse_file_guess_format.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2011-2013 Kunal Mehta. All rights reserved.\n# Use of this source code is governed by a BSD License found in README.md.\n\nfrom django.http import HttpResponse\nfrom django.shortcuts import render_to_response\nfrom django.te...
python
edit
1
1
bsd-3-clause
9aef1f357a3319a31bd1995f462eb356011b6a93
nathanielparke/huxley,bmun/huxley,bmun/huxley,nathanielparke/huxley,ctmunwebmaster/huxley,nathanielparke/huxley,ctmunwebmaster/huxley,bmun/huxley,bmun/huxley,ctmunwebmaster/huxley,ctmunwebmaster/huxley,nathanielparke/huxley
huxley/shortcuts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2021 The Chromium OS Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n\ndef register_variant(project_name, extra_dts_overlays=(), extra_kcon...
python
edit
15
1
bsd-3-clause
db03af21b3f46e5f5af89ccf224bc2bf4b9f6d9b
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
zephyr/projects/herobrine/BUILD.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom import_export.admin import ImportExportMixin\n\nfrom .models import Book, Category, Author\n\n\nclass BookAdmin(ImportExportMixin, admin.ModelAdmin):\n pass\n\n\nadmin.site.register(Book, BookAdmi...
python
edit
1
0
bsd-2-clause
f2ca059d6e3e9e593b053e6483ad071d58cc99d2
PetrDlouhy/django-import-export,copperleaftech/django-import-export,Akoten/django-import-export,daniell/django-import-export,pajod/django-import-export,piran/django-import-export,bmihelac/django-import-export,sergei-maertens/django-import-export,bmihelac/django-import-export,PetrDlouhy/django-import-export,copperleafte...
tests/core/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport readability\nimport unittest\n\ngood_code = \"\"\"\ndef this_is_some_good_code(var):\n for i in range(10):\n print(i)\n\"\"\"\n\nbad_code = \"\"\"\ntisgc = lambda var: [print(i) f...
python
edit
1
1
mit
83c79251b5040e18c5c8ac65a5e140e59edc4d3f
swenson/readability
test_readability.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.database\n~~~~~~~~~~~~~~~\n\nDatabase utilities.\n\n:Copyright: 2006-2014 Jochen Kupperschmidt\n\"\"\"\n\nimport uuid\n\nfrom flask.ext.sqlalchemy import BaseQuery, SQLAlchemy\nfrom sqlalchemy.diale...
python
edit
3
1
bsd-3-clause
096e41266ac3686c1757fc4b5087e3b786287f91
homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps
webapp/byceps/database.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\n\n\nclass Meta(collections.OrderedDict):\n def __init__(self, *args, **kwargs):\n self._smallest = float('inf')\n self._largest = 0\n self._ordered = True\n super(Meta, self).__init__(*args, **kwargs)\n\n d...
python
edit
1
5
mit
ee32d3746a9fa788a06931063a8242f936b6ed18
PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge
src/data/meta.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os, sys\n\nfrom django.conf import settings\nimport django\n\n\nDEFAULT_SETTINGS = dict(\n INSTALLED_APPS=(\n 'django.contrib.contenttypes',\n 'model_utils',\n 'model_utils.tests',\n ...
python
edit
1
4
bsd-3-clause
1152e7a329ee20494a4856f7a83f5ab1e6c4390e
nemesisdesign/django-model-utils,timmygee/django-model-utils,patrys/django-model-utils,yeago/django-model-utils,nemesisdesign/django-model-utils,timmygee/django-model-utils,patrys/django-model-utils,carljm/django-model-utils,yeago/django-model-utils,carljm/django-model-utils
runtests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nfrom os import scandir\nfrom sys import argv\nfrom platform import uname\nfrom pathlib import Path\n\n\nfilename_template = \"\"\"\n# -------------------------------------------------------------------------------\...
python
edit
1
4
mit
a393881b4cf79a34101c7d4821ed0ccd78f117cb
skk/dotfiles,skk/dotfiles
zsh/zsh_concat.py
rejected_duplicate
Near-duplicate of sample 13064
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport hashlib\n\nprefix = ''\nnumber = 1\n\nwith open('../inputs/04.txt') as f:\n prefix = f.readlines()\n\nprefix = prefix[0].rstrip()\n\nwhile True:\n md5 = hashlib.md5()\n md5.update('{0}{1}'.format(prefix...
python
edit
2
0
mit
30230cb6fcb29cd437d3ce71c3370da6d38cb622
opello/adventofcode
python/04-2.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\nimport numpy as np\n\n\ndef change_slice_thickness(cube, slice_thickness=1.0):\n '''\n\n Degrades the velocity resolution of a data cube. This is to avoid\n shot noise ...
python
edit
4
2
mit
155b1e6b8d431f1169a3e71d08d93d76a3414c59
e-koch/TurbuStat,Astroua/TurbuStat
turbustat/statistics/vca_vcs/slice_thickness.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom censusreporter.config.base.settings import *\nimport os\n\nDEBUG = False\nROOT_URLCONF = 'censusreporter.config.prod.urls'\nWSGI_APPLICATION = \"censusreporter.config.prod.wsgi.application\"\n\n\nALLOWED_HOSTS = [\n 'censusreporter....
python
edit
2
0
mit
03340917e96b7076ca420bea4e121f89c05935f6
censusreporter/censusreporter,censusreporter/censusreporter,censusreporter/censusreporter,censusreporter/censusreporter
censusreporter/config/prod/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..local import check_repo_exists\n\nfrom pytest import raises\n\ndef test_bad_user():\n with raises(RuntimeError):\n check_repo_exists('---/invaliduser')\n\ndef test_bad_repo():\n with raises(RuntimeError):\n check_...
python
edit
1
1
mit
fb27a53d0ea46e9012610eeccd90b50be07388d9
gforsyth/doctr_testing,drdoctr/doctr
doctr/tests/test_local.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2013 Leif Johnson <<EMAIL>>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without res...
python
edit
6
1
mit
6b06ff67097d0a2ef639df4a3d9baf4f6677b5fd
EmbodiedCognition/pagoda,EmbodiedCognition/pagoda
lmj/sim/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCopyright [2009-2014] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License ...
python
edit
1
3
apache-2.0
213c25934aa15c9d607833f145f54647d17364ca
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
rnacentral/portal/templatetags/portal_extras.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A simple example of Pyglet/Twisted integration. A Pyglet window\nis displayed, and both Pyglet and Twisted are making scheduled calls\nand regular intervals. Interacting with the window doesn't interfere\nwith either calls.\n\"\"\"\ni...
python
edit
3
1
mit
20b4c81137d4abdd4db0dc80ae9a2e38cca4e8eb
padraigkitterick/pyglet-twisted
examples/hello_twisted.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Client(models.Model):\n client_name = models.CharField(max_length=60)\n\n\nclass Service(models.Model):\n name = models.CharField(max_length=60)\n\n\nclass TeamMember(models.Model):\n name = ...
python
edit
1
1
mit
855434523df57183c31ed9b10e7458232b79046a
ACLARKNET/aclarknet-django,ACLARKNET/aclarknet-django
aclarknet/aclarknet/aclarknet/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass SectionSlugManager(models.Manager):\n def __init__(self, section_field=\"primary_section\", slug_field=\"slug\",\n *args, **kwargs):\n super(SectionSlugManager, self).__init__(*ar...
python
edit
1
6
apache-2.0
fd907ac07d5d20dcf8964dbef324bfa2da93ed44
armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections
armstrong/core/arm_sections/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .common import random_str\n\n\ndef test_cannot_update_global_role(admin_mc, remove_resource):\n \"\"\"Asserts that globalRoleId field cannot be changed\"\"\"\n admin_client = admin_mc.client\n\n grb = admin_client.create_globa...
python
edit
1
1
apache-2.0
7778b98e1a0d0ac7b9c14e4536e62de4db7debc9
cjellick/rancher,rancherio/rancher,cjellick/rancher,rancher/rancher,cjellick/rancher,rancherio/rancher,rancher/rancher,rancher/rancher,rancher/rancher
tests/integration/suite/test_global_role_bindings.py
accepted
null
true