conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Set class process site map\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.conf import settings\n\n\ntrans_app_label = _('Opps')\n\nsettings.INSTALLED_APPS += (\n 'opps.article',\n ... | python | chosen |
[
{
"from": "system",
"value": "Check if user has is_researcher attribute before accessing it to accommodate AnonymousUser.\n"
},
{
"from": "human",
"value": "\nfrom django.shortcuts import redirect\nfrom django.urls import reverse_lazy\nfrom django.views import generic\n\nfrom exp.views.mixins im... | python | chosen |
[
{
"from": "system",
"value": "Add a helper function to create calibration sequences.\n"
},
{
"from": "human",
"value": "from RabiAmp import RabiAmp\nfrom Ramsey import Ramsey\nfrom FlipFlop import FlipFlop\nfrom SPAM import SPAM\nfrom RB import SingleQubitRB, SingleQubitRB_AC, SingleQubitRBT"
... | python | chosen |
[
{
"from": "system",
"value": "Add h.site.domain() to return the domian without the port\n"
},
{
"from": "human",
"value": "from pylons import config, g\nfrom pylons.i18n import _\n\n\ndef name():\n return config.get('adhocracy.site.name', _(\"Adhocracy\"))\n\n\ndef base_url(instance, path=Non... | python | chosen |
[
{
"from": "system",
"value": "Fix python3 tests for simbad.\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom ... import simbad\n\n\ndef test_simbad():\n r = simbad.QueryAroundId('m31', radius='0.5s').execute()\n print r.table\n ass... | python | chosen |
[
{
"from": "system",
"value": "2.5.1: Fix reset GridItem color for SPA preview\n"
},
{
"from": "human",
"value": "from PyQt5.QtGui import QFont\nfrom cadnano.gui.views.styles import BLUE_STROKE, GRAY_STROKE, THE_FONT\n\n# Slice Sizing\nSLICE_HELIX_RADIUS = 15.\nSLICE_HELIX_STROKE_WIDTH = 0.5\nSL... | python | chosen |
[
{
"from": "system",
"value": "Remove recording wait, works better\n"
},
{
"from": "human",
"value": "import io\nimport picamera\n\nclass Camera(object):\n def __init__(self):\n self.camera = picamera.PiCamera()\n self.camera.resolution = (800, 600)\n self.camera.framerate... | python | chosen |
[
{
"from": "system",
"value": "Make it so a cutoff of 0 leads to no invites/registrations being shown.\n"
},
{
"from": "human",
"value": "from datetime import date, timedelta\n\n\ndef get_cutoff_date(days):\n \"\"\"Calculate the cutoff date or return None if no time period was set.\"\"\"\n ... | python | chosen |
[
{
"from": "system",
"value": "Add __version__ attribute to fluenttest.\n\nThe __version__ attribute is the public version identifier and is\nserver safe. The version_info tuple contains the full version.\n"
},
{
"from": "human",
"value": "from fluenttest.class_based import ClassTester, lookup_c... | python | chosen |
[
{
"from": "system",
"value": "Fix tweet formatting issues when streaming from twitter\n"
},
{
"from": "human",
"value": "import sys\nfrom itertools import ifilter\nfrom requests_oauthlib import OAuth1Session\n\nclass TwitterDataIngestSource:\n \"\"\"Ingest data from Twitter\"\"\"\n\n def __ini... | python | chosen |
[
{
"from": "system",
"value": "Replace SlavedKeyStore with a shim\n\nsince we're pulling everything out of KeyStore anyway, we may as well simplify\nit.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright 2015, 2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Versi... | python | chosen |
[
{
"from": "system",
"value": "Hide revoked tickets from user in personal ticket list\n"
},
{
"from": "human",
"value": "\"\"\"\nbyceps.blueprints.ticketing.views\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2017 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\n\"... | python | chosen |
[
{
"from": "system",
"value": "exotica_python: Enable Valkyrie collision checking tests\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# This is a workaround for liburdf.so throwing an exception and killing\n# the process on exit in ROS Indigo.\n\nimport subprocess\nimport os\nimport s... | python | chosen |
[
{
"from": "system",
"value": "Use `op` instead of `app` so that `list_migrations` still works\n\nBy importing `app` the `list_migrations.py` script broke because it doesn't have the `app` context.\n"
},
{
"from": "human",
"value": "\"\"\"DOS is coming\n\nRevision ID: 420\nRevises: 410_remove_emp... | python | chosen |
[
{
"from": "system",
"value": "Change receiver contact to sender"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\r\nfrom linepy import *\r\n\r\nclient = LineClient()\r\n#client = LineClient(authToken='AUTHTOKEN')\r\n\r\nclient.log(\"Auth Token : \" + str(client.authToken))\r\n\r\npoll = ... | python | chosen |
[
{
"from": "system",
"value": "Add regex to filter out tab/space/newline\n"
},
{
"from": "human",
"value": "from scrapy.contrib.spiders import CrawlSpider, Rule\nfrom scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor\nfrom scrapy.selector import Selector\nfrom .. import items\n\nclass D... | python | chosen |
[
{
"from": "system",
"value": "Update fastapp version to 0.7.8\n"
},
{
"from": "human",
"value": "__version__ = \"0.7.7\"\n\nimport os\n\nfrom django.core.exceptions import ImproperlyConfigured\n\n# load plugins\nfrom django.conf import settings\ntry:\n plugins_config = getattr(settings, \"FAS... | python | chosen |
[
{
"from": "system",
"value": "Raise an exception when request fails.\n\nIn general, I think that it is safer to raise an exception when an HTTP\nrequest used to fetch a page fails.\n"
},
{
"from": "human",
"value": "import requests\n\n\nclass BasePage:\n\n def __init__(self, data):\n s... | python | chosen |
[
{
"from": "system",
"value": "Improve the Ukrainian Internet provider\n\nAdd `replacements`. Replace lists by tuples"
},
{
"from": "human",
"value": "# coding=utf-8\nfrom __future__ import unicode_literals\n\nfrom .. import Provider as InternetProvider\n\n\nclass Provider(InternetProvider):\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix errors when alternate_ledger is not installed\n"
},
{
"from": "human",
"value": "def compare_ledger_types(account, data, orm):\n selected_ledger = data['form']['ledger_type']\n account_ledgers = [ledger.id for ledger in account.ledger_types]\n\n if not ... | python | chosen |
[
{
"from": "system",
"value": "Remove app.debug as we do not use it any more.\n\nChange-Id: I61497ae95dd304e60240f8ac731e63950351782f\nCloses-Bug: #1583663\n"
},
{
"from": "human",
"value": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in... | python | chosen |
[
{
"from": "system",
"value": "[REF] openacademy: Add domain | & ilike\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom openerp import fields, models\n\nclass Session(models.Model):\n _name = 'openacademy.session'\n\n name = fields.Char(required=True)\n start_date = fie... | python | chosen |
[
{
"from": "system",
"value": "Include script-src unsafe-eval to allow underscore templating\nLong term, we should pre-compile with webpack to avoid needing this\n"
},
{
"from": "human",
"value": "# define flask extensions in separate file, to resolve import dependencies\n\nfrom flask_sqlalchemy ... | python | chosen |
[
{
"from": "system",
"value": "Improve the instructions on twitter application auth\n"
},
{
"from": "human",
"value": "import requests\nimport base64\nimport sys\n\nif len(sys.argv) < 3:\n print \"Usage: twitter_application_auth.py <consumer key> <consumer secret>\"\n sys.exit(1)\n\nconsume... | python | chosen |
[
{
"from": "system",
"value": "Hide secret channels from /NAMES users\n"
},
{
"from": "human",
"value": "from txircd.modbase import Mode\n\nclass SecretMode(Mode):\n\tdef listOutput(self, command, data):\n\t\tif command != \"LIST\":\n\t\t\treturn data\n\t\tcdata = data[\"cdata\"]\n\t\tif \"s\" in... | python | chosen |
[
{
"from": "system",
"value": "Add uuid to be readable in Admin-panel\n"
},
{
"from": "human",
"value": "from django.contrib import admin\nfrom .models import Tviit\n\nadmin.site.register(Tviit)"
},
{
"from": "gpt",
"value": "from django.contrib import admin\nfrom .models import Tviit... | python | chosen |
[
{
"from": "system",
"value": "Fix leftover docs hook for github_integration module\n"
},
{
"from": "human",
"value": "\"\"\"\nBioconda Utilities Package\n\n.. rubric:: Subpackages\n\n.. autosummary::\n :toctree:\n\n bioconda_utils.bot\n bioconda_utils.lint\n\n.. rubric:: Submodules\n\n.. a... | python | chosen |
[
{
"from": "system",
"value": "Check if PluginExecutionContext was started before shutting it down.\n\nIf a `PluginExecutionContext().shutdown()` is called _before_\n`PluginExecutionContext().start()` was called,\nthis leads to an `AttributeError` exception since finalizer tries to\naccess to attributes whic... | python | chosen |
[
{
"from": "system",
"value": "Add clip to reduce fixture size.\n"
},
{
"from": "human",
"value": "from . import OsmFixtureTest\n\n\nclass FixNullNetwork(OsmFixtureTest):\n def test_routes_with_no_network(self):\n # ref=\"N 4\", route=road, but no network=*\n # so we should get s... | python | chosen |
[
{
"from": "system",
"value": "ENH: Add 'better' plotting control for live plots\n"
},
{
"from": "human",
"value": "\ndef detselect(detector_object, suffix=\"_stats_total1\"):\n \"\"\"Switch the active detector and set some internal state\"\"\"\n gs.DETS =[detector_object]\n gs.PLOT_Y = ... | python | chosen |
[
{
"from": "system",
"value": "[Python] Refactor rolling a spare in tests\n"
},
{
"from": "human",
"value": "import unittest\nfrom game import Game\n\nclass BowlingGameTest(unittest.TestCase):\n\n def setUp(self):\n self.g = Game()\n\n def tearDown(self):\n self.g = None\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix sharepoint tenant cost tracking\n\n - itacloud-6123\n"
},
{
"from": "human",
"value": "from django.contrib.contenttypes.models import ContentType\n\nfrom nodeconductor.cost_tracking import CostTrackingBackend\nfrom nodeconductor.cost_tracking.models import Defau... | python | chosen |
[
{
"from": "system",
"value": "Change the URL where the repository is hosted.\n"
},
{
"from": "human",
"value": "\"\"\"Package setup configuration.\n\nTo Install package, run:\n >>> python setup.py install\n\nTo install package with a symlink, so that changes to the source files will be immedi... | python | chosen |
[
{
"from": "system",
"value": "Use version from udev module instead of declaring it manually\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\nfrom setuptools import setup\n\n\nwith open('README.rst') as stream:\n long_description = stream.read().decode('utf-8'... | python | chosen |
[
{
"from": "system",
"value": "Bump version: 0.0.12 -> 0.0.13\n\n[ci skip]\n"
},
{
"from": "human",
"value": "# /setup.py\n#\n# Installation and setup script for parse-shebang\n#\n# See /LICENCE.md for Copyright information\n\"\"\"Installation and setup script for parse-shebang.\"\"\"\n\nfrom set... | python | chosen |
[
{
"from": "system",
"value": "Include config files in the pip install\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom dreambeam import __version__\n\nsetup(name='dreamBeam',\n version=__version__,\n description='Measurement ... | python | chosen |
[
{
"from": "system",
"value": "Remove README from pypi descriptioj\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\ninstall_requires = [\n 'dill==0.2.5',\n 'easydict==1.6',\n 'h5py==2.6.0',\n 'jsonpickle==0.9.3',\n 'Keras==1.2.0',\n 'nflgame==1... | python | chosen |
[
{
"from": "system",
"value": "Prepare for making alpha release\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport sys, os\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.rst')).read()\nexcept IOError:\n ... | python | chosen |
[
{
"from": "system",
"value": "Introduce PCC transformation plus adding new plotting options\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"Pygme: Python Gaussian ModElling - a python implementation of the Multi-Gaussian Expansion Method.\n Fit MGE models, and Generate i... | python | chosen |
[
{
"from": "system",
"value": "Add missing `tests_require` for `mock`\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name='pyretry',\n version=\"0.9\",\n description='Separate your retry logic from your business logic',\n author='Bob Renwick',\n autho... | python | chosen |
[
{
"from": "system",
"value": "Make it possible to parse command line arguments directly\n\nUsing parse_this awesome module we can create the whole parser needed to\nuse the OutpanAPI class from the command line\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools ... | python | chosen |
[
{
"from": "system",
"value": "Fix flake8 and missing sys module\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nfrom setuptools.command.test import test as TestCommand\nfrom setuptools import setup\n\nfrom hbite import VERSION as version\n\n\nclass Tox(TestCommand):\n def f... | python | chosen |
[
{
"from": "system",
"value": "Update for new node definition syntax\n"
},
{
"from": "human",
"value": "import base64\nimport json\nimport Queue\nimport time\nimport logging\n\nfrom boto import sns\nfrom boto import sqs\nfrom boto.sqs.message import Message, RawMessage\n\nfrom nanomon.utils impor... | python | chosen |
[
{
"from": "system",
"value": "Adjust phrasing of PyPI long_description\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"setup.py for get_user_headers\"\"\"\n\n__author__ = \"Stephan Sokolow (deitarion/SSokolow)\"\n__license__ = \"MIT\"\n\nimport sys\n\nif __name__ == '__main__' an... | python | chosen |
[
{
"from": "system",
"value": "Fix template loading when installed with easy_install\n\nIf you install a package using `easy_install` or `setup.py install`, it will default to installing as a zipped egg. Django is by default unable to find templates inside zipped archives and even with an egg template loader... | python | chosen |
[
{
"from": "system",
"value": "Make sure `longform` dir is properly installed.\n\nI am officially *the worst* at packaging.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup\n\n\nsetup(\n name='django-longform',\n version='0.1.1',\n description='A Dja... | python | chosen |
[
{
"from": "system",
"value": "Add correct function to script endpoint\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='Matador',\n version='0.0.1',\n author='Owen Campbell',\n author_email='owen.campbell@empiria.co.uk',\n entry_point... | python | chosen |
[
{
"from": "system",
"value": "Update keywords, add 0.1 tag\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nsetup(\n name = 'dp2ppgen',\n packages = ['dp2ppgen'], # this must be the same as the name above\n version = '0.1',\n description = 'Translates pgdp.org formatted t... | python | chosen |
[
{
"from": "system",
"value": "Add all used packages to tests_requires (for Readthedocs)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python \n# -*- coding: utf-8 -*- \n#\n#\n# Copyright 2012 ShopWiki\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use ... | python | chosen |
[
{
"from": "system",
"value": "Add --quick option to mysqldump\n"
},
{
"from": "human",
"value": "import datetime\nfrom google.cloud import storage\nfrom invoke import task\nimport os\n\nBUCKET_NAME = 'lekcije'\n\n\n@task\ndef backup_mysql(ctx):\n mysqldump = os.getenv('MYSQLDUMP')\n if not... | python | chosen |
[
{
"from": "system",
"value": "Increase the count so we don't spin forever\n"
},
{
"from": "human",
"value": "import urlparse\n\nimport requests\n\n\ndef purge_fastly_tags(domain, api_key, service_id, tags, max_tries=25):\n session = requests.session()\n headers = {\"X-Fastly-Key\": api_key... | python | chosen |
[
{
"from": "system",
"value": "Fix of bug in Python 2.6 with failed isclass check in inspect module\n"
},
{
"from": "human",
"value": "\"\"\"Utils module.\"\"\"\n\nfrom inspect import isclass\n\nfrom .errors import Error\n\n\ndef is_provider(instance):\n \"\"\"Check if instance is provider ins... | python | chosen |
[
{
"from": "system",
"value": "Modify random walk so that it works.\n"
},
{
"from": "human",
"value": "import neo4j\nimport random\n\nfrom logbook import Logger\nlog = Logger('trinity.topics')\n\n\nDEFAULT_DEPTH = 5\nNUM_WALKS = 100\n# Passed sorted list (desc order), return top nodes\nTO_RETURN ... | python | chosen |
[
{
"from": "system",
"value": "Add test of reading & writing CrystFEL geometry\n"
},
{
"from": "human",
"value": "import numpy as np\n\nfrom karabo_data.geometry2 import AGIPD_1MGeometry\n\ndef test_snap_assemble_data():\n geom = AGIPD_1MGeometry.from_quad_positions(quad_pos=[\n (-525, ... | python | chosen |
[
{
"from": "system",
"value": "Fix outdated link in sample plugin\n\nLink in sample_plugin.py is outdated\nand is changed\n\nChange-Id: I2f3a7b59c6380e4584a8ce2a5313fe766a40a52a\nCloses-Bug: #1491975\n"
},
{
"from": "human",
"value": "# Copyright 2014 Mirantis Inc.\n# All Rights Reserved.\n#\n# ... | python | chosen |
[
{
"from": "system",
"value": "Add shebang and future import\n"
},
{
"from": "human",
"value": "$py_copyright\n\ndef _main():\n print(\"Hello from $project_name\")\n\nif __name__ == \"__main__\":\n _main()\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env python\n$py_copyright\nfr... | python | chosen |
[
{
"from": "system",
"value": "Add scatterplot matrix for college.csv.\n"
},
{
"from": "human",
"value": "import pandas as pd\n\nprint('\\nKNN\\n---')\nd = {'X1': [ 0, 2, 0, 0, -1, 1 ],\n 'X2': [ 3, 0, 1, 1, 0, 1 ],\n 'X3': [ 0, 0, 3, 2, 1, 1 ],\n 'Y': ['... | python | chosen |
[
{
"from": "system",
"value": "Use @task decorator in taskset example\n"
},
{
"from": "human",
"value": "from locust import HttpUser, TaskSet, task, between\n\n\nclass WebsiteUser(HttpUser):\n \"\"\"\n Example of the ability of inline nested TaskSet classes\n \"\"\"\n host = \"http://... | python | chosen |
[
{
"from": "system",
"value": "Implement configuration support in logging\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\n pyfire.logger\n ~~~~~~~~~~~~~\n\n Use pocoo's logbook or a simple no-op fallback\n\n :copyright: (c) 2011 by the pyfire Team, see AUTHORS for ... | python | chosen |
[
{
"from": "system",
"value": "Break the alert into a method so subclasses can choose how the alert is relayed."
},
{
"from": "human",
"value": "import json\nimport requests\n\n\nclass TemperatureWatch(object):\n thermostat_url = None\n alert_high = 80\n alert_low = 60\n _last_respons... | python | chosen |
[
{
"from": "system",
"value": "Update the version on master\n"
},
{
"from": "human",
"value": "\"\"\"Time series transformation and classification module for Python.\n\npyts is a Python package for time series transformation and classification.\nIt aims to make time series classification easily a... | python | chosen |
[
{
"from": "system",
"value": "Use ijson to parse the test262 results.\n\nParsing the output all at once can cause out-of-memory errors in automated\ntesting.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nimport json\nimport sys\n\nPREFIXES = [\n [\"FAIL\", \"PASS\"],\n [\"EX... | python | chosen |
[
{
"from": "system",
"value": "Use correct english terms, from APPENDIX A -TECHNICAL SPECIFICATIONS\n"
},
{
"from": "human",
"value": "# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).\nfrom odoo import models, fields\n\n\nclass AccountTax(models.Model):\n _inherit = 'account.tax... | python | chosen |
[
{
"from": "system",
"value": "Add should_not_see, has_not_title, title_does_not_contain to ContentTestMixin.\n\nThese methods cause a wait for the full duration of the @wait_for timeout when\nthe assertion test is successful (and the given text is missing). It will fail\nfast, but success is slow. These ne... | python | chosen |
[
{
"from": "system",
"value": "Fix import error for boto.utils\n"
},
{
"from": "human",
"value": "import logging\nimport socket\nimport boto\n\nLOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s'\nLOG_DATE = '%Y-%m-%d %I:%M:%S %p'\n\n\nlogging.basicConfig(format=LOG_FORMAT, datefmt=LO... | python | chosen |
[
{
"from": "system",
"value": "Remove \"name\" from discussion post\n"
},
{
"from": "human",
"value": "from django.contrib.auth.models import User\nfrom django.db import models\n\n\nclass Discussion(models.Model):\n user = models.ForeignKey(User)\n name = models.CharField(max_length=255)\n ... | python | chosen |
[
{
"from": "system",
"value": "Make it easier to figure out a given file's slug\n"
},
{
"from": "human",
"value": "from django.contrib import admin\nfrom tinycontent.models import TinyContent, TinyContentFileUpload\n\n\nclass TinyContentAdmin(admin.ModelAdmin):\n list_display = ('name', )\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix header to short version\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Odoo, Open Source Management Solution\n# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>\n#\n# This program is free software: you can redistribute it and/or modify\n# ... | python | chosen |
[
{
"from": "system",
"value": "Fix bug where user could not be found\n\nThis problem only occured when a request tried to find the user right\nafter it had been created.\n"
},
{
"from": "human",
"value": "from google.appengine.api import users\nfrom google.appengine.ext import db\n\nfrom model im... | python | chosen |
[
{
"from": "system",
"value": "Fix problem in previous version\n\nI was accidentally allowing the current hash's quint to match its triple\n"
},
{
"from": "human",
"value": "import sys\nimport itertools\nimport re\nfrom md5 import md5\n\npuzzle_input = 'abc' # 'yjdafjpo'\n\ndef key(n):\n return ... | python | chosen |
[
{
"from": "system",
"value": "Add test for learners help link\n"
},
{
"from": "human",
"value": "from unittest import skipUnless\n\nfrom bok_choy.web_app_test import WebAppTest\n\nfrom acceptance_tests import ENABLE_LEARNER_ANALYTICS\nfrom acceptance_tests.mixins import CoursePageTestsMixin\nfro... | python | chosen |
[
{
"from": "system",
"value": "Add example with back ticks.\n"
},
{
"from": "human",
"value": "# enable: W9401,W9402\n\n#A comment does not begin with a whitespace.\n\na = 1 + 2 # A comment begins with two whitespace.\n\n# a comment begins with a lowercase letter.\n\n# Good comment examples.\n\... | python | chosen |
[
{
"from": "system",
"value": "Test for dropout probability be a tensor\n"
},
{
"from": "human",
"value": "# Copyright 2015-present Scikit Flow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complianc... | python | chosen |
[
{
"from": "system",
"value": "Update dependencies to be more loose (and match Channels)\n"
},
{
"from": "human",
"value": "from os.path import dirname, join\n\nfrom setuptools import find_packages, setup\n\nfrom channels_redis import __version__\n\n# We use the README as the long_description\nre... | python | chosen |
[
{
"from": "system",
"value": "Add more classifiers, including Python 3.3 and 3.4 declarations.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name = 'thespian',\n version = '2.1.4',\n description = 'Python Actor concurrency library',\n auth... | python | chosen |
[
{
"from": "system",
"value": "Remove upper limit for tornado's version\n\nMy use case seems to work with tornado 4.0.2.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\nfrom tornado_redis_sentinel import __version__... | python | chosen |
[
{
"from": "system",
"value": "Use nose as the test driver.\n"
},
{
"from": "human",
"value": "#\n# This file is part of gruvi. Gruvi is free software available under the terms\n# of the MIT license. See the file \"LICENSE\" that was provided together with\n# this source file for the licensing te... | python | chosen |
[
{
"from": "system",
"value": "Add long description content type\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nwith open('README.rst') as file:\n long_description = file.read()\n\nsetup(name='parmap',\n version='1.5.1.9000',\n description... | python | chosen |
[
{
"from": "system",
"value": "Fix package data (str to [])\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nfrom distutils.core import setup\n\n# allow setup.py to be run from any path\nos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__... | python | chosen |
[
{
"from": "system",
"value": "Add magic comment to stop our CI from building a package\n"
},
{
"from": "human",
"value": "import os\nimport sys\nimport imp\nfrom setuptools import find_packages\n\ntry:\n from restricted_pkg import setup\nexcept:\n # allow falling back to setuptools only if... | python | chosen |
[
{
"from": "system",
"value": "Set zip_safe to False to eliminate a variable getting the tests to run\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"\nSetup file for toolaudit.\n\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup\n\n\nhere = os.path.abspath(os.path... | python | chosen |
[
{
"from": "system",
"value": "Change version and license for 0.2\n"
},
{
"from": "human",
"value": "\nfrom setuptools import setup\n\nsetup(name = 'OWSLib',\n version = '0.1.0',\n description = 'OGC Web Service utility library',\n license = 'GPL',\n key... | python | chosen |
[
{
"from": "system",
"value": "Update the project Development Status\n"
},
{
"from": "human",
"value": "\"\"\"Package Keysmith.\"\"\"\n\n\nimport codecs\nimport os.path\n\nimport setuptools # type: ignore\n\nimport keysmith # This project only depends on the standard library.\n\n\ndef read(*par... | python | chosen |
[
{
"from": "system",
"value": "Add cached-property to the dependencies\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nimport populous\n\nrequirements = [\n \"click\",\n]\n\nsetup(\n name=\"populous\",\n version=populous.__version__,\n url=populous.__... | python | chosen |
[
{
"from": "system",
"value": "Add pytz to installation requirements, needed for pedometerpp\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport io\n\n# Take from Jeff Knupp's excellent article:\n# http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-rig... | python | chosen |
[
{
"from": "system",
"value": "Remove long utility command names in favor of awp\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# coding=utf-8\n\nfrom setuptools import setup\n\n\n# Get long description (used on PyPI project page)\ndef get_long_description():\n try:\n # Use p... | python | chosen |
[
{
"from": "system",
"value": "Add requirement for fork version of gnupg\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport sys\n\n\nwith open('README.md') as f:\n readme = f.read()\n\ninstall_requires = [\n 'seria',\n 'python-... | python | chosen |
[
{
"from": "system",
"value": "Update nose version for Python2\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup\n\nVERSION = '0.0.1'\n\n\ntest_requirements = [\n 'nose>=1.3.7',\n 'responses>=0.5.1'\n]\n\ninstall_requires = test_requirements + [\n 're... | python | chosen |
[
{
"from": "system",
"value": "Add comment for updated Pandas requirement\n"
},
{
"from": "human",
"value": "import os.path\n\n# Install setuptools if not installed.\ntry:\n import setuptools\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n\nfrom setuptools... | python | chosen |
[
{
"from": "system",
"value": "Add missing comma in classifier list\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import setup\nfrom ipyrmd import __version__\n\nsetup(name=\"ipyrmd\",\n version=__version__,\n description=\"Convert between IPython/Jupyter ... | python | chosen |
[
{
"from": "system",
"value": "Include README in package cf. PyPA recommendation\n\nhttp://python-packaging.readthedocs.io/en/latest/metadata.html#a-readme-long-description\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\n\n__version__ = '0.1'\n\nHERE = o... | python | chosen |
[
{
"from": "system",
"value": "Use higher pandas version for python 3.6.0 support\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = __import__('eemeter').get_version()\n\n\nsetup(\n name='eemeter',\n version=version,\n description='Open Energy Ef... | python | chosen |
[
{
"from": "system",
"value": "Increment version number to 1.0.0"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name = 'django-news-sitemaps',\n version = '0.1.7',\n description = 'Generates sitemaps compatible with the Google News schema',\n ... | python | chosen |
[
{
"from": "system",
"value": "Expand regex for location of site-packages. Provide more info to user about possible failure to find site-packages\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom distutils import sysconfig\nimport re\n#from setuptools.dist import Distribution... | python | chosen |
[
{
"from": "system",
"value": "Bump elastalert version to 0.1.0\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\nbase_dir = os.path.dirname(__file__)\nsetup(\n name='elastalert',\n version='0.0.9... | python | chosen |
[
{
"from": "system",
"value": "Convert md to rst readme specially for PyPi\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nwith open('README.md') as readme:\n with open('HISTORY.md') as history:\n long_description = readme.read() + '\\n\\n' + history.read()\n\nVER... | python | chosen |
[
{
"from": "system",
"value": "Upgrade type and click versions\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\n\nwith open('README.rst') as readme_file:\n README = readme_file.read()\n\n\ninstall_requires = [\n 'click==6.2',\n 'bot... | python | chosen |
[
{
"from": "system",
"value": "Move generic lib to botton of config.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name = 'skeleton',\n version = '0.0',\n description = 'A python skeleton project',\n long_description = '''\nTh... | python | chosen |
[
{
"from": "system",
"value": "Create source snapshot and upload to GS.\n\nBUG=79198\n\nReview URL: http://codereview.chromium.org/7129020\n\ngit-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@88372 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# Cop... | python | chosen |
[
{
"from": "system",
"value": "Put multple treatments into the same histogram.\n"
},
{
"from": "human",
"value": "# Take the output of the BitFunnel correlate command and generate histograms.\n\nfrom collections import defaultdict\nimport csv\n\nterm_term_correlation = defaultdict(int)\nterm_all_... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.