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\nfrom weblab.admin.script import Creation\n\nAPACHE_CONF_NAME = 'apache.conf'\nMIN_PORT = 10000\n\nDEFAULT_DEPLOYMENT_SETTINGS = {\n Creation.COORD_ENGINE: 'redis',\n Creation.COORD_REDIS_DB: 0,\n Creation.COORD_REDIS_PORT: 6379,\n ...
python
edit
1
0
bsd-2-clause
a642a4f98016e2fa796c69bd74c36008601e4e5f
weblabdeusto/weblabdeusto,porduna/weblabdeusto,porduna/weblabdeusto,zstars/weblabdeusto,porduna/weblabdeusto,zstars/weblabdeusto,porduna/weblabdeusto,zstars/weblabdeusto,morelab/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,morelab/weblabd...
tools/wcloud/wcloud/deploymentsettings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\ncli_tools = [\"spritemapper = spritecss.main:main\"]\n\nsetup(name=\"spritemapper\", version=\"0.5\", url=\"http://yostudios.github.com/Spritemapper/\",\n author=\"Yo Studios AB\", author_email=\"<EMAIL>...
python
edit
1
0
mit
89b5f2a7afaa5d8533500ab35dd418e996bd305d
wpj-cz/Spritemapper,yostudios/Spritemapper,wpj-cz/Spritemapper,wpj-cz/Spritemapper,yostudios/Spritemapper,yostudios/Spritemapper,wpj-cz/Spritemapper
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport distutils.core\n\n# Uploading to PyPI\n# =================\n# $ python setup.py register -r pypi\n# $ python setup.py sdist upload -r pypi\n\nversion = '1.0'\ndistutils.core.setup(\n name='nonstdlib',\n version=version,...
python
edit
2
0
mit
139d09ecd83694dd92d393b64d1d9b0ad05e9f4c
kalekundert/nonstdlib,KenKundert/nonstdlib,kalekundert/nonstdlib,KenKundert/nonstdlib
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\nimport os\n\nfrom setuptools import setup, find_packages\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\nwith open('abakus/__init__.py', 'r') as fd:\n version = re.search(\n r'^__version__\\s*=\\s*[\\'\"](...
python
edit
1
0
mit
783ee7a17fb3bc930618dc5788ec727a3d8f1a1b
webkom/django-auth-abakus
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name=\"energenie\",\n version=\"1.0.1\",\n author=\"Ben Nuttall\",\n author_email=...
python
edit
1
1
bsd-3-clause
fdf82d36b86dff35943bb00f73b915240f5bd68c
bennuttall/energenie,RPi-Distro/python-energenie,rjw57/energenie
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ntry:\n # Try using ez_setup to install setuptools if not already installed.\n from ez_setup import use_setuptools\n use_setuptools()\nexcept ImportError:\n # Ignore import error and assume Python 3 which already has setuptools.\...
python
edit
1
2
mit
cf671f70974348ac202f613c6b090f05d4f2543b
chrisb2/pi_ina219
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\nfrom setuptools import setup\n\n\ndef readreq(filename):\n result = []\n with open(filename) as f:\n for req in f:\n req = req.lstrip()\n if req.startswith('-e ') or r...
python
edit
3
6
apache-2.0
04ff7acc10dc722d372db19aaf04296f2a2c63cc
klmitch/train
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom distutils.core import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='mammoth',\n version='0.1.1',\n description='Convert ...
python
edit
1
1
bsd-2-clause
40958981df401a898a39ddad45c2b48669a44ee7
mwilliamson/python-mammoth,JoshBarr/python-mammoth
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\n README = readme.read()\n\nimport multilingual_survey\n\n# allow setup.py to be run from any path\nos....
python
edit
1
0
bsd-3-clause
9c9a2a36a5abbd166b9f67a6927447c14d2264ca
diadzine/django-simple-multilingual-survey,diadzine/django-simple-multilingual-survey
setup.py
rejected_duplicate
Near-duplicate of sample 5256
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n\"\"\"Setup script for PythonTemplateDemo.\"\"\"\n\nimport setuptools\n\nfrom demo import __project__, __version__\n\ntry:\n README = open(\"README.rst\").read()\n CHANGELOG = open(\"CHANGELOG.rst\").read()\ne...
python
edit
1
0
mit
2ed7e3af5f6ab586dbad33e566f61a0a3c3ff61b
jacebrowning/template-python-demo
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf8 -*-\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"jawa\",\n packages=find_packages(),\n version=\"1.0\",\n description=\"Doing fun stuff with JVM ClassFiles.\",\n au...
python
edit
1
0
mit
c03fb3e27b4d526916192739ac6879f186f4d749
TkTech/Jawa,TkTech/Jawa
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom setuptools import setup\n\nsetup(name = 'OWSLib',\n version = '0.1.0',\n description = 'OGC Web Service utility library',\n license = 'GPL',\n keywords = 'gis ogc ows wfs wms capabiliti...
python
edit
1
0
bsd-3-clause
af406d09ded10dbdfcc1d752f1cfe1d4bfe8f7d5
daf/OWSLib,datagovuk/OWSLib,kalxas/OWSLib,bird-house/OWSLib,kwilcox/OWSLib,datagovuk/OWSLib,KeyproOy/OWSLib,Jenselme/OWSLib,b-cube/OWSLib,QuLogic/OWSLib,robmcmullen/OWSLib,geopython/OWSLib,daf/OWSLib,jaygoldfinch/OWSLib,mbertrand/OWSLib,ocefpaf/OWSLib,tomkralidis/OWSLib,dblodgett-usgs/OWSLib,JuergenWeichand/OWSLib,daf/...
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport unittest\n\n#sys.path.insert(0, os.path.abspath('..'))\nimport github3\n\nclass BaseTest(unittest.TestCase):\n api = 'https://api.github.com/'\n kr = 'kennethreitz'\n sigm = 'sigmavirus24'\n todo = 'Todo.txt-p...
python
edit
1
3
bsd-3-clause
98fdc28d0c506e7fb44648256a56e7978d111073
agamdua/github3.py,christophelec/github3.py,degustaf/github3.py,jim-minter/github3.py,icio/github3.py,itsmemattchung/github3.py,balloob/github3.py,sigmavirus24/github3.py,h4ck3rm1k3/github3.py,wbrefvem/github3.py,krxsky/github3.py,ueg1990/github3.py
tests/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport defcon\nfrom fontParts.base import BaseGroups\nfrom fontParts.fontshell.base import RBaseObject\n\n\nclass RGroups(RBaseObject, BaseGroups):\n\n wrapClass = defcon.Groups\n\n def _items(self):\n return self.naked().items...
python
edit
1
1
mit
1f9bc1b6f9a796458d104c01b9a344cbb0c84a9b
robofab-developers/fontParts,robofab-developers/fontParts
Lib/fontParts/fontshell/groups.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport click\n\n\n@click.command()\n@click.argument('environment')\n@click.pass_obj\ndef ssh(lancet, environment):\n \"\"\"\n SSH into the given environment, based on the dploi configuration.\n \"\"\"\n namespace = {}\n\n wit...
python
edit
1
3
mit
fbfd656d0c11bfbc6500fcdffdfae422ab50a08f
GaretJax/lancet,GaretJax/lancet
lancet/contrib/dploi.py
rejected_duplicate
Near-duplicate of sample 3255
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.6 on 2016-08-15 14:58\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef update_status_names(apps, schema_editor):\n ProjectPhase = apps.get_model('bb_...
python
edit
1
3
bsd-3-clause
d03657217cfd019bb55a4895a4cc6b0a80068ff0
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
bluebottle/bb_projects/migrations/0003_auto_20160815_1658.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\n\n\ndef get_user_model():\n \"\"\"\n Return the User model\n\n Using this function instead of Django 1.5's get_user_model allows backwards\n compatib...
python
edit
1
4
bsd-3-clause
12c833b1097579ca4a0162dca0d789b787f7d237
josesanch/django-oscar,binarydud/django-oscar,Idematica/django-oscar,QLGu/django-oscar,dongguangming/django-oscar,kapari/django-oscar,jmt4/django-oscar,amirrpp/django-oscar,WadeYuChen/django-oscar,rocopartners/django-oscar,rocopartners/django-oscar,amirrpp/django-oscar,ka7eh/django-oscar,ahmetdaglarbas/e-commerce,jinny...
oscar/core/compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nContains factory classes for quickly generating test data.\n\nIt uses the factory_boy package.\n\nPlease see https://github.com/rbarrois/factory_boy for more info\n\"\"\"\n\nimport datetime\nimport factory\nimport random\nfrom djang...
python
edit
3
0
mit
da03ad3386d45d310514f2b5ef3145fbcf5b773d
daltonamitchell/rating-dashboard,daltonamitchell/rating-dashboard,daltonamitchell/rating-dashboard
dashboard/ratings/tests/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rdflib import Graph\nfrom ktbs_bench.bnsparqlstore import SPARQLStore\n\n\nclass BenchableStore:\n \"\"\"Allows to use a store/graph for benchmarks.\n\n Contains a rdflib.Graph with setup and teardown.\n \"\"\"\n\n def __in...
python
edit
1
2
mit
77db2b0b01cda0565312430f84b35c901ad44c31
ktbs/ktbs-bench,ktbs/ktbs-bench
ktbs_bench/benchable_store.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom statsd import StatsClient\n\n\nclass StatsdClient(StatsClient):\n def init_app(self, app, *args, **kwargs):\n self.active = app.config.get('STATSD_ENABLED')\n self.namespace = app.config.get('NOTIFY_ENVIRONMENT') + \"....
python
edit
1
2
mit
04f36fab2168fb9cd34d3c6fc7f31533c90b9149
alphagov/notifications-api,alphagov/notifications-api
app/clients/statsd/statsd_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django_lean.experiments.models import GoalRecord\nfrom django_lean.experiments.signals import goal_recorded, user_enrolled\nfrom django_lean.lean_analytics import get_all_analytics\n\n\ndef analytics_goalrecord(sender, goal_record, exp...
python
edit
1
3
bsd-3-clause
31dd9f5ec73db577bf00d7411ecffeba30691d0c
e-loue/django-lean,e-loue/django-lean
django_lean/lean_analytics/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom jsonobject import StringProperty\n\n\ndef TypeProperty(value):\n \"\"\"\n Shortcut for making a required property and restricting it to a single specified\n value. This adds additional validation that the objects are being wra...
python
edit
1
1
bsd-3-clause
8f60ea444d2732b5e0f1b73a24cd8e753f160e79
dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq
corehq/apps/userreports/specs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nfrom mopidy.models import Track\n\nfrom tests.mpd import protocol\n\n\nclass StatusHandlerTest(protocol.BaseTestCase):\n def test_clearerror(self):\n self.send_request('c...
python
edit
1
1
apache-2.0
79b0584887075eb1732770d1732ae07147ec21b6
ZenithDK/mopidy,quartz55/mopidy,tkem/mopidy,dbrgn/mopidy,rawdlite/mopidy,ali/mopidy,glogiotatidis/mopidy,quartz55/mopidy,bacontext/mopidy,bencevans/mopidy,kingosticks/mopidy,ZenithDK/mopidy,tkem/mopidy,dbrgn/mopidy,tkem/mopidy,jmarsik/mopidy,glogiotatidis/mopidy,adamcik/mopidy,bacontext/mopidy,bacontext/mopidy,pacificI...
tests/mpd/protocol/test_status.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass Cog:\n \"\"\" The Cog baseclass that all cogs should inherit from. \"\"\"\n def __init__(self, bot):\n self.bot = bot\n\n```\n\nApply this change: Add logger attribute in Cog baseclass\n\nI don't feel like refactoring all...
python
edit
1
1
mit
7da561d7bf3affecce8b10b50818591ccebe0ba2
sliceofcode/dogbot,slice/dogbot,slice/dogbot,sliceofcode/dogbot,slice/dogbot
dog/core/cog.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pylab\nfrom matplotlib import pyplot\nfrom PlotInfo import *\n\nclass Bar(PlotInfo):\n \"\"\"\n A bar chart consisting of a single series of bars.\n \"\"\"\n\n def __init__(self):\n PlotInfo.__init__(self, \"bar\")...
python
edit
10
4
bsd-3-clause
eafafd3d90024c552a6a607871c1441e358eb927
alexras/boomslang
Bar.py
rejected_lint
Too many lint violations: 10
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n=========================\nBase Library (:mod:`ibei`)\n=========================\n\n.. currentmodule:: ibei\n\"\"\"\n\nfrom main import uibei, SQSolarcell, DeVosSolarcell\n\n```\n\nApply this change: Add ver...
python
edit
5
0
mit
a174b827b36293d90babfcdf557bdbb9c9d0b655
jrsmith3/tec,jrsmith3/ibei,jrsmith3/tec
ibei/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Generated by Django 1.9.1 on 2016-07-07 11:58\nfrom __future__ import unicode_literals\n\nfrom django.conf import settings\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Mig...
python
edit
1
0
mit
320214ca1636415bc4d677ba9e3b40f0bf24c8f9
ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc
openprescribing/frontend/migrations/0008_create_searchbookmark.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport testinfra.utils.ansible_runner\n\ntestinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(\n '.molecule/ansible_inventory').get_hosts('all')\n\n\ndesktop_file_location = \"/root/.local/share/applications/rubymine-2017.2.des...
python
edit
1
1
mit
45bd76bbaafdeaeab28bb86ae719bdeefabbf95b
henriklynggaard/ansible-role-rubymine
tests/test_rubymine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nVIEW_LOCATIONS = [\n \"openprocurement.auctions.flash.views\",\n \"openprocurement.auctions.core.plugins\",\n]\n\n\n```\n\nApply this change: Add view_locations for plugins in core" }, { "role": "ass...
python
edit
1
0
apache-2.0
9fb8b0a72740ba155c76a5812706612b656980f4
openprocurement/openprocurement.auctions.flash
openprocurement/auctions/flash/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport telegram\nimport telegram.ext\n\nimport os\n\nimport dotenv\n\nversion = \"0.1.4\"\n\n# Load credentials from .env\ndotenv.load_dotenv()\ntoken = os.getenv(\"TELEGRAM_BOT_API_TOKEN\")\n\nbot = telegram.Bot(token = token)\nupdater =...
python
edit
1
1
mit
d48fd8b11fe2d9edef0ca7044df8659244a13821
Harmon758/Harmonbot,Harmon758/Harmonbot
Telegram/Telegram_Harmonbot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport os\nimport sys\nimport idlk.base41\n\nif sys.version_info[0] == 3:\n _get_byte = lambda c: c\nelse:\n _get_byte...
python
edit
2
2
mit
aeb3ce72205051039e6339f83a2b7dec37f8b8c9
znerol/py-idlk
idlk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport os\nimport time\n\nfrom twython import Twython\nimport requests\n\n\nAPP_KEY = os.environ.get('APP_KEY')\nAPP_SECRET = os.environ.get('APP_SECRET')\nOAUTH_TOKEN = os.environ.get('OAUTH_TOKEN')\nOAUTH_TOKEN_SECRET = o...
python
edit
1
2
mit
b66b9a2e329bf7a68c41bf07a1444c9d49a0b6c8
erickgnavar/coinstats
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport os\nimport logging as log\nimport sys\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"INFO\"))\n\nos.system(\"flask mailu advertise\")\nos.system(\"flask db upgrade\")\n\naccount = os...
python
edit
1
0
mit
8d9f3214cc5663dc29f7dcf3a03bc373a51d010b
kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io
core/admin/start.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nRESTRICTED_PROJECTS = [\n 'dubtestproject',\n 'meson',\n 'meson-ci',\n 'mesonbuild.github.io',\n 'mesonwrap',\n 'wrapdb',\n 'wrapdevtools',\n 'wrapweb',\n]\nISSUE_TRACKER = 'wrapdb'\n\n\nclass Inventory:\n\n def _...
python
edit
1
2
apache-2.0
381cf72695185fda93d0d9685fad887d445b4a72
mesonbuild/wrapweb,mesonbuild/wrapweb,mesonbuild/wrapweb
mesonwrap/inventory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy\n# of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
python
edit
1
1
apache-2.0
e8ac68b33b3b7bf54baa36b89ac90e9e5a666599
openstack/magnum,ArchiFleKs/magnum,ArchiFleKs/magnum,openstack/magnum
magnum/conf/services.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Hide DIALS banner during xia2 execution\n\nThere probably should be a neater way to achieve this." }, { "role": "assistant", "content": "from __future__ import absolute_import, division, print_function\n\nimport sys\n\n# Hack to ...
python
new_file
1
0
bsd-3-clause
71b8ee305e70d3822bc5efe13de4eede7f13b65e
xia2/xia2,xia2/xia2
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.syndication.views import Feed\n\nfrom .models import Post\nfrom .settings import (\n SYNDICATION_FEED_TITLE, SYNDICATION_FEED_LINK,\n SYNDICATION_FEED_DESCRIPTION, SYNDICATION_FEED_TYPE\n)\n\n\nclass LatestPostFeed...
python
edit
null
null
mit
7b10375eaae7c79a4d90b8f3835e8a1fe06c5f31
DemocracyClub/django-hermes,DemocracyClub/django-hermes
hermes/feeds.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pyshark.capture.capture import Capture\n\n\ndef test_capture_gets_decoding_parameters():\n c = Capture(decode_as={'tcp.port==8888': 'http'})\n params = c.get_parameters()\n decode_index = params.index('-d')\n assert params[...
python
edit
1
1
mit
c654bc1fdacdb355b7e03c853ebcdc919ac5f91d
KimiNewt/pyshark,eaufavor/pyshark-ssl
tests/capture/test_capture.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# flake8: noqa\nfrom .implicit import implicit, NoImplicitLookupError\nfrom .registry import ClassRegistry, Registry, IRegistry, IClassLookup\nfrom .lookup import Lookup, ComponentLookupError, Matcher\nfrom .predicate import (PredicateRegis...
python
edit
1
0
bsd-3-clause
4420eb020d96004c5373584781c7b130de7b90e9
taschini/reg,morepath/reg
reg/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import *\n\nps1 = '\\n% '\nps2 = '| '\ntry:\n from blessings import Terminal\n term = Terminal()\n ps1 = term.bold_blue(ps1)\n ps2 = term.bold_blue(ps2)\n def fancy_movement():\n print(term.move_up() + term.clea...
python
edit
14
5
isc
8ffd6ffecd7ce713446385b6cd108e50fb041403
gvx/isle
__main__.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport warnings\ntry:\n import matplotlib\n\n # matplotlib.use('TkAgg')\n HAS_MPL = True\nexcept ImportError:\n HAS_MPL = False\n\ntry:\n import statsmodels.api as sm\n HAS_STATSM = True\nexcept ImportError:\n HAS_STATS...
python
edit
1
1
bsd-3-clause
b9ccbb2addd8dcaeb100bb5e95768caa2a97c280
matteobachetti/srt-single-dish-tools
srttools/core/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nimport craft_ai\n\nfrom . import settings\nfrom .utils import generate_entity_id\nfrom .data import valid_data\n\n\nclass TestListGenerators(unittest.TestCase):\n \"\"\"Checks that the client succeeds when getting an a...
python
edit
1
2
bsd-3-clause
3e9a4f27ad05b3ecd2a4c013ff0f3b04e5fe44aa
craft-ai/craft-ai-client-python,craft-ai/craft-ai-client-python
tests/test_list_generators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport factory\n\nfrom django.contrib.auth.hashers import make_password\n\nfrom .models import Friendship, User\n\n\nclass UserFactory(factory.django.DjangoModelFactory):\n \"\"\"Create users with default attributes.\"\"\"\n\n class M...
python
edit
1
0
mit
268c4458161ce754a82e3986787f6703f9122e3e
ojh/trackmybmi
trackmybmi/users/factories.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import *\n\n\n# Disable debug mode\n\nDEBUG = False\nTEMPLATE_DEBUG = False\n\n\n# Compress static files offline\n# http://django-compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_OFFLINE\n\nCOMPRESS_OF...
python
edit
3
0
bsd-2-clause
6ce05a55b2318f1ad567c8e4345fb286777b53e6
praekelt/molo-ndoh-yep,praekelt/molo-ndoh-yep,praekelt/molo-ndoh-yep,praekelt/molo-ndoh-yep
ndohyep/settings/production.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport os\nfrom osgeo import gdal\n\nfrom gbdxtools import Interface\nfrom gbdx_task_template import TaskTemplate, Task, InputPort, OutputPort\n\n\ngbdx = Interface()\n\n# data = \"s3://receiving-dgcs-tdgplatform-com/0548136330...
python
edit
1
0
mit
b875f457d7a4926f5028428ead4cecc75af90c2e
michaelconnor00/gbdxtools,michaelconnor00/gbdxtools
examples/launch_cloud_harness.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, render_template\nfrom redis import StrictRedis\nimport random\nimport config\n\napp = Flask(__name__)\napp.debug = config.DEBUG\n\ndb = StrictRedis(host=config.REDIS_HOST, port=config.REDIS_PORT)\n\n@app.route('/')\...
python
edit
1
1
bsd-2-clause
8d014f6bc3994fabf3c0658e6884648ad9a8f2c2
estreeper/quizalicious,estreeper/quizalicious,estreeper/quizalicious
quizalicious.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\n\nfrom django.core.management.base import BaseCommand\nfrom conference import models as cmodels\n\ndef make_speaker_profiles_public_for_conference(conference):\n\n # Get speaker records\n speakers = set()\n talks = cmodels.Talk...
python
edit
2
4
bsd-2-clause
ab02c54cc713cc10c60f09dde3cae2fca3c2a9a4
EuroPython/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
conference/management/commands/make_speaker_profiles_public.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\nfrom django.core.urlresolvers import reverse\nfrom whats_fresh_api.models import *\nfrom django.contrib.gis.db import models\nimport json\n\n\nclass ListPreparationTestCase(TestCase):\n fixtures = ['test...
python
edit
6
2
apache-2.0
4f46fe7abf5efcd93bc161f2cfccc58df4ab1ee4
iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api,osu-cass/whats-fresh-api,osu-cass/whats-fresh-api,iCHAIT/whats-fresh-api
whats_fresh/whats_fresh_api/tests/views/entry/test_list_preparations.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.admin.views.decorators import staff_member_required\n\n\nfrom django.contrib.auth.decorators import login_required\n\n\nfrom django.shortcuts import get_object_or_404\nfrom django.http import HttpResponseBadRequest, Http...
python
edit
1
2
mit
f9a59247155b5d8f356ae09d25573fb703d58e52
arteria/django-hijack,arteria/django-hijack,arteria/django-hijack
hijack/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0\n# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt\n\n\"\"\"Run a simple trace function on a file of Python code.\"\"\"\n\nimport os, s...
python
edit
1
4
apache-2.0
649c70527ae602512cfa6ea62b60ebc43fc69797
hugovk/coveragepy,hugovk/coveragepy,nedbat/coveragepy,hugovk/coveragepy,hugovk/coveragepy,nedbat/coveragepy,nedbat/coveragepy,nedbat/coveragepy,nedbat/coveragepy,hugovk/coveragepy
lab/run_trace.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Django haystack `SearchIndex` module.\"\"\"\nfrom pages.models import Page\nfrom django.conf import settings\n\nfrom haystack.indexes import SearchIndex, CharField, DateTimeField, RealTimeSearchIndex\nfrom haystack import site\n\n\ncl...
python
edit
1
1
bsd-3-clause
5a15ca8b790dda7b2ea11af5d1c179f9e7d9f2ac
pombredanne/django-page-cms-1,akaihola/django-page-cms,remik/django-page-cms,akaihola/django-page-cms,batiste/django-page-cms,remik/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page-cms,batiste/django-page-cms,pombredanne/django-page-cms-1,remik/django-page-cms,akaihola/django-page...
pages/search_indexes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python\n# Code Fights Create Die Problem\n\nimport random\n\n\ndef createDie(seed, n):\n class Die(object):\n pass\n\n class Game(object):\n die = Die(seed, n)\n\n return Game.die\n\n\ndef main():\n ...
python
edit
1
3
mit
6c4c3ac1dde0519d08ab461ab60ccc1d8b9d3d38
HKuz/Test_Code
CodeFights/createDie.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 binance.client import Client\nfrom binance.exceptions import BinanceAPIException, BinanceRequestException\nimport pytest\nimport requests_mock\n\n\nclient = Client('api_key', 'api_secret')\n\n\n...
python
edit
1
1
mit
9581334db472c8ad8dbff0766ec74ed6dfa20d6f
sammchardy/python-binance
tests/test_api_request.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\n\nfrom .conf import settings\nfrom .models import UserStorage\n\n\n@receiver(post_save, sender=settings.AUTH_USER_MODEL)\ndef ensure_userstorage(sender, *...
python
edit
1
2
mit
c73572f2a9b63d35daf8b5935c4a1e6a0422c122
pinax/pinax-documents
pinax/documents/receivers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json as simplejson\nfrom django.http import HttpResponse, Http404\nfrom django.shortcuts import render\nfrom django.views.decorators.csrf import csrf_exempt\nfrom atompos.main import settings\nfrom util import get_atom_pos, get_posit...
python
edit
1
4
mit
54be27f1c2e6c288465f2b59e41f5a4deed00fe7
bertrand-caron/OAPoC,bertrand-caron/OAPoC
atompos/atompos/main/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom blaze.blfuncs import BlazeFunc\nfrom blaze.datashape import double, complex128 as c128\nfrom blaze.blaze_kernels import BlazeElementKernel\nimport blaze\n\ndef _add(a,b):\n return a + b\n\ndef _mul(a,b):\n return a * b\n\nadd = B...
python
edit
4
1
bsd-3-clause
e321b47a5ee2252ce71fabb992e50e5f455a217f
ContinuumIO/blaze,dwillmer/blaze,dwillmer/blaze,ContinuumIO/blaze,mwiebe/blaze,markflorisson/blaze-core,AbhiAgarwal/blaze,LiaoPan/blaze,ChinaQuants/blaze,markflorisson/blaze-core,FrancescAlted/blaze,caseyclements/blaze,FrancescAlted/blaze,caseyclements/blaze,jcrist/blaze,mwiebe/blaze,AbhiAgarwal/blaze,jcrist/blaze,cpcl...
blaze/tests/test_blfuncs.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef hello():\n return \"Hello world!\"\n\nif __name__ == \"__main__\":\n app.run()\n\n```\n\nApply this change: Add all of our routes" }, { "role": "assistan...
python
edit
1
1
mit
ccd681ab4cb840461d5cdc8197242af16e0c12d0
codeforamerica/skillcamp,codeforamerica/skillcamp,codeforamerica/skillcamp,codeforamerica/skillcamp
app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom subprocess import Popen, PIPE\nfrom plyer.facades import CPU\nfrom plyer.utils import whereis_exe\n\nfrom os import environ\n\n\nclass LinuxProcessors(CPU):\n def _cpus(self):\n old_lang = environ.get('LANG', '')\n env...
python
edit
1
4
mit
9c48cd08ee0805cfd9a8115d77da139e8c09d7a9
kivy/plyer,KeyWeeUsr/plyer,kivy/plyer,kivy/plyer,KeyWeeUsr/plyer,KeyWeeUsr/plyer
plyer/platforms/linux/cpu.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPEAR task\n\nA task to detect whether a specific PEAR package is installed or not\n\n\"\"\"\nimport os\nfrom fabric.api import *\nfrom fabric.colors import red, green\n\ndef pear_detect(package):\n \"\"\"\n Detect if a pear pa...
python
edit
6
3
mit
4c7336fbe1e82bd3d7d091429feda40932d73e67
hglattergotz/sfdeploy
bin/pear.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint, jsonify, current_app\n\nfrom app import db\nfrom app.errors import register_errors\n\nbase_blueprint = Blueprint('', __name__)\nregister_errors(base_blueprint)\n\n\n@base_blueprint.route('/')\ndef get_info():\n ...
python
edit
1
2
mit
cd611cee6843ff9056d98d26d08091188cd20172
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
app/rest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\nimport tweepy\nimport random\nimport os\n\nfrom secrets import *\n\nauth = tweepy.OAuthHandler(consumer_key, consumer_secret)\nauth.set_access_token(access_token, access_token_secret)\ntwitter = tweepy.API(auth)\n\npho...
python
edit
6
0
mit
60f101e4fc3ac6822c7cf254afa9e98004eb07a1
relsqui/awkward_polaroid,relsqui/awkward_polaroid
bot.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .legend import Legend\nfrom .constants import SINGLE_LEGEND\n\n\nclass LegendList:\n \"\"\"LegendList\n Args:\n legends (list, Legend): List of legends for a layer.\n\n \"\"\"\n\n def __init__(self, legends=N...
python
edit
1
7
bsd-3-clause
f779905c1b7a48a8f49da6ad061ae7d67e677052
CartoDB/cartoframes,CartoDB/cartoframes
cartoframes/viz/legend_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <<EMAIL>>\n\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom ..interface import TableLoaderInterface\n\n\nclass TableLoaderManager(TableLoaderInterface):\n\n def __ini...
python
edit
1
2
mit
f18ea85f3599e16c60cfc2b652c30ff64997e95b
thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader
pytablereader/loadermanager/_base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom delphin.interfaces import ace\nfrom delphin.mrs import simplemrs, dmrx\n\nfrom pydmrs.core import ListDmrs\nfrom pydmrs.utils import load_config, get_config_option\n\nDEFAULT_CONFIG_FILE = 'default_interface.conf'\n\nconfig = load_conf...
python
edit
1
2
mit
ddb12a892d42e8a6ffdd8146149ec306dea48a12
delph-in/pydmrs,delph-in/pydmrs,delph-in/pydmrs
pydmrs/pydelphin_interface.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nThis module gives the \"listener\" classes for the PyEcore notification layer.\nThe main class to create a new listener is \"EObserver\" which is triggered\neach time a modification is perfomed on an observed element.\n\"\"\"\n\n\nc...
python
edit
1
3
bsd-3-clause
4b3ec77a6e1639dc156135fd42ca215c58c082a3
aranega/pyecore,pyecore/pyecore
pyecore/notification.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework.viewsets import ModelViewSet\nfrom .serializers import LessonSerializer\nfrom kolibri.core.lessons.models import Lesson\n\nclass LessonViewset(ModelViewSet):\n serializer_class = LessonSerializer\n\n def get_querys...
python
edit
1
2
mit
1005a41bd6fb3f854f75bd9d4d6ab69290778ba9
learningequality/kolibri,mrpau/kolibri,mrpau/kolibri,lyw07/kolibri,christianmemije/kolibri,christianmemije/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,jonboiser/kolibri,benjaoming/kolibri,lyw07/kolibri,jonboiser/kolibri,learningequality/kolibri,christianmemije/kolibri,jonboiser/kolibri,DXCanas/kolibri,mrpau/kol...
kolibri/core/lessons/viewsets.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" analysis package - Provides modules to analyse results from cosmomodels runs.\n\nAuthor: Ian Huston\nFor license and copyright information see LICENSE.txt which was distributed with this file.\n\"\"\"\n\nfrom adiabatic import Pr, Pze...
python
edit
13
0
bsd-3-clause
7b83e8fbe8e6a249ab82db38e358774ba78b4ea8
ihuston/pyflation,ihuston/pyflation
pyflation/analysis/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python2.7\nimport rospy\nfrom bitbots_transform.transform_helper import transf\nfrom humanoid_league_msgs.msg import BallRelative, BallInImage\nfrom sensor_msgs.msg import CameraInfo\n\n\nclass TransformLines(object):\n de...
python
edit
1
2
mit
6212f78597dff977a7e7348544d09c7a649aa470
bit-bots/bitbots_misc,bit-bots/bitbots_misc,bit-bots/bitbots_misc
bitbots_transform/src/bitbots_transform/transform_ball.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#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.\n#The license can also be read onli...
python
edit
1
2
cc0-1.0
6894bd3cfc010c371478e7ae9e5e0b3ba108e165
Ghostkeeper/Luna
plugins/configuration/configurationtype/configuration_registrar.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfunctionTest = '''\n\tdef test_%s(self):\n\t\traise NotImplementedError() #TODO: test %s'''\n\nclassTest = '''class %sTest(unittest.TestCase):\n\t\"\"\"\n\t%s\n\t\"\"\"\n\n\t@staticmethod\n\tdef setUpClass(cls):\n\t\tpass #TODO\n\n\t@stat...
python
edit
1
0
mit
3504baa66ada0bde545ed2b111b71335f23d1838
AgalmicVentures/PyTestStub
PyTestStub/Templates.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tornado.web import authenticated\n\nfrom os.path import split\n\nfrom .base_handlers import BaseHandler\nfrom qiita_pet.exceptions import QiitaPetAuthorizationError\nfrom qiita_db.util import filepath_id_to_rel_path\nfrom qiita_db.meta...
python
edit
1
2
bsd-3-clause
bd5844aa6c59c8d34df12e358e5e06eefcb55f9d
ElDeveloper/qiita,josenavas/QiiTa,RNAer/qiita,squirrelo/qiita,RNAer/qiita,ElDeveloper/qiita,antgonza/qiita,adamrp/qiita,wasade/qiita,antgonza/qiita,squirrelo/qiita,biocore/qiita,adamrp/qiita,josenavas/QiiTa,biocore/qiita,ElDeveloper/qiita,adamrp/qiita,antgonza/qiita,RNAer/qiita,squirrelo/qiita,ElDeveloper/qiita,wasade/...
qiita_pet/handlers/download.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2012 Canonical Ltd.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the Lic...
python
edit
1
1
apache-2.0
b28b4bb834d8ab70e8820c43ed8cf11242c1b5b6
magic0704/python-keystoneclient,jamielennox/python-keystoneclient,klmitch/python-keystoneclient,ging/python-keystoneclient,alexpilotti/python-keystoneclient,klmitch/python-keystoneclient,darren-wang/ksc,alexpilotti/python-keystoneclient,magic0704/python-keystoneclient,Mercador/python-keystoneclient,ging/python-keystone...
keystoneclient/v2_0/endpoints.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python2.4\n#\n# Copyright 2011 Google Inc. All Rights Reserved.\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 ...
python
edit
1
0
apache-2.0
d20e1a1fba39b688a21bfbf02fe32a2039232949
FlorianHeigl/capirca,haykeh/capirca,FlorianHeigl/capirca,haykeh/capirca
lib/speedway.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport dj_database_url\nimport pytest\nfrom django.conf import settings\n\npytest_plugins = [\n \"saleor.tests.fixtures\",\n \"saleor.plugins.tests.fixtures\",\n \"saleor.graphql.tests.fixtures\",\n \"saleor.graphql...
python
edit
1
1
bsd-3-clause
598e21a7c397c0c429a78f008a36e5800c1b23e3
mociepka/saleor,mociepka/saleor,mociepka/saleor
conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport datetime\nimport os\nimport requests\n\n\ndef update():\n requests.packages.urllib3.disable_warnings()\n resp = requests.get('http://api.tfl.gov.uk/Line/Mode/tube/Status').json()\n\n return {el['id']: el['lineStatuses'][0]['...
python
edit
2
4
mit
23a3f80d44592d4a86878f29eaa873d727ad31ee
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
london_commute_alert.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom django.utils import six\n\n\n# I know, it's ugly, but I just can't write:\n# gettattr(settings, 'CONTROLCENTER_CHARTIST_COLORS', 'default')\n# This is way better: app_settings.CHARTIST_COLORS\n# TODO: move to separate pro...
python
edit
1
4
bsd-3-clause
e0bbdd0aac905aa0fc16837b63ce7545099e019f
byashimov/django-controlcenter,byashimov/django-controlcenter,byashimov/django-controlcenter
controlcenter/app_settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package\n# Author: James Antill (http://stackoverflow.com/users/10314/james-antill)\n__version__ = '0.1.3.0'\n__version_info__ = tuple([ int(num) for...
python
edit
1
1
bsd-3-clause
816ceb19e224f23bf3ba2fd06f7f3e2296ee5622
shoaibkamil/asp,shoaibkamil/asp,shoaibkamil/asp
asp/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nfrom .extensions import db\nfrom . import views\n\n\ndef create_app(config):\n \"\"\" Create a Flask App base on a config obejct. \"\"\"\n\n app = Flask(__name__)\n app.config.from_object(config)\n regis...
python
edit
3
1
mit
c265f3a24ba26800a15ddf54ad3aa7515695fb3f
oldani/nanodegree-blog,oldani/nanodegree-blog,oldani/nanodegree-blog
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport serial\nimport string\nimport io\nimport time\nimport sys\n\nif __name__ == '__main__':\n\n\n\tport = \"/dev/ttyUSB0\"\n\tbaudrate = \"57600\"\n\tsecond = 0.1\n\n\n\tif (len(sys.argv) < 3):\n\t\tprint(\"Usage: se...
python
edit
2
0
mit
127a3da0d453785bd9c711d738e20dfdc1876df1
ming6842/firmware-new,fboris/firmware,UrsusPilot/firmware,fboris/firmware,UrsusPilot/firmware,fboris/firmware,UrsusPilot/firmware,ming6842/firmware-new,ming6842/firmware-new
tool/serial_dump.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\ndbbrankingparser.httpclient\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nHTTP client utilities\n\n:Copyright: 2006-2021 Jochen Kupperschmidt\n:License: MIT, see LICENSE for details.\n\"\"\"\n\nfrom urllib.request import Request, urlopen\n\n\nUSE...
python
edit
1
1
mit
d00377ae301163debec253b9261ea41eeaa0e176
homeworkprod/dbb-ranking-parser
src/dbbrankingparser/httpclient.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSupport for multiple environments based on python configuration files.\n\"\"\"\n\nfrom __future__ import print_function, absolute_import\n\nimport imp\nimport os\n\nfrom twisted.python.filepath import FilePath\n\nfrom fabric.api imp...
python
edit
1
5
mit
c109b41dc76c333bda1973fa2a543688f2fd5141
alex/braid,alex/braid
braid/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom pydle.features import ircv3\n\npytestmark = [pytest.mark.unit, pytest.mark.ircv3]\n\n\n@pytest.mark.parametrize(\n \"payload, expected\",\n [\n (\n rb\"@+example=raw+:=,escaped\\:\\s\\\\ :ir...
python
edit
1
1
bsd-3-clause
97a1e627b682f9aec80134334277b63e81265ddd
Shizmob/pydle
tests/test_ircv3.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nfrom mopidy.frontends.base import BaseFrontend\nfrom mopidy.frontends.mpd.dispatcher import MpdDispatcher\nfrom mopidy.frontends.mpd.process import MpdProcess\nfrom mopidy.utils.process import unpickle_connection\n\nlogger...
python
edit
1
2
apache-2.0
5fb17ccf0311500e5ce14a49e246d1a6cbc427a4
diandiankan/mopidy,rawdlite/mopidy,adamcik/mopidy,ZenithDK/mopidy,SuperStarPL/mopidy,bencevans/mopidy,abarisain/mopidy,pacificIT/mopidy,bacontext/mopidy,jodal/mopidy,adamcik/mopidy,jcass77/mopidy,jmarsik/mopidy,quartz55/mopidy,quartz55/mopidy,kingosticks/mopidy,SuperStarPL/mopidy,ali/mopidy,bencevans/mopidy,adamcik/mop...
mopidy/frontends/mpd/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = \"3.0\"\nimport matplotlib\nmatplotlib.use('Agg')\n\nfrom .core import *\nfrom .distributions import *\nfrom .math import *\n\nfrom .trace import *\nfrom .sample import *\nfrom .step_methods import *\nfrom .tuning import *\n\n...
python
edit
15
0
apache-2.0
6f4b4a9e54e527292d04d0a0f50ce6e02e08750d
MCGallaspy/pymc3,superbobry/pymc3,JesseLivezey/pymc3,wanderer2/pymc3,JesseLivezey/pymc3,kmather73/pymc3,MichielCottaar/pymc3,kmather73/pymc3,kyleam/pymc3,dhiapet/PyMC3,tyarkoni/pymc3,LoLab-VU/pymc,tyarkoni/pymc3,clk8908/pymc3,superbobry/pymc3,jameshensman/pymc3,arunlodhi/pymc3,Anjum48/pymc3,MCGallaspy/pymc3,wanderer2/p...
pymc/__init__.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef configuration(parent_package='', top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration('cesium', parent_package, top_path)\n config.add_subpackage('science_features')\n config.add_d...
python
edit
1
1
bsd-3-clause
c24ecf7387f962415fcb03cd0dca9a136d1eda4e
acrellin/mltsp,acrellin/mltsp,mltsp/mltsp,bnaul/mltsp,bnaul/mltsp,bnaul/mltsp,mltsp/mltsp,bnaul/mltsp,acrellin/mltsp,bnaul/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,acrellin/mltsp,mltsp/mltsp,mltsp/mltsp,bnaul/mltsp,acrellin/mltsp
cesium/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\n\ndef pyramid_sort(txt):\n\ttxt = list(filter(lambda s: s.strip(), txt))\n\ttxt.sort(key = lambda s: len(s))\n\treturn txt\n\nclass PyramidSortCommand(sublime_plugin.TextCommand):\n\tdef run(self, edit):\n\t\...
python
edit
3
5
apache-2.0
076ef01bd3334d2a1941df369286e4972223901e
kenglxn/PyramidSortSublimeTextPlugin,kenglxn/PyramidSortSublimeTextPlugin
PyramidSort.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport json\nfrom .util import data_filename\nversion_filename = data_filename(os.path.join(\"weblab\", \"version.json\"))\nbase_version = \"5.0\"\n__version__ = base_version\nif version_filename:\n try:\n git_version =...
python
edit
1
0
bsd-2-clause
1ac2e2b03048cf89c8df36c838130212f4ac63d3
morelab/weblabdeusto,porduna/weblabdeusto,morelab/weblabdeusto,morelab/weblabdeusto,morelab/weblabdeusto,weblabdeusto/weblabdeusto,weblabdeusto/weblabdeusto,morelab/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,porduna/weblabdeusto,porduna/weblabdeusto,morelab/weblabdeusto,weblabdeusto/weblabdeusto,pordun...
server/src/weblab/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPackage database utilities for creating and modifying the database.\n\"\"\"\n\n\nfrom os.path import split, splitext\nfrom json import load\nf = open(\"packages.json\")\ndata = load(f)\ng = []\nfor p in data:\n pkg = {\n ...
python
edit
4
0
bsd-3-clause
50ab2ed3d8e50e5106dc486e4d20c889d6b18e82
qsnake/qsnake,qsnake/qsnake
spkg/base/package_database.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom data_collection.management.commands import BaseXpressDemocracyClubCsvImporter\n\nclass Command(BaseXpressDemocracyClubCsvImporter):\n council_id = 'E07000089'\n addresses_name = 'parl.2017-06-08/Version 1/Hart DC General Election...
python
edit
1
2
bsd-3-clause
69b0e1c60eafff596ebb494a7e79a22c6bea374b
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_hart.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport glob\nimport os\nimport shutil\n\n\nclass PCLReferenceAssembliesPackage(Package):\n def __init__(self):\n Package.__init__(self,\n name='PortableReferenceAssemblies',\n versio...
python
edit
5
2
mit
25429b016ccd979c95da329491e95e69a4a18308
mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild
packages/pcl-reference-assemblies.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\nimport mock\n\nfrom datadog_checks.checks import AgentCheck\nfrom datadog_checks.ping import PingCheck\nfrom datadog_checks.errors import CheckException\n\n\ndef mock_exec_ping():\n return \"\"\"FAKEPING 127.0.0.1 (127.0.0...
python
edit
1
1
bsd-3-clause
766ea05836544b808cd2c346873d9e4f60c858a1
DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras,DataDog/integrations-extras
ping/tests/test_ping.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numba import autojit, jit\n\n@autojit\ndef closure_modulo(a, b):\n @jit('int32()')\n def foo():\n return a % b\n return foo()\n\nprint closure_modulo(100, 48)\n\n```\n\nApply this change: Fix tests for python 3" }, ...
python
edit
1
1
bsd-2-clause
164fe2780554ddca5f66273e11efea37cfaf1368
GaZ3ll3/numba,pombredanne/numba,ssarangi/numba,stefanseefeld/numba,GaZ3ll3/numba,shiquanwang/numba,jriehl/numba,gdementen/numba,sklam/numba,jriehl/numba,ssarangi/numba,stonebig/numba,sklam/numba,GaZ3ll3/numba,seibert/numba,numba/numba,gmarkall/numba,sklam/numba,GaZ3ll3/numba,gmarkall/numba,stonebig/numba,seibert/numba,...
numba/tests/issues/test_issue_204.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import connection\nfrom calaccess_campaign_browser import models\nfrom calaccess_campaign_browser.management.commands import CalAccessCommand\n\n\nclass Command(CalAccessCommand):\n help = \"Drops all CAL-ACCESS campaign b...
python
edit
1
2
mit
422bf9860aacc3babbdd09ab1bd0941455b6ac7b
california-civic-data-coalition/django-calaccess-campaign-browser,myersjustinc/django-calaccess-campaign-browser,dwillis/django-calaccess-campaign-browser,dwillis/django-calaccess-campaign-browser,california-civic-data-coalition/django-calaccess-campaign-browser,myersjustinc/django-calaccess-campaign-browser
calaccess_campaign_browser/management/commands/dropcalaccesscampaignbrowser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .pytesseract import ( # noqa: F401\n Output,\n TesseractError,\n TesseractNotFoundError,\n TSVNotSupported,\n get_tesseract_version,\n image_to_alto_xml,\n image_to_boxes,\n image_to_data,\n image_to_osd,\n ...
python
edit
1
0
apache-2.0
1fb54fcb5236b8c5f33f3eb855c1085c00eeeb2c
madmaze/pytesseract
src/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import serializers\n\n\ndef validate_options(options, attributes):\n fields = {}\n\n for name, option in options.items():\n params = {}\n field_type = option.get('type', '')\n field_class = ser...
python
edit
1
7
mit
b5bf391ca0303f877b39bed4c3266441a9b78b2b
opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
src/waldur_mastermind/common/serializers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom model_utils.models import TimeStampedModel\n\nfrom warp.users.models import User\n\n\nclass Presentation(TimeStampedModel):\n subject = models.CharField(max_length=50)\n author = models.ForeignKey(Us...
python
edit
1
0
mit
4121dc4b67d198b7aeea16a4c46d7fc85e359190
SaturDJang/warp,SaturDJang/warp,SaturDJang/warp,SaturDJang/warp
presentation/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\nfrom __future__ import print_function\nimport os\nimport sys\nimport json\n\ndef pretty_print(equation):\n print(equation[\"description\"][\"terse\"])\n eqn_dict = equation[\"unicode-pretty-print\"]\n equati...
python
edit
1
5
mit
0b5f3dc674001c9abd1a7d7df18badfafdb825eb
nbeaver/equajson
equajson.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test the lldb public C++ api when creating multiple targets simultaneously.\"\"\"\n\nfrom __future__ import print_function\n\n\nimport os\nimport re\nimport subprocess\n\nimport lldb\nfrom lldbsuite.test.decorators import *\nfrom lldb...
python
edit
14
2
apache-2.0
8a6ba483e88b4f5ace6e9a6773f0ad681edf92b2
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb
packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py
rejected_lint
Too many lint violations: 14
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.files.storage import FileSystemStorage\nfrom django.dispa...
python
edit
1
3
bsd-3-clause
f89dce3ff6d0858c5a29b96610fe4113d6200184
aaugustin/myks-gallery,aaugustin/myks-gallery
gallery/storages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\nfrom pika import BlockingConnection, ConnectionParameters\nfrom psycopg2 import connect\n\nRABBIT_MQ_HOST = '54.76.183.35'\nRABBIT_MQ_PORT = 5672\n\nPOSTGRES_HOST = 'microservices.cc9uedlzx2lk.eu-west-1.rds.amazona...
python
edit
2
1
mit
743198c5e94471cfa68bdb8335e1d75ce4580722
douglassquirrel/combo,douglassquirrel/microservices-hackathon-july-2014,douglassquirrel/microservices-hackathon-july-2014,douglassquirrel/combo,douglassquirrel/microservices-hackathon-july-2014,douglassquirrel/microservices-hackathon-july-2014,douglassquirrel/combo
components/archivist/archivist.py
accepted
null
true