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.db import models\nimport mongoengine\nfrom mongoengine import Document, EmbeddedDocument\nfrom mongoengine.fields import *\n\n\n# Create your models here.\nclass Greeting(models.Model):\n when = models.DateTimeField('date cre...
python
edit
16
0
mit
eefff91804317f4fb2c518446ab8e2072af4d87f
gmkou/FikaNote,gmkou/FikaNote,gmkou/FikaNote
app/models.py
rejected_lint
Too many lint violations: 16
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nProvides the default implementation of :class:`ArrowFactory <arrow.factory.ArrowFactory>`\nmethods for use as a module API.\n\n'''\n\nfrom __future__ import absolute_import\n\nfrom arrow.factory import ArrowFac...
python
edit
2
1
apache-2.0
b9f6939ea0569ecd54141cbee064a3f15fcf1937
crsmithdev/arrow
arrow/api.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Command line module\"\"\"\nimport argparse\nimport pkgutil\nimport sys\n\nimport gameanalysis\nfrom gameanalysis import script\n\n\ndef create_parser():\n \"\"\"Create the default parser\"\"\"\n modules = [imp.find_module(name)....
python
edit
1
3
apache-2.0
42e16bf376a64995a8b70a91829a82d7b0f3e1a1
egtaonline/GameAnalysis
gameanalysis/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom PIL import Image\n\nfrom appconf import AppConf\n\n\nclass AvatarConf(AppConf):\n DEFAULT_SIZE = 80\n RESIZE_METHOD = Image.ANTIALIAS\n STORAGE_DIR = 'avatars'\n STORAGE_PARAMS = {}\n GR...
python
edit
1
2
bsd-3-clause
ccc57956f83af2c8ef8c9e064fadfe5db2155302
tbabej/django-avatar,tbabej/django-avatar
avatar/conf.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom pytest import fixture\nfrom cumulusci.core.github import get_github_api\n\n\n@fixture\ndef gh_api():\n return get_github_api(\"TestOwner\", \"TestRepo\")\n\n```\n\nApply this change: Add pytest fixture to avoid leakage of cwd change...
python
edit
1
2
bsd-3-clause
01b03d46d32dd7f9e027220df0681c4f82fe7217
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
cumulusci/conftest.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Test helpers specific to LDA\n\n\"\"\"\n\nimport numpy as np\nimport itertools as it\n\nfrom microscopes.common.testutil import permutation_iter\n\n\ndef toy_dataset(defn):\n \"\"\"Generate a toy variadic dataset for HDP-LDA\n\n ...
python
edit
1
6
bsd-3-clause
ea8d96219748bacc7bedbb93f5e20f3648d5748a
datamicroscopes/lda,datamicroscopes/lda,datamicroscopes/lda
microscopes/lda/testutil.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nfrom px import px\nfrom unittest.mock import patch\n\ndef test_main():\n args = ['px', '--install']\n with patch(\"px.px.install\") as install_mock:\n px._main(args)\n install_mock.assert_called_once_with(a...
python
edit
3
1
mit
9a38f329ab0f40f20e2dcb0e0acf0f29a2b4c1fd
walles/px,walles/px
tests_py3/px_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\n\nfrom setuptools import find_packages, setup\n\nSCRIPT_DIR = os.path.dirname(__file__)\nif not SCRIPT_DIR:\n SCRIPT_DIR = os.getcwd()\n\nSRC_PREFIX = 'src'\n\n\npackages = find_packages(SRC_PREFIX)\n\ns...
python
edit
1
1
apache-2.0
b5d801c561b4a73ba7ea41665b7fe756fc56689d
rca/cmdline
setup.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 # Import in...
python
edit
1
9
apache-2.0
b167b1c8099dc184c366416dab9a7c6e5be7423a
Ghalko/osf.io,caneruguz/osf.io,felliott/osf.io,binoculars/osf.io,icereval/osf.io,ticklemepierce/osf.io,caneruguz/osf.io,mattclark/osf.io,brianjgeiger/osf.io,HalcyonChimera/osf.io,brandonPurvis/osf.io,laurenrevere/osf.io,aaxelb/osf.io,MerlinZhang/osf.io,caseyrygt/osf.io,doublebits/osf.io,Nesiehr/osf.io,kch8qx/osf.io,acs...
api/base/exceptions.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#\n# Copyright (c) SAS Institute 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://ww...
python
edit
1
3
apache-2.0
a077a5b7731e7d609b5c3adc8f8176ad79053f17
sassoftware/rmake3,sassoftware/rmake3,sassoftware/rmake3
rmake/lib/twisted_extras/tools.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name=\"servicemanager\",\n version=\"2.0.6\",\n description=\"A python tool to manage developing and testing with lots of microservices\",\n url=\"https://github.com/hmrc/service-manager\...
python
edit
1
0
apache-2.0
a709f5de366da5121e1d03f5de1ddd2b202c661e
hmrc/service-manager,hmrc/service-manager,hmrc/service-manager,hmrc/service-manager
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask_wtf import Form\nfrom wtforms.validators import DataRequired, Email\nfrom dmutils.forms import StripWhitespaceStringField\n\n\nclass EmailAddressForm(Form):\n email_address = StripWhitespaceStringField('Email address', validat...
python
edit
1
0
mit
ba4c2dc22aae5dd4f862aad7c388eecf36acfbd8
alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend,alphagov/digitalmarketplace-admin-frontend
app/main/forms.py
rejected_duplicate
Near-duplicate of sample 210
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nfrom util.session import get_or_generate_session_name\n\nclass Session(models.Model):\n name = models.CharField(max_length=255)\n user = models.ForeignKey(Us...
python
edit
1
1
mit
51660291b043b88eab599c59d8c1ef7ae9dc74d7
uxebu/tddbin-backend,uxebu/tddbin-backend
src/core/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.forms import ModelForm, Select, TextInput\nfrom .models import Client, Company\n\n\nclass ClientCreateForm(ModelForm):\n class Meta:\n model = Client\n fields = [\n 'company',\n 'first_name...
python
edit
1
0
mit
ea3660bcc1a9f7be619def8e26dd7b0ab4a873cf
Estmator/EstmatorApp,Estmator/EstmatorApp,Estmator/EstmatorApp
estmator_project/est_client/forms.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)\n# Copyright (C) 2009 Lorenzo Gil Sanchez <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with ...
python
edit
1
0
apache-2.0
b4613b6b20c6fae1b73095363078201e666bd5bc
damienmarie-alation/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,knaperek/djangosaml2,writepython/djangosaml2,WebSpider/djangosaml2,knaperek/djangosaml2,MiguelSR/djangosaml2,WebSpider/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,damienmarie-alation/djangosaml2
djangosaml2/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Only supports isuser request for Postfix virtual mailbox maps\nimport sys\nimport re\nimport logging\n\n# Message formats described in `../doc/Protocol.md`\n\nclass postfix_io:\n @classmethod\n def read_request(cls, infd, outfd):\n ...
python
edit
3
5
mit
b7c52258d39e5c0ee8fba2be87e8e671e0c583c3
jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth
xclib/postfix_io.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\ntry:\n long_description = open(\"README.rst\").read()\nexcept IOError:\n long_description = \"\"\n\nsetup(\n name='baldr',\n version='0.4.5',\n url='https://github.com/timsavage/...
python
edit
1
0
bsd-3-clause
352d8578eabe5c0474875c5ddcff9f97fc7df73e
timsavage/baldr,timsavage/baldr
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom models.base_model import BaseModel\nfrom datetime import datetime\nfrom models.user_model import UserModel\nfrom peewee import CharField, TextField, DateTimeField, IntegerField, ForeignKeyField\n\nWAIFU_SHARING_STATUS_PRIVATE = 1\nWAIF...
python
edit
1
1
cc0-1.0
b3a144e9dfba915d186fd1243515172780611689
sketchturnerr/WaifuSim-backend,sketchturnerr/WaifuSim-backend
models/waifu_model.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport unittest\nfrom hunting.sim.entities import *\n\n\nclass TestFighter(unittest.TestCase):\n def test_minimum_speed_is_one(self):\n self.assertEqual(Fighter(1, 1, 1, 1, base_speed=-5).speed, 1)\n self.assertEqual(Fighte...
python
edit
11
1
mit
c56a6c2f861d50d2bdc38ee33d30e4ef614a2de0
MoyTW/RL_Arena_Experiment
tests/sim/test_entities.py
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Here is the current file:\n```python\nOWNER_PERMISSIONS = ['challenges.%s_submission' % v for v in ['edit', 'delete']]\n\nclass SubmissionBackend(object):\n \"\"\"Provide custom permission logic for submissions.\"\"\"\n \n supports_object_permissions = True\n suppor...
python
edit
1
7
bsd-3-clause
20b13d500ea1cfa4b06413f0f02114bed60ca98f
mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite
apps/challenges/auth.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.db.models.deletion import PROTECT\nfrom django_extensions.db.fields import AutoSlugField\n\n\nclass Workshop(models.Model):\n event = models.ForeignKey('events.Event', PROTECT, related_name='work...
python
edit
1
2
bsd-3-clause
8a4b576d6df4ef1f174c8698ff9a86dbf2f5bd4a
WebCampZg/conference-web,WebCampZg/conference-web,WebCampZg/conference-web
workshops/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom unittest.mock import patch\nfrom smif.convert.unit import parse_unit\n\n\ndef test_parse_unit_valid():\n \"\"\"Parse a valid unit\n \"\"\"\n meter = parse_unit('m')\n assert str(meter) == 'meter'\n\n\n@patch('smif.convert.u...
python
edit
1
1
mit
067bbbc6c9edbf55606fe6f236c70affd86a1fc0
tomalrussell/smif,tomalrussell/smif,nismod/smif,nismod/smif,tomalrussell/smif,nismod/smif,nismod/smif,willu47/smif,willu47/smif,willu47/smif,willu47/smif,tomalrussell/smif
tests/convert/test_unit.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\n\nclass PyTest(TestCommand):\n def finalize_options(self):\n TestCommand.finalize_options(self)\n self.test_args = []\n ...
python
edit
1
1
bsd-3-clause
9529a7321b4cfc74594d7391baa760959fcb7568
mwcraig/msumastro
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nfrom twitchio.ext import commands\n\n@commands.cog()\nclass Words:\n\t\n\tdef __init__(self, bot):\n\t\tself.bot = bot\n\t\n\t@commands.command()\n\tasync def audiodefine(self, ctx, word):\n\t\turl = f\"http://api.wordnik.com:80/v4/word.j...
python
edit
1
2
mit
a2430b67423ce036d2a96541e86d356ace04db69
Harmon758/Harmonbot,Harmon758/Harmonbot
Twitch/cogs/words.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime, timedelta\n\nfrom django.contrib.auth.models import User\n\n\ndef stats():\n return {\n \"used_site_last_thirty_days\": User.objects.filter(log__timestamp__gt=datetime.now() - timedelta(days=30)).dis...
python
edit
1
1
bsd-3-clause
a81fbdd334dc475554e77bbb71ae00985f2d23c4
ConsumerAffairs/django-eventlog-ca,rosscdh/pinax-eventlog,KleeTaurus/pinax-eventlog,jawed123/pinax-eventlog,pinax/pinax-eventlog
eventlog/stats.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2011 Alexander Shorin\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part of this distribution.\n#\n\nimport unittes...
python
edit
1
1
bsd-3-clause
7e025a5fa40d5f7ba5721ad01951ad2020ed2485
kxepal/phoxpy
phoxpy/tests/test_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport os\nfrom kokki import *\n\ndef setup(name, **kwargs):\n env = Environment.get_instance()\n config = env.config.mongodb.copy()\n config.update(kwargs)\n\n config['configpath'] = \"/etc/mongodb/%s.conf\" % name\n if 'd...
python
edit
8
3
bsd-3-clause
f457cb13325cbc4b83a3450032856e86fe1285cf
samuel/kokki
kokki/cookbooks/mongodb/libraries/server.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport importlib\nfrom cx_Freeze import setup, Executable\n\nbackend_path = importlib.import_module(\"bcrypt\").__path__[0]\n\nbackend_path = backend_path.replace(\"bcrypt\", \".libs_cffi_backend\")\n\n# Dependencies are automatically detec...
python
edit
null
null
mit
3cc473fb6316fffa3c19980115f800518dcee115
virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool
setup.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\"\"\"\nSome tools for templates\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom django import template\n\nfrom coop_cms.templatetags.coop_utils import is_checkbox as _is_checkbox\nfrom coop_cms.templatet...
python
edit
1
1
bsd-3-clause
e3cb7ad226e3c26cbfa6f9f322ebdb4fde7e7d60
ljean/coop_cms,ljean/coop_cms,ljean/coop_cms
coop_cms/apps/coop_bootstrap/templatetags/coop_bs.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.contrib.auth.models import User\nfrom django_countries import countries\n\ndef get_user(user_id):\n user = User.objects.get(id=user_id)\n return user\n\ndef get_user_profile(user_id):\n user = User.objects.get(id=user_i...
python
edit
2
4
mit
f339af2e48f0e485f13d368dad47f541264c4f58
ercchy/coding-events,michelesr/coding-events,joseihf/coding-events,ioana-chiorean/coding-events,joseihf/coding-events,codeeu/coding-events,michelesr/coding-events,joseihf/coding-events,ercchy/coding-events,codeeu/coding-events,ercchy/coding-events,michelesr/coding-events,ioana-chiorean/coding-events,codeeu/coding-event...
web/processors/user.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nINSTALLED_APPS = (\n 'oauth_tokens',\n 'taggit',\n 'vkontakte_groups',\n)\n\nOAUTH_TOKENS_VKONTAKTE_CLIENT_ID = 3430034\nOAUTH_TOKENS_VKONTAKTE_CLIENT_SECRET = 'b0FwzyKtO8QiQmgWQMTz'\nOAUTH_TOKENS_VKONTAKTE_SCOPE = ['ads,wall,photo...
python
edit
1
0
bsd-3-clause
5cf66e26259f5b4c78e61530822fa19dfc117206
ramusus/django-vkontakte-groups-statistic,ramusus/django-vkontakte-groups-statistic,ramusus/django-vkontakte-groups-statistic
settings_test.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport uuid\n\n\nclass Note(object):\n \"\"\"\n A note.\n Currently has a title, tags, texr and a priority.\"\"\"\n\n def __init__(self, title, tags, text, priority=1, unique_id=None):\n if unique_id is None:\n ...
python
edit
1
2
mit
bb2234447039df6bee80842749b0ecdb19fb62fc
Autophagy/aerende
aerende/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom iconizer.console.launcher import CrossGuiLauncher\nfrom iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory\n\n\nclass Iconizer(object):\n def __init__(self):\n self.server ...
python
edit
1
1
bsd-3-clause
24fe59c0f5df9343337549eb4495d6ca0e1e58d1
weijia/iconizer
iconizer/iconizer_main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nReader for XVISTA .prof tables.\n\"\"\"\n\nimport numpy as np\nfrom astropy.table import Table\nfrom astropy.io import registry\n\n\ndef xvista_table_reader(filename):\n dt = [('R', np.fl...
python
edit
1
1
bsd-2-clause
b7cc9c5d2275a87849701e8a7307e26680bb740a
jonathansick/xvistaprof
xvistaprof/reader.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# Copyright 2014, Digital Reasoning\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 Lice...
python
edit
2
0
apache-2.0
aae29a385129e6a1573fac2c631eff8db8ea3079
stackdio/stackdio,clarkperkins/stackdio,stackdio/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio
stackdio/stackdio/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nsetup(\n name='txkazoo',\n version='0.0.4',\n description='Twisted binding for Kazoo',\n maintainer='Manish Tomar',\n maintainer_email='<EMAIL>',\n license='Apache 2.0',\n ...
python
edit
1
0
apache-2.0
b785a0dd83b6521d62e5d52c5c4c8115fa4b98fc
rackerlabs/txkazoo
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# /ciscripts/check/psqcppconan/check.py\n#\n# Run tests and static analysis checks on a polysquare conan c++ project.\n#\n# See /LICENCE.md for Copyright information\n\"\"\"Run tests and static analysis checks on a polysquare conan c++ proj...
python
edit
1
5
mit
c8b86afc53af25c845c8303111a6e7b17d8c26b4
polysquare/polysquare-ci-scripts,polysquare/polysquare-ci-scripts
ciscripts/check/psqcppconan/check.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport osgtest.library.core as core\nimport osgtest.library.files as files\nimport osgtest.library.osgunittest as osgunittest\nimport unittest\n\nclass TestStopXrootd(osgunittest.OSGTestCase):\n\n def test_01_stop_xrootd(self)...
python
edit
3
3
apache-2.0
16516b1ec44e3e44d2dc96a6f3d021268ce4e71d
efajardo/osg-test,efajardo/osg-test
osgtest/tests/test_84_xrootd.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport re\n\n\n# regular expression for finding assignments\n_quotes = \"['|\\\"|\\\"\\\"\\\"]\"\nBASE_ASSIGN_PATTERN = r'({}\\s*=\\s*[ubr]?' + _quotes + r')(.*?)(' +\\\n _quotes + r')'\n\n\ndef find_assign(data, varnam...
python
edit
1
3
mit
fbad1649e9939a3be4194e0d508ff5889f48bb6f
mbr/unleash
unleash/plugins/utils_assign.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.shortcuts import get_object_or_404\nfrom django.views.generic import DetailView\n\nfrom .models import Page\n\n\nclass PageView(DetailView):\n context_object_name = 'page'\n\n def get_quer...
python
edit
8
4
mit
b5fa4f9eb11575ddd8838bc53817854de831337f
funkybob/dumpling,funkybob/dumpling
dumpling/views.py
rejected_lint
Too many lint violations: 8
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\nfrom django.conf.urls.static import static\nfrom django.contrib.auth import views\n\n\n\nurlpatterns = [\n url(\n r'^si...
python
edit
1
0
mit
aefa8a3d6d4c809c7e470b22a0c9fb2c0875ba8b
crunchr/silk,mtford90/silk,jazzband/silk,crunchr/silk,mtford90/silk,jazzband/silk,crunchr/silk,django-silk/silk,django-silk/silk,jazzband/silk,django-silk/silk,crunchr/silk,mtford90/silk,jazzband/silk,mtford90/silk,django-silk/silk
project/project/urls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom tsparser.parser import BaseParser\n\n\nclass IMUParser(BaseParser):\n def __init__(self):\n self.gyro = None\n self.accel = None\n self.magnet = None\n self.pressure = None\n\n def parse(self, line, da...
python
edit
1
9
mit
e875856b544446dc9e0ac0368b1661e6a7af6c6d
m4tx/techswarm-receiver
tsparser/imu.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='scrAPI Utils',\n version='0.4.7',\n author='Chris Seto',\n author_email='<EMAIL>',\n packages=['scrapi.linter'],\n package_data={'scrapi.linter': ['../__init__.py']},\n ...
python
edit
1
0
apache-2.0
c19c69926e54e8268b7587a91264a976724a8801
fabianvf/scrapi,mehanig/scrapi,fabianvf/scrapi,mehanig/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,ostwald/scrapi,jeffreyliu3230/scrapi,icereval/scrapi,felliott/scrapi,erinspace/scrapi,alexgarciac/scrapi,felliott/scrapi,CenterForOpenScience/scrapi
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2010-2012 Yaco Sistemas (http://www.yaco.es)\n# Copyright (C) 2009 Lorenzo Gil Sanchez <<EMAIL>>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with ...
python
edit
1
0
apache-2.0
b4613b6b20c6fae1b73095363078201e666bd5bc
damienmarie-alation/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,knaperek/djangosaml2,writepython/djangosaml2,WebSpider/djangosaml2,knaperek/djangosaml2,MiguelSR/djangosaml2,WebSpider/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,damienmarie-alation/djangosaml2
djangosaml2/urls.py
rejected_duplicate
Near-duplicate of sample 1719
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nUsage:\n\n$ python test_group_name.py group_1\ntest_foo.py test_bar.py::TestClass\n$\n\nThis is used by CI to run only a certain set of tests on a particular builder.\n\nSee ``test_groups.yaml`` for details.\n\"\"\"\n\nimport yaml\n...
python
edit
1
1
apache-2.0
ca96de4c3fdd788833e3f343de2c711c5bf6e40f
mesosphere-mergebot/dcos,dcos/dcos,GoelDeepak/dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,kensipe/dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,mesosphere-mergebot/dcos,kensipe/dcos,GoelDeepak/dcos,GoelDeepak/dcos,kensipe/dcos,kensipe/dcos,dcos/dcos,mesosphere-mergebot/dcos,mesosphere-mergebot/dcos,me...
packages/dcos-integration-test/extra/get_test_group.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom .models import Campaign, InformationObject\n\n\ndef connect_info_object(sender, **kwargs):\n reference = kwargs.get('reference')\n if reference is None:\n return\n if 'campaign' not in reference:\n return\n tr...
python
edit
1
10
mit
d64e85f96483e6b212adca38ca5fa89c64508701
okfde/froide-campaign,okfde/froide-campaign,okfde/froide-campaign
froide_campaign/listeners.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport pytest\n\nfrom thinglang.execution.errors import UnknownVariable\nfrom thinglang.runner import run\n\n\ndef test_stack_resolution_in_block():\n assert run(\"\"\"\nthing Program\n does start\n\n number i = 0\n Outp...
python
edit
1
1
mit
c2a8e69a5deee8f72c561f50732570801d4fc9ae
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
tests/test_stack_operations.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom been.core import DirectorySource, source_registry\nfrom hashlib import sha1\nimport re\nimport unicodedata\nimport time\nimport markdown\n\n# slugify from Django source (BSD license)\ndef slugify(value):\n value = unicodedata.normal...
python
edit
3
3
bsd-3-clause
ad069a50ec7a4b4e6b1dac679e071279e128c824
chromakode/been
been/source/markdowndirectory.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='bfg9000',\n version='0.1.0pre',\n license='BSD',\n\n author='Jim Porter',\n author_email='<EMAIL>',\n\n packages=find_packages(exclude=['test']),\n entry_poi...
python
edit
1
0
bsd-3-clause
b10412389ee886633d1721063489159252e759e8
jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nclass TeleinfoParser:\n\n\tintegerKeys = [\n\t\t'ISOUSC', 'BASE', 'HCHC', 'HCHP', 'EJPHN', 'EJPHPM',\n\t\t'BBRHCJB', 'BBRHPJB', 'BBRHCJW', 'BBRHPJW', 'BBRHCJR', 'BBRHPJR',\n\t\t'PEJP', 'IINST', 'IINST1', 'IINST2', '...
python
edit
1
6
mit
bcd009c442e42065ba1de313f4892c1a57642daa
pyrou/UDPTeleinfoServer
TeleinfoParser.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport socket\n\n\nfrom orderbook import create_confirm\n\n\ndef send_msg(ip, port, message):\n '''Sends a raw string to the given ip and port. Closes the socket and returns the response.'''\n sock = socket.socket(socket....
python
edit
4
6
mit
1ce7f82fd76bca735c3e164cb6a67c9a8656af3b
Tribler/decentral-market
trade_client.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import request\nfrom flask.ext import restful\nfrom route.base import api\n\nfrom model.base import db\nfrom model.user import User\nimport logging\n\n\nclass StationAPI(restful.Resource):\n def post(self):\n \tdata = reque...
python
edit
7
1
mit
5c787be025ca99da339aae221b714bd1d8f2d0bd
hexa4313/velov-companion-server,hexa4313/velov-companion-server
route/station.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport re\nimport sys\n\n###########################################################################\n# This code is developing yet!!\n# Target file(Already morphological analysis file) to process to word only.\n###...
python
edit
3
0
mit
8e0d61aa69a15a9efc967ec263bc73c3018f9b3d
shinshin86/little-magnifying-py-glass,shinshin86/little-magnifying-py-glass
process_to_only_word.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#from distutils.core import setup\nfrom setuptools import setup\n\nsetup(\n name='nubomedia',\n version='0.1',\n packages=['core', 'test', 'util', 'wsgi', 'model'],\n install_requires=[\n \t'python-heatclient',\n \t'bottle',\n ],\n ...
python
edit
1
0
apache-2.0
a8fe2b52a418718bbde4214efc44cb59a7175430
manue1/connectivity-manager-agent,manue1/connectivity-manager-agent
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom Measurement import Measurement\n\nclass Recorder(object):\n def __init__(self, recorderType):\n self.recorderType = recorderType\n\n def record(self, measure: Measurement):\n None\n\nclass PrintRecorder(Recorder):\n...
python
edit
1
1
mit
446bb5103ec54680931cb0af43ded22e59bf11e5
hectortosa/py-temperature-recorder
Recorders.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.utils import timezone\n\ntry:\n import pytz\nexcept ImportError:\n pytz = None\n\ndef timezones(request):\n alt_timezone = request.session.get('alt_timezone', pytz.utc)\n return {\n ...
python
edit
1
5
bsd-3-clause
9796e60975474006940af723a6cb8b16bc632ae0
aaugustin/django-tz-demo
tz_app/context_processors.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'pysearch.views.home', name='home'),\n # url(r'^blog/', includ...
python
edit
1
0
mit
bdcca9f505c185fa0ade4e93a88b8dabc85f9176
nh0815/PySearch,nh0815/PySearch
pysearch/urls.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: Add variables for top and metadata directories" }, { "role": "assistant", "content": "\"\"\"Metadata and tools for WMT components.\"\"\"\n\nimport os\n\n\ntop_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))\nme...
python
new_file
1
0
mit
99dfe6fc1c8688b9d1e01218830738f0190c92f1
csdms/wmt-metadata
wmtmetatdata/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='tangled',\n version='0.1a3.dev0',\n description='Tangled namespace and utilities',\n long_description=open('README.rst').read(),\n url='http://tangledframework.o...
python
edit
1
0
mit
af802bd8c7f8787f80caf64f226edc996ac6fc3b
TangledWeb/tangled
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Notify Slack channel.\"\"\"\nimport time\n\nfrom ..utils import get_properties, get_template, post_slack_message\n\n\nclass SlackNotification:\n \"\"\"Post slack notification.\n\n Inform users about infrastructure changes to pro...
python
edit
1
2
apache-2.0
4d641110454f114d1f179d306fb63166e66fd6cf
gogoair/foremast,gogoair/foremast
src/foremast/slacknotify/slack_notification.py
rejected_duplicate
Near-duplicate of sample 203
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django import template\nfrom metabotnik.models import project_status_choices\n\nregister = template.Library()\n\n@register.filter\ndef nicestatus(dbval):\n 'Converts a db status choice into a more user-friendly version'\n for val...
python
edit
4
3
mit
c674ca2920e4a6774761312669f351554e3955eb
epoz/metabotnik,epoz/metabotnik,epoz/metabotnik
src/metabotnik/templatetags/utilz.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport cechomesh\n\nfrom echomesh.expression.Envelope import Envelope\nfrom echomesh.sound import PlayerSetter\nfrom echomesh.util import Log\nfrom echome...
python
edit
3
1
mit
3d88e62cdd2521472d0475a5f4c8598d49f88571
rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh,rec/echomesh
code/python/echomesh/sound/CPlayer.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.txt')).read()\nCHANGES = open(os.path.join(here, 'CHANGES.txt')).read()\n\nrequires = [\...
python
edit
1
0
bsd-3-clause
bf57dc8255df91954701fc13ca08e1999b9d2d39
ucla/PushHubCore
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sim, syscall_strings, platform\n\nif platform.architecture()[0] == '64bit':\n __syscall_strings = syscall_strings.syscall_strings_64\nelse:\n __syscall_strings = syscall_strings.syscall_strings_32\n\ndef syscall_name(syscall_number...
python
edit
3
1
mit
fcf626b6cb898bba294f8f4e2ecd2ff57cd144a0
abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper
scripts/syscalls.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n__all__ = ['autoScrollbar', 'button', 'combobox', 'listbox', 'window']\n\nfrom .autoScrollbar import autoScrollbar\nfrom .button import button\nfrom .combobox import combobox\nfrom .listbox import listbox\nfrom .window import window\n\n```\...
python
edit
1
0
mit
01e911926d37fa981fd7703f751ff91f052313e2
Kyle-Fagan/tkLibs
tkLibs/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" test data_checksums\"\"\"\nfrom nose.tools import assert_equal\n\n\ndef test_data_checksums():\n from pyne.data import data_checksums\n assert_equal(len(data_checksums), 6)\n assert_equal(data_checksums['/neutron/simple_xs']...
python
edit
1
2
bsd-3-clause
aa6a74abc382bb6be86fa4a91132a9be51f365a5
pyne/simplesim
tests/test_data_checksums.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nimport sys\nimport io\ntry:\n import setuptools\nexcept ImportError:\n from distribute_setup import use_setuptools\n use_setuptools()\nfrom setuptools import setup, Extension\nfrom setuptools impor...
python
edit
4
0
apache-2.0
ae8a38c5e3952a98a586db1df15fd8b4527441c6
ulikoehler/cv_algorithms,ulikoehler/cv_algorithms
setup.py
rejected_lint
Too many lint violations: 4
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom uuid import UUID\n\nfrom werkzeug.routing import BaseConverter\n\n\nclass UUIDConverter(BaseConverter):\n to_python = UUID\n to_url = str\n\n```\n\nApply this change: Drop dashes from download urls." }, { "role": "assista...
python
edit
1
1
mit
8316a60ba2887a511579e8cedb90b3a02fc1889a
mbr/dope,mbr/dope
dope/util.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom datetime import datetime\nfrom django.http import Http404\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\nfrom django.views.generic import (\n ArchiveIndexView,\n Y...
python
edit
1
3
bsd-3-clause
05715aca84152c78cf0b4d5d7b751ecfa3a9f35a
dominicrodger/tinyblog,dominicrodger/tinyblog
tinyblog/views/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nfrom confmodel import fields, Config as ConfmodelConfig\nfrom django.apps import AppConfig\n\n\nclass PodConfig(ConfmodelConfig):\n '''\n This is the config that all pods should use as the base for their own\n config.\...
python
edit
1
1
bsd-3-clause
93926a9986ab4ba7704cd564d0052b6e60ff38cb
rapidpro/casepro,praekelt/casepro,xkmato/casepro,rapidpro/casepro,praekelt/casepro,xkmato/casepro,praekelt/casepro,rapidpro/casepro
casepro/pods/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\" Test __str__ methods. \"\"\"\nimport pexpect\n\nfrom . import PexpectTestCase\n\nclass TestCaseMisc(PexpectTestCase.PexpectTestCase):\n\n def test_str_spawnu(self):\n \"\"\" Exercise spawnu.__str__() \"\"\"\n # given...
python
edit
1
1
isc
c40fc13dca5a0596a72d5c26214777f8a2845675
bangi123/pexpect,Depado/pexpect,dongguangming/pexpect,Depado/pexpect,quatanium/pexpect,Wakeupbuddy/pexpect,Wakeupbuddy/pexpect,Depado/pexpect,crdoconnor/pexpect,crdoconnor/pexpect,quatanium/pexpect,nodish/pexpect,quatanium/pexpect,crdoconnor/pexpect,dongguangming/pexpect,Wakeupbuddy/pexpect,Wakeupbuddy/pexpect,Depado/p...
tests/test_repr.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport versioneer\n\nfrom setuptools import setup, find_packages\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Read long description from the README file\nwith open(path.join(here, 'README...
python
edit
3
0
mit
20596e2ff6c0d107362628770db4602e5089c7de
maxalbert/tohu
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\n\n\nclass BasisModelManager(models.Manager):\n def get_query_set(self):\n return super(BasisModelManager, self).get_query_set().filter(deleted=False)\n\n```\n\nApply this change: Fix deprecation warni...
python
edit
1
1
mit
1579eb8d2de5aa49ad7012ab08350659a20725e1
frecar/django-basis
basis/managers.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport mcpi.minecraft as minecraft\nimport time\nmc = minecraft.Minecraft.create()\n\nwhile True:\n pos = mc.player.getPos()\n x = pos.x\n y = pos.y\n z = pos.z\n \n # Display position\n #print x, y, z\n\n time.sleep...
python
edit
2
0
mit
b659db91c0f4230d1c8ed69dd0cd2697fb573b85
Nekrofage/MinecraftPython
playerAction.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nDebug tools.\n\nCan be configured by changing values of those variable.\n\nDEBUG = False\nEnable this variable to activate debug features (like defined_at parameters). It can slow down...
python
edit
1
5
mit
36bb5605b4ec7a062190e8f5ef755023c0b2f6e4
Toilal/rebulk
rebulk/debug.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#import sublime\nimport sublime_plugin\n\n\nclass laynger(sublime_plugin.TextCommand):\n def run(self, edit, opt='center'):\n window = self.view.window()\n\n layout = window.get_layout()\n\n if len(layout['cols']) > ...
python
edit
1
4
mit
86ee90e0816a8d533ede916a5751ab69942dd48a
amaslenn/Laynger
laynger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport sys\n\nimport lexer\nimport execute\n\nwhile True:\n instr = input(\"» \")\n toks = lexer.to_toks(instr)\n rpn = lexer.to_rpn(toks)\n\n result = execute.eval_rpn(rpn)\n\n if result is not None:\n print(result)\n...
python
edit
1
0
mit
79d02616ab6d70b029876b8a2de425026e6268c4
5225225/pycalc,5225225/pycalc
pycalc.py
accepted
null
true
[ { "role": "user", "content": "Write python code for the following: PFASST: Add warning when unable to import PFASST." }, { "role": "assistant", "content": "\ntry:\n from pfasst import PFASST\nexcept:\n print 'WARNING: Unable to import PFASST.'\n\n__all__ = []\n\n\n" } ]
python
new_file
2
0
bsd-2-clause
68f4d883eb9dd59b3a4560f53657d80cf572104e
memmett/PyPFASST,memmett/PyPFASST
pfasst/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"\nPy-Tree-sitter\n\"\"\"\n\n\nimport platform\nfrom setuptools import setup, Extension\n\n\nsetup(\n name = \"tree_sitter\",\n version = \"0.0.8\",\n maintainer = \"Max Brunsfeld\",\n maintainer_email = \"<EMAIL>\",\n a...
python
edit
1
0
mit
676a1d3c74e526bd8cc67e97d89db2da7e207637
tree-sitter/py-tree-sitter,tree-sitter/py-tree-sitter,tree-sitter/py-tree-sitter
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom flask import Flask, jsonify\nfrom modals.modals import User, Bucket, Item\nfrom api.__init__ import app, db\n\n\n@app.errorhandler(404)\ndef page_not_found(e):\n response = jsonify({'error': 'The request can not be completed'})\n ...
python
edit
7
1
mit
37831f549eddc014ab89cc7dba3616a133c774a2
patlub/BucketListAPI,patlub/BucketListAPI
api/BucketListAPI.py
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Here is the current file:\n```python\ndef application(env, start_response):\n start_response('200 OK', [('Content-Type', 'text/html')])\n return [b\"Hello World from a default Nginx uWSGI Python 3.6 app in a\\\n Docker container (default)\"]\n\n```\n\nApply thi...
python
edit
1
1
apache-2.0
becd5721e9d6dcd1eb762b9b9e7089e7a90fcdf9
tiangolo/uwsgi-nginx-docker,tiangolo/uwsgi-nginx-docker
python3.7-alpine3.7/app/main.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# Copyright (C) 2015 Schweitzer Engineering Laboratories, Inc.\n# This software may be modified and distributed under the terms\n# of the MIT license. See the LICENSE file for details.\nfrom .ez_outlet import EzOutlet, EzOutletError, EzOut...
python
edit
6
0
mit
42be31155361e5b91c445844da8aefbfd0f44348
jtpereyda/ezoutlet
ezoutlet/__init__.py
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport requests\n\nclass ApiClient:\n def __init__(self, host, username, password):\n self.host = host\n self.username = username\n self.password = password\n\n def get_all_repositories(self):\n r = request...
python
edit
1
1
apache-2.0
26a6da62dc81720ea13645589719dcbae6dadacc
rcarrillocruz/pynexus
pynexus/api_client.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\"\"\"Global configuration class.\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n...
python
edit
1
1
bsd-3-clause
6110bc1137f5e3f1f12249c366323c6c0b48dbe3
ipython/ipython,ipython/ipython
IPython/nbconvert/utils/base.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport rethinkdb as r\n\nfrom . import coerce, geo, operators, terms\nfrom .coerce import COERSIONS\nfrom .operators import BOOLEAN, EXPRESSIONS, MODIFIERS\nfrom .terms import TERMS\nfrom .exceptions import ReqonError, InvalidTypeError, Inv...
python
edit
12
5
mit
4c85300c5458053ac08a393b00513c80baf28031
dmpayton/reqon
reqon/deprecated/__init__.py
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n__version__ = '0.2.2'\n\nsetup(\n name='kuberender',\n version=__version__,\n py_modules=['kuberender'],\n install_requires=[\n 'Jinja2==2.9.6',\n 'click==6.7',\n 'PyYAML==3.12',\n ...
python
edit
1
0
mit
70e0c6bf40776cda30e871a290b2760bfdb993e5
jusbrasil/kube-render
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n\nimport node\nimport manager\nimport stages\nimport numpy\n\n\nclass Rotate90Node(node.Node):\n \"\"\"\n Rotate a Numpy image by num*90 degrees.\n \"\"\"\n arity = 1\n stage = stages.FILTER_BINARY\n name = \"Numpy::Rotate...
python
edit
2
4
apache-2.0
988f4aec1588f409f296e89acb47040cb2606cf8
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
ocradmin/plugins/numpy_nodes.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport tomviz.operators\n\nNUMBER_OF_CHUNKS = 10\n\n\nclass InvertOperator(tomviz.operators.CancelableOperator):\n\n def transform_scalars(self, dataset):\n from tomviz import utils\n import numpy as np\n self.progre...
python
edit
1
4
bsd-3-clause
c79cedf826a3b6ee89e6186954185ef3217dd901
OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,mathturtle/tomviz
tomviz/python/InvertData.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\nimport logging\n\n\nclass IOHandler(object):\n @classmethod\n def is_host_compatible(cls, host):\n return False\n\n def __init__(self, host):\n raise NotImplementedError\n\n def is_ready(self):\n ...
python
edit
1
3
mit
9d29e4f41c076950d28f602773a3c4672a9191b1
pollen/pyrobus
pyluos/io/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- encoding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals, division\nimport logging\n\n\ndef init_logging(level=logging.DEBUG):\n formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)...
python
edit
1
1
mit
ec768a1aac8429f0c2c1f27c521c8a5f40d32411
Ethal/enocean,kipe/enocean,kipe/enocean,Ethal/enocean
enocean/consolelogger.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport json\n\nimport keyring\n\nfrom pyutrack import Credentials\nfrom tests import PyutrackTest\n\n\nclass CredentialsTests(PyutrackTest):\n def test_empty(self):\n c = Credentials('root')\n self.assertIsNone(c.password)\...
python
edit
3
1
mit
7f9ea07f2ee55ff36009bc67068c36bc1180c909
alisaifee/pyutrack,alisaifee/pyutrack
tests/test_credentials.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport os\nimport logging\n\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\n\nfrom .health import Health\n\napp = Flask(__name__)\n\napp.config.from_object(os.environ.get('SETTINGS'))\n\nlogging.basicConfig(level=logg...
python
edit
1
2
mit
6e1a1c2ac4eaa32e0af4fb9349844fe3ce7df7c0
LandRegistry-Attic/matching-alpha,LandRegistry-Attic/matching-alpha,LandRegistry-Attic/matching-alpha
matching/__init__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nimport names\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=names.__title__,\n version=names.__version__,\n author=names.__author__,\n url=\"https://github.com/treyhunner/names\",\n description=\"Generate ran...
python
edit
1
0
mit
eebf41e6cf85f98d034708999e0321f9e09e4093
treyhunner/names,treyhunner/names
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nclass Error(models.Model):\n \"\"\"\n Model for storing the individual errors.\n \"\"\"\n kind = models.CharField(_('type'),\n null=...
python
edit
1
1
mit
8e28c627c0a84939bb44c2c77fa3e4b3de4932bf
mbelousov/django-erroneous,mbelousov/django-erroneous,mridang/django-erroneous
erroneous/models.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n#!/usr/bin/env 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\n# See https://github.com/domokit/sky_engine/wiki/R...
python
edit
2
3
bsd-3-clause
558a25b6f3b77d6a1b087819dc40f1aa7584e7fb
krisgiesing/sky_engine,devoncarew/engine,abarth/sky_engine,tvolkert/engine,Hixie/sky_engine,devoncarew/engine,mpcomplete/flutter_engine,mpcomplete/engine,devoncarew/sky_engine,chinmaygarde/sky_engine,jamesr/sky_engine,flutter/engine,chinmaygarde/sky_engine,mpcomplete/engine,lyceel/engine,devoncarew/engine,Hixie/sky_eng...
sky/tools/release_packages.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom uuid import UUID\nfrom scanner import Symbol\n\ndef tostr(value):\n if isinstance(value, Symbol):\n return str(value)\n elif isinstance(value, str):\n return '\"%s\"' % value\n elif isinstance(value, float):\n ...
python
edit
1
10
bsd-3-clause
b98ab1c800a13792bdca69c5788e91bc07f1e215
Perlence/rpp
rpp/encoder.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom multiprocessing.pool import ThreadPool\nfrom django.shortcuts import render\nfrom .forms import SearchForm\nfrom source import view_models\n\n\ndef index(request):\n if request.method == 'GET':\n form = SearchForm(request.GET...
python
edit
1
3
mit
79bbc95abd2c1b41bcbd19d9ce1ffa330bd76b7a
jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu,jeremyrea/caterblu
source/views.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nEntrypoint module, in case you use `python -mdependenpy`.\n\nWhy does this file exist, and why __main__? For more info, read:\n\n- https://www.python.org/dev/peps/pep-0338/\n- https://docs.python.org/2/usi...
python
edit
1
0
isc
b8273181c1f8806ebea3504d11d1feda36ae27ee
Pawamoy/dependenpy,Pawamoy/dependenpy
src/dependenpy/__main__.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='smartmin',\n version=__import__('smartmin').__version__,\n license=\"BSD\",\n\n install_requires=[\n \"django>=1.7\",\n \"django-guardian==1.3\",\n ...
python
edit
1
3
bsd-3-clause
9ddb2df626f1fd355cad26f84b10527358ea6993
caktus/smartmin,nyaruka/smartmin,caktus/smartmin,nyaruka/smartmin,nyaruka/smartmin,caktus/smartmin,caktus/smartmin
setup.py
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```python\nfrom __future__ import division, print_function, unicode_literals\n\n__version__ = '0.1.2'\n\nfrom hindkit.constants import paths, linguistics, styles, templates\nfrom hindkit.family import Family, Master, Style\nfrom hindkit.builder i...
python
edit
9
2
mit
4b0583f132bac50a0208452d38702f4f819f64c8
mooniak/hindkit,itfoundry/hindkit,itfoundry/hindkit
hindkit/__init__.py
rejected_lint
Too many lint violations: 9
true