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# © 2015-TODAY LasLabs Inc.\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n\nfrom carepoint import Carepoint\nfrom sqlalchemy import (Column,\n Integer,\n ...
python
edit
1
0
mit
60efbb9b6b70036b72f3c756139524c4ca7698d2
laslabs/Python-Carepoint
carepoint/models/cph/fdb_gcn_seq.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('django_q', '0002_auto_20150630_1624'),\n ]\n\n ...
python
edit
1
0
mit
c037f405de773a3c9e9a7affedf2ee154a3c1766
Koed00/django-q
django_q/migrations/0003_auto_20150708_1326.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Aug 7 12:04:18 2015\n\n@author: wirkert\n\"\"\"\n\nimport numpy as np\nfrom msi.io.reader import Reader\nfrom msi.msi import Msi\n\n\nclass SpectrometerReader(Reader):\n\n def __init__(sel...
python
edit
1
7
bsd-3-clause
0f7816676eceb42f13786408f1d1a09527919a1e
MITK/MITK,iwegner/MITK,RabadanLab/MITKats,RabadanLab/MITKats,iwegner/MITK,fmilano/mitk,fmilano/mitk,RabadanLab/MITKats,RabadanLab/MITKats,fmilano/mitk,fmilano/mitk,MITK/MITK,RabadanLab/MITKats,RabadanLab/MITKats,fmilano/mitk,fmilano/mitk,iwegner/MITK,fmilano/mitk,MITK/MITK,iwegner/MITK,iwegner/MITK,MITK/MITK,MITK/MITK,...
Modules/Biophotonics/python/iMC/msi/io/spectrometerreader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef bsd_rand(seed):\n return (1103515245 * seed + 12345) & 0x7fffffff\n\n\ndef baseconv(v1, a1, a2):\n n1 = {c: i for i, c in dict(enumerate(a1)).items()}\n b1 = len(a1)\n b2 = len(a2)\n\n d1 = 0\n for i, c in enumerate(v1...
python
edit
1
4
mit
7e00b8a4436ee4bdad4d248a29985b1cef741a53
ethanal/Nimbus,ethanal/Nimbus,ethanal/Nimbus,ethanal/Nimbus
nimbus/apps/media/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nTraceView API library\n\n:copyright: (c) 2014 by Daniel Riti.\n:license: MIT, see LICENSE for more details.\n\n\"\"\"\n\n__title__ = 'traceview'\n__version__ = '0.1.0'\n__author__ = 'Daniel Riti'\n__licens...
python
edit
3
1
mit
db2d0b2f7277f21ce2f500dc0cc4837258fdd200
danriti/python-traceview
traceview/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import http\n\nfrom wagtail.wagtailredirects import models\n\n\n# Originally pinched from: https://github.com/django/django/blob/master/django/contrib/redirects/middleware.py\nclass RedirectMiddleware(object):\n def process_r...
python
edit
1
4
bsd-3-clause
9a81d58bfb1088c8c6286c65150cd13c54c0b4c5
rjsproxy/wagtail,jnns/wagtail,chrxr/wagtail,Klaudit/wagtail,iansprice/wagtail,kaedroho/wagtail,wagtail/wagtail,mixxorz/wagtail,kurtrwall/wagtail,kurtrwall/wagtail,FlipperPA/wagtail,chrxr/wagtail,mayapurmedia/wagtail,JoshBarr/wagtail,Klaudit/wagtail,torchbox/wagtail,nrsimha/wagtail,nimasmi/wagtail,iansprice/wagtail,hams...
wagtail/wagtailredirects/middleware.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
python
edit
3
1
apache-2.0
15f1abef288411539b512f6bdb572c4a54aa5447
lyft/incubator-airflow,artwr/airflow,mrkm4ntr/incubator-airflow,stverhae/incubator-airflow,hamedhsn/incubator-airflow,OpringaoDoTurno/airflow,dgies/incubator-airflow,preete-dixit-ck/incubator-airflow,AllisonWang/incubator-airflow,gilt/incubator-airflow,mtagle/airflow,malmiron/incubator-airflow,sekikn/incubator-airflow,...
airflow/migrations/versions/127d2bf2dfa7_add_dag_id_state_index_on_dag_run_table.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Allow django-money to be specified as read-only in a model\n\nMonkey patch the Django admin so that we can display django-money fields\nread-only. In order to do this, we simply catch the exception that\nresults from trying to convert a mone...
python
new_file
2
11
bsd-3-clause
770328ea42182edc216d5abe4430e3ffd51a7793
rescale/django-money,iXioN/django-money,tsouvarev/django-money,tsouvarev/django-money,recklessromeo/django-money,iXioN/django-money,AlexRiina/django-money,recklessromeo/django-money
djmoney/__init__.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport unittest\n\nfrom ansiblelint import Runner, RulesCollection\n\n\nclass TestTaskIncludes(unittest.TestCase):\n def setUp(self):\n rulesdir = os.path.join('lib', 'ansiblelint', 'rules')\n self.rules = RulesC...
python
edit
1
1
mit
a7908d39e24384881c30042e1b4c7e93e85eb38e
MatrixCrawler/ansible-lint,dataxu/ansible-lint,willthames/ansible-lint
test/TestTaskIncludes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkg_resources\nimport unittest\n\n\nclass CodeStyleTestCase(unittest.TestCase):\n def test_code_style(self):\n flake8 = pkg_resources.load_entry_point('flake8', 'console_scripts', 'flake8')\n try:\n flake8...
python
edit
1
3
mit
cd2e4cce080413feb7685ec9a788327b8bca9053
ministryofjustice/bai2
tests/test_style.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom morepath.app import App, global_app\nimport morepath\n\n\ndef setup_module(module):\n morepath.disable_implicit()\n\n\ndef test_global_app():\n assert global_app.extends == []\n assert global_app.name == 'global_app'\n\n\ndef ...
python
edit
1
1
bsd-3-clause
a727161f67edff10bb94785e70add7c42ba99dcc
morepath/morepath,faassen/morepath,taschini/morepath
morepath/tests/test_app.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\nimport base64\nimport json\nfrom config import config as configs\nfrom flask.ext.elasticsearch import FlaskElasticsearch\nfrom dmutils import init_app, flask_featureflags\n\nfeature_flags = flask_featureflags.Featur...
python
edit
1
2
mit
88de184c1d9daa79e47873b0bd8912ea67b32ec1
alphagov/digitalmarketplace-search-api,alphagov/digitalmarketplace-search-api
app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef setup(app):\n \"\"\"Additions and customizations to Sphinx that are useful for documenting\n the Salt project.\n\n \"\"\"\n app.add_crossref_type(directivename=\"conf_master\", rolename=\"conf_master\",\n indextem...
python
edit
1
1
apache-2.0
0cdfabf24c01920617535205dfcdba7a187b4d32
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
doc/_ext/saltdocs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nServer used for tests\n\"\"\"\nimport sys\nimport os\n# ensure sys knows about pyqode.core in the test env\nsys.path.insert(0, os.getcwd())\nfrom pyqode.core import backend\n\n\nif __n...
python
edit
1
0
mit
da5ca6baf75b2230e3e8a62066bebaa96a16bf3d
pyQode/pyqode.core,zwadar/pyqode.core,pyQode/pyqode.core
test/server.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Dependency(models.Model):\n\n source = models.CharField(max_length=255, db_index=True)\n depends_on = models.CharField(max_length=255, db_index=True)\n\n class Meta:\n unique_together ...
python
edit
1
1
mit
39d3f605d240a8abef22107424ec1d6f76161580
jaheba/django-static-precompiler,jaheba/django-static-precompiler,paera/django-static-precompiler,liumengjun/django-static-precompiler,jaheba/django-static-precompiler,liumengjun/django-static-precompiler,paera/django-static-precompiler,liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,liumengju...
static_precompiler/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport base64\nfrom requests import Session, Request\nfrom OpenSSL import crypto\n\n\n\n#url = 'http://ct.googleapis.com/aviator/ct/v1/get-roots'\nurl = 'https://ct.api.venafi.com/ct/v1/get-roots'\n\n\ns = Session()\nr = Request(...
python
edit
3
0
apache-2.0
d3cea746432b1bfd1b5f2d38972c1b761b96e8eb
wgoulet/CTPyClient
fetchroots.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport argparse\nimport sys\nfrom os import path\n\nfrom builder import DeconstJSONBuilder\nfrom sphinx.application import Sphinx\nfrom sphinx.builders import BUILTIN_BUILDERS\n\n\ndef build(argv):\n \"\"\"\n ...
python
edit
1
5
apache-2.0
c322e4f2202f3b004a4f41bd4c2786f88292cf37
ktbartholomew/preparer-sphinx,ktbartholomew/preparer-sphinx,deconst/preparer-sphinx,deconst/preparer-sphinx
deconstrst/deconstrst.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom nlppln import WorkflowGenerator\n\n\nclass TestWFGenerator(object):\n @pytest.fixture\n def wf(self):\n return WorkflowGenerator()\n\n def test_steps_in_library(self, wf):\n assert len(wf.steps_l...
python
edit
1
1
apache-2.0
4e704ab26f4ed326dd4ca1c04e1355b619109d09
WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln
tests/test_wfgenerator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\nfrom django.contrib.auth.decorators import login_required\n\nfrom django_auto_filter.views_django_auto_filter_new import DjangoAutoFilterNew\nfrom djangoautoconf.model_utils.model_attr_utils impor...
python
edit
1
3
bsd-3-clause
fd5ebe9ae938cdf0d586bf3177730619b8b2025a
weijia/django-auto-filter,weijia/django-auto-filter,weijia/django-auto-filter
django_auto_filter/filter_for_models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport requests\n\n\nclass Healthcheck:\n\n def __init__(self):\n pass\n\n def _result(self, site, health, response=None, message=None):\n result = {\n \"name\": site[\"name\"],\n ...
python
edit
1
5
mit
9d4dca76abb3f6fb0f107c93874942496f4f8e7b
Vilsepi/nysseituu,Vilsepi/nysseituu
src/healthcheck/__init__.py
accepted
null
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\nfrom buildbot.changes import svnpoller\n\nfrom master import build_ut...
python
edit
1
1
bsd-3-clause
a74fe1e0d72821afd643142ae283634bd4e3cc71
eunchong/build,eunchong/build,eunchong/build,eunchong/build
masters/master.client.syzygy/master_source_cfg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport base32_crockford\nimport logging\n\nfrom django.db.models import F\nfrom django.http import Http404\nfrom django.http import HttpResponsePermanentRedirect\nfrom django.shortcuts import get_o...
python
edit
1
3
bsd-3-clause
8521837cc3f57e11278fc41bfd0e5d106fc140fe
jbittel/django-deflect
deflect/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nimport json\nimport unittest\n\nfrom pypercube.cube import Cube\nfrom pypercube.cube import Query\nfrom pypercube.metric import Metric\nfrom pypercube.expression import EventExpression\nfrom pypercube.expressi...
python
edit
1
1
bsd-3-clause
089d7a26f527e7a38ed00348f8b9c644d0b5134b
sbuss/pypercube
tests/test_metric_expression.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nif os.getenv('OPENSHIFT_REPO_DIR'):\n from .staging import *\nelif os.getenv('TRAVIS_CI'):\n from .testing import *\nelse:\n from .development import *\n```\n\nApply this change: [fix] Use production settings in Heroku...
python
edit
5
0
mit
b80726a5a36480b4146fc4df89ad96a738aa2091
waitress-andela/waitress,andela-osule/waitress,andela-osule/waitress,andela-osule/waitress,waitress-andela/waitress,waitress-andela/waitress
waitress/settings/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom src.dojo import Dojo\n\n\nclass TestCreateRoom (unittest.TestCase):\n\n def setUp(self):\n self.dojo = Dojo()\n self.test_office = self.dojo.create_room(\"office\", \"test\")\n self.test_living_...
python
edit
1
1
mit
29d41cf99f66aa075bda5fed6feb78cbb9ccdd74
EdwinKato/Space-Allocator,EdwinKato/Space-Allocator
tests/dojo_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport re\nimport urllib\n\ndef handle_url(bot, user, channel, url, msg):\n \"\"\"Handle IMDB urls\"\"\"\n \n m = re.match(\"(http:\\/\\/open.spotify.com\\/|spotify:)(album|artist|track)([:\\/])([a-zA-Z0-9]+)\\/?\", url)\n if ...
python
edit
1
2
bsd-3-clause
a2fd2436cb1c0285dfdd18fad43e505d7c246535
rnyberg/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,nigeljonez/newpyfibot,EArmour/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,rnyberg/pyfibot,aapa/pyfibot,aapa/pyfibot
modules/module_spotify.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport random\n\ndef eightball():\n\treturn random.choice((\"It is certain\", \"It is decidedly so\", \"Without a doubt\", \"Yes, definitely\", \n\t\t\t\t\t\t\t\"You may rely on it\", \"As I see it, yes\", \"Most likely\", \"Outlook good\...
python
edit
1
1
mit
0be201e5f00d0a0327c2878d9d944952157ccaef
Harmon758/Harmonbot,Harmon758/Harmonbot
units/games.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\n sqlalchemy_seed.seed_mixin\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Mixin class for unittest.\n\n\n :copyright: (c) 2017 Shinya Ohyanagi, All rights reserved.\n :license: BSD, see LICENSE for more de...
python
edit
1
4
bsd-3-clause
e74dcb6d19b737a0ec069a9bdda689731a0f295b
heavenshell/py-sqlalchemy_seed
sqlalchemy_seed/mixin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport gmusicapi\nfrom mopidy import commands\nfrom oauth2client.client import OAuth2WebServerFlow\n\n\nclass GMusicCommand(commands.Command):\n def __init__(self):\n super().__init__()\n self.add_child(\"login\", LoginComm...
python
edit
1
1
apache-2.0
99fba41b7392b1e5e4216145f1e8913698b60914
hechtus/mopidy-gmusic,mopidy/mopidy-gmusic
mopidy_gmusic/commands.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom attachment import Button\nimport json \n\nclass Template(object):\n \"\"\"\n Facebook Messenger message\n model for structured messages\n \"\"\"\n\n button_type = 'button'\n generic_type = 'generic'\n receipt_type ...
python
edit
3
7
mit
65f7c62ec30ca7e3d811e146b00cc75bec783129
ben-cunningham/python-messenger-bot,ben-cunningham/pybot
fbmsgbot/models/template.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] 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 ob...
python
edit
1
1
apache-2.0
a65eaeaef60492bfc6319fb9c810155d62c1a3b3
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
luigi/tasks/export/ftp/go_annotations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom control_milight.utils import process_automatic_trigger\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\nimport serial\nimport time\n\nclass Command(BaseCommand):\n args = ''\n ...
python
edit
4
6
bsd-3-clause
a28826a0b57742d3cb2ac57c0a17b37f2afff302
ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display
homedisplay/control_milight/management/commands/listen_433.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\nfrom BeautifulSoup import BeautifulSoup\n\nfrom datafeeds.parser_base import ParserBase\n\n\nclass UsfirstEventTeamsParser(ParserBase):\n @classmethod\n def parse(self, html):\n \"\"\"\n Find what Teams are ...
python
edit
1
2
mit
f6bff4e5360ba2c0379c129a111d333ee718c1d3
the-blue-alliance/the-blue-alliance,jaredhasenklein/the-blue-alliance,nwalters512/the-blue-alliance,nwalters512/the-blue-alliance,bdaroz/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-allian...
datafeeds/usfirst_event_teams_parser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2012 United States Government as represented by the\n# Administrator of the National Aeronautics and Space Administration.\n# All Rights Reserved.\n#\n# Copyright 2012 Nebula, Inc.\n#\n# Licensed under the Apache License, Ver...
python
edit
1
0
apache-2.0
69c81b16e07b67ba0a0bc8e1f55049e7987c5b8c
BiznetGIO/horizon,BiznetGIO/horizon,noironetworks/horizon,ChameleonCloud/horizon,yeming233/horizon,NeCTAR-RC/horizon,yeming233/horizon,BiznetGIO/horizon,yeming233/horizon,openstack/horizon,noironetworks/horizon,NeCTAR-RC/horizon,yeming233/horizon,ChameleonCloud/horizon,NeCTAR-RC/horizon,noironetworks/horizon,openstack/...
openstack_dashboard/dashboards/admin/instances/panel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\n# Model Field Reference\n# https://docs.djangoproject.com/en/1.8/ref/models/fields/\n\n\nclass Post(models.Model):\n title = models.CharField(max_length=63)\n slug = models.SlugField()\n text = mod...
python
edit
1
0
bsd-2-clause
737fa51dc31b315e554553fc5e3b971de663d0e5
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
blog/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib\nfrom django import template\nfrom django.conf import settings\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef convert_url(request, sourceurl, format='pdf'):\n fullurl = request.build_absolute_uri(sourceurl)...
python
edit
1
3
bsd-3-clause
d8179c0006fb5b9983898e4cd93ffacfe3fdd54f
makinacorpus/Geotrek,Anaethelion/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,mabhub/Geotrek,GeotrekCE/Geotrek-admin,Anaethelion/Geotrek,johan--/Geotrek,camillemonchicourt/Geotrek,johan--/Geotrek,mabhub/Geotrek,Anaethelion/Geotrek,camillemonchicourt/Geotrek,GeotrekCE/Geotrek-admin,camillemo...
caminae/mapentity/templatetags/convert_tags.py
rejected_duplicate
Near-duplicate of sample 1036
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport requests\nimport calendar\nfrom datetime import datetime, timedelta\nfrom settings import _token, _domain, _user, _time, _pretty\n\n\nif __name__ == '__main__':\n while 1:\n files_list_url = 'https:...
python
edit
3
4
mit
720bd5b2f3c422af6bd1c70850fb2f67a773def0
marshallhumble/slack_app,marshallhumble/slack_app
slack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom timetabler.schedule import Schedule\nfrom timetabler.ssc.course import Lecture, Discussion\n\n\ndef main():\n s = Schedule([\"EECE 353\", \"CPSC 304\", \"EECE 381\", \"GEOG 122\"],\n ...
python
edit
1
2
mit
18c99ee2b96564913cbd406bb540af10b078b2f3
hfaran/ubc-timetabler
example.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.gis.db import models\n\nfrom councils.models import Council\n\n\nclass PollingStation(models.Model):\n council = models.ForeignKey(Council, null=True)\n internal_council_id = models.CharField(blank=True, max_length...
python
edit
1
2
bsd-3-clause
d649e0ff501604d9b8b24bd69a7545528332c05c
andylolz/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/pollingstations/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom task.views import TaskList, TaskView\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n ...
python
edit
1
0
mit
86a325777742e1fa79bc632fca9460f3b1b8eb16
rosadurante/to_do,rosadurante/to_do
to_do/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"cvrminer app.\"\"\"\n\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom flask import Flask\nfrom flask_bootstrap import Bootstrap\n\n\ndef create_app(smiley=False):\n \"\"\"Create app.\n\n Factory for a...
python
edit
1
2
apache-2.0
49975504a590a1ae53e2e8cc81aadea277cc5600
fnielsen/cvrminer,fnielsen/cvrminer,fnielsen/cvrminer
cvrminer/app/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCopyright (c) 2010-2013, Anthony Garcia <<EMAIL>>\nDistributed under the ISC License (see LICENSE)\n\"\"\"\n\nfrom distutils.core import setup, Command\nfrom distutils.errors import DistutilsOptionError\nfrom unittest import TestLoa...
python
edit
1
2
isc
af1d3b67bb6428a298e5028b7c86624d2f7f00c8
miedzinski/steamodd,Lagg/steamodd
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom bush import option\nfrom bush.spinner import Spinner\nfrom bush.aws.ec2 import EC2\nfrom bush.aws.iam import IAM\n\n\ndef run():\n (options, args) = option.parse_args(\"bush\")\n\n output = ''\n spinner = Spinner()\n spinne...
python
edit
1
7
mit
d9e7816da08a3d66e63356ea6f4474cc5f7d6b26
okamos/bush
bush/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom twisted.plugin import IPlugin\nfrom txircd.module_interface import IModuleData, ModuleData\nfrom txircd.utils import ircLower\nfrom zope.interface import implements\nfrom fnmatch import fnmatchcase\n\nclass AccountExtban(ModuleData):\n...
python
edit
1
3
bsd-3-clause
ea324a30823fbf18c72dd639b9c43d3ecb57b034
Heufneutje/txircd
txircd/modules/extra/services/account_extban.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nTests for python-bna\n\n>>> import bna\n>>> serial = \"US120910711868\"\n>>> secret = b\"88aaface48291e09dc1ece9c2aa44d839983a7ff\"\n>>> bna.get_token(secret, time=1347279358)\n(93461643, 2)\n>>> bna.get_token...
python
edit
1
0
mit
bddd7cb9131dd61a8167fe9db5bbc3b02f8e3add
jleclanche/python-bna,Adys/python-bna
tests/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nwith open('git_externals/__init__.py') as fp:\n exec(fp.read())\n\n\nclassifiers = [...
python
edit
4
0
mit
eb15038cd582e087225985947e4b98ffbc86d812
develersrl/git-externals,develersrl/git-externals,develersrl/git-externals
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/local/bin/python3 -u\n__author__ = 'Oliver Ratzesberger <https://github.com/fxstein>'\n__copyright__ = 'Copyright (C) 2015 Oliver Ratzesberger'\n__license__ = 'Apache License, Version 2.0'\n\n# Make sure we have access to Sentie...
python
edit
1
0
apache-2.0
d81ab5b0cc5deecaef53359f422c94c50a4838f5
fxstein/SentientHome
feed/feed.home.tracer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom axes.models import AccessAttempt\nfrom django.conf import settings\nfrom django.db.models.signals import post_save\nfrom django.dispatch import receiver\nfrom importlib import import_module\n\n\nDEFAULT_ACTIO...
python
edit
4
2
bsd-3-clause
f1e2859f5535d7eddb13c10e71f9c0074c94c719
eht16/django-axes-login-actions
axes_login_actions/signals.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n :copyright: (c) 2012-2013 by PN.\n :license: MIT, see LICENSE for more details.\n\"\"\"\n\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom...
python
edit
1
4
mit
641ac2d30b0eb2239444b022688195ff26bd70b4
pnpnpn/timeout-decorator,yetone/timeout-decorator
timeout_decorator/timeout_decorator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"cdispyutils\",\n version=\"0.1.0\",\n description=\"General utilities\",\n license=\"Apache\",\n install_requires=[\n \"six==1.10.0\",\n \"request...
python
edit
1
0
apache-2.0
f6ba4c52be9fd4be9eb7d04c15ee441d86304f0c
uc-cdis/cdis-python-utils
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom fabric.api import run, env\nfrom fabric.context_managers import cd\nimport os\n\nenv.hosts = ['root@0.0.0.0:1337']\n\n\ndef update_podcasts():\n with cd('\"{}\"'.format(os.path.dirname(__file__))):\n run('python3 manage.py up...
python
edit
1
1
mit
1e775fbc8e11f44b8a680e17ac35e735e52d5739
matachi/sputnik,matachi/sputnik,matachi/sputnik,matachi/sputnik
fabfile.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\n\"\"\"\nTemplate tags related to the contact form.\n\"\"\"\n\nfrom django import template\n\ntry:\n import honeypot\nexcept ImportError: # pragma: no cover\n honey...
python
edit
1
2
mit
82f5a5cccb8a7a36adc6f880d3cc1e11b8e596ee
r4ts0n/django-envelope,r4ts0n/django-envelope,affan2/django-envelope,affan2/django-envelope,zsiciarz/django-envelope,zsiciarz/django-envelope
envelope/templatetags/envelope_tags.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery.task import task\n\nfrom corehq.apps.export.export import get_export_file, rebuild_export\nfrom couchexport.models import Format\nfrom couchexport.tasks import escape_quotes\nfrom soil.util import expose_cached_download\n\n\n@ta...
python
edit
1
2
bsd-3-clause
d0367aacfea7c238c476772a2c83f7826b1e9de5
dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/apps/export/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"cobertura-clover-transform\",\n version='1.1.4',\n packages=find_packages(),\n include_package_data=True,\n description=\"Tools for transforming Cobertura test \"...
python
edit
1
0
mit
e4de6c2f10605fda5537d838d232e4d10e680a28
cwacek/cobertura-clover-transform
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Implement daemon example, now to make it actually do something." }, { "role": "assistant", "content": "\"\"\"\nThe main measurement program, responsible for polling the sensor periodically \nand inserting the results into a datab...
python
new_file
7
2
mit
c2a2628d2a7cfe5c5fb73b0ae4beeeaf6f7bc6c5
mgunyho/kiltiskahvi
kahvid.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##############################################################################\n# Copyright Kitware Inc.\n#\n# Licensed under the Apache License, Version 2.0 ( the \"License\" );\n# you may not use this file ex...
python
edit
1
1
apache-2.0
945e2def0a106541583907101060a234e6846d27
girder/large_image,DigitalSlideArchive/large_image,girder/large_image,girder/large_image,DigitalSlideArchive/large_image,DigitalSlideArchive/large_image
sources/bioformats/large_image_source_bioformats/girder_source.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport boto\nfrom bucketeer import commit\n\nclass BuckeeterTest(unittest.TestCase):\n\n def setUp(self):\n # Create a bucket with one file\n connection = boto.connect_s3()\n bucket = connection.create_bucket('buc...
python
edit
4
1
mit
ed8423041abc80b778bf9ffed61e3dad246d72ff
mgarbacz/bucketeer
bucketeer/test/test_commit.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport cplcom\n\n\nsetup(\n name='CPLCom',\n version=cplcom.__version__,\n packages=find_packages(),\n package_data={'cplcom': ['../media/*']},\n install_requires=['moa', 'kivy'],\...
python
edit
1
0
mit
1ec5fb8f7c85464da24f0a1db553bcd0cce7fe39
matham/cplcom
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom functools import wraps\n\n\ndef bot_only(func):\n @wraps(func)\n def inner(self, *args, **kwargs):\n if not self.user.bot:\n return\n return func(self, *args, **kwargs)\n return inner\n\n```\n\nApply t...
python
edit
1
2
mit
57f5d8c1f02aa5d3a1be5fdc7302a15d416071dc
BeatButton/beattie-bot,BeatButton/beattie
utils/decorators.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Blueprint\n\nbudget = Blueprint('budget', __name__, template_folder = 'templates')\n\n@budget.route('/')\ndef default:\n return \"Hello World!\"\n\n```\n\nApply this change: Fix missing parenthesis for default route in ...
python
edit
1
1
mit
71339b8f92c9057fe029c5db81db7acce7596607
Zillolo/mana-vault,Zillolo/mana-vault,Zillolo/mana-vault
app/mod_budget/controller.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase, Client\nfrom django.contrib.auth.models import User\nfrom billjobs.models import Bill, Service\nfrom billjobs.settings import BILLJOBS_BILL_ISSUER\n\nclass BillingTestCase(TestCase):\n ''' Test billing c...
python
edit
4
1
mit
b1a3a17460ae1f68c6c9bf60ecbd6a3b80a95abe
ioO/billjobs
billjobs/tests/tests_model.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport sys\nimport os.path\nfrom setuptools import Command, find_packages, setup\n\nHERE = os.path.abspath(os.path.dirname(__file__))\n\nREADME_PATH = os.path.join(HERE, 'README.rst')\ntry:\n README = open(README...
python
edit
5
0
mit
57fdb0bc4c3751ef89ec6fddd1ccb85a5f4ad56b
lrascao/rollbar-udp-agent,lrascao/rollbar-udp-agent
setup.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# encoding: utf-8\n\"\"\"\n__init__.py\n\nCreated by Gabriel Brammer on 2011-05-18.\n\n$URL$\n$Author$\n$Date$\n\n\"\"\"\n__version__ = \"$Rev$\"\n\nfrom socket import gethostname as hostname\n\nif hostname().startswi...
python
edit
2
0
mit
e230f3af592ffce613fa7c2bcf05e2993df9e1a6
gbrammer/pygrism,gbrammer/unicorn,gbrammer/unicorn,gbrammer/pygrism
__init__.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Clean up to ill imports.\n\nStyle issue, but it's better to put these vertically. It makes it harder to forget a comma." }, { "role": "assistant", "content": "__all__ = [\n 'ill',\n 'illappct_1st_dist',\n #'md',\n]\n" } ]
python
new_file
3
0
bsd-2-clause
7fea0e2fb875a655898915f9f0f8375684d9e6bd
freelawproject/juriscraper,freelawproject/juriscraper
juriscraper/oral_args/united_states/state/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='myria-python',\n version='1.2.4',\n author='Daniel Halperin',\n author_email='<EMAIL>',\n packages=find_packages(),\n scripts=[],\n url='https://github.com/u...
python
edit
1
0
bsd-3-clause
4626d74436dc547dca0faea67a95ac2121f348e4
uwescience/myria-python,uwescience/myria-python
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport pytest\nimport tensorflow as tf\n\nfrom tensorflow_similarity.retrieval_metrics import PrecisionAtK\n\ntestdata = [\n (\n \"micro\",\n tf.constant(0.583333333),\n ),\n (\n \"macro\",\...
python
edit
1
1
apache-2.0
a476c42216af99488c2e02bacd29f7e3a869a3e7
tensorflow/similarity
tests/retrieval_metrics/test_precision_at_k.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport importlib\n\nsys.modules[__package__] = importlib.import_module('.dataset', __package__)\n\n```\n\nApply this change: Replace importlib hack with __path__" }, { "role": "assistant", "content": "import os\n\n__...
python
edit
3
0
apache-2.0
a5585f7e437a402b10e4fa9094172a10a8955eac
analysiscenter/dataset
__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='LinkFinder',\n packages=find_packages(),\n version='1.0',\n description=\"A python script that finds endpoints in JavaScript files.\",\n lon...
python
edit
1
0
mit
3a308c37856bafd8ecbc64a2e425c8199dcf2e68
GerbenJavado/LinkFinder,GerbenJavado/LinkFinder
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport argparse\n\nfrom s3imageresize import resize_image_folder\n\nparser = argparse.ArgumentParser(description='Upload a file to Amazon S3 and rotate old backups.')\nparser.add_argument('bucket', help=\"Name of th...
python
edit
1
0
mit
8286aee8eca008e2e469d49e7a426828e4f6c2bf
dirkcuys/s3imageresize
bin/s3imageresize.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"yolk.\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.8.5a0'\n\n```\n\nApply this change: Increment patch version to 0.8.5" }, { "role": "assistant", "content": "\"\"\"yolk.\n\...
python
edit
1
0
bsd-3-clause
8e2e08621ca6adea23bc4da2f7b674216bf643f5
myint/yolk,myint/yolk
yolk/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2014 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\nfrom telemetry.page import test_expectations\n\n# Valid expectation condi...
python
edit
1
1
bsd-3-clause
1170aa08809b1c5b63e93f03864b4c76766064bc
hgl888/chromium-crosswalk-efl,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-cross...
content/test/gpu/gpu_tests/pixel_expectations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom subprocess import CalledProcessError\n\nfrom test_base import TestBase\nfrom tests.st.utils.docker_host import DockerHost\n\n\nclass TestContainerToHost(TestBase):\n def test_container_to_host(self):\n \"\"\"\n Test th...
python
edit
3
1
apache-2.0
fbd7c3b5627ba288ac400944ee242f3369143291
fasaxc/calicoctl,fasaxc/calicoctl,projectcalico/calico-containers,insequent/calico-docker,tomdee/calico-docker,robbrockbank/calico-containers,robbrockbank/calicoctl,Metaswitch/calico-docker,TrimBiggs/calico-containers,tomdee/calico-docker,dalanlan/calico-docker,CiscoCloud/calico-docker,TeaBough/calico-docker,webwurst/c...
calico_containers/tests/st/test_container_to_host.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\n\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.sessions.models import Session\n\n\nclass Command(BaseCommand):\n\n args = '<count count ...>'\n help = \"Delete old sessions\"\...
python
edit
1
3
mit
ec61fec1ae60a565110876101dabad352e3ea46b
QLGu/djangopackages,pydanny/djangopackages,QLGu/djangopackages,nanuxbe/djangopackages,nanuxbe/djangopackages,QLGu/djangopackages,nanuxbe/djangopackages,pydanny/djangopackages,pydanny/djangopackages
core/management/commands/delete_old_sessions.py
rejected_duplicate
Near-duplicate of sample 2487
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\n\"\"\"\nPlotting and analysis tools for the ARTIS 3D supernova radiative transfer code.\n\"\"\"\n\nimport os\n\nfrom setuptools import find_packages, setup\n\nsetup(name=\"artistools\",\n version=0.1,\n author=\...
python
edit
1
0
mit
e12d086e5ad4692cd6be16eed0649ebc89e6c640
lukeshingles/artistools,lukeshingles/artistools
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nBASE_URL = \"http://api.football-data.org/v1\"\n\nLEAGUE_IDS = {\n \"PL\": \"426\",\n \"ELC\": \"427\",\n \"EL1\": \"428\",\n \"FAC\": \"429\",\n \"BL1\": \"430\",\n \"BL2\": \"431\",\n \"DFB\": \"432\",\n \"DED\": \...
python
edit
1
0
mit
3d7bbd37485dca4782ad7e7fdb088b22db586b66
conormag94/pyscores
pyscores/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sqlite3\n\n\nconnection = sqlite3.connect('data.db')\n\n\nclass SavedRoll:\n @staticmethod\n def save(user, name, args):\n pass\n\n @staticmethod\n def get(user, name):\n pass\n\n @staticmethod\n def d...
python
edit
1
1
mit
2afd2467c16969b10496ae96e17b9dce7911f232
foxscotch/foxrollbot
db.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport os\n\nfrom mopidy import config, exceptions, ext\n\n\n__version__ = '1.4.0'\n\n\nclass Extension(ext.Extension):\n\n dist_name = 'Mopidy-MPRIS'\n ext_name = 'mpris'\n version = __ve...
python
edit
1
2
apache-2.0
61421a84d908d89925abeefb189f62c024ab8e83
mopidy/mopidy-mpris
mopidy_mpris/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport argparse\nimport os\nimport shutil\n\nfrom astroplan import download_IERS_A\nfrom astropy.utils import data\n\n\ndef download_all_files(data_folder=None):\n download_IERS_A()\n\n if data_folder is None:\n data_folder = \...
python
edit
1
5
mit
ca977a2a9c8f3c3b54f2bd516323fa9b1dc23b6c
panoptes/POCS,joshwalawender/POCS,panoptes/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,joshwalawender/POCS
pocs/utils/data.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom us_ignite.snippets.models import Snippet\n\n\nFIXTURES = [\n {\n 'slug': 'home-box',\n 'name': 'UP NEXT: LOREM IPSUM',\n 'body': '',\n 'url_text': 'G...
python
edit
3
3
bsd-3-clause
989966444e63336b59da04265dbeb901258f75c1
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
us_ignite/snippets/management/commands/snippets_load_fixtures.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pytest\n\n\ndef pytest_addoption(parser):\n group = parser.getgroup('{{cookiecutter.plugin_name}}')\n group.addoption(\n '--foo',\n action='store',\n dest='foo',\n help='al...
python
edit
1
1
mit
c93cb479446fbe12e019550f193cb45dbdc1e3e0
luzfcb/cookiecutter-pytest-plugin,s0undt3ch/cookiecutter-pytest-plugin,pytest-dev/cookiecutter-pytest-plugin
pytest-{{cookiecutter.plugin_name}}/pytest_{{cookiecutter.plugin_name}}.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='mutual-debt-simplifier',\n version='1.0',\n description='Tool to perform mutual debt simplification',\n url='https://github.com/ric2b/Mutual_Debt_Simplification',\n ...
python
edit
1
0
mit
92f4f496d755187c9d48d2a34262402ba9295732
ric2b/Mutual_Debt_Simplification
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pkgutil\nfrom enum import IntEnum\n\n_data = pkgutil.get_data('wikicurses', 'interwiki.list').decode()\nwikis = dict([i.split('|')[0:2] for i in _data.splitlines() if i[0]!='#'])\n\nclass formats(IntEnum):\n i, b, blockquote = (1<...
python
edit
1
1
mit
2fea7b008336e1960efb375c63a4cc14053bc590
ids1024/wikicurses
src/wikicurses/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom dash.dash_table import * # noqa: F401, F403, E402\nimport warnings\n\nwarnings.warn(\n \"\"\"\nThe dash_table package is deprecated. Please replace\n`import dash_table` with `from dash import dash_table`\"\"\",\n stacklevel=2,\n...
python
edit
1
0
mit
faac7b98d3270267b731c97aa0318d532f75610c
plotly/dash-table,plotly/dash-table,plotly/dash-table
dash_table/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport wikipedia\nimport sys\nimport random\nimport re\nimport nltk.data\n\n\ndef process_file(f):\n names = {}\n with open(f) as file:\n for line in file:\n l = line.strip().split('\\t')\n if len(l) != 2:...
python
edit
2
5
apache-2.0
d8a5d6d6478ae8267ccd9d1e4db710f8decb7991
Motivatix/wikipedia-achievements-processing
wiki/achievements.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n\tname=\"DependencyWatcher-Parser\",\n\tversion=\"1.0\",\n\turl=\"http://github.com/DependencyWatcher/parser/\",\n\tauthor=\"Michael Spector\",\n\tlicense=\"Apa...
python
edit
1
0
apache-2.0
6505a37ac7aebfb0ac3a4c76b924b9f80d524a23
DependencyWatcher/parser,DependencyWatcher/parser
setup.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Include compose in the top level" }, { "role": "assistant", "content": "from __future__ import absolute_import, unicode_literals\nfrom .api.psd_image import PSDImage\nfrom .api.composer import compose\n" } ]
python
new_file
4
0
mit
d5cf661b2658d7f9a0f5436444373202e514bf37
kmike/psd-tools,psd-tools/psd-tools,kmike/psd-tools
src/psd_tools2/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.contrib.auth.models import User\n\nfrom announce.mailchimp import archive_members, list_members, batch_subscribe\nfrom studygroups.models import Profile\n\nimpor...
python
edit
6
2
mit
539608a9ca9a21707184496e744fc40a8cb72cc1
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
announce/management/commands/migrate_mailchimp_users.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='wagtail-draftail',\n version='0.1a',\n description='Draft.js editor for Wag...
python
edit
1
0
mit
be6ddfe1aa9a5d812bb3805316c8c85053c676ec
gasman/wagtaildraftail,springload/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,gasman/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,springload/wagtaildraftail
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='pyhunter',\n packages=['pyhunter'],\n version='0.2',\n description='An (unofficial) Python wrapper for the Hunter.io API',\n author='Quentin Durantay',\n author_email='<EMAI...
python
edit
1
0
mit
6757b7dc89d70b3c2307c489146ed7dfb7e6cce1
VonStruddle/PyHunter
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nboilerplate = {\n 'chart': {\n 'renderTo': 'container',\n 'plotBackgroundColor': 'none',\n 'backgroundColor': 'none',\n },\n 'title': {'text': 'null'},\n 'subtitle': {'text': 'null'},\n 'credits': {\n ...
python
edit
1
0
mit
752dca349d9f93c2a756e0b1b891006159eecbad
Impactstory/impactstory-analytics,Impactstory/impactstory-analytics,Impactstory/impactstory-analytics,total-impact/impactstory-analytics,total-impact/impactstory-analytics,total-impact/impactstory-analytics,Impactstory/impactstory-analytics,total-impact/impactstory-analytics
impactstoryanalytics/highcharts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2015-2018 MetPy Developers.\r\n# Distributed under the terms of the BSD 3-Clause License.\r\n# SPDX-License-Identifier: BSD-3-Clause\r\n\"\"\"\r\nParse angles\r\n============\r\n\r\nDemonstrate how to convert direction strin...
python
edit
1
0
bsd-3-clause
38d80f89abc4c39d077505c4d6f27c4db699eeee
Unidata/MetPy,ahaberlie/MetPy,dopplershift/MetPy,dopplershift/MetPy,Unidata/MetPy,ShawnMurd/MetPy,ahaberlie/MetPy
examples/calculations/Parse_Angles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2013 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\nclass Channel(object):\n def __init__(self, name, branch, position, cate...
python
edit
1
1
bsd-3-clause
02ea7389a364fe1f7df48542d4727c32374da452
eunchong/build,eunchong/build,eunchong/build,eunchong/build
scripts/master/factory/dart/channels.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"FastAPI framework, high performance, easy to learn, fast to code, ready for production\"\"\"\n\n__version__ = \"0.1.16\"\n\nfrom .applications import FastAPI\nfrom .routing import APIRouter\nfrom .params import Body, Path, Query, Head...
python
edit
13
0
mit
e5b341c7ddbd085e7203276398bdf10a1d86446b
tiangolo/fastapi,tiangolo/fastapi,tiangolo/fastapi
fastapi/__init__.py
rejected_lint
Too many lint violations: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom ckanext.qa import __version__\n\nsetup(\n name='ckanext-qa',\n version=__version__,\n description='Quality Assurance plugin for CKAN',\n long_description='',\n classifiers=[],...
python
edit
1
0
mit
b2026158e0aec2c79bba9e61ff02c14d42166b20
ckan/ckanext-qa,ckan/ckanext-qa,ckan/ckanext-qa
setup.py
rejected_duplicate
Near-duplicate of sample 572
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\n# This is the command line interface for bake. For people who want to take\n# bake.py and extend it for their own circumstances, modifying the main routine\n# in this module is probably the best p...
python
edit
1
2
mit
452ad6f3de797285a50094a4a145714e75204d95
AlexSzatmary/bake
bake/cmdline.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nBenchmark of message serialization.\n\nThe goal here is to mostly focus on performance of serialization, in a vaguely\nrealistic manner. That is, mesages are logged in context of a message with a\nsmall number of fields.\n\"\"\"\n\n...
python
edit
1
2
apache-2.0
60a5104f0138af7bbfc5056fae01898c148b10a0
ScatterHQ/eliot,ScatterHQ/eliot,ClusterHQ/eliot,ScatterHQ/eliot
benchmarks/serialization.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hashlib\n\n\ndef hexdigest(strings):\n m = hashlib.md5()\n for s in strings:\n m.update(s)\n return m.hexdigest()\n\n```\n\nApply this change: Fix TypeError in Python 3" }, { "role": "assistant", "content"...
python
edit
1
2
bsd-3-clause
6adfd6ee8f673a601a3d118a45d21d2941b1e0aa
tkf/buildlet
buildlet/utils/hashutils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import permissions\n\nfrom workflows.models import *\n\n\nclass IsAdminOrSelf(permissions.BasePermission):\n def has_permission(self, request, view):\n if request.user and request.user.is_authenticated():\n ...
python
edit
9
9
mit
3b4c645792c1a58cdce3dc25171723e7139d66da
xflows/clowdflows-backend,xflows/clowdflows-backend,xflows/clowdflows-backend,xflows/clowdflows-backend
workflows/api/permissions.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\n\nfrom apps.organizations.models import (\n Organization, OrganizationAddress, OrganizationMember\n)\n\n\nclass OrganizationAddressAdmin(admin.StackedInline):\n model = OrganizationAddress\n extra ...
python
edit
1
0
bsd-3-clause
92138f23dfc5dbbcb81aeb1f429e68a63a9d5005
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
apps/organizations/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django import forms\n\nfrom apps.categories.models import *\nfrom apps.books.models import *\n\nclass LoginForm(forms.ModelForm):\n \"\"\"docstring for LoginForm\"\"\"\n class Meta:\n ...
python
edit
7
0
mit
63c2cc935d3c97ecb8b297ae387bfdf719cf1350
vuonghv/brs,vuonghv/brs,vuonghv/brs,vuonghv/brs
apps/admin/forms.py
rejected_lint
Too many lint violations: 7
true