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 setuptools import setup\n\ntry:\n import pypandoc\n\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n long_description = open('README.md').read()\n\nsetup(\n name='dacite',\n vers... | python | edit | 1 | 0 | mit | 89bb9c31e0e35f4d5bdacca094581ff8bcc213d2 | konradhalas/dacite | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Use source file with license"
},
{
"role": "assistant",
"content": "\n''' Copyright 2015 RTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may... | python | new_file | 1 | 0 | apache-2.0 | a29dad3b094b8d01a695e72cfc5e9b3bd51d6b6a | proffK/CourseManager | DataBase.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Set correct version in package"
},
{
"role": "assistant",
"content": "\"\"\"Python module to manipulate Kindle clippings files.\"\"\"\n\n__version__ = '0.4.0'\n"
}
] | python | new_file | 1 | 0 | mit | d28cb58c91e1282569eaa4f3f4d99f50d6e23ceb | samueldg/clippings | clippings/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf.urls import patterns, include, url\nfrom contact.views import contactForm\n\n\n\nurlpatterns = patterns('',\n\n\turl(r'^contact/$', contactForm),\n)\n\n\n```\n\nApply this change: Update for more generic url pattern and imp... | python | edit | 3 | 0 | mit | 4a5bc9439840db3197610d67a5ad885849e8312b | brob/simple-django-contact | urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport io\nimport os\nfrom textwrap import dedent\n\nfrom pg_bawler import bawlerd\n\n\nclass TestBawlerdConfig:\n\n def test_build_config_location_list(self):\n assert not bawlerd.conf.build_config_location_list(locations=())\n\n... | python | edit | 1 | 1 | bsd-3-clause | 0fdb93fb73142315fe404b9a161ef19af0d920cd | beezz/pg_bawler,beezz/pg_bawler | tests/test_bawlerd.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom distutils.core import setup\n\nimport gygax\n\nsetup(\n name=\"gygax\",\n version=gygax.__version__,\n description=\"A minimalistic IRC bot\",\n long_descri... | python | edit | 1 | 0 | mit | e06d5f7625917189db3c330d859b85d842450f9b | thsnr/gygax | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nwith open('README.md') as f:\n description = f.read()\n\nfrom beewarn import VERSION\n\nsetup(name='beewarn',\n version=VERSION,\n description='Utility for warning about bees',\n author='Ali... | python | edit | 1 | 0 | mit | de1c551641216157da11039c2a732785b4bf9ce7 | prophile/beewarn | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\n\nSOCIALACCOUNT_ENABLED = 'allauth.socialaccount' in settings.INSTALLED_APPS\n\n\ndef check_context_processors():\n allauth_ctx = '... | python | edit | 1 | 6 | mit | 31691ca909fe0b1816d89bb4ccf69974eca882a6 | cudadog/django-allauth,bitcity/django-allauth,petersanchez/django-allauth,bittner/django-allauth,manran/django-allauth,jscott1989/django-allauth,petersanchez/django-allauth,JshWright/django-allauth,italomaia/django-allauth,yarbelk/django-allauth,pankeshang/django-allauth,sih4sing5hong5/django-allauth,ZachLiuGIS/django-... | allauth/app_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom social.backends.oauth import BaseOAuth2\n\n\nclass HastexoOAuth2(BaseOAuth2):\n \"\"\"Hastexo OAuth2 authentication backend\"\"\"\n\n name = 'hastexo'\n AUTHORIZATION_URL = 'https://store.hastexo.com/o/authorize/'\n ACCESS_... | python | edit | 1 | 1 | bsd-3-clause | e2909520e93e85286bd4393426377e48db243615 | hastexo/python-social-auth-hastexo,arbrandes/python-social-auth-hastexo | hastexo_social_auth/oauth2.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python3\n\nimport os\nimport setuptools\n\n\ndef find_files(path):\n return [os.path.join(path, f) for f in os.listdir(path)]\n\n\nsetuptools.setup(\n name='workspace-tools',\n version='3.0.10',\n\n author='Max Zheng',\... | python | edit | 1 | 2 | mit | 1beb650fac60b0521fa2dcab46775c6ec483b088 | maxzheng/workspace-tools | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os.path\n\nfrom ez_setup import use_setuptools\nuse_setuptools(min_version='0.6')\n\nfrom setuptools import setup, find_packages\n\n# read README as the long description\nreadme = 'README' if os.path.exists('README') else 'README.md'... | python | edit | 1 | 0 | bsd-3-clause | 4cfd8159ad33c88ef66837ed4bcb6d5c927d2d2c | UDST/spandex,SANDAG/spandex | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom setuptools import setup, find_packages\nfrom django_summernote import version, PROJECT\n\n\nMODULE_NAME = 'django_summernote'\nPACKAGE_DATA = list()\nCLASSIFIERS = [\n 'Development Status :: 4 - Beta',\n 'Environment ... | python | edit | 3 | 0 | mit | 21cd0c4358cf97896af03ea05a2f1ee68ef06669 | summernote/django-summernote,summernote/django-summernote,summernote/django-summernote | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Setuptools configuration for rpmvenv.\"\"\"\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n\nwith open('README.rst', 'r') as readmefile:\n\n README = readmefile.read()\n\nsetup(\n name='rpmvenv',\n v... | python | edit | 1 | 0 | mit | 1a56ffc61d0b19315d95920ef96c997d6165824c | kevinconway/rpmvenv | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = \"django-report-builder\",\n version = \"2.0.2\",\n author = \"David Burke\",\n author_email = \"<EMAIL>\",\n description = (\"Query and Report builder for Django... | python | edit | 1 | 0 | bsd-3-clause | 51f36e512b30ef19f0ee213995be9865d5123f6e | altanawealth/django-report-builder,AbhiAgarwal/django-report-builder,BrendanBerkley/django-report-builder,AbhiAgarwal/django-report-builder,BrendanBerkley/django-report-builder,BrendanBerkley/django-report-builder,altanawealth/django-report-builder,AbhiAgarwal/django-report-builder,altanawealth/django-report-builder | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass AxisLabelsMismatchError(ValueError):\n \"\"\"Raised when a pair of axis labels tuples do not match.\"\"\"\n\n\nclass ConfigurationError(Exception):\n \"\"\"Error raised when a configuration value is requested but not set.\"\"\"\... | python | edit | 1 | 1 | mit | bafdbd28e35d80d28bfb82c23532533cb2915066 | hantek/fuel,rodrigob/fuel,dmitriy-serdyuk/fuel,codeaudit/fuel,udibr/fuel,mjwillson/fuel,dribnet/fuel,capybaralet/fuel,aalmah/fuel,glewis17/fuel,glewis17/fuel,vdumoulin/fuel,dmitriy-serdyuk/fuel,dwf/fuel,bouthilx/fuel,mila-udem/fuel,chrishokamp/fuel,udibr/fuel,janchorowski/fuel,dwf/fuel,dribnet/fuel,markusnagel/fuel,aal... | fuel/exceptions.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom django.apps import AppConfig\n\n\nclass RavenConfig(AppConfig):\n name = 'raven.contrib.django'\n label = 'raven.contrib.django'\n verbose_name = 'Raven'\n\n```\... | python | edit | 1 | 0 | bsd-3-clause | 04085c781621b47cfd47632531341fa7b2e9a956 | hzy/raven-python,hzy/raven-python,percipient/raven-python,smarkets/raven-python,lepture/raven-python,johansteffner/raven-python,Photonomie/raven-python,akalipetis/raven-python,recht/raven-python,ewdurbin/raven-python,someonehan/raven-python,dbravender/raven-python,ronaldevers/raven-python,smarkets/raven-python,johanste... | raven/contrib/django/apps.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n# LICENSE = open(os.path.join(os.path.dirname(__file__), 'LICENSE.txt')).read()\n\n# allow setup.py to be run from any p... | python | edit | 1 | 0 | mit | d494ce31a0bc69ab00bde0e88d7ad5a6e9bcc567 | zmbq/djqgrid,zmbq/djqgrid | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom distutils.core import setup\n\n\nsetup(name=\"django-sanitizer\",\n version=\"0.3\",\n description=\"Django template filter application for sanitizing user submitted HTML\",\n author=\"Calvin Spe... | python | edit | 1 | 0 | bsd-3-clause | 355d71bb600df850b3914772d0dca9e0a68e64c8 | caktus/django-sanitizer | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python2\n\n##\n# fsplit\n# https://github.com/leosartaj/fsplit.git\n#\n# Copyright (c) 2014 Sartaj Singh\n# Licensed under the MIT license.\n##\n\nfrom info import __version__ # define __version__ variable\nfrom info import _... | python | edit | 4 | 0 | mit | 87244598ed08e790835818656ecba0178bb7ca89 | leosartaj/fsplit | fsplit/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import with_statement\n\nimport os.path\n\nfrom fabric.api import *\nfrom fabric.contrib.project import *\n\nenv.user = 'root'\nenv.hosts = ['80.169.183.93']\nenv.remote_dir = '/mnt/persist/www/helloper.com'\n\ndef deploy(wh... | python | edit | 10 | 1 | mit | 3036533d25ce9955568efb4ba119d6e32af78ace | persand/helloper,persand/helloper.com,persand/helloper,persand/helloper.com,persand/helloper,persand/helloper.com | fabfile.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\n\nversion = '0.3.1'\n\n\ninstall_requires = (\n 'FeinCMS>=1.9,<1.11',\n)\n\nsetup(\n name='feincms-extensions',\n packages=find_packages(),\n package_data = {'feincms_extensions': [... | python | edit | 1 | 0 | bsd-2-clause | 5a06f5a4dd179c55f750886d4b509e5be6274340 | incuna/feincms-extensions,incuna/feincms-extensions | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(name='exponent_server_sdk',\n version='0.0.1',\n description='Exponent Server SDK for Python',\n url='https://github.com/exponentjs/exponent-server-sdk-python',\n author='Exponent Team',\n ... | python | edit | 1 | 0 | mit | 315933e24a19e01875fa7fcf182b5db905d5eff1 | exponentjs/exponent-server-sdk-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport logging\n\nfrom airflow import configuration\nfrom airflow.executors.base_executor import BaseExecutor\nfrom airflow.executors.local_executor import LocalExecutor\nfrom airflow.executors.sequential_executor import SequentialExecutor\... | python | edit | 3 | 0 | apache-2.0 | 5881436bea688ee49175192452dec18fad4ba9b2 | asnir/airflow,DEVELByte/incubator-airflow,yati-sagade/incubator-airflow,OpringaoDoTurno/airflow,yk5/incubator-airflow,spektom/incubator-airflow,owlabs/incubator-airflow,preete-dixit-ck/incubator-airflow,malmiron/incubator-airflow,alexvanboxel/airflow,wndhydrnt/airflow,bolkedebruin/airflow,dhuang/incubator-airflow,ledsu... | airflow/executors/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(name='git-auto-deploy',\n version='0.9',\n url='https://github.com/olipo186/Git-Auto-Deploy',\n author='Oliver Poignant',\n author_email='<EMAIL>',\n packages = f... | python | edit | 3 | 4 | mit | 1d75498d43a30b6d62727fb2872bf66466471dd8 | evoja/docker-Github-Gitlab-Auto-Deploy,evoja/docker-Github-Gitlab-Auto-Deploy | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\nsetup(name='parcels',\n version='0.0.1',\n description=\"\"\"Framework for Lagrangian tracking of virtual\n o... | python | edit | 1 | 0 | mit | 88bf4171ff58bcf35eab39efe78d7007e380f133 | OceanPARCELS/parcels,OceanPARCELS/parcels | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# Copyright: 2011, Grigoriy Petukhov\n# Author: Grigoriy Petukhov (http://lorien.name)\n# License: BSD\nfrom django.contrib.syndication.views import Feed\n\nfrom django.conf import settings\n\nfrom feedzilla.models ... | python | edit | 1 | 1 | bsd-3-clause | 4cbbe7c3ab891a11492f368d780a1416d37358ff | feedzilla/feedzilla,feedzilla/feedzilla,feedzilla/feedzilla | feedzilla/syndication.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\n\ndef main():\n # init is a special case, cause we want to add statirator.core to\n # INSTALLED_APPS, and have the command picked up. we'll handle it in here\n\n if 'init' in sys.argv:\n from django.... | python | edit | 1 | 2 | mit | 52cb80dd92ceabd7d2efe67c0a89f76cd701283b | MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator | statirator/main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom distutils.core import setup\n\nrequirements = map(str.strip, open('requirements.txt').readlines())\n\nsetup(\n name='py_eventsocket',\n version='0.1.4',\n author=\"Aaron Westendorf\",\n author_email=\"<EMAIL>\",\... | python | edit | 3 | 0 | bsd-3-clause | 7e88739d91cd7db35ffb36804ae59d1878eb2da3 | agoragames/py-eventsocket | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__version__ = 0.23\n__copyright__ = 'Copyright (c) 2009, Kyle Fuller'\n__licence__ = 'BSD'\n__author__ = 'Kyle Fuller <<EMAIL>>, krisje8 <<EMAIL>>'\n__URL__ = 'http://kylefuller.co.uk/project/django-request/'\n\n```\n\nApply this change: Ad... | python | edit | 1 | 0 | bsd-2-clause | e985163d189883a2419e34021971709c9c7498c0 | gnublade/django-request,kylef/django-request,kylef/django-request,kylef/django-request,gnublade/django-request,gnublade/django-request | request/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef long_description():\n \"\"\"\n Build the long description from a README file located in the same directory\n as this module.\n \"\"\"\n ba... | python | edit | 1 | 2 | mit | 5b3a21390f5edf501aa47db921422d3198719099 | SmileyChris/django-countries,basichash/django-countries,rahimnathwani/django-countries,maximzxc/django-countries,jrfernandes/django-countries,pimlie/django-countries,velfimov/django-countries,schinckel/django-countries,fladi/django-countries | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nfrom kafka import KafkaConsumer, KafkaProducer\nfrom test.conftest import version\nfrom test.testutil import random_string\n\n\n@pytest.mark.skipif(not version(), reason=\"No KAFKA_VERSION set\")\ndef test_end_to_end(kafka_... | python | edit | 1 | 7 | apache-2.0 | 66284e57accec5977d606fc91a0b28177b352eb4 | dpkp/kafka-python,ohmu/kafka-python,Yelp/kafka-python,ohmu/kafka-python,zackdever/kafka-python,Aloomaio/kafka-python,DataDog/kafka-python,Aloomaio/kafka-python,wikimedia/operations-debs-python-kafka,mumrah/kafka-python,scrapinghub/kafka-python,mumrah/kafka-python,dpkp/kafka-python,Yelp/kafka-python,scrapinghub/kafka-py... | test/test_producer.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom django.contrib import admin\nfrom django.db import models\nimport reversion\nfrom stagecraft.apps.datasets.models.backdrop_user import BackdropUser\nfrom stagecraft.apps.datasets.models.data_set... | python | edit | 1 | 1 | mit | 949c8b8dc18d0732e6ada3a98cdf1a61028887dc | alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft | stagecraft/apps/datasets/admin/backdrop_user.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom subprocess import call\n\n\nclass BaseDriver(object):\n\n def __init__(self, config):\n self.config = config\n\n def do(self, cmd):\n cmd = self.command(cmd)\n call(cmd)\n\n def command(self):\n rai... | python | edit | 1 | 2 | bsd-3-clause | 41a0fa6412427dadfb33c77da45bc88c576fa67c | ionrock/rdo | rdo/drivers/base.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom PyQt4.QtGui import *\nfrom master_page import MasterPage\nfrom generate_page import GeneratePage\nfrom scan_page import ScanPage\nfrom scores_page import ScoresPage\nfrom results_page import ResultsPage\n\n\nclass ExamWizard(QWizard):\... | python | edit | 6 | 1 | mit | b07c26c4d00de2b7dd184e0d173ec9e03ce4b456 | matcom/autoexam,matcom/autoexam,matcom/autoexam,matcom/autoexam,matcom/autoexam | qtui/exam_wizard.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\nfrom github_backup import __version__\n\n\ndef open_file(fname):\n return open(os.path.join(os.path.dirname(__file__), fname))\n\n\nsetup(\n na... | python | edit | 1 | 1 | mit | d7f07474326610bd6a01ac63157125b0ac43d450 | josegonzalez/python-github-backup,josegonzalez/python-github-backup | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nfrom setuptools import setup\nfrom urwid_stackedwidget import __version__\n\n\ndef readme():\n try:\n f = open('README.rst')\n content = f.read()\n f.cl... | python | edit | 1 | 1 | mit | 715a94a75de365458e86bfe243674e7abe227d1d | suminb/urwid-stackedwidget | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#! /usr/bin/env python\n\"\"\"\nRun this script to convert dataset documentation to ReST files. Relies\non the meta-information from the datasets of the currently installed version.\nIe., it imports the datasets package to scrape the meta-i... | python | edit | 1 | 0 | bsd-3-clause | 785a9cccafab36ef1eb49d9379aed9aef2f0f87f | kiyoto/statsmodels,yl565/statsmodels,edhuckle/statsmodels,Averroes/statsmodels,huongttlan/statsmodels,saketkc/statsmodels,hlin117/statsmodels,alekz112/statsmodels,waynenilsen/statsmodels,yarikoptic/pystatsmodels,bzero/statsmodels,wkfwkf/statsmodels,Averroes/statsmodels,alekz112/statsmodels,Averroes/statsmodels,huongttl... | tools/dataset_rst.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom . import base\n\n\nclass SSLTestCase(base.IntegrationTestCase):\n '''RabbitMQ integration test case.'''\n CTXT = {\n 'plugin.activemq.pool.1.port': 61614,\n 'plugin.activemq.pool.1.password': 'marionette',\n ... | python | edit | 1 | 0 | bsd-3-clause | b9b3837937341e6b1b052bbfdd979e3bb57d87c4 | rafaduran/python-mcollective,rafaduran/python-mcollective,rafaduran/python-mcollective,rafaduran/python-mcollective | tests/integration/test_with_ssl.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Fix format syntax with python 2.6 - upgrade version"
},
{
"role": "assistant",
"content": "VERSION = (0, 8)\n__version__ = '.'.join(map(str, VERSION))\nDATE = \"2014-06-17\""
}
] | python | new_file | 1 | 0 | mit | 694408d7f96c83318bbfc0d88be2a99a116deb90 | 20tab/twentytab-select2,20tab/twentytab-select2,20tab/twentytab-select2 | select2/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nconfig = {\n 'name': 'clouseau',\n 'description': 'A silly git repo inspector',\n 'long_description... | python | edit | 4 | 0 | cc0-1.0 | 957b5045e5c1d2c3d2f3b27074341cb8c5fb6128 | marcesher/clouseau,contolini/clouseau,contolini/clouseau,willbarton/clouseau,marcesher/clouseau,marcesher/clouseau,contolini/clouseau,willbarton/clouseau,willbarton/clouseau | setup.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\npackages = find_packages()\npackages.remove('sample_project')\n\nclassifiers = \"\"\"\nTopic :: Internet :: WWW/HTTP :: Dynamic Content\nIntended Audience :: Developers\nLicense :: O... | python | edit | 3 | 0 | bsd-3-clause | 99bdc393d44a8fe9f73efcae141f1a0627a24f17 | caktus/django-pagelets,caktus/django-pagelets,caktus/django-pagelets,caktus/django-pagelets | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.contrib import admin\nfrom .models import Measurement\n\nadmin.site.register(Measurement)\n\n```\n\nApply this change: Improve performance @ Measurement Admin"
},
{
"role": "assistant",
"content": "from django.contri... | python | edit | 1 | 1 | mit | 6cb0822aade07999d54e5fcd19eb2c7322abc80a | sigurdsa/angelika-api | measurement/admin.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nNAME = 'kaggle_tools'\nVERSION = '0.0.1'\nAUTHOR = 'Yassine Alouini'\nDESCRIPTION = \"\"\"This is a suite of tools to help you participate in various\nKaggle competitions\"\"\"\n\n\nsetup(\n ... | python | edit | 1 | 0 | mit | 10cd8149fe3eb911791c2188ffcafae5b66bfd21 | yassineAlouini/kaggle-tools,yassineAlouini/kaggle-tools | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom fuzzywuzzy import fuzz\n\nfrom .base_match import BaseMatchAdapter\n\n\nclass ClosestMatchAdapter(BaseMatchAdapter):\n \"\"\"\n The ClosestMatchAdapter logic adapter creates a response by \n using fuzz... | python | edit | 1 | 5 | bsd-3-clause | 396ab20874a0c3492482a8ae03fd7d61980917a5 | Reinaesaya/OUIRL-ChatBot,vkosuri/ChatterBot,gunthercox/ChatterBot,Gustavo6046/ChatterBot,maclogan/VirtualPenPal,Reinaesaya/OUIRL-ChatBot,davizucon/ChatterBot | chatterbot/adapters/logic/closest_match.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom access import fca\nfrom access import raam\nfrom access import weights\nfrom access import helpers\nfrom access.datasets import datasets\nfrom access import access_log_stream\nfrom access import access\n\n```\n\nApply this change: [BUG... | python | edit | 8 | 0 | bsd-3-clause | db93242b97eb8733192d38c4b0af0377759fd647 | pysal/pysal,weikang9009/pysal,lanselin/pysal,sjsrey/pysal | pysal/model/access/__init__.py | rejected_lint | Too many lint violations: 8 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\nimport os\nfrom setuptools import setup, find_packages\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\nsetup(\n name=\"django-basis\",\n version='0.1.9',\n url='http://github.com/frecar/django-... | python | edit | 1 | 0 | mit | 38a0328aaf6599412e56f4dec97d8ee9cef6e16c | frecar/django-basis | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport os\nimport subprocess\n\nos.system(\"pip install git+https://github.com/ComparativeGenomicsToolkit/sonLib@toil\")\n\nversionFile = \"src/cactus/shared/version.py\"\nif os.path.exists(versi... | python | edit | 1 | 0 | mit | 2c4e64cb12efd82d24f4e451527118527bba1433 | benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus,benedictpaten/cactus | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nfrom .utils import dom_contains, wait_for\n\n\nclass ContentTestMixin:\n\n def should_see_immediately(self, text):\n \"\"\" Assert that DOM contains the given te... | python | edit | 1 | 1 | bsd-3-clause | 14c22be85b9c9b3d13cad1130bb8d8d83d69d68a | nimbis/django-selenium-testcase,nimbis/django-selenium-testcase | selenium_testcase/testcases/content.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Test suite for our color utilities.\n\nAuthors\n-------\n\n* Min RK\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (C) 2011 The IPython Development Team\n#\n# Distributed under ... | python | edit | 1 | 2 | bsd-3-clause | 15ae458f7cf1a8257967b2b3b0ceb812547c4766 | ipython/ipython,ipython/ipython | IPython/utils/tests/test_pycolorize.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nimport cplcom\n\n\nsetup(\n name='CPLCom',\n version=cplcom.__version__,\n packages=find_packages(),\n package_data={'cplcom': ['../media/*', '*.kv']},\n install_requires=['moa', '... | python | edit | 1 | 0 | mit | 226143945b3de994c68ef0b705eadfca330d9141 | matham/cplcom | setup.py | rejected_duplicate | Near-duplicate of sample 3048 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\n\ndef test_govuk_frontend_jinja_overrides_on_design_system_v3():\n with open(\"package.json\") as package_file:\n package_json = json.load(package_file)\n\n assert package_json[\"dependencies\"][\"govuk-frontend\... | python | edit | 1 | 2 | mit | 2947fe97d466872de05ada289d9172f41895969c | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | tests/templates/components/test_radios_with_images.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport socket\n\nimport struct\nimport sys\n\n\ndef send_to_chrome(message):\n # Write message size.\n sys.stdout.write(struct.pack('I', len(message)))\n # Write the message itself.\n sys.stdout.write(mess... | python | edit | 1 | 2 | mit | dc0dfd4a763dceef655d62e8364b92a8073b7751 | CacheBrowser/cachebrowser,NewBie1993/cachebrowser | chrome/chromehost.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom antlr4.Token import Token\nfrom antlr4.InputStream import InputStream\nfrom antlr4.FileStream import FileStream\nfrom antlr4.BufferedTokenStream import TokenStream\nfrom antlr4.CommonTokenStream import CommonTokenStream\nfrom antlr4.Le... | python | edit | 31 | 0 | bsd-3-clause | c956fbbbc6e4dbd713728c1feda6bce2956a0894 | parrt/antlr4,ericvergnaud/antlr4,antlr/antlr4,antlr/antlr4,ericvergnaud/antlr4,parrt/antlr4,ericvergnaud/antlr4,parrt/antlr4,antlr/antlr4,parrt/antlr4,parrt/antlr4,antlr/antlr4,antlr/antlr4,antlr/antlr4,ericvergnaud/antlr4,ericvergnaud/antlr4,ericvergnaud/antlr4,parrt/antlr4,antlr/antlr4,antlr/antlr4,ericvergnaud/antlr... | runtime/Python3/src/antlr4/__init__.py | rejected_lint | Too many lint violations: 31 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib.auth.mixins import (LoginRequiredMixin,\n PermissionRequiredMixin)\nfrom django.urls import reverse\nfrom django.... | python | edit | 1 | 3 | bsd-2-clause | 536283e3dbbe6b549778d286401e08c6abeadff5 | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | dashboard/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__all__ = [\n \"gtr.services.funds.Funds\",\n \"gtr.services.organisations.Organisations\",\n \"gtr.services.persons.Persons\",\n \"gtr.services.projects.Projects\"\n]\n__version__ = \"0.1.0\"\n\nfrom gtr.services.base import _S... | python | edit | 13 | 0 | apache-2.0 | a8976ff1c3bdc177ca72becf48c4278f963d2627 | nestauk/gtr | gtr/__init__.py | rejected_lint | Too many lint violations: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\n'''Checks processes'''\n\n\n#===============================================================================\n# Import modules\n#===============================================================================\n\n# S... | python | edit | 4 | 3 | mit | a144706bc53f439b7c45b31eb9e6ca5241e3b1a3 | ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station | scripts/check_process.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"virgil-sdk\",\n version=\"5.0.0\",\n packages=find_packages(),\n install_requires=[\n 'virgil-crypto',\n ],\n author=\"Virgil Security\",\n author_em... | python | edit | 1 | 0 | bsd-3-clause | 616e5d3e90648c9528b79accf03b52f238b37fb8 | VirgilSecurity/virgil-sdk-python | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nFlask-Babel\n-----------\n\nAdds i18n/l10n support to Flask applications with the help of the\n`Babel`_ library.\n\nLinks\n`````\n\n* `documentation <http://packages.python.org/Flask-Babel>`_\n* `development version\n <http://githu... | python | edit | 1 | 0 | bsd-3-clause | 1fdb94783831bdd8e0608dc95a008f9344753a58 | mitsuhiko/flask-babel,mitsuhiko/flask-babel | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Write python code for the following: Make sure test setup is run for subdirectories"
},
{
"role": "assistant",
"content": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 Openstack LLC.\n# All Rights Reserved.\n#\n# Licensed under the Apache Licen... | python | new_file | 2 | 0 | apache-2.0 | b65283984b1be7e8bb88d3281bb3654a3dd12233 | n0ano/ganttclient | nova/tests/scheduler/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport logging\nfrom datetime import datetime\n\nfrom update_wrapper import UpdateWrapper\n\nif not os.path.isdir(\"log\"):\n os.mkdir(\"log\")\n\nlogging.basicConfig(\n fil... | python | edit | 1 | 0 | mit | ddfd7a3a2a2806045c6f4114c3f7f5a0ca929b7c | stormaaja/csvconverter,stormaaja/csvconverter,stormaaja/csvconverter | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\n\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name=\"rouver\",\n version=\"0.99.0\",\n description=\"A... | python | edit | 1 | 1 | mit | 679f3db2c4e26f50002c1e71199436f0de8e9984 | srittau/rouver | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef listify(filename):\n return filter(None, open(filename, 'r').readlines())\n\n\ndef read_file(filename):\n filepath = os.path.join(os.path.dirname(__file__), filename)\n ... | python | edit | 1 | 1 | bsd-3-clause | a0ab64fe0582f6001e39b942bcb1b120e068432d | praekelt/python-smpp,praekelt/python-smpp | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom pyecmd import *\n\nwith Ecmd(fapi2=\"ver1\"):\n t = loopTargets(\"pu\", ECMD_SELECTED_TARGETS_LOOP)[0]\n data = t.getScom(0x1234)\n t.putScom(0x1234, 0x10100000)\n # These interfaces may not be defined for some plugins\... | python | edit | 7 | 0 | apache-2.0 | 545812b5e31b4894c600b2b172640bea27947db8 | mklight/eCMD,mklight/eCMD,mklight/eCMD,mklight/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,open-power/eCMD,mklight/eCMD | ecmd-core/pyecmd/test_api.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass InterleavingMethod(object):\n '''\n Interleaving\n '''\n def interleave(self, k, a, b):\n '''\n k: the maximum length of resultant interleaving\n a: a list of document IDs\n b: a list of documen... | python | edit | 1 | 1 | mit | c24dbc2d4d8b59a62a68f326edb350b3c633ea25 | mpkato/interleaving | interleaving/interleaving_method.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom BaseHTTPServer import HTTPServer\nfrom HTTPHandler import HTTPHandler\nimport socket\nfrom threading import currentThread\n\nfrom Cron import Cron\nfrom Settings import PORT\nfrom Update import check\nfrom Event import addEventHandler\... | python | edit | 3 | 0 | mit | ff09f40b763ac9c968919871d649c47ce6aa7489 | mrozekma/Sprint,mrozekma/Sprint,mrozekma/Sprint | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\n\nversion = \"0.3\"\n\nsetup(\n name=\"dj-cmd\",\n version=version,\n description=\"`dj cmd` is a Django shortcut command.\",\n license=\"BSD\",\n... | python | edit | 1 | 0 | bsd-3-clause | ed6e0608f7ca66bb6127626103f83e60b87a1141 | nigma/dj-cmd | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.shortcuts import render\nfrom django.shortcuts import render_to_response\nfrom django.views.generic import CreateView, UpdateView, DeleteView\nfrom installer_config.models import EnvironmentProfile, UserChoice, Step\nfrom instal... | python | edit | 5 | 1 | mit | 317926c18ac2e139d2018acd767d10b4f53428f3 | ezPy-co/ezpy,alibulota/Package_Installer,ezPy-co/ezpy,alibulota/Package_Installer | installer/installer_config/views.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import abort\n\nfrom .models import Service\nfrom .validation import get_validation_errors\nfrom .service_utils import filter_services\n\n\ndef validate_brief_data(brief, enforce_required=True, required_fields=None):\n errs = ... | python | edit | 1 | 7 | mit | ccc6c983411f951ef3906d55d6a0946c7ef93c75 | alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api | app/brief_utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport unittest\nimport shutil\nfrom bcbio.rnaseq import cufflinks\nfrom bcbio.utils import file_exists, safe_makedir\nfrom nose.plugins.attrib import attr\n\nDATA_DIR = os.path.join(os.path.dirname(__file__), \"bcbio-nextgen-tes... | python | edit | 1 | 1 | mit | eeeba609afe732b8e95aa535e70d4cdd2ae1aac7 | vladsaveliev/bcbio-nextgen,biocyberman/bcbio-nextgen,verdurin/bcbio-nextgen,fw1121/bcbio-nextgen,gifford-lab/bcbio-nextgen,chapmanb/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,hjanime/bcbio-nextgen,verdurin/bcbio-nextgen,lbeltrame/bcbio-nextgen,verdurin/bcbio-nextgen,SciLifeLab/bcbio-nextgen,chapmanb/bcbio-nextgen,lpantan... | tests/unit/test_cufflinks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\ndef get_current_engine():\n return None\n\n```\n\nApply this change: Set pillow engine as default"
},
{
"role": "assistant",
"content": "# -*- coding: utf-8 -*-\nfrom thumbnails.engines.pillow imp... | python | edit | 1 | 1 | mit | 721703801654af88e8b5064d1bc65569ce1555cf | python-thumbnails/python-thumbnails,relekang/python-thumbnails | thumbnails/engines/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom sklearn.ensemble import RandomForestRegressor as randomforest\nfrom sklearn.svm import SVR as svm\nfrom sklearn.pls import PLSRegression as pls\n\nfrom .neuralnetwork import neuralnetwork\n\n__all__ = ['randomforest', 'svm', 'pls', 'ne... | python | edit | 3 | 0 | bsd-3-clause | f6841a527bd8b52aa88c4c3b5980a0001387f33e | mwojcikowski/opendrugdiscovery | scoring/models/regressors.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n__doc__ = '''\nCrawl comment from nicovideo.jp\n\nUsage:\n main_crawl.py [--sqlite <sqlite>] [--csv <csv>]\n\nOptions:\n --sqlite <sqlite> (optional) path of comment DB [default: co... | python | edit | 1 | 0 | mit | f574e19b14ff861c45f6c66c64a2570bdb0e3a3c | tosh1ki/NicoCrawler | crawl_comments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nimport urllib.parse\nimport urllib.request\n\ndef create_player(username, password, email):\n url = 'https://localhost:3000/players'\n values = {'username' : username,\n 'password' : password,\n ... | python | edit | 1 | 2 | mit | d659c685f40de7eb7b2ccd007888177fb158e139 | dropshot/dropshot-server | tests/integration/players.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .direct import *\nfrom .lbfgs import *\n\n__all__ = []\n__all__ += direct.__all__\n__all__ += lbfgsb.__all__\n\n```\n\nApply this change: Fix a minor bug due to renaming the lbfgs module."
},
{
"role": "assistant",
"content... | python | edit | 5 | 0 | bsd-2-clause | 5835939302048f420bfc91ab027fea8f91e14a02 | jhartford/pybo,mwhoffman/pybo | pybo/globalopt/__init__.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name = 'mstranslator',\n packages = ['mstranslator'],\n version = '0.0.1',\n description = 'Python wrapper to consume Microsoft translator API',\n author = 'Ayush Goel',\n autho... | python | edit | 1 | 0 | mit | eb5bcf3130f5fdc0d6be68e7e81555def46a53af | ayushgoel/mstranslator | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Configuration for Django system.\"\"\"\n\n__version__ = \"0.16.0\"\n__version_info__ = tuple(\n [\n int(num) if num.isdigit() else num\n for num in __version__.replace(\"-\", \".\", 1).split(\".\")\n ]\n)\n\n```\n\... | python | edit | 1 | 0 | mit | 8ba775d863e269e30ad60e0f449650575e3ff855 | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | dthm4kaiako/config/__init__.py | rejected_duplicate | Near-duplicate of sample 1349 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport json\nimport httplib as http\n\nimport tornado.web\nimport tornado.ioloop\n\nfrom dinosaurs import api\nfrom dinosaurs import settings\n\n\nclass SingleStatic(tornado.web.StaticFileHandler):\n def initialize(self, path)... | python | edit | 1 | 7 | mit | 3a27568211c07cf614aa9865a2f08d2a9b9bfb71 | chrisseto/dinosaurs.sexy,chrisseto/dinosaurs.sexy | dinosaurs/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(name='bcp',\n version='0.1.7',\n long_description=open('README.md').read(),\n url='https://github.com/adlibre/django-bcp',\n packages=['bcp',],\n install_requires... | python | edit | 1 | 0 | bsd-3-clause | 05705581fabae7e4ca0716fd9a5c422bec776ced | adlibre/django-bcp,adlibre/django-bcp | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2016 The Kubernetes Authors.\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:/... | python | edit | 1 | 0 | apache-2.0 | 38888d34506b743a06aa93f5dc6c187844774d58 | skuda/client-python,mbohlool/client-python,kubernetes-client/python,djkonro/client-python,sebgoa/client-python,skuda/client-python,mbohlool/client-python,kubernetes-client/python,sebgoa/client-python,djkonro/client-python | scripts/constants.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(\n name='icapservice',\n version='0.1.0',\n description='ICAP service library for Python',\n author='Giles Brown',\n author_email='<EMAIL>',\n url='https://github.com/gilesbrown/icap... | python | edit | 1 | 0 | mit | f2b737506b7ea435c850273d077247e57606de2a | gilesbrown/python-icapservice,gilesbrown/python-icapservice | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import, unicode_literals\n\nimport logging\nfrom io import StringIO\n\nfrom . import codec\nfrom .file import File\n\nlog = logging.getLogger(__name__)\n\n\nclass TextFile(File):\n \"\"\"\n Derived from... | python | edit | 1 | 3 | mit | 724335a9719174d3aeb745ed2d4c161507a08bd3 | giserh/pysparkling | pysparkling/fileio/textfile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Core XML support for Python.\n\nThis package contains three sub-packages:\n\ndom -- The W3C Document Object Model. This supports DOM Level 1 +\n Namespaces.\n\nparsers -- Python wrappers for XML parsers (currently only supports... | python | edit | 4 | 0 | mit | 091ebd935c6145ac233c03bedeb52c65634939f4 | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | Lib/xml/__init__.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bugle_project.configs.settings import *\n\nFAYE_URL = None\n\nDATABASE_ENGINE = 'postgresql_psycopg2'\nDATABASE_NAME = 'bugle'\nDATABASE_USER = 'bugle'\n\n```\n\nApply this change: Disable Faye on development, for now."
},
{
"r... | python | edit | 2 | 0 | bsd-2-clause | fda634ca2457716c33842cd0d285c20a0478601a | devfort/bugle,devfort/bugle,devfort/bugle | bugle_project/configs/development/settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Use the newer `setuptools.setup()`, if available.\ntry:\n from setuptools import setup\n kw = {\n 'test_suite': 'tests',\n 'tests_require': ['astunparse'],\n }\nexcept ImportError:\n from distutils.core import se... | python | edit | 1 | 0 | bsd-3-clause | 12f4f47d0f9a4a24d37e16fb1afc0841399ccadf | serge-sans-paille/gast | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2015 IBM Corp.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org... | python | edit | 1 | 0 | apache-2.0 | 378f55687131324bb5c43e3b50f9db5fe3b39662 | openstack/zaqar-ui,openstack/zaqar-ui,openstack/zaqar-ui,openstack/zaqar-ui | zaqar_ui/__init__.py | rejected_duplicate | Near-duplicate of sample 4780 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\n\nfrom unittest.mock import MagicMock\n\nclass MockAnkiModules:\n \"\"\"\n I'd like to get rid of the situation when this is required, but for now this helps with the situation that\n anki modules are not available duri... | python | edit | 1 | 4 | mit | 9633f3ee1a3431cb373a4652afbfc2cd8b3b4c23 | Stvad/CrowdAnki,Stvad/CrowdAnki,Stvad/CrowdAnki | test_utils/anki/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\" Setup script for PyPI \"\"\"\nfrom setuptools import setup\n\nfrom yayson import VERSION\n\nsetup(\n name='yayson',\n version=VERSION,\n license='Apache License, Version 2.0',\n description='Get colorized and indented JSO... | python | edit | 1 | 0 | apache-2.0 | 48b6ed861afdf5c9fa4c415e5b65783882e4fe4e | sebdah/yayson | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib import messages\nfrom django.core.urlresolvers import reverse_lazy\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.views.generic.e... | python | edit | 1 | 1 | mit | 1f98e497136ce3d9da7e63a6dc7c3f67fedf50b5 | zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net | observations/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom flask import Flask\nimport logging\nimport logging.config\nimport RPi.GPIO as GPIO\nfrom .config import config, config_loader\nfrom .channel import ChannelFactory\n\napp = Flask('rpi_gpio_http')\n\nlogging.config.dictConfig(config['log... | python | edit | 3 | 0 | mit | fe05b5f694671a46dd3391b9cb6561923345c4b7 | voidpp/rpi-gpio-http | rpi_gpio_http/app.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\n\ndef generate_secret_delimiter():\n try:\n from hashlib import sha1\n except ImportError:\n from sha import sha as sha1\n return sha1(getattr(settings, 'SECRET_KEY', '')).hexdigest()... | python | edit | 1 | 1 | bsd-3-clause | 029a159fe3f920d59e0168af72177b343daa4256 | OmarIthawi/django-phased,mab2k/django-phased,mab2k/django-phased,codysoyland/django-phased,OmarIthawi/django-phased | phased/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport subprocess\nimport sys\nfrom distutils.core import setup, Command\n\n\nclass TestCommand(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def ... | python | edit | 1 | 1 | mit | f55fa23cb0abbee4db3add7d6bc9d45b79dc9c6f | GallopLabs/facebook-ads-api,taenyon/facebook-ads-api,narrowcast/facebook-ads-api | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom menpodetect.opencv import (load_opencv_frontal_face_detector,\n load_opencv_eye_detector)\nimport menpo.io as mio\n\ntakeo = mio.import_builtin_asset.takeo_ppm()\n\n\ndef test_frontal_face_detector():\n ... | python | edit | 1 | 1 | bsd-3-clause | 6cfc94d8a03439c55808090aa5e3a4f35c288887 | yuxiang-zhou/menpodetect,jabooth/menpodetect,yuxiang-zhou/menpodetect,jabooth/menpodetect | menpodetect/tests/opencv_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import (absolute_import, division, print_function)\n\nfrom folium.utilities import camelize\n\n\ndef test_camelize():\n assert camelize('variable_name') == 'variableName'\n assert camelize('variableName') == 'variableN... | python | edit | 1 | 4 | mit | a7437e657f55cd708baba83421941e67d474daf7 | python-visualization/folium,ocefpaf/folium,ocefpaf/folium,python-visualization/folium | tests/test_utilities.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright 2015 by Ecpy Authors, see AUTHORS for more details.\n#\n# Distributed under the terms of the BSD license.\n#\n# The full l... | python | edit | 1 | 0 | bsd-3-clause | ccb1759a205a4cdc8f5eb2c28adcf49503221135 | Ecpy/ecpy,Ecpy/ecpy | ecpy/tasks/api.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nclass Function(object):\n def __init__(self, function, arg, backend):\n self._function = function\n self._arg = arg\n self._backend = backend\n\n self._verify_backend()\n self._compile()\n\n def _ver... | python | edit | 7 | 3 | bsd-3-clause | 412dc6e29e47148758382646dd65e0a9c5ff4505 | pymanopt/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,nkoep/pymanopt,nkoep/pymanopt | pymanopt/tools/autodiff/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''\nYAML Outputter\n'''\n\n# Third Party libs\nimport yaml\n\n\ndef __virtual__():\n return 'yaml'\n\n\ndef output(data):\n '''\n Print out YAML\n '''\n return yaml.dump(data)\n\n```\n\nApply this change: Change the YAML out... | python | edit | 1 | 1 | apache-2.0 | 53594f372a45e425076e5dbf36f399503df1972c | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/output/yaml_out.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nTests for various minion timeouts\n'''\n\n# Import Python libs\nfrom __future__ import absolute_import\nimport os\nimport sys\n\nimport salt.utils.platform\n\n# Import Salt Testing libs\nfrom tests.support.case... | python | edit | 1 | 2 | apache-2.0 | 6bec22cd51288c94dff40cf0c973b975538040d5 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | tests/integration/minion/test_timeout.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import unicode_literals\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom rest_framework_bulk.routes import BulkRouter\nfrom rest_surveys.views import (\n SurveyViewSet,\n SurveyRespons... | python | edit | 1 | 0 | mit | 2ebbe2f9f23621d10a70d0817d83da33b002299e | danxshap/django-rest-surveys | rest_surveys/urls.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\nimport time\nimport multiprocessing\n\n\ntry:\n from setproctitle import setproctitle\nexcept ImportError:\n def setproctitle(title):\n pass\n\n\nclass StatsCollector(multiprocessing.Process):\n def __init__(self, queue)... | python | edit | 1 | 4 | apache-2.0 | 36bde060bbdb4cf9d0396719b8b82952a73bf2b5 | jsiembida/bucky3 | bucky/collector.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.conf import settings\nfrom django.shortcuts import render\n\nfrom ..graphql.views import API_PATH, GraphQLView\n\nEXAMPLE_QUERY = \"\"\"# Welcome to Saleor GraphQL API!\n#\n# Type queries into this side of the screen, and you wi... | python | edit | 1 | 1 | bsd-3-clause | 596613c964311104098e64eeb349216bc7cd0023 | mociepka/saleor,mociepka/saleor,mociepka/saleor | saleor/demo/views.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.