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#!/usr/bin/env python3\n\nimport os\nimport sys\nimport unittest\n\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))\n\nload = unittest.defaultTestLoader.loadTestsFromModule\n\nsuites = []\ndirname = os.path.dirname(__file_...
python
edit
1
0
bsd-3-clause
6d3b191bd35f64b097ffac2a514d2400f2e07983
ProgVal/Inceptoe,ProgVal/Inceptoe
tests/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sympy.core import Function, Pow, sympify\nfrom sympy.polys import Poly\n\n\ndef decompogen(f, symbol):\n \"\"\"\n Computes General functional decomposition of ``f``.\n Given an expression ``f``, returns a list ``[f_1, f_2, ......
python
edit
1
3
bsd-3-clause
5c89aa079d94fe70bb5627eb67404bc65b80212a
drufat/sympy,ChristinaZografou/sympy,chaffra/sympy,Vishluck/sympy,skidzo/sympy,ga7g08/sympy,wanglongqi/sympy,mafiya69/sympy,ga7g08/sympy,Davidjohnwilson/sympy,yashsharan/sympy,mcdaniel67/sympy,hargup/sympy,postvakje/sympy,Davidjohnwilson/sympy,VaibhavAgarwalVA/sympy,kaushik94/sympy,ChristinaZografou/sympy,MechCoder/sym...
sympy/solvers/decompogen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport shutil\nfrom pathlib import Path\n\nimport pytest\n\nfrom pandas_profiling.utils.cache import cache_file\n\n\n@pytest.fixture(scope=\"function\")\ndef get_data_file(tmpdir):\n def getter(file_name, url):\n source_file = cac...
python
edit
1
1
mit
9fdd24ed20c553638cde7c67f994ea72da0ef149
JosPolfliet/pandas-profiling,JosPolfliet/pandas-profiling
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom parameterized import parameterized\nfrom som.vm.universe import Universe\n\n\nclass SomTest(unittest.TestCase):\n @parameterized.expand([\n (\"ClassStructure\",),\n (\"Array\" ,),\n (\"B...
python
edit
1
1
mit
09fc5b3e37cc0bcaf764c540f32d1a3eab1b8cf2
SOM-st/RTruffleSOM,SOM-st/PySOM,SOM-st/RPySOM,SOM-st/RPySOM,SOM-st/RTruffleSOM,smarr/RTruffleSOM,smarr/PySOM,smarr/RTruffleSOM,smarr/PySOM,SOM-st/PySOM
tests/som_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\nfrom . import config, cli\n\n\ndef main():\n logging.basicConfig(levle=logging.INFO, format=\"%(message)s\")\n conf = config.load_config()\n cli.dothub(obj={}, default_map=conf)\n\nif __name__ == '__main__': # prag...
python
edit
1
1
mit
969c5129ec7c742985b7a3d09eb5ddd4b44b1743
Mariocj89/dothub
dothub/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#from CreateTableFromDatabase import getRankingsFromDatabase\nimport time\nfrom CheckAndPostForSeriesSubmissions import checkNewSubmissions\n\n# Refreshes all other scripts every couple of minutes\ndef refreshScripts():\n\n while True:\n...
python
edit
1
3
mit
f4d5bafcf99d2117fe589d8c31f8aff8ed3467a5
LiquidFun/Reddit-GeoGuessr-Tracking-Bot
RefreshScripts.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom . import bluegreen, context_handler\n\n# TODO: move as buildercore.concurrency.concurrency_for\ndef concurrency_for(stackname, concurrency_name):\n \"\"\"concurrency default is to perform updates one machine at a time.\n\n Concur...
python
edit
1
5
mit
9de6036f722fb63378a74f08d7f05d184e1b175f
elifesciences/builder,elifesciences/builder
src/buildercore/concurrency.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport pytest\n\nfrom freezegun import freeze_time\nfrom jinja2 import Environment, exceptions\n\n\n@pytest.fixture(scope='session')\ndef environment():\n return Environment(extensions=['jinja2_time.TimeExtensi...
python
edit
1
1
mit
e9e8428563545d00eda25a540a3621943bf34143
hackebrot/jinja2-time
tests/test_now.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom flask_script import Manager\nfrom flask_migrate import Migrate, MigrateCommand\n\nfrom api import create_app, db\n\napplication = create_app(os.getenv('FLASK_CONFIG') or 'default')\n\nmigrate = Migrate(application, db)\n\n...
python
edit
1
1
mit
0147e9a6c9d61028781b55f4f8e068e576b653a0
EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list,EdwinKato/bucket-list
manage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n=======================================\nPixel importances with forests of trees\n=======================================\n\nThis example shows the use of forests of trees to evaluate the importance\nof the pixels in an image classi...
python
edit
4
0
bsd-3-clause
1d1348eb2126a0a8ee1a18b37a5254b59c3a4c76
scikit-learn/scikit-learn,madjelan/scikit-learn,xubenben/scikit-learn,Vimos/scikit-learn,nrhine1/scikit-learn,zhenv5/scikit-learn,liberatorqjw/scikit-learn,ndingwall/scikit-learn,beepee14/scikit-learn,shyamalschandra/scikit-learn,walterreade/scikit-learn,dhruv13J/scikit-learn,Adai0808/scikit-learn,Nyker510/scikit-learn...
examples/ensemble/plot_forest_importances_faces.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom job_runner.settings.base import *\n\n\nDEBUG = True\nTEMPLATE_DEBUG = True\n\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': os.path.join(PROJECT_ROOT, '..', 'database.s...
python
edit
3
0
bsd-3-clause
27be11775d23e873f9e568b86b8a0b2409878d30
spilgames/job-runner,spilgames/job-runner
job_runner/settings/env/development.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\nfrom ...util.base import BaseStep\n\nLOG = logging.getLogger(__name__)\n\n\nclass CheckDatabaseStatus(BaseStep):\n\n def __unicode__(self):\n return \"Checking database status...\"\n\n d...
python
edit
4
5
bsd-3-clause
29d6010c18605179860afe08f5cac218e1a65716
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/workflow/steps/util/resize/check_database_status.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom lxml import etree\nimport sys\n\ncomments_file = open(\"examples/Technical_Document_Comments.xfdf\", \"r\")\ncomments_xml = etree.parse(comments_file)\nroot = comments_xml.getroot()\nprefix = None\ntry:\n pref...
python
edit
1
0
mit
5c7f6f90f4ae88e70c738ab13170ad1c64447db3
juandesant/xfdf2ascii
xfdf2ascii.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom numpy.testing import NumpyTest, NumpyTestCase\n\nclass test_Template(NumpyTestCase):\n\n def setUp(self): pass\n #print \"TestCase initialization...\"\n\n def test_foo(self): pass\n #print \"testing foo\"\n\n def...
python
edit
1
1
bsd-3-clause
1ed6c3f6d79aca5d647e8ff8332096c4fc111548
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
neuroimaging/utils/tests/test_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'max'\n\nimport gpxpy\nimport pandas as pd\n\n\ndef parse_gpx(gpx_file_name):\n return gpxpy.parse(gpx_file_name)\n\n\ndef data_frame_for_track_segment(segment):\n seg_dict = {}\n\n for point in segment.points:\n ...
python
edit
1
2
mit
3a2b536f24eee711a1329daf7403bd92840a87e3
komax/gpx-pandas
gpxpandas/gpxreader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\n\n\ndef import_symbol(typename):\n \"\"\"Import a module or typename within a module from its name.\"\"\"\n try:\n return importlib.import_module(typename)\n\n except ImportError as e:\n parts = type...
python
edit
1
5
mit
08167d79efb97a0728564caf96a96b08763ddf60
ManiacalLabs/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel
bibliopixel/util/importer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n# XXX: Broken - Does O_NONBLOCK work at all?\n\n\"\"\"An implementation of the Python Concurrency Problem of 99 Bottles of Beer\n\nSee: http://wiki.python.org/moin/Concurrency/99Bottles\n\"\"\"\n\nimport sys\n\nfrom...
python
edit
1
2
mit
55f0ab3ba544344bda4c95b014193dffe9db70cd
nizox/circuits,eriol/circuits,treemo/circuits,treemo/circuits,treemo/circuits,eriol/circuits,eriol/circuits
examples/99bottles.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n#\n# This source file is part of appleseed.\n# Visit http://appleseedhq.net/ for additional information and resources.\n#\n# This software is released under the MIT license.\n#\n# Copyright (c) 2017 Gleb Mishchenko, The appleseedhq Organi...
python
edit
2
0
mit
3f394b37174d97b53fdef8ce662e258c6b2aa337
luisbarrancos/appleseed,est77/appleseed,appleseedhq/appleseed,pjessesco/appleseed,gospodnetic/appleseed,Vertexwahn/appleseed,appleseedhq/appleseed,dictoon/appleseed,Aakash1312/appleseed,Biart95/appleseed,Vertexwahn/appleseed,dictoon/appleseed,Biart95/appleseed,aytekaman/appleseed,pjessesco/appleseed,aytekaman/appleseed...
src/appleseed.python/studio/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib import admin\n\n\nclass Leaflet(models.Model):\n '''\n Represents a given (generated) leaflet.\n '''\n\n competition = models.ForeignKey('competitions.Competition')\n year = m...
python
edit
1
1
mit
497451ee060b1dd7655ad648f4026633e6e3318c
matus-stehlik/roots,matus-stehlik/roots,matus-stehlik/glowing-batman,rtrembecky/roots,tbabej/roots,matus-stehlik/roots,tbabej/roots,tbabej/roots,rtrembecky/roots,matus-stehlik/glowing-batman,rtrembecky/roots
leaflets/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\nfrom unittest.mock import Mock, patch\n\nfrom jsonrpcclient.log import _trim_string, _trim_values\n\n\ndef test_trim_string():\n message = _trim_string(\"foo\" * 100)\n assert \"...\" in message\n\n\ndef t...
python
edit
6
1
mit
739ae88d817cb86723b126360aaf3dd6df3045c0
bcb/jsonrpcclient
tests/test_log.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom listing import Listing, session\nfrom scraper import Scraper\nfrom slack import Slack\n\nimport sys\nimport traceback\nimport time\n\nslack = Slack()\n\ndef scrape():\n results = 0\n duplicates = 0\n\n for result in Scraper()....
python
edit
3
4
mit
f2f422702985c3e890fa19a7f841baba837c5bba
vboginskey/cribfinder
main.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 ('contenttypes', '0002_remove_content_type_name'),\n ...
python
edit
1
0
bsd-2-clause
4f9e602bfbf145adfc93270d915325b59c710a46
Ian-Foote/django-conman,meshy/django-conman,meshy/django-conman
conman/routes/migrations/0001_initial.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport dj_database_url\n\n\nDATABASES = {\n 'default': dj_database_url.config(\n default='postgres://localhost/test_utils',\n ),\n}\nINSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'djang...
python
edit
1
0
bsd-2-clause
2ac7b22e592557ea8be70311e641b1f42f6c7128
incuna/incuna-test-utils,incuna/incuna-test-utils
tests/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\ndef parseCommandLine(argv):\n return argv[1] if len(argv) > 1 else \"\"\n\n\nif __name__ == \"__main__\":\n latin = parseCommandLine(sys.argv)\n print(latin)\n print(\"igpay atinlay\")\n\n```\n\nApply this change: ...
python
edit
2
2
mit
3bd409a0c7f252811c7e8488493270d225e8616a
oneyoke/sw_asgmt_2
src/main/python/piglatin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport collections\nfrom copy import deepcopy\n\n\nclass OrderedSet(collections.Set):\n\n def __init__(self, iterable=()):\n self.d = collections.OrderedDict.fromkeys(iterable)\n\n def add(self, key):\n self.d[key] = Non...
python
edit
1
5
mit
1927c503fda892490fb7262ba480e429a0f416fb
shirtsgroup/InterMol,shirtsgroup/InterMol
intermol/orderedset.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add new way of retreiving graph layouts" }, { "role": "assistant", "content": "import inspect\n\nfrom .random import random\nfrom .circular import circular\nfrom .force_directed import fruchterman_reingold\n\n\n_layout_map = {\n ...
python
new_file
1
3
bsd-3-clause
d9d2c7d341894e28a5ad73469ec0d9d23d78429e
ghisvail/vispy,michaelaye/vispy,Eric89GXL/vispy,michaelaye/vispy,Eric89GXL/vispy,Eric89GXL/vispy,drufat/vispy,drufat/vispy,ghisvail/vispy,michaelaye/vispy,drufat/vispy,ghisvail/vispy
vispy/visuals/graphs/layouts/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom __future__ import print_function\n\nimport os\nimport netCDF4 as nc\n\nfrom model_test_helper import ModelTestHelper\n\nclass TestCouplingFields(ModelTestHelper):\n\n def __init__(self):\n super(TestCouplingFields, self).__...
python
edit
1
1
apache-2.0
d2f1b9311b546c079490e5f0bdb45b9c9d570bb1
CWSL/access-om
system/test_coupling_fields.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shlex\nimport logging\nimport subprocess\nimport contextlib\n\n@contextlib.contextmanager\ndef cd(newdir):\n prevdir = os.getcwd()\n os.chdir(os.path.expanduser(newdir))\n try:\n yield\n finally:\n ...
python
edit
1
5
mit
5185222f82b22868a28cb93a6a11632a9e1f6456
tobi-wan-kenobi/dotfiles
libdotify/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom app import create_app, db\nfrom flask.ext.script import Manager\nfrom flask.ext.migrate import Migrate, MigrateCommand\n\napplication = create_app(os.getenv('FLASH_CONFIG') or 'development')\nmanager...
python
edit
1
0
mit
a09edcdf11c0d6c6b43cbff5029ac8cfb5741170
mtekel/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,alphagov/digitalmarketplace-api,mtekel/digitalmarketplace-api,mtekel/digitalmarketplace-api,mtekel/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,RichardKnop/digitalmarketplace-api,alphagov/digitalmarketplace-...
application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Red Hat, Inc.\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.apach...
python
edit
1
0
apache-2.0
2d30393166e6c9bd0995810226a223b44635da6d
stratis-storage/stratis-cli,stratis-storage/stratis-cli
src/stratis_cli/_version.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 flask import jsonify\nfrom flask import current_app\n\nfrom influxdb import InfluxDBClient\n\n\nfrom app.base import ApiResource\n\nclass InfluxResource(ApiResource):\n endpoint = 'i...
python
edit
1
8
bsd-2-clause
d58eb0f244d461222d5cd0719675cf46a9297081
Crapworks/ceph-dash,Crapworks/ceph-dash,Aorjoa/aiyara-ceph-dash,Crapworks/ceph-dash,Aorjoa/aiyara-ceph-dash,Aorjoa/aiyara-ceph-dash,Aorjoa/aiyara-ceph-dash,Crapworks/ceph-dash,Aorjoa/aiyara-ceph-dash
app/influx/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nimport TestSCons\n\ntest = TestSCons.TestSCons(match = TestSCons.match_re)\n\nif sys.platform != 'win32':\n msg = \"Skipping Visual C/C++ test on non-Windows platform '%s'\\n\" % sys.platform\n test.skip_test(msg)\n\n###...
python
edit
1
0
mit
3bee320f66d192e2e40b6b91a53c3ccd64c09443
azatoth/scons,azatoth/scons,azatoth/scons,azatoth/scons,azatoth/scons
test/MSVC/query_vcbat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file...
python
edit
1
1
apache-2.0
655c3ca55a5b3bb1f03d524219c3d038c2d02ed5
tonybaloney/st2,alfasin/st2,nzlosh/st2,tonybaloney/st2,pixelrebel/st2,Plexxi/st2,punalpatel/st2,StackStorm/st2,Itxaka/st2,nzlosh/st2,pinterb/st2,StackStorm/st2,emedvedev/st2,alfasin/st2,jtopjian/st2,peak6/st2,peak6/st2,emedvedev/st2,tonybaloney/st2,Itxaka/st2,lakshmi-kannan/st2,Plexxi/st2,grengojbo/st2,dennybaa/st2,nzl...
st2client/st2client/models/datastore.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport subprocess\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.http import JsonResponse, HttpResponseBadRequest\nfrom django.shortcuts import redirect\nfrom django.views.decorators.csrf import...
python
edit
1
2
apache-2.0
24dba96be4a9202fdac5fa779c52789ec6cd13c4
prattl/teamfinder,prattl/teamfinder,prattl/teamfinder,prattl/teamfinder
api/common/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\n\n\ndef json_api_exception_handler(exc, context):\n \"\"\" Custom exception handler that returns errors object as an array \"\"\"\n\n from rest_f...
python
edit
1
7
apache-2.0
165d76e68492070060a7045e08a7bec09a226093
arpitar/osf.io,mluke93/osf.io,icereval/osf.io,DanielSBrown/osf.io,MerlinZhang/osf.io,pattisdr/osf.io,cslzchen/osf.io,ckc6cz/osf.io,ckc6cz/osf.io,sbt9uc/osf.io,RomanZWang/osf.io,sloria/osf.io,jnayak1/osf.io,petermalcolm/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,alexschiller/osf.io,Ghalko/osf.io,alexschiller/osf...
api/base/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Configuration.\"\"\"\n\nimport logging\nimport os\nimport re\n\nfrom google.appengine.ext.appstats import recording\n\nlogging.info('Loading %s from %s', __name__, __file__)\n\n# Custom webapp middleware to add Appstats.\ndef webapp_a...
python
edit
1
8
apache-2.0
8974dc36e6ea0ab7b5ce3c78e9827d41cf1abcec
Koulio/rietveld,gco/rietveld,andyzsf/rietveld,google-code-export/rietveld,kscharding/integral-solutions-smxq,rietveld-codereview/rietveld,google-code-export/rietveld,v3ss0n/rietveld,ericmckean/rietveld,openlabs/cr.openlabs.co.in,aungzanbaw/rietveld,robfig/rietveld,Koulio/rietveld,arg0/rietveld,sajingeo/rietveld,openlab...
appengine_config.py
rejected_duplicate
Near-duplicate of sample 2370
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nurlpatterns = patterns('django.contrib.auth.views',\n\n url(r'^login/$', 'login', {'template_name': 'authentication/login.html'}),\n url(r'^logout/$', 'logout_then_login'))\n```\n...
python
edit
3
0
mit
e4b47c9bc3de18c83a2fb718c806b7668b492de6
DummyDivision/Tsune,DummyDivision/Tsune,DummyDivision/Tsune
authentication/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\n\nfrom ...utils import transformer\n\n\nclass Command(BaseCommand):\n def handle(self, filename, *args, **kwargs):\n reader = transformer.convert_to_csv_reader(filename)\n ...
python
edit
3
2
apache-2.0
b1adfacff3b7c319ae148e79807d371ded934a5c
texastribune/tx_salaries,texastribune/tx_salaries
tx_salaries/management/commands/generate_transformer_hash.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask\r\nfrom flask_login import LoginManager\r\nfrom config import config\r\n\r\ndatabase = {}\r\nlogin_manager = LoginManager()\r\n\r\ndef create_app(config_name):\r\n app = Flask(__name__)\r\n app.database = datab...
python
edit
1
3
mit
caa2b1e9303d2ba67a0491942d2459006ea8efe3
JoshuaOndieki/buckylist,JoshuaOndieki/buckylist
bucky/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTo run this test:\n1. cd importlazy/tests\n2. python -m unittest test_importlazy.py\n\"\"\"\n\nimport unittest\nimport sys\n\n\nclass ImportLazyTest(unittest.TestCase):\n\n def test1_initial_state(self):\n \"\"\"Initially,...
python
edit
1
1
mit
b9b194b9eb9a9ddefa9549a522fc67c181acbc4a
ldiary/importlazy
tests/test_importlazy.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\n Test Status Endpoint\n\n GET /status\n HEAD /status\n\n\"\"\"\n\nfrom biothings.tests.web import BiothingsTestCase\nfrom setup import setup_es # pylint: disable=unused-import\n\n\nclass TestStatus(BiothingsTestCase):\n\n...
python
edit
3
1
apache-2.0
0f16fe34654560f8889ad1f5b199cb8bfa2b3846
biothings/biothings.api,biothings/biothings.api
tests/web/test_status.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2016 The Regents of the University of Michigan\n# All rights reserved.\n# This software is licensed under the MIT License.\n\n\nclass Error(Exception):\n pass\n\n\nclass ConfigError(Error, RuntimeError):\n pass\n\n\ncl...
python
edit
1
2
bsd-3-clause
df2fe66f64f79127374d2f183cb76966f77761ee
csadorf/signac,csadorf/signac
signac/common/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# vim:ts=4:sw=4:noexpandtab\n\nfrom __future__ import absolute_import\n\nimport socket\nimport logging\n\nfrom .dictlib import ConfigDict\n\nconfig = ConfigDict(\n\tbot_nickname = 'pmxbot',\n\tdatabase = 'sqlite:pmx...
python
edit
1
0
bsd-3-clause
2cb7c80bc4358631b897e3ea91d3c7eff684f69b
jawilson/pmxbot,jawilson/pmxbot
pmxbot/__init__.py
rejected_duplicate
Near-duplicate of sample 11401
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom contextlib import contextmanager\nimport logging\nimport smtplib\n\nfrom email.mime.multipart import MIMEMultipart\nfrom email.mime.text import MIMEText\n\nfrom settings import Settings\n\n\n@contextmanager\ndef smtp_server():\n s =...
python
edit
1
4
mit
c8a2647424a24ea97c1e5ed5a14c85f8a8eadd8b
achauve/pycurator
email_tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\ndef execute(name, branch, overwrite_if_exists=False):\n try:\n from cookiecutter.main import cookiecutter\n except ImportError as exc:\n raise ImportError(\n 'You must install \"cookiecutter\" to ...
python
edit
1
4
apache-2.0
df45251622e6b935b27022e36fcbd79e9228f989
hartym/bonobo,python-bonobo/bonobo,hartym/bonobo,hartym/bonobo,python-bonobo/bonobo,python-bonobo/bonobo
bonobo/commands/init.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__author__ = 'Matt Stibbs'\n__version__ = '1.27.00'\ntarget_schema_version = '1.25.00'\n\nfrom flask import Flask\napp = Flask(__name__)\n\n\ndef startup():\n import blockbuster.bb_dbconnector_factory\n import blockbuster.bb_logging a...
python
edit
5
5
mit
c9f4c6442c250d8daecb7476bb1a22dae53f3859
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
blockbuster/__init__.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2016 Red Hat, Inc.\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 License at\n#\n# htt...
python
edit
1
1
apache-2.0
69d88adcedaf3779e5bf5a5757a21c71d4aa3016
rcritten/novajoin
novajoin/errors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef strongly_connected_components():\n \"\"\"Strongly connected components for graph.\n\n Procedure:\n - Call (De...
python
edit
1
1
bsd-2-clause
eacfca844e5ab590acfcd193e2ca1fa379e10009
bowen0701/algorithms_data_structures
alg_strongly_connected_components.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .configobj import Config\n\nconfig = Config.from_environ()\n\n# Add the data and some of the API as attributes of the top-level package.\nglobals().update(config)\nget = config.get\n\n```\n\nApply this change: Add get_bool to package e...
python
edit
1
0
bsd-3-clause
c4bf617dddd15e77974b000e8fa90750e1761386
mikeboers/siteconfig,mikeboers/siteconfig
siteconfig/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# paramrunner.py\n# Run findparams on linde model and save results\nimport helpers\nimport findparams\nimport tables\nimport numpy as np \n\nsavedir = \"/home/ith/results/\"\nsavefile = \"linde-params.hf5\"\nWMAP5PI...
python
edit
2
5
bsd-3-clause
c18bdb90e6197e298cc6bfb5f52ffbf1d48f029e
ihuston/pyflation,ihuston/pyflation
paramrunner.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom django.views.generic.simple import direct_to_template\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\n\nfrom django.contrib import admin\nfrom django.contrib.au...
python
edit
1
0
mit
150058856f10992d0f65f47d79ac14e2f52818cc
cellcounter/cellcounter,oghm2/hackdayoxford,cellcounter/cellcounter,cellcounter/cellcounter,haematologic/cellcountr,haematologic/cellcounter,cellcounter/cellcounter,haematologic/cellcountr,haematologic/cellcounter,haematologic/cellcounter,oghm2/hackdayoxford
cellcounter/urls.py
rejected_duplicate
Near-duplicate of sample 23475
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\n\n@pytest.fixture(autouse=True)\ndef tagschecker(request):\n tags = set(request.config.getini('TAGS'))\n\n tags_marker = request.node.get_marker('tags')\n xfailtags_marker = request.node.get_marker('xfailtags')\n ...
python
edit
1
7
mit
14917a4d503569147277bfd5fefa4b2600dfea40
dincamihai/salt-toaster,dincamihai/salt-toaster
tests/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = \"0.0.11a\"\n\n__all__ = [\n 'adipls',\n 'common',\n 'gyre',\n 'io',\n 'mesa',\n 'stars'\n ]\n\n```\n\nApply this change: Fix list of submodules so that from tomso import * works" }, { "role": "ass...
python
edit
7
0
mit
594f6b189f496ec01c8c6742cde8639689dd50cc
warrickball/tomso
tomso/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__version__ = \"0.0.12\"\n\n__all__ = [\n 'adipls',\n 'utils',\n 'constants',\n 'gyre',\n 'fgong',\n 'mesa',\n 'stars'\n ]\n\n```\n\nApply this change: Put modules in alphabetical order" }, { "role": "assista...
python
edit
8
0
mit
705b93f7fd688c4889562a9950c220db23ffa98a
warrickball/tomso
tomso/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os.path\r\nfrom buildlib import *\r\n\r\nCONFIGURATION = 'Debug'\r\n\r\nproject = Project(__file__, 'build')\r\n\r\nproject.version = '0.1.0'\r\nproject.versioninfo = 'alpha'\r\nproject.build_number = 0\r\nproject.configuration = 'Re...
python
edit
5
0
mit
72455eeeab41810e49a182422c41a4c6e315055e
jammycakes/dolstagis.web,jammycakes/dolstagis.web,jammycakes/dolstagis.web
build.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Python script Exporter class\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n...
python
edit
1
1
bsd-3-clause
7ba76f2f4dd861e4acd34536e3484fc8ef001b3f
cornhundred/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipy...
IPython/nbconvert/exporters/python.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport matplotlib.pyplot as pl\n\nimport pygp as pg\nimport pybo.models as pbm\nimport pybo.policies as pbp\n\n\nif __name__ == '__main__':\n sn = 0.2\n ell = 0.670104947766\n sf = 1.25415619045\n\n model =...
python
edit
2
2
bsd-2-clause
2e1b5f4804023cd551b1d641e4b4dc5ba693ff62
mwhoffman/pybo,jhartford/pybo
demos/simple.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.contrib import admin\n\nfrom .models import Ticket\n\n\nclass TicketAdmin(admin.ModelAdmin):\n list_display = ['name', 'display_name', 'updated', 'is_active', 'is_paid', 'twid']\n list_editable = [...
python
edit
1
0
apache-2.0
8445c6bc549285fea5313a72c0500e2240460332
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
avalonstar/apps/subscribers/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport urllib.request\nimport urllib.parse\n\ndef get(urlStr,params={}):\n if params == {}:\n req = urllib.request.urlopen(urlStr)\n else:\n reqdata = urllib.request.Request(urlStr,urllib.parse.urlencode(params).encode('...
python
edit
1
2
mit
5944ada060154cde31c1fe04adeb1fb10a718eaf
RihanWu/vocabtool
urllibRequests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\n\nclass Database(dict):\n \"\"\"Holds a dict that contains all the information about the users in a channel\"\"\"\n def __init__(self, irc):\n super(Database, self).__init__(json.load(open(\"userdb.json\")))\n ...
python
edit
1
4
mit
c72120b4b3b7131450f1ee34c9b373f61a80c581
wolfy1339/Python-IRC-Bot
utils/database.py
rejected_duplicate
Near-duplicate of sample 4375
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import patterns, url, include\nfrom django.conf import settings\nfrom django.contrib import admin\n\n\nadmin.autodiscover()\n\n\nurlpatterns = patterns(\n '',\n # Webserver urls\n url(r'^', include('w...
python
edit
1
0
bsd-3-clause
29d24fb5e484e552b12778268d249b62390408be
siggame/webserver,siggame/webserver,siggame/webserver
webserver/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nScript for performing queries on large time series by using UCR ED and DTW algs.\n\"\"\"\n\n\nfrom time import time\nimport blaze\nfrom blaze.ts.ucr_dtw import ucr\n\n\n# Convert txt file into Blaze native format\ndef convert(filetx...
python
edit
6
2
bsd-2-clause
f9b6dbc958251050c6170587d5a205350252329c
seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core
samples/ucrmain.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport click\n\nfrom . import __version__\n\n\nclass JungleCLI(click.MultiCommand):\n\n \"\"\"Jangle CLI main class\"\"\"\n\n def list_commands(self, ctx):\n \"\"\"return available modules\"\"\"\n ...
python
edit
1
2
mit
f7dd603d4e24134affda6430736838ecaaab9938
achiku/jungle
jungle/cli.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom simtk import openmm\n\n# Check major version number\n# If Z=0 for version X.Y.Z, out put is \"X.Y\"\nassert openmm.Platform.getOpenMMVersion() == '7.1.1', \"openmm.Platform.getOpenMMVersion() = %s\" % openmm.Pl...
python
edit
1
0
mit
bddf5358b92d58549496de41ffeea724aeb2feb7
peastman/conda-recipes,omnia-md/conda-recipes,peastman/conda-recipes,omnia-md/conda-recipes,omnia-md/conda-recipes,peastman/conda-recipes
openmm/run_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import (\n BaseRegularization,\n LeastSquaresRegularization,\n BaseSimilarityMeasure,\n Small,\n SmoothDeriv,\n SmoothDeriv2,\n)\nfrom .regularization_mesh import RegularizationMesh\nfrom .sparse import SparseSm...
python
edit
16
2
mit
9c184878af2e7dd45bc7ff653979d008a77b0e30
simpeg/simpeg
SimPEG/regularization/__init__.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# These lines ARE needed, as they actually set up sys.meta_path\nfrom . import PatchWarnings\nfrom . import PatchBaseScientific\nfrom . import PatchScientific\n\nfrom .log import *\n\nfrom .utils import open\n\n__version__ = '0.2.3'\n\n# Pa...
python
edit
8
0
apache-2.0
cde59e7f8f8ea74c720f107c80c933b5b9aa913e
recipy/recipy,recipy/recipy
recipy/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n{\n PDBConst.Name: \"config\",\n PDBConst.Columns: [\n {\n PDBConst.Name: \"Name\",\n PDBConst.Attributes: [\"varchar(128)\", \"not null\", \"primary key\"]\n },\n {\n PDBConst.Name: \"Value\",\n P...
python
edit
8
0
mit
d00aea75e0f4e6ba74a2ccf57d02a0ef912d17ac
eddiedb6/ej,eddiedb6/ej,eddiedb6/ej
db/TableConfig.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pygame\n\n\nclass Graphic:\n car_color = (255, 50, 50)\n car_width = 3\n road_color = (255, 255, 255)\n road_width = 6\n draw_methods = {\n 'Car': 'draw_car',\n 'Road': 'draw_road',\n }\n\n def __in...
python
edit
1
2
mit
d0211871e11d2a2ce9f9a961750aa12a28658c62
thibault/vroom
vroom/graphics.py
rejected_duplicate
Near-duplicate of sample 930
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom typing import * # NOQA pylint:disable=wildcard-import,unused-wildcard-import\nfrom typing import NewType\n\nT_Address = bytes\nAddress = NewType('Address', bytes)\n\nT_BlockExpiration = int\nBlockExpiration = ...
python
edit
1
0
mit
2a57e5c17115e9c89936e6667985af1a47bf3247
hackaugusto/raiden,hackaugusto/raiden
raiden/utils/typing.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef _magic_get_file_type(f, _):\n file_type = magic.from_buffer(f.read(1024), mime=True)\n f.seek(0)\n return file_type.decode('utf-8')\n\n\ndef _guess_file_type(_, filename):\n return mimetypes.guess_type(filename)[0]\n\n\ntry:...
python
edit
1
2
mit
bce79a9156f93fd3c9356579bcb9309a66f2bdf2
randomchars/pushbullet.py,kovacsbalu/pushbullet.py,Saturn/pushbullet.py
pushbullet/filetype.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n{\n 'name': \"Project Logical Framework\",\n 'category': 'Project',\n 'sequence': 1,\n 'description': \"\"\"\nProject Logical Framework\n=========================\n \"\"\",\n 'version': '0.3',\n 'depends': ['project'],\...
python
edit
1
0
mit
525a9fcb14a1f91aa94508ca6dcc362d430d2969
stephane-/project_logical_framework
__openerp__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom threading import Thread\nfrom Queue import Queue\nfrom twisted.python import log\nimport time\nimport Mailbox, Web\nimport sys\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--verbose\", \"-v\", help=\"ou...
python
edit
2
0
mit
21dabaa963815f5dc99f19a7e3f792b0515c9089
jkingsman/Mockbox,jkingsman/Mockbox,jkingsman/Mockbox
Mockbox.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#%% Setup.\nimport numpy as np\nimport scipy.io.wavfile\n\nfrom keras.utils.visualize_util import plot\nfrom keras.callbacks import TensorBoard, ModelCheckpoint\nfrom keras.utils import np_utils\n\nfrom eva.models.wavenet import Wavenet, co...
python
edit
3
0
apache-2.0
987d943a076b591309c06f67834dcb0012dd8491
israelg99/eva
audio_train.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom docker import Client\nfrom docker import tls\nimport ssl\nimport os\n\n\ndef docker_client():\n \"\"\"\n Returns a docker-py client configured using environment variables\n according to the same logic as the official Docker cl...
python
edit
1
3
apache-2.0
fc203d643aa9a69c835aebee0de9b17851ef7a58
jeanpralo/compose,shubheksha/docker.github.io,saada/compose,talolard/compose,joaofnfernandes/docker.github.io,ionrock/compose,iamluc/compose,goloveychuk/compose,vdemeester/compose,menglingwei/denverdino.github.io,qzio/compose,d2bit/compose,docker/docker.github.io,GM-Alex/compose,bdwill/docker.github.io,anweiss/docker.g...
compose/cli/docker_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\n\nimport logging\n\nfrom django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.models import User\nfrom rest_framework.authtoken.models import Token\n\nfrom eventkit_cloud.auth.models impor...
python
edit
1
1
bsd-3-clause
093702a38645853d560606446da0b078ba12d14e
terranodo/eventkit-cloud,venicegeo/eventkit-cloud,terranodo/eventkit-cloud,venicegeo/eventkit-cloud,terranodo/eventkit-cloud,venicegeo/eventkit-cloud,venicegeo/eventkit-cloud,venicegeo/eventkit-cloud,terranodo/eventkit-cloud,venicegeo/eventkit-cloud
eventkit_cloud/auth/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom quick_orm.core import Database\r\nfrom sqlalchemy import Column, String\r\n\r\n__metaclass__ = Database.DefaultMeta\r\n\r\nclass User:\r\n name = Column(String(30))\r\n\r\nDatabase.register()\r\n\r\nif __name__ == '__main__':\r\n ...
python
edit
2
0
bsd-3-clause
bf4b22ef25d158ddeb1a98432d29451e10a912e6
tek/sqlpharmacy,tylerlong/quick_orm
quick_orm/examples/hello_world.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Test ``yatsm line``\n\"\"\"\nimport os\n\nfrom click.testing import CliRunner\nimport matplotlib as mpl\nimport pytest\n\nfrom yatsm.cli.main import cli\n\nmpl_skip = pytest.mark.skipif(\n mpl.get_backend() != 'agg' and \"DISPLAY\...
python
edit
1
1
mit
a1e56d65807228b952036fc182071aab5e6ff25f
valpasq/yatsm,c11/yatsm,ceholden/yatsm,ceholden/yatsm,c11/yatsm,valpasq/yatsm
tests/cli/test_pixel.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Load in core dependencies\nimport code\nimport os\nimport sublime\n\n# Set up constants\n__dir__ = os.path.dirname(os.path.abspath(__file__))\n\n\ndef run():\n # On every run, re-import the test class\n # TODO: Determine if this is ...
python
edit
2
2
unlicense
fdfe3c77e7b147f813b4cbb13b211f6ed8ff9057
twolfson/sublime-plugin-tests,twolfson/sublime-plugin-tests
sublime_plugin_tests/launchers/init.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport string\n\nfrom django.conf import settings\n\n\nCOUPON_TYPES = getattr(settings, 'COUPONS_COUPON_TYPES', (\n ('monetary', 'Money based coupon'),\n ('percentage', 'Percentage discount'),\n ('virtual_currency', 'Virtual curren...
python
edit
1
0
bsd-3-clause
7343cf6fe3b9dde76a629fd0c607d7ce0b632a64
rsalmaso/django-fluo-coupons,rsalmaso/django-fluo-coupons
coupons/settings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom importlib import import_module\n\ntry:\n from .import version\n # Always use short_version here (see PEP 386)\n __version__ = version.short_version\n __git_revision__ = version.git_re...
python
edit
4
3
bsd-2-clause
c55a2b152cd2b6603ef358e0f764eeb0308ff332
marinkaz/orange3,kwikadi/orange3,qusp/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,kwikadi/orange3,qPCR4vir/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,qusp/orange3,qPCR4vir/orange3,cheral/orange3,qusp/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,qPCR4vir/orange3,ch...
Orange/__init__.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom defaults import *\n\nDATABASES = {\n 'default': {\n #'ENGINE': 'django.db.backends.postgresql_psycopg2',\n# 'ENGINE': 'django.contrib.gis.db.backends.postgis',\n 'ENGINE': 'django.db.backends.sqlite3',\n ...
python
edit
2
0
mit
4107fe1240598f64335bf3203c717f4ef00f9e0f
denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase
settings/travis.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nbootstrap.helpers\n~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2016 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom byceps.services.orga.models import OrgaFlag\nfrom byceps...
python
edit
1
1
bsd-3-clause
73b1273de8f8e17adf51893bdbd24d2067866297
m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps
bootstrap/helpers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nCOMPANY_STANDARD_REPORT = \"NRGCompanyReportStandard\"\nCOMPANY_RATING_REPORT = \"NRGCompanyReportRating\"\n\nHIGH = 'AAA'\nGOOD = 'AA'\nWORTHY = 'A'\nBELOW_AVERAGE = 'B'\nBAD = 'C'\nMISSING = '-'\n\nRATING_CHOICES = (\n (HIGH, \"high\")...
python
edit
1
0
mit
ffa6417b30517569cadff00aec839d968f3c91d7
FundedByMe/django-bisnode
bisnode/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nimport re\nimport importlib\n\nimport importlib_metadata\n\n\nclass BasicTests(unittest.TestCase):\n version_pattern = r'\\d+\\.\\d+(\\.\\d)?'\n\n def test_retrieves_version_of_self(self):\n dist = importlib_me...
python
edit
1
1
apache-2.0
1441a4e96ee610cbb6c87a9e04491102a29c0032
python/importlib_metadata
importlib_metadata/tests/test_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom djet import assertions, restframework\nfrom rest_framework import status\nimport djoser.constants\nimport djoser.utils\nimport djoser.views\n\n\nclass RootViewTest(restframework.APIViewTestCase,\n assertions.StatusCod...
python
edit
1
2
mit
e0fa24595a60dd3c2ab5d1b64a76bae9ce3c05a8
akalipetis/djoser,sunscrapers/djoser,akalipetis/djoser,sunscrapers/djoser,sunscrapers/djoser
testproject/testapp/tests/test_root.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.core.management.base import BaseCommand\nfrom corehq.apps.domain.models import Domain\nimport csv\n\n\nclass Command(BaseCommand):\n help = 'Find domains with secure submissions and image questions'\n\n def handle(self, *a...
python
edit
1
7
bsd-3-clause
8f24d774227dca13500c0db0c10771d6b4ee7141
qedsoftware/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttar...
corehq/apps/domain/management/commands/find_secure_submission_image_domains.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom spenglr.education.models import *\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\n\nurlpatterns = patterns('',\n\n (r'^m/(?P...
python
edit
5
0
bsd-3-clause
194a84b4559449f0b0e3e9cc9e7026392822c0af
mfitzp/smrtr,mfitzp/smrtr
questions/urls.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO\nfrom neo.test.rawiotest.common_rawio_test import BaseTestRawIO\n\n\nclass TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase):\n rawioclass = Open...
python
edit
1
0
bsd-3-clause
dd75314f203b907f25a7b7e158c7e5d988a5b6ae
apdavison/python-neo,JuliaSprenger/python-neo,NeuralEnsemble/python-neo,INM-6/python-neo
neo/test/rawiotest/test_openephysbinaryrawio.py
rejected_duplicate
Near-duplicate of sample 16960
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport rust_ext\nimport numpy as np\n\na = np.array([1.0, 2.0])\nrust_ext.mult(3, a)\nprint(a)\n\n```\n\nApply this change: Use axpy on sample Python script" }, { "role": "assistant", "content": "#!/usr/bin/env python\n\nimpor...
python
edit
1
0
bsd-2-clause
6282aa2617bcc9bb8f293ea620eff23d2009334b
termoshtt/rust-numpy,termoshtt/rust-numpy
example/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSettings for DEMO_MODE.\n\nMust set DEMO_MODE = True in local_settings.py.\n\"\"\"\n\n# Views that are visible in demo mode.\nDEMO_SAFE_VIEWS = [\n 'main.views.home_view',\n 'main.views.project_list_view',\n 'main.views.pro...
python
edit
1
0
mit
533194b5b8e044bca2aaeccff4d550731922b3b8
woodymit/millstone,churchlab/millstone,churchlab/millstone,woodymit/millstone_accidental_source,woodymit/millstone,woodymit/millstone,woodymit/millstone,woodymit/millstone_accidental_source,churchlab/millstone,woodymit/millstone_accidental_source,churchlab/millstone,woodymit/millstone_accidental_source
genome_designer/conf/demo_settings.py
rejected_duplicate
Near-duplicate of sample 990
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models, connection\nfrom django.core.management.color import no_style\n\nfrom multi_schema.models import Schema\n\ndef post_syncdb_duplicator(sender, **kwargs):\n # See if any of the newly created models are schema-...
python
edit
2
13
bsd-3-clause
9d78b571fcd0575e02d4849a0938a51f15e07961
schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse
multi_schema/management/__init__.py
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\nfrom apps.polls import views\n\nurlpatterns = patterns('',\n\t# ex: /polls/\n\t\turl(r'^$', views.index, name='index'),\n\t# ex: /polls/5\n\t\turl(r'^(?P<poll_id>\\d+)/$', views.detail, name='de...
python
edit
1
0
bsd-3-clause
6de5612c0e92b4e7c7ca56b59d7fd5859aeb3409
hoale/teracy-tutorial,hoale/teracy-tutorial
apps/polls/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport shutil\n\nfrom wmt.utils.hook import find_simulation_input_file\n\n\ndef execute(env):\n \"\"\"Perform post-stage tasks for running a component.\n\n Parameters\n ----------\n env : dict\n A dict of compone...
python
edit
1
4
mit
55e0c877dbe1a073534c9cf445ffe58715160b8e
csdms/wmt-metadata
metadata/RomsLite/hooks/post-stage.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom django.core.urlresolvers import reverse\nfrom django.test import TestCase\nfrom rest_framework import status\nfrom rest_framework.test import APIClient\n\nfrom ..models import User\n\n\nclass TestUser(TestCase):\n\n ...
python
edit
1
1
mit
8849f78d8e9d63942162264d4223e9db277142d7
aligot-project/aligot,aligot-project/aligot,aligot-project/aligot,skitoo/aligot
aligot/tests/test_user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom flask_debugtoolbar import DebugToolbarExtension\n\nfrom app import app\nfrom app.models import connect_to_db\n\n\nif __name__ == '__main__':\n\n # debug = True as DebugToolbarExtension is invoked\n\n conn...
python
edit
4
0
bsd-3-clause
6d68d07f30f2244b13207c6eaf9d4662492b04e2
vanesa/kid-o,vanesa/kid-o,vanesa/kid-o,vanesa/kid-o
run.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass Cause(models.Model):\n title = models.CharField(max_length=64)\n description = models.TextField()\n creator = models.ForeignKey('auth.User', related_name='causes')\n target = models.Positi...
python
edit
1
1
mit
cf3596ee93eabf425c7d42c15fc07b11f7741158
vladimiroff/humble-media,vladimiroff/humble-media
humblemedia/causes/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) 2004 Specifix, Inc.\n# All rights reserved\n#\nimport os\nimport shutil\nimport util\n\nclass Make:\n\n def doBuild(self, dir):\n\tos.system(\"cd %s; make\" % dir)\n\nclass MakeInstall:\n\n def doInstall(self, dir, ...
python
edit
15
1
apache-2.0
238c6b73115f6493246f25d45268e7a675980397
sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary
build/build.py
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys, json\n\nfile = sys.argv[1]\nsubject = file.split('.')[0]\n\ndata = {\n \"subject\": subject, \n \"cards\": {}\n}\n\nfc = [line.split(':') for line in open(file, 'r').read().splitlines()]\njs = open...
python
edit
1
0
mit
9f8db061956fc73a197d9c5eb1b045a6e0655dc0
kradalby/flashcards,kradalby/flashcards
fc2json.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom modularodm import fields\n\nfrom framework.mongo import (\n ObjectId,\n StoredObject,\n utils as mongo_utils\n)\n\n\n@mongo_utils.unique_on(['id', '_id'])\nclass Subject(StoredObject):\n _id = fields.StringField(primary=Tru...
python
edit
1
1
apache-2.0
442136bb1d32baa1be50c3b88caed344e3979cd3
TomBaxter/osf.io,Johnetordoff/osf.io,samchrisinger/osf.io,sloria/osf.io,alexschiller/osf.io,emetsger/osf.io,laurenrevere/osf.io,cwisecarver/osf.io,adlius/osf.io,CenterForOpenScience/osf.io,chennan47/osf.io,rdhyee/osf.io,chennan47/osf.io,HalcyonChimera/osf.io,mluo613/osf.io,chrisseto/osf.io,hmoco/osf.io,felliott/osf.io,...
website/project/taxonomies/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom . import exceptions, low_level\nfrom ._legacy import (\n hash_password,\n hash_password_raw,\n verify_password,\n)\nfrom ._password...
python
edit
1
0
mit
abc1d8c52b9893f1695b2f81126b22820cddfc67
hynek/argon2_cffi,hynek/argon2_cffi
src/argon2/__init__.py
accepted
null
true