conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add tag on image lib\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nimport uuid\nimport os\nfrom datetime import datetime\n\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils import timezone\n\nfrom...
python
chosen
[ { "from": "system", "value": "Add test to list of notification page.\n" }, { "from": "human", "value": "from django.test import TestCase\n\n# Create your tests here.\n" }, { "from": "gpt", "value": "from django.test import TestCase\nfrom django.core.urlresolvers import reverse\n\nfro...
python
chosen
[ { "from": "system", "value": "Update TaskCalcImpact to also set deleted" }, { "from": "human", "value": "\"\"\"This module defines a number of tasks related to administration tasks.\n\nTaskCalcImpact needs to be run everytime we update the definition of\ntotal_impact.\n\"\"\"\n\nimport webapp2\n...
python
chosen
[ { "from": "system", "value": "Fix broken alembic revision generation\n" }, { "from": "human", "value": "\"\"\"empty message\n\nRevision ID: 2507366cb6f2\nRevises: 2a31d97fa618\nCreate Date: 2013-04-30 00:11:14.194453\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '2507366cb6f2...
python
chosen
[ { "from": "system", "value": "Fix random strings minimal expected length\n" }, { "from": "human", "value": "from django.test import TestCase\n\nfrom .. import factories, models\n\n\nclass RepositoryFactoryTestCase(TestCase):\n\n def test_can_create_repository(self):\n\n qs = models.Rep...
python
chosen
[ { "from": "system", "value": "Read URL and Token from environment\n" }, { "from": "human", "value": "import os\n\nbasedir = os.path.abspath(os.path.dirname(__file__))\n\n\nclass Config(object):\n DEBUG = True\n WTF_CSRF_ENABLED = False\n SESSION_COOKIE_NAME = 'notify_admin_session'\n ...
python
chosen
[ { "from": "system", "value": "Fix loading bug in ok_test\n" }, { "from": "human", "value": "from client import exceptions as ex\nfrom client.sources.ok_test import concept\nfrom client.sources.ok_test import doctest\nfrom client.sources.ok_test import models\nfrom client.sources.common import im...
python
chosen
[ { "from": "system", "value": "Hotfix: Update gunicorn graceful timeout value to match general timeout\n" }, { "from": "human", "value": "import multiprocessing\r\n\r\nbind = \"127.0.0.1:9000\"\r\n\r\n# Run cores * 4 + 1 workers in gunicorn\r\n# This is set deliberately high in case of long Oracl...
python
chosen
[ { "from": "system", "value": "Fix code generation for function pointer argument .\n" }, { "from": "human", "value": "from ctypeslib.codegen import typedesc\n\ndef typedef_as_arg(tp):\n return tp.name\n\ndef fundamental_as_arg(tp):\n return tp.name\n\ndef structure_as_arg(tp):\n return t...
python
chosen
[ { "from": "system", "value": "Use briefer url views import.\n" }, { "from": "human", "value": "from django.conf.urls import patterns, url\nfrom .views import {{ cookiecutter.model_name }}List, {{ cookiecutter.model_name }}Create, {{ cookiecutter.model_name }}Detail, {{ cookiecutter.model_name }}...
python
chosen
[ { "from": "system", "value": "Disable bulk send action when a bulk send conversation has no suitable channels attached.\n" }, { "from": "human", "value": "from go.vumitools.conversation.definition import (\n ConversationDefinitionBase, ConversationAction)\n\n\nclass BulkSendAction(Conversatio...
python
chosen
[ { "from": "system", "value": "Update test that fails on purpose.\n" }, { "from": "human", "value": "\"\"\" This test was made to fail on purpose to demonstrate the\n logging capabilities of the SeleniumBase Test Framework \"\"\"\n\nfrom seleniumbase import BaseCase\n\n\nclass MyTestClass(Base...
python
chosen
[ { "from": "system", "value": "Add some debug markers for more clearly finding our own rendering code\n" }, { "from": "human", "value": "from PyQt5.QtCore import pyqtProperty, QObject\nfrom PyQt5.QtGui import QColor\nfrom PyQt5.QtQuick import QQuickWindow, QQuickItem\n\nfrom OpenGL import GL\n\nc...
python
chosen
[ { "from": "system", "value": "Update to use python ints and int/long unification.\n" }, { "from": "human", "value": "#! /usr/bin/env python\n# Print digits of pi forever.\n#\n# The algorithm, using Python's 'long' integers (\"bignums\"), works\n# with continued fractions, and was conceived by La...
python
chosen
[ { "from": "system", "value": "Update asyncio policy to match newer asyncio version\n" }, { "from": "human", "value": "\"\"\"\nThis is a replacement event loop and policy for asyncio that uses FPGA time,\nrather than native python time.\n\"\"\"\nfrom asyncio.events import BaseDefaultEventLoopPoli...
python
chosen
[ { "from": "system", "value": "Add a rawText method stub to the base writer\n\nI think this is the only missing method in the base writer.\n" }, { "from": "human", "value": "class AbstractFeatureWriter(object):\n\n def feature(self, name):\n return self\n\n def lookup(self, name):\n ...
python
chosen
[ { "from": "system", "value": "Add the examples in the json module docstring as a doctest\n" }, { "from": "human", "value": "\"\"\"Tests for json.\n\nThe tests for json are defined in the json.tests package;\nthe test_suite() function there returns a test suite that's ready to\nbe run.\n\"\"\"\n\...
python
chosen
[ { "from": "system", "value": "Fix the debug mode activation\n" }, { "from": "human", "value": "import bottle \nimport pymongo\nimport cellarDAO\n\nfrom bottle import route, run, template, request, redirect\n\n#route index, we will show all our bottle of wine\n@route('/')\ndef wine_index():\n\tbo...
python
chosen
[ { "from": "system", "value": "Move tests into new Given class\n" }, { "from": "human", "value": "# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\nfrom hamcrest impo...
python
chosen
[ { "from": "system", "value": "Add fallback error message on campaign validation" }, { "from": "human", "value": "from django.forms import ValidationError\nfrom .models import Campaign\n\n\ndef validate_not_campaign(data):\n subject = data.get('subject', '')\n body = data.get('body', '')\n ...
python
chosen
[ { "from": "system", "value": "Add ICEKit Events to list of GLAMKit installed apps\n\nAdd ICEKit events, SimpleEvent event type, and listing page for date\napps to those installed by default for GLAMKit.\n" }, { "from": "human", "value": "from .icekit import *\n\n# DJANGO ########################...
python
chosen
[ { "from": "system", "value": "Make the secure session cookie setting case-insensitive\n" }, { "from": "human", "value": "import os\nimport datetime\n\nregister_title_api = os.environ['REGISTER_TITLE_API']\nlogin_api = os.environ['LOGIN_API']\nlogging_config_file_path = os.environ['LOGGING_CONFIG...
python
chosen
[ { "from": "system", "value": "Update path to dark_temp_scale in test\n" }, { "from": "human", "value": "import numpy as np\nfrom .. import dark_scale\n\ndef test_dark_temp_scale():\n scale = dark_scale.dark_temp_scale(-10., -14)\n assert np.allclose(scale, 0.70)\n\n scale = dark_scale.d...
python
chosen
[ { "from": "system", "value": "Test for pattern and barcode before matching barcode\n" }, { "from": "human", "value": "import re\n\n\nclass Package(object):\n barcode = None\n barcode_pattern = None\n shipper = None\n\n def __init__(self, barcode):\n self.barcode = barcode\n\n ...
python
chosen
[ { "from": "system", "value": "Save sorting order on MenuItem\n" }, { "from": "human", "value": "from django.db import models\nfrom django.utils.translation import pgettext_lazy\nfrom mptt.managers import TreeManager\nfrom mptt.models import MPTTModel\n\n\nclass Menu(models.Model):\n slug = mo...
python
chosen
[ { "from": "system", "value": "Use a simpler serializer that does not require people_requested/people_registered annotations / fields\n" }, { "from": "human", "value": "from bluebottle.bluebottle_drf2.serializers import ImageSerializer\nfrom bluebottle.projects.models import PartnerOrganization\n...
python
chosen
[ { "from": "system", "value": "Create basic password reset form\n" }, { "from": "human", "value": "from flask_wtf import Form\nfrom wtforms import TextField, PasswordField\nfrom wtforms.validators import DataRequired, Email, Length, EqualTo\n\nfrom project.models import User\n\n\nclass LoginForm(...
python
chosen
[ { "from": "system", "value": "Add missing connection section type value HIGHLIGHT\n" }, { "from": "human", "value": "from django.db import models\nfrom .unit import Unit\n\nSECTION_TYPES = (\n (1, 'PHONE_OR_EMAIL'),\n (2, 'LINK'),\n (3, 'TOPICAL'),\n (4, 'OTHER_INFO'),\n (5, 'OPEN...
python
chosen
[ { "from": "system", "value": "Fix ES index script with updated param\n" }, { "from": "human", "value": "from website.app import setup_django\nsetup_django()\n\nfrom website import search\nfrom website.search.elastic_search import delete_doc\nfrom osf.models import Preprint, AbstractNode\nimport ...
python
chosen
[ { "from": "system", "value": "tests/member_access: Make member_access into an Hypothesis test\n" }, { "from": "human", "value": "from hypothesis import given\nimport pytest # type: ignore\n\nfrom ppb_vector import Vector\nfrom utils import vectors\n\n\n@pytest.fixture()\ndef vector():\n retu...
python
chosen
[ { "from": "system", "value": "Include new script in packaging\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\n# Copyright 2015 University of Chicago\n# Available under Apache 2.0 License\n# setup for fsurf on OSG Connect login\nfrom distutils.core import setup\n\nsetup(name='fsurfer-...
python
chosen
[ { "from": "system", "value": "Handle python version in prepare_bootstrap script.\n" }, { "from": "human", "value": "import subprocess\nimport os\n\nPYVER = \"2.5\"\n\n# Bootstrap\nsubprocess.check_call(['python', 'prepare_bootstrap.py'])\n\n# Build binaries\nsubprocess.check_call(['python', 'bui...
python
chosen
[ { "from": "system", "value": "Handle sign in failure from traccar\n" }, { "from": "human", "value": "import os, graphene, requests\nfrom flask_jwt_extended import get_jwt_identity, get_jwt_claims\nfrom graphql import GraphQLError\n\nfrom traccar_graphql.models import ServerType, UserType\nfrom t...
python
chosen
[ { "from": "system", "value": "Change to stacked inline for occurrences, also display location.\n" }, { "from": "human", "value": "from django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom mezzanine.core.admin import TabularDynamicInlineAdmin, DisplayableAdmi...
python
chosen
[ { "from": "system", "value": "Fix imports for Python 3\n" }, { "from": "human", "value": "\"\"\"\npyRFC3339 parses and generates :RFC:`3339`-compliant timestamps using Python :class:`datetime.datetime` objects.\n\n>>> from pyrfc3339 import generate, parse\n>>> from datetime import datetime\n>>> ...
python
chosen
[ { "from": "system", "value": "Make changes to get_hosts() to return a list of dict\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nAnsibleInventory:\n\nINTRO:\n\nUSAGE:\n\n\"\"\"\n\nimport os\nimport ansible.inventory\n\n\nclass AnsibleInventory(objec...
python
chosen
[ { "from": "system", "value": "Fix defs for ReadPixels and GetChromiumParametervCR\n" }, { "from": "human", "value": "# Copyright (c) 2001, Stanford University\n# All rights reserved.\n#\n# See the file LICENSE.txt for information on redistributing this software.\n\n\nimport sys\n\nsys.path.appen...
python
chosen
[ { "from": "system", "value": "Test case now runs main directly\n" }, { "from": "human", "value": "import sys\nimport pubrunner\n\ndef test_countwords():\n\tpubrunner.pubrun('examples/CountWords/',True,True)\n\n" }, { "from": "gpt", "value": "import sys\nimport pubrunner\nimport pubru...
python
chosen
[ { "from": "system", "value": "tests: Add test for the region reported for a failed match\n\nIf the match fails at the first level of the pyramid algorithm (when\nwe're searching in a down-scaled version of the frame) then we have to\nup-scale the region we report for the best (but not good enough) match.\n\...
python
chosen
[ { "from": "system", "value": "Reduce dump increment to 10k.\n" }, { "from": "human", "value": "TARGET_SERVER = 'www.regulations.gov'\nDEBUG = True\nDB_NAME = 'regulations'\nES_HOST = 'thrift://localhost:9500'\nDATA_DIR = '/data'\nEXTRACTORS = 2\n\nDUMP_START = 0\nDUMP_END = 3850000\nDUMP_INCREME...
python
chosen
[ { "from": "system", "value": "Fix HardwareDevice docstring to match implementation\n\n" }, { "from": "human", "value": "\"\"\"\nModule with the HardwareDevice model.\n\"\"\"\n\nfrom launch_control.utils.json import PlainOldData\n\n\nclass HardwareDevice(PlainOldData):\n \"\"\"\n Model repr...
python
chosen
[ { "from": "system", "value": "[sniper_stats] Read metric names on startup for jobid-based stats so self.names is available as expected\n" }, { "from": "human", "value": "import sniper_stats, intelqueue, iqclient\n\n\nclass SniperStatsJobid(sniper_stats.SniperStatsBase):\n def __init__(self, job...
python
chosen
[ { "from": "system", "value": "Add simple admin test just so we catch breakage early\n" }, { "from": "human", "value": "from django.test import TestCase\n\nfrom analytics.models import GoogleAnalytics\n\nclass GoogleAnalyticsTests(TestCase):\n def test_ga_tracking(self):\n GoogleAnalyti...
python
chosen
[ { "from": "system", "value": "Use join for serializing words and lemmas to avoid printing last ; as required by ATF format. Print also references, notes and links.\n" }, { "from": "human", "value": "from mako.template import Template\n\nclass Line(object):\n template = Template(\"\"\"${label}...
python
chosen
[ { "from": "system", "value": "Call out these requirements too\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name='rhino',\n version='1.0',\n packages=['rhino'],\n include_package_data=True,\n\n #requires=['Django', 'south', 'celery', 'django_celery', ...
python
chosen
[ { "from": "system", "value": "Use pkg_resources to read README.rst\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# Copyright (c) 2013 Soren Hansen\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Licens...
python
chosen
[ { "from": "system", "value": "Change Name to ovhapi\nSet me as maintainer (not author)\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nsetup(\n name = \"OvhApi\",\n version = \"1.0\",\n description='Python module to manage Ovh API',\n author='Guilhem L...
python
chosen
[ { "from": "system", "value": "Add Python34 and Python35 to classifiers\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='stop-words',\n version=__import__(\"stop_words\").get_version(),\n description='Get list of common stop words in variou...
python
chosen
[ { "from": "system", "value": "Add DRF as a dev dependency\n" }, { "from": "human", "value": "import sys\n\nfrom setuptools import find_packages, setup\n\n\nVERSION = '2.0.dev0'\n\n\ninstall_requires = [\n 'django-local-settings>=1.0a10',\n 'stashward',\n]\n\nif sys.version_info[:2] < (3, 4...
python
chosen
[ { "from": "system", "value": "Add package data for GeoIP DB\n" }, { "from": "human", "value": "__author__ = 'katharine'\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nrequirements_path = os.path.join(os.path.dirname(__file__), 'requirements.txt')\n\nwith open(requiremen...
python
chosen
[ { "from": "system", "value": "Move release version up to 0.2.0\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nrequires = [\n ]\n\nsetup(name='mirrors',\n version='0.1.1',\n description='rsync mirror manager',\n autho...
python
chosen
[ { "from": "system", "value": "Remove 3.5 for now. It's not added to PyPI yet.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nfrom setuputils import find_version, read\n\n\nsetup(\n name='astor',\n version=find_version('astor/__ini...
python
chosen
[ { "from": "system", "value": "Remove BeautifulSoup from direct dependency list.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nfrom tiddlywebwiki import __version__ as VERSION\n\n\nsetup(\n name = 'tiddlywebwiki',\n version = VERSION,\n description = '...
python
chosen
[ { "from": "system", "value": "Add Python 3.5 to trove classifiers\n" }, { "from": "human", "value": "import os\nimport re\n\nfrom setuptools import setup\n\n\nHERE = os.path.dirname(os.path.abspath(__file__))\n\n\ndef get_version():\n filename = os.path.join(HERE, 'transfluent.py')\n conte...
python
chosen
[ { "from": "system", "value": "Add the kmsi script to the install files.\n" }, { "from": "human", "value": "#! /usr/bin/env python3\n# -*- coding:Utf8 -*-\n\n#--------------------------------------------------------------------------------------------------------------\n# All necessary import:\n#...
python
chosen
[ { "from": "system", "value": "Add Python 3 Only trove classifier\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\nsetup(\n name='incuna-pigeon',\n\n version='0.0.0',\n\n description='Notification management',\n url='https://github.com/incuna/incuna-...
python
chosen
[ { "from": "system", "value": "Update GitHub repos from blancltd to developersociety\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\n\nwith open('README.rst', 'r', 'utf-8') as f:\n readme = f.read()\n\n\nsetup(...
python
chosen
[ { "from": "system", "value": "Downgrade pytest version to be able to use default shippable minion\n" }, { "from": "human", "value": "\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nconfig = {\n 'description': 'pelican-do',\n 'author': 'Command...
python
chosen
[ { "from": "system", "value": "Add dependency to ply package\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='plyprotobuf',\n version='1.0',\n description='Protobuf Parsing Library that uses ply',\n author='Dusan Klinec',\n...
python
chosen
[ { "from": "system", "value": "Fix find packages\nBump version\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='django-nap',\n version='0.3',\n description='A light REST tool for Django',\n author='Curtis Maloney',\n author_email='cur...
python
chosen
[ { "from": "system", "value": "Raise version and change keywords for upcoming release\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nimport os\n\nversion = '0.4'\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README...
python
chosen
[ { "from": "system", "value": "Remove GDAL requirement (it's not a direct dependency)\n\n" }, { "from": "human", "value": "from setuptools import setup\r\n\r\nsetup(\r\n name='ncdjango',\r\n description='A map server for NetCDF data',\r\n keywords='netcdf,django,map server',\r\n versi...
python
chosen
[ { "from": "system", "value": "Use the right version of python-dateutils when using python 3.\n" }, { "from": "human", "value": "from setuptools import setup\n\nversion = '2.0.0'\n\nsetup(name='pyactiveresource',\n version=version,\n description='ActiveResource for Python',\n autho...
python
chosen
[ { "from": "system", "value": "Swap find_packages for a manual list\n\nThis is required to support PEP420 namespace packages.\n" }, { "from": "human", "value": "\"\"\"Setuptools configuration for engine.\"\"\"\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n\nwith open('R...
python
chosen
[ { "from": "system", "value": "Print the full traceback when execution fails.\n" }, { "from": "human", "value": "\"\"\"Views for debugging and diagnostics\"\"\"\n\nimport pprint\n\nfrom django.http import Http404\nfrom django.contrib.auth.decorators import login_required\nfrom django_future.csrf ...
python
chosen
[ { "from": "system", "value": "Add install_requires and remove ctypes from requirements.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"The Screen class lets you to do positioned writes to the dos terminal.\nThe Screen class also allows you to specify t...
python
chosen
[ { "from": "system", "value": "Setup: Add long description read straight from README.\n" }, { "from": "human", "value": "\"\"\"Cloud browser package.\"\"\"\n\nfrom setuptools import setup, find_packages\n\nfrom cloud_browser import __version__\n\n# Base packages.\nMOD_NAME = \"cloud_browser\"\nPK...
python
chosen
[ { "from": "system", "value": "Use io.open with UTF-8 encoding to avoid UnicodeDecodeError\n" }, { "from": "human", "value": "import io\nimport os\nimport re\nfrom setuptools import setup, find_packages\n\n\ndef find_version():\n file_dir = os.path.dirname(__file__)\n with io.open(os.path.j...
python
chosen
[ { "from": "system", "value": "Add bidict to required packages\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='ssbio',\n version='0.1',\n author='Nathan Mih',\n author_email='nmih@ucsd.edu',\n license='MIT',\n url='http://github.c...
python
chosen
[ { "from": "system", "value": "Fix other SyntaxError: invalid syntax\n\nFix\r\nTraceback (most recent call last):\r\n File \"<string>\", line 20, in <module>\r\n File \"/tmp/pip-7dj0aup6-build/setup.py\", line 19\r\n classifiers=[\r\n ^\r\n SyntaxError: invalid syntax" ...
python
chosen
[ { "from": "system", "value": "Move Django out of `install_requires` to to `requires` block.\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nfrom os.path import dirname, join\nimport sys, os\n\n# When creating the sdist, make sure the django....
python
chosen
[ { "from": "system", "value": "Change version number to 0.1dev\n" }, { "from": "human", "value": "\"\"\"\nFlask-Static\n---------------\n\nGenerates a static website from a Flask application.\n\"\"\"\n\nfrom setuptools import setup\n\nsetup(\n name='Flask-Static',\n version='0.1',\n url=...
python
chosen
[ { "from": "system", "value": "Solve ppc64le build due to unexisting -march\n\nOn ppc64le (e.g: POWER8 machines), the -mcpu should be used instead.\n" }, { "from": "human", "value": "#!/usr/bin/python\n\nimport setuptools\nimport numpy\nfrom setuptools import Extension\n\nsetuptools.setup(\n n...
python
chosen
[ { "from": "system", "value": "Fix issues reported by pylint\n" }, { "from": "human", "value": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport os\nimport sys\nimport unicodedata\nimport idlk.base41\n\nif sys.version_info[...
python
chosen
[ { "from": "system", "value": "Fix parsing when style specified, add 'auto' score\n" }, { "from": "human", "value": "\"\"\"Docstring parsing.\"\"\"\n\nfrom . import rest\n\nfrom .common import ParseError\n\n_styles = {\"rest\": rest.parse}\n\n\ndef parse(text: str, style: str = \"auto\"):\n \"...
python
chosen
[ { "from": "system", "value": "Add nice name for working in the shell\n" }, { "from": "human", "value": "from django.db import models\n\nfrom django_countries import countries\n\n\nclass Country(models.Model):\n code = models.CharField(max_length=2, choices=tuple(countries),\n ...
python
chosen
[ { "from": "system", "value": "Add simple four-function output option\n\nSigned-off-by: Lizhou Sha <d6acb26e253550574bc1141efa0eb5e6de15daeb@mit.edu>\n" }, { "from": "human", "value": "def create_parser(subparsers):\n pass\n" }, { "from": "gpt", "value": "import argparse\nfrom astr...
python
chosen
[ { "from": "system", "value": "Add SSL media context processor.\n" }, { "from": "human", "value": "from django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom settings import DeploymentType\n\ndef default(request):\n context = {}\n context['DEPLOYMENT'] = settings.D...
python
chosen
[ { "from": "system", "value": "Remove Python wrapper function for executing cookiecutter program\n" }, { "from": "human", "value": "#\n# The OpenDiamond Platform for Interactive Search\n# Version 4\n#\n# Copyright (c) 2009 Carnegie Mellon University\n# All rights reserved.\n#\n# This softwar...
python
chosen
[ { "from": "system", "value": "Add initialization to linked list class\n" }, { "from": "human", "value": "# Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k\n\nclass Node(object): # define constructor\n\tdef __init__(self, val...
python
chosen
[ { "from": "system", "value": "Remove duplicate fields from Career\n" }, { "from": "human", "value": "from cms import sitemaps\nfrom cms.apps.pages.models import ContentBase\nfrom cms.models import HtmlField, PageBase\nfrom django.db import models\nfrom historylinks import shortcuts as historylin...
python
chosen
[ { "from": "system", "value": "[IMP] Make the related location readonly\n" }, { "from": "human", "value": "# Copyright 2017 Eficent Business and IT Consulting Services S.L.\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).\n\nfrom odoo import fields, models\n\n\nclass MrpBom(models...
python
chosen
[ { "from": "system", "value": "Change the version number to 3.0\n\nThe most notable change from 2.0 is the new initializer.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(name='programmabletuple',\n version='0.2.0',\n description='Pytho...
python
chosen
[ { "from": "system", "value": "Refresh streams list when player is closed" }, { "from": "human", "value": "import urllib.request\nimport subprocess\n\nLIMIT = 10\nPLAYER = 'vlc'\nurl = 'http://streams.twitch.tv/kraken/streams?limit='+str(LIMIT)+'&offset=0&game=Music&broadcaster_language=&on_site=...
python
chosen
[ { "from": "system", "value": "Fix reference and add MUV class\n" }, { "from": "human", "value": "\"\"\"\nMiscellaneous utilities.\n\"\"\"\nimport numpy as np\n\n\ndef kennard_stone(d, k):\n \"\"\"\n Use the Kennard-Stone algorithm to select k maximally separated\n examples from a datase...
python
chosen
[ { "from": "system", "value": "Fix reference to ISC license.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(name='notation',\n description='Better human-readable numbers.',\n long_description=open('README.rst').read(),\n author='Stijn Debrouwere',...
python
chosen
[ { "from": "system", "value": "Upgrade API to v1.3 and benchmark file to v1.1\n" }, { "from": "human", "value": "#####################################################\n# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019.08 #\n#####################################################\n# [2020.03.09] Upgr...
python
chosen
[ { "from": "system", "value": "Deal with dependency rename: inspector to inspect-it.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(name='googleanalytics',\n description='A wrapper for the Google Analytics API.',\n long_description=open('README.rst')...
python
chosen
[ { "from": "system", "value": "Add dependency on argparse and new configparser\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nimport pygout\n\n\nreadme = open('README.rst', 'r').read()\nDESCRIPTION = readme.split('\\n')[0]\nLONG_DESCRIPTION = readme\n\nINSTALL_R...
python
chosen
[ { "from": "system", "value": "Fix test_suite (uses module, not file, name).\n" }, { "from": "human", "value": "import sys\n\nfrom setuptools import setup\n\nmeta = dict(\n name=\"stacklogger\",\n version=\"0.1.0\",\n description=\"A stack-aware logging extension\",\n author=\"Will Ma...
python
chosen
[ { "from": "system", "value": "Allow pulling in of cluster plugin using powershift-cli[cluster] as install target.\n" }, { "from": "human", "value": "import sys\nimport os\n\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\nclassifiers = [\n 'Development Status :...
python
chosen
[ { "from": "system", "value": "Change dev status to pre-alpha\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name='Pykka',\n version='0.1',\n author='Stein Magnus Jodal',\n author_email='stein.magnus@jodal.no',\n packages=['pykka'],\n url='http:/...
python
chosen
[ { "from": "system", "value": "Upgrade pyephem to latest version.\n\n* Pyephem v3.7.6.0 now includes this required patch:\n https://github.com/brandon-rhodes/pyephem/commit/47d0ba3616ee6c308f2eed319af3901592d00f70\n* No need to specify a custom dependency in our setup.py.\n" }, { "from": "human", ...
python
chosen
[ { "from": "system", "value": "Change package url to point to opusonesolutions group" }, { "from": "human", "value": "from setuptools import setup\n\n\ndef readme():\n with open(\"README.rst\", 'r') as f:\n return f.read()\n\n\nsetup(\n name=\"asciigraf\",\n version=\"0.3.0\",\n ...
python
chosen
[ { "from": "system", "value": "Make tag-line consistent with GitHub\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name='Getty Art',\n version='0.0.1',\n author='Clemens Wolff',\n author_email='clemens.wolff+pypi@gmail.com',\n packages=['getty_art']...
python
chosen
[ { "from": "system", "value": "Fix bug with pip install. Update version to 0.1.1." }, { "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...
python
chosen
[ { "from": "system", "value": "Add proper Python version classifiers.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nVERSION = '0.2'\n\nfrom setuptools import setup\nsetup(\n name='nutshell',\n packages=[\"nutshell\"],\n version=VERSION,\n description='A minimal python ...
python
chosen
[ { "from": "system", "value": "Update python versions we care about\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-glitter-news',\n version='0.1',\n description='Django Glitter News for Django',\n long_des...
python
chosen
[ { "from": "system", "value": "Add python-coveralls as a test dependency\n\nThis is so that we can push our coverage stats to coverage.io.\n" }, { "from": "human", "value": "#!/usr/bin/env python\nimport os\nimport sys\n\nfrom serfclient import __version__\n\ntry:\n from setuptools import setu...
python
chosen
[ { "from": "system", "value": "Replace refs to 'Keystone API' with 'Identity API'\n\nFormally, OpenStack Keystone implements the OpenStack Identity API, and\nthis is a client to the API, not to Keystone itself.\n\nChange-Id: If568866221a29ba041f0f2cd56dc81deeb9ebc00\n" }, { "from": "human", "valu...
python
chosen