conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add missing tests dependency pycodestyle.\n" }, { "from": "human", "value": "import re\nimport sys\n\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\n\n# Parse the version from the file.\nverstrline = open('git_archive_all.py',...
python
chosen
[ { "from": "system", "value": "Add some keywords to improve PyPI search ranking.\n" }, { "from": "human", "value": "import sys\n\nfrom setuptools import setup, find_packages\n\n\nextra_setup = {}\nif sys.version_info >= (3,):\n extra_setup['use_2to3'] = True\n\nsetup(\n name='blessings',\n ...
python
chosen
[ { "from": "system", "value": "Make sure the package is built before it is tested" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport os\n\nfrom distutils.core import setup, Extension, Command\nfrom distutils.command.sdist import sdist\n\nfrom distutils.command.build_py import build_...
python
chosen
[ { "from": "system", "value": "Correct a list comprehension which caused node comments to be added to spine and manifest json\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name='pyepub',\n version='0.2.3',\n packages=['pyepub'],\n url='http://blog.ale...
python
chosen
[ { "from": "system", "value": "Remove tests from built package\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nlong_description = '''\\\npyimagediet is a Python wrapper around image optimisations tools used to\nreduce images size without loss of visual quality. I...
python
chosen
[ { "from": "system", "value": "Replace incorrect import of generic test runner w/ custom task\n" }, { "from": "human", "value": "from os.path import join\n\nfrom invoke import Collection\nfrom invocations import docs as _docs, testing\n\n\nd = 'sites'\n\n# Usage doc/API site (published as docs.pa...
python
chosen
[ { "from": "system", "value": "Add a basic precondition, and a relational precondition.\n" }, { "from": "human", "value": "from unittest import TestCase\n\nfrom preconditions import PreconditionError, preconditions\n\n\nclass InvalidPreconditionTests (TestCase):\n def test_varargs(self):\n ...
python
chosen
[ { "from": "system", "value": "Check for winner after every move\n" }, { "from": "human", "value": "class Connect4(object):\n def __init__(self):\n self.pieces = [[] for i in xrange(7)]\n self.turn = 0\n\n def move(self, column):\n for i in xrange(column, column + 7):\n...
python
chosen
[ { "from": "system", "value": "Update the sequence alignment example.\n" }, { "from": "human", "value": "from alignment.sequence import Sequence\nfrom alignment.vocabulary import Vocabulary\nfrom alignment.sequencealigner import SimpleScoring, GlobalSequenceAligner\n\n\n# Create sequences to be a...
python
chosen
[ { "from": "system", "value": "Fix the imports in the tests of dropbox\n" }, { "from": "human", "value": "import os\n\nfrom path import path\n\nfrom tests.utils.testdriver import TestDriver\nfrom tests.utils.tempdirs import dirs\nfrom onitu.drivers.dropbox.libDropbox import LibDropbox\n\nclass Dr...
python
chosen
[ { "from": "system", "value": "Correct URL and add http in SAMP docstring\n" }, { "from": "human", "value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nThis subpackage provides classes to communicate with other applications via the\n`Simple Application Messaging Prot...
python
chosen
[ { "from": "system", "value": "Fix style: not foo in [] => foo not in\n" }, { "from": "human", "value": "\"\"\"Provides helper functions for interactive prompts\n\nWritten by Peter Duerr\n\"\"\"\n\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ imp...
python
chosen
[ { "from": "system", "value": "Put file created by the gtts on tmp folder\n" }, { "from": "human", "value": "import time\nimport os\n\nfrom tempfile import NamedTemporaryFile\nfrom sys import platform as _platform\n\nfrom gtts import gTTS\nfrom pygame import mixer\n\nfrom .playsound import playso...
python
chosen
[ { "from": "system", "value": "Use Type[ET] as enum passed to init is a Type\n" }, { "from": "human", "value": "from __future__ import absolute_import\n\nfrom enum import Enum\nfrom typing import TypeVar, Optional, Any # noqa\n\nfrom odin.exceptions import ValidationError\nfrom . import Field\n\...
python
chosen
[ { "from": "system", "value": "Sort on imdb rating if filmtipset ratings are the same.\n" }, { "from": "human", "value": "from __future__ import print_function\nimport textwrap\nfrom providers.output.provider import OutputProvider\n\nIDENTIFIER = \"Terminal\"\n\nclass Provider(OutputProvider):\n ...
python
chosen
[ { "from": "system", "value": "Include static files specific to regform\n" }, { "from": "human", "value": "# This file is part of Indico.\n# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).\n#\n# Indico is free software; you can redistribute it and/or\n# modify it unde...
python
chosen
[ { "from": "system", "value": "Update info about the project\n" }, { "from": "human", "value": "''' FAB CITY - VISUALIZAR 2016\n--------------------------------------------\nA web application powered by Flask and d3.js\nto generate networks/datavisualisations\n---------------------------...
python
chosen
[ { "from": "system", "value": "Set version to 1.9.0-pre to indicate pre-release code\n" }, { "from": "human", "value": "# file findingaids/__init__.py\n#\n# Copyright 2012 Emory University Library\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use thi...
python
chosen
[ { "from": "system", "value": "Revert \"Remove dependency that was fixed upstream\"\n\nThis reverts commit 9ee219d85849629eac53a28e72fa374a6c805ea4.\n" }, { "from": "human", "value": "#!/usr/bin/env python\nimport os\nimport re\nfrom setuptools import setup, find_packages\n\n\ndef get_ini_variabl...
python
chosen
[ { "from": "system", "value": "Use seed as the js interpreter." }, { "from": "human", "value": "import subprocess\n\nfrom distutils.core import setup\nfrom distutils.command.sdist import sdist\n\n\nclass SignedSDistCommand(sdist):\n \"\"\"Sign the source archive with a detached signature.\"\"\...
python
chosen
[ { "from": "system", "value": "Add backends and middleware to the package\n" }, { "from": "human", "value": "from setuptools import setup\n\n\ninstall_requires = ('django-admin-sso',)\n\nsetup(\n name='incuna-auth-urls',\n version='0.1',\n url='http://github.com/incuna/incuna-auth-urls',...
python
chosen
[ { "from": "system", "value": "Fix Markdown bug and correct license information\n" }, { "from": "human", "value": "import pelican_bibtex\nfrom distutils.core import setup\n\nCLASSIFIERS = \"\"\"\\\nDevelopment Status :: 5 - Production/Stable\nIntended Audience :: Science/Research\nIntended Audien...
python
chosen
[ { "from": "system", "value": "Update httplib2 version, bump version, fix formatting\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import with_statement\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\n\n\nif sys.argv[-1] == 'publi...
python
chosen
[ { "from": "system", "value": "Fix the README file opening\n" }, { "from": "human", "value": "from setuptools import setup\n\n\nNAME = \"sphinxcontrib-runcode\"\nVERSION = \"0.0.1\"\nDESCRIPTION = \"Post included code in an executable pastebin like codepad / ideone.\"\nLONG_DESCRIPTION = open('RE...
python
chosen
[ { "from": "system", "value": "Include migrations in package and bump version to v0.3\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n\n# allow setup.py to be run from any path\nos.chdir(os....
python
chosen
[ { "from": "system", "value": "Remove \"less-than\" restrictions on Astropy, LXML.\n\nI think I put these in place before I had Travis-CI cron-jobs available.\nTherefore wanted to avoid future unknowns. Now at least an email gets sent\nwhen there's a new release and it breaks something.\n" }, { "from...
python
chosen
[ { "from": "system", "value": "Enable finding Hue bridge on network.\n" }, { "from": "human", "value": "__author__ = 'hira'\n\n" }, { "from": "gpt", "value": "import requests\nimport json\n\n\ndef get_bridge_ips():\n res = requests.get('http://www.meethue.com/api/nupnp').text\n ...
python
chosen
[ { "from": "system", "value": "Add missing requirement for libvirt-python\n\nlibvirt-python is missing from setup.py\n\nChange-Id: I41c2e29d612ba0b45f94c2340b9a6a3472d5bbdc\nCloses-bug: #1385439\n" }, { "from": "human", "value": "# Copyright 2013 - 2014 Mirantis, Inc.\n#\n# Licensed under t...
python
chosen
[ { "from": "system", "value": "Add 3.8 to the list of supported versions\n" }, { "from": "human", "value": "from setuptools import setup\n\nclassifiers = [\n 'Development Status :: 4 - Beta',\n 'Intended Audience :: Developers',\n 'License :: OSI...
python
chosen
[ { "from": "system", "value": "Set Development Status to Beta" }, { "from": "human", "value": "from setuptools import setup\nimport os\n\ndef read(*names):\n values = dict()\n for name in names:\n filename = name + '.rst'\n if os.path.isfile(filename):\n fd = open(f...
python
chosen
[ { "from": "system", "value": "Use content or README.md as long_description\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='screenplain',\n version='0.9.0',\n description='Convert text file to viewable screenplay.',\n author='...
python
chosen
[ { "from": "system", "value": "Use distutils to avoid external dependencies\n" }, { "from": "human", "value": "from setuptools import setup\nimport sys\n\nsetup(\n name='bbcode',\n version='1.0.5',\n description='A pure python bbcode parser and formatter.',\n author='Dan Watson',\n ...
python
chosen
[ { "from": "system", "value": "Add lower version bound on `\"oedialect\"` dependency\n\nFor some reason readthedocs use an earlier version and fails when trying\nto use it.\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup\n\n\ndef read(fname):\n return open(os.path.jo...
python
chosen
[ { "from": "system", "value": "Upgrade dependency appdirs to ==1.4.2\n" }, { "from": "human", "value": "import os\n\nfrom setuptools import setup\n\nfrom withtool import __version__\n\n\ndef read(fname):\n path = os.path.join(os.path.dirname(__file__), fname)\n with open(path, encoding='utf...
python
chosen
[ { "from": "system", "value": "Make sure the latest pygments is used\n" }, { "from": "human", "value": "try:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptools import setup, find_packages\n\nset...
python
chosen
[ { "from": "system", "value": "Update documentation link on PyPI to flask-script.readthedocs.org\n" }, { "from": "human", "value": "\"\"\"\nFlask-Script\n--------------\n\nFlask support for writing external scripts.\n\nLinks\n`````\n\n* `documentation <http://packages.python.org/Flask-Script>`_\n...
python
chosen
[ { "from": "system", "value": "Revert \"Revert \"Another attempt to fix the RTD build.\"\"\n\nThis reverts commit bb96586af0aa0fcf6ca5b1891740fbc02f3758c8.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nfrom os.path import dirname, abspath\n\nHERE = abspath(dirnam...
python
chosen
[ { "from": "system", "value": "Add peewee dependency for simpledb.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='weaveserver',\n version='0.8',\n author='Srivatsan Iyer',\n author_email='supersaiyanmode.rox@gmail.com',\n packages=f...
python
chosen
[ { "from": "system", "value": "Fix version. Bump minor version, not release version.\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup\n\nsetup(\n name='youltradns',\n version='0.0.2',\n description='Yola UltraDNS Client',\n author='Yola',\n aut...
python
chosen
[ { "from": "system", "value": "Remove CI_COMMIT_TAG requirement, docs can't be built without it\n" }, { "from": "human", "value": "import os\r\n\r\nfrom setuptools import setup\r\nfrom setuptools.command.build_py import build_py\r\n\r\nversion = os.environ.get('CI_COMMIT_TAG', None)\r\n\r\n\r\ncl...
python
chosen
[ { "from": "system", "value": "Remove ipython from test deps as Travis is broken\n" }, { "from": "human", "value": "from setuptools import setup\n\nNAME = \"toxiproxy\"\nVERSION = \"0.1.0\"\nDESCRIPTION = \"Python library for Toxiproxy\"\nLONG_DESCRIPTION = \"\"\"\\\nA Python library for controll...
python
chosen
[ { "from": "system", "value": "Add cuda.requirements to packages to install\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom distutils.core import setup\n\nsetup(\n name='chainer',\n version='1.0.0',\n description='A flexible framework of neural networks',\n author='Seiy...
python
chosen
[ { "from": "system", "value": "Add Python 3 trove classifiers\n\nFixes #46.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\nlong_desc = open('README.rst', 'rb').read().decode('utf-8') + \\\n open('AUTHORS.rst', 'rb').read().decode('utf-8') + \\\n ...
python
chosen
[ { "from": "system", "value": "Add Python3 classfier fo CheeseShop.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# coding: utf-8\n\nfrom distribute_setup import use_setuptools\nuse_setuptools()\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import...
python
chosen
[ { "from": "system", "value": "Fix misconfiguration in static root path computation\n" }, { "from": "human", "value": "import os\n\nAUTOCLAVE_APP_NAME = \"autoclave\"\nAUTOCLAVE_USER_NAME = AUTOCLAVE_APP_NAME\nAUTOCLAVE_DEPLOY_ROOT = os.path...
python
chosen
[ { "from": "system", "value": "Add a logging instance to the package\n" }, { "from": "human", "value": "import mongoengine\n\n# Open a connection to the MongoDB database, to be shared throughout the\n# application.\ndb = mongoengine.connect('lazy', host='127.0.0.1', port=27017)\n" }, { ...
python
chosen
[ { "from": "system", "value": "Add correct path to tests\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\nrequirements = [line.strip() for line in open('requirements.txt').readlines()]\n\nclass P...
python
chosen
[ { "from": "system", "value": "Make all search form fields optional.\n" }, { "from": "human", "value": "from django import forms\n\nimport settings\n\nOUTCOME_CHOICES = settings.EVENT_OUTCOME_CHOICES\nEVENT_TYPE_CHOICES = settings.EVENT_TYPE_CHOICES\n\n\nclass EventSearchForm(forms.Form):\n ou...
python
chosen
[ { "from": "system", "value": "Add paramiko to install_requires since libcloud deploy_node() requires it.\n" }, { "from": "human", "value": "#!/bin/env python\n# -*- coding: utf8 -*-\n\nfrom setuptools import setup\n\nsetup(\n name='fedimg',\n version='0.0.1',\n description='Service to a...
python
chosen
[ { "from": "system", "value": "Include SQL files in the distribution.\n" }, { "from": "human", "value": "#!/usr/bin/python\n\"\"\"Install, build, or test the HXL Proxy.\nFor details, try\n python setup.py -h\n\"\"\"\n\nimport sys, setuptools\n\nif sys.version_info.major != 3:\n raise SystemEx...
python
chosen
[ { "from": "system", "value": "Fix version printing of tags and releases\n" }, { "from": "human", "value": "import github\nimport github_token\nimport repositories\nimport tagsparser\nimport flock\n\n\ndef main():\n g = github.Github(github_token.GITHUB_TOKEN)\n for repo in repositories.REP...
python
chosen
[ { "from": "system", "value": "Use new behavior from newer Invoke\n" }, { "from": "human", "value": "from invoke import Collection\nfrom invocations import docs, testing\n\n\n# TODO: let from_module specify new name\napi = Collection.from_module(docs)\n# TODO: maybe allow rolling configuration in...
python
chosen
[ { "from": "system", "value": "Add class_name property to Token model\n" }, { "from": "human", "value": "from django.core.validators import MaxValueValidator, MinValueValidator\nfrom django.db import models\n\nfrom .conf import PHASES, TOKEN_TYPES\n\n\nclass Token(models.Model):\n public_name ...
python
chosen
[ { "from": "system", "value": "Fix typo in Union initialization exception" }, { "from": "human", "value": "import six\n\nfrom ..utils.is_base_type import is_base_type\nfrom .options import Options\n\n\nclass UnionMeta(type):\n\n def __new__(cls, name, bases, attrs):\n # Also ensure init...
python
chosen
[ { "from": "system", "value": "Use DOTALL flag on regex.\n" }, { "from": "human", "value": "# The contents of this file are subject to the Mozilla Public License\n# Version 2.0 (the \"License\"); you may not use this file except in\n# compliance with the License. You may obtain a copy of the Lice...
python
chosen
[ { "from": "system", "value": "Correct the version number in LiSE too\n" }, { "from": "human", "value": "# This file is part of LiSE, a framework for life simulation games.\n# Copyright (c) Zachary Spector, zacharyspector@gmail.com\nimport sys\nif sys.version_info[0] < 3 or (\n sys.versio...
python
chosen
[ { "from": "system", "value": "Use vivi-Layer since the editor resides on that\n" }, { "from": "human", "value": "# Copyright (c) 2010 gocept gmbh & co. kg\n# See also LICENSE.txt\n\nimport gocept.lxml.interfaces\nimport gocept.selenium.ztk\nimport grokcore.component as grok\nimport zeit.cms.test...
python
chosen
[ { "from": "system", "value": "Add logout url, but it redirects to /admin\n" }, { "from": "human", "value": "\"\"\"voteswap URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nF...
python
chosen
[ { "from": "system", "value": "Add shoot to random AI\n" }, { "from": "human", "value": "import random\n\n\n# define possible actions\ngo_north = 'go north'\ngo_south = 'go south'\ngo_east = 'go east'\ngo_west = 'go west'\n\nrotate_cw = 'rotate cw'\nrotate_ccw = 'rotate ccw'\n\nwait = 'wait'\n\n\...
python
chosen
[ { "from": "system", "value": "Make autodiscover() work with zipped eggs.\n" }, { "from": "human", "value": "import imp\nfrom django.conf import settings\nfrom django.core import exceptions\n\n__all__ = [\"autodiscover\", \"tasks_for_app\", \"find_related_module\"]\n\n\ndef autodiscover():\n \...
python
chosen
[ { "from": "system", "value": "Add very simple client creator validator\n" }, { "from": "human", "value": "import unittest\nfrom ..client import Client\n\nclass TestClient(unittest.TestCase):\n\tdef setUp(self):\n\t\tpass\n\n\tdef tearDown(self):\n\t\tpass\n\n\tdef test_connect(self):\n\t\tpass" ...
python
chosen
[ { "from": "system", "value": "[FIX] partner_industry_Secondary: Make api constrains multi to avoid error when create a company with 2 contacts\n" }, { "from": "human", "value": "# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta\n# Copyright 2016 Tecnativa S.L. - Vicent Cubells\n# Copyrigh...
python
chosen
[ { "from": "system", "value": "Make test match spec more closely\n" }, { "from": "human", "value": "from rembed import response\n\nfrom hamcrest import *\nimport pytest\n\ndef test_should_load_from_dictionary():\n dict = {'title' : 'Bees'}\n oembed_response = response.OEmbedResponse(dict)\n...
python
chosen
[ { "from": "system", "value": "Fix column listing, use double quotes for JSON remove old stuff\n" }, { "from": "human", "value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Give back the columns of a CSV and the in\n# http://www.tutorialspoint.com/python/python_cgi_programming.htm\n\nimport ...
python
chosen
[ { "from": "system", "value": "Remove Agg backend in plot\n\nLooks like applying the Agg backend in the plot_image function disables displaying images in Jupyter because the Agg backed is a non-GUI backend.\n" }, { "from": "human", "value": "# Plot image to screen\nimport os\nimport cv2\nimport n...
python
chosen
[ { "from": "system", "value": "Add fix for sqlite bulk_create breaking with loading lots of points\n" }, { "from": "human", "value": "import csv\n\nfrom chemtools.ml import get_decay_feature_vector\nfrom chemtools.mol_name import get_exact_name\nfrom models import DataPoint\n\n\ndef main(path):\n...
python
chosen
[ { "from": "system", "value": "Make sure a user can only link to one contact\n" }, { "from": "human", "value": "from django.contrib.auth.models import User\nfrom django.test import TestCase\n\nfrom crm.tests.model_maker import (\n make_contact,\n make_user_contact,\n)\nfrom login.tests.mode...
python
chosen
[ { "from": "system", "value": "Replace all occurences of Nomad with Cyborg\n\nThis patch proposes to replace all occurences of\nNomad with Cyborg.\n\nChange-Id: I48a5fc13fd8faa682736d44e6c8cd96eeedaf2e3\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\n# Licensed under the Apache Lice...
python
chosen
[ { "from": "system", "value": "Remove the `import *`. Explicitly import what we want to expose.\n\nBefore __all__ was used to manage these. But it's clearer to\njust import what we want users to see.\n" }, { "from": "human", "value": "\"\"\"\ngraph_objs\n==========\n\nThis package imports definit...
python
chosen
[ { "from": "system", "value": "Change get_preview_image to same as other blocks (because we fix ipl to pil convert for 1-channel images)\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nimport ipfblock\nimport ioport\nimport ipf.ipfblock.processing\nfrom ipf.ipftype.ipfimage3ctype im...
python
chosen
[ { "from": "system", "value": "Disable debug on sample client\n" }, { "from": "human", "value": "\"\"\"This example show a full http server.\n\"\"\"\nfrom flask import Flask\nfrom flask import render_template\nfrom flask import request\n\nimport config\nfrom libs.polybanking import PolyBanking\n\...
python
chosen
[ { "from": "system", "value": "Add 'allow_expired' parameter to LockTokenManager.get_for_object\n" }, { "from": "human", "value": "from django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Manager\n\nfrom lock_tokens.utils import get_oldest_valid_tokens_datetime\n\n...
python
chosen
[ { "from": "system", "value": "Send CSP reports right to apophis.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nimport falcon, util, json, sys, traceback\n\n# Content-security policy reports of frontend\n# Every CSP report is forwarded to ksi-admin@fi.muni.cz.\n# This is testing s...
python
chosen
[ { "from": "system", "value": "settings: Order the batteries by name\n\nEventually we'll want to do better than this, but batinfo doesn't export\nwhat we'd need to do better.\n\nMoving to udev+upower would help, but that's probably something we\nshould do with cockpit anyway.\n" }, { "from": "human",...
python
chosen
[ { "from": "system", "value": "Use one line per import\n" }, { "from": "human", "value": "__copyright__ = \"Copyright oemof developer group\"\n__license__ = \"MIT\"\n__version__ = \"0.2.1dev\"\n\nfrom .wind_turbine import (\n WindTurbine,\n get_turbine_types,\n create_power_curve,\n) # ...
python
chosen
[ { "from": "system", "value": "Switch to RTD docs theme.\n" }, { "from": "human", "value": "extensions = []\ntemplates_path = ['_templates']\nsource_suffix = '.rst'\nmaster_doc = 'index'\nproject = u'django-soapbox'\ncopyright = u'2011-2015, James Bennett'\nversion = '1.1'\nrelease = '1.1'\nexclu...
python
chosen
[ { "from": "system", "value": "Correct history capability for \"Diesel Sweeties (web)\"\n" }, { "from": "human", "value": "from comics.aggregator.crawler import CrawlerBase, CrawlerImage\nfrom comics.core.comic_data import ComicDataBase\n\n\nclass ComicData(ComicDataBase):\n name = \"Diesel Sw...
python
chosen
[ { "from": "system", "value": "Define handler for tracking log files\n" }, { "from": "human", "value": "import sys\nimport time\nfrom watchdog.observers import Observer\nfrom watchdog.events import FileSystemEventHandler \n\nclass TrackingEventHandler(FileSystemEventHandler):\n \n def on_cr...
python
chosen
[ { "from": "system", "value": "Fix remove message object from greeting\n" }, { "from": "human", "value": "from http_client import HttpClient\n \nfrom models.message import ReceivedMessage\n\nclass Bot():\n \"\"\"\n @brief Facebook messenger bot\n \"\"\"\n\n def __init__(self, token):\...
python
chosen
[ { "from": "system", "value": "Use setattr() instead of a direct access to __dict__\n\nCloses Feature Request 3110077 \"new style classes\"\nhttps://sourceforge.net/tracker/?func=detail&aid=3110077&group_id=196342&atid=957075\n" }, { "from": "human", "value": "\"\"\"\nfrom Thinking in Python, Bru...
python
chosen
[ { "from": "system", "value": "Use my own email as the stuff\n" }, { "from": "human", "value": "from .common import *\nimport dj_database_url\n\n# Settings for production environment\nDEBUG = False\n\n# Update database configuration with $DATABASE_URL.\ndb_from_env = dj_database_url.config(conn_m...
python
chosen
[ { "from": "system", "value": "Add default test database name to default settings\n" }, { "from": "human", "value": "import pkg_resources # part of setuptools\n\nUSER_AGENT_NAME = 'bookmarks'\nVERSION_NUMBER = pkg_resources.require('bookmarks')[0].version\nSECRET_KEY = 'development key'\nDATABAS...
python
chosen
[ { "from": "system", "value": "Delete sub folders in log directory\n" }, { "from": "human", "value": "# Copyright (C) 2016 Google Inc.\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n\nimport os\nimport logging\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef cr...
python
chosen
[ { "from": "system", "value": "Test needs skipping if on p3k\n" }, { "from": "human", "value": "from .request_test import test_app\n\n\ndef test_200_for_normal_response_validation():\n settings = {\n 'pyramid_swagger.schema_directory': 'tests/sample_schemas/good_app/',\n 'pyramid...
python
chosen
[ { "from": "system", "value": "Move token handling from tag function to CSSAssetTagNode\n" }, { "from": "human", "value": "from __future__ import absolute_import\nfrom django.template import Node, Library, TemplateSyntaxError\nfrom gears.assets import build_asset\nfrom ..settings import environme...
python
chosen
[ { "from": "system", "value": "Allow batched User lookups by login name\n" }, { "from": "human", "value": "from __future__ import absolute_import, division, print_function\n\nfrom panoptes_client.panoptes import PanoptesObject, LinkResolver\nfrom panoptes_client.utils import isiterable, split\n\n...
python
chosen
[ { "from": "system", "value": "Allow uploading directly to a file\n" }, { "from": "human", "value": "import os\nimport asyncio\n\nfrom tornado.web import HTTPError\n\n\nclass CreateMixin:\n\n def validate_put(self):\n self.name = self.get_query_argument('name') # TODO What does this do...
python
chosen
[ { "from": "system", "value": "feat(linux): Use new staging site names\n" }, { "from": "human", "value": "from .version import __version__\nfrom .version import __majorversion__\nfrom .version import __releaseversion__\nfrom .version import __tier__\n\nif __tier__ == 'alpha':\n # Alpha version...
python
chosen
[ { "from": "system", "value": "Add error and detail field to captcha errors\n" }, { "from": "human", "value": "from functools import wraps\nfrom dateutil.relativedelta import relativedelta\nfrom django.utils import timezone\nfrom rest_framework_captcha.models import Captcha\nfrom rest_framework_c...
python
chosen
[ { "from": "system", "value": "Add `${args}` marker to cmd" }, { "from": "human", "value": "from SublimeLinter.lint import Linter, util\n\n\nclass CSSLint(Linter):\n cmd = 'csslint --format=compact ${temp_file}'\n regex = r'''(?xi)\n ^.+:\\s* # filename\n\n # csslint emits e...
python
chosen
[ { "from": "system", "value": "Make block comment parsing less greedy.\n" }, { "from": "human", "value": "#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Aparajita Fishman\n# Copyright (c) 2013 Aparajita Fishman\n#\n# License: MIT\n#\n\n\...
python
chosen
[ { "from": "system", "value": "Fix missing argument (issue arose from merge)\n" }, { "from": "human", "value": "import httplib as http\nimport json\n\nfrom framework import request\nfrom framework.auth import get_current_user\nfrom framework.auth.decorators import must_be_logged_in\nfrom framewor...
python
chosen
[ { "from": "system", "value": "Fix missing import in contrib script added in [2630]." }, { "from": "human", "value": "#!/usr/bin/env python\n# \n# This script completely migrates a <= 0.8.x Trac environment to use the new\n# default ticket model introduced in Trac 0.9.\n# \n# In particular, this ...
python
chosen
[ { "from": "system", "value": "Add GridFSImagesPipeline.from_settings to use MONGO_URI\n" }, { "from": "human", "value": "from scrapy.pipelines.images import ImagesPipeline\n\nfrom .files import GridFSFilesPipeline\n\n\nclass GridFSImagesPipeline(ImagesPipeline, GridFSFilesPipeline):\n \"\"\"\...
python
chosen
[ { "from": "system", "value": "mpd: Add TODO for handling unknown outpitid\n" }, { "from": "human", "value": "from __future__ import unicode_literals\n\nfrom mopidy.frontends.mpd.protocol import handle_request\n\n\n@handle_request(r'^disableoutput \"(?P<outputid>\\d+)\"$')\ndef disableoutput(cont...
python
chosen
[ { "from": "system", "value": "Remove loading of requirements from pip-requires\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n# Dirty requirements loads\nrequirements = []\nwith open('pip-requires') as f:\n requirements = f.read().splitlines()\n\ndesc = ''\n...
python
chosen
[ { "from": "system", "value": "Add long description to PYPI project page\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nimport sys, os\n\nNAME = \"markovify\"\nHERE = os.path.abspath(os.path.dirname(__file__))\n\nversion_ns = {}\nwith open(os.path.join(HERE, NAME,...
python
chosen
[ { "from": "system", "value": "Remove requirement to have version number in two places\n" }, { "from": "human", "value": "from setuptools import find_packages, setup\n\n\nsetup(\n name='tchannel',\n version='0.20.2.dev0',\n author=', '.join([\n 'Abhinav Gupta',\n 'Aiden Sca...
python
chosen
[ { "from": "system", "value": "Use custom version of core\n" }, { "from": "human", "value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='OpenFisca-Country-Template',\n version='0.1.0',\n author='OpenFisca Team',\n ...
python
chosen
[ { "from": "system", "value": "Exclude test project from package - round 2\n\nAlso change development status to Alpha\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nimport django_cassandra_engine as meta\n\nDESCRIPTION = 'Cassandra backend for Django-nonrel'\nLO...
python
chosen