conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update master version to 0.3-dev\n" }, { "from": "human", "value": "#from distutils.core import setup\nfrom setuptools import setup\n\ndescr = \"\"\"Tree representations and algorithms for Python.\n\nViridis is named after the green tree python, Morelia viridis.\n\"...
python
chosen
[ { "from": "system", "value": "Increment version number for release of new features and bug fixes to pypi\n" }, { "from": "human", "value": "__doc__ = \"\"\"\nManipulate audio with an simple and easy high level interface.\n\nSee the README file for details, usage info, and a list of gotchas.\n\"\...
python
chosen
[ { "from": "system", "value": "Increase version and add python 3 classifier\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='isystem-to-mqtt',\n version='0.1.0',\n author='Nicolas Graziano',...
python
chosen
[ { "from": "system", "value": "Replace enum34 with enum-compat to allow use with Py3.6+\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom Registry import _version_\n\nsetup(name='python-registry',\n version=_version_,\n description='Read acce...
python
chosen
[ { "from": "system", "value": "Add six to the explicit dependencies\n" }, { "from": "human", "value": "from setuptools import find_packages, setup\n\nsetup(\n name='jupyter-notebook-gist',\n version='0.4.0',\n description='Create a gist from the Jupyter Notebook UI',\n author='Mozilla...
python
chosen
[ { "from": "system", "value": "Update description and long description\n\n[ci skip]\n" }, { "from": "human", "value": "import os\nimport sys\n\nfrom setuptools import setup\n\n__author__ = 'Ryan McGrath <ryan@venodesigns.net>'\n__version__ = '2.10.0'\n\npackages = [\n 'twython',\n 'twython....
python
chosen
[ { "from": "system", "value": "Add PyYAML as a direct dependency for tests.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"go_auth\",\n version=\"0.1.0a\",\n url='http://github.com/praekelt/go_auth',\n license='BSD',\n description=...
python
chosen
[ { "from": "system", "value": "Add new requirements from CMG middleware\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(name='bettercache',\n version='0.5.3',\n description = \"A suite of better cache tools for Django.\",\n l...
python
chosen
[ { "from": "system", "value": "Change info to warning if files not renamed\n" }, { "from": "human", "value": "#!/usr/bin/python3\n# tv_namer.py - Renames passed media files of TV shows\n\nimport shutil\nimport os\nimport sys\nimport logging\n\nimport videoLister\nimport scrapeTVDB\nimport regSpli...
python
chosen
[ { "from": "system", "value": "Add 'physicalproperty' to pkg list for install\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom distutils.core import setup\nimport ibei\n\nsetup(name = \"ibei\",\n version = ibei.__version__,\n author = \"Joshua Ryan Smith\",\n author...
python
chosen
[ { "from": "system", "value": "Increment version to 0.2.1 - now with primer3 function\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"sigseekr\",\n version=\"0.2.0\",\n packages=find_packages(),\n scripts=['sig...
python
chosen
[ { "from": "system", "value": "Add information (url, download url, ...) for packaging\n" }, { "from": "human", "value": "# coding: utf-8 -*-\n#\n# Setup file for geocluster\n#\n\nfrom setuptools import setup, find_packages\nimport os\n\n# Get the description file\nhere = os.path.dirname(os.path.a...
python
chosen
[ { "from": "system", "value": " Fix typo for cli entrypoint\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name='devour',\n version='0.4',\n url='',\n author='http://github.com/brandoshmando',\n author_email='brancraft@gmail.com',\n license='MIT',\n ...
python
chosen
[ { "from": "system", "value": "Enable Python 3 compatibility using 2to3." }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/Stable',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: G...
python
chosen
[ { "from": "system", "value": "Remove enum and add absl-py.\n\nPiperOrigin-RevId: 256969582\n" }, { "from": "human", "value": "# Copyright 2019 The Empirical Calibration Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complia...
python
chosen
[ { "from": "system", "value": "Use install_requires to install the requirements.\n" }, { "from": "human", "value": "from setuptools import find_packages\n\nimport os\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n# Get version and release inf...
python
chosen
[ { "from": "system", "value": "Declare importlib requirement on Python 2.6\n" }, { "from": "human", "value": "import setuptools\r\n\r\ndef read_long_description():\r\n with open('README') as f:\r\n data = f.read()\r\n return data\r\n\r\nsetup_params = dict(\r\n name=\"irc\",\r\n ...
python
chosen
[ { "from": "system", "value": "Upgrade django-local-settings 1.0a12 => 1.0a13\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.0a12',\n 'stashward',\n]\n\nif sys.versi...
python
chosen
[ { "from": "system", "value": "Change version number to 1.4" }, { "from": "human", "value": "#!/usr/bin/env python\n############################################################################\n# #\n# Copyright 2014 Prelert ...
python
chosen
[ { "from": "system", "value": "Add Python 3 to supported languages\n\nCloses #8\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nimport os\nimport sys\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n sys.exit()\n\nsetu...
python
chosen
[ { "from": "system", "value": "Add installation requirements for developers\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.1....
python
chosen
[ { "from": "system", "value": "Add email (required) and packages\n" }, { "from": "human", "value": "\"\"\"Millipede installation script\n\nhttps://github.com/evadot/millipede\n\"\"\"\n\nfrom setuptools import setup, find_packages\nfrom codecs import open\nfrom os import path\n\nhere = path.abspat...
python
chosen
[ { "from": "system", "value": "Remove useless requirement on Python 3.2+\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nimport io\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='django-pipeline',\n version='1.5.2',\n description='Pipeline is an asset packa...
python
chosen
[ { "from": "system", "value": "Change package name from 's3' to 'ucldc_iiif'.\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n# allow setup.py to be run from any path\nos.chdi...
python
chosen
[ { "from": "system", "value": "Allow use of newer django-photologue\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='panya',\n version='0.1.6',\n description='Panya base app.',\n long_description = open('README.rst', 'r').read() + open('...
python
chosen
[ { "from": "system", "value": "Convert the README to rst if pandoc is installed\n" }, { "from": "human", "value": "from setuptools import setup\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\nwith open(path.join(here, 'README.md'), encoding='utf-8') a...
python
chosen
[ { "from": "system", "value": "Bump to next development cycle\n" }, { "from": "human", "value": "from setuptools import setup\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(here, 'README.md')) as f:\n jgo_long_description = f.read()\n\nsetup(\n na...
python
chosen
[ { "from": "system", "value": "Mark the package not zipsafe so test discovery finds directories.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nimport sys, os\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.rst')).rea...
python
chosen
[ { "from": "system", "value": "Update deps and bump version. ANL-10319\n" }, { "from": "human", "value": "from setuptools import setup\nimport io\nimport os\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\ndef read(*filenames, **kwargs):\n encoding = kwargs.get('encoding', 'utf-8')\n ...
python
chosen
[ { "from": "system", "value": "Use the same headline as the API\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\n\"\"\"Setup script for The Coverage Space CLI.\"\"\"\n\nimport setuptools\n\nfrom coveragespace import __project__, __version__, CLI\n\ntry:\n README = open(\"README.rst\...
python
chosen
[ { "from": "system", "value": "Use docker-crane for pypi name, since somebody already took crane\n" }, { "from": "human", "value": "from ez_setup import use_setuptools\nuse_setuptools()\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='crane',\n version='0.1.0',\n descript...
python
chosen
[ { "from": "system", "value": "Use a name= kwarg to avoid UNKNOWN.\n\nSigned-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org>\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(packages=find_packages())\n" }, ...
python
chosen
[ { "from": "system", "value": "Configure to run tests under pytest runner\n" }, { "from": "human", "value": "import sys\n\nimport setuptools\n\npy26_reqs = ['argparse', 'importlib'] if sys.version_info < (2,7) else []\n\nsetuptools.setup(\n name='librarypaste',\n use_hg_version=dict(increme...
python
chosen
[ { "from": "system", "value": "Add suggestion box script to PATH\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\"\"\"Setup file and install script SciLife python scripts.\n\"\"\"\nfrom setuptools import setup, find_packages\n\ntry:\n with open(\"requirements.txt\", \"r\") as f:\n ...
python
chosen
[ { "from": "system", "value": "Fix loading of map from environment variables\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\"\"\"\n\n\"\"\"\nimport json\nimport os\n\nfrom sns_utils import publish_sns_message\n\n\ndef main(event, _):\n print(f'Received ev...
python
chosen
[ { "from": "system", "value": "Add *.mplstyle as package data\n" }, { "from": "human", "value": "try:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='pandas-profiling',\n version='0.1.0',\n author='Jos Polfliet',\n author_...
python
chosen
[ { "from": "system", "value": "Include test_setquery module in distribution\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup\n\nsetup(\n name=\"setquery\",\n version=\"0.1\",\n description=\"Set arithmetic evaluator\",\n author=\"Paul Scott\",\n ...
python
chosen
[ { "from": "system", "value": "Upgrade the development status to beta.\n" }, { "from": "human", "value": "#!/usr/bin/env python3\n# encoding: utf-8\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='autoprop',\n version='0....
python
chosen
[ { "from": "system", "value": "Add the ShopifyAPI package as a dependency." }, { "from": "human", "value": "from distutils.core import setup\n\nversion = __import__('shopify_auth').__version__\n\nsetup(\n name = 'django-shopify-auth',\n version = version,\n description = 'An simple packa...
python
chosen
[ { "from": "system", "value": "Add Python 3.7 to the list of supported versions\n" }, { "from": "human", "value": "from setuptools import setup\nfrom os import path\n\nwith open(path.join(path.abspath(path.dirname(__file__)), 'README.rst')) as f:\n readme = f.read()\n\nsetup(\n name='ghstat...
python
chosen
[ { "from": "system", "value": "Add coverage as a testing requirement\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\n\nVERSION = '0.4.2'\n\n\ndef readme():\n with open('README.rst') as f:\n return f.read()\n\n\nsetup(\n name=...
python
chosen
[ { "from": "system", "value": "Fix a problem with PESEL validation\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom operator import mul\nfrom openerp import models, fields, api, exceptions\n\n\nclass Volunteer(models.Model):\n _inherit = 'res.users'\n\n pesel = fields.Char(s...
python
chosen
[ { "from": "system", "value": "Raise window to focus on Mac\n" }, { "from": "human", "value": "from __future__ import print_function, division\nfrom sys import argv, stderr\n\ndef run_gui():\n '''Start the event loop to calucate spectra interactively'''\n # Import Qt functions. Do so here ...
python
chosen
[ { "from": "system", "value": "tools: Remove StringIO import. Use a simple list to build up the output and return .join(s)\n" }, { "from": "human", "value": "# Module:\t__init__\n# Date:\t\t8th November 2008\n# Author:\tJames Mills, prologic at shortcircuit dot net dot au\n\n\"\"\"Circuits Tools\...
python
chosen
[ { "from": "system", "value": "Allow to override strategy getter\n" }, { "from": "human", "value": "from functools import wraps\n\nfrom django.conf import settings\nfrom django.core.urlresolvers import reverse\n\nfrom social.utils import setting_name, module_member\nfrom social.strategies.utils i...
python
chosen
[ { "from": "system", "value": "Remove no longer needed references for keeping pep8 happy\n" }, { "from": "human", "value": "from twisted.trial.unittest import TestCase\n\nfrom go_metrics.metrics.dummy import Fixtures, DummyMetrics, DummyBackend\nDummyBackend, DummyMetrics\n\n\nclass TestFixtures(...
python
chosen
[ { "from": "system", "value": "Refactor test case into two classes\n" }, { "from": "human", "value": "import os\nimport unittest\nimport tempfile\n\n# Local modules\nimport library.server as server\n\n\nclass ServerTestCase(unittest.TestCase):\n\n @classmethod\n def setUp(self):\n se...
python
chosen
[ { "from": "system", "value": "Enable context provider for TraceErrorsMiddleware\n" }, { "from": "human", "value": "import logging\nfrom paste.deploy.converters import asbool\n\nlog = logging.getLogger(__name__)\n\ndef _turbogears_backlash_context(environ):\n tgl = environ.get('tg.locals')\n ...
python
chosen
[ { "from": "system", "value": "[AC-7469] Merge remote-tracking branch 'origin/development' into AC-7469\n" }, { "from": "human", "value": "# Generated by Django 2.2.10 on 2020-04-09 21:24\n\nfrom django.db import migrations\n\n\ndef add_deferred_user_role(apps, schema_editor):\n DEFERRED_MENTO...
python
chosen
[ { "from": "system", "value": "Fix a bug in the quadrules.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nimport re\n\nfrom pyfr.quadrules.base import BaseQuadRule, BaseTabulatedQuadRule\nfrom pyfr.quadrules.line import BaseLineQuadRule\nfrom pyfr.quadrules.tri import BaseTriQuadRu...
python
chosen
[ { "from": "system", "value": "Add View as a first class member of pygametemplate\n" }, { "from": "human", "value": "\"\"\"pygametemplate module for making creating games with Pygame easier.\"\"\"\n\n\nfrom __future__ import absolute_import\n\n\n__version__ = \"0.2.0\"\n__author__ = \"Andrew Dean...
python
chosen
[ { "from": "system", "value": "Package data objects should return None for missing attributes.\n" }, { "from": "human", "value": "class PackageData(object):\n def __init__(self, local_file, name, version):\n self.local_file = local_file\n self.name = name\n self.version = ...
python
chosen
[ { "from": "system", "value": "Add exception test cases for TupleDataset\n" }, { "from": "human", "value": "import unittest\n\nimport numpy\n\nfrom chainer import cuda\nfrom chainer import datasets\nfrom chainer import testing\nfrom chainer.testing import attr\n\n\nclass TestTupleDataset(unittest...
python
chosen
[ { "from": "system", "value": "Drop the deprecated way of specifying url patterns" }, { "from": "human", "value": "from django.conf.urls import patterns, url\n\n\nurlpatterns = patterns(\n 'tagging_autocomplete.views',\n url(r'^list$', 'list_tags', name='tagging_autocomplete-list'),\n)\n" ...
python
chosen
[ { "from": "system", "value": "Add test for loading script.\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 .models import Pregunta, Seccion, Subseccion\nfrom .lo...
python
chosen
[ { "from": "system", "value": "Add basic functional DB /api route\n" }, { "from": "human", "value": "from app import app\nfrom flask import redirect, render_template\n\n@app.route('/')\ndef index():\n return render_template('index.html')\n\n# default 'catch all' route\n@app.route('/', defaults...
python
chosen
[ { "from": "system", "value": "Fix velocity_capsule description and drag formula\n\nDrag force should be quadratically dependent on speed instead of linearly dependent." }, { "from": "human", "value": "from openmdao.main.api import Component\nfrom openmdao.lib.datatypes.api import Float\n\n#put i...
python
chosen
[ { "from": "system", "value": "Update RMG example liquid_phase with multiplicity label\n" }, { "from": "human", "value": "# Data sources\ndatabase(\n thermoLibraries = ['primaryThermoLibrary'],\n reactionLibraries = [],\n seedMechanisms = [],\n kineticsDepositories = ['training'],\n ...
python
chosen
[ { "from": "system", "value": "Append the name of the current language to the URLs\n\n--HG--\nbranch : 1.1-dev\n" }, { "from": "human", "value": "from django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'...
python
chosen
[ { "from": "system", "value": "Fix for 3.3 and 3.4\n" }, { "from": "human", "value": "# -*- encoding: utf-8 -*-\n# ! python2\n\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n\"\"\"Tests for django-custom-500's decorators\...
python
chosen
[ { "from": "system", "value": "Add comments for tests of caching.\n" }, { "from": "human", "value": "import unittest\n\nimport mock\n\nimport chainer\nfrom chainer.functions.pooling import pooling_nd_kernel\nfrom chainer import testing\nfrom chainer.testing import attr\n\n\n@testing.parameterize(...
python
chosen
[ { "from": "system", "value": "Fix broken list_methods due to inspect behaviour\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# vim: set fileencoding=UTF-8 :\n\n\nimport inspect\n\n\nclass DynamicMethods(object):\n\n def list_methods(self, predicate):\n \"\"\"Find all transf...
python
chosen
[ { "from": "system", "value": "Fix template that was accidentally overwritten\n" }, { "from": "human", "value": "async def init():\n me = input('Who are you? ').strip()\n wallet_name = '%s-wallet' % me\n\n # 1. Create Wallet and Get Wallet Handle\n try:\n await wallet.create_wa...
python
chosen
[ { "from": "system", "value": "Remove test data folder with all contents during setUp\n" }, { "from": "human", "value": "import logging\nimport unittest\nimport os\nimport shutil\n\nfrom sqlalchemy import create_engine\n\nfrom rtrss import config, database\n\n\nlogging.disable(logging.ERROR)\n\ne...
python
chosen
[ { "from": "system", "value": "Add test for writing spatial grid to file\n" }, { "from": "human", "value": "import unittest\nimport numpy as np\n\nclass CalculationMethodsTestCase(unittest.TestCase):\n def setUp(self):\n self.dem = DEMGrid()\n\n def test_calculate_slope(self):\n ...
python
chosen
[ { "from": "system", "value": "Add mocked test of build_resolver\n" }, { "from": "human", "value": "from .utils import TestCase, skipUnless\nfrom dynsupdate import client\nimport os\n\n\nclass DnsTests(TestCase):\n\n @skipUnless(os.getenv(\"SLOW\"), \"To slow\")\n def test_build_resolver(se...
python
chosen
[ { "from": "system", "value": "Fix not awaited ProgressTracker bug" }, { "from": "human", "value": "STEP_COUNTS = {\n \"delete_reference\": 2,\n \"import_reference\": 0,\n \"setup_remote_reference\": 0,\n \"update_remote_reference\": 0,\n \"update_software\": 0,\n \"install_hmms...
python
chosen
[ { "from": "system", "value": "Use context manager to read syntax file\n" }, { "from": "human", "value": "from collections import OrderedDict\nimport ruamel.yaml\nyaml = ruamel.yaml.YAML()\n\nclass Operation():\n def __init__(self, extension):\n self.extension = extension\n\nclass Merge...
python
chosen
[ { "from": "system", "value": "Simplify getting countries associated with warehouse\n" }, { "from": "human", "value": "import uuid\n\nfrom django.db import models\nfrom django.utils.translation import pgettext_lazy\n\nfrom ..account.models import Address\nfrom ..shipping.models import ShippingZon...
python
chosen
[ { "from": "system", "value": "Fix UUID field migration for change email request model.\n\nWe should have been used builtin UUID field because our own field has uniqueness constraint.\n" }, { "from": "human", "value": "from django.db import migrations\n\nimport waldur_core.core.fields\n\n\nclass ...
python
chosen
[ { "from": "system", "value": "Add a variable to hold reached points\n" }, { "from": "human", "value": "from __future__ import unicode_literals\n\n\nclass Task(object):\n\n def __init__(self, number, description, maxPoints):\n self.number = number\n self.description = description...
python
chosen
[ { "from": "system", "value": "Read files defined as argument\n" }, { "from": "human", "value": "# \n# MIT License\n\n# Copyright (c) 2017 Hampus Tågerud\n# \n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files...
python
chosen
[ { "from": "system", "value": "Add type hint for -DN42\n" }, { "from": "human", "value": "#!/bin/python\n# coding: utf-8\n\nimport argparse\nimport asyncio\n\nimport lglass.dn42\nimport lglass.whois.engine\nimport lglass.whois.server\n\ndef create_database(db_path):\n return lglass.dn42.DN42Da...
python
chosen
[ { "from": "system", "value": "Increase opacity on chart backgrounds\n" }, { "from": "human", "value": "from SVGGenerator import SVGGenerator\nfrom Label import Label\n\n\nclass Chart(SVGGenerator):\n def __init__(self, name, title, data):\n SVGGenerator.__init__(self, './chart.svg.must...
python
chosen
[ { "from": "system", "value": "Add the missing 'np.' before 'array'\n" }, { "from": "human", "value": "\"\"\"The metrics module implements functions assessing prediction error for specific purposes.\"\"\"\n\nimport numpy as np\n\ndef trapz(x, y):\n \"\"\"Trapezoidal rule for integrating\n t...
python
chosen
[ { "from": "system", "value": "Add product_number and serial_number identifiers\n" }, { "from": "human", "value": "\"\"\"\nSo this is where all the SQL commands live\n\"\"\"\n\nCREATE_SQL = \"\"\"\nCREATE TABLE component_type (\n id INT PRIMARY KEY AUTO_INCREMENT,\n type VARCHAR(255) UNIQUE...
python
chosen
[ { "from": "system", "value": "Split up tests for Result and File\n" }, { "from": "human", "value": "import unittest\nfrom performance_testing.result import Result, File\nimport os\nimport shutil\n\n\nclass ResultTestCase(unittest.TestCase):\n def setUp(self):\n self.current_directory =...
python
chosen
[ { "from": "system", "value": "Make sure we pass *args to the requests session object\n" }, { "from": "human", "value": "# Copyright (c) 2017 LINE Corporation\n# These sources are released under the terms of the MIT license: see LICENSE\n\nimport requests.sessions\n\nfrom promgen.version import _...
python
chosen
[ { "from": "system", "value": "Define __all__ in intelligibility_models package\n\nDefine to import all intelligibility models available if one imports\nwith *. Also, allows to import the models directly from\nintelligibility_models, rather than having to import the modules.\n" }, { "from": "human", ...
python
chosen
[ { "from": "system", "value": "Use partition instead of split.\n" }, { "from": "human", "value": "from django.http import HttpResponseBadRequest\r\nfrom django.contrib import auth\r\n\r\n\r\nclass TokenMiddleware(object):\r\n \"\"\"\r\n Middleware that authenticates against a token in the h...
python
chosen
[ { "from": "system", "value": "Fix bug crashing the experiment on a non-recognized keypress.\n" }, { "from": "human", "value": "\"\"\"\nMain world controller.\n\"\"\"\n\nfrom appstate import AppState\nimport pygame\nimport events\n\nclass Controller(events.EventListener):\n \"\"\"\n Control...
python
chosen
[ { "from": "system", "value": "Test that `s` as a Dask Array is preserved\n\nEnsure that if `s` is a Dask Array, it will still be a Dask Array after\ntype normalization is done on the input arguments of the Fourier\nfilters. This allows Fourier filters to construct a computation around\nan unknown `s` in add...
python
chosen
[ { "from": "system", "value": "Add EmailActionTest class and as well as a test to check if email is sent to the right server.\n" }, { "from": "human", "value": "import unittest\nfrom unittest import mock\n\nfrom action import PrintAction\n\n\n@mock.patch(\"builtins.print\")\nclass PrintActionTest...
python
chosen
[ { "from": "system", "value": "Fix the license header regex.\n\nMost of the files are attributed to Google Inc so I used this instead of\nChromium Authors.\n\nR=mark@chromium.org\nBUG=\nTEST=\n\nReview URL: http://codereview.chromium.org/7108074\n" }, { "from": "human", "value": "# Copyright (c) ...
python
chosen
[ { "from": "system", "value": "Use faster password hasher in sqlite tests\n\nFixed #18163\n" }, { "from": "human", "value": "# This is an example test settings file for use with the Django test suite.\n#\n# The 'sqlite3' backend requires only the ENGINE setting (an in-\n# memory database will be ...
python
chosen
[ { "from": "system", "value": "Exclude chamber workflow from targets tested by j2 testall\n\nPiperOrigin-RevId: 384424406\n" }, { "from": "human", "value": "# Copyright 2021 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in ...
python
chosen
[ { "from": "system", "value": "Move XMP init into setUp()\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 import *\...
python
chosen
[ { "from": "system", "value": "Improve batch Drum reading implementation\n" }, { "from": "human", "value": "import sys\nimport json\nfrom indra.sources.trips.drum_reader import DrumReader\nfrom indra.sources.trips import process_xml\n\ndef read_content(content):\n sentences = []\n for k, v ...
python
chosen
[ { "from": "system", "value": "[U] Fix the argument name to adapt gensim 4.0." }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nimport logging\n\nfrom gensim.models import word2vec\n\ndef main():\n\n logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=loggin...
python
chosen
[ { "from": "system", "value": "Reset docs theme, RTD should override\n" }, { "from": "human", "value": "# Configuration file for the Sphinx documentation builder.\n#\n# For the full list of built-in configuration values, see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configu...
python
chosen
[ { "from": "system", "value": "Patch the colorized formatter to not break for C modules.\n" }, { "from": "human", "value": "\"\"\" A startup script for IPython to patch it to 'inspect' using cinspect. \"\"\"\n\n# Place this file in ~/.ipython/<PROFILE_DIR>/startup to patch your IPython to\n# use ...
python
chosen
[ { "from": "system", "value": "Make basic composite pass work\n" }, { "from": "human", "value": "# Copyright (c) 2015 Ultimaker B.V.\n# Cura is released under the terms of the AGPLv3 or higher.\n\nfrom UM.Resources import Resources\n\nfrom UM.View.RenderPass import RenderPass\nfrom UM.View.GL.Ope...
python
chosen
[ { "from": "system", "value": "[msm/flux] Include flux package in doc\n" }, { "from": "human", "value": "from .api import *\n" }, { "from": "gpt", "value": "r\"\"\"\n\n===================================================================\nflux - Reactive flux an transition pathways (:mo...
python
chosen
[ { "from": "system", "value": "Use regexp for checking the line\n" }, { "from": "human", "value": "#!/usr/bin/env python\n#\n# igcollect - Memcached\n#\n# Copyright (c) 2016, InnoGames GmbH\n#\n\nimport telnetlib\nimport sys\nimport socket\nimport time\n\n\ndef main(host='127.0.0.1', port='11211'...
python
chosen
[ { "from": "system", "value": "Update dsub version to 0.3.6\n\nPiperOrigin-RevId: 281980915\n" }, { "from": "human", "value": "# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complianc...
python
chosen
[ { "from": "system", "value": "Make sure version is initialized\n" }, { "from": "human", "value": "import libsinan\n\nfrom libsinan import handler, output, jsax\n\n\nclass VersionCheckTaskHandler(output.SimpleTaskHandler):\n\n def object_end(self):\n \"\"\" We only get one object per ri...
python
chosen
[ { "from": "system", "value": "Update stream name to Replay\n" }, { "from": "human", "value": "from index import app\nfrom flask import render_template, request\nfrom config import BASE_URL\nfrom query import get_callout, get_billboard\n\nSHEET_ID = 'tzE2PsqJoWRpENlMr-ZlS8A'\n#SHEET_ID = 'tIk5itV...
python
chosen
[ { "from": "system", "value": "Fix rules engine version reporting.\n" }, { "from": "human", "value": "import os\n\nfrom oslo.config import cfg\n\nfrom st2common import log as logging\nfrom st2common.models.db import db_setup\nfrom st2common.models.db import db_teardown\nfrom st2common.constants.l...
python
chosen
[ { "from": "system", "value": "Add sets + a float value to the benchmark.\n" }, { "from": "human", "value": "\"\"\"\nPerformance tests for the agent/dogstatsd metrics aggregator.\n\"\"\"\n\n\nfrom aggregator import MetricsAggregator\n\n\n\n\nclass TestAggregatorPerf(object):\n\n def test_aggre...
python
chosen
[ { "from": "system", "value": "Add aircraft and seating arrangement to Flight\n" }, { "from": "human", "value": "\"\"\"Model for aircraft flights\"\"\"\n\n\nclass Flight:\n def __init__(self, number):\n if not number[:4].isalpha():\n raise ValueError(\"No airline code in '{}'...
python
chosen