conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "migrations: Fix zulipinternal migration corner case.\n\nIt's theoretically possible to have configured a Zulip server where\nthe system bots live in the same realm as normal users (and may have\nin fact been the default in early Zulip releases? Unclear.). We\nshould handle th... | python | chosen |
[
{
"from": "system",
"value": "Use a real path when testing sites.\n\nMac OS X returns link paths when calling `mkdtemp`. Calling realpath\nallows the site path comparison to be consistent across platforms.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015, Matt Layman\n\nimport os\nimport ... | python | chosen |
[
{
"from": "system",
"value": "Fix order for menu ref"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright 2017 Stein & Gabelgaard ApS\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).\n\n{\n 'name': 'Campos Checkin',\n 'description': \"\"\"\n CampOS C... | python | chosen |
[
{
"from": "system",
"value": "Change Pool to use ProcessPoolExecutor\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom concurrent.futures import ThreadPoolExecutor\nimport logging\n\nimport six\n\nlog = logging.getLogger(__name__)\n\n\nclass PoolMetaclass(type):\n\n... | python | chosen |
[
{
"from": "system",
"value": "Annotate trumpia url to say it allows XML in the querystring\n"
},
{
"from": "human",
"value": "from django.conf.urls import url\nfrom corehq.messaging.smsbackends.trumpia.views import TrumpiaIncomingView\n\n\nurlpatterns = [\n url(r'^sms/(?P<api_key>[\\w-]+)/?$'... | python | chosen |
[
{
"from": "system",
"value": "Return project ordered by date\n"
},
{
"from": "human",
"value": "import sys\n\nfrom flask import Flask, render_template\nfrom flask_flatpages import FlatPages\nfrom flask_frozen import Freezer\n\nDEBUG = True\nFLATPAGES_AUTO_RELOAD = DEBUG\nFLATPAGES_EXTENSION = '.... | python | chosen |
[
{
"from": "system",
"value": "Add teardown of integration test\n"
},
{
"from": "human",
"value": "from kitten.server import KittenServer\n\nfrom gevent.pool import Group\n\nfrom mock import MagicMock\n\n\nclass TestPropagation(object):\n def setup_method(self, method):\n self.servers =... | python | chosen |
[
{
"from": "system",
"value": "Change single quotes to double"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\nimport unittest\nimport ghstats\n\n\nclass TestStats(unittest.TestCase):\n\n def test_cli(self):\n \"\"\"\n Test command line arguments.\n \"\"\"\n ... | python | chosen |
[
{
"from": "system",
"value": "Add match_distance flag to load_data_frame()\n"
},
{
"from": "human",
"value": "import pandas as pd\n\n\ndef load_data_frame(data_frame_path, sort_reindex=False, class_labels=True):\n \"\"\"\n Load a sentence data set as pandas DataFrame from a given path.\n\n... | python | chosen |
[
{
"from": "system",
"value": "Use the REST client get_or_create helper function.\n"
},
{
"from": "human",
"value": "from qiprofile_rest_client.helpers import database\nfrom qiprofile_rest_client.model.subject import Subject\nfrom . import (clinical, imaging)\n\n\ndef sync_session(project, collec... | python | chosen |
[
{
"from": "system",
"value": "Fix load of compiled lz4 module\n"
},
{
"from": "human",
"value": "import sys\nimport os\n\np1, p2 = sys.version_info[:2]\n\ncurpath = os.path.abspath( sys.argv[0] )\nif os.path.islink(curpath):\n curpath = os.readlink(curpath)\ncurrentdir = os.path.dirname( curp... | python | chosen |
[
{
"from": "system",
"value": "Make (pre|post)_migrate scripts for the index table only if working on 'transient'.\n\nDjango run (pre|post)_migrate script once per database.\nAs we have two databases, the create_index is launch twice with different\nkwargs['using'] ('default' and 'transient'). We should try ... | python | chosen |
[
{
"from": "system",
"value": "Make the archive dir a positional argument\n\nSigned-off-by: Zack Cerza <f801c831581d4150a2793939287636221d62131e@inktank.com>\n"
},
{
"from": "human",
"value": "import argparse\nimport teuthology.ls\n\n\ndef main():\n teuthology.ls.main(parse_args())\n\n\ndef pa... | python | chosen |
[
{
"from": "system",
"value": "Simplify the code for downloading resources.\n\nUse downloadPage instead of our own class.\n"
},
{
"from": "human",
"value": "import os\n\nfrom twisted.internet import reactor, defer, protocol\nfrom twisted.web.client import RedirectAgent, Agent\n\nfrom ooni.setting... | python | chosen |
[
{
"from": "system",
"value": "Reimplement using bottle and add 3 endpoints\n"
},
{
"from": "human",
"value": "from flask import Flask, request\nfrom flask_restful import Resource, Api, reqparse\nfrom indra import reach\nfrom indra.statements import *\nimport json\n\napp = Flask(__name__)\napi = ... | python | chosen |
[
{
"from": "system",
"value": "Fix flake8 errors: E302 expected 2 blank lines, found 1\n"
},
{
"from": "human",
"value": "import pytest\nfrom thefuck.rules.git_remote_seturl_add import match, get_new_command\nfrom tests.utils import Command\n\n\n@pytest.mark.parametrize('command', [\n Command(... | python | chosen |
[
{
"from": "system",
"value": "Create sksl_enums.inc with UNIX line endings (even on Windows)\n\nChange-Id: I6e17a8498647c4bd09281f880a94cbfdcd5930ea\nReviewed-on: https://skia-review.googlesource.com/106020\nReviewed-by: Ethan Nicholas <d2cfb8c2f603266f4dc3a6f09acbcc0089603b37@google.com>\nCommit-Queue: Bri... | python | chosen |
[
{
"from": "system",
"value": "Rename image_pub to image_publisher; change docstring.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# (C) 2015 Jean Nassar\n# Released under BSD version 4\n\"\"\"\nReduce /ardrone/image_raw framerate from 30 Hz to 2 Hz.\n\n\"\"... | python | chosen |
[
{
"from": "system",
"value": "Revert \"x,y should be y,x\"\n\nThis reverts commit 7636eb6ce4f23c6f787aed02590499b6d2ea60b2.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"\nContains player and NPC-classes.\n\"\"\"\nimport logging\n\nfrom Item import Item\n\nclass Person(object):... | python | chosen |
[
{
"from": "system",
"value": "Revert \"moving httpresponse to view\"\n\nThis reverts commit a6f501bb9de6382e35372996851916adac067fa0.\n"
},
{
"from": "human",
"value": "from django_digest.decorators import *\nfrom casexml.apps.phone import xml\nfrom casexml.apps.case.models import CommCareCase\n... | python | chosen |
[
{
"from": "system",
"value": "[DCK] stock_packaging_calculator: Change development_status key to Beta\n"
},
{
"from": "human",
"value": "# Copyright 2020 Camptocamp SA\n# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl)\n{\n \"name\": \"Stock packaging calculator\",\n \"summar... | python | chosen |
[
{
"from": "system",
"value": "Adjust code to restore generality.\n\nDiscussions suggest runtime is not catestrophically slow, so return\ngenerality to the code for sake of my sanity.\n"
},
{
"from": "human",
"value": "# Python Packages\r\nimport random\r\n\r\n# External Packages\r\nimport numpy ... | python | chosen |
[
{
"from": "system",
"value": "Correct the unit test in V5_5_0\n\nThis file seems like copying from v5_4_0. Update it.\n\nChange-Id: I6125f66880feec7419ca6338ce23f05a01a2c3b3\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015 Intel Corporation.\n#\n# Licensed under the Apache License, Versio... | python | chosen |
[
{
"from": "system",
"value": "Remove old exports from subdue.core\n"
},
{
"from": "human",
"value": "__all__ = [\n 'color',\n 'BANNER',\n 'DEFAULT_DRIVER_CODE'\n 'die',\n 'verbose',\n 'use_colors',\n 'set_color_policy',\n]\n\nimport sys as _sys\nfrom . import color as _color... | python | chosen |
[
{
"from": "system",
"value": "Return a text attribute for an hover only module\n"
},
{
"from": "human",
"value": "import json\nimport requests\n\nmisperrors = {'error': 'Error'}\nmispattributes = {'input': ['vulnerability'], 'output': ['']}\nmoduleinfo = {'version': '0.1', 'author': 'Alexandre D... | python | chosen |
[
{
"from": "system",
"value": "Update to catch up with Sublime-Linter API\n"
},
{
"from": "human",
"value": "#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Ben Edwards\n# Copyright (c) 2015 Ben Edwards\n#\n# License: MIT\n#\n\n\"\"\"This... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Remove empty line before class docstring\"\n\nThis reverts commit 928cbc47cb7430d8a2fef924b61179cd30f5ca34.\n"
},
{
"from": "human",
"value": "#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Ethan Z... | python | chosen |
[
{
"from": "system",
"value": "FIX disable product supplier pricelist\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\n{\n 'name': 'Product Supplier Pricelist',\n 'version': '1.0',\n 'category': 'Product',\n 'sequence': 14,\n 'summary': '',\n 'description': \"\"\"... | python | chosen |
[
{
"from": "system",
"value": "Fix indention error - thought that was fixed before my last push\n"
},
{
"from": "human",
"value": "import subprocess\n\ndef _eintr_retry_call(func, *args):\n\twhile True:\n\t\ttry:\n\t\t\treturn func(*args)\n\texcept OSError, e:\n\t\tif e.errno == errno.EINTR:\n\t\... | python | chosen |
[
{
"from": "system",
"value": "Add parallelizing code to build\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\nfrom manager import Manager\n\nmanager = Manager()\n\n\n@manager.command\ndef build(threads=1):\n print(\"Starting a build with %d threads ...\" % threads)\n\n@manager.comm... | python | chosen |
[
{
"from": "system",
"value": "Fix: Fix django development settingns again\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n if \"--settings\" not in sys.argv:\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"pinry.set... | python | chosen |
[
{
"from": "system",
"value": "Update expected count again after changes\n"
},
{
"from": "human",
"value": "from nose.plugins.attrib import attr\nfrom indra.sources.tas import process_from_web\n\n\n@attr('slow')\ndef test_processor():\n tp = process_from_web(affinity_class_limit=10)\n asser... | python | chosen |
[
{
"from": "system",
"value": "Move object creation outside of get method\n"
},
{
"from": "human",
"value": "import requests\nfrom importlib import import_module\n\nclass ApiBase(object):\n def __init__(self, api_key, product, version='v1', entity=None):\n self.product = product\n ... | python | chosen |
[
{
"from": "system",
"value": "Increment static resource to account for CDN JS\n"
},
{
"from": "human",
"value": "import json\nimport os\n\nDEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')\n\n# For choosing what the main landing page displays\nKICKOFF = 1\nBUILDSEASON = 2\nCOMPETIT... | python | chosen |
[
{
"from": "system",
"value": "Use score as well in annotations table\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"A script to sum the rpkm values for all genes for each annotation.\"\"\"\n\nimport pandas as pd\nimport argparse\nimport sys\n\ndef main(args):\n rpkm_table =pd... | python | chosen |
[
{
"from": "system",
"value": "Remove code which blanks patch files\n"
},
{
"from": "human",
"value": "#! /usr/bin/python2.3\n# vim:sw=8:ts=8:et:nowrap\n\nimport os\nimport shutil\n\ndef ApplyPatches(filein, fileout):\n # Generate short name such as wrans/answers2003-03-31.html\n (r... | python | chosen |
[
{
"from": "system",
"value": "DEVOPS-42: Fix webapp password reset link\n"
},
{
"from": "human",
"value": "from django.contrib.auth import views\nfrom django.urls import path, re_path\n\nfrom accounts.forms import LoginForm, PasswordResetForm, SetPasswordForm\n\n\nurlpatterns = [\n path(\n ... | python | chosen |
[
{
"from": "system",
"value": "Switch to old invocation of FootprintEnumerate\n"
},
{
"from": "human",
"value": "import pcbnew\nimport sys\nimport os\n\npretties = []\nfor dirname, dirnames, filenames in os.walk(sys.argv[1]):\n # don't go into any .git directories.\n if '.git' in dirnames:\... | python | chosen |
[
{
"from": "system",
"value": "Print progress of combinatorical build\n"
},
{
"from": "human",
"value": "import os\nfrom subprocess import call\nfrom itertools import product, repeat\n\n# To be called from the OpenSpace main folder\nmodules = os.listdir(\"modules\")\nmodules.remove(\"base\")\n\n#... | python | chosen |
[
{
"from": "system",
"value": "Allow the ingester to work without a report key\n"
},
{
"from": "human",
"value": "import boto.sns\nimport simplejson as json\nimport logging\nfrom memoized_property import memoized_property\nimport os\nfrom datalake_common.errors import InsufficientConfiguration\n\... | python | chosen |
[
{
"from": "system",
"value": "Update Talk model __str__ to include time\n"
},
{
"from": "human",
"value": "from django.db import models\n\nclass Event(models.Model):\n name = models.CharField(max_length=1024, unique=True)\n slug = models.SlugField(max_length=1024)\n \n def __str__(se... | python | chosen |
[
{
"from": "system",
"value": "Add safety checks in test\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom chainerx import _cuda\n\n\ntry:\n import cupy\nexcept Exception:\n cupy = None\n\n\nclass CupyTestMemoryHook(cupy.cuda.memory_hook.MemoryHook):\n\n name = 'CupyTestMemoryHook... | python | chosen |
[
{
"from": "system",
"value": "Use NewBuildingsSearchForm as main page search form.\n\nintead of non-complete SearchForm.\n"
},
{
"from": "human",
"value": "from django.shortcuts import render, render_to_response\nfrom django.template import RequestContext\n\nfrom new_buildings.models import Buil... | python | chosen |
[
{
"from": "system",
"value": "Disable the extra check by default\n"
},
{
"from": "human",
"value": "# License under the MIT License - see LICENSE\n\nimport boto.ec2\nimport os\nimport time\n\n\ndef launch(key_name=None, region='us-west-2', image_id='ami-5189a661',\n instance_type='t2.m... | python | chosen |
[
{
"from": "system",
"value": "Add todo for future work\n"
},
{
"from": "human",
"value": "import xbmc,xbmcaddon,xbmcgui,json,random\n\ndef getAllMovies():\n rpccmd = {'jsonrpc': '2.0', 'method': 'VideoLibrary.GetMovies', 'params': { 'properties': [ 'file' ] }, 'id': 'libMovies'}\n rpccmd = js... | python | chosen |
[
{
"from": "system",
"value": "Remove unused attributes; also, empty responses after it's flushed.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# vim: ai ts=4 sts=4 et sw=4\n\nimport copy\n\nclass Message(object):\n def __init__(self, backend, caller=None, text=None):\n sel... | python | chosen |
[
{
"from": "system",
"value": "Add input check when getting all nodes.\n"
},
{
"from": "human",
"value": "class SwitchManager(object):\n def extract_all_nodes(self, content):\n return [e['node'] for e in content['nodeProperties']]\n\n def extract_all_properties(self, content):\n ... | python | chosen |
[
{
"from": "system",
"value": "Improve commenting on main function\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\n\"\"\"Main executable for ShivyC compiler\n\nFor usage, run \"./shivyc.py --help\".\n\n\"\"\"\n\nimport argparse\n\ndef get_arguments():\n \"\"\"Set up the argument p... | python | chosen |
[
{
"from": "system",
"value": "Remove hardcoded shipping modification in order PDF view\n"
},
{
"from": "human",
"value": "from decimal import Decimal\nimport StringIO\n\nfrom django.contrib.admin.views.decorators import staff_member_required\nfrom django.http import HttpResponse\nfrom django.sho... | python | chosen |
[
{
"from": "system",
"value": "Print first element of array first\n"
},
{
"from": "human",
"value": "import RPi.GPIO as GPIO\nimport time\n\nfrom socketIO_client import SocketIO, LoggingNamespace\nsocketIO = SocketIO('localhost:3000')\n\ndef onCommand(*args):\n print(args[0].split('+'))\n\nwhi... | python | chosen |
[
{
"from": "system",
"value": "Copy postactivate file to VIRTUALENV directory."
},
{
"from": "human",
"value": "# coding: utf-8\nfrom os.path import join, dirname, pardir, abspath\nimport subprocess\n\n\nBOOTSTRAP = abspath(dirname(__file__))\nROOT = abspath(join(BOOTSTRAP, pardir))\n\n# Path whe... | python | chosen |
[
{
"from": "system",
"value": "Add check to convert() so that only integers are acceptable input\n\n- Using python 2.7 so check for both `int` and `long`\n- Update function definition to document expected exception conditions \nand exception type."
},
{
"from": "human",
"value": "class NumberToWo... | python | chosen |
[
{
"from": "system",
"value": "Fix error when trying to start without user/pass\n\nThis fixes #25\n"
},
{
"from": "human",
"value": "import logging\nimport traceback\n\nimport click\n# Ignore error, logging set up in logging utils\nfrom spoppy import logging_utils\nfrom spoppy.navigation import L... | python | chosen |
[
{
"from": "system",
"value": "Mark get new test as needing to be last\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, print_function\n\nfrom ..pyautoupdate.launcher import Launcher\nfrom .pytest_skipif import needinternet\nfrom .pytest_makevers import fixture_update_di... | python | chosen |
[
{
"from": "system",
"value": "Fix indentation error from conversion to spaces\n"
},
{
"from": "human",
"value": "import re\n\nfrom django.forms.widgets import MultiWidget, Select, NumberInput\n\nfrom . import ureg\n\n\nclass QuantityWidget(MultiWidget):\n\n def get_choices(self, allowed_types... | python | chosen |
[
{
"from": "system",
"value": "Add addition method to Terrain\n"
},
{
"from": "human",
"value": "\"\"\"This module is for the Terrain class, used for storing randomly generated terrain.\"\"\"\n\n\nclass Terrain(object):\n \"\"\"Container for a randomly generated area of terrain.\n\n Attribu... | python | chosen |
[
{
"from": "system",
"value": "Use capitalised name for constant\n"
},
{
"from": "human",
"value": "repositories = [\n {\n \"owner\": \"talk-to\",\n \"name\": \"Knock\"\n }\n]"
},
{
"from": "gpt",
"value": "REPOSITORIES = [\n {\n \"owner\": \"talk-to\",\n... | python | chosen |
[
{
"from": "system",
"value": "Change 'username' destination to the 'username' attribute instead of user, since that's what is used in the code."
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"Utility module for command line argument parsing\"\"\"\n\nfrom argparse import ArgumentP... | python | chosen |
[
{
"from": "system",
"value": "Add json filename to output.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nimport os\nimport os.path\nimport json\nimport re\nimport tabulate\n\n\ndef get_json_file():\n dir='/var/www/html'\n json_list = []\n for root, dirs, files in os.walk( dir ... | python | chosen |
[
{
"from": "system",
"value": "Reword about user giving dimensions"
},
{
"from": "human",
"value": "\"\"\"\nmultiplication-table.py\nAuthor: <your name here>\nCredit: <list sources used, if any>\nAssignment:\n\nWrite and submit a Python program that prints a multiplication table. The user \nmust ... | python | chosen |
[
{
"from": "system",
"value": "Change b'' to just ''.\n"
},
{
"from": "human",
"value": "# Available Subsitutions:\n# ${executable}: Path to IHaskell kernel.\nc = get_config()\nexe = '${executable}'.replace(' ', '\\\\\\\\ ')\nc.KernelManager.kernel_cmd = [exe, 'kernel', '{connection_file}']\nc... | python | chosen |
[
{
"from": "system",
"value": "Support to specify the valid external network name\n\nIn some deployments, the retrieved external network by the\ndef get_external_networks in Snaps checked by \"router:external\"\nis not available. So it is necessary to specify the available\nexternal network as an env by user... | python | chosen |
[
{
"from": "system",
"value": "Add test for connecting containment to package and a class [skip ci]\n\nSigned-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>\n"
},
{
"from": "human",
"value": "\"\"\"Test connection of containment relationship.\"\"\"\n\nfrom gaphor import UML\n... | python | chosen |
[
{
"from": "system",
"value": "Remove SELF_CLOSING_HTML_TAGS as a configurable option\n"
},
{
"from": "human",
"value": "from django.conf import settings\n\n\nSELF_CLOSING_HTML_TAGS = getattr(settings,\n 'CONTENTIOUS_SELF_CLOSING_HTML_TAGS', ['img', 'br', 'hr', 'meta'])\n\n\n#Note, the Javascr... | python | chosen |
[
{
"from": "system",
"value": "Add missing methods to TPStats\n\nChange-Id: I332a83f3816ee30597288180ed344da3161861f8\nReviewed-on: http://review.couchbase.org/79675\nTested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>\nReviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8... | python | chosen |
[
{
"from": "system",
"value": "Add handling for multi-tenancy in sitemap.xml\n"
},
{
"from": "human",
"value": "\nfrom django.contrib.sitemaps import Sitemap\nfrom django.db.models import get_models\n\nfrom mezzanine.conf import settings\nfrom mezzanine.core.models import Displayable\nfrom mezzan... | python | chosen |
[
{
"from": "system",
"value": "Use the mint database for capsule data\n"
},
{
"from": "human",
"value": "#\n# Copyright (c) 2009 rPath, Inc.\n#\n# All Rights Reserved\n#\n\nfrom conary.lib import util\nfrom mint.rest.db import manager\n\nimport rpath_capsule_indexer\n\nclass CapsuleManager(manage... | python | chosen |
[
{
"from": "system",
"value": "Fix that awful inventory migration issue\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.9.2 on 2017-11-21 20:43\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.... | python | chosen |
[
{
"from": "system",
"value": "Prepare to release 0.21 (with pip-accel 0.25 and pip 6)\n"
},
{
"from": "human",
"value": "# py2deb: Python to Debian package converter.\n#\n# Authors:\n# - Arjan Verwer\n# - Peter Odding <peter.odding@paylogic.com>\n# Last Change: March 18, 2015\n# URL: https://p... | python | chosen |
[
{
"from": "system",
"value": "Print out bag contents for lidar and button topics\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Convert a rosbag file to legacy lidar binary format.\n\"\"\"\n\n\"\"\"LIDAR datatype format is:\n (\n timestamp (lon... | python | chosen |
[
{
"from": "system",
"value": "Fix wrong import of logger\n"
},
{
"from": "human",
"value": "# Django settings for vpr project.\n\nfrom base import *\nfrom logger import *\n\nDEBUG = True\nDEVELOPMENT = True\nTEMPLATE_DEBUG = DEBUG\n\nDATABASES = {\n 'default': {\n #'ENGINE': 'django.db... | python | chosen |
[
{
"from": "system",
"value": "Sort line coverage info when reporting\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# coding: utf-8\nimport json\nimport os\nimport sys\n\nfrom coveralls import Coveralls, cli\n\n\n# Patch coveralls to get javascript coverage from mocha\norig_get_covera... | python | chosen |
[
{
"from": "system",
"value": "Implement function to load data from directory\n\n"
},
{
"from": "human",
"value": "from nltk.tokenize import word_tokenize, sent_tokenize\nimport getopt\nimport sys\nimport os\nimport io\n\n\ndef usage():\n\tprint(\"usage: \" + sys.argv[0] + \" -i directory-of-docu... | python | chosen |
[
{
"from": "system",
"value": "Set long description to current README.md content\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nfrom setuptools import setup, find_packages\n\nwith open('requirements.txt') as f:\n requirements = f.read().splitlines()\n\nsetup(\n name = \"docker-scri... | python | chosen |
[
{
"from": "system",
"value": "Change to a simple, shorter package name\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='python-five91',\n version='0.1',\n description='Simple 591.com.tw wrapper',\n url='http://github.com/tzengyuxio/python-five91',\n ... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 8.1.0.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n retu... | python | chosen |
[
{
"from": "system",
"value": "Allow the toolbox to be installed in Python 3.7\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nREPO_URL = 'http://github.com/okfn-brasil/serenata-toolbox'\n\nwith open('README.rst') as fobj:\n long_description = fobj.read()\n\nsetup(\n auth... | python | chosen |
[
{
"from": "system",
"value": "Update install requires, add opps >= 0.2\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='opps-admin',\n version='0.1',\n description='Opps Admin, drop-in replacement of Django admin com... | python | chosen |
[
{
"from": "system",
"value": "Use 2to3 to install under Python3\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nfrom distutils.core import setup\n\nsetup(\n\t# Basic package information.\n\tname = 'Zendesk',\n\tauthor = 'Max Gutman, Stefan Tjarks',\n\tversion = '1.1.1',\n\tauthor_email =... | python | chosen |
[
{
"from": "system",
"value": "Add minimum version requirement on go_api.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"go_contacts\",\n version=\"0.1.0a\",\n url='http://github.com/praekelt/go-contacts-api',\n license='BSD',\n de... | python | chosen |
[
{
"from": "system",
"value": "Remove 'bibpy.parsers' from package list\n"
},
{
"from": "human",
"value": "\"\"\"bibpy module setup script for distribution.\"\"\"\n\nfrom __future__ import with_statement\n\nimport os\nimport distutils.core\n\n\ndef get_version(filename):\n with open(filename) ... | python | chosen |
[
{
"from": "system",
"value": "Use requirement.txt entries to populate package requirements\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(name=\"save_skype\",\n version=\"0.1\",\n description=\"Extract and save Skype chats.\",\n url=\"https://github.com... | python | chosen |
[
{
"from": "system",
"value": "Remove an install_requires library which is already part of Python since 2.7\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nwith open('README.md') as f:\n long_description = f.read()\n\nsetup(\n name='jiradoc',\n version='... | python | chosen |
[
{
"from": "system",
"value": "Change celery and kombu requirements to match ckanext-datastorer\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nfrom ckanext.qa import __version__\n\nsetup(\n name='ckanext-qa',\n version=__version__,\n description='Quality ... | python | chosen |
[
{
"from": "system",
"value": "Add license and readme to the packages\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='redis-dump-load',\n version='0.2.0',\n description='Dump and load redis databases',\n author='Oleg Pudeyev',\n... | python | chosen |
[
{
"from": "system",
"value": "Add cython as a dependency - v0.2.2\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nfrom Cython.Build import cythonize\n\nsetup(\n name='python-wallpaper',\n version='0.2.1',\n url='https://github.com/ondergetekende/python-wa... | python | chosen |
[
{
"from": "system",
"value": "Allow coverage version 6+ .\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nlong_description = \"\".join(open(\"README.rst\").readlines())\n\n\nsetup(\n name=\"pytest-testmon\",\n description=\"selects tests affected by changed files and m... | python | chosen |
[
{
"from": "system",
"value": "Include contrib module in installed package\n\nSee https://github.com/yola/yolacom/pull/1775#issuecomment-76513787\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nimport proxyprefix\n\n\nsetup(\n name='proxyprefix',\n version=proxyprefix.__v... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3 classifiers so users know this supports Python 3.\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup\n\n\ndef get_version():\n \"\"\"\n Get the version from version module without importing more than\n necessary.\n ... | python | chosen |
[
{
"from": "system",
"value": "Change author email and version\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(\n name=\"punk\",\n\n version=\"1.0.1\",\n\n description=\"Primitives for Uncovering New Knowledge.\",\n long_description=\"Machine ... | python | chosen |
[
{
"from": "system",
"value": "Add requests and six as explicit dependencies\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name = \"ironic-discoverd\",\n version = \"0.2.0\",\n description = \"Simple hardware discovery for OpenStack Ironic\",\n author =... | python | chosen |
[
{
"from": "system",
"value": "Fix broken GitHub repository URL\n"
},
{
"from": "human",
"value": "try:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nconfig = {\n 'name' : 'Redis Grepper',\n 'description' : 'Perform regex ... | python | chosen |
[
{
"from": "system",
"value": "Bump package version forward to next development version\n\nChange-Id: Ia04ceb0e83d4927e75a863252571ed76f83b2ef1\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup\n\n# Utility function to read the README file.\ndef r... | python | chosen |
[
{
"from": "system",
"value": "Add old method for setting val to pin named set_val_old\n"
},
{
"from": "human",
"value": "# Always prefer setuptools over distutils\nfrom setuptools import setup, find_packages\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = ... | python | chosen |
[
{
"from": "system",
"value": "Add \">=\" numbers to jplephem and sgp4 dependencies\n\nAnd, use de421's new pip-friendly version number \"2008.1\". And, move\n\"requests\" to a \">=\" inequality.\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nimport skyfield # to learn the... | python | chosen |
[
{
"from": "system",
"value": "Add classifier for our licence\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import find_packages, setup\n\nsetup(\n name='django-afip',\n description='AFIP integration for django',\n author='Hugo Osvaldo Barrera',\n author... | python | chosen |
[
{
"from": "system",
"value": "Install pyramid 1.5 or newer which has the new SignedCookieSessionFactory\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport sys\nfrom setuptools import setup, find_packages\n\n\nIS_PY3 = sys.version_info > (3,)\n\ninstall_requires = (\n 'cnx-arch... | python | chosen |
[
{
"from": "system",
"value": "Set implicit loop for Python <3.6"
},
{
"from": "human",
"value": "import asyncio\nimport threading\n\n\nclass Tasks:\n loop = asyncio.new_event_loop()\n\n @classmethod\n def _run(cls):\n try:\n cls.loop.run_forever()\n finally:\n ... | python | chosen |
[
{
"from": "system",
"value": "Use config options for packaging\n"
},
{
"from": "human",
"value": "from invocations.docs import docs, www, sites, watch_docs\nfrom invocations.testing import test, coverage, integration, watch_tests\nfrom invocations.packaging import vendorize, release\n\nfrom invo... | python | chosen |
[
{
"from": "system",
"value": "Add handling of which on Windows\n"
},
{
"from": "human",
"value": "# Convenience imports from pexpect\nfrom __future__ import absolute_import\nfrom pexpect import spawn, which, EOF, TIMEOUT\n"
},
{
"from": "gpt",
"value": "# Convenience imports from pex... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.