messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Eve Demo\n ~~~~~~~~\n\n A demostration of a simple API powered by Eve REST API.\n\n The live demo is available at eve-demo.herokuapp.com. Please keep in mind\n that the it is running on Her... | python | edit | 1 | 2 | bsd-3-clause | e62469c3572cf9bfa02cd153becc1b36ecf8b3df | nicolaiarocci/eve-demo | run-hooks.py | rejected_duplicate | Near-duplicate of sample 13119 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n'''\nGeneral-purpose fixtures for vdirsyncer's testsuite.\n'''\nimport logging\nimport os\n\nimport click_log\n\nfrom hypothesis import HealthCheck, Verbosity, settings\n\nimport pytest\n\n\n@pytest.fixture(autouse=... | python | edit | 1 | 1 | mit | 96c90af1e3e2c6a35a261db5a67bdfc236983a06 | untitaker/vdirsyncer,hobarrera/vdirsyncer,untitaker/vdirsyncer,hobarrera/vdirsyncer,untitaker/vdirsyncer | tests/conftest.py | rejected_duplicate | Near-duplicate of sample 14406 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport click\n\nfrom globus_cli.parsing import common_options, task_id_arg\nfrom globus_cli.safeio import formatted_print\n\nfrom globus_cli.services.transfer import iterable_response_to_dict, get_client\n\n\n@click.command('event-list', he... | python | edit | 1 | 5 | apache-2.0 | 8f1e094d8abc8317d8e802c556e695d117f0fac1 | globus/globus-cli,globus/globus-cli | globus_cli/commands/task/event_list.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport os\nfrom kokki import *\n\n# Package(\"python-boto\")\nExecute(\"pip install git+http://github.com/boto/boto.git#egg=boto\",\n not_if = 'python -c \"import boto\"')\nExecute(\"mv /usr/lib/pymodules/python2.6/boto /tmp/boto.orig\... | python | edit | 10 | 0 | bsd-3-clause | 460460cb95906a71f66a969ab0f2e9d5285b4d21 | samuel/kokki | kokki/cookbooks/aws/recipes/default.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport ctypes\nimport numpy as np\nimport os\n\n__all__ = ['square']\n\nlib = ctypes.cdll.LoadLibrary(\"libfoo.so\")\nlib.square.restype = ctypes.c_int\nlib.square.argtypes = [ctypes.c_int]\n\n\ndef square(value):\n \"\"\"\n Parameter... | python | edit | 3 | 1 | bsd-3-clause | bec268ef554e6f30c2cecd52ecddcafc34c5b0db | gammapy/PyGamma15,gammapy/2015-MPIK-Workshop,gammapy/2015-MPIK-Workshop,gammapy/PyGamma15,gammapy/PyGamma15,gammapy/2015-MPIK-Workshop | tutorials/cmake_python_wrapper/v1/python/foo/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom menpo.shape import PointDirectedGraph\nimport numpy as np\n\n\ndef pointgraph_from_circle(fitting):\n y, x = fitting.center\n radius = fitting.diameter / 2.0\n return PointDirectedGraph(np.array(((y, x),\n ... | python | edit | 1 | 1 | bsd-3-clause | 90860fbe9d5b21b51ade753bdc6dfefc15cb31ac | jabooth/menpodetect,jabooth/menpodetect,yuxiang-zhou/menpodetect,yuxiang-zhou/menpodetect | menpodetect/pico/conversion.py | rejected_duplicate | Near-duplicate of sample 13277 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Module: test_timers\n# Date: 10th February 2010\n# Author: James Mills, prologic at shortcircuit dot net dot au\n\n\"\"\"Timers Tests\"\"\"\n\nimport pytest\n\nfrom datetime import datetime, timedelta\n\nfrom circuits import Event... | python | edit | 1 | 2 | mit | 512ab0b23963a3876b1747a1e5995cac9ce18c5d | treemo/circuits,nizox/circuits,eriol/circuits,treemo/circuits,eriol/circuits,treemo/circuits,eriol/circuits | tests/core/test_timers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import Event, EventActivity\nfrom rest_framework import serializers\n\n\nclass EventSerializer(serializers.ModelSerializer):\n class Meta(object):\n model = Event\n depth = 1\n\n\nclass EventSimpleSerializer(se... | python | edit | 1 | 0 | apache-2.0 | def92e47ce05497e6a83cd8b8a569113956c6dc2 | belatrix/BackendAllStars | events/serializers.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS\n\nPAYMENT_METHODS = DOCDATA_PAYMENT_METHODS\nVAT_RATE = 0.21\n\n```\n\nApply this change: Disable Paypal, up Direct debit"
},
{
"role": "ass... | python | edit | 3 | 0 | bsd-3-clause | 16b663441c0d994b02e68b8c785ec6c7a2805f03 | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | onepercentclub/settings/payments.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n# flake8: noqa\n\"\"\"\nA Python library for FilePreview's API.\n\"\"\"\n\n__title__ = \"filepreviews\"\n__version__ = \"3.0.0\"\n__author__ = \"José Padilla\"\n__license__ = \"MIT\"\n__copyright__ = \"Copyright 201... | python | edit | 1 | 0 | mit | f01f09cc9a6ba5afb6e4d59ad73dc5645693b672 | GetBlimp/filepreviews-python | filepreviews/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.views.generic import TemplateView\nfrom django.http import HttpResponseRedirect\nfrom django.core.urlresolvers import reverse\n\nfrom election_snooper.models import SnoopedElection\nfrom election_snooper.forms import ReviewElect... | python | edit | 1 | 4 | bsd-3-clause | 3ed6e31cecab4166220a9fb20fe603b71946ab9c | DemocracyClub/EveryElection,DemocracyClub/EveryElection,DemocracyClub/EveryElection | every_election/apps/election_snooper/views.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# -*- encoding: utf-8 -*-\n#\n\nimport re\nimport config\nimport surllib\nimport semail\nimport datetime\nimport urllib\n\nURL_PREFIX = 'http://%s/Infoweb/Fi/' % config.HOSTNAME\nURL_MAIN = URL_PREFIX + 'Ugeplaner.asp'\n\ndef docFindWeek... | python | edit | 4 | 6 | bsd-2-clause | 5ac176fafd35bfa675e1718b74a8c6ef4dc74629 | bennyslbs/fskintra | skoleintra/pgWeekplans.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\n\ndef register(cls, admin_cls):\n cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True))\n\n def getter():\n if not cls._prepared_date:\n try:... | python | edit | 1 | 3 | bsd-2-clause | f12b6383f5e18c8e76760f535c630bf256ec0f8a | incuna/incuna-feincms,incuna/incuna-feincms,incuna/incuna-feincms | incunafein/module/page/extensions/prepared_date.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nDocs with Sphinx.\n\n\"\"\"\n\nimport sys\nimport abc\nimport os.path\nimport subprocess\n\nfrom . import vcs\nfrom .. import DOCS_PATH\n\n\nclass Sphinx(vcs.VCS):\n \"\"\"Abstract class for project folder tools.\"\"\"\n __met... | python | edit | 3 | 1 | bsd-3-clause | e3a3e729eb60f5a7e134da5b58bb52d672e1d8b2 | Kozea/sitenco | sitenco/config/sphinx.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\nimport logging\n\nfrom .base import SimSootExpr\n\nl = logging.getLogger('angr.engines.soot.expressions.phi')\n\n\nclass SimSootExpr_Phi(SimSootExpr):\n def _execute(self):\n local = [self._translate_value(v) for v, idx in self.... | python | edit | 1 | 7 | bsd-2-clause | 9cb56923ba57fec79a8efd4919315910f82f5da1 | iamahuman/angr,schieb/angr,iamahuman/angr,angr/angr,iamahuman/angr,schieb/angr,angr/angr,angr/angr,schieb/angr | angr/engines/soot/expressions/phi.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom django.test import TestCase\nfrom django.contrib.sites.models import Site\nfrom django.contrib.auth import get_user_model\nfrom django.core.files import File\n\nfrom opps.articles.models ... | python | edit | 1 | 1 | mit | f0c53900a62159249240dedc486678d451932cb1 | williamroot/opps,jeanmask/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,opps/opps,opps/opps,YACOWS/opps | opps/articles/tests/models.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\n\n# This script just copies the generated .pyd file to the current directory.\n\nimport platform\nfrom shutil import copyfile\nfrom os.path import isfile\nsource_file = None\n\n\nif platform.system() == \"Windows\":\n possible_files = ... | python | edit | 1 | 0 | mit | cb69adc8727048ac9e1f7a1205a0f1b5ed269dad | croxis/SpaceDrive,eswartz/RenderPipeline,eswartz/RenderPipeline,croxis/SpaceDrive,croxis/SpaceDrive,eswartz/RenderPipeline | Native/Scripts/finalize.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport json\n\nfrom bs4 import BeautifulSoup\nfrom django import template\n\nregister = template.Library()\n\n\n@register.filter\ndef pretty_json(data):\n if isinstance(data, str):\n data = json.loads(data)\n\n return json.dump... | python | edit | 1 | 2 | mit | 73c904fffaa5e123b8e5dffcb93321defc684709 | springload/wagtaildraftail,gasman/wagtaildraftail,gasman/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,gasman/wagtaildraftail,springload/wagtaildraftail,springload/wagtaildraftail | tests/testapp/home/templatetags/pretty_tags.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#pylint: disable=C0301\n#pylint: disable=C0111\n#pylint: disable=R0201\n#pylint: disable=R0904\n\nimport osgtest.library.core as core\nimport osgtest.library.files as files\nimport osgtest.library.osgunittest as osgunittest\n\nclass TestCle... | python | edit | 1 | 1 | apache-2.0 | daf6468079e7ff3e00550db0f3a16bc109184027 | efajardo/osg-test,efajardo/osg-test | osgtest/tests/test_49_jobs.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 2011 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nfrom master.chromium_git_poller_bb8 import ChromiumGitPoller\n\ndef U... | python | edit | 1 | 1 | bsd-3-clause | ebc203958db534cdfd29dd53acae791e632cc30b | eunchong/build,eunchong/build,eunchong/build,eunchong/build | masters/master.chromium.git/master_source_cfg.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.forms.widgets import flatatt\nfrom django.utils.safestring import mark_safe\nfrom bootstrap3.utils import render_tag\n\nfrom .text import text_value\n\n\ndef re... | python | edit | 3 | 3 | bsd-3-clause | cc741215fa5ff6a2a64d7bee3ff6108a4d85a16f | dyve/django-bootstrap3,zostera/django-bootstrap4,dyve/django-bootstrap3,zostera/django-bootstrap4 | bootstrap3/components.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Local\nfrom .base import *\n\n\n# Heroku Settings\nSECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\nSECURE_SSL_REDIRECT = True\nALLOWED_HOSTS = [\n '.barberscore.com',\n '.herokuapp.com',\n]\nDATABASES['default']['TEST... | python | edit | 6 | 0 | bsd-2-clause | 97e60ffa741bafbd34bcee18d0dce9f323b0132a | dbinetti/barberscore,barberscore/barberscore-api,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django | project/settings/prod.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport MySQLdb\n\n# Download Guest List.csv from Facebook event page and copy it to a file named\n# 'list.csv'. Remove the first line (column title) and the '\"'s around each\n# name (they cause trouble with MySQL)\nfilename = \"list.csv\"\... | python | edit | 2 | 0 | mit | 88fcd9e1ae2a8fe21023816304023526eb7b7e35 | copperwall/Attendance-Checker,copperwall/Attendance-Checker,copperwall/Attendance-Checker | fb_import.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nCompatibility support for Python 2.7. Remove when Python 2.7 support is\nno longer required.\n\"\"\"\ntry:\n import configparser\nexcept ImportError:\n import ConfigParser as configparser\n\ntry:\n input = raw_input\nexcept... | python | edit | 5 | 2 | mit | a600d75133f01aa9cc30767634f3d77379e6ba56 | jaraco/keyring | keyring/py27compat.py | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n# shut up useless SA warning:\nimport warnings\nwarnings.filterwarnings(\n 'ignore', 'Unicode type received non-unicode bind param value.')\n\nfrom dataset.persistence.util import sqlite_datetime_fix\nfrom dataset.persistence.... | python | edit | 1 | 3 | mit | a8b2f1ad738709fb49c5e3f9175822cc1bafa11d | askebos/dataset,twds/dataset,stefanw/dataset,vguzmanp/dataset,reubano/dataset,pudo/dataset,saimn/dataset | dataset/__init__.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport requests\n\nu = 'http://www.google.com/calendar/feeds/<EMAIL>/public/full?alt=json&max-results=100&futureevents=true'\n\ndata = requests.get(u).json()\nprint data.get('feed').get('title').get('$t')\n\nfor item in data.get('feed').get... | python | edit | 3 | 0 | mit | fb33fa9fef21bbe1e8d2d82dd986b69f8c3bdb64 | shoma/python.tools | jp-holidays.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom hypothesis import (\n given,\n settings,\n)\n\nfrom eth_abi import (\n encode_abi,\n decode_abi,\n encode_single,\n decode_single,\n)\n\nfrom tests.common.strategies import (\n multi_strs_values,\n single_strs_v... | python | edit | 1 | 1 | mit | 2bdd1d4c7ec3dc4013b193810f908dd83c1aab6b | pipermerriam/ethereum-abi-utils | tests/test_abi/test_reversibility_properties.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport datetime\nimport os\nimport json\nimport aiohttp\nfrom discord.ext import commands\n\nconfig = json.load(open('config.json'))\n\nclass Bot(commands.Bot):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kw... | python | edit | 1 | 4 | mit | e2e730c7f8fb8b0c536971082374171d1eacdf73 | r-robles/rd-bot | main.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport pytest\n\nimport os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"api.api.settings\")\n\nimport django\nfrom django.test import TestCase\nfrom scrapi.processing.postgres import PostgresProcessor, Document\n\nfrom . import util... | python | edit | 1 | 1 | apache-2.0 | 1f91a0eed0f336ac559cfbca5c4a86f313b48bb5 | erinspace/scrapi,erinspace/scrapi,fabianvf/scrapi,mehanig/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,felliott/scrapi,felliott/scrapi,fabianvf/scrapi,mehanig/scrapi | tests/test_postgres_processor.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division, print_function, unicode_literals\n\nfrom itertools import chain\nfrom ..._compat import unicode_compatible\nfrom ...utils import cached_prope... | python | edit | 1 | 3 | apache-2.0 | 5d39c34994d2c20b02d60d6e9f19cfd62310828b | miso-belica/sumy,miso-belica/sumy | sumy/models/dom/_paragraph.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n\nimport time\nfrom background import background\nfrom Kamaelia.UI.Pygame.Text import Textbox, TextDisplayer\nfrom LikeFile import LikeFile\nbackground().start()\n\nimport Queue\nTD = LikeFile(\n TextDisplayer(pos... | python | edit | 3 | 0 | apache-2.0 | 2d1798eb26614d87fca94efff25ea0384ae811b5 | sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia | Sketches/MPS/Experiments/Likefile2/likefile/TestLikeFile.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Build the project on AppVeyor.\n\nimport os\nfrom subprocess import check_call\n\nbuild = os.environ['BUILD']\nconfig = os.environ['CONFIG']\npath = os.environ['PATH']\ncmake_command = ['cmake', '-DFMT_PEDANTIC=ON',... | python | edit | 1 | 0 | bsd-2-clause | 0332284ce3ef43af7d3010688514f457ffaac774 | cppformat/cppformat,seungrye/cppformat,dean0x7d/cppformat,dean0x7d/cppformat,seungrye/cppformat,mojoBrendan/fmt,lightslife/cppformat,nelson4722/cppformat,lightslife/cppformat,blaquee/cppformat,alabuzhev/fmt,lightslife/cppformat,Jopie64/cppformat,cppformat/cppformat,seungrye/cppformat,wangshijin/cppformat,blaquee/cppfor... | support/appveyor-build.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom rq.decorators import job as _rq_job\n\nfrom .queues import get_queue\n\n\ndef job(func_or_queue, connection=None, *args, **kwargs):\n \"\"\"\n The same as RQ's job decorator, but it works automatically works out\n the ``connec... | python | edit | 1 | 6 | mit | ff73134e836b3950ba15410bac6e1bfe1dcd6d65 | ryanisnan/django-rq,viaregio/django-rq,lechup/django-rq,viaregio/django-rq,ui/django-rq,1024inc/django-rq,sbussetti/django-rq,meteozond/django-rq,sbussetti/django-rq,ryanisnan/django-rq,ui/django-rq,lechup/django-rq,mjec/django-rq,meteozond/django-rq,1024inc/django-rq,mjec/django-rq | django_rq/decorators.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\nimport ibei\n\nsetup(name=\"ibei\",\n version=ibei.__version__,\n author=\"Joshua Ryan Smith\",\n author_email=\"<EMAIL>\",\n packages=[\"ibei\", \"physicalproperty\... | python | edit | 1 | 0 | mit | 4a099c315800c2f348c5a5491c0728c6dcbba4ba | jrsmith3/ibei | setup.py | rejected_duplicate | Near-duplicate of sample 1991 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom datetime import datetime\n\nfrom celery.task import periodic_task\nfrom celery.schedules import crontab\n\nfrom corehq.util.datadog.gauges import datadog_counter\nfrom corehq.blobs.models import ... | python | edit | 1 | 3 | bsd-3-clause | d1a2a4c2ee7fda2bfde369bb6311719e72c75a3d | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/blobs/tasks.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis module defines substantial HPACK integration tests. These can take a very\nlong time to run, so they're outside the main test suite, but they need to be\nrun before every change to HPACK.\n\"\"\"\nfrom ... | python | edit | 1 | 5 | mit | 53b22654b015d1450fe124bc01a2f1bffba816a2 | Lukasa/hyper,masaori335/hyper,lawnmowerlatte/hyper,fredthomsen/hyper,irvind/hyper,lawnmowerlatte/hyper,masaori335/hyper,jdecuyper/hyper,irvind/hyper,fredthomsen/hyper,plucury/hyper,plucury/hyper,Lukasa/hyper,jdecuyper/hyper | test_hpack_integration.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#-----------------------------------------------------------------------------#\n# MODULE DESCRIPTION #\n#-----------------------------------------------------------------------------... | python | edit | 1 | 1 | unlicense | d98829d34e49b542097b113d17e6216199483986 | gruunday/useradm,gruunday/useradm,gruunday/useradm | rbopt.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n return ''\n\nsetup(\n name='todoist-python',... | python | edit | 1 | 2 | mit | 440fb64008c847b04dd872518bc723bc0ad4a34a | Doist/todoist-python | setup.py | rejected_duplicate | Near-duplicate of sample 2235 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport imp\nimport os\nfrom setuptools import setup\n\nver = imp.load_source('version',\n os.path.join(os.path.dirname(__file__), 'hessianfree',\n 'version.py')).__version__\n\nwith ope... | python | edit | 1 | 0 | bsd-2-clause | e18fbe4344083d4244e6b5b312240d580426b5b7 | drasmuss/hessianfree | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nAuthor: Ashish Gaikwad <<EMAIL>>\nCopyright (c) 2015 Ashish Gaikwad\n\nDescription: This daemon will execute command once\nInternet is connected. Then it will exit.\n\"\"\"\nimport socket\nfrom subprocess import call\nimport time\n\... | python | edit | 4 | 3 | mit | 4e2d0d037c6e028b0ff25042d4283c147801f0a2 | ashgkwd/brainy-beats,ashgkwd/brainy-beats | once-internet-is-on-d.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python,\n\nfrom setuptools import setup, find_packages\nimport versioneer\nsetup(\n version=versioneer.get_version(),\n cmdclass=versioneer.get_cmdclass(),\n name='conda-build-utils',\n description='toolset for an... | python | edit | 1 | 0 | bsd-3-clause | c4adbb8f213e39225092fa7abe978bdde5591edb | NSLS-II/lightsource2-recipes,NSLS-II/auto-build-tagged-recipes,NSLS-II/auto-build-tagged-recipes,NSLS-II/lightsource2-recipes,NSLS-II/lightsource2-recipes,NSLS-II/lightsource2-recipes | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding: utf-8\n\nfrom os.path import join, dirname\nfrom setuptools import setup\n\n\nwith open(join(dirname(__file__), 'README.rst')) as f:\n long_description = f.read()\n\nsetup(\n name='django-speedinfo',\n version='1.0.1',\n ... | python | edit | 1 | 0 | mit | 4bf9c53b6cbb02889e721d8180a2d20b979bf8d5 | catcombo/django-speedinfo,catcombo/django-speedinfo,catcombo/django-speedinfo | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nfrom perfection import __version__ as VERSION\n\nsetup(\n name='perfection',\n version=VERSION,\n url='https://github.com/eddieantonio/perfection',\n license='MIT',\n author='Eddie Antonio Sa... | python | edit | 1 | 0 | mit | 86b447be632c18292369c100f93d3c036231b832 | eddieantonio/perfection | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nversion = '0.14.dev0'\n\nlong_description = '\\n\\n'.join([\n open('README.rst').read(),\n open('CREDITS.rst').read(),\n open('CHANGES.rst').read(),\n ])\n\ninstall_requires = [\n 'Django',\n ... | python | edit | 1 | 0 | mit | 70f58979b17bb20282ac37daf298dbe0b506973f | lizardsystem/lizard-auth-client,lizardsystem/lizard-auth-client,lizardsystem/lizard-auth-client | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n'''A setuptools based installer for proptools.\n\nBased on https://github.com/pypa/sampleproject/blob/master/setup.py\n\nMatt Vernacchia\nproptools\n2016 Sept 21\n'''\n\n# Always prefer setuptools over distutils\nfrom setuptools import setu... | python | edit | 3 | 0 | mit | 2a084d4efcd59ba599d56376770748ccbae117ab | mvernacc/proptools | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\n__version__ = '0.1'\n\nsetup_args = {\n 'name': 'hera_librarian',\n 'author': 'HERA Team',\n 'license': 'BSD',\n 'packages': ['hera_librarian'],\n 'scripts': [\n 'scripts/add_librari... | python | edit | 2 | 0 | bsd-2-clause | 9915097d9f53ac7fec7748ee221bb63a01638c9b | HERA-Team/librarian,HERA-Team/librarian,HERA-Team/librarian | 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 = 'robotframework-serverspeclibrary',\n version = '0.2',\n description = 'Server spec on Robot Framework inspired from Serverspec on Ruby',\n url = 'https://github.com... | python | edit | 3 | 0 | mit | 1a3f5a4f4af85ccdff4d4d49962b276d7dc5a5dd | wingyplus/robotframework-serverspeclibrary,wingyplus/robotframework-serverspeclibrary | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\n\nauthor = 'Michael Maurizi'\nauthor_email = '<EMAIL>'\n\nsetup(\n name='django-tinsel',\n version='0.1.0',\n description='A python module for decorating function-based Django views',\n ... | python | edit | 1 | 0 | apache-2.0 | 195a0d853bd8add0d0955b8f5e681d8c8b0016c6 | azavea/django-tinsel,azavea/django-tinsel | 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\nfrom distutils.extension import Extension\nfrom Cython.Distutils import build_ext\n\n# Complain on 32-bit systems. See README for more details\nimport struct\nif struct.calcsize('P... | python | edit | 1 | 0 | mit | 761b155dffaba55e927a32a99aef7312290c22c1 | pombredanne/simhash-py,seomoz/simhash-py,pombredanne/simhash-py,seomoz/simhash-py | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\ndef install():\n desc = 'A Python client library for nyaa.se!',\n setup(\n name='py-nyaa',\n version='1.0',\n description=desc,\n long_d... | python | edit | 1 | 1 | mit | 271f73f83759b40e6bac5595941b4b3616345886 | ssut/py-nyaa | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#\n# setup.py\n#\n# Copyright (c) 2013 Luis Garcia.\n# This source file is subject to terms of the MIT License. (See file LICENSE)\n#\n\n\"\"\"Setup script for the scope library.\"\"\"\n\nfrom distutils.core import setup\n\nNAME = 'scope'\n... | python | edit | 1 | 0 | mit | cf3322e1e85418e480f75d960244e506c0df4505 | lrgar/scope | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\ntry:\n long_description = open(\"README.md\").read()\nexcept IOError:\n long_description = \"\"\n\nsetup(\n name=\"vania\",\n version=\"0.1.0\",\n descri... | python | edit | 1 | 1 | mit | 31d61511f5342f78cc8e6c31ff281aea8ed804b7 | Hackathonners/vania | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\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 obt... | python | edit | 1 | 0 | mit | 02c26a2ced9348e10504ffbac2dd7cca69ded3c0 | openstack/sqlalchemy-migrate,rcherrueau/sqlalchemy-migrate,stackforge/sqlalchemy-migrate,openstack/sqlalchemy-migrate,rcherrueau/sqlalchemy-migrate | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom distutils.core import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='whack',\n version='0.3.4',\n description='Utility fo... | python | edit | 1 | 1 | bsd-2-clause | a921605204a7a89839ef01f0b76d62cfacd3af25 | mwilliamson/whack | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:\n readme = f.read()\n\nsetup(\n name='ctop',\n version='1.0.0',\n description='A lightwei... | python | edit | 1 | 0 | mit | 4ae89d7a3adf9541c7e1fb202aabdf15489289a6 | yadutaf/ctop | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup, find_packages\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file_... | python | edit | 3 | 0 | apache-2.0 | 36323768087a716fdc61f9991c761d64c15a9cf1 | bkawula/django-swiftbrowser,bkawula/django-swiftbrowser,bkawula/django-swiftbrowser,bkawula/django-swiftbrowser | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# encoding: utf-8\nimport sys\n\nfrom setuptools import setup\n\n\ndef read_description():\n with open('README.md', 'r', encoding='utf-8') as f:\n return f.read()\n\n\nsetup(\n name='Inject',\n version='4.1.1',\n url='htt... | python | edit | 3 | 1 | apache-2.0 | e69c47fb47535ee19310f7e5aa4bfb744bf0c627 | ivankorobkov/python-inject | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom contributor import Contributor\nfrom daterange import Date_Range\nfrom defined_object import DefinedObject\nfrom personnel import Personnel\n\n\n```\n\nApply this change: Remove underscore from class name."
},
{
"role": "assist... | python | edit | 6 | 0 | bsd-3-clause | 214d788073532c1ae2aecea1a61dc35e08d5e78f | CybOXProject/python-cybox | cybox/common/__init__.py | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(name='windpowerlib',\n version='0.2.0dev',\n description='Creating time series of win... | python | edit | 1 | 1 | mit | 172d3eecfbd92671a941303eff777436780c7d5e | wind-python/windpowerlib | setup.py | rejected_duplicate | Near-duplicate of sample 5713 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom os import environ\nfrom unittest import TestCase\n\nenviron['DJANGO_SETTINGS_MODULE'] = 'test_settings'\nfrom incuna_auth.middleware import LoginRequiredMiddleware\n\n\nclass AuthenticatedUser(object):\n def is_authenticated(self):\... | python | edit | 1 | 1 | bsd-2-clause | 8c46e91ec66fc1ee15f037109e78030c2fcd1bf8 | incuna/incuna-auth,incuna/incuna-auth,ghickman/incuna-auth,ghickman/incuna-auth | tests/test_middleware.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(\n name='ckanapi',\n version='3.3-dev',\n description=\n 'A command line interface and Python module for '\n 'accessing the CKAN Action API',\n license... | python | edit | 1 | 0 | mit | 44fd612067f7cac357db76ec21a6e03403f84015 | LaurentGoderre/ckanapi,xingyz/ckanapi,perceptron-XYZ/ckanapi,eawag-rdm/ckanapi,wardi/ckanapi,metaodi/ckanapi | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport unittest\nimport http.client\nimport time\n\nclass TestStringMethods(unittest.TestCase):\n\n def test_404NoConfig(self):\n connRouter = http.client.HTTPConnection(\"localhost\", 8666)\n connConfig = http.client.HTTPC... | python | edit | 4 | 1 | apache-2.0 | 3f9a6944763a75171388c3c8b812d71bf45c1219 | dhiaayachi/dynx,dhiaayachi/dynx | test/test_integration.py | rejected_lint | Too many lint violations: 4 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='broadbean',\n version='0.9',\n\n # We might as well require what we know will work\n # although older numpy and matplotlib version will probably work too\n install_requires=['num... | python | edit | 1 | 0 | mit | ef2763b0bf47d659cc8c57cdda19286feb35cb44 | WilliamHPNielsen/broadbean | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nimport conveyor\n\n\ninstall_requires = [\n \"APScheduler\",\n \"forklift\",\n \"PyYAML\",\n \"redis\",\n \"xmlrpc2\",\n]\n\nsetup(\n name=\"conveyor\",... | python | edit | 1 | 0 | bsd-2-clause | b4ebc0ce26a1b0e77ced117be1c18c43364cd27d | crateio/carrier | setup.py | rejected_duplicate | Near-duplicate of sample 14185 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\nsetup(\n name='python-cephclient',\n packages=['cephclient'],\n version='0.1.0.5',\n url='https://github.com/dmsimard/python-cephclient',\n author='David Moreau Simard',\n author_email='<EMA... | python | edit | 1 | 0 | apache-2.0 | 1f75b173b85cc107e7bdb3be4629e7916a9851d9 | dmsimard/python-cephclient | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"Set up script\"\"\"\nfrom setuptools import setup\nimport os\n\n\ndef _create_long_desc():\n \"\"\"Create long description and README formatted with rst.\"\"\"\n _long_desc = ''\n if os.path.isfile('README.md'):\n with... | python | edit | 1 | 3 | mit | 38f36398cf7862d22e3fa0f1047446b6d5e9ce17 | pyohei/cronquot,pyohei/cronquot | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport sys\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n def finalize_options(self):\n # XXX sometimes TestCommand is not a newstyle class\n TestCom... | python | edit | 1 | 1 | mit | 45c60c3eb2b13a028470ca41fe518562028213f7 | ravishi/rdio-dl | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport re\n\nfrom setuptools import setup, find_packages\n\n\nINIT_FILE = 'pg_grant/__init__.py'\ninit_data = open(INIT_FILE).read()\n\nmetadata = dict(re.findall(\"__([a-z]+)__ = '([^']+)'\", init_data))\n\nVERSION = metadata['version']\nL... | python | edit | 1 | 0 | mit | 53521d92b14603229521840d48e5b10b8882011c | RazerM/pg_grant,RazerM/pg_grant | 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='panoptes_client',\n url='https://github.com/zooniverse/panoptes-python-client',\n author='Adam McMaster',\n author_email='<EMAIL>',\n version='1.1.1',\n package... | python | edit | 1 | 0 | apache-2.0 | 34d4cb8826394c408da41e42f7331ee71aba85dc | zooniverse/panoptes-python-client | setup.py | rejected_duplicate | Near-duplicate of sample 5694 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport codecs\n\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\ndef read(*parts):\n filename = path.join(path.dirname(__file__), *parts)\n with codecs.open(filename, encoding=\"utf-8\") as fp:\n return fp... | python | edit | 1 | 1 | mit | 43447fd417adc475f5e077d75cc81b14083c097a | pinax/pinax-starter-app | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup, find_packages\nfrom version import get_git_version\n\nsetup(name='thecut-durationfield',\n author='The Cut', author_email='<EMAIL>',\n url='http://projects.thecut.net.au/projects/thecut-durationfield',\n ... | python | edit | 1 | 0 | apache-2.0 | 02e92e5989f140cca86b6826f6be57f240f54b9f | thecut/thecut-durationfield,mighty-justice/thecut-durationfield | 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 read_file(filename):\n \"\"\"Read a file into a string\"\"\"\n path = os.path.abspath(os.path.dirname(__file__))\n filepath = os.path.join(path, filename)\n try:\n ... | python | edit | 1 | 2 | bsd-3-clause | 6924917e5b5d62d330c8f21774d1871e4fd4e746 | caktus/django-app-template | setup.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\n\ndef reqs_from_file(filename):\n with open(filename) as f:\n lineiter = (line.rstrip() for line in f)\n return filter(None, lineiter)\n\n\nsetup(\n name='git-tool... | python | edit | 1 | 2 | mit | ab97b48a0e1e80967a6d14ac3996a4288b6003e6 | hughdbrown/git-tools | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import with_statement\nimport os\nfrom setuptools import setup\n\n\nthis_dir = os.path.dirname(__file__)\n\nwith open(os.path.join(this_dir, 'src', 'pydocstyle', 'utils.py')) as f:\n for line in f:\n if line.starts... | python | edit | 1 | 0 | mit | 490edfaab48ec010f53e1653c2ec4593fcd11a44 | farmersez/pydocstyle,Nurdok/pydocstyle,PyCQA/pydocstyle,GreenSteam/pep257,Nurdok/pep257 | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import find_packages, setup\n\nfrom virtualenvapi import __version__\n\nsetup(\n name='virtualenv-api',\n version=__version__,\n license='BSD',\n author='Sam Kingston and AUTHORS',\n author_email='<EMAIL>',\n ... | python | edit | 1 | 0 | bsd-2-clause | ee4862e88f5cc726f0974b31b05deb599bbe9422 | sjkingo/virtualenv-api | setup.py | rejected_duplicate | Near-duplicate of sample 14522 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# -*- coding: utf-8 -*-\n\n# HACK for `nose.collector` to work on python 2.7.3 and earlier\nimport multiprocessing\nfrom setuptools import setup, find_packages\n\nsetup(name='quantized-mesh-tile',\n version='0.0.1',\n description=... | python | edit | 3 | 0 | mit | df66df626012bab0cf6a5887e7f11ca64ca9d02c | loicgasser/quantized-mesh-tile | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\nimport os\n\nf = open(\"README.rst\")\ntry:\n try:\n readme_text = f.read()\n except:\n readme_text = \"\"\nfinally:\n f.close()\n\nsetup(name=\"ftptool\", version=\"0.2\",\n url=\... | python | edit | 3 | 0 | bsd-3-clause | e2e0600d111ca871141a1522c3c5356622db922d | bloggse/ftptool | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom setuptools import setup\n\n\nsetup(name='glreg',\n version='0.9.0',\n description='OpenGL XML API registry parser',\n url='https://github.com/pyokagan/pyglreg',\n author='Paul Tan',\n author_email='<EMAIL>',\n ... | python | edit | 1 | 0 | mit | 8e1d07fd4ae8a2415a133fa46555869238bacaf2 | pyokagan/pyglreg,pyokagan/pyglreg | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# coding:utf-8\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'qsctl',\n version = '1.0.2',\n description = 'Advanced command line tool for QingStor.',\n long_description = open('README.rst', 'rb').read().deco... | python | edit | 1 | 0 | apache-2.0 | 3073a03e7d2d801226c525e574f9bba295e12ddd | yunify/qsctl,Fiile/qsctl | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\"\"\"\nsentry-twilio\n=============\n\nA plugin for Sentry which sends SMS notifications via Twilio.\n\n:copyright: (c) 2012 by Matt Robenolt\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom setuptools imp... | python | edit | 1 | 0 | bsd-2-clause | 93017638db261e223aed7e07a8bc02f344bcc4a9 | mattrobenolt/sentry-twilio | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom distutils.core import setup\n\nsetup(\n name='Supermega',\n version='0.1.0',\n author='Lorenz Bauer',\n packages=['supermega', 'supermega.schemata'],\n # scripts=['bin/*.py'],\n # url='http://pypi.python.org/pypi/Towe... | python | edit | 1 | 0 | bsd-3-clause | 297ba0a2a3e1d91031093881bcd8d57977e9597c | lmb/Supermega | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nimport sys\n\nfrom setuptools import setup\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n sys.exit()\n\nimport quill\n\nwith open('README.md', 'r') as readme_file:\n readme = readme_file.r... | python | edit | 1 | 0 | bsd-3-clause | 9c71195ac286da6fabc854b58145a08fe0a9daf1 | gsmke/django-quill,gsmke/django-quill,gsmke/django-quill | setup.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom base64 import b64encode\n\nfrom django.conf import settings\n\nfrom mail_factory.messages import EmailMultiRelated\n\n\nclass PreviewMessage(EmailMultiRelated):\n def has_body_html(self):\n \"\"\"Test if a message contains an... | python | edit | 3 | 2 | bsd-3-clause | dad401390178c9f96a0a68f1fa9e5c82304ad60d | novafloss/django-mail-factory,novafloss/django-mail-factory | mail_factory/previews.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom .models import BlogPost, Comment\nfrom django.forms import ModelForm\n\nclass BlogPostForm(ModelForm):\n class Meta:\n model = BlogPost\n exclude = ('user',)\n\nclass CommentForm(ModelForm):\n class Meta:\n m... | python | edit | 1 | 0 | mit | 3ac532d719472c634bcddd21c146d80ccb217f4c | andreagrandi/bloggato,andreagrandi/bloggato | blog/forms.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import (absolute_import, division, print_function)\n\nimport subprocess\nimport tempfile\n\n\ndef test_call():\n output = subprocess.check_output(['yaml2ncml', 'roms_0.yaml'])\n with open('base_roms_test.ncml') as f:\n... | python | edit | 1 | 1 | mit | ba4a20ee94355464ec8b35750660f7b8fe0cc3db | ocefpaf/yaml2ncml,USGS-CMG/yaml2ncml | tests/test_yaml2ncml.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport subprocess\nimport argparse\n\n__version__ = 1.0\n__description__ = \"A tmux wrapper featuring shortcuts and session presets.\"\n\n\ndef main(argv):\n parser = argparse.Arg... | python | edit | 1 | 5 | mit | 3045f6ffbd8433d60178fee59550d30064015b46 | ethanal/tm | tm/tm.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\nfrom contextlib import contextmanager\n\n\n@contextmanager\ndef effective_user(uid, gid):\n \"\"\"\n A ContextManager that executes code in the with block with effective uid / gid given\n \"\"\"\n original_uid = os.ge... | python | edit | 1 | 2 | mit | 6683bf5e248bdd52f0ebc175dc7c94d5677ba6dd | wikimedia/operations-software-tools-manifest | tools/manifest/utils.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport operator\n\n\ndef math_method(name, right=False):\n def wrapper(self, other):\n value = self.value\n math_func = getattr(operator, name)\n\n if right:\n value, other = other, value\n\n result... | python | edit | 1 | 3 | mit | a06c3845b2e827ff34bdd34844db39a74826f123 | malexer/meteocalc | meteocalc/mimicfloat.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"A stub for the gopigo module.\"\"\"\n\ncalls = []\n\ndef servo(angle):\n\tcalls.append('servo({0})'.format(angle))\n\ndef set_speed(speed):\n\tcalls.append('set_speed({0}'.format(speed))\n\ndef stop():\n\tcalls.append('stop()')\n\ndef... | python | edit | 1 | 1 | mit | 42710918df931a6839364e58548dcce2d1346324 | RLGarner1/robot_maze,mattskone/robot_maze | src/tests/gopigo_stub.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom caffe2.python import core\nfrom hypothesis import given\nimport caffe2.python.hy... | python | edit | 1 | 1 | apache-2.0 | 004345f50edd4c4b08727efaf5de7ee60f1f1e48 | sf-wind/caffe2,xzturn/caffe2,sf-wind/caffe2,pietern/caffe2,sf-wind/caffe2,xzturn/caffe2,Yangqing/caffe2,Yangqing/caffe2,davinwang/caffe2,sf-wind/caffe2,xzturn/caffe2,pietern/caffe2,bwasti/caffe2,sf-wind/caffe2,bwasti/caffe2,davinwang/caffe2,davinwang/caffe2,xzturn/caffe2,pietern/caffe2,pietern/caffe2,davinwang/caffe2,Y... | caffe2/python/operator_test/softplus_op_test.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright (c) 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\"\"\"Top-level presubmit script for catapult.\n\nSee https://www.chr... | python | edit | 1 | 1 | bsd-3-clause | 5eb9c9bf89904f25785955050d991bd4ec20db66 | SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,catapult-project/catapult-csm,benschmaus/catapult,SummerLW/Perf-Insight-Report,scottmcmaster/catapult,catapult-project/catapult-csm,danbeam/catapult,benschmaus/catapult,scottmcmaster/catapult,benschmaus/catapult,benschmaus/catapult,modulexcite/catapult,catapult... | PRESUBMIT.py | rejected_duplicate | Near-duplicate of sample 6776 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport os\n\nfrom appconf import AppConf\nfrom django.conf import settings\n\n\nclass DjExperimentAppConf(AppConf):\n DATA_DIR = \"./\"\n BASE_DATA_DIR = os.path.join(settings.BASE_DIR, 'data')\n SEPARATOR = \".\"\n OUTPUT_PREFI... | python | edit | 1 | 0 | mit | a8b4553b76f3303017818e60df5504445a6556d0 | francbartoli/dj-experiment,francbartoli/dj-experiment | dj_experiment/conf.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nimport imp\nimport json\nimport sys\n\n\ndef run(task, inputs, outputs, task_inputs, task_outputs, **kwargs):\n custom = imp.new_module(\"custom\")\n\n for name in inputs:\n custom.__dict__[name] = inputs[name][\"script_data\"]... | python | edit | null | null | apache-2.0 | aafb16a0f96f31a5371ae19bfc1dfc38cc2bb878 | Kitware/romanesco,girder/girder_worker,girder/girder_worker,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,girder/girder_worker | romanesco/executors/python.py | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\n\nimport sys\n\nimport networkx as nx\n\nfrom matplotlib import pyplot\n\nfrom davies.compass.plt import CompassPltParser\n\n\ndef pltparser(pltfilename):\n parser = CompassPltParser(pltfilename)\n plt = parser.... | python | edit | 1 | 6 | mit | 978b812c9db8c11098aa38b7c630a61cac5574b8 | riggsd/davies | examples/pltparser.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n#!/usr/bin/env python\nfrom __future__ import print_function, absolute_import, division\n\nimport os\nimport shutil\nimport subprocess\nimport tempfile\nimport time\nimport unittest2\n\nclass ShutdownDaemonTests(unittest2.TestCase):\n de... | python | edit | 1 | 1 | apache-2.0 | fd3ee57a352fd815d2746f3a72196ac62fdceb5c | ImmobilienScout24/succubus | src/integrationtest/python/shutdown_daemon_tests.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n# Copyright 2019 Google LLC\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.... | python | edit | 7 | 0 | apache-2.0 | 686a71b4493adf39ed0b9335a1c8f83cf8ce5bfe | google/ml-metadata,google/ml-metadata,google/ml-metadata,google/ml-metadata | ml_metadata/__init__.py | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom django.db import models\nfrom django.contrib.auth.models import User\nimport datetime\n\ndef default_expiry_time():\n return datetime.datetime.now() + datetime.timedelta(days=1)\n\ndef random_string():\n return User.objects.make_rand... | python | edit | 1 | 2 | mit | 055c15a8e837014bb74a601df776eae642edfd61 | ndevenish/auth_mac | auth_mac/models.py | rejected_duplicate | Near-duplicate of sample 2310 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n__author__ = 'weijia'\n\n\nINSTALLED_APPS += (\n 'mptt',\n 'django_mptt_admin',\n 'tagging',\n 'ajax_select',\n 'django_extensions',\n 'geoposition',\n 'obj_sys',\n # \"obj_sys.apps.ObjSysConfig\",\n)\n\nTEMPLATE_CON... | python | edit | 3 | 0 | bsd-3-clause | 97a068d7a83fffd6ed9307ac33da3835e449a935 | weijia/obj_sys,weijia/obj_sys | obj_sys/default_settings.py | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\n\"\"\"\nNon-init module for doing convenient * imports from.\n\"\"\"\n\nfrom confab.diff import diff\nfrom confab.generate import generate\nfrom confab.pull import pull\nfrom confab.push import push\n\n```\n\nApply this change: Add loaders ... | python | edit | 10 | 0 | apache-2.0 | 4c2b4d10beac508747364680d9e9a5d7c3488f97 | locationlabs/confab | confab/api.py | rejected_lint | Too many lint violations: 10 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```python\nfrom mangopaysdk.types.payinexecutiondetails import PayInExecutionDetails\n\n\nclass PayInExecutionDetailsDirect(PayInExecutionDetails):\n \n def __init__(self):\n # direct card\n self.CardId = None\n self.Sec... | python | edit | 1 | 1 | mit | bc20949f8e5461d6ffa901d24677acb1bae922dd | chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk | mangopaysdk/types/payinexecutiondetailsdirect.py | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.