conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Implement Dark Iron Skulker and Volcanic Lumberer\n"
},
{
"from": "human",
"value": "from ..utils import *\n\n\n##\n# Minions\n\n# Flamewaker\nclass BRM_002:\n\tevents = [\n\t\tOWN_SPELL_PLAY.after(Hit(RANDOM_ENEMY_MINION, 1) * 2)\n\t]\n\n\n# Imp Gang Boss\nclass BR... | python | chosen |
[
{
"from": "system",
"value": "Fix linting errors in GoBot\n"
},
{
"from": "human",
"value": "from minibot.bot import Bot\nfrom minibot.hardware.rpi.gpio import PWM\nfrom minibot.interface.servo import Servo\n\nimport math\nimport time\n\nL_MOTOR_PIN = 12\nR_MOTOR_PIN = 18\n\nclass GoBot(Bot):\n\... | python | chosen |
[
{
"from": "system",
"value": "Mark \"Enter your postcode\" for translation in a form field label\n"
},
{
"from": "human",
"value": "from django import forms\n\nfrom localflavor.gb.forms import GBPostcodeField\n\n\nclass PostcodeLookupForm(forms.Form):\n postcode = GBPostcodeField(label=\"Ente... | python | chosen |
[
{
"from": "system",
"value": "Add a log file on windows\n"
},
{
"from": "human",
"value": "#! /usr/bin/python3\n# -*- coding: utf-8 -*-\nfrom qidle import main\nimport logging\n\nif __name__ == '__main__':\n logging.basicConfig(level=logging.INFO)\n main()\n"
},
{
"from": "gpt",
... | python | chosen |
[
{
"from": "system",
"value": "Update description of the level 06"
},
{
"from": "human",
"value": "# --------\n# |C @ S aa|\n# --------\n\nlevel.description(\"The wall behind you feels a bit further away in this room. And you hear more cries for help.\")\nlevel.tip(\"You can walk backward by pa... | python | chosen |
[
{
"from": "system",
"value": "Remove IP address from feed description\n"
},
{
"from": "human",
"value": "from django.contrib.syndication.views import Feed\nfrom django.core.urlresolvers import reverse\nfrom django.utils.feedgenerator import Atom1Feed\n\nfrom .models import LoggedAction\n\nclass ... | python | chosen |
[
{
"from": "system",
"value": "Replace duplicate test with valid address kwarg\n"
},
{
"from": "human",
"value": "import sys\n\nimport pytest\n\nif sys.version_info >= (3, 3):\n from unittest.mock import Mock\n\n\nABI = [{}]\nADDRESS = '0xd3cda913deb6f67967b99d67acdfa1712c293601'\nINVALID_CHEC... | python | chosen |
[
{
"from": "system",
"value": "Use inspect to get the list of arguments each filter accepts"
},
{
"from": "human",
"value": "\"\"\" fedmsg-notifications internal API \"\"\"\n\nimport fmn.lib.models\n\nimport logging\nlog = logging.getLogger(__name__)\n\n\ndef recipients(session, config, valid_pat... | python | chosen |
[
{
"from": "system",
"value": "Make GANGLIA_PATH default to /etc/ganglia\n"
},
{
"from": "human",
"value": "DEBUG = True\n\nGANGLIA_PATH = '/usr/local/etc' # where gmetad.conf is located\n\nAPI_SERVER = 'http://ganglia-api.example.com:8080' # where ganglia-api.py is hosted\nBASE_URL = '/ganglia... | python | chosen |
[
{
"from": "system",
"value": "Fix encoding after fetching remote data\n\nAdds opening of csv file in binary format, plus conversion of fetched data to utf-8. This\nresolves a UnicodeEncodeError exception.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\n\nimport requests\n\n\... | python | chosen |
[
{
"from": "system",
"value": "Develop branch bumped to 0.6.0dev with new versioning mechanism introduced\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, print_function, unicode_literals\n\n# NB! This is not necessarily the version scheme we want, however having a good\... | python | chosen |
[
{
"from": "system",
"value": "Add test coverage for expected nutrient retrieval behaviour\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom recipe_scrapers._exceptions import SchemaOrgException\nfrom recipe_scrapers._schemaorg import SchemaOrg\n\n\nclass TestSchemaOrg(unittest.TestCase)... | python | chosen |
[
{
"from": "system",
"value": "refactor: Change location of regex compilation\n"
},
{
"from": "human",
"value": "import re\n\nurl_re = re.compile(\"(?:\\s|^)<(https?://[\\w./?+&+%$!#=\\-_]+)>(?:\\s|$)\")\n\n\ndef extract_url(message):\n \"\"\"\n Returns the first url in a message. If there ... | python | chosen |
[
{
"from": "system",
"value": "Add HTCondorParser to init imports\n"
},
{
"from": "human",
"value": "'''\n Copyright (C) 2012 STFC\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 co... | python | chosen |
[
{
"from": "system",
"value": "Simplify our own test suite\n"
},
{
"from": "human",
"value": "from attest import Tests\n\n\nsuite = lambda mod: 'attest.tests.' + mod + '.suite'\n\nall = Tests([suite('asserts'),\n suite('collections'),\n suite('classy'),\n suite... | python | chosen |
[
{
"from": "system",
"value": "Fix verbose level index out of range error\n"
},
{
"from": "human",
"value": "import logging\n\nLOG_FORMAT = '%(asctime)s %(levelname)s: %(message)s [in %(pathname)s:%(lineno)d]'\n\ndef init_console_logger(logging_verbosity=3):\n logging_levels = [logging.ERROR, ... | python | chosen |
[
{
"from": "system",
"value": "Use stat instead of this.\n"
},
{
"from": "human",
"value": "import os\nimport site\nimport sys\nimport this\nfrom distutils.sysconfig import get_python_lib\n\nSITE_PACKAGES_PATHS = set()\nif hasattr(site, 'getsitepackages'):\n SITE_PACKAGES_PATHS.update(site.get... | python | chosen |
[
{
"from": "human",
"value": "Add metadata to ``testapp`` package.\n"
},
{
"from": "gpt",
"value": "__author__ = 'Igor Davydenko <playpauseandstop@gmail.com>'\n__description__ = 'Flask-And-Redis test project'\n__license__ = 'BSD License'\n__version__ = '0.2.3'\n"
}
] | python | chosen |
[
{
"from": "system",
"value": "Add test for status view\n"
},
{
"from": "human",
"value": "import os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"api.api.settings\")\n\nimport django\nfrom django.test import TestCase\nfrom rest_framework.test import APIRequestFactory\n\nfrom api.webview.v... | python | chosen |
[
{
"from": "system",
"value": "Add tests for parse CLI with pos_kind\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport pytest\nimport tempfile\nfrom click.testing import CliRunner\n\nimport tbmodels\nfrom tbmodels._cli import cli\n\n\n@pytest.mark.paramet... | python | chosen |
[
{
"from": "system",
"value": "Fix test for the fork\n"
},
{
"from": "human",
"value": "from tests import utils\n\n\ndef test_recursion():\n uwhois = utils.create_uwhois()\n expected = 'whois.markmonitor.com'\n transcript = utils.read_transcript('google.com.txt')\n # Make sure there's... | python | chosen |
[
{
"from": "system",
"value": "Update tests after lots of work on Resources\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom micromanager.resources import Resource\nfrom micromanager.resources import BQDataset\nfrom micromanager.resources import Bucket\nfrom micromanager.resources import ... | python | chosen |
[
{
"from": "system",
"value": "Add test coverage for Item.ensure_not_locked() method\n"
},
{
"from": "human",
"value": "# Tests for SecretStorage\n# Author: Dmitry Shachnev, 2018\n# License: 3-clause BSD, see LICENSE file\n\nimport unittest\n\nfrom secretstorage import dbus_init, get_any_collecti... | python | chosen |
[
{
"from": "system",
"value": "Remove extra space in help string\n\nExtra spaces make the openstack-manuals tests fail with a niceness\nerror. This patch removes an extra space at the end of a help string.\n\nChange-Id: I29bab90ea5a6f648c4539c7cd20cd9b2b63055c2\n"
},
{
"from": "human",
"value": "... | python | chosen |
[
{
"from": "system",
"value": "Insert third_party into the second slot of sys.path rather than the last slot\n"
},
{
"from": "human",
"value": "import os.path\nimport sys\n\n# This bit of evil should inject third_party into the path for relative imports.\nsys.path.append(os.path.dirname(__file__)... | python | chosen |
[
{
"from": "system",
"value": "Add documentation to the root view of BrowsableAPI\n"
},
{
"from": "human",
"value": "from rest_framework.routers import DefaultRouter\nfrom rest_framework_extensions.routers import NestedRouterMixin\n\n\nclass DefaultRouterWithNesting(NestedRouterMixin, DefaultRout... | python | chosen |
[
{
"from": "system",
"value": "Use ip instead of localhost for travis\n"
},
{
"from": "human",
"value": "import unittest\nimport asyncio\nimport io\nimport multiprocessing\nimport urllib.request\nimport time\n\nimport grole\n\ndef simple_server():\n app = grole.Grole()\n\n @app.route('/')\n... | python | chosen |
[
{
"from": "system",
"value": "Return value of get_result is a pair of (task, result data)"
},
{
"from": "human",
"value": "import pymw\nimport pymw.interfaces\n\nimport artgraph.plugins.infobox\n\nfrom artgraph.node import NodeTypes\nfrom artgraph.node import Node\n\nclass Miner(object):\n no... | python | chosen |
[
{
"from": "system",
"value": "Make config list able to handle long values\n"
},
{
"from": "human",
"value": "import textwrap\n\nfrom prettytable import PrettyTable\n\nfrom ..config import get_config, save_config_value\nfrom .. import constants\nfrom ..log import log_to_client\n\ndef _eligible_co... | python | chosen |
[
{
"from": "system",
"value": "Read Input: Read file complete or by lines\n"
},
{
"from": "human",
"value": "class Solution:\n def __init__(self, nr):\n self.nr = nr\n self.test = False\n self.input = \"\"\n self.solution = [\"(not calculated)\", \"(not calculated)\... | python | chosen |
[
{
"from": "system",
"value": "Add a function which allows packet dumps to be produced\neasily for inserting into regression tests.\n"
},
{
"from": "human",
"value": "# This hack by: Raymond Hettinger\nclass hexdumper:\n \"\"\"Given a byte array, turn it into a string. hex bytes to stdout.\"\"... | python | chosen |
[
{
"from": "system",
"value": "Reword docstrings for exception classes\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nclass SpamBLError(Exception):\n ''' Base exception class for spambl module '''\n \nclass UnknownCodeError(SpamBLError):\n ''' Raise when trying to use an u... | python | chosen |
[
{
"from": "system",
"value": "[REF] Index and code improve cnab.return.move.code\n\nSigned-off-by: Luis Felipe Mileo <c9a5b4d335634d99740001a1172b3e56e4fc5aa8@kmee.com.br>\n"
},
{
"from": "human",
"value": "# Copyright 2020 Akretion\n# @author Magno Costa <magno.costa@akretion.com.br>\n# License... | python | chosen |
[
{
"from": "system",
"value": "Update repo version to v0.0.5.dev\n\nPiperOrigin-RevId: 471307548\n"
},
{
"from": "human",
"value": "\"\"\"Init file.\"\"\"\nimport os\nimport sys\n\nTHIS_DIR = os.path.dirname(os.path.realpath(__file__))\nPROTO_ROOT = os.path.realpath(os.path.join(THIS_DIR, \"servi... | python | chosen |
[
{
"from": "system",
"value": "Fix incorrect docstring for NFA class\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nimport automata.automaton as automaton\n\n\nclass NFA(automaton.Automaton):\n \"\"\"a deterministic finite automaton\"\"\"\n\n def validate_automaton(self):\n ... | python | chosen |
[
{
"from": "system",
"value": "Support for angular + API added.\n"
},
{
"from": "human",
"value": "from flask import Flask, render_template, abort, redirect, url_for\nfrom flask.ext.script import Manager\n\nfrom jinja2 import TemplateNotFound\n\napp = Flask(__name__)\napp.config['TESTING'] = True... | python | chosen |
[
{
"from": "system",
"value": "REFACTOR Change order of tests.\n"
},
{
"from": "human",
"value": "from tddcommitmessage.messagebody import MessageBody\nfrom tddcommitmessage import Kind\n\ndef test_message_is_wrapped_in_quotes():\n msg = MessageBody(Kind.red, 'Forty-two')\n assert str(msg) ... | python | chosen |
[
{
"from": "system",
"value": "Add link to gnu coreutils"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom genes.posix.traits import only_posix\nfrom genes.process.commands import run\n\n\n@only_posix()\ndef chgrp(path, group):\n run(['chgrp', group, path])\n\n\n@only_posix()\ndef... | python | chosen |
[
{
"from": "system",
"value": "Check for autoincrement before executing the instruction\n"
},
{
"from": "human",
"value": "class VirtualMachine:\n def __init__(self, bytecodes, ram_size=256, executing=True):\n self.bytecodes = bytecodes\n self.data = [None]*ram_size\n self... | python | chosen |
[
{
"from": "system",
"value": "Change API for parsing httplib cookies\n"
},
{
"from": "human",
"value": "from . import CookieParser, CookieDict\n\ndef parse_cookies(httplib_headers):\n cookies = [\n CookieParser.parse_set_cookie_value(\n header[1]\n ) for header in htt... | python | chosen |
[
{
"from": "system",
"value": "Fix descriptor module to support assimilation\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nfrom xml.etree import cElementTree as etree\n\nfrom conary import conarycfg\nfrom conary import conaryclient\nfrom rpath_tools.client.utils.config_descriptor_cache ... | python | chosen |
[
{
"from": "system",
"value": "Add 'gym' prefix to URL in email app\n\nThe email app is supposed to be used in other parts of the application,\nnot only in the gym.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# This file is part of wger Workout Manager.\n#\n# wger Workout Manage... | python | chosen |
[
{
"from": "system",
"value": "[AC-8673] Fix bare datetime.now() in factory\n"
},
{
"from": "human",
"value": "import swapper\n\nfrom datetime import (\n datetime,\n timedelta,\n)\nfrom factory import SubFactory\nfrom factory.django import DjangoModelFactory\nfrom simpleuser.tests.factories... | python | chosen |
[
{
"from": "system",
"value": "Fix o8d importer to read card IDs to make the sanitized cards\n"
},
{
"from": "human",
"value": "# Read an OCTGN deck\nfrom xml.etree import ElementTree\n\ndef read_file(filename):\n filedata = open(filename).read()\n return read(filedata)\n\ndef read(filedata):\n... | python | chosen |
[
{
"from": "system",
"value": "Add extra development data so the All England page loads\n\nPreviously the absence of the PPU ImportLog entry caused the page to\nthrow an error.\n"
},
{
"from": "human",
"value": "from django.core.management import call_command\nfrom django.core.management.base imp... | python | chosen |
[
{
"from": "system",
"value": "Mark build 90 as 1.6.6 final\n"
},
{
"from": "human",
"value": "version = '1.6.6'\nrevision = ' beta 2'\nmilestone = 'Yoitsu'\nrelease_number = '89'\nprojectURL = 'https://syncplay.pl/'\n"
},
{
"from": "gpt",
"value": "version = '1.6.6'\nrevision = ''\nm... | python | chosen |
[
{
"from": "system",
"value": "Fix Sphinx warnings about duplicate objects\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis subpackage contains tools to perform point-spread-function (PSF)\nphotometry.\n\"\"\"\n\nfrom .epsf import * ... | python | chosen |
[
{
"from": "system",
"value": "Enable with statement tests for Python 2.5\n"
},
{
"from": "human",
"value": "import sys\n\nif sys.version_info[:2] > (2, 5):\n from tests._testwith import *\nelse:\n from tests.support import unittest2\n \n class TestWith(unittest2.TestCase):\n \... | python | chosen |
[
{
"from": "system",
"value": "Add test for new edge sampling\n\nI think it would've failed before"
},
{
"from": "human",
"value": "import numpy as np\n\nfrom msmbuilder.decomposition import tICA\nfrom msmbuilder.io.sampling import sample_dimension\n\n\ndef test_sample_dimension():\n np.random... | python | chosen |
[
{
"from": "system",
"value": "Raise ValueError instead of struct.error\n\nThe protocol for field encoding and decoding is to raise ValueError, so this is a necessary translation.\n"
},
{
"from": "human",
"value": "import struct\nfrom steel.fields import Field\n\n__all__ = ['Integer']\n\n\nclass ... | python | chosen |
[
{
"from": "system",
"value": "Add logging to track down a bug\n"
},
{
"from": "human",
"value": "# Copyright 2013 Russell Heilling\nimport logging\n\nfrom google.appengine.api import users\n\nfrom pulldb import base\nfrom pulldb import session\nfrom pulldb.models.users import User\n\nclass Profi... | python | chosen |
[
{
"from": "system",
"value": "Add response_ok and response_error methods which return byte strings.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n\"\"\"Echo server in socket connection: receives and sends back a message.\"\"\"\nimport socket\n\n\nif __name__ == '__main__':\n \"\"... | python | chosen |
[
{
"from": "system",
"value": "Set def arguments to immutable to avoid nasty side effect.\n\ngit-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@3086 d6536bca-fef9-0310-8506-e4c0a848fbcf\n"
},
{
"from": "human",
"value": "# Last Change: Sat Jun 09 07:00 PM 2007 J\n\n#============================... | python | chosen |
[
{
"from": "system",
"value": "Add an explicit related name\n"
},
{
"from": "human",
"value": "from django.db import models\n\nclass ExperimentGroup(models.Model):\n experiment = models.CharField(max_length=48)\n\n user = models.ForeignKey('auth.User', related_name=None)\n\n group = mode... | python | chosen |
[
{
"from": "system",
"value": "Add custom form validation enforcing that each new book is unique\n"
},
{
"from": "human",
"value": "from django import forms\nfrom .models import Book\n\nclass ReviewForm(forms.Form):\n\t\"\"\"\n\tForm for reviewing a book\n\t\"\"\"\n\n\tis_favourite = forms.Boolea... | python | chosen |
[
{
"from": "system",
"value": "Remove DEBUG=False that's not needed anymore\n\nNow we are serving 404s via El Proxito and forcing DEBUG=False is not\nneeded anymore.\n"
},
{
"from": "human",
"value": "from .docker_compose import DockerBaseSettings\n\nclass WebDevSettings(DockerBaseSettings):\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Add logging output when called from command line"
},
{
"from": "human",
"value": "import os\nimport argparse\nfrom buildkmz import create_kmz_from_csv\n \ndef main():\n \"\"\" Build file as per user inputs\n \"\"\"\n \n args = get_cmd_args() \n ... | python | chosen |
[
{
"from": "system",
"value": "Remove the doc that describes the setup. Setup is automated now\n"
},
{
"from": "human",
"value": "'''\n$ mysql\nWelcome to the MySQL monitor. Commands end with ; or \\g.\nYour MySQL connection id is 211\nServer version: 5.6.15 Homebrew\n\nCopyright (c) 2000, 2013,... | python | chosen |
[
{
"from": "system",
"value": "Add a test for vasp_raman.T\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nimport time\nimport unittest\nimport vasp_raman\n\nclass VaspRamanTester(unittest.TestCase):\n def testMAT_m_VEC(self):\n self.assertTrue(False)\n"
},
{
... | python | chosen |
[
{
"from": "system",
"value": "Fix failing bash completion function test signature.\n"
},
{
"from": "human",
"value": "import click\nimport pytest\n\n\nif click.__version__ >= '3.0':\n def test_legacy_callbacks(runner):\n def legacy_callback(ctx, value):\n return value.upper(... | python | chosen |
[
{
"from": "system",
"value": "Add many tests for prompt.query_yes_no().\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_prompt\n--------------\n\nTests for `cookiecutter.prompt` module.\n\"\"\"\n\nimport unittest\n\nfrom cookiecutter import promp... | python | chosen |
[
{
"from": "system",
"value": "Add \"localhost\" in the allowed hosts for testing purposes\n"
},
{
"from": "human",
"value": "\"\"\"GeoKey settings.\"\"\"\n\nfrom geokey.core.settings.dev import *\n\n\nDEFAULT_FROM_EMAIL = 'no-reply@travis-ci.org'\nACCOUNT_EMAIL_VERIFICATION = 'optional'\n\nSECRE... | python | chosen |
[
{
"from": "system",
"value": "[1.4.x] Bump version to no longer claim to be 1.4.5 final.\n"
},
{
"from": "human",
"value": "VERSION = (1, 4, 5, 'final', 0)\n\ndef get_version(version=None):\n \"\"\"Derives a PEP386-compliant version number from VERSION.\"\"\"\n if version is None:\n ... | python | chosen |
[
{
"from": "system",
"value": "Implement system configurations load from file.\n"
},
{
"from": "human",
"value": "from blo.BloArticle import BloArticle\nfrom blo.DBControl import DBControl\n\n\nclass Blo:\n def __init__(self, db_file_path, template_dir=\"\"):\n self.template_dir = templ... | python | chosen |
[
{
"from": "system",
"value": "Fix broken tests after moving _autoconvert to autotype\n"
},
{
"from": "human",
"value": "import pytest\nfrom zfssnap import Host, Dataset\nimport subprocess\n\n\nPROPERTY_PREFIX = 'zfssnap'\n\n\nclass TestDataset(object):\n @pytest.fixture\n def fs(self):\n ... | python | chosen |
[
{
"from": "system",
"value": "Test the first item of the list, not the last\n"
},
{
"from": "human",
"value": "from mollie.api.objects.issuer import Issuer\n\nfrom .utils import assert_list_object\n\n\ndef test_get_issuers(client, response):\n \"\"\"Get all the iDeal issuers via the include q... | python | chosen |
[
{
"from": "system",
"value": "Add a `PlayRec` app unit test\n\nMerely checks that all sessions are recorded as expected and that the call\nis hung up afterwards. None of the recorded audio content is verified.\n"
},
{
"from": "human",
"value": "# This Source Code Form is subject to the terms of ... | python | chosen |
[
{
"from": "system",
"value": "Remove header, this will be imported by a runner"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom evolution_master.runners import pkg, download\n\n# Install for Arch\nwith pkg.pacman() as pkg_man:\n pkg_man.install('go')\n\n# Install for Debian & Ub... | python | chosen |
[
{
"from": "system",
"value": "Add None identifier / repr print\n"
},
{
"from": "human",
"value": "def pretty_print_recursive(obj, indent=0):\n def i_print(s):\n print(' ' * indent + s)\n\n if obj is None:\n i_print('None')\n elif isinstance(obj, (int, float, str)):\n ... | python | chosen |
[
{
"from": "system",
"value": "Extend custom exception and add additional logging"
},
{
"from": "human",
"value": "# Define retry util function\n\n\nclass RetryException(Exception):\n pass\n\n\ndef retry(func, max_retry=10):\n \"\"\"\n @param func: The function that needs to be retry\n ... | python | chosen |
[
{
"from": "system",
"value": "Handle sample rate in counts\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\n__all__ = ['timing', 'incr']\n\nfrom django_statsd.clients import statsd\nfrom django.conf import settings\nfrom random import random\n\n\ndef _get_key(key):\n ... | python | chosen |
[
{
"from": "system",
"value": "Modify existing Programs migration to account for help_text change\n\nPrevents makemigrations from creating a new migration for the programs app.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db im... | python | chosen |
[
{
"from": "system",
"value": "Exclude filter and xrange fixers.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = '3.7'\n\nsetup(name='jarn.mkrelease',\n version=version,\n description='Python egg releaser',\n long_description=open('README... | python | chosen |
[
{
"from": "system",
"value": "Add postsecondary stats to the StatsBase model\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, unicode_literals\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\n\nfrom... | python | chosen |
[
{
"from": "system",
"value": "Prepare for twython-django pip release\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n__author__ = 'Ryan McGrath <ryan@venodesigns.net>'\n__version__ = '1.5.0'\n\nsetup(\n name='twytho... | python | chosen |
[
{
"from": "system",
"value": "Switch to distutils, fix install for py3.4\n\nsetuptools is goddamned terrible"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages, Command\nimport os\n\npackages = find_packages()\n\n\nclass... | python | chosen |
[
{
"from": "system",
"value": "Change package name to use hyphen\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nfrom ez_setup import use_setuptools\nuse_setuptools()\nfrom setuptools import setup, find_packages\nfrom csdms.dakota import __version__, plugin_script\n\npackage_name = 'cs... | python | chosen |
[
{
"from": "system",
"value": "Change Django requirement to avoid 1.10 alpha\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name = \"open511-server\",\n version = \"0.1\",\n url='',\n license = \"\",\n packages = find_packages(),\n ins... | python | chosen |
[
{
"from": "system",
"value": "Print ICU and Unicode version, if available\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n\n\"\"\"Print Python interpreter path and version.\"\"\"\n\nimport sys\n\nsys.stdout.write(sys.executable + '\\n')\nsys.stdout.write(sys.version + '\\n')\nsys.stdo... | python | chosen |
[
{
"from": "system",
"value": "Update time service to simulate gradually increasing slow response times.\n"
},
{
"from": "human",
"value": "\"\"\" service_time.py \"\"\"\n\nfrom datetime import datetime\n\nfrom flask import Flask, jsonify\n\n\napp = Flask(__name__)\ncount = 0\n\n\n@app.route(\"/t... | python | chosen |
[
{
"from": "system",
"value": "Fix migrations from text to inet.\n"
},
{
"from": "human",
"value": "\"\"\"Change last_ip to inet.\n\nRevision ID: 1fbbb727e1dc\nRevises: 2dd8b091742b\nCreate Date: 2015-08-31 20:54:43.824788\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '1fbbb72... | python | chosen |
[
{
"from": "system",
"value": "Fix the unknown entity type test\n\nWe want to check if any user-supplied entity name is unkown, not if any\nof the known types are not in the user-supplied list\n"
},
{
"from": "human",
"value": "import argparse\n\n\nfrom .schema import SCHEMA\n\n\ndef reindex(args... | python | chosen |
[
{
"from": "system",
"value": "Add self-rating flag for movies. Removed LikedOrNot table\n"
},
{
"from": "human",
"value": "from django.db import models\n\n# Create your models here.\nclass Movie(models.Model):\n movie_id = models.IntegerField(primary_key=True)\n title = models.CharField(ma... | python | chosen |
[
{
"from": "system",
"value": "Enable markdown for PyPI README"
},
{
"from": "human",
"value": "import subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_option... | python | chosen |
[
{
"from": "system",
"value": "Increment version for deployment. Update trove classifier.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport sys\n\ninstall_requires = ['six']\nif sys.version_info[0] == 2 and sys.version_info[1] == 6:\n install_requires.extend(['ordereddict... | python | chosen |
[
{
"from": "system",
"value": "Upgrade django-local-settings 1.0a8 => 1.0a10\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.0a8',\n 'stashward',\n]\n\nif sys.version... | python | chosen |
[
{
"from": "system",
"value": "Update test deps: pytest-coverage -> pytest-cov\n"
},
{
"from": "human",
"value": "\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nconfig = {\n 'description': 'Logging wrapper',\n 'author': 'Feth Arezki',\... | python | chosen |
[
{
"from": "system",
"value": "Add JavaScript files as package data.\n"
},
{
"from": "human",
"value": "from paperpal import __version__ as version\n\ndef slurp(filename):\n with open(filename) as opened_file:\n return opened_file.read()\n\nfrom setuptools import setup\n\nsetup(name='pa... | python | chosen |
[
{
"from": "system",
"value": "Use compatible release versions for all dependencies\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\nimport glob\n\nVERSION = \"0.6.3\"\n\nsrc_dir = os.path.dirname(__file__)\n\ninstall_requires = [\n \"troposphere>=1.8.... | python | chosen |
[
{
"from": "system",
"value": "Upgrade to Flask 0.12.3 to fix CVE-2018-1000656\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nwith open('README.md') as file:\n long_description = file.read()\n\n\nsetup(\n name=\"guacamole-files\",\n version=\"0.1.0\",\n author=\"An... | python | chosen |
[
{
"from": "system",
"value": "Move lib dependency to nexmo\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(... | python | chosen |
[
{
"from": "system",
"value": "Add json to from vdf scripts\n\nSigned-off-by: Stany MARCEL <3e139d47b96f775f4bc13af807cbc2ea7c67e72b@gmail.com>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup, Extension\n\nuinput = Extension('libuinput',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add authors to long description.\n"
},
{
"from": "human",
"value": "try:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup, find_packages\n\nDESCRIPTION = \"Convert Matplotlib plots into Leaflet web maps\"\nL... | python | chosen |
[
{
"from": "system",
"value": "Fix for md to rst\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\ntry:\n from pypandoc import convert\n read_md = lambda f: convert(f, 'rst')\n long_description = read_md('README.md')\nexc... | python | chosen |
[
{
"from": "system",
"value": "Use py_modules instead of packages.\n\nThis is necessary when only having a \"root package\".\n"
},
{
"from": "human",
"value": "import codecs\n\nfrom setuptools import setup, find_packages\n\n\ndef long_description():\n with codecs.open('README.rst', encoding='u... | python | chosen |
[
{
"from": "system",
"value": "Fix case of \"nose\" in tests_require."
},
{
"from": "human",
"value": "import sys\n\nfrom setuptools import setup, find_packages\n\n\nextra_setup = {}\nif sys.version_info >= (3,):\n extra_setup['use_2to3'] = True\n\nsetup(\n name='blessings',\n version='1... | python | chosen |
[
{
"from": "system",
"value": "Add raven to the dependancy list."
},
{
"from": "human",
"value": "#!/usr/bin/env python\n#coding: utf-8\nfrom cms import VERSION\n\nfrom setuptools import setup, find_packages\n\n\nEXCLUDE_FROM_PACKAGES = ['cms.bin']\n\nsetup(\n name=\"onespacemedia-cms\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Add pytest-cov as a test dependency\n\nAs part of CI we want to check our code coverage as we work on this\npython module.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nimport sys\n\nfrom serfclient import __version__\n\ntry:\n from setupto... | python | chosen |
[
{
"from": "system",
"value": "Add missing dependencies for Python 2\n"
},
{
"from": "human",
"value": "from sys import version_info\n\nfrom setuptools import find_packages, setup\n\nVERSION = open('puresnmp/version.txt').read().strip()\nDEPENDENCIES = []\nif version_info < (3, 5):\n DEPENDENC... | python | chosen |
[
{
"from": "system",
"value": "Set the version to 0.8.1\n"
},
{
"from": "human",
"value": "try:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name=\"xutils\",\n version=\"0.8\",\n description=\"A Fragmentary Python Library.\",\n ... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.