conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Add test for cli 'add' command\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015 \"Hugo Herter http://hugoherter.com\"\n#\n# This file is part of Billabong.\n#\n# Intercom is free software: you can redistribute it and/or modify\n# it under the terms of the GNU... | python | chosen |
[
{
"from": "system",
"value": "Update social sign up serializer to avoid new validation on regular sign up\n"
},
{
"from": "human",
"value": "from django.contrib.auth import get_user_model\nfrom rest_framework import serializers\nfrom yak.rest_user.serializers import SignUpSerializer\n\nUser = ge... | python | chosen |
[
{
"from": "system",
"value": "Use Django's username regex in profile URL\n"
},
{
"from": "human",
"value": "\"\"\"\nproject.profiles URL Configuration\n\n\"\"\"\nfrom django.conf.urls import url\n\nfrom .views import (profile_list_view,\n profile_detail_view,\n ... | python | chosen |
[
{
"from": "system",
"value": "Allow any logged-in user to perform image searches.\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, url\nfrom django.views.generic import TemplateView\n\nfrom core.auth import perm\n\nimport search.views\n\nurlpatterns = patterns('',\n u... | python | chosen |
[
{
"from": "system",
"value": "Add reverse relationship serializer to Category\n"
},
{
"from": "human",
"value": "from .models import Category, Keyword, Subcategory\r\nfrom rest_framework import serializers\r\n\r\n\r\nclass CategorySerializer(serializers.ModelSerializer):\r\n class Meta:\r\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove wrong comments on samples.\n"
},
{
"from": "human",
"value": "import asyncio\nimport apigpio\n\nLED_GPIO = 21\n\n\n@asyncio.coroutine\ndef start_blink(pi, address):\n yield from pi.connect(address)\n\n # running this in this order blocks :(\n # only ... | python | chosen |
[
{
"from": "system",
"value": "Add warning message to tricky template tag\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\n\nimport re\n\nfrom django import template\nfrom d... | python | chosen |
[
{
"from": "system",
"value": "Update note in config example on how to generate secret key\n"
},
{
"from": "human",
"value": "# Exemplary production configuration\n\nimport os\n\n\n# Enable this if you want a tool like Sentry\n# handle exceptions rather than Flask.\nPROPAGATE_EXCEPTIONS = False\n... | python | chosen |
[
{
"from": "system",
"value": "Tests: Make it possible to run individual tests.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nimport sys\n\nimport django\nfrom django.conf import settings\nfrom django.test.utils import get_runner\n\nif __name__ == \"__main__\":\n os.envi... | python | chosen |
[
{
"from": "system",
"value": "Fix tox failed on PyPy\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\ntry:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nimport atexit\nimport gc\ngc.set_debug(gc.DEBUG_UNCOLLECTABLE)\n\n@atexit.register\ndef report_uncoll... | python | chosen |
[
{
"from": "system",
"value": "Change the test values for valid values.\n\nThe API is only accepting the same values that are available on the client:\n0, 1, 7, 15 or 30 days\n0, 1, 5, 10, 25, 50 or 100 uses.\n"
},
{
"from": "human",
"value": "def test_find_or_create_invite(logged_rocket):\n r... | python | chosen |
[
{
"from": "system",
"value": "Return result of validation from the command script.\n"
},
{
"from": "human",
"value": "\"\"\"\nCommand function to schema-validate a HXL dataset.\nDavid Megginson\nNovember 2014\n\nCan use a whitelist of HXL tags, a blacklist, or both.\n\nUsage:\n\n import sys\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix tests on python 3.3\n"
},
{
"from": "human",
"value": "import os\nimport sys\n\nfrom nose.tools import *\n\ntry:\n\tfrom importlib import reload\nexcept ImportError:\n\tpass\n\ndef setup_yamlmod():\n\timport yamlmod\n\treload(yamlmod)\n\ndef teardown_yamlmod():\... | python | chosen |
[
{
"from": "system",
"value": "Remove unused keys from manifest.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# © 2015 Antiun Ingeniería S.L. - Jairo Llopis\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n{\n \"name\": \"Set Snippet's Anchor\",\n \"summ... | python | chosen |
[
{
"from": "system",
"value": "Upgrade to LLVM 8 on Windows.\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 https://mozilla.org/MPL/2.0/.... | python | chosen |
[
{
"from": "system",
"value": "Increase timeout to 2 minutes\n"
},
{
"from": "human",
"value": "\"\"\"\nConfiguration variables for different environments.\n\"\"\"\nimport os\n\nfrom . import application\n\n\nclass BaseConfig(object):\n DEBUG = False\n\n REDIS_URL = os.environ[\"REDIS_URL\"... | python | chosen |
[
{
"from": "system",
"value": "Use raw string for regular expression.\n"
},
{
"from": "human",
"value": "import re\n\nfrom urlparse import urlsplit\n\n\nclass URLParser(object):\n \"\"\"A minimal URL parser and splitter.\"\"\"\n\n scheme_re = re.compile('^(\\S+?)://')\n\n def get_scheme(... | python | chosen |
[
{
"from": "system",
"value": "Fix up logging and env vars.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nfrom apiclient.discovery import build\nfrom apiclient import errors\n\nPROJECT_NAME = os.getenv('PROJECT_NAME')\nTASK_QUEUE_NAME = os.getenv('QUEUE_NAME')\nTASK_LEASE... | python | chosen |
[
{
"from": "system",
"value": "Add unpad function for unpacking cookie\n"
},
{
"from": "human",
"value": "import json\nimport base64\nimport urllib\nfrom Crypto.Cipher import AES\nfrom Crypto.Protocol.KDF import PBKDF2\n\n\nclass OXSessionDecryptor(object):\n def __init__(self, secret_key_base... | python | chosen |
[
{
"from": "system",
"value": "Update pprint_expr_trees to adopt Expr\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# vim: set fileencoding=UTF-8 :\n\n\nfrom __future__ import print_function\n\n\nADD_OP = '+'\nMULTIPLY_OP = '*'\n\nOPERATORS = [ADD_OP, MULTIPLY_OP]\n\n\ndef pprint_expr... | python | chosen |
[
{
"from": "system",
"value": "Change a report data format\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport time\nimport thread\nimport Adafruit_DHT as dht\nimport config\nimport gpio_lock\n\nh = 0.0\nt = 0.0\n\ndef get_ht_thread():\n global h\n global t\n while True:\n... | python | chosen |
[
{
"from": "system",
"value": "Debug mode should not change network settings\n"
},
{
"from": "human",
"value": "import sys\nfrom app.app import create_app\n\nenvironment = sys.argv[1]\nport = int(sys.argv[2])\ndebug = sys.argv[3] == \"true\"\n\napp = create_app(environment=environment, port=port)... | python | chosen |
[
{
"from": "system",
"value": "Add test to ensure power spectrum slope is same w/ transposed array\n"
},
{
"from": "human",
"value": "# Licensed under an MIT open source license - see LICENSE\n\n\n'''\nTest functions for PSpec\n'''\n\nfrom unittest import TestCase\n\nimport numpy as np\nimport nu... | python | chosen |
[
{
"from": "system",
"value": "Replace deprecated login/logout function-based views\n"
},
{
"from": "human",
"value": "\"\"\"\nMap puzzle URLs to views. Also maps the root URL to the latest puzzle.\n\"\"\"\n\nfrom django.conf.urls import include, url\nfrom django.contrib.auth import views as auth... | python | chosen |
[
{
"from": "system",
"value": "Add configparser import to avoid windows packager error"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport sys\nfrom PyQt4 import QtCore, QtGui\nfrom UI.utilities.account_manager import AccountManager\nfrom UI.mainUI import MainUI\nfrom UI.initial_wi... | python | chosen |
[
{
"from": "system",
"value": "Add main code and feed forward net class\n\nIt can XOR, but sin function still fails\n"
},
{
"from": "human",
"value": "class FeedForwardNet:\n pass\n"
},
{
"from": "gpt",
"value": "from layers import InputLayer, Layer, OutputLayer\nimport math\nimpor... | python | chosen |
[
{
"from": "system",
"value": "8: Create documentation of DataSource Settings \n\nTask-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8"
},
{
"from": "human",
"value": "######\n# Create a file (html or markdown) with the output of\n# - JVMHeap\n# - LogFiles\n# - Ports\n# ... | python | chosen |
[
{
"from": "system",
"value": "Set random state to 0, add comments and remove print.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom sklearn.cross_validation import train_test_split\n\nfrom dataset_meta import DATASET_META\n\nfrom spam.common.utils import... | python | chosen |
[
{
"from": "system",
"value": "Update to Django 1.11.19 including updates to various dependencies\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django.conf.urls import patterns, include, url\nfrom . import methods\n\nurlpatterns = patterns('',\n url(r'^crashreport\\/submit\\... | python | chosen |
[
{
"from": "system",
"value": "Exit if a server thread died\n"
},
{
"from": "human",
"value": "\nimport logging\nimport optparse as op\nimport Queue\n\nimport bucky.carbon as carbon\nimport bucky.collectd as collectd\nimport bucky.statsd as statsd\n\n\nlogging.basicConfig(format=\"[%(levelname)s]... | python | chosen |
[
{
"from": "system",
"value": "Change DB to ip loopback from 'localhost' which doesn't work for some reason on halstead.\n"
},
{
"from": "human",
"value": "from base_settings import *\n\nDEBUG = TEMPLATE_DEBUG = False\nALLOWED_HOSTS = ['pttrack.snhc.wustl.edu']\n\nwith open(os.path.join(BASE_DIR,... | python | chosen |
[
{
"from": "system",
"value": "Put quick check so we don't load course modules on init unless we're actually running in Django\n"
},
{
"from": "human",
"value": "\"\"\"\nModule that provides a connection to the ModuleStore specified in the django settings.\n\nPasses settings.MODULESTORE as kwargs... | python | chosen |
[
{
"from": "system",
"value": "Customize scripts to work with menu\n"
},
{
"from": "human",
"value": "\nimport sys\nfrom java.lang import String\nfrom java.util import HashSet\nfrom java.util import HashMap\nimport java\n\nglobdict = globals()\n\ndef loadFilesService():\n global globdict\n ... | python | chosen |
[
{
"from": "system",
"value": "Make Studio CoursePage objects generate the correct CourseLocator based on whether the DEFAULT_STORE is set or not\n"
},
{
"from": "human",
"value": "\"\"\"\nBase class for pages specific to a course in Studio.\n\"\"\"\n\nfrom bok_choy.page_object import PageObject\... | python | chosen |
[
{
"from": "system",
"value": "Add samroeca.com to url pointing\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\nimport os\nimport sys\nsys.path.append(os.curdir)\nfrom pelicanconf import *\n\nSITEURL = 'https://softwa... | python | chosen |
[
{
"from": "system",
"value": "Replace hard-coded e-mails with gn-proxy queries\n\n* wqflask/wqflask/decorators.py (edit_access_required.wrap): Query the\nproxy to see the access rights of a given user.\n"
},
{
"from": "human",
"value": "\"\"\"This module contains gn2 decorators\"\"\"\nfrom flask... | python | chosen |
[
{
"from": "system",
"value": "Check to see if we are going donw the right path\n"
},
{
"from": "human",
"value": "'''\nSalt module to manage monit\n'''\n\ndef version():\n '''\n List monit version\n\n Cli Example::\n\n salt '*' monit.version\n '''\n\n cmd = 'monit -V'\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix syntax errors. (preventing install)\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\nfrom __future__ import absolute_import, print_function\nimport boto.s3\nfrom boto.s3.key import Key\nfrom .clusterconfig import ClusterConfiguration\nfrom .instanceinfo imp... | python | chosen |
[
{
"from": "system",
"value": "firstboot: Add doc strings for custom tags\n"
},
{
"from": "human",
"value": "#\n# This file is part of Plinth.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published ... | python | chosen |
[
{
"from": "system",
"value": "Allow handle to be passed in to avoid embedded global reference.\n"
},
{
"from": "human",
"value": "# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nimport copy\n\nimport bark\nfrom .log import Log\n\n\ncla... | python | chosen |
[
{
"from": "system",
"value": "Fix string output of Playbook\n"
},
{
"from": "human",
"value": "from django.db import models\n\nclass Playbook(models.Model):\n\n class Meta:\n verbose_name_plural = \"playbooks\"\n\n name = models.CharField(max_length=200)\n path = models.CharField... | python | chosen |
[
{
"from": "system",
"value": "Print inverse trig functions using powers\n"
},
{
"from": "human",
"value": "import sympy\nfrom sympy.printing.latex import LatexPrinter\n\nclass GammaLatexPrinter(LatexPrinter):\n def _needs_function_brackets(self, expr):\n if expr.func == sympy.Abs:\n ... | python | chosen |
[
{
"from": "system",
"value": "Allow for requirements without a hash\n"
},
{
"from": "human",
"value": "import click\nimport requirements\nimport os\nimport re\n\n\n@click.command()\n@click.option('--file', default='requirements.txt', help='File to upgrade')\n@click.option('--branch', default='ma... | python | chosen |
[
{
"from": "system",
"value": "Update test case to use new base class\n"
},
{
"from": "human",
"value": "import os\nimport tempfile\n\nfrom . import RTRSSTestCase\nfrom rtrss import caching, config\n\n\nclass CachingTestCase(RTRSSTestCase):\n def setUp(self):\n fh, self.filename = tempf... | python | chosen |
[
{
"from": "system",
"value": "Set __version__ to 6.1.4 in preparation for the v6.1.4 release\n\nThat is all.\n\nChange-Id: I79edd9574995e50c17c346075bf158e6f1d64a0c\nReviewed-on: https://gerrit.franz.com:9080/6845\nReviewed-by: Tadeusz Sznuk <4402abb98f9559cbfb6d73029f928227b498069b@franz.com>\nReviewed-by:... | python | chosen |
[
{
"from": "system",
"value": "Support 2nd parameter for weave-launch so that a plugin from any directory can be loaded.\n"
},
{
"from": "human",
"value": "import eventlet\neventlet.monkey_patch() # NOLINT\n\n\nimport importlib\nimport sys\nfrom weaveserver.main import create_app\nfrom weaveserv... | python | chosen |
[
{
"from": "system",
"value": "Add a new generic AWS Error exception\n"
},
{
"from": "human",
"value": "\"\"\"\nThe following exceptions may be raised during the course of using\n:py:class:`tornado_aws.client.AWSClient` and\n:py:class:`tornado_aws.client.AsyncAWSClient`:\n\n\"\"\"\n\n\nclass AWSC... | python | chosen |
[
{
"from": "system",
"value": "Remove unnecessary call to `process_config_dir()`.\n"
},
{
"from": "human",
"value": "'''\nCLI entry-point for salt-api\n'''\n# Import salt libs\nfrom salt.utils.parsers import (\n ConfigDirMixIn,\n DaemonMixIn,\n LogLevelMixIn,\n MergeConfigMixIn,\n ... | python | chosen |
[
{
"from": "system",
"value": "Add a little bit of demo data to show what the list_orders view does\n"
},
{
"from": "human",
"value": "import os\nimport sys\nimport transaction\n\nfrom sqlalchemy import engine_from_config\n\nfrom pyramid.paster import (\n get_appsettings,\n setup_logging,\n... | python | chosen |
[
{
"from": "system",
"value": "Disable auto-commit / group assignment in producer test\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom kafka import KafkaConsumer, KafkaProducer\nfrom test.conftest import version\nfrom test.testutil import random_string\n\n\n@pytest.mark.skipif(not versio... | python | chosen |
[
{
"from": "system",
"value": "Fix Login API implementation not parsing JSON POST data\n"
},
{
"from": "human",
"value": "import json\n\nfrom flask import Blueprint, request\nfrom flask.ext.login import current_user, logout_user, login_user\nfrom flask.ext.restful import Api, Resource, abort\n\nf... | python | chosen |
[
{
"from": "system",
"value": "Change import path in tests to reflect new name\n\nSigned-off-by: Kevin Conway <3473c1f185ca03eadc40ad288d84425b54fd7d57@gmail.com>\n"
},
{
"from": "human",
"value": "import os\nimport sys\n\n# Modify the sys.path to allow tests to be run without\n# installing the m... | python | chosen |
[
{
"from": "system",
"value": "Add rudimentary testing for thread-mapped pools\n\nRefs #174\n"
},
{
"from": "human",
"value": "try:\n import queue\nexcept ImportError:\n import Queue as queue\n\nimport pylibmc\nfrom nose.tools import eq_, ok_\nfrom tests import PylibmcTestCase\n\nclass Pool... | python | chosen |
[
{
"from": "system",
"value": "Fix polygraph.types import to include EnumValue and InputValue\n"
},
{
"from": "human",
"value": "from .enum import EnumType\nfrom .field import field\nfrom .input_object import InputObject\nfrom .interface import Interface\nfrom .lazy_type import LazyType\nfrom .li... | python | chosen |
[
{
"from": "system",
"value": "Install paramiko as a dependency, don't complain about the requirement\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Copyright 2012 Citrix Systems, Inc. Licensed under the\n# Apache License, Version 2.0 (the \"License\"); you may not use this\n# file e... | python | chosen |
[
{
"from": "system",
"value": "Add startup delay and change interpreter prompts\n\nThe delay is so that hopefully switch connections don't IMMEDIATELY print\nall over the prompt. We'll do something better eventually.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\n# Set default log level... | python | chosen |
[
{
"from": "system",
"value": "Read the real config file, not config.test\n"
},
{
"from": "human",
"value": "#!/usr/bin/python2\nimport ConfigParser\nimport sys\nimport os\n\nfrom lala import Bot\n\ndef main():\n \"\"\"Main method\"\"\"\n config = ConfigParser.SafeConfigParser()\n #confi... | python | chosen |
[
{
"from": "system",
"value": "Use old JS for loop over forEach for backwards compatibility.\n"
},
{
"from": "human",
"value": "src = \"\"\"\n(function() {\n var initialX = 0;\n var initialY = 0;\n\n function onMouseMove(ev) {\n var x = ev.screenX - initialX;\n var y = ev.s... | python | chosen |
[
{
"from": "system",
"value": "Add a few subreddits to @r_wholesome"
},
{
"from": "human",
"value": "#encoding:utf-8\n\nsubreddit = 'wholesome'\nt_channel = '@r_wholesome'\n\n\ndef send_post(submission, r2t):\n return r2t.send_simple(submission)\n"
},
{
"from": "gpt",
"value": "#en... | python | chosen |
[
{
"from": "system",
"value": "FIX language of privacy statement\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Copyright (C) 2019 Compassion CH (http://www.compassion.ch)\n# @author: Emanuel C... | python | chosen |
[
{
"from": "system",
"value": "Add TODO's for improving admin experience for Event Content Listing\n"
},
{
"from": "human",
"value": "from icekit.plugins.content_listing.forms import ContentListingAdminForm\n\nfrom icekit_events.models import EventBase\n\nfrom .models import EventContentListingIt... | python | chosen |
[
{
"from": "system",
"value": "Update history capability for \"Liberty Meadows\"\n"
},
{
"from": "human",
"value": "from comics.aggregator.crawler import CreatorsCrawlerBase\nfrom comics.core.comic_data import ComicDataBase\n\n\nclass ComicData(ComicDataBase):\n name = \"Liberty Meadows\"\n ... | python | chosen |
[
{
"from": "system",
"value": "Add ``update_bouncer.sh`` as a data file to the python package for bouncer_plumbing.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python2\n\nfrom setuptools import setup\n\n\n\nsetup(\n name='bouncer-plumbing',\n description='Glue scripts to integrate oon... | python | chosen |
[
{
"from": "system",
"value": "Change func_code to __code__ to work with python 3\n"
},
{
"from": "human",
"value": "import inspect\n\nfrom . import fields\nfrom .utils import fn_name_to_pretty_description\n\n\nclass BaseActions(object):\n \"\"\" Classes that hold a collection of actions to us... | python | chosen |
[
{
"from": "system",
"value": "Remove resource leak in Texture\n\nThis commit adds code to Texture to delete allocated textures when\nthey are garbage collected. Comments in Texture are also updated.\n"
},
{
"from": "human",
"value": "\"\"\"\nA OpenGL texture class\n\"\"\"\n\nfrom OpenGL.GL impor... | python | chosen |
[
{
"from": "system",
"value": "Set email max_length to 254 to conform with the model\n"
},
{
"from": "human",
"value": "from django.forms import Form, CharField, EmailField, ValidationError\nfrom django.contrib.auth.models import User\n\n\nclass UserChangeForm(Form):\n username = CharField(max... | python | chosen |
[
{
"from": "system",
"value": "Add one more url to example 1\n"
},
{
"from": "human",
"value": "# -*- coding: UTF-8 -*-\n\nfrom boilerpipe.extract import Extractor\n\nURL='http://sportv.globo.com/site/eventos/mundial-de-motovelocidade/noticia/2016/06/em-duelo-eletrizante-rossi-vence-marquez-salom... | python | chosen |
[
{
"from": "system",
"value": "Fix error message for invalid QT_API.\n"
},
{
"from": "human",
"value": "#------------------------------------------------------------------------------\n# Copyright (c) 2010, Enthought Inc\n# All rights reserved.\n#\n# This software is provided without warranty und... | python | chosen |
[
{
"from": "system",
"value": "Add import statement for get_user_model.\n"
},
{
"from": "human",
"value": "# (c) Crown Owned Copyright, 2016. Dstl.\n\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import redirect\nfrom django.views.generic.base import View\nfrom django.contr... | python | chosen |
[
{
"from": "system",
"value": "Make currency choices a tuple.\n"
},
{
"from": "human",
"value": "import moneyed\n\n\nFFXOS_ACTIVITY_NAME = 'Submit FirefoxOS device price'\n\n\ndef get_currency_choices():\n return sorted([(currency, data.name) for currency, data in moneyed.CURRENCIES.items()])\... | python | chosen |
[
{
"from": "system",
"value": "Add TODOs on how to expose non-playable tracks\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nfrom mopidy import models\n\nimport spotify\n\n\ndef to_track(sp_track):\n if not sp_track.is_loaded:\n return\n\n if sp_track.e... | python | chosen |
[
{
"from": "system",
"value": "Add method to parse angle command line arguments\n"
},
{
"from": "human",
"value": "\n# Compute the distance between points of cloud assigned to a primitive\n# Return an array with len=len(assign)\ndef distanceToPrimitives(cloud, assign, primitives):\n return [ [... | python | chosen |
[
{
"from": "system",
"value": "Make dsamp a visible component of blimpy"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\ntry:\n from . import waterfall\n from .waterfall import Waterfall\n from .guppi import GuppiRaw\n from . import utils\n from . import f... | python | chosen |
[
{
"from": "system",
"value": "Make no-api-key test more reliable\n"
},
{
"from": "human",
"value": "import unittest\n\nimport delighted\n\n\nclass ClientTest(unittest.TestCase):\n\n def test_instantiating_client_requires_api_key(self):\n self.assertRaises(ValueError, lambda: delighted.... | python | chosen |
[
{
"from": "system",
"value": "Fix a bug in the example python gamer.\n\ngit-svn-id: 4739e81c2fe647bfb539b919360e2c658e6121ea@552 716a755e-b13f-cedc-210d-596dafc6fb9b\n"
},
{
"from": "human",
"value": "'''\r\n@author: Sam\r\n'''\r\n\r\nimport random\r\n\r\nfrom org.ggp.base.util.statemachine impo... | python | chosen |
[
{
"from": "system",
"value": "Remove a debugging flush() after every trace\n"
},
{
"from": "human",
"value": "# Copyright (C) 2010 Peter Teichman\n\nimport datetime\nimport math\nimport os\nimport time\n\ndef singleton(cls):\n instances = {}\n def getinstance():\n if cls not in inst... | python | chosen |
[
{
"from": "system",
"value": "Fix section to read and write large files.\n"
},
{
"from": "human",
"value": "# Charles Robison\n# 2016.10.21\n# File Lab\n\n#!/usr/bin/env python\nimport os\n\ncwd = os.getcwd()\n\n# write a program which prints the full path to all files\n# in the current director... | python | chosen |
[
{
"from": "system",
"value": "Add integration test for db init\n"
},
{
"from": "human",
"value": "from piper import build\nfrom piper.db import core as db\nfrom piper.cli import cmd_piper\n\nimport mock\n\n\nclass TestEntry(object):\n @mock.patch('piper.cli.cmd_piper.CLIBase')\n def test_c... | python | chosen |
[
{
"from": "system",
"value": "Expand ~ and ~xxx at the start of filenames.\n"
},
{
"from": "human",
"value": "\"\"\"\nFunctions for retrieving strings from files\n\"\"\"\n\nimport os\n\ndef string_from_file(string, strip=True):\n \"\"\"\n Return an unaltered string or the contents of a fil... | python | chosen |
[
{
"from": "system",
"value": "Fix the expected argument check in scoring tests\n"
},
{
"from": "human",
"value": "#!@PYTHON_EXECUTABLE@\n#ckwg +5\n# Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to\n# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,\... | python | chosen |
[
{
"from": "system",
"value": "Fix metadata template import on OS X\n"
},
{
"from": "human",
"value": "import importlib\nimport pkgutil\nimport sys\n\nfrom collections import OrderedDict\n\nfrom inselect.lib.metadata import MetadataTemplate\nfrom inselect.lib.utils import debug_print\n\n_library ... | python | chosen |
[
{
"from": "system",
"value": "Remove explicit OT dep; we get it via basictracer\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='lightstep',\n version='2.2.0',\n description='LightStep Python OpenTracing Implementation',\n long_descript... | python | chosen |
[
{
"from": "system",
"value": "Move Django and South to test requirements\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ntry:\n from setuptools import setup, find_packages\n from setuptools.command.test import test\nexcept ImportError:\n from ez_setup import use_setuptools\n... | python | chosen |
[
{
"from": "system",
"value": "Fix issue - load README.md, not .rst\n"
},
{
"from": "human",
"value": "from codecs import open as codecs_open\nfrom setuptools import setup, find_packages\n\n\n# Get the long description from the relevant file\nwith codecs_open('README.rst', encoding='utf-8') as f:... | python | chosen |
[
{
"from": "system",
"value": "Fix : MIT license + version update\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nfrom setuptools import setup\n\nroot = os.path.abspath(os.path.dirname(__file__))\n\nversion = __import__('pyelevator').__version__\n\n... | python | chosen |
[
{
"from": "system",
"value": "Bump version to release bugfixes\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(\n name='vaquero',\n version='0.0.1',\n description=\"A tool for iterative and interactive data wrangling.\",\n long_description=\"... | python | chosen |
[
{
"from": "system",
"value": "Rename ScraperWiki to Sensible Code in README\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nsetup(name='dshelpers',\n version='1.3.0',\n description=\"Provides some helper functions used by the ScraperWiki Data Services team.\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Use triple-quotes for long strings\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nimport bugspots\n\nsetup(\n\tname=\"bugspots\",\n\tversion=bugspots.__version__,\n\tdescription=\"Identify hot spots in a codebase with the bug prediction \\\n\ta... | python | chosen |
[
{
"from": "system",
"value": "Change version number to 1.0.0 and development status to stable\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nlong_description = open('README.rst').read()\n\npackages = find_packages(exclude=['tests\", \"tests.*'])\n\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Update name of vagrant module\n\nChanged to python-vagrant to get python setup.py to work\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name = 'nepho',\n version = '0.2.0',\n url =... | python | chosen |
[
{
"from": "system",
"value": "Remove github link from 'install_requires'\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='firetv',\n version='1.0.5.dev',\n description='Communicate with an Amazon Fire TV device via ADB over a network.',\n url='https:/... | python | chosen |
[
{
"from": "system",
"value": "Update description to match readme\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\n\nNAME = 'archivable'\nPACKAGES = ['archivable']\nDESCRIPTION = 'Archivable class-decorator for django models which supports uniqueness'\nURL = \"https:/... | python | chosen |
[
{
"from": "system",
"value": "Mark as supporting Python 3.7\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\n\nsetup(\n name=\"htmlgen\",\n version=\"1.1.0\",\n description=\"HTML 5 Generator\",\n long_description=open(\"README.rst\").read()... | python | chosen |
[
{
"from": "system",
"value": "Update key map to add 192"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\nfrom setuptools import setup\n\nsetup(\n name=\"pyintesishome\",\n version=\"1.8.1\",\n description=\"A python3 library for running asynchronus communications with IntesisHom... | python | chosen |
[
{
"from": "system",
"value": "Revert Auto Version (Versioning is now managed by CI)\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport re\nimport os\nimport requests\ndef get_pip_version(pkginfo_url):\n pkginfo = requests.get(pkginfo_url).text\n for record in pkginfo.s... | python | chosen |
[
{
"from": "system",
"value": "Include udiskie-mount in binary distribution\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nfrom distutils.core import setup\n\nwith open('README.rst') as readme:\n long_description = readme.read()\n\nsetup(\n name='udiskie',\n version='0.4.2',\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove support for Python 2, bump version to 3.0.0\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup\n\nsetup(\n name='pycron',\n version='1.0.0',\n description='Simple cron-like parser, which determines if current datet... | python | chosen |
[
{
"from": "system",
"value": "Revert \"fix import loop in local installation; update mne dependency version\"\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Setup configuration.\"\"\"\n\nfrom setuptools import setup, find_packages\n\n\nif __name__ == \"_... | python | chosen |
[
{
"from": "system",
"value": "Add a simple log file to prevent double sending\n"
},
{
"from": "human",
"value": "from allauth.account.utils import send_email_confirmation\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.test import RequestFactor... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3.7 to the classifiers"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\n\nfrom setuptools import setup\n\nfrom shortuuid import __version__\n\nassert sys.version >= \"2.5\", \"Requires Python v2.5 or above.\"\n\nclassifiers = [\n \... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.