conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Support adding hosts by DNS"
},
{
"from": "human",
"value": "from iptools import validate_ip, validate_cidr, IpRange\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom hostmonitor.models import Host\n\nclass Command(BaseCommand):\n args = ... | python | chosen |
[
{
"from": "system",
"value": "Make host and port configurable thru envvars\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom website.app import init_app\n\napp = init_app('website.settings', set_backends=True, routes=True)\n\nif __name__ == '__main__':\n ... | python | chosen |
[
{
"from": "system",
"value": "Return is_authenticated true if we got user and it is active\n"
},
{
"from": "human",
"value": "from django.http import HttpResponse\nfrom django.template import loader\nfrom django.utils.crypto import salted_hmac, constant_time_compare\n\nfrom django.contrib.auth.m... | python | chosen |
[
{
"from": "system",
"value": "Fix reg d included definitions\n"
},
{
"from": "human",
"value": "#### Regulation D\n\nINCLUDE_DEFINITIONS_IN_PART_1004 = [\n ('Alternative mortgage transaction', 'Alternative mortgage transaction'),\n ('Creditor', 'Creditor'),\n ('State', 'State'),\n ('... | python | chosen |
[
{
"from": "system",
"value": "Make test_run_command_on_agent connect to all agents\n\nIncrease testing of SSH connection handling by connecting to all\nagents in the cluster.\n"
},
{
"from": "human",
"value": "from shakedown import *\n\n\ndef test_run_command():\n exit_status, output = run_co... | python | chosen |
[
{
"from": "system",
"value": "Use importlib instead of exec (exec was pretty ugly)\n"
},
{
"from": "human",
"value": "#!/usr/bin/python3\n\nimport argparse\nimport sys\nfrom mawslib.manager import Manager\n\nconfigfile=\"cloudconfig.yaml\"\n\nparser = argparse.ArgumentParser(\n #add_help=Fals... | python | chosen |
[
{
"from": "system",
"value": "Debug and add first test case\n"
},
{
"from": "human",
"value": "# Implement a function that takes two strings, s and x, as arguments and finds the first occurrence of the string x in s. The function should return an integer indicating the index in s of the first oc... | python | chosen |
[
{
"from": "system",
"value": "Add correct room_history_entry in UserFactory\n\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.\n# This file is part of the Pycroft project and licensed under the terms of\n# the Apache Lice... | python | chosen |
[
{
"from": "system",
"value": "Set up library search paths for tests.\n\nWhen running tests, exclusively use the libraries that are either\nbuilt-in, or are provided with the test suite.\n"
},
{
"from": "human",
"value": "import os\nfrom skidl import *\n\nfiles_at_start = set([])\n\ndef setup_fun... | python | chosen |
[
{
"from": "system",
"value": "Use switches rather than switches.keys().\n\nMinor cosmetic change, really.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\n\"Create a 64-node tree network, and test connectivity using ping.\"\n\nfrom mininet.log import setLogLevel\nfrom mininet.net import i... | python | chosen |
[
{
"from": "system",
"value": "Fix PandA firmware issue with a hack\n"
},
{
"from": "human",
"value": "from malcolm.compat import str_\nfrom malcolm.core.serializable import Serializable, deserialize_object\nfrom malcolm.core.vmeta import VMeta\n\n\n@Serializable.register_subclass(\"malcolm:core/... | python | chosen |
[
{
"from": "system",
"value": "Add default to data_source migration.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('servi... | python | chosen |
[
{
"from": "system",
"value": "Handle case where a user skips email confirmation\n\nIn DUA, if you are invited to a site and you end\nup signing up with the same email address, DUA will\nskip the confirmation cycle and count it as\nconfirmed already.\n"
},
{
"from": "human",
"value": "from django... | python | chosen |
[
{
"from": "system",
"value": "Comment out import line to prevent error\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\nfrom django.http import HttpResponse\nfrom django.template import loader\nfrom MinecrunchWeb import settings\n\n# Create your views here.\ndef index(requ... | python | chosen |
[
{
"from": "system",
"value": "Add function for generating test data\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom random import randrange\n\nfrom pytest import raises\n\nimport short_url\n\n\n\n\n\ndef test_custom_alphabet():\n encoder = short_url.UrlEncoder(alphabet='ab'... | python | chosen |
[
{
"from": "system",
"value": "Repair CGC file header after loading\n"
},
{
"from": "human",
"value": "from .elf import ELF\nfrom ..loader import Loader\n\nELF_HEADER = \"7f45 4c46 0101 0100 0000 0000 0000 0000\".replace(\" \",\"\").decode('hex')\n\nclass CGC(ELF):\n def __init__(self, path, *... | python | chosen |
[
{
"from": "system",
"value": "Fix exc info setter for future.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport sys\nfrom concurrent.futures import ThreadPoolExecutor\nfrom tornado import gen, queues\nfrom tornado.concurrent import Future, run_on_executor\n\nclass WorkItem(obj... | python | chosen |
[
{
"from": "system",
"value": "Replace one last place where aioes was used\n"
},
{
"from": "human",
"value": "import aioes\nimport os.path\nfrom datetime import datetime\n\nfrom .utils import read_json_file\nfrom .settings import ELASTICSEARCH_ALIAS\n\n\ndef create_new_index(elastic):\n print(... | python | chosen |
[
{
"from": "system",
"value": "Add support for daemon mode.\n"
},
{
"from": "human",
"value": "import cherrypy\nimport click\nfrom intercom.roots import IntercomRoot\n\nCLICK_FILE_TYPE = click.Path(exists=True, dir_okay=False)\n\n\ndef run_server(global_config_filename, app_config_filename):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add wrapper to parse values to float in SQLite\n\nRefs TREES-359\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# This file is part of Shuup.\n#\n# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.\n#\n# This source code is licensed unde... | python | chosen |
[
{
"from": "system",
"value": "Remove comment as media addition automatically happens.\n"
},
{
"from": "human",
"value": "from django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom fluent_contents.models import ContentItem\n\n\ntry... | python | chosen |
[
{
"from": "system",
"value": "Add unit test for decay method\n"
},
{
"from": "human",
"value": "import pytest\nimport pandas as pd\n\nfrom tardis.io.decay import IsotopeAbundances\n\n@pytest.fixture\ndef simple_abundance_model():\n index = pd.MultiIndex.from_tuples([(28, 56)],\n ... | python | chosen |
[
{
"from": "system",
"value": "Add function to install miniconda\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import division, print_function, absolute_import\nimport argparse\nimport os\nimport subprocess as sp\nfrom contextlib import conte... | python | chosen |
[
{
"from": "system",
"value": "Fix bug in deletion of discs\n"
},
{
"from": "human",
"value": "import os as _os\nfrom . import LI_V01_01\nfrom . import TB_V01_03\nfrom . import BO_V03_02\nfrom . import TS_V03_03\nfrom . import SI_V21_02\nfrom . import coordinate_system\nfrom . import discs\n\nwit... | python | chosen |
[
{
"from": "system",
"value": "Allow user to specify thing.\n"
},
{
"from": "human",
"value": "# Hello World\n\nimport sys\n\n\ndef hello(thing):\n print \"Hello {}\".format(thing)\n return\n\n\nif __name__ == \"__main__\":\n sys.exit(hello())\n"
},
{
"from": "gpt",
"value": ... | python | chosen |
[
{
"from": "system",
"value": "Add test for scalar values.\n"
},
{
"from": "human",
"value": "''' test_deltaprel - Test functions for deltaprel module\n\nAuthor: Ian Huston\nFor license and copyright information see LICENSE.txt which was distributed with this file.\n'''\nimport numpy as np\nfrom ... | python | chosen |
[
{
"from": "system",
"value": "Increase history capability and correct schedule\n"
},
{
"from": "human",
"value": "from comics.aggregator.crawler import DagbladetCrawlerBase\nfrom comics.core.comic_data import ComicDataBase\n\n\nclass ComicData(ComicDataBase):\n name = 'Nemi (db.no)'\n lang... | python | chosen |
[
{
"from": "system",
"value": "Increase sleep-time in intervaltrigger tests\n"
},
{
"from": "human",
"value": "import time\n\nimport mock\nimport pytest\n\nimport spreadsplug.intervaltrigger as intervaltrigger\n\n\n@pytest.fixture\ndef plugin(config):\n config['intervaltrigger']['interval'] = ... | python | chosen |
[
{
"from": "system",
"value": "Relocate virtualenv location to documentation\n"
},
{
"from": "human",
"value": "import os\nimport sys\n\ncurrent_directory = os.path.dirname(__file__)\nmodule_name = os.path.basename(current_directory)\n\nactivate_this = '/home/met/venv/bin/activate_this.py'\nexecf... | python | chosen |
[
{
"from": "system",
"value": "Fix import bug in Python 3"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Copyright (C) 2015 Michael Hogg\n\n# This file is part of pyoctree - See LICENSE.txt for information on usage and redistribution\n\n# Version\nimport version\n__version__ = vers... | python | chosen |
[
{
"from": "system",
"value": "Fix wrong value assignment for CertSubject in the return statement of ParseCert() function\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\n\nimport datetime\nimport ssl\nimport OpenSSL\n\n\ndef GetCert(SiteName, Port):\n return ssl.get_server_certifi... | python | chosen |
[
{
"from": "system",
"value": "Clarify why we define error. Suggested by Andrew Dalke.\n"
},
{
"from": "human",
"value": "\"\"\"Provide a (g)dbm-compatible interface to bsdhash.hashopen.\"\"\"\n\nimport bsddb\n\nerror = bsddb.error\n\ndef open(file, flag, mode=0666):\n return bsddb.hashopen(f... | python | chosen |
[
{
"from": "system",
"value": "Convert output values from int to binary for neural network\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom sklearn import datasets\nfrom random import shuffle\n\n# This example loads the IRIS dataset and classifies\n# using our neural network imple... | python | chosen |
[
{
"from": "system",
"value": "Remove dev from version string\n"
},
{
"from": "human",
"value": "VERSION = (0, 1, 3, \"dev\")\n\ndef get_version():\n if VERSION[3] != \"final\":\n return \"%s.%s.%s%s\" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3])\n else:\n return \"%s.%s... | python | chosen |
[
{
"from": "system",
"value": "Move to a module permissions\n"
},
{
"from": "human",
"value": "from rest_framework.viewsets import ModelViewSet\nfrom . import models\n\nfrom rest_framework.permissions import BasePermission\n\nclass IsOwnerPermission(BasePermission):\n def has_object_permission... | python | chosen |
[
{
"from": "system",
"value": "Read all records from the file\n"
},
{
"from": "human",
"value": "import argparse, csv, datetime, time\n\ndef run_main():\n fails = 0\n succeeds = 0\n not_yet = list()\n path = file_path()\n # read file\n with open(path) as f:\n reader = csv... | python | chosen |
[
{
"from": "system",
"value": "Change to use 'shutil.rmtree' instead of 'os.rmdir'\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom hycc.util import hycc_main\n\n\ndef clean():\n for path in os.listdir(\"tests/resources\"):\n if path not in [\"hello.hy\", \"__... | python | chosen |
[
{
"from": "system",
"value": "Remove warning about not-set MIDDLEWARE_CLASSES setting.\n"
},
{
"from": "human",
"value": "import warnings\nwarnings.simplefilter('always')\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3',\n },\n}\n\nUSE_I18N = True\nUSE_L10N =... | python | chosen |
[
{
"from": "system",
"value": "Fix deprecated url import, (to path)\n"
},
{
"from": "human",
"value": "from django.conf.urls import include, url\n\nurlpatterns = [\n url('', include('rest_friendship.urls', namespace='rest_friendship')),\n]\n"
},
{
"from": "gpt",
"value": "from djan... | python | chosen |
[
{
"from": "system",
"value": "Remove imaginary event server CLI options\n"
},
{
"from": "human",
"value": "import click\nimport sys\n\n\n@click.command()\n@click.option('--acme',\n help='The address for the ACME Directory Resource',\n default='https://acme-v01.api.letse... | python | chosen |
[
{
"from": "system",
"value": "tests.backends: Test using DatabaseBackend instead of RedisBackend, as the latter requires the redis module to be installed.\n"
},
{
"from": "human",
"value": "import unittest2 as unittest\n\nfrom celery import backends\nfrom celery.backends.amqp import AMQPBackend\... | python | chosen |
[
{
"from": "system",
"value": "Fix formatting issues with gadd\n"
},
{
"from": "human",
"value": "from devbot import chat\n\n\ndef call(message: str, name, protocol, cfg, commands):\n if ' ' in message:\n chat.say('/msg {} Sorry, that was not a valid player name: It contains spaces.'.fo... | python | chosen |
[
{
"from": "system",
"value": "Replace all keys/tokens/passwords by env variables\n"
},
{
"from": "human",
"value": "from flask import Flask, request\nfrom flask.ext.sqlalchemy import SQLAlchemy\nfrom twilio import twiml\nimport subprocess\nimport os\n\nfrom cmd import cmds\n\napp = Flask(__name_... | python | chosen |
[
{
"from": "system",
"value": "Put them in the right order\n"
},
{
"from": "human",
"value": "import socket\nimport time\n\nUDP_IP = \"127.0.0.1\"\nUDP_PORT = 1234\nMESSAGES = [\"start_horn\", \"stop_horn\", \"classic_destroy\"]\n\nfor message in MESSAGES:\n\tprint \"UDP target IP:\", UDP_IP\n\tp... | python | chosen |
[
{
"from": "system",
"value": "Adjust blog test to use the base class\n"
},
{
"from": "human",
"value": "from django.test import SimpleTestCase, Client\nfrom .models import BlogPost\n\nclass BlogTestCase(SimpleTestCase):\n def setUp(self):\n BlogPost.objects.create(\n datetim... | python | chosen |
[
{
"from": "system",
"value": "Scale inputs in test cases\n"
},
{
"from": "human",
"value": "from sklearn.datasets import make_classification, make_regression\nfrom sklearn.metrics import log_loss\nfrom ..mlp import MLP\n\n\nclass TestFitting(object):\n\n def __init__(self):\n self.X_cl... | python | chosen |
[
{
"from": "system",
"value": "Change methods not using its bound instance to staticmethods\n\nSigned-off-by: shubhendra <c6e99d273726c3152867e7854a0feab4e6ae83c6@gmail.com>\n"
},
{
"from": "human",
"value": "import bugsnag\nfrom aiohttp.client_exceptions import ClientPayloadError\nfrom sanic.exc... | python | chosen |
[
{
"from": "system",
"value": "Add sleep calls for AWS loops\n"
},
{
"from": "human",
"value": "import boto3\n\ndef await_volume(client, volumeId, waitingState, finishedState):\n while True:\n volumes = client.describe_volumes(VolumeIds=[volumeId])\n state = volumes['Volumes'][0]... | python | chosen |
[
{
"from": "system",
"value": "Refactor using functions and a list comprehension\n"
},
{
"from": "human",
"value": "import sublime, sublime_plugin\n\nclass SumCommand(sublime_plugin.TextCommand):\n def run(self, edit):\n sum_view = self.view.window().new_file()\n sum_view.set_nam... | python | chosen |
[
{
"from": "system",
"value": "Add organization_set field in UserF\n"
},
{
"from": "human",
"value": "from datetime import timedelta\nfrom django.utils import timezone\n\nfrom locarise_drf_oauth2_support.users.models import User\n\ntry:\n import factory\n\n class UserF(factory.DjangoModelFa... | python | chosen |
[
{
"from": "system",
"value": "Use new command line option for checking if all migrations have been applied.\n"
},
{
"from": "human",
"value": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, you... | python | chosen |
[
{
"from": "system",
"value": "Update the filters to escape the characters before replacing them.\n\nThis prevents the filters from allowing XSS attacks. This follows\nthe pattern used by django's linebreaksbr filter.\n"
},
{
"from": "human",
"value": "from django import template\nfrom django.cor... | python | chosen |
[
{
"from": "system",
"value": "Update formatting to Salt guidelines\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nSCSI administration module\n\"\"\"\nimport logging\nlog = logging.getLogger(__name__)\n\n\ndef lsscsi():\n '''\n List scsi devices\n CLI Example:\n .... | python | chosen |
[
{
"from": "system",
"value": "Update version number for hotfix 1.3.2\n"
},
{
"from": "human",
"value": "__version_info__ = (1, 3, 1, None)\n\n\n# Dot-connect all but the last. Last is dash-connected if not None.\n__version__ = '.'.join([str(i) for i in __version_info__[:-1]])\nif __version_info_... | python | chosen |
[
{
"from": "system",
"value": "[marv] Support webapi extension via entry points\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n# Copyright 2016 - 2018 Ternaris.\n# SPDX-License-Identifier: AGPL-3.0-only\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom .... | python | chosen |
[
{
"from": "system",
"value": "Rebuild mailbox remove script with some verify checks\n\nWe should not remove a mailbox and only archive it. Also it should\nbe good to be sure the mailbox doesn't exists in redis anymore after\ntwo runs.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ni... | python | chosen |
[
{
"from": "system",
"value": "Stop defining plugin_{,un}loaded functions that aren't doing anything\n"
},
{
"from": "human",
"value": "# Only .py files at the top-level of a Sublime package are considered \"plugins\".\n# Make Sublime aware of our *{Command,Listener,Handler} classes by importing ... | python | chosen |
[
{
"from": "system",
"value": "Switch first handler arg from \"server\" to \"client\".\n"
},
{
"from": "human",
"value": "from kismetclient.utils import csv\nfrom kismetclient.exceptions import ServerError\n\n\ndef kismet(server, version, starttime, servername, dumpfiles, uid):\n \"\"\" Handle... | python | chosen |
[
{
"from": "system",
"value": "Remove JSON dependency in POST logic.\n"
},
{
"from": "human",
"value": "import boto3, json\n\nsdb = boto3.client('sdb')\n\ndef lambda_handler(data, context):\n\t\"\"\"\n\tHandler for posting data to SimpleDB.\n\n\tArgs:\n\tdata -- Data to be stored (Dictionary).\n\... | python | chosen |
[
{
"from": "system",
"value": "Change port from 5000 to 4000\n"
},
{
"from": "human",
"value": "import logging\nfrom tornado.wsgi import WSGIContainer\nfrom tornado.httpserver import HTTPServer\nfrom tornado.ioloop import IOLoop, PeriodicCallback\n\nfrom caaas import app\nfrom caaas.cleanup_threa... | python | chosen |
[
{
"from": "system",
"value": "Make ticks passable argument to data\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport argparse\n\nticks = ('▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')\n\ndef scale_data(data):\n m = min(data)\n n = (max(data) - m)... | python | chosen |
[
{
"from": "system",
"value": "Add view for searching users and return json format\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\nfrom django.http import HttpResponse\n\nfrom .models import User\n\n\ndef homepage(request):\n return render(request, \"index.html\", {})\n... | python | chosen |
[
{
"from": "system",
"value": "Move inline comment to class docstring\n"
},
{
"from": "human",
"value": "from flask_assets import Bundle, Environment, Filter\n\n# fixes missing semicolon in last statement of jquery.pjax.js\nclass ConcatFilter(Filter):\n def concat(self, out, hunks, **kw):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add draft Jieba tokenizer for Chinese\n"
},
{
"from": "human",
"value": "from ..language import Language\nfrom ..tokenizer import Tokenizer\nfrom ..tagger import Tagger\n\n\nclass CharacterTokenizer(Tokenizer):\n def __call__(self, text):\n return self.tok... | python | chosen |
[
{
"from": "system",
"value": "Fix the variable name for since and update the version number\n"
},
{
"from": "human",
"value": "\"\"\"\nRejected, a Python AMQP Consumer daemon\n\n\"\"\"\n__author__ = 'Gavin M. Roy <gmr@myyearbook.com>'\n__date__ = \"2009-09-10\"\n__version__ = \"1.0.0\"\n\n__a... | python | chosen |
[
{
"from": "system",
"value": "Add find_game_region() to return coors of game window\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"\nThis is the main file. The script finds the game window and sets up the \ncoordinates for each block.\n\n\nThe MIT License (MIT) \n(c) 2016\n\"\... | python | chosen |
[
{
"from": "system",
"value": "Load stats on startup, don't load nsfw\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport asyncio\nimport logging\nimport sys\n\nimport discord\nfrom discord.ext.commands import when_mentioned_or\nimport yaml\n\nfrom bot import BeattieBot\n\ntry:\n ... | python | chosen |
[
{
"from": "system",
"value": "Add imports, logging configs, and authorship info\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"\nThis is the main file. The script finds the game window and sets up the \ncoordinates for each block.\n\n\nThe MIT License (MIT) \n(c) 2016\n\"\"\"\... | python | chosen |
[
{
"from": "system",
"value": "Add in test for ARE\n"
},
{
"from": "human",
"value": "import numpy as np\nfrom numpy.testing import assert_equal\nfrom gala import evaluate as ev\n\ndef test_contingency_table():\n seg = np.array([0, 1, 1, 1, 2, 2, 2, 3])\n gt = np.array([1, 1, 1, 2, 2, 2, 2,... | python | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning: DATABASE_* -> DATABASES\n"
},
{
"from": "human",
"value": "from os.path import dirname, join\nTEST_ROOT = dirname(__file__)\n\nINSTALLED_APPS = ('adminfiles', 'tests',\n 'django.contrib.contenttypes',\n 'dja... | python | chosen |
[
{
"from": "system",
"value": "Print final surface elevations to stdout.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nimport numpy as np\n\n\ndef plot_elevation(avulsion):\n import matplotlib.pyplot as plt\n\n z = avulsion.get_value('land_surface__elevation')\n\n plt.imshow... | python | chosen |
[
{
"from": "system",
"value": "Remove result list handling from Query constructor\n"
},
{
"from": "human",
"value": "from numpy import uint16\nfrom numpy import bool_\n\n\nfrom query_result_list import QueryResultList\nfrom data_record import DataRecord\nfrom has_actions import HasActions\n\n\ncl... | python | chosen |
[
{
"from": "system",
"value": "Update package data and version number.\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\n\nVERSION = '0.1.3a1'\nREADME_FILENAME = 'README.rst'\n\nreadme = open(os.path.join(os.path.dirname(__file__), README_FILENAME))\nlong_... | python | chosen |
[
{
"from": "system",
"value": "Set URL to github one.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\n\n\nwith open(os.path.join(os.path.dirname(__file__), 'README')) as f:\n doc = f.read()\n\n\nclas... | python | chosen |
[
{
"from": "system",
"value": "Update balancers entry point to be coordinators.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nfrom lighthouse import __version__\n\n\nclassifiers = []\nwith open(\"classifiers.txt\") as fd:\n classifiers = fd.readlines()\n\n\n... | python | chosen |
[
{
"from": "system",
"value": "Update package configuration, pt. ii\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(\n name='tangled.auth',\n version='0.1a2.dev0',\n description='Tangled auth integration',\n long_description=open('README.rst')... | python | chosen |
[
{
"from": "system",
"value": "Include more general python classifiers for searchability\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport re\nfrom codecs import open\nfrom setuptools import setup\n\nwith open('README.rst', encoding='utf8') as readme_file:\n readme = readme_file... | python | chosen |
[
{
"from": "system",
"value": "Update required version of wptrunner\n"
},
{
"from": "human",
"value": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL... | python | chosen |
[
{
"from": "system",
"value": "Update the URL while we're at it\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='matmeta',\n version='0.1.0',\n url='https://github.com/jasonthiese/CommonMetadata',\n description='Common support for meta-d... | python | chosen |
[
{
"from": "system",
"value": "Use all lower pypi keywords and add command-line\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport pathlib\n\nfrom setuptools import setup\n\n\ndef read(file_name):\n file_path = pathlib.Path(__file__).parent / file_name\n return file_path.r... | python | chosen |
[
{
"from": "system",
"value": "Upgrade requests to versions > 1.0.0\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\n\nimport skosprovider_oe\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\npackages = [\n 'skosprovid... | python | chosen |
[
{
"from": "system",
"value": "Update URL and fix typo in description.\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\n# Keeping all Python code for package in lib directory\nNAME = 'cplate'\nVERSION = '0.1'\nAUTHOR = 'Alexander W Blocker'\nAUTHOR_EMAIL = 'ablocker@gmail.co... | python | chosen |
[
{
"from": "system",
"value": "Add CEI to package description and bump version\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name = 'brazilnum',\n packages = ['brazilnum'],\n version = '0.6.1',\n description = 'Validators for Brazilian... | python | chosen |
[
{
"from": "system",
"value": "Update author and maintainer information\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport os\nfrom setuptools import setup\n\nimport redis_shard\n\n\ndef read_file(*path):\n base_dir = os.path.dirname(__file__)\n file_path = (base_dir, ) + ... | python | chosen |
[
{
"from": "system",
"value": "Update requirements for correct mysql-connector name\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\ndatafiles = [('/etc', ['general_conf/bck.conf'])]\n\nsetup(\n name='mysql-autoxtrabackup',\n version='1.1',\n packages=['general_conf', '... | python | chosen |
[
{
"from": "system",
"value": "Switch to a more descriptive version\n"
},
{
"from": "human",
"value": "# python2.7 setup.py sdist\n\nfrom setuptools import setup\n\n\nsetup(\n name='rpy2_helpers',\n description='Easier R use from Python',\n author='Ed L. Cashin',\n author_email='ed.ca... | python | chosen |
[
{
"from": "system",
"value": "Correct the author email address\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nfrom suponoff import __version__ as version\n\n\nif __name__ == '__main__':\n with open(\"README.rst\") as f:\n long_description = f.read()\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix a typo and project description\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='dict-utils',\n version='0.1',\n url='https://www.github.com/andreagrandi/dicts-utils/',\n author='Andrea Grandi',\n aut... | python | chosen |
[
{
"from": "system",
"value": "Bump version and compile new wheels for pypy\n"
},
{
"from": "human",
"value": "from setuptools import setup, Extension\n\nmodule1 = Extension('earl', sources = ['earl.cpp'])\n\nsetup (\n\tname = \"earl-etf\",\n\tversion = \"2.0.2\",\n\tdescription = \"Earl-etf, the... | python | chosen |
[
{
"from": "system",
"value": "Fix entry point reference to mass\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='mass',\n version='0.0.1',\n description='Watches your javascript',\n author='Jack Boberg & Alex Padgett',\n au... | python | chosen |
[
{
"from": "system",
"value": "Include last data-cache build-date file in package\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nimport skyfield # to learn the version\n\nsetup(\n name='skyfield',\n version=skyfield.__version__,\n description=skyfield.__doc__,\n ... | python | chosen |
[
{
"from": "system",
"value": "Update README. Add global change log file. Update version number.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n\nfrom setuptools import setup, Extension\n\npyasmjit_module = Extension(\n 'pyasmjit.pyasmjit',\n sources = [\n 'pyasmjit/... | python | chosen |
[
{
"from": "system",
"value": "Add dependencies on `requests` and `BeautifulSoup`\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptool... | python | chosen |
[
{
"from": "system",
"value": "Allow package to be installed as an egg\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\nclass Tox(TestCommand):\n user_options = [('tox-args=', 'a', \"Arguments to pass to tox... | python | chosen |
[
{
"from": "system",
"value": "Add extras for the sync client.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"txyam2\",\n version=\"0.5\",\n description=\"Yet Another Memcached (YAM) client for Twisted.\",\n aut... | python | chosen |
[
{
"from": "system",
"value": "Use Pillow instead of PIL"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name = \"django-dummyimage\",\n version = \"0.1.1\",\n description = \"Dynamic Dummy Image Generator For Django!\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix pop to raise ValueError when empty Stack is popped\n"
},
{
"from": "human",
"value": "class StackItem(object):\n def __init__(self, data, next_item=None):\n self.data = data\n self.next_item = next_item\n\n def __str__(self):\n return ... | python | chosen |
[
{
"from": "system",
"value": "Replace hardcoded \"app\" with parameter \"appName\"\n"
},
{
"from": "human",
"value": "from flask import Flask, url_for\nimport os\n\n<%= appName %> = Flask(__name__)\n\n# Determines the destination of the build. Only usefull if you're using Frozen-Flask\n<%= appNa... | python | chosen |
[
{
"from": "system",
"value": "Check setup.py desc when packaging\n"
},
{
"from": "human",
"value": "import os\n\nfrom invocations.docs import docs, www, sites, watch_docs\nfrom invocations.testing import test, coverage, integration, watch_tests\nfrom invocations.packaging import vendorize, relea... | python | chosen |
[
{
"from": "system",
"value": "Fix tag names so GitHub generates better filenames\n"
},
{
"from": "human",
"value": "\nimport invoke\n\n# Based on https://github.com/pyca/cryptography/blob/master/tasks.py\n\n\n@invoke.task\ndef release(version):\n invoke.run(\"git tag -a release-{0} -m \\\"Tag... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.