conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add regression test for base_fieldsets fix.\n" }, { "from": "human", "value": "from django.test import TestCase\n\n# Create your tests here.\n" }, { "from": "gpt", "value": "import re\nfrom django.contrib.admin.sites import AdminSite\nfrom django_webtest...
python
chosen
[ { "from": "system", "value": "Fix bug in gather-metadata-plot script\n" }, { "from": "human", "value": "\"\"\"Plot metadata info\n\n{{header}}\n\"\"\"\nfrom subprocess import run\n\nimport numpy as np\nimport seaborn as sns\nfrom matplotlib import pyplot as plt\n\nfrom msmbuilder.io import load_...
python
chosen
[ { "from": "system", "value": "Update name of url mapping for ProjectEntriesListAPIView\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom django.conf.urls impo...
python
chosen
[ { "from": "system", "value": "Switch to using python standard library importlib\n\nAvailable in Python 2.7+, which is all that Gargoyle now supports. The Django version is removed in 1.9.\n" }, { "from": "human", "value": "\"\"\"\ngargoyle\n~~~~~~~~\n\n:copyright: (c) 2010 DISQUS.\n:license: Apa...
python
chosen
[ { "from": "system", "value": "Use a level of indirection for helpful error messages\n" }, { "from": "human", "value": "import abc\nimport copy\nimport werkzeug.routing\n\n\nclass Endpoint(metaclass=abc.ABCMeta):\n @abc.abstractproperty\n def url(self):\n pass\n\n @abc.abstractcla...
python
chosen
[ { "from": "system", "value": "Update to use inheritance for GameObject\n" }, { "from": "human", "value": "from flask import request\nfrom flask.views import MethodView\nfrom flask_helpers.build_response import build_response\nfrom flask_helpers.ErrorHandler import ErrorHandler\nfrom python_cowbu...
python
chosen
[ { "from": "system", "value": "Implement Darkshire Alchemist, Shifting Shade, Power Word: Tentacles\n" }, { "from": "human", "value": "from ..utils import *\n\n\n##\n# Minions\n\n\n" }, { "from": "gpt", "value": "from ..utils import *\n\n\n##\n# Minions\n\nclass OG_234:\n\t\"Darkshire...
python
chosen
[ { "from": "system", "value": "Fix the Metronome integration test\n" }, { "from": "human", "value": "def test_metronome(dcos_api_session):\n job = {\n 'description': 'Test Metronome API regressions',\n 'id': 'test.metronome',\n 'run': {\n 'cmd': 'ls',\n ...
python
chosen
[ { "from": "system", "value": "Make @worker available for import on ass.ets.\n" }, { "from": "human", "value": "\nfrom bundles import Environment, Assets, Bundle, Manifest\nimport filters as f\nfrom options import Option, Options, Undefined, dict_getter\n\n" }, { "from": "gpt", "value...
python
chosen
[ { "from": "system", "value": "Move setUp and tearDown methods into general FormTestCase class\n" }, { "from": "human", "value": "import unittest\n\nfrom app import create_app, db\nfrom app.utils.forms import RedirectForm\n\n\nclass TestRedirectForm(unittest.TestCase):\n def setUp(self):\n ...
python
chosen
[ { "from": "system", "value": "Add ability to access all 'objects' and only 'active' users\n" }, { "from": "human", "value": "\"\"\"Models.\"\"\"\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\n\n# Create your models here.\n\n\nclass ImagerProfile(models.Model):\n ...
python
chosen
[ { "from": "system", "value": "Fix API type & method name for picking values\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n# © 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>\n# © 2013 Camptocamp SA (author: Guewen Baconnier)\n# © 2016 Sodexis\n# License AGPL-3.0 or later...
python
chosen
[ { "from": "system", "value": "Fix color escapes on Windows\n\nFixes #813\n" }, { "from": "human", "value": "\"\"\" CLI logger \"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\n\nimport coloredlogs\nimport requests\n\n\ndef init_logger(log_requests=False):\n \"\"\" Initialize ...
python
chosen
[ { "from": "system", "value": "Add `clowder save` logic to Cement controller\n" }, { "from": "human", "value": "from cement.ext.ext_argparse import expose\n\nfrom clowder.cli.abstract_base_controller import AbstractBaseController\n\n\nclass SaveController(AbstractBaseController):\n class Meta:...
python
chosen
[ { "from": "system", "value": "Add C++ compilation flag to ensure deterministic behavior\n\nMore information: https://github.com/spotify/annoy/pull/205\n" }, { "from": "human", "value": "import distutils.core\nimport distutils.extension\n\nimport Cython.Distutils\nimport numpy as np\n\ncompile_ar...
python
chosen
[ { "from": "system", "value": "Reduce MAX_FLIGHTS on screen to 10.\n" }, { "from": "human", "value": "\n\n# Maximum airports to return as JSON.\nMAX_AIRPORTS = 100 \n\n# Maximum flights to return as JSON.\nMAX_FLIGHTS = 100 \n\n# Pixel size of gravatar icons.\nGRAVATAR_SIZE = 32 \n" }, { ...
python
chosen
[ { "from": "system", "value": "Add simple test for WM ontology mapping\n" }, { "from": "human", "value": "from indra.statements import Influence, Concept\nfrom indra.preassembler.ontology_mapper import OntologyMapper, wm_ontomap\n\n\ndef test_map():\n c1 = Concept('x', db_refs={'UN': [('entiti...
python
chosen
[ { "from": "system", "value": "Set default log level to INFO\n" }, { "from": "human", "value": "from __future__ import absolute_import\n\nfrom ddsc_incron.celery import celery\n\n# Note that logging to a single file from multiple processes is NOT supported.\n# See: http://docs.python.org/2/howto/...
python
chosen
[ { "from": "system", "value": "Use imperative import to avoid lint (import order) and as a good convention when side-effects is the intention.\n" }, { "from": "human", "value": "from .api import (\n Distribution, PackageNotFoundError, distribution, distributions,\n entry_points, files, meta...
python
chosen
[ { "from": "system", "value": "Fix variable for input string\n" }, { "from": "human", "value": "from future.builtins import ( # noqa\n bytes, dict, int, list, object, range, str,\n ascii, chr, hex, input, next, oct, open,\n pow, round, filter, map, zip)\n\nimport re\n\n__author__ = 'suk...
python
chosen
[ { "from": "system", "value": "Add uploaded file removal endpoint\n\n" }, { "from": "human", "value": "import virtool.file\nfrom virtool.handlers.utils import json_response\n\n\nasync def find(req):\n db = req.app[\"db\"]\n\n cursor = db.files.find({\"eof\": True}, virtool.file.LIST_PROJECT...
python
chosen
[ { "from": "system", "value": "Add path to data directory\n" }, { "from": "human", "value": "\"\"\"Tests for running TopoFlow components in CMI.\"\"\"\nimport os\n\n\ndef locate_topoflow(cache_dir):\n for x in os.listdir(cache_dir):\n if x.startswith('topoflow'):\n return x\n...
python
chosen
[ { "from": "system", "value": "Add flag about Py2 monkeypatch for tests\n" }, { "from": "human", "value": "# -*- 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, setti...
python
chosen
[ { "from": "system", "value": "Replace wget with curl to avoid Heroku buildpack sadness\n" }, { "from": "human", "value": "import os\nimport datetime\n\ncurrent_year = datetime.datetime.now().year\nyears_with_data = range(2011, current_year + 1)\nremote_path = \"https://ssl.netfile.com/pub2/excel...
python
chosen
[ { "from": "system", "value": "Add boto ParamValidationError to exc list\n" }, { "from": "human", "value": "from functools import wraps\n\nimport botocore.exceptions\n\nfrom click import ClickException\n\n\nEXC_TO_ECHO = [\n botocore.exceptions.NoRegionError,\n]\n\n\ndef handle_exception(func)...
python
chosen
[ { "from": "system", "value": "[Python] Add strikes support when rolling\n" }, { "from": "human", "value": "class Game():\n def __init__(self):\n self._rolls = [0] * 21\n self._current_roll = 0\n\n def roll(self, pins):\n self._rolls[self._current_roll] += pins\n ...
python
chosen
[ { "from": "system", "value": "Fix handling of invalid parameters\n" }, { "from": "human", "value": "from django.utils import timezone\n\n\ndef get_requested_time(request):\n query = request.GET\n month, year = query.get('month', None), query.get('year', None)\n\n if month and year:\n ...
python
chosen
[ { "from": "system", "value": "Remove dependency on openid in the base template (bis)\n\nFixes #1357\n" }, { "from": "human", "value": "def get_url():\n return reverse('openid-provider-xrds')\n\ndef openid_meta(request):\n context = {\n 'openid_server': context['request'].build_absol...
python
chosen
[ { "from": "system", "value": "Prepare for Codemotion Rome 2017 demo\n" }, { "from": "human", "value": "# -*- 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 ...
python
chosen
[ { "from": "system", "value": "Make task event-list filters mutually exclusive\n" }, { "from": "human", "value": "import 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...
python
chosen
[ { "from": "system", "value": "scripts: Fix the script to send proper format of compose id\n\nSigned-off-by: Sayan Chowdhury <5f0367a2b3b757615b57f51d912cf16f2c0ad827@gmail.com>\n" }, { "from": "human", "value": "#!/bin/env python\n# -*- coding: utf8 -*-\n\"\"\" Triggers an upload process with th...
python
chosen
[ { "from": "system", "value": "Change to cmake to 3.4 and test sys.platform to choose lib extension to resolve import error on MacOSX\n" }, { "from": "human", "value": "import ctypes\nimport numpy as np\nimport os\n\n__all__ = ['square']\n\nlib = ctypes.cdll.LoadLibrary(\"libfoo.so\")\nlib.square...
python
chosen
[ { "from": "system", "value": "Add explicit fields on EventSerializer\n" }, { "from": "human", "value": "from .models import Event, EventActivity\nfrom rest_framework import serializers\n\n\nclass EventSerializer(serializers.ModelSerializer):\n class Meta(object):\n model = Event\n ...
python
chosen
[ { "from": "system", "value": "Test fails on shining panda py32 only. May be a race condition (wait_for using same loop interval as timer interval). Checking in for testing.\n" }, { "from": "human", "value": "# Module: test_timers\n# Date: 10th February 2010\n# Author: James Mills, prolog...
python
chosen
[ { "from": "system", "value": "Disable Paypal, up Direct debit\n" }, { "from": "human", "value": "from bluebottle.payments_docdata.settings import DOCDATA_SETTINGS, DOCDATA_PAYMENT_METHODS\n\nPAYMENT_METHODS = DOCDATA_PAYMENT_METHODS\nVAT_RATE = 0.21\n" }, { "from": "gpt", "value": "f...
python
chosen
[ { "from": "system", "value": "Update boto on the server\n" }, { "from": "human", "value": "\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/pymod...
python
chosen
[ { "from": "system", "value": "Revert \"Remove apparently superfluous call to fill_recommended_bugs_cache.\"\n\nThis reverts commit 83ca8575e68fe9b2b59431e73e94b3247e3485d4.\n" }, { "from": "human", "value": "import datetime\nimport logging\n\nfrom django.core.management.base import BaseCommand\n...
python
chosen
[ { "from": "system", "value": "Fix app path for functional tests for silverlight\n" }, { "from": "human", "value": "# coding: utf-8\nimport os\n\nBUILD_CONFIG = os.environ.get('BUILD_CONFIG', 'Debug')\n\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\nAUT_PATH = r\"..\\TestApp.Silverlight\...
python
chosen
[ { "from": "system", "value": "Use the object instead of the class\n" }, { "from": "human", "value": "from 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 ...
python
chosen
[ { "from": "system", "value": "Bump up version to 3.0.0rc1\n" }, { "from": "human", "value": "# -*- 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__ = \"M...
python
chosen
[ { "from": "system", "value": "Make code comply to PEP8\n" }, { "from": "human", "value": "#\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 + ...
python
chosen
[ { "from": "system", "value": "Use python interpreter instead of sys.executable\n" }, { "from": "human", "value": "\"\"\"\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 \"\"\...
python
chosen
[ { "from": "system", "value": "Order radar view more sensibly\n\n1. Sort with by date_seen DESC so new stuff is at the top\n and old stuff is at the bottom\n2. Sort by id as secondary criteria so order is consistent\n otherwise the order changes a bit every time we make an edit\n" }, { "from": "h...
python
chosen
[ { "from": "system", "value": "Add missing import path failing linting\n" }, { "from": "human", "value": "import 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 ...
python
chosen
[ { "from": "system", "value": "Add heuristic when Phi expr fails\n" }, { "from": "human", "value": "\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 = [s...
python
chosen
[ { "from": "system", "value": "Fix typo in build system\n" }, { "from": "human", "value": "\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() == \...
python
chosen
[ { "from": "system", "value": "Remove copy from the validator\n\nWe are not providing default values to the configuration object. Those\nare distributed with the package; the expected behavior is to throw an\nexception if the options are not explicitly passed.\n" }, { "from": "human", "value": "i...
python
chosen
[ { "from": "system", "value": "Fix articles test, used test initial_data\n" }, { "from": "human", "value": "#!/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.c...
python
chosen
[ { "from": "system", "value": "Drop job env backup cleanup dependence on osg-configure\n\nWe already dropped the creation of the job env files in 840ea8\n" }, { "from": "human", "value": "#pylint: disable=C0301\n#pylint: disable=C0111\n#pylint: disable=R0201\n#pylint: disable=R0904\n\nimport osgt...
python
chosen
[ { "from": "system", "value": "TEst adding test server to allowed hosts\n" }, { "from": "human", "value": "# 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 ...
python
chosen
[ { "from": "system", "value": "Use custom logger on gevent>=1.1\n" }, { "from": "human", "value": "'''\nThis module provides some function to make running a webserver a little easier\n'''\n\n\ndef gevent_run(app):\n from gevent.wsgi import WSGIServer\n import gevent.monkey\n from werkzeu...
python
chosen
[ { "from": "system", "value": "Allow passing extra classes into render_icon, for example to set text-success\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.forms.widgets import flatatt\nfrom django.utils.safestring import mark_sa...
python
chosen
[ { "from": "system", "value": "Fix format string for revlinktmpl.\n\nTBR=iannucci@chromium.org\nReview URL: https://codereview.chromium.org/12181028\n\ngit-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@180592 0039d316-1c4b-4281-b951-d872f2087c98\n" }, { "from": "human", "value": "# Copyright (...
python
chosen
[ { "from": "system", "value": "Add 'string_types' as found in six.\n" }, { "from": "human", "value": "\"\"\"\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 config...
python
chosen
[ { "from": "system", "value": "Add explanatory comment for odd use of `delay()`\n" }, { "from": "human", "value": "# coding: utf-8\nimport kombu.exceptions\nfrom django.apps import AppConfig\nfrom django.core.checks import register, Tags\n\nfrom kpi.utils.two_database_configuration_checker import...
python
chosen
[ { "from": "system", "value": "Use dict for uri params.\n" }, { "from": "human", "value": "import requests\n\nu = 'http://www.google.com/calendar/feeds/ja.japanese%23holiday@group.v.calendar.google.com/public/full?alt=json&max-results=100&futureevents=true'\n\ndata = requests.get(u).json()\nprint...
python
chosen
[ { "from": "system", "value": "Add more instructions for engine_kwargs, to avoid DB connection timeout issues\n" }, { "from": "human", "value": "import os\n# shut up useless SA warning:\nimport warnings\nwarnings.filterwarnings(\n 'ignore', 'Unicode type received non-unicode bind param value.'...
python
chosen
[ { "from": "system", "value": "Use config file in import script\n" }, { "from": "human", "value": "import 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 tro...
python
chosen
[ { "from": "system", "value": "Add test for process normalized\n" }, { "from": "human", "value": "import 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 Postgres...
python
chosen
[ { "from": "system", "value": "Create immutable objects for paragraph instances\n\nThere a lot of paragraph objects in parsed document.\nIt saves some memory during summarization.\n" }, { "from": "human", "value": "# -*- coding: utf8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ ...
python
chosen
[ { "from": "system", "value": "Store field acc_type on res.partner.bank, so that we can search and groupby on it\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)\n# License AGPL-3.0 or later (http://www.gnu.org/license...
python
chosen
[ { "from": "system", "value": "Change game status to -help\n" }, { "from": "human", "value": "import 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):\...
python
chosen
[ { "from": "system", "value": "Fix spelling errors in test names\n" }, { "from": "human", "value": "from 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 (...
python
chosen
[ { "from": "system", "value": "Test harness changed to forward the message recieved over the like-file\ninterface to the other one, using it's like-file interface\n\nMichael\n" }, { "from": "human", "value": "#!/usr/bin/python\n\nimport time\nfrom background import background\nfrom Kamaelia.UI.Py...
python
chosen
[ { "from": "system", "value": "Replace basestring to six.string_types. Now python 3.3, 3.2 pass tests.\n\nTake django.utils.six dependency\n" }, { "from": "human", "value": "from rq.decorators import job as _rq_job\n\nfrom .queues import get_queue\n\n\ndef job(func_or_queue, connection=None, *arg...
python
chosen
[ { "from": "system", "value": "Fix MinGW build on Appveyor by changing search path order\n\nC:\\MinGW\\bin should go first to prevent executables from older\nversion of MinGW in C:\\MinGW\\mingw32 being picked up.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# Build the project on Ap...
python
chosen
[ { "from": "system", "value": "Delete expired blobs in batches" }, { "from": "human", "value": "from __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_co...
python
chosen
[ { "from": "system", "value": "FIX - beat.sh is now called by bash and not python\n" }, { "from": "human", "value": "\"\"\"\nAuthor: Ashish Gaikwad <ash.gkwd@gmail.com>\nCopyright (c) 2015 Ashish Gaikwad\n\nDescription: This daemon will execute command once\nInternet is connected. Then it will ex...
python
chosen
[ { "from": "system", "value": "Change to new attribute names.\n" }, { "from": "human", "value": "#-----------------------------------------------------------------------------#\n# MODULE DESCRIPTION #\n#-------------------------------------...
python
chosen
[ { "from": "system", "value": "Use the correct decoder for the test.\n" }, { "from": "human", "value": "# -*- 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\nr...
python
chosen
[ { "from": "system", "value": "Add dependency on `physicalproperty` module\n\nCloses #23.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup\nimport ibei\n\nsetup(name=\"ibei\",\n version=ibei.__version__,\n author=\"Joshua Ryan Smith\",\n auth...
python
chosen
[ { "from": "system", "value": "Include GPU code in installation\n" }, { "from": "human", "value": "import imp\nimport os\nfrom setuptools import setup\n\nver = imp.load_source('version',\n os.path.join(os.path.dirname(__file__), 'hessianfree',\n ...
python
chosen
[ { "from": "system", "value": "ENH: Add entry point script for build from yaml spec\n" }, { "from": "human", "value": "#!/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...
python
chosen
[ { "from": "system", "value": "Update the PyPI version to 8.0.0.\n" }, { "from": "human", "value": "# -*- 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 retu...
python
chosen
[ { "from": "system", "value": "Add missing migrations to package.\n" }, { "from": "human", "value": "# 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=...
python
chosen
[ { "from": "system", "value": "Update email address to @moz\n" }, { "from": "human", "value": "#! /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...
python
chosen
[ { "from": "system", "value": "Revert \"keyword package fails since roborframeowrk version 3\"\n\nThis reverts commit a2ba4d807a3fd720a24118164b6785486aa445b6.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name = 'robotframework-serverspeclibrary',\...
python
chosen
[ { "from": "system", "value": "Call the previous commit version 0.1.\n\nAnd tag it as v0.1. Master is now 0.1.0.99, slated to become 0.1.1 when we feel\nlike labeling the next thing as a release.\n" }, { "from": "human", "value": "from distutils.core import setup\n\n__version__ = '0.1'\n\nsetup_a...
python
chosen
[ { "from": "system", "value": "Use codecs in Python 2.\n" }, { "from": "human", "value": "from 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='MI...
python
chosen
[ { "from": "system", "value": "Document that we don't support Django 1.7 yet\n" }, { "from": "human", "value": "from 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').rea...
python
chosen
[ { "from": "system", "value": "Rename the package to \"nyaa\"\n" }, { "from": "human", "value": "#!/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 ...
python
chosen
[ { "from": "system", "value": "Add matplotlib and scikit-aero dependencies.\n" }, { "from": "human", "value": "'''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 ...
python
chosen
[ { "from": "system", "value": "Bump up version number for PyPI release\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nauthor = 'Michael Maurizi'\nauthor_email = 'info@azavea.com'\n\nsetup(\n name='django-tinsel',\n version='0.1.0',\n description='A pyth...
python
chosen
[ { "from": "system", "value": "Add command to generate docs\n" }, { "from": "human", "value": "# -*- 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\...
python
chosen
[ { "from": "system", "value": "Update locket to 0.1.1 for bug fix\n" }, { "from": "human", "value": "#!/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 v...
python
chosen
[ { "from": "system", "value": "Fix conflict with older versions on EL 6\n" }, { "from": "human", "value": "import os\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.txt')).read()\nCHANGES = open(os.path....
python
chosen
[ { "from": "system", "value": "Enforce that pbr used is >= 1.8\n\nIt otherwise fails if used against older pbr (e.g distro packaging build)\n\nChange-Id: I19dbd5d14a9135408ad21a34834f0bd1fb3ea55d\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# Copyright (c) 2013 Hewlett-Packard Develo...
python
chosen
[ { "from": "system", "value": "Update description and add more classifiers\n" }, { "from": "human", "value": "#\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\...
python
chosen
[ { "from": "system", "value": "Set minimum versions for openstack autha nd keystone\n" }, { "from": "human", "value": "import 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\n...
python
chosen
[ { "from": "system", "value": "Fix encoding issues with open()\n\nTraceback (most recent call last):\n File \"setup.py\", line 7, in <module>\n readme = f.read()\n File \"/usr/lib/python3.5/encodings/ascii.py\", line 26, in decode\n return codecs.ascii_decode(input, self.errors)[0]\nUnicodeDecodeErro...
python
chosen
[ { "from": "system", "value": "Remove include_package_data to install py.typed\n\nI found that sdist file does not include `py.typed`. For workaround, I found that when I remove `include_package_data` it works." }, { "from": "human", "value": "# encoding: utf-8\nimport sys\n\nfrom setuptools impo...
python
chosen
[ { "from": "system", "value": "Add required packages for pip install" }, { "from": "human", "value": "#!/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 ...
python
chosen
[ { "from": "system", "value": "fix: Add PyQt5 to install requirements\n\nAdd PyQt5 to install requirements\n" }, { "from": "human", "value": "from 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 ...
python
chosen
[ { "from": "system", "value": "Add new oedb data directory to package\n" }, { "from": "human", "value": "import 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',...
python
chosen
[ { "from": "system", "value": "Remove underscore from class name.\n" }, { "from": "human", "value": "from contributor import Contributor\nfrom daterange import Date_Range\nfrom defined_object import DefinedObject\nfrom personnel import Personnel\n\n" }, { "from": "gpt", "value": "from...
python
chosen
[ { "from": "system", "value": "Fix test to use /google instead of /google2\n" }, { "from": "human", "value": "import unittest\nimport http.client\nimport time\n\nclass TestStringMethods(unittest.TestCase):\n\n def test_404NoConfig(self):\n connRouter = http.client.HTTPConnection(\"local...
python
chosen
[ { "from": "system", "value": "Add test for non-exempt, non-protected URLs.\n" }, { "from": "human", "value": "from os import environ\nfrom unittest import TestCase\n\nenviron['DJANGO_SETTINGS_MODULE'] = 'test_settings'\nfrom incuna_auth.middleware import LoginRequiredMiddleware\n\n\nclass Authen...
python
chosen
[ { "from": "system", "value": "Tag python-cephclient as beta instead of alpha\n\nIt's pretty much beyond alpha now.\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name='python-cephclient',\n packages=['cephclient'],\n version='0.1.0.5',\n url='https://gith...
python
chosen
[ { "from": "system", "value": "Add text type as markdown.\n" }, { "from": "human", "value": "\"\"\"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.pat...
python
chosen
[ { "from": "system", "value": "Remove the no longer needed PyYAML requirement\n" }, { "from": "human", "value": "#!/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\"...
python
chosen