conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Handle installs not using new settings engine\n"
},
{
"from": "human",
"value": "__copyright__ = \"Copyright 2017 Birkbeck, University of London\"\n__author__ = \"Martin Paul Eve & Andy Byers\"\n__license__ = \"AGPL v3\"\n__maintainer__ = \"Birkbeck Centre for Techn... | python | chosen |
[
{
"from": "system",
"value": "Revise test to support Python 2.4.\n\nIn this version, base Exception didn't have a .message field. No wonder I\nhad added it back in 2009, resulting in trac/132 which removed it.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport pyxb\nimport uni... | python | chosen |
[
{
"from": "system",
"value": "Sort fundraiser on newest on hp\n"
},
{
"from": "human",
"value": "from django.utils.timezone import now\n\nfrom apps.banners.models import Slide\nfrom apps.campaigns.models import Campaign\nfrom apps.fundraisers.models import FundRaiser\nfrom apps.projects.models i... | python | chosen |
[
{
"from": "system",
"value": "Test that saving ProfileForm works\n"
},
{
"from": "human",
"value": "\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"\... | python | chosen |
[
{
"from": "system",
"value": "Make the TestCase a mixin\n"
},
{
"from": "human",
"value": "import json\nimport functools\n\nfrom django.conf import settings\nfrom django.test import Client, TestCase\n\n__all__ = ['JsonTestClient', 'JsonTestCase']\n\n\nclass JsonTestClient(Client):\n def _json... | python | chosen |
[
{
"from": "system",
"value": "Rework the jod document model.\n\n * Add the created field that will store a datetime object.\n * Add reference to the kernel and the job inside the document,\n without relying on the Jod document name itself. Since we\n use the dash as a separator, and other job names ... | python | chosen |
[
{
"from": "system",
"value": "Create mongoengine connection when taking phantom snapshots\n"
},
{
"from": "human",
"value": "import os\n\nimport rmc.shared.constants as c\nimport rmc.models as m\n\nFILE_DIR = os.path.dirname(os.path.realpath(__file__))\nHTML_DIR = os.path.join(c.SHARED_DATA_DIR,... | python | chosen |
[
{
"from": "system",
"value": "Add a nice repr for AllowedHosts object so the admin makes sense\n"
},
{
"from": "human",
"value": "\"\"\"\nsentry.runner.hacks\n~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more detail... | python | chosen |
[
{
"from": "system",
"value": "Update paver to test and report coverage for both Python 2 and 3\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom paver.easy import task, sh, needs, path\nfrom paver.setuputils import setup\n\nsetup(name='ldapom',\n version='0.9.4',\n des... | python | chosen |
[
{
"from": "system",
"value": "Use correct kwarg for requests.post()\n"
},
{
"from": "human",
"value": "import os\nimport pytest\nimport requests\n\n\nREGISTER_TITLE_URL = os.environ['DIGITAL_REGISTER_URL']\nUSERNAME = os.environ['SMOKE_USERNAME']\nPASSWORD = os.environ['SMOKE_PASSWORD']\nTITLE_N... | python | chosen |
[
{
"from": "system",
"value": "Add latest version of PnetCDF\n"
},
{
"from": "human",
"value": "from spack import *\n\nclass ParallelNetcdf(Package):\n \"\"\"Parallel netCDF (PnetCDF) is a library providing high-performance\n parallel I/O while still maintaining file-format compatibility wi... | python | chosen |
[
{
"from": "system",
"value": "Fix column positions to reflect current spreadsheet.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nimport sys\n\ntry:\n username = os.environ['GOOGLE_USERNAME']\n password = os.environ['GOOGLE_PASSWORD']\nexcept KeyError:\n print(\"... | python | chosen |
[
{
"from": "system",
"value": "Update void test to reflect the new void model structure\n\nThe first version I coded up only allowed for a single dump in each\ndataset. The most current version expects an array of dumps so I needed\nto update the test.\n"
},
{
"from": "human",
"value": "\"\"\"tes... | python | chosen |
[
{
"from": "system",
"value": "Add Admin for Notebook model\n"
},
{
"from": "human",
"value": "from django.contrib import admin\n\n# Register your models here.\n"
},
{
"from": "gpt",
"value": "from django.contrib import admin\n\nfrom .models import Notebook\n\nclass NotebookAdmin(admi... | python | chosen |
[
{
"from": "system",
"value": "Use print_function in toplevel script.\n\n(Avoid logging hassle for now)\n"
},
{
"from": "human",
"value": "import numpy\nfrom desitarget.io import read_tractor, write_targets\nfrom desitarget.cuts import LRG, ELG, BGS, QSO\nfrom desitarget import targetmask \n\nfro... | python | chosen |
[
{
"from": "system",
"value": "Update freezegun ignore list patch\n\nAs of v1.1.0, freezegun supports configuring the ignore list.\n"
},
{
"from": "human",
"value": "from nose.plugins import Plugin\n\nfrom corehq.form_processor.tests.utils import patch_testcase_databases\nfrom corehq.util.es.test... | python | chosen |
[
{
"from": "system",
"value": "TEST reduce number of iterations for stopwatch test\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\"\"\"Created on Dec 16, 2014.\n\n@author: Katharina Eggensperger\n@projekt: AutoML2015\n\n\"\"\"\n\nfrom __future__ import print_function\nimport time\... | python | chosen |
[
{
"from": "system",
"value": "Change variable name & int comparison.\n"
},
{
"from": "human",
"value": "from flask import jsonify, current_app\n\nfrom . import status\nfrom . import utils\nfrom ..main.helpers.service import ServiceLoader\nfrom ..main import main\n\n\n@status.route('/_status')\nd... | python | chosen |
[
{
"from": "system",
"value": "Remove redundant full name method\n"
},
{
"from": "human",
"value": "class Person(object):\n def __init__(self, iden, person_type, person_name, person_surname=\"\", wants_accommodation=\"N\"):\n self.person_name = person_name\n self.person_surname =... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Change to get Django 1.5 to work.\"\n\nThis reverts commit 92b9b557eef77f7ea4c05c74c1c229a2b508e640.\nIt didn't resolve all the problems, and I'm out of time.\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, include, url\n\n# Uncomm... | python | chosen |
[
{
"from": "system",
"value": "Cover every case for CaseInsensitiveBooleanFilter\n"
},
{
"from": "human",
"value": "from rest_framework import filters\n\n\nclass CaseInsensitiveBooleanFilter(filters.BaseFilterBackend):\n \"\"\"Set a boolean_fields tuple on the viewset and set this class as a\n... | python | chosen |
[
{
"from": "system",
"value": "Change name getbusline name method\n"
},
{
"from": "human",
"value": "\"\"\"Busine-me API\nUniversidade de Brasilia - FGA\nTécnicas de Programação, 2/2015\n@file views.py\nViews (on classic MVC, controllers) with methods that control the requisitions\nfor the user a... | python | chosen |
[
{
"from": "system",
"value": "Add testcase written by @waynew\n"
},
{
"from": "human",
"value": "import pytest\nimport salt.loader\nimport salt.pillar\nfrom salt.utils.odict import OrderedDict\n\n\n@pytest.mark.parametrize(\n \"envs\",\n (\n [\"a\", \"b\", \"c\"],\n [\"c\", \... | python | chosen |
[
{
"from": "system",
"value": "Remove ‘using notify’ from nav (it’s a redirect now)\n"
},
{
"from": "human",
"value": "def features_nav():\n return [\n {\n \"name\": \"Features\",\n \"link\": \"main.features\",\n \"sub_navigation_items\": [\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix pylint issues in legacy_decode.\n"
},
{
"from": "human",
"value": "from ._tb_model import Model\n\n\ndef _decode(hf):\n if 'tb_model' in hf or 'hop' in hf:\n return _decode_model(hf)\n elif 'val' in hf:\n return _decode_val(hf)\n elif '0' ... | python | chosen |
[
{
"from": "system",
"value": "Add *args/**kwargs to save() as per the Django docs\n"
},
{
"from": "human",
"value": "from django.db import models\n\nimport datetime\n\n\nclass TimestampModel(models.Model):\n \"\"\"\n Extend the default Django model to add timestamps to all objects.\n \"... | python | chosen |
[
{
"from": "system",
"value": "Fix race on exit in scanning proxy.\n"
},
{
"from": "human",
"value": "\"\"\"Philips hue proxy code.\"\"\"\n\nimport abc\nimport logging\nimport sys\nimport threading\n\n\nfrom pi import proxy\n\n\nclass ScanningProxy(proxy.Proxy):\n \"\"\"A proxy object with a bac... | python | chosen |
[
{
"from": "system",
"value": "Add failing test for builtin abs() on objects without __abs__()\n"
},
{
"from": "human",
"value": "from .. utils import TranspileTestCase, BuiltinFunctionTestCase\n\n\nclass AbsTests(TranspileTestCase):\n pass\n\n\nclass BuiltinAbsFunctionTests(BuiltinFunctionTes... | python | chosen |
[
{
"from": "system",
"value": "Test expected failures of the anlayzer\n\nThe analyzer is not expected to cope with too few data points for time\nseries with greatly varying time ranges. It should raise an exception in\nthese cases.\n"
},
{
"from": "human",
"value": "\"Test for recalcitrant and ob... | python | chosen |
[
{
"from": "system",
"value": "Allow dashes in URL path regexp\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns\nfrom django.conf.urls import url\n\nfrom .views import redirect\n\n\nurlpatterns = patterns('',\n url(r'^(?P<key>[a-zA-Z0-9]+)$', redirect, name='deflect-red... | python | chosen |
[
{
"from": "system",
"value": "Fix linting and add info in roadmap\n"
},
{
"from": "human",
"value": "# Copyright 2020 Camptocamp SA\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)\n\n{\n \"name\": \"Server environment for Ebill Paynet\",\n \"version\": \"13.0.1.0.0\",\... | python | chosen |
[
{
"from": "system",
"value": "Replace upsert=True with conflict='replace' in tests\n\nReview 1804 by @gchpaco\nRelated to #2733\n"
},
{
"from": "human",
"value": "# This is a (hopefully temporary) shim that uses the rdb protocol to\n# implement part of the memcache API\n\nimport contextlib\nimpo... | python | chosen |
[
{
"from": "system",
"value": "Add a forgotten parameter in a log line\n"
},
{
"from": "human",
"value": "import logging\nlogger = logging.getLogger(__name__)\n\n\ndef str_encode(value='', encoding=None, errors='strict'):\n logger.debug(\"Encode str {} with and errors {}\".format(value, encodi... | python | chosen |
[
{
"from": "system",
"value": "Allow adding error message for specified field"
},
{
"from": "human",
"value": "from django.forms import forms\n\n\nclass APICall(forms.Form):\n\n def __init__(self, api_key=None, *args, **kwargs):\n super(APICall, self).__init__(*args, **kwargs)\n ... | python | chosen |
[
{
"from": "system",
"value": "Use newly configured conftest in postgres processor test\n"
},
{
"from": "human",
"value": "import pytest\n\n# from sqlalchemy import create_engine\n# from sqlalchemy.orm import sessionmaker\n\nfrom scrapi.linter.document import NormalizedDocument, RawDocument\n\nfr... | python | chosen |
[
{
"from": "system",
"value": "Mark runserver as a plumbing command\n"
},
{
"from": "human",
"value": "\"\"\"Command-line utilities for HTTP service subsystem.\"\"\"\n\nimport werkzeug.debug\nimport werkzeug.serving\n\nfrom jacquard.commands import BaseCommand\nfrom jacquard.service import get_ws... | python | chosen |
[
{
"from": "system",
"value": "Make pir in hallway only trigger at on events\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nimport domoticz\n\ntry:\n execfile(\"/etc/domoticz/scripts.conf\")\nexcept:\n exec(open(\"/etc/domoticz/scripts.conf\").read())\n\ndebu... | python | chosen |
[
{
"from": "system",
"value": "Include history in the models.\n"
},
{
"from": "human",
"value": "from BasicInfo import BasicInfo\nfrom BloodExam import BloodExam\nfrom BloodExam import BloodParasite\nfrom Child import Child\nfrom ChildForm import ChildForm\nfrom DentalExam import DentalExam\nfrom... | python | chosen |
[
{
"from": "system",
"value": "Add missing test settings (in-memory sqlite3 db + SITE_ID)\n"
},
{
"from": "human",
"value": "SECRET_KEY = \"lorem ipsum\"\n\nINSTALLED_APPS = (\n 'tango_shared',\n)\n"
},
{
"from": "gpt",
"value": "SECRET_KEY = \"lorem ipsum\"\n\nINSTALLED_APPS = (\n... | python | chosen |
[
{
"from": "system",
"value": "Rename package from avulsion to rafem.\n"
},
{
"from": "human",
"value": "\"\"\"River Avulsion Module.\"\"\"\n\nfrom .riverbmi import BmiRiverModule\nfrom .rivermodule import RiverModule\n\n\n__all__ = ['BmiRiverModule', 'RiverModule']\n"
},
{
"from": "gpt",... | python | chosen |
[
{
"from": "system",
"value": "Use LocalFileAdapter when no scheme is given\n\n >>> t1 = Transporter('/file/path')\n >>> t2 = Transporter('file:/file/path')\n >>> type(t1.adapter) == type(t2.adapter)\n True\n >>> t1.pwd() == t2.pwd()\n True"
},
{
"from": "human",
"value": "from urlpar... | python | chosen |
[
{
"from": "system",
"value": "Fix message with 462 numeric\n"
},
{
"from": "human",
"value": "from twisted.words.protocols import irc\nfrom txircd.modbase import Command\nimport string\n\nclass UserCommand(Command):\n\tdef onUse(self, user, data):\n\t\tif not user.username:\n\t\t\tuser.registere... | python | chosen |
[
{
"from": "system",
"value": "Add mock value for `MACOS_CODESIGN_IDENTITY`\n"
},
{
"from": "human",
"value": "GITHUB_WEBHOOK_SECRET=\"nothing to see here\"\nGITHUB_OAUTH_CLIENT_ID=\"nothing to see here\"\nGITHUB_OAUTH_CLIENT_SECRET=\"nothing to see here\"\nGITHUB_STATUS_OAUTH_TOKEN=\"nothing to ... | python | chosen |
[
{
"from": "system",
"value": "core: Use a mixer mock in tests\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, unicode_literals\n\nimport unittest\n\nfrom mopidy import core\n\n\nclass CoreMixerTest(unittest.TestCase):\n def setUp(self): # noqa: N802\n self.c... | python | chosen |
[
{
"from": "system",
"value": "Implement a test for missing username in update cmd\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport pathlib\nimport json\n\n\ndef test_store_template_data_to_json(cli_runner, tmp_rc, tmp_templates_file):\n result = cli_runner([\n '-c',... | python | chosen |
[
{
"from": "system",
"value": "TST: Test all cases of type for opentransf\n"
},
{
"from": "human",
"value": "import pymorph\nimport numpy as np\ndef test_opentransf():\n f = np.array([\n [0,0,0,0,0,0,0,0],\n [0,0,1,1,1,1,0,0],\n [0,1,0,1,1,1,0,0],\n ... | python | chosen |
[
{
"from": "system",
"value": "Verify services status if FI is rebooted\n\nChange-Id: Ia02ef16d53fbb7b55a8de884ff16a4bef345a1f2\n"
},
{
"from": "human",
"value": "def start(lab, log, args):\n import time\n from fabric.context_managers import shell_env\n\n grep_host = args.get('grep_host'... | python | chosen |
[
{
"from": "system",
"value": "Drop the __init__ call to object.__init__, RPython doesn't like it and it doesn't doa nything\n"
},
{
"from": "human",
"value": "class BaseBox(object):\n pass\n\n\nclass Token(BaseBox):\n def __init__(self, name, value, source_pos=None):\n BaseBox.__ini... | python | chosen |
[
{
"from": "system",
"value": "Add an explicit test for async-def functions with decorators.\nCloses GH-1462.\n"
},
{
"from": "human",
"value": "# cython: language_level=3\n# mode: run\n# tag: pep492, pure3.5\n\n\nasync def test_coroutine_frame(awaitable):\n \"\"\"\n >>> class Awaitable(obj... | python | chosen |
[
{
"from": "system",
"value": "Bring code coverage to 100%\n"
},
{
"from": "human",
"value": "from jsonrpcclient.responses import Ok, parse, parse_json\n\n\ndef test_parse():\n assert parse({\"jsonrpc\": \"2.0\", \"result\": \"pong\", \"id\": 1}) == Ok(\"pong\", 1)\n\n\ndef test_parse_json():\... | python | chosen |
[
{
"from": "system",
"value": "Add a test that ensures commas are part of non-word runs.\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom halng.tokenizer import MegaHALTokenizer\n\nclass testMegaHALTokenizer(unittest.TestCase):\n def setUp(self):\n self.tokenizer = MegaHALToke... | python | chosen |
[
{
"from": "system",
"value": "Set some default hosts environment\n"
},
{
"from": "human",
"value": "from fabric.api import env\n\nenv.hosts = ['zygal@kontar.kattare.com']\nenv.local_dir = 'public'\nenv.remote_dir = 'temp'\n\n"
},
{
"from": "gpt",
"value": "from fabric.api import env\... | python | chosen |
[
{
"from": "system",
"value": "Test case for settings check\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nfrom django.test import TestCase\n\nfrom rest_framework.settings import APISettings\n\n\nclass TestSettings(TestCase):\n def test_import_error_message_maint... | python | chosen |
[
{
"from": "system",
"value": "Bump version: 0.16.5 → 0.16.6\n"
},
{
"from": "human",
"value": "\"\"\" version info for vtki \"\"\"\n# major, minor, patch\nversion_info = 0, 16, 5\n\n# Nice string for the version\n__version__ = '.'.join(map(str, version_info))\n"
},
{
"from": "gpt",
"... | python | chosen |
[
{
"from": "system",
"value": "Fix bug with DevotedBot speaking error in chat\n"
},
{
"from": "human",
"value": "from devbot import chat\n\n\ndef call(message, name, protocol, cfg, commands):\n if message == '':\n chat.say('/r ' + commands['help']['alias'].format('alias'), protocol)\n ... | python | chosen |
[
{
"from": "system",
"value": "Add a new 'count' utility function\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\n\"\"\"Small utility functions for use in various places.\"\"\"\n\n__all__ = [\"pick\", \"is_dunder\", \"convert_to_od\", \"counter_to_iterable\"]\n\nimport collections\ni... | python | chosen |
[
{
"from": "system",
"value": "Add asp.SpecializationError class for specialization-related exceptions.\n"
},
{
"from": "human",
"value": "# From http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package\n# Author: James Antill (http://stackoverflow.com/users/103... | python | chosen |
[
{
"from": "system",
"value": "Handle errors in queue processing\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport pika\nimport subprocess\nimport json\nimport os\nfrom pymongo import MongoClient\n\n\ndbcon = MongoClient()\n\nNETSNIFF_UTIL = os.path.join(os.path.dirname(os.path.rea... | python | chosen |
[
{
"from": "human",
"value": "Add cli handling for installimage\n"
},
{
"from": "gpt",
"value": "from .installimage_config import InstallimageConfig\n\n\ndef create(args):\n install_config = InstallimageConfig(args.mac)\n\n for var in args.var:\n install_config.add_or_set(var[0], var... | python | chosen |
[
{
"from": "system",
"value": "Change the way the Matcher is initialized and how matches are retrieved.\n"
},
{
"from": "human",
"value": "from .regex import RegexFactory\nfrom .patterns import Patterns\n\n\nclass Matcher(object):\n NO_MATCH = 'NO MATCH'\n\n def __init__(self, raw_patterns,... | python | chosen |
[
{
"from": "system",
"value": "Create a simple Index view\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\n\n# Create your views here.\n"
},
{
"from": "gpt",
"value": "from django.shortcuts import render\n\nfrom django.http import HttpResponse\n\n# Create your v... | python | chosen |
[
{
"from": "system",
"value": "Move put code into method\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\n__author__ = 'Louis Taylor'\n__email__ = 'louis@kragniz.eu'\n__version__ = '0.1.0'\n\nimport grpc\n\nfrom etcdrpc import rpc_pb2 as etcdrpc\n\nchannel = grpc.insec... | python | chosen |
[
{
"from": "system",
"value": "Remove default argument from function that reads the configuration name from the environment\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\"\"\"\nbyceps.util.system\n~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2016 Jochen Kupperschmidt\n:License: Modifie... | python | chosen |
[
{
"from": "system",
"value": "Add in references to new services.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom mcapi.mcapp import app\nfrom mcapi import tservices, public, utils, private, access\nfrom mcapi.user import account, datadirs, datafiles, reviews, ud\nimport sys\n\ni... | python | chosen |
[
{
"from": "system",
"value": "Add click based commandline interface script\n\nsqltocpp is intended to be a CLI command.\nThis enables it to be so\n"
},
{
"from": "human",
"value": "import click\nfrom sqltocpp import convert\n\n\n@click.command()\n@click.option('--sql', help='schema file name')\n... | python | chosen |
[
{
"from": "system",
"value": "Fix interface. to_layer parameter is obsolete.\n"
},
{
"from": "human",
"value": "\nfrom .base import *\n\nfrom .gradient_based import *\nfrom .misc import *\nfrom .pattern_based import *\nfrom .relevance_based import *\n\n\ndef create_explainer(name,\n ... | python | chosen |
[
{
"from": "system",
"value": "Add tests for falseish config values\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom timewreport.config import TimeWarriorConfig\n\n\ndef test_get_value_should_return_value_if_key_available():\n config = TimeWarriorConfig({'FOO': 'foo'})\n\n assert co... | python | chosen |
[
{
"from": "system",
"value": "Remove some required arguments in post function context\n"
},
{
"from": "human",
"value": "from openerp import pooler\n\n\ndef call_post_function(cr, uid, context):\n \"\"\"This functionality allows users of module account.move.reversal\n to call a function ... | python | chosen |
[
{
"from": "system",
"value": "Add redirect from / to /polls\n"
},
{
"from": "human",
"value": "\"\"\"vote URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.11/topics/http/urls/\nExamples:\nFunction views\n ... | python | chosen |
[
{
"from": "system",
"value": "Add a name to the URL configuration for 'deauthorize_application'\n"
},
{
"from": "human",
"value": "from django.conf.urls.defaults import *\n\nfrom views import *\n\nurlpatterns = patterns('',\n url(r'^authorize_application.html$', authorize_application, name='a... | python | chosen |
[
{
"from": "system",
"value": "Add clarifying(?) comment about uid caching\n"
},
{
"from": "human",
"value": "import tornado\nfrom tornado import gen\nimport json\nimport os\n\n\nBASE_PATH = '.'\n\nbase_url = '/paws/public/'\n\n\n@gen.coroutine\ndef uid_for_user(user):\n url = 'https://meta.wi... | python | chosen |
[
{
"from": "system",
"value": "Fix print statements for Python 3\n"
},
{
"from": "human",
"value": "from .support import load_tickets, load_default_limits\nimport settings\n\ndef update_data():\n print 'loading default limits...'\n load_default_limits()\n if settings.PREMIUM_ACCOUNT:\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix typos in WER scorer\n\nSummary:\nFix typos in WER scorer\n- The typos lead to using prediction length as the denominator in the formula, which is wrong.\n\nReviewed By: alexeib\n\nDifferential Revision: D23139261\n\nfbshipit-source-id: d1bba0044365813603ce358388e880c1b3f9ec... | python | chosen |
[
{
"from": "system",
"value": "Change assertTrue(isinstance()) by optimal assert\n\nSome of tests use different method of\nassertTrue(isinstance(A, B)) or assertEqual(type(A), B).\nThe correct way is to use assertIsInstance(A, B) provided by testtools\n\nChange-Id: I3231db85708b36d2092c14ad45b42f42a0151027\n... | python | chosen |
[
{
"from": "system",
"value": "Make more explicit variable name.\n"
},
{
"from": "human",
"value": "# Neurotopics/code/DataSet.py\n\nimport neurosynth.analysis.reduce as nsar\n\nclass DataSet:\n\n \"\"\"\n A DataSet takes a NeuroSynth dataset and extracts the DOI's, and\n word subset of ... | python | chosen |
[
{
"from": "system",
"value": "Deploy Travis CI build 478 to GitHub\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport os\nimport time\nimport subprocess\n\nfrom sniffer.api import select_runnable, file_validator, runnable\ntry:\n from pync import Notifier\nexcept ImportError... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Forcing type coersion for int params.\"\n\nThis is a pointless bit of code. Since we lazy-evaluate them anyhow, it's a\nduplicate effort.\n\nThis reverts commit 1ca6b96d492f8f33ac3b3a520937378effb66744.\n"
},
{
"from": "human",
"value": "\"\"\"A simple wrap... | python | chosen |
[
{
"from": "system",
"value": "Remove dependency link to nototools\n"
},
{
"from": "human",
"value": "import sys\nfrom setuptools import setup, find_packages, Command\nfrom distutils import log\n\nsetup(\n name='diffenator',\n version='0.0.2',\n author=\"Google Fonts Project Authors\",\n... | python | chosen |
[
{
"from": "system",
"value": "Replace dependency on SQLAlchemy with Flask-SQLALchemy\n"
},
{
"from": "human",
"value": "# Copyright 2013-2015 Massachusetts Open Cloud Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compl... | python | chosen |
[
{
"from": "system",
"value": "Update to 1.6.1. Small bug fix.\n"
},
{
"from": "human",
"value": "from setuptools import setup, Extension\n\nmodule1 = Extension('earl', sources = ['earl.cpp'])\n\nsetup (\n\tname = \"Earl\",\n\tversion = \"1.6\",\n\tdescription = \"Earl, the fanciest External Term... | python | chosen |
[
{
"from": "system",
"value": "Bump aiohttp version constraint to <3.4"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n__name__ == '__main__' and setup(name='aiohttp-json-rpc',\n version='0.10.1',\n author... | python | chosen |
[
{
"from": "system",
"value": "Move to test version for pypi-test\n"
},
{
"from": "human",
"value": "\"\"\"Setup for pyexperiment\n\"\"\"\nfrom __future__ import print_function\n# from __future__ import unicode_literals\nfrom __future__ import division\nfrom __future__ import absolute_import\n\ni... | python | chosen |
[
{
"from": "system",
"value": "Add back models and data\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\ninstall_requires = [\n 'dill==0.2.5',\n 'easydict==1.6',\n 'h5py==2.6.0',\n 'jsonpickle==0.9.3',\n 'Keras==1.2.0',\n 'nflgame==1.2.20',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add helpful message for users trying to install with Python < 3.5\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nimport mikla\n\nsetup(\n name='mikla',\n version=mikla.__version__.strip(),\n url='http://dirtymonkey.co.uk/mikla',\n lic... | python | chosen |
[
{
"from": "system",
"value": "Prepare for 1.6.1 on pypi\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\n\nwith open('README.rst', 'rb') as readme:\n readme_text = readme.read().decode('utf-8')\n\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Add classifiers with py ver info\n"
},
{
"from": "human",
"value": "import sys\nfrom setuptools import setup\n\nif sys.version_info[0] == 2:\n base_dir = 'python2'\nelif sys.version_info[0] == 3:\n base_dir = 'python3'\n\nsetup(\n name='raygun4py',\n ver... | python | chosen |
[
{
"from": "system",
"value": "Add a bit more to description\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\nsetup(\n name = 'jargparse',\n packages = ['jargparse'], # this must be the same as the name above\n version = '0.0.3',\n description = 'A... | python | chosen |
[
{
"from": "system",
"value": "Add trailing newline since PyCharm stripped it\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport setuptools\nimport os\n\n\nsetuptools.setup(\n name='endpoints-proto-datastore',\n version='0.9.0',\n description='Google Cloud Endpoints Proto D... | python | chosen |
[
{
"from": "system",
"value": "Add long description (from README).\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport jasinja, sys\n\nrequires = ['Jinja2']\nif sys.version_info < (2, 6):\n requires += ['simplejson']\n\nsetup(\n name='jasinja',\n version=jasinja.__ver... | python | chosen |
[
{
"from": "system",
"value": "Add console script and test requirements.\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nimport os\n\nsetup(\n name='python-jambel',\n version='0.1',\n py_module=['jambel'],\n url='http://github.com/jambit/python-jambel',\n licen... | python | chosen |
[
{
"from": "system",
"value": "Revert previous commit as fuse-python doesn't seem to play nicely with easy_install (at least on Ubuntu).\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2008 Jason Davies\n# All rights reserved.\n#\n# This softw... | python | chosen |
[
{
"from": "system",
"value": "Convert README.md to rst for pypi using pandoc.\n\nCloses #11\n\nThanks for the tips/help Marc :)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(n... | python | chosen |
[
{
"from": "system",
"value": "Use 4 spaces for indentation.\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nsetup(\n name='django_autologin',\n version='0.1',\n packages=['django_autologin', 'django_autologin.templatetags'],\n install_requires=['django>=1.0'],\n descrip... | python | chosen |
[
{
"from": "system",
"value": "Fix long_description loading for PyPI"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\n\nlongDesc = \"\"\nif os.path.exists(\"README.rst\"):\n\tlongDesc = open(\"README.rst\").read().strip()\n\nsetup(\n name = \"pytesseract\",\n vers... | python | chosen |
[
{
"from": "system",
"value": "Add python version constraint python>=2.7\n\nThe 'swift' command from v3.0.0 does not work in Python 2.6,\nbacause some code is incompatible with Python 2.6\nThis patch is to add a constraint of python version\n\nChange-Id: I5197cba0c2cd3135d08498df827a52f8bba98d4d\nCloses-bug:... | python | chosen |
[
{
"from": "system",
"value": "Add python_requires to help pip\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\r\n\r\n\"\"\"Setup script for the pyparsing module distribution.\"\"\"\r\n\r\n# Setuptools depends on pyparsing (via packaging) as of version 34, so allow\r\n# installing withou... | python | chosen |
[
{
"from": "system",
"value": "Add content type for long description\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(name='windpowerlib',\n version='0.2.0dev',\... | python | chosen |
[
{
"from": "system",
"value": "Read long description from readme always\n"
},
{
"from": "human",
"value": "\"\"\"Setup for drewtils project.\"\"\"\n\nimport os\n\ntry:\n from setuptools import setup\n setupTools = True\nexcept ImportError:\n from distutils.core import setup\n setupToo... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Allow Django Evolution to install along with Django >= 1.7.\"\n\nThis reverts commit 28b280bb04f806f614f6f2cd25ce779b551fef9e.\n\nThis was committed to the wrong branch.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n#\n# Setup script for Django ... | python | chosen |
[
{
"from": "system",
"value": "Add \"pyyaml\" because it is used by ScrambleSuit.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\n\nfrom setuptools import setup, find_packages\n\nimport versioneer\nversioneer.versionfile_source = 'obfsproxy/_version.py'\nversioneer.version... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.