conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix bug in timer panel display" }, { "from": "human", "value": "from flask import template_rendered\nfrom flaskext.debugtoolbar.panels import DebugPanel\n\n_ = lambda x: x\n\nclass TemplateDebugPanel(DebugPanel):\n \"\"\"\n Panel that displays the time a respo...
python
chosen
[ { "from": "system", "value": "Change simulation to search terms.\n" }, { "from": "human", "value": "from __future__ import absolute_import, print_function\n\nimport datetime\nimport itertools\n\nfrom streamparse.spout import Spout\n\n\nclass SimpleSimulationSpout(Spout):\n urls = [\n '...
python
chosen
[ { "from": "system", "value": "Normalize URL for test cases.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nimport os\n\nfrom betamax import Betamax\nfrom betamax_serializers import pretty_json\n\nURL = os.environ.get('CONTENT_SERVICE_URL', 'http://dockerdev:9000')\nAPIKEY = os.env...
python
chosen
[ { "from": "system", "value": "Add __all__ to exposure package\n" }, { "from": "human", "value": "from .exposure import histogram, equalize, equalize_hist, \\\n rescale_intensity, cumulative_distribution\nfrom ._adapthist import equalize_adapthist\n" }, { "from": "gpt...
python
chosen
[ { "from": "system", "value": "Add positive test for search\n" }, { "from": "human", "value": "# This Source Code Form is subjectfrom django import forms to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http:/...
python
chosen
[ { "from": "system", "value": "Make sure the trigger view is locked down\n" }, { "from": "human", "value": "from django.contrib import admin\nfrom django.http import HttpResponseRedirect, Http404\nfrom django.conf.urls import patterns\nfrom django.conf.urls import url\n\nfrom django.shortcuts imp...
python
chosen
[ { "from": "system", "value": "Add missing import of `Path`\n" }, { "from": "human", "value": "\"\"\"\nbyceps.config_defaults\n~~~~~~~~~~~~~~~~~~~~~~\n\nDefault configuration values\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"\"\"\n\nfrom dat...
python
chosen
[ { "from": "system", "value": "Add extension load/unload commands (owner only)\n" }, { "from": "human", "value": "from discord.ext import commands\nfrom discord.ext.commands import Bot\nfrom discord.ext.commands import Context\n\nimport checks\n\n\nclass Admin:\n def __init__(self, bot):\n ...
python
chosen
[ { "from": "system", "value": "Add placeholder defaults for bioswale stewardship\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\n\nfrom django.contrib.gis.db import models\...
python
chosen
[ { "from": "system", "value": "Make tick time a global\n" }, { "from": "human", "value": "__VERSION__ = '0.02'\n\nDEBUG = False\n\nPLUGIN_PATH = None\n\nMAX_RETRIES = 20\nINITIAL_RECONNECT_DELAY = 500 # milliseconds\n\nCONNECTED = False\n\nCOLAB_DIR = ''\nPROJECT_PATH = ''\nDEFAULT_HOST = ''\nDE...
python
chosen
[ { "from": "system", "value": "Remove redundant colons and superfluous hyphens\n" }, { "from": "human", "value": "from django import forms\n\n\nclass BugReportForm(forms.Form):\n\n bug = forms.CharField(label=\"Bug: - (required)\", required=True)\n description = forms.CharField(\n la...
python
chosen
[ { "from": "system", "value": "Add code to send sms\n" }, { "from": "human", "value": "'''\nThis module will send SMS reminders periodically, using Twilio.\nThe aim is to encourage user to code, commit and push to GitHub everyday\n'''\n\nimport requests\nfrom twilio.rest import TwilioRestClient\n...
python
chosen
[ { "from": "system", "value": "Add fab command to backup and destroy database\n" }, { "from": "human", "value": "import sys\nfrom fabric.api import local, task\n\n@task\ndef start_db():\n if sys.platform.startswith('darwin'):\n # Mac OSX\n local('postgres -D /usr/local/var/postgr...
python
chosen
[ { "from": "system", "value": "Use HTTPS for base URL to THREDDS server\n\nLast week OIT made csdms.colorado.edu only accessible by HTTPS, which\ncaused the HTTP URL for the THREDDS server to fail.\n" }, { "from": "human", "value": "import os\n\nfrom pymt.printers.nc.read import field_fromfile\n\...
python
chosen
[ { "from": "system", "value": "Create a dead simple Django model for storing token information\n" }, { "from": "human", "value": "from django.db import models\n\n# Create your models here.\n" }, { "from": "gpt", "value": "from django.core.validators import MaxValueValidator, MinValueV...
python
chosen
[ { "from": "system", "value": "[IMP] Apply pre-commit changes: Resolve conflicts\n" }, { "from": "human", "value": "# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n{\n \"name\": \"Mail optional autofollow\",\n \"summa...
python
chosen
[ { "from": "system", "value": "NEW: Add support for appengine update oauth2 token in deploy script.\n" }, { "from": "human", "value": "from fabric.api import *\nfrom fabric.contrib.console import confirm\n\nappengine_dir='appengine-web/src'\ngoldquest_dir='src'\n\ndef update():\n # update to l...
python
chosen
[ { "from": "system", "value": "Fix print statements for Python 3\n\nAlthough I haven't tested Python 3 for this, all print statements have\nbeen updated to use parenthesis. There are also some minor fixes to the\nnames of the ip-up hook arguments.\n" }, { "from": "human", "value": "#!/usr/bin/pyt...
python
chosen
[ { "from": "system", "value": "Fix trailing line style violation\n" }, { "from": "human", "value": "from six.moves import configparser\n\n\ndef parse_mysql_cnf(dbinfo):\n \"\"\"\n Attempt to parse mysql database config file for connection settings.\n Ideally we would hook into django's c...
python
chosen
[ { "from": "system", "value": "Add search box, show devices list in table, show interfaces in device detail\n" }, { "from": "human", "value": "from django.contrib import admin\n\nfrom .models.device import Device\nfrom .models.interface import Interface\n\n\nadmin.site.register(Device)\nadmin.sit...
python
chosen
[ { "from": "system", "value": "Change check database status to return even when it is false\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nimport logging\nfrom ...util.base import BaseStep\n\nLOG = logging.getLogger(__name__)\n\n\nclass CheckDatabaseStatus(BaseStep):\n\n def __uni...
python
chosen
[ { "from": "system", "value": "Add some debug when playing\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport os\nimport sys\nimport requests\nimport re\nfrom bot import RandomBot\n\nSERVER_HOST = 'http://localhost:9000'\n\ntrainingState = requests.post(SERVER_HOST + '/api/trainin...
python
chosen
[ { "from": "system", "value": "Remove blank line at end of file.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\n\"\"\"\n Property Test: orchard.app\n\"\"\"\n\nimport hypothesis\nimport hypothesis.strategies as st\nimport unittest\n\nimport orchard\n\n\nclass AppPropertyTest(unit...
python
chosen
[ { "from": "system", "value": "Add alias -h to --help\n" }, { "from": "human", "value": "import click\nimport os\n\nplugin_folder = os.path.join(os.path.dirname(__file__), 'commands')\n\n\nclass BlackBelt(click.MultiCommand):\n\n def list_commands(self, ctx):\n rv = []\n for file...
python
chosen
[ { "from": "system", "value": "Make pynpact tests use GeventExecutor\n\nWe've almost completely deprecated taskqueue at this point; lets test\nthe new pieces instead of th old.\n" }, { "from": "human", "value": "import pytest\nimport taskqueue\n\n\n@pytest.fixture(scope=\"session\")\ndef async_ex...
python
chosen
[ { "from": "system", "value": "Use more pythonic pattern for default attributes\n" }, { "from": "human", "value": "import urllib\nimport urllib.error\nimport urllib.request\n\nfrom rasp.constants import DEFAULT_USER_AGENT\nfrom rasp.errors import EngineError\n\n\nclass Engine(object):\n def ge...
python
chosen
[ { "from": "system", "value": "Fix reference to class attribute\n" }, { "from": "human", "value": "import asyncio\n\nimport esipy\nfrom discord.ext import commands\nfrom requests.adapters import DEFAULT_POOLSIZE\n\nfrom utils.log import get_logger\n\nESI_SWAGGER_JSON = 'https://esi.evetech.net/de...
python
chosen
[ { "from": "system", "value": "Increment patch version to 0.7.1\n" }, { "from": "human", "value": "\"\"\"yolk.\n\nAuthor: Rob Cakebread <cakebread at gmail>\n\nLicense : BSD\n\n\"\"\"\n\n__version__ = '0.7'\n" }, { "from": "gpt", "value": "\"\"\"yolk.\n\nAuthor: Rob Cakebread <cakebr...
python
chosen
[ { "from": "system", "value": "Add a method for line by line asset parsing\n" }, { "from": "human", "value": "class Asset:\n \"\"\"\n This is an ooni-probe asset. It is a python\n iterator object, allowing it to be efficiently looped.\n To create your own custom asset your should subc...
python
chosen
[ { "from": "system", "value": "Add version view, since we want all apps to provide this.\n" }, { "from": "human", "value": "from django.http import HttpResponse, HttpResponseServerError\nfrom django.template import RequestContext, loader\nfrom django.conf import settings\n\nfrom maintenancemode.h...
python
chosen
[ { "from": "system", "value": "Rename silly __version_info__ symbol to VERSION\n\nDjango uses the name VERSION and it always seems good to rid ourselves\nof another faux-dunder symbol that really means nothing to the Python\nruntime and therefore should not enjoy the (in-?)dignity of a dunder.\n" }, { ...
python
chosen
[ { "from": "system", "value": "Fix error message when patch is missing.\n" }, { "from": "human", "value": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nfrom os.path import isfile, join, expanduser\n\nimport conda.config as cc\nfrom conda_build.config ...
python
chosen
[ { "from": "system", "value": "Allow strike time to be blank.\n" }, { "from": "human", "value": "from django.db import models\nfrom django.contrib.auth.models import User\n\n# Create your models here.\nclass Order(models.Model):\n user = models.ForeignKey(User)\n # Last updated timestamp, u...
python
chosen
[ { "from": "system", "value": "Fix Babel plugin in Python3 environment\n" }, { "from": "human", "value": "\"\"\"gettext message extraction via Babel: http://babel.edgewall.org/\"\"\"\nfrom mako.ext.babelplugin import extract as _extract_mako\n\nfrom .. import lexer\nfrom ..util import StringIO\n\...
python
chosen
[ { "from": "system", "value": "Add a menu to the test runner.\n" }, { "from": "human", "value": "from AppKit import *\nfrom PyObjCTools import AppHelper\n\n\nclass _VanillaMiniAppDelegate(NSObject):\n\n def applicationShouldTerminateAfterLastWindowClosed_(self, notification):\n return T...
python
chosen
[ { "from": "system", "value": "Add a test for django model inheritance of the foreign key kind.\n" }, { "from": "human", "value": "from django.db import models\n\nclass Poll(models.Model):\n\tquestion = models.CharField(max_length=200)\n\tpub_date = models.DateTimeField('date_published')\n\t\n\tc...
python
chosen
[ { "from": "system", "value": "Allow observing more than one action at once\n" }, { "from": "human", "value": "# Taken from https://github.com/delivero/lymph-storage/blob/master/lymph/storage/observables.py\nclass Observable(object):\n def __init__(self):\n self.observers = {}\n\n de...
python
chosen
[ { "from": "system", "value": "Remove spaces in function named arguments\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\"\"\"\nFlask app initialization.\n\"\"\"\nimport os.path\nfrom flask import Flask\n\n\nMAIN_DATA_CSV = os.path.join(\n os.path.dirname(__file__), '..', '..', 'r...
python
chosen
[ { "from": "system", "value": "Use injected sql from results\n" }, { "from": "human", "value": "\"\"\"\"Test adapter specific config options.\"\"\"\nfrom test.integration.base import DBTIntegrationTest, use_profile\nimport textwrap\nimport yaml\n\n\nclass TestBigqueryAdapterSpecific(DBTIntegratio...
python
chosen
[ { "from": "system", "value": "Index on the cache collection. More work could be done here\n" }, { "from": "human", "value": "\"\"\"\nSetup for the API\n\"\"\"\n\nimport api\n\nlog = api.logger.use(__name__)\n\ndef index_mongo():\n \"\"\"\n Ensure the mongo collections are indexed.\n \"\...
python
chosen
[ { "from": "system", "value": "[FIX] l10n_es_facturae: Fix components names using the new logic\n" }, { "from": "human", "value": "# Copyright 2020 Creu Blanca\n# @author: Enric Tobella\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).\n\nfrom odoo.addons.component.core import Comp...
python
chosen
[ { "from": "system", "value": "Improve config loader init function\n" }, { "from": "human", "value": "import configparser\nimport os\n\n\nclass ConfigLoader(object):\n\n def __init__(self, location=None):\n if location is None:\n location = \"../engine.conf\"\n config_...
python
chosen
[ { "from": "system", "value": "Allow flier markers in box-and-whisker plots to be modified.\n" }, { "from": "human", "value": "from matplotlib import pyplot\nfrom PlotInfo import *\n\nclass BoxAndWhisker(PlotInfo):\n \"\"\"\n Box and whisker plots\n \"\"\"\n\n def __init__(self):\n ...
python
chosen
[ { "from": "system", "value": "Replace deprecated PyGlove symbols to new ones.\n\nPiperOrigin-RevId: 408683720\n" }, { "from": "human", "value": "# coding=utf-8\n# Copyright 2021 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us...
python
chosen
[ { "from": "system", "value": "Fix for non-existent character folder bug\n" }, { "from": "human", "value": "import os\n\nimport json\n\nfrom serializable import Serializable\n\nclass Saves: #Only partially implemembted- only works for PlayerCharacters\n\n\t#Because we want the user to be able to ...
python
chosen
[ { "from": "system", "value": "Revert \"Wrap fact exports in quotes\"\n\nThis reverts commit bf5b568b05066b3d31b3c7c1f56ef86d4c5c3dca.\n\nConflicts:\n\tstack-builder/hiera_config.py\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\"\"\"\n stack-builder.hiera_config\n ~~~~~~~~~~~~~...
python
chosen
[ { "from": "system", "value": "Use only foreign keys in Cluster serialisation and add _id suffixes\n" }, { "from": "human", "value": "from rest_framework import serializers\n\nfrom sigma_core.models.cluster import Cluster\nfrom sigma_core.serializers.group import GroupSerializer\n\nclass BasicClu...
python
chosen
[ { "from": "system", "value": "Update the version to 0.0.5\n" }, { "from": "human", "value": "from setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n name='Sukimu',\n version='0.0.4',\n url='https://github.com/xethorn/sukimu',\n author='Michael Ortali',\n a...
python
chosen
[ { "from": "system", "value": "Update plotly requirement to >=4.0.0\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='cosmo',\n version='0.0.1',\n description='Monitors for HST/COS',\n keywords=['astronomy'],\n classifiers=[\n '...
python
chosen
[ { "from": "system", "value": "Fix password_reset_confirm URL for django change.\n\nDjango changed the uid parameter to the password_reset_confirm view to be\nbase64-encoded instead of base36. This means our URL had to change a bit.\nTrivial change.\n" }, { "from": "human", "value": "from __futur...
python
chosen
[ { "from": "system", "value": "Remove features from as-is fields on TransportDossier\n\nReflected as a model_collection_field\n" }, { "from": "human", "value": "from __future__ import unicode_literals\n\nfrom ..base import Resource\nfrom .details import DossierDetail, DossierDetailsMixin\nfrom .d...
python
chosen
[ { "from": "system", "value": "Revert \"Update drobox api urls h/t @felliott\"\n\nThis reverts commit 6d1612698c2e42ab60d521915f31ff08832e3745.\n" }, { "from": "human", "value": "try:\n from waterbutler import settings\nexcept ImportError:\n settings = {}\n\nconfig = settings.get('DROPBOX_P...
python
chosen
[ { "from": "system", "value": "Replace magic strings with constants\n" }, { "from": "human", "value": "from os import mkdir, getcwd\nfrom bank import split_bank\nfrom errors import BotError\n\nclass Dealer(object):\n def __init__(self):\n self.__feature = \"\"\n self.__scenarios ...
python
chosen
[ { "from": "system", "value": "Make the integration test fail, so we can see the request / response\n" }, { "from": "human", "value": "import righteous\nfrom ConfigParser import SafeConfigParser\nfrom ..compat import unittest\n\nclass RighteousIntegrationTestCase(unittest.TestCase):\n\n def se...
python
chosen
[ { "from": "system", "value": "Fix incorrect search on activity fields\n" }, { "from": "human", "value": "# -*- coding: utf-8\n\"\"\"\n ain7/organizations/filters.py\n\"\"\"\n#\n# Copyright © 2007-2016 AIn7 Devel Team\n#\n# This program is free software; you can redistribute it and/or modify\...
python
chosen
[ { "from": "system", "value": "Clean method for dict ds\n" }, { "from": "human", "value": "from fito.data_store.base import BaseDataStore\n\n\nclass DictDataStore(BaseDataStore):\n def __init__(self, *args, **kwargs):\n super(DictDataStore, self).__init__(*args, **kwargs)\n self....
python
chosen
[ { "from": "system", "value": "Upgrade orderedmultidict dependency to v0.7.2.\n" }, { "from": "human", "value": "import os\nimport re\nimport sys\nfrom os.path import dirname, join as pjoin\nfrom sys import version_info\nfrom setuptools import setup, find_packages\n\nwith open(pjoin(dirname(__fil...
python
chosen
[ { "from": "system", "value": "Add a dependency link for cupy\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup\n\nsetup(\n name=\"pcanet\",\n version=\"0.0.1\",\n author=\"Takeshi Ishita\",\n py_modules=[\"pcanet\"],\n install_requires=[\n 'chainer'...
python
chosen
[ { "from": "system", "value": "Change the development status classifier to beta\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup, find_packages\n\nimport plata\n\nsetup(name='Plata',\n version=plata.__version__,\n description='Plata - the l...
python
chosen
[ { "from": "system", "value": "Change name back to dredd_hooks\n\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nfrom setuptools import find_packages, setup\n\nlong_desc = open('README.rst').read()\n\nsetup(\n name='dredd-hooks-python',\n version='0.1.3',\n url='https://git...
python
chosen
[ { "from": "system", "value": "Add Python 3.2 to package classifiers\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup, find_packages\n\n\ndef read(filename):\n return open(os.path.join(os.path.dirname(__file__), filename)).read()\n\n\nsetup(\n name='gears-handlebar...
python
chosen
[ { "from": "system", "value": "Update pysaml2 dependency to resolve bugs related to attribute filtering.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\n\"\"\"\nsetup.py\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='SATOSA',\n version='0.4.1',\n des...
python
chosen
[ { "from": "system", "value": "Add extra-requirements for release management\n" }, { "from": "human", "value": "try:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nrequirements = ['contextlib2', 'pysam', 'six', 'shutilwhich']\n\nENTRY_POINTS = '''\...
python
chosen
[ { "from": "system", "value": "[Feature] : Change the version to tag it.\n" }, { "from": "human", "value": "from setuptools import setup\nsetup(\n name = 'upstox',\n packages = ['upstox_api'],\n version = '1.5.2',\n include_package_data=True,\n description = 'Official Python library for Upst...
python
chosen
[ { "from": "system", "value": "Make 'Router created' message translatable\n\nChange-Id: If0e246157a72fd1cabdbbde77e0c057d9d611eaa\n" }, { "from": "human", "value": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2012, Nachi Ueno, NTT MCL, Inc.\n# All rights reserved.\n\n\"\"\"\nVie...
python
chosen
[ { "from": "system", "value": "Remove arguably unneeded namespace declaration (STOX-10)\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\nsetup(\n name=\"libcdmi-python\",\n version='1.0alpha',\n description=\"\"\"CDMI client library\"\"\",\n author=\...
python
chosen
[ { "from": "system", "value": "Add missing files to package\n" }, { "from": "human", "value": "from os import path\nfrom setuptools import setup\n\n\n# Utility function to read the README file.\n# Used for the long_description. It's nice, because now 1) we have a top level\n# README file and 2) ...
python
chosen
[ { "from": "system", "value": "Bump requests from 1.1.0 to 2.20.0\n\nBumps [requests](https://github.com/requests/requests) from 1.1.0 to 2.20.0.\n- [Release notes](https://github.com/requests/requests/releases)\n- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)\n- [Commits](https://githu...
python
chosen
[ { "from": "system", "value": "Fix NameError: name 'README' is not defined\n\nTraceback (most recent call last):\r\n File \"<string>\", line 20, in <module>\r\n File \"/tmp/pip-g43cf6a2-build/setup.py\", line 9, in <module>\r\n long_description=README,\r\n NameError: name 'README' is not ...
python
chosen
[ { "from": "system", "value": "HG-1871: Fix missing tools package install\n" }, { "from": "human", "value": "from setuptools import setup\nimport subprocess, os\n\nversion = open('pymoku/version.txt').read().strip()\n\nsetup(\n\tname='pymoku',\n\tversion=version,\n\tauthor='Ben Nizette',\n\tautho...
python
chosen
[ { "from": "system", "value": "Add automagic package finding and classifiers.\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name='braubuddy',\n version='0.2.0',\n author='James Stewart',\n author_email='jstewart101@gmail.com',\n packages=['braubuddy'],...
python
chosen
[ { "from": "system", "value": "Add `pt[i]pythonX` and `pt[i]pythonX.X` commands\n" }, { "from": "human", "value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\nlong_description = open(\n os.path.join(\n os.path.dirname(__file__),\n 'README.rst'...
python
chosen
[ { "from": "system", "value": "Remove history from long description\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nwith open('HISTORY.rst') as history_...
python
chosen
[ { "from": "system", "value": "Add pyfits dependence and remove pytoml\n" }, { "from": "human", "value": "#!/usr/bin/env python3\n# -*- mode: python -*-\n\nfrom setuptools import setup, find_packages\nfrom setuptools.extension import Extension\nfrom Cython.Build import cythonize\nimport os.path a...
python
chosen
[ { "from": "system", "value": "Set package name to 'dice-sim'\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nfrom os import path\nfrom dice import __version__\n\nhere = path.abspath(path.dirname(__file__))\n\ntry:\n with open(path.join(here, 'requirements.txt')...
python
chosen
[ { "from": "system", "value": "Add include path for voro++\n" }, { "from": "human", "value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n# vim:fenc=utf-8\n#\n# Copyright © 2017 Malcolm Ramsay <malramsay64@gmail.com>\n#\n# Distributed under terms of the MIT license.\n\n\"\"\"Command line too...
python
chosen
[ { "from": "system", "value": "Support python 3.7, 3.8, 3.9, 3.10\n" }, { "from": "human", "value": "#-*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nimport YaDiskClient\n\nsetup(\n name='YaDiskClient',\n version=YaDiskClient.__version__,\n include_package_data=True,\...
python
chosen
[ { "from": "system", "value": "Remove shell console script from entry points\n\nAmends f06fecca161bca2360ce076e9cc15458cbda0de5\n" }, { "from": "human", "value": "from setuptools import setup, PEP420PackageFinder\n\n\nsetup(\n name='tangled',\n version='1.0a13.dev0',\n description='Tangl...
python
chosen
[ { "from": "system", "value": "Add dependency on having psutil available.\n" }, { "from": "human", "value": "from __future__ import print_function\n\nfrom setuptools import setup\n\nsetup_kwargs = dict(\n name = 'mod_wsgi-metrics',\n version = '1.1.0',\n description = 'Metrics package fo...
python
chosen
[ { "from": "system", "value": "Rename cli script to whip-neustar-cli\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name='whip-neustar',\n version='0.1',\n packages=['whip_neustar'],\n entry_points={\n 'console_scripts': [\n 'whip-neustar...
python
chosen
[ { "from": "system", "value": "Update the version to 0.2.0\n" }, { "from": "human", "value": "from setuptools import find_packages\nfrom setuptools import setup\n\nREQUIRED_PACKAGES = ['distance', 'numpy', 'six', 'pillow']\nVERSION = '0.1.1'\ntry:\n import pypandoc\n README = pypandoc.conve...
python
chosen
[ { "from": "system", "value": "Increase only minor in version number\n" }, { "from": "human", "value": "from os.path import dirname, join\nfrom setuptools import setup, find_packages\n\nversion = '0.3'\n\n\ndef read(fname):\n return open(join(dirname(__file__), fname)).read()\n\nsetup(name='dj...
python
chosen
[ { "from": "system", "value": "Add one more lstm layer\n" }, { "from": "human", "value": "from keras.models import Sequential\nfrom keras.layers import Activation, TimeDistributed, Dense, RepeatVector, Embedding\nfrom keras.layers.recurrent import LSTM\n\n\ndef get_model(X_vocab_len, X_max_len, y...
python
chosen
[ { "from": "system", "value": "23: Add check / skip ability to management command\n\n* `-c`, `--checks`, `-s`, `--skips` options take comma-separated list of python paths to run / skip\n" }, { "from": "human", "value": "from __future__ import absolute_import\n\nimport json\n\nfrom django.core.man...
python
chosen
[ { "from": "system", "value": "Update template tag to also take context\n" }, { "from": "human", "value": "from django import template\n\nfrom ..forms import WaitingListEntryForm\n\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef waitinglist_entry_form():\n \"\"\"\n Get a...
python
chosen
[ { "from": "system", "value": "Make sure any config overrides are reset\n\nThe new deploy unit tests have conf.set_override() but\ndon't reset these after each test, so depending on the\ntest order there are failures.\n\nThis just addes a generic cleanup in the base class to catch\nall of them.\n\nChange-Id:...
python
chosen
[ { "from": "system", "value": "Add in the active level to json output for the mobile game to use\n" }, { "from": "human", "value": "import random as orig_random\nfrom decorator import decorator\nimport binascii\nimport struct\nimport hashlib\n\nfrom gameserver.database import db\n\ndb_session = d...
python
chosen
[ { "from": "system", "value": "Add pretend to the test requirements\n" }, { "from": "human", "value": "import sys\n\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n\n def finalize_options(self):\n TestCommand.finali...
python
chosen
[ { "from": "system", "value": "Use the github repo as the project url\n" }, { "from": "human", "value": "import 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(filenam...
python
chosen
[ { "from": "system", "value": "Restructure templates to avoid name conflict\n\nWe were about to get into a lot of confusion with registering for\ncomments and registering for the con... this should help confusion\nsomewhat.\n" }, { "from": "human", "value": "# Copyright (c) 2014-2015, Doug Kelly\...
python
chosen
[ { "from": "system", "value": "Update version number to 0.1.3." }, { "from": "human", "value": "#\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of t...
python
chosen
[ { "from": "system", "value": "Improve description of dronekit on PyPi\n" }, { "from": "human", "value": "from setuptools import setup, Extension\nimport platform\n\nversion = '2.1.0'\n\nsetup(name='dronekit',\n zip_safe=True,\n version=version,\n description='Python language bindi...
python
chosen
[ { "from": "system", "value": "Remove need for refresh() by putting everything in loop\n" }, { "from": "human", "value": "import time\nfrom yahoo_finance import Share\n\n# Collect 30 mins of Finance data on 5 companies, one value per minute\nnyt = Share('NYT')\nibm = Share('IBM')\ngoogle = Share(...
python
chosen
[ { "from": "system", "value": "Change hours to seconds in cron job\n" }, { "from": "human", "value": "import schedule\nimport settings\n\nfrom .poll_pull_requests import poll_pull_requests as poll_pull_requests\nfrom .restart_homepage import restart_homepage as restart_homepage\n\ndef schedule_jo...
python
chosen
[ { "from": "system", "value": "Upgrade to 0.3.1 to avoid broken 0.3\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import find_packages, Command\n\n\nsetup_params = dict(\n name='bugimporters',\n version=0.1,\n author='Various contributers to the OpenHatch proj...
python
chosen
[ { "from": "system", "value": "Replace the jitterbug page with the SF Bug Tracker page.\n" }, { "from": "human", "value": "#\n# Minimal \"re\" compatibility wrapper\n#\n# If your regexps don't work well under 2.0b1, you can switch\n# to the old engine (\"pre\") down below.\n#\n# To help us fix an...
python
chosen
[ { "from": "system", "value": "Fix package data so that VERSION file actually gets installed\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nimport sys, os\n\ndesc_lines = open('README', 'r').readlines()\n\nPACKAGE = 'mtconvert'\n\nVERSION = open(os.path.join(os.pa...
python
chosen
[ { "from": "system", "value": "Remove Pypy from list of supported Python versions\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\ndef parse_requirements(requirement_file):\n with open(requirement_file) as f:\n return f.readlines()\n\nsetup(\n name=...
python
chosen
[ { "from": "system", "value": "Fix incorrect module path in manual management command\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(name='simplecoin_rpc_client',\n version='0.2.0',\n author='Isaac Cook',\n author_em...
python
chosen
[ { "from": "system", "value": "Add short description to egg\n" }, { "from": "human", "value": "\"\"\"Installer for marked\n\"\"\"\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='marked',\n description='',\n long_description=open('README.rst').read(),\n provides=['mark...
python
chosen