messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom django.contrib.admin.widgets import AdminTextInputWidget, AdminTextareaWidget\nfrom parler.admin import TranslatableAdmin\nfrom .models import Article\nfrom parler.forms import TranslatableModelForm, T...
python
edit
1
1
apache-2.0
326bebb58242981ec66f257525e5c5f58fae9196
django-parler/django-parler,jrief/django-parler,edoburu/django-parler,HiddenData/django-parler,skirsdeda/django-parler,edoburu/django-parler,zhangguiyu/django-parler,jrief/django-parler,django-parler/django-parler,imposeren/django-parler,defivelo/django-parler,imposeren/django-parler,zhangguiyu/django-parler,defivelo/d...
example/article/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.urls import path\n\nfrom core import views\n\n\napp_name = \"core\"\n\nurlpatterns = [\n path(\"home/\", views.home, name=\"home\"),\n path(\"about/\", views.about, name=\"about\"),\n]\n\n```\n\nApply this change: Fix rout...
python
edit
1
0
mit
d5e3d6c3ca285f1037f284cfb78e279c2d1032ec
rennerocha/dojopuzzles
dojopuzzles/core/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rml.machines\n\n\ndef test_machine_load_elements():\n lattice = rml.machines.get_elements(machine='SRI21', elemType='BPM')\n assert len(lattice) == 173\n\n```\n\nApply this change: Test to get different pv names for an element"...
python
edit
1
2
apache-2.0
abefbbc99e7e62bed31db549519807feee7254f9
razvanvasile/RML,willrogers/pml,willrogers/pml
tests/test_machine.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport sys\nfrom io import StringIO\n\nfrom pg_bawler import gen_sql\n\n\ndef test_simple_main(monkeypatch):\n stdout = StringIO()\n monkeypatch.setattr(sys, 'stdout', stdout)\n\n class Args:\n tablena...
python
edit
1
1
bsd-3-clause
d879afb2ae12f4d217632fbe253f87c3db1673a7
beezz/pg_bawler,beezz/pg_bawler
tests/test_gen_sql.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nimport django\nfrom django.conf import settings\n\n\nif not settings.configured:\n settings_dict = dict(\n INSTALLED_APPS=[\n 'django.contrib.contenttypes',\n 'django.contrib.auth',\n ...
python
edit
1
0
mit
aae16acb38649d2af6d80453b82b2e460e36efdd
federicobond/django-form-utils-bootstrap3
form_utils_bootstrap3/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom PIL import Image\nfrom pystray import Icon, Menu, MenuItem\nimport webview\n\nimport sys\nif sys.platform == 'darwin':\n # System tray icon needs to run in it's own process on Mac OS X\n from multiprocessing import Process as Thr...
python
edit
3
1
bsd-3-clause
1f8845f89aa936379fbea4d8707fbb4887c62696
r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview,r0x0r/pywebview
examples/pystray_icon.py
rejected_duplicate
Near-duplicate of sample 19546
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass AirtimeApplication(models.Model):\n name = models.CharField(max_length=50)\n ratio = models.IntegerField(null=True, blank=True)\n max_per_day = models.IntegerField(null=True, blank=True)\n ...
python
edit
1
1
mit
1c54e4233db3231bfd20bd6591c2747ed8b7868d
westerncapelabs/django-grs-gatewaycms
gopher/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import forms\n\nfrom registration.models import RegistrationProfile\nfrom registration.forms import RegistrationForm\n\nfrom pykeg.core.models import UserProfile\n\nclass KegbotRegistrationForm(RegistrationForm):\n gender = for...
python
edit
1
1
mit
df4bd8201c7c3651fe045b69b1ef8772829b811d
Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server
kegweb/kegweb/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom ..bill import Bill\nfrom validictory import ValidationError\n\n\ndef toy_bill():\n b = Bill(bill_id=\"HB 2017\",\n session=\"2012A\",\n title=\"A bill for an act to raise the cookie budget by 200%\",\n ...
python
edit
1
2
bsd-3-clause
7e22cba69ddfcc523f4945c36470983b436faf3c
AGarrow/larvae
larvae/tests/test_bill.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport csv\nfrom django.http import HttpResponse\nfrom servicerating.models import Response\n\ndef report_responses(request):\n\n qs = Response.objects.raw(\"SELECT servicerating_response.*, servicerating_extra.value AS clinic_code from ...
python
edit
1
2
bsd-3-clause
ad70a7ec6543d64ec185eb2d52ccfa291a1dfad6
praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control,praekelt/ndoh-control
servicerating/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nminver = (3,3,0)\n\nif sys.version_info[0:3] < minver:\n raise ImportError(\"transmute requires Python version {} or newer.\".format('.'.join(('{}'.format(v) for v in minver))))\n\n##\n# @brief The application version number...
python
edit
1
0
mit
b8a90774ff48a94abd6671245ff3b3f0fbf95507
Rakankou/transmute
transmute/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom django.core.management.base import BaseCommand\nfrom django.db.models import get_model\n\nProduct = get_model('catalogue', 'Product')\nProductReview = get_model('reviews', 'ProductReview')\n\n\nclass Command(...
python
edit
1
2
bsd-3-clause
334e794be7514c032e6db4c39761d67820c405ff
kapt/django-oscar,pasqualguerrero/django-oscar,jmt4/django-oscar,lijoantony/django-oscar,ahmetdaglarbas/e-commerce,dongguangming/django-oscar,nickpack/django-oscar,WillisXChen/django-oscar,jmt4/django-oscar,manevant/django-oscar,jinnykoo/wuyisj,eddiep1101/django-oscar,pdonadeo/django-oscar,taedori81/django-oscar,mexeni...
oscar/management/commands/oscar_update_product_ratings.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# coding: utf-8\nimport os.path\nimport platform\n\nimport wx\n\n\ndef create_menu_item(menu, label, func=None):\n menu_item = wx.MenuItem(menu, -1, label)\n if callable(func):\n menu.Bind(wx.EVT_MENU, func, id=menu_item.GetId(...
python
edit
3
2
mit
e9784ddaeea80311587ed7b255869d791008b29e
JokerQyou/Modder2
modder/gui/trayicon.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom sf.lib.orderedattrdict import OrderedAttrDict\n\n\nclass Controller(object):\n\n def __init__(self, module, name):\n self.module = module\n self.name = name\n\n @property\n def ctl(self):\n return self.mod...
python
edit
1
4
mit
6439182a1ed9efd6dd08aefce8cca44221bb9cef
metrasynth/solar-flares
sf/mmck/controllers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n#\nimport logging\nimport pytest\nfrom copy import copy\nfrom tests.common.test_vector import *\nfrom tests.common.impala_test_suite import *\n\nclass TestStri...
python
edit
9
2
apache-2.0
32d5f2bfcaad65230632f1854fabd2e9de1c151b
ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC
tests/query_test/test_chars.py
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, url\n\n\nurlpatterns = patterns('members.views',\n url(r'^login/$', 'login', name='login'),\n url(r'^search/(?P<name>.*)/$', 'search', name='search'),\n)\n\n```\n\nApply this change: Add url lead...
python
edit
1
0
mit
c1429d70319b6f39412f1f34297f706b20d78b80
Hackfmi/Diaphanum,Hackfmi/Diaphanum
members/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport yaml\nfrom zonetruck.WorkManager import WorkManager\nfrom zonetruck.ZoneUpdater import ZoneUpdater\nfrom zonetruck.ZoneFilter import ZoneFilter\nfrom zonetruck.zone_xfer import zone_xfer\n\ndef main(argv):\n config = yaml.safe_loa...
python
edit
1
5
mit
d1aa094c9b0988c12100c8300aae4b390bb276f8
pv2b/zonetruck
zonetruck/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nimport unittest\nimport doctest\nimport os\n\nimport lupa\n\n\ndef suite():\n test_dir = os.path.abspath(os.path.dirname(__file__))\n\n tests = []\n for filename in os.listdir(test_dir):\n ...
python
edit
1
5
mit
6ac868c83dc3d6ad0733e5155c97c23414b06b06
pombredanne/lupa,pombredanne/lupa
lupa/tests/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom django.db import models\n\nfrom website.util import api_v2_url\n\nfrom osf.models.base import BaseModel, ObjectIDMixin\n\n\nclass Subject(ObjectIDMixin, BaseModel):\n \"\"\"A subject discipline that may be a...
python
edit
1
2
apache-2.0
5fc72fab36b3c29ccadc64aac3ffcb8d6bf56c48
Johnetordoff/osf.io,mluo613/osf.io,acshi/osf.io,hmoco/osf.io,alexschiller/osf.io,adlius/osf.io,leb2dg/osf.io,adlius/osf.io,mfraezz/osf.io,monikagrabowska/osf.io,cwisecarver/osf.io,mluo613/osf.io,HalcyonChimera/osf.io,Johnetordoff/osf.io,caneruguz/osf.io,baylee-d/osf.io,saradbowman/osf.io,aaxelb/osf.io,brianjgeiger/osf....
osf/models/subject.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport logging\n\nENV = 'development'\nAPP_DEBUG = False # Avoid using this in debug mode \n\n# CORS configuration\nCORS_HEADERS = 'Content-Type'\nCORS_ORIGINS = '*'\n\nKEYSPACE = \"annotator_supreme3\"\n\n#Logging\nLOG_LEVEL = logging.INFO...
python
edit
1
0
mit
2f0cf83b4f2bcff1f6c7f8caa118f98153ae0c0f
meerkat-cv/annotator-supreme,meerkat-cv/annotator-supreme,meerkat-cv/annotator-supreme,meerkat-cv/annotator-supreme,meerkat-cv/annotator-supreme
annotator_supreme/config/development.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nINSTALLED_APPS += (\n 'simplemenu',\n 'webmanager',\n 'bootstrapform',\n 'userenabootstrap',\n 'userena',\n # 'social_auth',\n 'provider.oauth2',\n)\n\nTEMPLATE_CONTEXT_PROCESSORS += (\n 'django.contrib.auth.context_...
python
edit
4
0
bsd-3-clause
8235a217b50520093d549115fe09a8d4ff5e9191
weijia/webmanager,weijia/webmanager,weijia/webmanager
webmanager/default_settings.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport hmac\nimport hashlib\n\nfrom .error import AuthenticatorInvalidSignature\n\n\nclass Authenticator(object):\n \"\"\" This object is used to authenticate messages \"\"\"\n\n def __init__(self, secret, digestmod=None):\n as...
python
edit
1
2
mit
8a1002dd7afd008ff85699f95ae11884b96f60ac
walkr/nanoservice
nanoservice/crypto.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport biosensorsdb.models\nfrom django.contrib import admin\n\nclass ProjectAdmin(admin.ModelAdmin):\n search_fields = ['team__name', 'year', 'title', 'abstract', 'inputs__name', 'outputs__name', 'tags__name']\n\nadmin.site.register(biose...
python
edit
1
0
mit
fa4cf8c6c7a89a60c0067be53c6b0f29d3d3cde3
jwintersinger/igembiosensors,jwintersinger/igembiosensors
biosensorsdb/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nimport django.test\n\nfrom .user import UserMixin\n\n\nclass Client(django.test.Client):\n\n def patch_json(self, path, data=None, **kwargs):\n return self.patch(path, **self._json_kwargs(data, kwargs))\n\n def p...
python
edit
2
2
mit
deef2f98deeeaf51bd9ddda4c5a200d082e16522
wylee/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,PSU-OIT-ARC/django-arcutils
arcutils/test/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .base import *\n\nDEBUG = False\nTEMPLATE_DEBUG = False\n\nINSTALLED_APPS += (\n 'model_mommy',\n)\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n 'NAME': 'choropleth',\n }\n}\n\n```\n...
python
edit
3
0
bsd-3-clause
fd1b25ee02e878a76d12a5e3b679b0e5a11e7509
damonkelley/texas-choropleth,unt-libraries/texas-choropleth,unt-libraries/texas-choropleth,damonkelley/texas-choropleth,unt-libraries/texas-choropleth,unt-libraries/texas-choropleth,damonkelley/texas-choropleth,damonkelley/texas-choropleth
src/choropleth/settings/test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom kokki import *\n\nPackage(\"munin\")\n\nFile(\"/etc/munin/munin.conf\",\n owner = \"root\",\n group = \"root\",\n mode = 0644,\n content = Template(\"munin/munin.conf.j2\"))\n\n```\n\nApply this change: Make sure the muni...
python
edit
4
0
bsd-3-clause
d6a205e7c97c3355fbf0678c5a439d14d834bb45
samuel/kokki
kokki/cookbooks/munin/recipes/master.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.db import transaction\n# from django.views.generic import TemplateView\n\nfrom tot.utils import get_current_people\n\nfrom registration.forms import RegistrationFormUniqueEmail\nfrom registra...
python
edit
6
6
mit
a016b2a4158a3412d3db14d9180994b7c49041ab
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
preferences/views.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Exception classes for Bottery\"\"\"\n\n\nclass ImproperlyConfigured(Exception):\n \"\"\"Bottery is somehow improperly configured\"\"\"\n pass\n\n```\n\nApply this change: Add BotteryException base class from which ImproperlyConf...
python
edit
1
0
mit
5864ee86593a71aac1cca17bc351dcbcfebf5337
rougeth/bottery
bottery/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass open(object):\n \"\"\"Wrapper providing key part of Python 3 open() interface.\n\n From IPython's py3compat.py module. License: BSD.\n \"\"\"\n def __init__(self, fname, mode=\"r\", encoding=\"utf-8\"):\n self.f = o...
python
edit
1
1
mit
e4c79021e21c050e7dcd769f80e2457d97e67506
michaelpacer/python-future,PythonCharmers/python-future,krischer/python-future,PythonCharmers/python-future,krischer/python-future,QuLogic/python-future,QuLogic/python-future,michaelpacer/python-future
future/builtins/backports/newopen.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\n\nfrom Orange.data import Table\nfrom Orange.preprocess import ProjectCUR\n\n\nclass TestCURProjector(unittest.TestCase):\n def test_project_cur_default(self):\n data = Table(\"ionosphere\")\n projector = P...
python
edit
1
2
bsd-2-clause
3fbb7fd06dc0d459c8780abe82683ceb6f65ba6d
cheral/orange3,cheral/orange3,cheral/orange3,qPCR4vir/orange3,cheral/orange3,cheral/orange3,cheral/orange3,qPCR4vir/orange3,qPCR4vir/orange3,qPCR4vir/orange3,qPCR4vir/orange3,qPCR4vir/orange3
Orange/tests/test_preprocess_cur.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom m5 import *\n\nimport os.path\nimport sys\n\n# Edit the following list to include the possible paths to the binary\n# and disk image directories. The first directory on the list that\n# exists will be selected.\nSYSTEMDIR_PATH = ['/n/...
python
edit
2
8
bsd-3-clause
d47da024519f3e6d61ac05c8379c617a3e334706
LingxiaoJIA/gem5,LingxiaoJIA/gem5,haowu4682/gem5,andrewfu0325/gem5-aladdin,haowu4682/gem5,andrewfu0325/gem5-aladdin,haowu4682/gem5,LingxiaoJIA/gem5,andrewfu0325/gem5-aladdin,LingxiaoJIA/gem5,andrewfu0325/gem5-aladdin,LingxiaoJIA/gem5,andrewfu0325/gem5-aladdin,haowu4682/gem5,haowu4682/gem5,andrewfu0325/gem5-aladdin,Ling...
configs/test/SysPaths.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.core.mail import send_mail\nfrom django.core.urlresolvers import reverse\n\n\ndef send_validation(strategy, code):\n url = reverse('social:complete', args=(strategy.backend_name,)) + \\\n ...
python
edit
1
1
bsd-3-clause
4cfb03f7d36822d658b2066d0b1c51d78f213458
mrwags/python-social-auth,ononeor12/python-social-auth,mark-adams/python-social-auth,python-social-auth/social-docs,tutumcloud/python-social-auth,SeanHayes/python-social-auth,joelstanner/python-social-auth,ariestiyansyah/python-social-auth,DhiaEddineSaidi/python-social-auth,cjltsod/python-social-auth,ByteInternet/pytho...
examples/django_example/example/app/mail.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom urllib.request import Request, urlopen\nimport json\n\nreq = Request('http://jsonplaceholder.typicode.com/users')\nresponse = urlopen(req)\nresponse_string = response.read().decode(\"utf-8\")\n\njson_object = json.loads(response_string...
python
edit
1
0
apache-2.0
653cc71521636e7324b057a30506b3196b47461b
CiscoDevNet/coding-skills-sample-code,CiscoDevNet/coding-skills-sample-code,CiscoDevNet/coding-skills-sample-code,CiscoDevNet/coding-skills-sample-code
coding202-parsing-json/activity-parse-1.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPython 2 / 3 compatibility helpers.\n\"\"\"\nimport sys\n\npy_ver = sys.version_info\nPY2 = False\nPY3 = False\nif py_ver[0] == 2:\n PY2 = True\nelse: # just in case PY4\n PY3 = True\n\n\nif PY2:\n range = xrange\nelse:\n ...
python
edit
2
0
mit
198f070f15a234aee75a89a8fbc6ed1c712a9d6b
iminuit/probfit,iminuit/probfit
probfit/py23_compat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport uuid\n\nfrom infosystem.common import authorization\nfrom infosystem import database\nfrom flask import Flask\nfrom infosystem import system as system_module\n\nfrom orcomm import init_data\n\n\napp = Flask(__name__)\napp....
python
edit
3
1
mit
9fe589bce3ace182803aff4b42ddf50cfcce4eb2
fdoliveira/infosystem-seed
app/application.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# vim: sw=4 ts=4 sts expandtab smarttab\n# HXN step-scan configuration\n\nimport hxntools.scans\nfrom bluesky.global_state import get_gs\n\ngs = get_gs()\n\nhxntools.scans.setup()\nct = hxntools.scans.count\nascan = hxntools.scans.absolute_...
python
edit
11
0
bsd-2-clause
daa686e350e6cbdc3bdb51a869e37f0a72df45dd
NSLS-II-HXN/ipython_ophyd,NSLS-II-HXN/ipython_ophyd
profile_collection/startup/50-scans.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nSetup file for clowder test runner\n\"\"\"\n\nfrom setuptools import setup\n\n# Written according to the docs at\n# https://packaging.python.org/en/latest/distributing.html\n\nsetup(\n name='clowder-test',\n description='Test ...
python
edit
1
0
mit
041efae3a2219b0c28a38ef248647f63d1f82517
JrGoodle/clowder,JrGoodle/clowder,JrGoodle/clowder
clowder_test/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\n\nfrom crits.config.config import CRITsConfig\n\ndef modify_configuration(forms, analyst):\n \"\"\"\n Modify the configuration with the submitted changes.\n\n :param config_form: The form data.\n ...
python
edit
6
7
mit
ae7bda13946c2fff5760cdefc3c06cd932dcd070
cfossace/crits,jhuapl-marti/marti,jhuapl-marti/marti,Magicked/crits,jinverar/crits,cdorer/crits,davidhdz/crits,DukeOfHazard/crits,blaquee/crits,DukeOfHazard/crits,Magicked/crits,jinverar/crits,seanthegeek/crits,Lambdanaut/crits,davidhdz/crits,dreardon/crits,kaoscoach/crits,cdorer/crits,davidhdz/crits,ckane/crits,ckane/...
crits/config/handlers.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\ndef loadCudaStream(name):\n \"\"\"\n reads the file specified by name into a numpy array (and removes\n the superfluous fourth bit from...
python
edit
3
1
mit
219589c8498e2d0bd156bd9863d4ef23f4963111
TAdeJong/plasma-analysis,TAdeJong/plasma-analysis
code/dataplot.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# The main message class that the AuthChannel operate on\nclass AuthenticatedMessage(object):\n\n def __init__(self, sender, msg, session=None):\n self.sender = sender\n self.msg = msg\n self.session = session\n\n ...
python
edit
7
1
mit
6f8b370222b6f842b3ea89bb854b4883d145dfe0
thusoy/nuts-auth,thusoy/nuts-auth
nuts/__init__.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (c) 2017, Michael Boyle\n# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>\n\nfrom __future__ import division, print_function, absolute_import\n\n## Allow the code to function without numb...
python
edit
2
1
mit
c1dbb7ef6b9176b4ec09da5446a082fd88abc37a
moble/quaternion,moble/quaternion
numba_wrapper.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nclass ConfigItem(object):\n \"\"\"The configuration item which may be bound with a instance.\n\n :param name: the property name.\n :param namespace: optional. the name of the attribute which contains all\n conf...
python
edit
1
4
bsd-3-clause
687692cd85db180ae962ec63c4bd4fbc73e33f57
lepture/flask-storage,menghan/flask-storage,fengluo/flask-storage,LiuDeng/flask-storage
flask_storage/_utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright 2015 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\nimport sys\n\nimport config_util # pylint: disable=import-error\n\n\n# T...
python
edit
1
4
bsd-3-clause
26460d817573bb860a542f26b96bc02b0e2082d8
CoherentLabs/depot_tools,CoherentLabs/depot_tools
fetch_configs/pdfium.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nfrom threading import Thread\n\nfrom werkzeug._reloader import ReloaderLoop\n\n\nclass Watcher(Thread, ReloaderLoop):\n\n def __init__(self, paths, static, tasks, interval=1, *args, **kwargs):\n self.paths = paths\n ...
python
edit
1
7
mit
e5511585341ef9de72dfa2a43db207af42f786ac
rolurq/flask-gulp
flask_static/watcher.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\n\nfrom sentry.api.serializers import Serializer, register\nfrom sentry.models import User\nfrom sentry.utils.avatar import get_gravatar_url\n\n\n@register(User)\nclass UserSerializer(Serializer):\n ...
python
edit
1
1
bsd-3-clause
63a1a37f597d6b0313136caf011d2d4f50c17329
zenefits/sentry,jean/sentry,mvaled/sentry,imankulov/sentry,mitsuhiko/sentry,JackDanger/sentry,beeftornado/sentry,wong2/sentry,BuildingLink/sentry,JamesMura/sentry,ngonzalvez/sentry,JamesMura/sentry,zenefits/sentry,Kryz/sentry,mvaled/sentry,korealerts1/sentry,gencer/sentry,Kryz/sentry,looker/sentry,jean/sentry,mvaled/se...
src/sentry/api/serializers/models/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"A module to prove a way of locating and loading test resource files.\n\nThis is akin to the `iati.resources` module, but deals with test data.\n\n\"\"\"\nimport iati.resources\n\ndef load_as_dataset(file_path):\n \"\"\"Load a speci...
python
edit
1
1
mit
a070624ab59f700b86b008f7f81cd03b9622c5b3
IATI/iati.core,IATI/iati.core
iati/tests/resources.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#! /usr/bin/env python\n# Licensed to Cloudera, Inc. under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. Cloudera, Inc. licens...
python
edit
1
0
apache-2.0
eeb12c76698eedecbeb54585deffca605bd7096b
cloudera/cm_api,cdapio/cm_api,cdapio/cm_api,justinhayes/cm_api,cdapio/cm_api,justinhayes/cm_api,cloudera/cm_api,cloudera/cm_api,justinhayes/cm_api,cdapio/cm_api
python/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nAuthor: Ashish Gaikwad <<EMAIL>>\nCopyright (c) 2015 Ashish Gaikwad\n\nDescription: This script will post a message on your slack channel\nPlease configure your `/etc/brainy-beats.cfg` file first.\n\nExample brainy-beats.cfg\n\n[sla...
python
edit
1
1
mit
7d54decec5f005ee7bcd8b16d75225a60f7cbdfe
ashgkwd/brainy-beats,ashgkwd/brainy-beats
post-to-slack.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .. import LogFileOutput, mapper\n\n\nclass DmesgLineList(LogFileOutput):\n def has_startswith(self, prefix):\n \"\"\"\n Returns a boolean array which is `True` where there is one line in\n dmesg starts with `pre...
python
edit
1
2
apache-2.0
8cb685ac92cd2fcc628ad96feaed67fc1af48ed6
RedHatInsights/insights-core,RedHatInsights/insights-core
falafel/mappers/dmesg.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis package implements community detection.\n\nPackage name is community but refer to python-louvain on pypi\n\"\"\"\n\nfrom .community_louvain import (\n partition_at_level,\n modu...
python
edit
8
0
bsd-3-clause
cb161eb1cc66c520a81026798112fb13d0cd0e50
taynaud/python-louvain
community/__init__.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n\ndef safe_input(prompt):\n \"\"\"Return user input after catching KeyboardInterrupt and EOFError\"\"\"\n try:\n reply = r...
python
edit
2
7
mit
b03dff0d6964d886f122936d097c3d4acc0582db
constanthatz/data-structures
proper_parens.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport numpy as np\n\n\ndef _check_stc(stc1, stc2):\n # XXX What should we check? that the data is having the same size?\n if stc1.data.shape != stc2.data.shape:\n raise ValueError('Data in stcs must have the same size')\n ...
python
edit
7
3
bsd-3-clause
ff084f6fa7b61cef1550477265a65fa25b440b86
Teekuningas/mne-python,kingjr/mne-python,teonlamont/mne-python,alexandrebarachant/mne-python,jniediek/mne-python,rkmaddox/mne-python,olafhauk/mne-python,leggitta/mne-python,kingjr/mne-python,Teekuningas/mne-python,jaeilepp/mne-python,Eric89GXL/mne-python,nicproulx/mne-python,adykstra/mne-python,pravsripad/mne-python,la...
mne/simulation/simulation_metrics.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom threading import Timer\nfrom . import track\n\n_listeners = []\n\nclass TrackChecker():\n\tdef __init__(self, interval = 5):\n\t\tself.listeners = []\n\t\tself.CHECK_INTERVAL = interval\n\t\tself._generator = self._checkSongGenerator()...
python
edit
1
5
mit
0a5e272a1828be1eb93975e3b673ba67ca800635
ollien/playserver,ollien/playserver,ollien/playserver
playserver/trackchecker.py
rejected_duplicate
Near-duplicate of sample 1860
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\n\nprint(\"Example Pi Box path: /home/username/my-pi-box\")\npi_box_directory = raw_input(\"Pi Box path: \")\n\nif not os.path.isdir(pi_box_directory):\n\tos.makedirs(pi_box_directory)\n\nwith open('./install/pi-box-conf-templat...
python
edit
2
0
mit
79b145f9c73deb9116b4d51e29952b63e4d63cc8
projectweekend/Pi-Box,projectweekend/Pi-Box
install/setup_pi_box.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport zlib\nimport bz2\n\nassert(zlib.decompress(zlib.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')\nassert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')\n\n\n```...
python
edit
3
0
apache-2.0
135b7baaf8f4378488af2b1e0fb4abf63522f0ab
thresheek/official-images,davidl-zend/official-images,nodejs-docker-bot/official-images,infosiftr/stackbrew,infosiftr/stackbrew,pesho/docker-official-images,dinogun/official-images,mattrobenolt/official-images,thresheek/official-images,jperrin/official-images,dinogun/official-images,thresheek/official-images,neo-techno...
test/tests/python-imports/container.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom peptide import PeptideBuilder\nimport Bio.PDB\n\n\ndef write_pdb(aa_sequence, fragment_angles, gap_length, filepath):\n \"\"\"\n Generate pdb file with results\n\n :param aa_sequence: Amino acid sequence\n :param fragment_a...
python
edit
1
1
mit
edc830bcd8fb594406e314b5c93062b0ec347bba
mchelem/cref2,mchelem/cref2,mchelem/cref2
cref/structure/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport logging\n\nimport praw\n\nfrom settings import Config\nfrom .database import create_db_session\n\n\nlogging.basicConfig(level=\"INFO\")\nlogger = logging.getLogger(__name__)\n\n# Project configuration setting...
python
edit
2
0
mit
65d6a7ef78b013b261a9a1ad0cfe4756d5cfd675
PsyBorgs/redditanalyser,PsyBorgs/redditanalyser
redditanalyser/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Compatibility helpers for Py2 and Py3.\"\"\"\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport sys\n\n\nclass VERSION(obj...
python
edit
1
0
apache-2.0
e4297691f20ec4185ed4491ab41553df14a05a91
kevinconway/pycc,kevinconway/pycc
pycc/pycompat.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom collections import namedtuple\n\nNetwork = namedtuple('Network', [\n 'network_name',\n 'network_shortname',\n 'pubkeyhash',\n 'wif_prefix',\n 'scripthash',\n 'magicbytes'\n])\n\nnetworks = (\n # Peercoin mainnet\n ...
python
edit
null
null
bsd-3-clause
5ffdb8b395576ffaff4dd948361b6baeffa1072c
PeerAssets/pypeerassets,backpacker69/pypeerassets
pypeerassets/networks.py
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCMS-related tasks.\nhttps://home.cern/about/experiments/cms\n\"\"\"\n\n\n__all__ = [\"BundleCMSSW\"]\n\n\nimport os\n\nimport luigi\n\n\nfrom law import Task, LocalFileTarget, NO_STR\nfrom law.decorator im...
python
edit
1
3
bsd-3-clause
f498eba42dd3d35e9ff0b5240f44fe8df25332ed
riga/law,riga/law
law/contrib/cms/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nimport os\nimport logging\nimport datetime\n\nfrom website import settings\n\n\ndef format_now():\n return datetime.datetime.now().isoformat()\n\n\ndef add_file_logger(logger, script_name, suffix=None):\n _,...
python
edit
1
2
apache-2.0
6741f6746fe24c91b791ed35048e750d9c52d5ce
caneruguz/osf.io,kch8qx/osf.io,cwisecarver/osf.io,rdhyee/osf.io,crcresearch/osf.io,abought/osf.io,TomBaxter/osf.io,kwierman/osf.io,mluke93/osf.io,alexschiller/osf.io,laurenrevere/osf.io,DanielSBrown/osf.io,mluo613/osf.io,alexschiller/osf.io,crcresearch/osf.io,Nesiehr/osf.io,cslzchen/osf.io,leb2dg/osf.io,caseyrollins/os...
scripts/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport unittest\nimport monitor\n\nclass TestMonitor(unittest.TestCase):\n\n\tdef test_attr(self):\n\t\tmon = monitor.Monitor()\n\t\tassert mon.pvprefix == \"MON-CONTROL:\"\n\t\tassert mon.monitorname == \"PI1\"\n\n\tde...
python
edit
1
2
apache-2.0
ff02f0e8a7b62d5afdc88730129a5e0811fb5a82
nickbattam/picamon,nickbattam/picamon,nickbattam/picamon,nickbattam/picamon
monitor/monitor_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/python3\n\ndef make_a_file(i):\n f = \"out_python/{:05d}\".format(i)\n try:\n with open(f, \"w\") as fp:\n fp.write(\"hello\")\n # print(\"wrote\", f)\n except:\n print(\"failed on\", f)\n...
python
edit
1
2
mit
3f5bd92a11ed69592e21888838088f8baa0d6575
reedwade/python-golang-linking,reedwade/python-golang-linking
makefiles_plain_python.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom rest_framework import viewsets, serializers\nfrom .models import MemberType, Member, MembershipApplicationTag, MembershipApplication\n\nclass MemberTypeSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model...
python
edit
1
0
mit
2f77a49d4a8393b1de14aac29b41204e8006876e
jautero/asylum,HelsinkiHacklab/asylum,rambo/asylum,ojousima/asylum,rambo/asylum,hacklab-fi/asylum,rambo/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,ojousima/asylum,HelsinkiHacklab/asylum,hacklab-fi/asylum,jautero/asylum,HelsinkiHacklab/asylum,jautero/asylum,hacklab-fi/asylum,ojousima/asylum,ojousima/asylum,rambo/as...
project/members/rest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nshopping_list = []\n\ndef show_help():\n print(\"What should we pick up at the store?\")\n print(\"Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.\")\n\ndef add_to_list(item):\n shopping_list.append(ite...
python
edit
1
2
mit
462acba741c929ae79d5c2e6f6fc98307f556ec9
adityatrivedi/shopping-list
shopping_list.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nUINT64_MAX = 2 ** 64 - 1\nUINT64_MIN = 0\n\nINT64_MAX = 2 ** 63 - 1\nINT64_MIN = -(2 ** 63)\n\nUINT256_MAX = 2 ** 256 - 1\n\n# Deployed to Ropsten revival on 2017-08-18 from commit 01554102f0a52fc5aec3f41dc46d5301...
python
edit
1
0
mit
ef6b10e2a01c42fa12d067eae86429dab756f534
hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden,tomashaber/raiden,hackaugusto/raiden,tomashaber/raiden,tomashaber/raiden
raiden/constants.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nTests of neo.rawio.examplerawio\n\nNote for dev:\nif you write a new RawIO class your need to put some file\nto be tested at g-node portal, Ask neuralensemble list for that.\nThe file need to be small.\n\nThen you have to copy/paste...
python
edit
1
0
bsd-3-clause
fc9970e97575af85384fedc58cdc1ff9800628cc
samuelgarcia/python-neo,apdavison/python-neo,JuliaSprenger/python-neo,INM-6/python-neo,NeuralEnsemble/python-neo
neo/test/rawiotest/test_alphaomegarawio.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.test import TestCase\n\nfrom rest_framework.test import APIClient\n\nfrom movies.test import factories\n\n\nclass MovieViewSetTestCase(TestCase):\n def setUp(self):\n self.api = APIClient()\n self.movies = facto...
python
edit
1
1
mit
f4a2068703ea0e32c4e62c3451d2c6bce0922b1c
kinoreel/kinoreel-backend,kinoreel/kinoreel-backend
movies/test/test_views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nWrapper around antske/coref_draft.\nInput should be NAF files parsed by alpino (e.g. alpinonerc)\n\"\"\"\n\nfrom KafNafParserPy import KafNafParser\nfrom multisieve_coreference import process_coreference\nfrom io import BytesIO\nimp...
python
edit
1
4
mit
a9330038b2dc56e34ccc5ecdfb297adfc50ec005
vanatteveldt/nlpipe,vanatteveldt/nlpipe,vanatteveldt/nlpipe
nlpipe/modules/corefnl.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom celery import task\nimport os\nimport sys\nimport subprocess\n\n@task()\ndef build(build, giturl, branch):\n # Use subprocess to execute a build, update the db with results\n local = os.path.dirname(sys.argv[0])\n buildpack = ...
python
edit
2
4
mit
b1e2b05a3e77b869cf9d0de820134237ce5de5ba
praekelt/sideloader,praekelt/sideloader,praekelt/sideloader,praekelt/sideloader
sideloader/tasks.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom django.template.loader import render_to_string\nfrom django.utils.text import capfirst\n\nfrom django_modelview import generic\n\nregister = template.Library()\n\n\n@register.simple_tag\ndef ordering_link(r...
python
edit
3
11
bsd-3-clause
73b684af1941ea116d8b4b37ef463cd3c9da0493
matthiask/towel,matthiask/towel,matthiask/towel,matthiask/towel
django_modelviews/templatetags/modelview_tags.py
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom girder.api import access\nfrom girder.api.rest import Resource\nfrom girder.api.describe import Description\n\n\nclass Validator(Resource):\n def __init__(self, celeryApp):\n self.resourceName = 'romanesco_validator'\n ...
python
edit
1
1
apache-2.0
495ea3347eec9d1a902779de8dd07ba91aa48f60
Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco
server/validator.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, g\nfrom .main.views import main\nfrom .nojs.views import nojs\nfrom sqlalchemy import create_engine\nfrom smoke_signal.database.models import Base\nfrom sqlalchemy.orm import sessionmaker\n\napp = Flask(__name__, in...
python
edit
1
2
mit
0b28fe44514969470db926c6f38615a8a5478bf6
flacerdk/smoke-signal,flacerdk/smoke-signal,flacerdk/smoke-signal
smoke_signal/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nsys.path.insert(1, \"../../../\")\nimport h2o\n\ndef bigcatRF(ip,port):\n # Connect to h2o\n h2o.init(ip,port)\n\n # Training set has 100 categories from cat001 to cat100\n # Categories cat001, cat003, ... are perfec...
python
edit
1
1
apache-2.0
65cd0c8865761af434756b313c7e29b1904e647c
spennihana/h2o-3,h2oai/h2o-3,PawarPawan/h2o-v3,mathemage/h2o-3,datachand/h2o-3,mrgloom/h2o-3,printedheart/h2o-3,weaver-viii/h2o-3,weaver-viii/h2o-3,bospetersen/h2o-3,mathemage/h2o-3,h2oai/h2o-3,pchmieli/h2o-3,mathemage/h2o-3,datachand/h2o-3,YzPaul3/h2o-3,ChristosChristofidis/h2o-3,mathemage/h2o-3,mrgloom/h2o-3,madmax98...
h2o-py/tests/testdir_algos/rf/pyunit_bigcatRF.py
rejected_duplicate
Near-duplicate of sample 4626
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport warnings\nimport functools\n\n\n__all__ = ['deprecated']\n\n\nclass deprecated(object):\n '''Decorator to mark deprecated functions with warning.\n\n Adapted from <http://wiki.python.org/moin/PythonDecoratorLibrary>.\n\n Par...
python
edit
1
3
bsd-3-clause
0cb0fee339883adeb93f787b5cc19e5293463c06
michaelpacer/scikit-image,Midafi/scikit-image,jwiggins/scikit-image,Midafi/scikit-image,michaelaye/scikit-image,Hiyorimi/scikit-image,paalge/scikit-image,SamHames/scikit-image,GaZ3ll3/scikit-image,juliusbierk/scikit-image,WarrenWeckesser/scikits-image,ajaybhat/scikit-image,oew1v07/scikit-image,rjeli/scikit-image,Britef...
skimage/_shared/utils.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport signal\nfrom nose.tools import *\nfrom holland.lib.lvm.util import *\n\ndef test_format_bytes():\n assert_equals(format_bytes(1024), '1.00KB')\n assert_equals(format_bytes(0), '0.00Bytes')\n\ndef test_getmount():\n ...
python
edit
30
1
bsd-3-clause
8f0956313b140d7a0d51510cd9b4a5eec7d54570
m00dawg/holland,m00dawg/holland
plugins/holland.lib.lvm/tests/test_util.py
rejected_lint
Too many lint violations: 30
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom installer_config.models import Package, TerminalPrompt, EnvironmentProfile\n\n\nclass PackageAdmin(admin.ModelAdmin):\n model = Package\n list_display = ('display_name', 'version', 'website')\n\n...
python
edit
1
0
mit
9b8c1f35d057bbf6e336434bd028cb0b2673afb8
ezPy-co/ezpy,ezPy-co/ezpy,alibulota/Package_Installer,alibulota/Package_Installer
installer/installer_config/admin.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom django.contrib.auth import views as auth_views\n\nfrom .views import (SignupView, UserProfileUpdateView, DrawNamesView,\n UserProfileDetailView, ActivateView)\n\nurlpatterns = [\n ...
python
edit
1
0
mit
2dbc4e2aec98aba8a0e307f951b412464db8b078
avinassh/della,avinassh/della,avinassh/della
della/user_manager/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\ns program terminate instances if proper tag is not used\n\n\"\"\"\n\nimport time\nimport boto3\n\nstart_time = time.time()\nec2 = boto3.resource('ec2')\nec2_client = boto3.client('ec2')\ntag_deparment = ['Finance', 'Marketing', 'HumanResou...
python
edit
1
0
mit
cad7bdca07f5ba979f14b11e6fd4109b1f7043c9
gabrielrojasnyc/AWS
terminate_instances.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\n\nfrom nightreads.posts.models import Tag\nfrom .models import (Subscription, SubscriptionActivation,\n UnsubscriptionActivation)\n\n\ndef update_user_tags(user, tags):\n t...
python
edit
1
2
mit
d379badd16528d2f7cd3826fcef5bd87be30cccf
avinassh/nightreads,avinassh/nightreads
nightreads/user_manager/user_service.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n'''\nExecute overstate functions\n'''\n\n# Import Salt libs\nimport salt.overstate\nimport salt.output\n\ndef over(env='base', os_fn=None):\n '''\n Execute an overstate sequence to orchestrate the executing of states\n over a group...
python
edit
5
1
apache-2.0
fcfa0b96226ba8b8d2bbd62365c2cab3f6e42d99
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/runners/state.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom framework.celery_tasks import app as celery_app\nfrom scripts.analytics.user_summary import UserSummary\nfrom scripts.analytics.node_summary import NodeSummary\nfrom scripts.analytics.base import DateAnalyticsHarness\n\n\nclass Summary...
python
edit
1
1
apache-2.0
8b519628839bc2360d2f0f48231e2cf7b9edc6b3
leb2dg/osf.io,cwisecarver/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,brianjgeiger/osf.io,caneruguz/osf.io,saradbowman/osf.io,chrisseto/osf.io,cwisecarver/osf.io,mluo613/osf.io,cwisecarver/osf.io,alexschiller/osf.io,acshi/osf.io,laurenrevere/osf.io,Nesiehr/osf.io,sloria/osf.io,mluo613/osf.io,pattisdr/osf.io,...
scripts/analytics/run_keen_summaries.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\n\nimport nodeconductor.logging.middleware\n\nimport rest_framework.authentication\n\n\ndef user_capturing_auth(auth):\n class CapturingAuthentication(auth):\n def authenticate(self, request...
python
edit
1
5
mit
f01e6fe6efb16a31a99b35cecaf000a0cb54bd4e
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/core/authentication.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nclass SpamListsError(Exception):\n '''There was an error during testing a url or host'''\n \nclass UnknownCodeError(SpamListsError, KeyError):\n '''The classification code from the service was not recogni...
python
edit
1
0
mit
51bae69bdbbc6cf19858ff8ed91efb09f4a0b845
piotr-rusin/spam-lists
spam_lists/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest2\n\nfrom querylist import QueryList\n\nclass QueryListActsAsList(unittest2.TestCase):\n \"\"\"QueryList should behave as lists behave\"\"\"\n def setUp(self):\n self.src_list = [{'foo': 1}, {'foo': 2}, {'foo': 3...
python
edit
1
1
mit
7bee444eeb17ec956478e999db47338fdf201411
thomasw/querylist,zoidbergwill/querylist
querylist/tests/querylist_list_tests.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sublime, sublime_plugin\nfrom os.path import relpath\n\nclass CopyRelativePathCommand(sublime_plugin.TextCommand):\n def run(self, edit):\n filename = self.view.file_name()\n if len(filename) > 0:\n # Copy...
python
edit
1
3
mit
d0fbb133cf2203de5f79f7fcdb647a3dff56f5a9
bpicolo/CopyRelativePath
copy_relative_path.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add __all__ to draw package" }, { "role": "assistant", "content": "from ._draw import line, polygon, ellipse, ellipse_perimeter, \\\n circle, circle_perimeter, set_color, bresenham\n\n__all__ = ['line',\n ...
python
new_file
1
0
bsd-3-clause
94e7fb9821d904dba19fee1ca1d129259f33204e
keflavich/scikit-image,michaelpacer/scikit-image,WarrenWeckesser/scikits-image,chintak/scikit-image,robintw/scikit-image,michaelaye/scikit-image,emon10005/scikit-image,chriscrosscutler/scikit-image,GaZ3ll3/scikit-image,michaelaye/scikit-image,emon10005/scikit-image,ajaybhat/scikit-image,bennlich/scikit-image,vighneshbi...
skimage/draw/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom rest_framework.routers import DefaultRouter\nfrom . import views\n\nadmin.site.site_header = 'SQUASH Admin'\n\napi_router = DefaultRouter()\napi_router.regist...
python
edit
1
0
mit
7dd2f4a7d21d42fbccbd34d356ab341b99aea54e
lsst-sqre/qa-dashboard,lsst-sqre/qa-dashboard,lsst-sqre/qa-dashboard
squash/dashboard/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nCopyright (c) 2015 Red Hat, Inc\nAll rights reserved.\n\nThis software may be modified and distributed under the terms\nof the BSD license. See the LICENSE file for details.\n\n\nconstants\n\"\"\"\n\nimport logging\n\ndef set_loggin...
python
edit
1
2
bsd-3-clause
3a17b72b82d2b23a676b92bd3292e04b77796ba7
david-martin/atomic-reactor,fr34k8/atomic-reactor,jpopelka/atomic-reactor,shaded-enmity/atomic-reactor,DBuildService/atomic-reactor,DBuildService/atomic-reactor,vrutkovs/atomic-reactor,fatherlinux/atomic-reactor,fr34k8/atomic-reactor,mmilata/atomic-reactor,jpopelka/atomic-reactor,maxamillion/atomic-reactor,mmilata/atom...
dock/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\nimport sqlparse\nfrom .checks import has_cross_join\n\n\ndef parse_file(filename):\n import json\n with open(filename, 'r') as fh:\n return json.load(fh)\n\n\nCHECKS = (\n (has_cross_join, 'query contains cross j...
python
edit
5
5
bsd-3-clause
6dde06470c9cd868319b1b4615d3065b61a6bc2c
freshbooks/sqlcop
sqlcop/cli.py
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom Cython.Build import cythonize\n\next_options = {\"compiler_directives\": {\"profile\": True}, \"annotate\": True}\n\nsetup(\n name='Weighted-Levenshtein',\n version='',\n packages=[''],\n u...
python
edit
1
0
mit
e6d8789a1847ebe1525bb87c80b90d45db7cd29e
elangovana/NLP-BackTransliteration-PersianNames
source/setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nsites_to_check = [\n {\n \"name\": \"Lissu Monitor\",\n \"url\": \"http://lissu.tampere.fi/monitor.php?stop=0014\",\n \"acceptable_statuses\": [200],\n \"mandatory_strings\": [\n \"table2\"\n ...
python
edit
1
0
mit
e8cee8b5a85762442e72079edd621363013455d9
Vilsepi/nysseituu,Vilsepi/nysseituu
src/config.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"Elastic Search Index & Search.\"\"\"\n\nimport argparse\nimport os\n\n\ndef main():\n \"\"\"Entry point for the esis.py script.\"\"\"\n args = parse_arguments()\n print args\n\ndef valid_directory(pat...
python
edit
1
3
mit
99f21681c81ab67f0be5d6265d09af983599cc08
jcollado/esis
esis/cli.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add detection support for bottle." }, { "role": "assistant", "content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals, division\n\n\ndef is_available(*capacities):\n \"\"\"\n Detects if t...
python
new_file
2
2
mit
1afa686eafbaa4392e81cad881db55e1fafb112f
armet/python-armet
src/armet/connectors/bottle/__init__.py
rejected_duplicate
Near-duplicate of sample 2460
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls.defaults import *\nfrom django.contrib import admin\n\nfrom codereview.urls import urlpatterns\n\nadmin.autodiscover()\n\nurlpatterns += patterns('',\n (r'^static/(?P<path>.*)$', 'django.views.static.serve',\n ...
python
edit
4
0
apache-2.0
752b4486c64fe0313f531b06bc0cb003804cc211
andialbrecht/django-gae2django,bubenkoff/bubenkoff-gae2django,andialbrecht/django-gae2django,bubenkoff/bubenkoff-gae2django
examples/rietveld/rietveld_helper/urls.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom .events import Event\n\n__author__ = 'YouGov, plc'\n__email__ = '<EMAIL>'\n__version__ = '0.3.0'\n\n__all__ = ['Event']\n\n```\n\nApply this change: Load the version from the package metadata rather than trying...
python
edit
1
0
mit
9737eced8e2d667e3413a7d65946658d94f5868c
yougov/emanate
yg/emanate/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\n__author__ = 'tigge'\n\nfrom wand.image import Image\n\n\ndef fix_image(filename, max_width):\n with Image(filename=filename) as img:\n img.auto_orient()\n if img.width > max_width:\n ratio = img.hei...
python
edit
1
3
mit
f9a349f902cb527314c22b384ddcf18de105cfc4
Tigge/trello-to-web,Tigge/trello-to-web
utilities.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport theanets\n\nimport util\n\n\nclass TestTrainer(util.MNIST):\n def setUp(self):\n super(TestTrainer, self).setUp()\n self.exp = theanets.Experiment(\n theanets.Autoencoder,\n layers=(self.DIGIT_S...
python
edit
1
1
mit
15cd72fd68bad8dbb2eab293c4abf8700a782219
devdoer/theanets,lmjohns3/theanets,chrinide/theanets
test/trainer_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import url\nfrom . import views\n\nurlpatterns = [\n url(r'^id/(?P<dweet_id>[0-9]*)$', views.fullscreen_dweet,\n name='fullscreen_dweet'),\n url(r'^blank$', views.blank_dweet, name='blank_dweet'),\n]\n\nha...
python
edit
1
0
apache-2.0
a85d3f87860d63d1b950ec754531439dab1bd7cb
lionleaf/dwitter,lionleaf/dwitter,lionleaf/dwitter
dwitter/dweet/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\n\nclass Response(object):\n def __init__(self, status_code, body, headers=None):\n self.status_code = status_code\n self._body = body\n self._body_parsed = None\n self.content_type = headers['co...
python
edit
1
3
mit
1d2eef3bf6a1a5c9b5a1f34c224d3a9651e77d73
henriquegemignani/py-gocd,gaqzi/py-gocd
gocd/response.py
accepted
null
true