conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Tweak ECDC scraper to strip whitespace\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport requests\nimport lxml.html\nimport pandas as pd\nimport sys\n\nURL = \"http://ecdc.europa.eu/en/healthtopics/zika_virus_infection/zika-outbreak/Pages/Zika-countri... | python | chosen |
[
{
"from": "system",
"value": "Change test_fixture_load to check for rescanned placeholders\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport tempfile\nimport codecs\n\ntry:\n from cStringIO import StringIO\nexcept:\n from io import StringIO\n\nfrom django.core.management i... | python | chosen |
[
{
"from": "system",
"value": "Add explicit usage of backend\n"
},
{
"from": "human",
"value": "from .page import Page\nimport six\nfrom bs4 import UnicodeDammit, BeautifulSoup\n# from lxml.etree import fromstring\n\n\ndef parse(source):\n \"\"\"Parse a HOCR stream into page elements.\n\n @... | python | chosen |
[
{
"from": "system",
"value": "Update Django Admin interface to allow editing of Categories\n"
},
{
"from": "human",
"value": "## Django Admin\nfrom django.contrib import admin\n\nfrom wishlist.models import Item\n\n#admin.site.register( Category )\n#admin.site.register( Item )\n\nclass ItemAdmin... | python | chosen |
[
{
"from": "system",
"value": "Add decorator for runner signals\n"
},
{
"from": "human",
"value": "class IgnoreRawDecorator(object):\n \"\"\"The `IgnoreRawDecorator` is a decorator to ignore raw/fixture data during signals handling.\n\n usage example:\n @receiver(post_save, sender=se... | python | chosen |
[
{
"from": "system",
"value": "Fix an actual schema validation error in one of the tests\n"
},
{
"from": "human",
"value": "import pytest\n\nimport python_jsonschema_objects as pjo\n\n\n@pytest.fixture\ndef test_class():\n schema = {\n 'title': 'Example',\n 'properties': {\n ... | python | chosen |
[
{
"from": "system",
"value": "Add test for copying rules with their labels and annotations\n"
},
{
"from": "human",
"value": "from unittest import mock\nfrom django.test import TestCase\n\nfrom promgen import models, prometheus\n\n\n_RULES = '''\n# Service: Service 1\n# Service URL: /service/1/\... | python | chosen |
[
{
"from": "system",
"value": "Add missing import and explanation of failure\n"
},
{
"from": "human",
"value": "import numpy as np\n\ntry:\n import statsmodels.api as sm\nexcept ImportError:\n sys.exit(0)\n\nfrom pymc import *\n\n# Generate data\nsize = 50\ntrue_intercept = 1\ntrue_slope = ... | python | chosen |
[
{
"from": "system",
"value": "Remove -DDWT_USE_HEADER_BAR from YCM configuration\n\nThe option does not exist anymore, so there is no reason to keep\nit around.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n# vim:fenc=utf-8\n#\n# Copyright © 2014 Adrian Pere... | python | chosen |
[
{
"from": "system",
"value": "Fix problem with finding sample name from fastqc_screen output\n"
},
{
"from": "human",
"value": "import sys\nimport os\n\nheader = ['Mouse_single', 'Mouse_multiple', 'Human', 'Other', 'Unmapped']\nprint '\\t'.join(header)\nfor fi in sys.argv[1:]:\n sample = os.p... | python | chosen |
[
{
"from": "system",
"value": "Add support for the verify_ssl, ca_certs and timeout parameters for the request transport.\n"
},
{
"from": "human",
"value": "\"\"\"\nraven.transport.requests\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.\n:... | python | chosen |
[
{
"from": "system",
"value": "Handle test environment with no real stdin\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom .platforms import platform\n\n__platform = platform()\ngetkey = __platform.getkey\nkeys = __platform.keys\nkey = keys # alias\nbang = __platfo... | python | chosen |
[
{
"from": "system",
"value": "Return self in Pipeline add_after and add_before\n"
},
{
"from": "human",
"value": "class Pipeline(object):\n \"\"\"Defines a pipeline for transforming sequence data.\"\"\"\n\n def __init__(self, convert_token=None):\n if convert_token is not None:\n ... | python | chosen |
[
{
"from": "system",
"value": "Use POST instead of GET Request for ES Search API (Issue with query string size)\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom future.builtins import ( # noqa\n bytes, dict, int, list, object, range, str,\n ascii, chr, hex, i... | python | chosen |
[
{
"from": "system",
"value": "Allow compilation even in debug mode\n"
},
{
"from": "human",
"value": "import os\nimport subprocess\nimport tempfile\n\nfrom webassets.filter import Filter\nfrom webassets.exceptions import FilterError\n\n\n__all__ = ('TypeScript',)\n\n\nclass TypeScript(Filter):\n... | python | chosen |
[
{
"from": "system",
"value": "Remove unused class method `Scope.for_global`\n"
},
{
"from": "human",
"value": "\"\"\"\nbyceps.services.snippet.transfer.models\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2020 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for details.\... | python | chosen |
[
{
"from": "system",
"value": "Allow for getting a settings value from a single server in the enviroment\n"
},
{
"from": "human",
"value": "# Amara, universalsubtitles.org\n# \n# Copyright (C) 2012 Participatory Culture Foundation\n# \n# This program is free software: you can redistribute it and/... | python | chosen |
[
{
"from": "system",
"value": "Remove unused pullquote block type\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, unicode_literals\n\n\n# http://stackoverflow.com/a/22723724/1798491\nclass Enum(object):\n def __init__(self, *elements):\n self.elements = tuple(... | python | chosen |
[
{
"from": "system",
"value": "Add category info to part serializer\n\n"
},
{
"from": "human",
"value": "from rest_framework import serializers\n\nfrom .models import Part\n\n\nclass PartSerializer(serializers.ModelSerializer):\n \"\"\" Serializer for complete detail information of a part.\n ... | python | chosen |
[
{
"from": "system",
"value": "Initialize call_in_campaign_id column after adding\n"
},
{
"from": "human",
"value": "\"\"\"Add call_in_campaign_id to TwilioPhoneNumber\n\nRevision ID: 38f01b0893b8\nRevises: 3c34cfd19bf8\nCreate Date: 2016-10-21 18:59:13.190060\n\n\"\"\"\n\n# revision identifiers,... | python | chosen |
[
{
"from": "system",
"value": "Correct return of Terminal instance when parameter is string\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\r\n\"\"\"\r\n:Author Patrik Valkovic\r\n:Created 23.06.2017 16:39\r\n:Licence GNUv3\r\nPart of grammpy\r\n\r\n\"\"\"\r\n\r\nfrom .RawGrammar import ... | python | chosen |
[
{
"from": "system",
"value": "Use the root_page.depth to determine filter value to identify section root pages\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport logging\n\nfrom django.core.management.base import BaseCommand\n\nfrom wagtail.wagtailcore.models import Site\nfrom wa... | python | chosen |
[
{
"from": "system",
"value": "Whitelist nacl_integration tests to run on new nacl integration bot.\n\nBUG= none\nTEST= none\n\n\nReview URL: http://codereview.chromium.org/7050026\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@86021 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "huma... | python | chosen |
[
{
"from": "system",
"value": "Fix tests in Windows: decoded_filename contains backslashes\n\nSigned-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>\n"
},
{
"from": "human",
"value": "import pytest\nfrom gi.repository import GLib\n\nfrom gaphor.services.eventmanager import Eve... | python | chosen |
[
{
"from": "system",
"value": "Add test for same node check\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom livemark.diff import _is_same_node, _next_noempty\n\nfrom wdom.tests.util import TestCase\nfrom wdom.parser import parse_html\n\n\nclass TestSameN... | python | chosen |
[
{
"from": "system",
"value": "FIX stock transfer restrict lot when lost is reserved\n"
},
{
"from": "human",
"value": "from openerp import models, fields, api, _\nfrom openerp.exceptions import UserError\n\n\nclass StockPackOperation(models.Model):\n\n _inherit = 'stock.pack.operation'\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix unittests broken after ORM adoption\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport unittest\n\nfrom parsemypsa.storage import objects\n\n\nclass TripTestCase(unittest.TestCase):\n def setUp(self):\n self.trip1 = objects.Trip.create(... | python | chosen |
[
{
"from": "system",
"value": "Test if a project exists, load or 404 accordingly\n"
},
{
"from": "human",
"value": "import projects\nfrom flask import Flask, render_template\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n project_list = projects.get_projects()\n return render_te... | python | chosen |
[
{
"from": "system",
"value": "Change __version__ to dev until we tag\n\nThis is for sphinx linkcode links to work on our API page.\n"
},
{
"from": "human",
"value": "__title__ = 'tmuxp'\n__package_name__ = 'tmuxp'\n__version__ = '1.4.0'\n__description__ = 'tmux session manager'\n__email__ = 'ton... | python | chosen |
[
{
"from": "system",
"value": "Set title to 'Assignment' in student dashboard\n"
},
{
"from": "human",
"value": "from django.utils.translation import ugettext as _\nfrom django.utils.safestring import mark_safe\nfrom django.core.urlresolvers import reverse\n\nfrom devilry.addons.dashboard.dashboa... | python | chosen |
[
{
"from": "system",
"value": "Remove action_runner steps for worldjournal pageset to prevent crashes\n\nBUG=skia:3196\nNOTRY=true\n\nReview URL: https://codereview.chromium.org/795173002\n"
},
{
"from": "human",
"value": "# Copyright 2014 The Chromium Authors. All rights reserved.\n# Use of this... | python | chosen |
[
{
"from": "system",
"value": "Fix compatibility with Python 2.5\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013 Alexander Shorin\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part... | python | chosen |
[
{
"from": "system",
"value": "Add hypothesis test to test assignment\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom __future__ import division, print_function\nimport pytest\n\nimport sys\n# Add Spectrum location to path\nsys.path.append('../')\nimport Spectrum\n\n# Test using ... | python | chosen |
[
{
"from": "system",
"value": "Rename example foo method to hello and run in debug\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# encoding: utf-8\n\n\"\"\"\nA Simple Example Flask Application\n==================================\n\"\"\"\n\n# Third Party Libs\nfrom flask import Flask\n... | python | chosen |
[
{
"from": "system",
"value": "Add new channel name for test.\n"
},
{
"from": "human",
"value": "import os, os.path\nimport ConfigParser\n\npackage = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))\nimport slack\n\n\nclass TestSlack(object):\n def setup(self):\n self.set_... | python | chosen |
[
{
"from": "system",
"value": "Fix the random truncated distribution tests\n"
},
{
"from": "human",
"value": "\n# This should plot a histogram looking like a gaussian\n# ... It does.\n\n## CONFIGURATION (play with different values)\n\nsamples = int(1e6)\n\nminimum = 1.\nmaximum = 17.\ncenter = 7.... | python | chosen |
[
{
"from": "system",
"value": "Add active-task display and scrolling\n\nThis adds an option allowing you to specify\n\"taskwarrior.show_active=true\" in your bar configuration and will\ndisplay the current, active task id and description on the status bar, but will show the\nnumber of pending tasks if one is... | python | chosen |
[
{
"from": "system",
"value": "Define actions and auth functions\n"
},
{
"from": "human",
"value": "import ckan.plugins as plugins\nimport ckan.plugins.toolkit as toolkit\n\nfrom ckanext.requestdata.model import setup as model_setup\n\n\nclass RequestdataPlugin(plugins.SingletonPlugin):\n plug... | python | chosen |
[
{
"from": "system",
"value": "Feature: Use api/v2 instead of drf_api/\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.contrib import admin\nfrom django... | python | chosen |
[
{
"from": "system",
"value": "Add workaround for conda python\n\nPython versions that come with conda for Windows\ndo not load .dlls in the same way as standard\npython versions.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport os\nimpo... | python | chosen |
[
{
"from": "system",
"value": "Add delete old sessions command\n"
},
{
"from": "human",
"value": "from datetime import datetime\n\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.sessions.models import Session\n\n\"\"\"\n>>> def clean(count):\n... for idx, s in enumerat... | python | chosen |
[
{
"from": "system",
"value": "Fix up mixpanel course tracking\n"
},
{
"from": "human",
"value": "from modules.mixpanel.mixpanel import track_event_mixpanel\nfrom modules.decorators import view, query, event_handler\nimport re\n\nSINGLE_PAGES_TO_TRACK = ['/', '/dashboard', '/create_account']\nREG... | python | chosen |
[
{
"from": "system",
"value": "Add some extra item methods / parameters to LatestEntriesFeed\n"
},
{
"from": "human",
"value": "from django.contrib.syndication.views import Feed\nfrom django.utils import timezone\n\n\nclass LatestEnteriesFeed(Feed):\n description = \"Latest news\"\n\n def i... | python | chosen |
[
{
"from": "system",
"value": "Fix handling of create_sample command on dev API endpoint\n\nThis was completely broken."
},
{
"from": "human",
"value": "from logging import getLogger\n\nfrom virtool.api.response import no_content\nfrom virtool.fake.wrapper import FakerWrapper\nfrom virtool.http.r... | python | chosen |
[
{
"from": "system",
"value": "Use dict comprehension instead of dict([...])\n"
},
{
"from": "human",
"value": "'Accounts'\nfrom __future__ import unicode_literals\n\nfrom .... import ProResource, RelatedResourceMixin\nimport six\nimport sys\n\n\nclass Account(RelatedResourceMixin, ProResource):\... | python | chosen |
[
{
"from": "system",
"value": "Add 2FA field, use localized labels in UserAdmin\n"
},
{
"from": "human",
"value": "from django.contrib.auth.admin import UserAdmin\n\nfrom .forms import UserCreationForm, UserChangeForm\n\n\nclass UserAdmin(UserAdmin):\n form = UserChangeForm\n add_form = Use... | python | chosen |
[
{
"from": "human",
"value": "widgets: Load all widgets when 'widgets' module is loaded.\n"
},
{
"from": "gpt",
"value": "from os.path import dirname, basename, isfile\nimport glob\n\nexcepts = ['__init__', 'widget']\n# Find all *.py files and add them to import\nmodules = [basename(f)[:-3] for f... | python | chosen |
[
{
"from": "system",
"value": "Write log file from unit tests\n"
},
{
"from": "human",
"value": "from dh_syncserver import config\nfrom dh_syncserver import models\nfrom dh_syncserver import database\n\nfrom twisted.trial import unittest\nfrom twisted.enterprise import adbapi\nfrom twisted.intern... | python | chosen |
[
{
"from": "system",
"value": "Rename referral portal -> Acute admissions\n"
},
{
"from": "human",
"value": "\"\"\"\nReferral routes for OPAL acute\n\"\"\"\nfrom referral import ReferralRoute\n\nfrom acute import models\n\n\nclass ClerkingRoute(ReferralRoute):\n name = 'Acute Take'\n ... | python | chosen |
[
{
"from": "system",
"value": "Join callback lists returned from backends\n"
},
{
"from": "human",
"value": "from django.utils.module_loading import import_string\n\n\ndef _get_backends():\n backends = []\n for backend_path in ['mama_cas.services.backends.SettingsBackend']:\n backend... | python | chosen |
[
{
"from": "system",
"value": "Change the default lower bound.\n"
},
{
"from": "human",
"value": "import argparse\n\n\nfrom lenrmc.nubase import System\n\n\nclass App(object):\n\n def __init__(self, **kwargs):\n self.kwargs = kwargs\n\n def run(self):\n s = System.parse(self.k... | python | chosen |
[
{
"from": "system",
"value": "Fix out dir in report\n"
},
{
"from": "human",
"value": "import os\nimport shutil\nimport logging\n\n#try:\n# from bcbio.install import _set_matplotlib_default_backend\n# _set_matplotlib_default_backend()\n#except (ImportError, OSError, IOError):\n# pass\n#... | python | chosen |
[
{
"from": "system",
"value": "Swap out hard tabs for spaces"
},
{
"from": "human",
"value": "\"\"\"\nLaunch the Python script on the command line after\nsetuptools is bootstrapped via import.\n\"\"\"\n\n# Note that setuptools gets imported implicitly by the\n# invocation of this script using pyt... | python | chosen |
[
{
"from": "system",
"value": "Add a PostForm for posting a news story\n"
},
{
"from": "human",
"value": "from flask.ext.wtf import Form\nfrom wtforms import StringField, TextAreaField, SubmitField\nfrom wtforms.validators import Required, Length, Email, Optional\n\nclass ProfileForm(Form):\n na... | python | chosen |
[
{
"from": "system",
"value": "Change default query cost calculation interaction type to \"basic\"\n"
},
{
"from": "human",
"value": "# -*- coding: latin-1 -*-\n'''\nCreated on 3.10.2012\n\n@author: Teemu Pkknen\n'''\n\ndef get_callback_map():\n\n AVG_AUTOCOMPLETE_INPUT_LENGTH = 5\n\n def get_c... | python | chosen |
[
{
"from": "system",
"value": "Add logging filter for checking that the app is actually deployed\n\n(imported from commit 77bd7e008fdea4033e18a91d206999f9714e0f74)\n"
},
{
"from": "human",
"value": "import logging\nimport traceback\nfrom hashlib import sha256\nfrom datetime import datetime, timed... | python | chosen |
[
{
"from": "system",
"value": "Add missing \"requires\" to spacy tokenizer\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport typing\nfrom typing impor... | python | chosen |
[
{
"from": "system",
"value": "Add a tiny bit of output\n"
},
{
"from": "human",
"value": "# The import tests in here should be only those that\n# 1. Require an X11 display on linux\n\ntest_imports = [\n 'pyglet.font',\n 'pyglet.gl',\n 'pyglet.graphics',\n 'pyglet.image',\n 'pyglet... | python | chosen |
[
{
"from": "system",
"value": "Read python package version from node package.json\n"
},
{
"from": "human",
"value": "import setuptools\nfrom src.land_registry_elements.version import Version\n\n\nsetuptools.setup(name='land-registry-elements',\n version=Version('1.0.4').number,\n ... | python | chosen |
[
{
"from": "system",
"value": "feat: Add hook.name function for inferring hook names\n"
},
{
"from": "human",
"value": "\"\"\"Hooks for various events.\"\"\"\n# Copyright (c) 2012-2022 Wibowo Arindrarto <contact@arindrarto.dev>\n# SPDX-License-Identifier: BSD-3-Clause\n\nimport sys\nimport struct... | python | chosen |
[
{
"from": "system",
"value": "Include non-py files in the final package too\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom os import path\n\nfrom setuptools import setup, find_packages\n\n\nhere = path.abspath(path.dirname(__file__))\n\nwith open(path.join(here, 'README.md'), e... | python | chosen |
[
{
"from": "system",
"value": "Change install_requires from yaml to pyYAML"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='role2rdme',\n version='0.1',\n description='Script to generate md table from Ansible role',\n url='https://github.com/RcRonco/role... | python | chosen |
[
{
"from": "system",
"value": "Advance the minor version to reflect the bug fixes\n"
},
{
"from": "human",
"value": "#from distutils.core import setup\nfrom setuptools import setup\n\nsetup(\n name='django-auth_mac',\n version='0.1.1',\n description=\"Basic Django implementation of the d... | python | chosen |
[
{
"from": "system",
"value": "Use a placeholder string instead of a README.\n\nUntil I work out why README.rst isn't being included, use this.\n"
},
{
"from": "human",
"value": "import setuptools\n\nREQUIREMENTS = [\n \"docopt==0.6.1\",\n \"feedparser==5.1.3\",\n \"jabberbot==0.15\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Use the right case for the package name\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup, Command\n\n\nclass TestDiscovery(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def fina... | python | chosen |
[
{
"from": "system",
"value": "Use nose to run the testsuite.\n"
},
{
"from": "human",
"value": "\"\"\"Setup module for txrudp.\"\"\"\n\nimport codecs\nfrom os import path\nimport sys\n\nfrom setuptools import setup\n\n\n_HERE = path.abspath(path.dirname(__file__))\nwith codecs.open(path.join(_HE... | python | chosen |
[
{
"from": "system",
"value": "Move NumPy dependency to optional rastertoolz dependency\n"
},
{
"from": "human",
"value": "import os.path\n\nfrom ez_setup import use_setuptools\nuse_setuptools()\n\nfrom setuptools import setup, find_packages\n\n# read README as the long description\nreadme = 'REA... | python | chosen |
[
{
"from": "system",
"value": "Fix encoding error happening on some Windows servers\n\nFix error causing: “UnicodeDecodeError: 'charmap' codec can't decode\nbyte 0x9d”\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\ndef readme():\n with open('README.rst') as f:\n re... | python | chosen |
[
{
"from": "system",
"value": "Add mozfile to the dependency list\n"
},
{
"from": "human",
"value": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2... | python | chosen |
[
{
"from": "system",
"value": "Decrease the bound on cffi\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\n\nsetup(name='Robot Daemon',\n version='1.0',\n description='Daemon for vision code for Source Bots',\n author='SourceBots',\n ... | python | chosen |
[
{
"from": "system",
"value": "Increment version for new max_dBFS property"
},
{
"from": "human",
"value": "__doc__ = \"\"\"\nManipulate audio with an simple and easy high level interface.\n\nSee the README file for details, usage info, and a list of gotchas.\n\"\"\"\n\nfrom setuptools import set... | python | chosen |
[
{
"from": "system",
"value": "Fix packaging of data files\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"openslides-gui\",\n version=\"1.0.0dev1\",\n description=\"GUI frontend for openslides\",\n long_description=\"\", # TODO\n u... | python | chosen |
[
{
"from": "system",
"value": "Prepare for 0.1.1 small improvement release\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nimport os.path\nhere = os.path.abspath(os.path.dirname(__file__))\n\ntry:\n with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:\n ... | python | chosen |
[
{
"from": "system",
"value": "Convert Version number into a decimal seperated string\n"
},
{
"from": "human",
"value": "\"\"\"Setup for to_words package.\"\"\"\nfrom setuptools import setup, find_packages\n\nfrom wordsapp import AUTHOR, VERSION\n\nname = 'words_app'\n\nversion = VERSION\n\nsetup... | python | chosen |
[
{
"from": "system",
"value": "Change name: visioimg -> visioemb_rst\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='visioimg',\n version='1.0.0',\n author='Yassu',\n author_email='yassumath@gmail.com',\n url='https://github.com/yassu/VisioInRst',\... | python | chosen |
[
{
"from": "system",
"value": "Remove version for now, since it's messing up beta deployment.\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\nfrom hxl_proxy import __ver... | python | chosen |
[
{
"from": "system",
"value": "Remove bake.py console script entry point\n\nbake.py no longer exists.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom setuptools import setup, find_packages\n\nlong_desc = \"\"\"\nTransform Excel spreadsheets\n\"\"\"\n# See https://p... | python | chosen |
[
{
"from": "system",
"value": "Fix the required package name\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom distutils.core import setup\n\nversion = \"0.0.1\"\n\nsetup(\n name = 'homer',\n packages = ['homer'],\n license = 'MIT',\n version = version,\n descriptio... | python | chosen |
[
{
"from": "system",
"value": "Bump version number for future release.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup (\n name = 'hypnotoad',\n version = '0.1.1',\n author = 'Jon Bringhurst',\n author_email ... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Try less than 2.0.\"\n\nThis reverts commit 1bffae34a767e56943bb83027719fbe6dffcdc3b.\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()\n\n# allow setup.p... | python | chosen |
[
{
"from": "system",
"value": "Add PyPI classifiers and additional metadata.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\nimport os\nfrom setuptools import setup, find_packages\n\nassert sys.version_info >= (2, 6), 'We only support Python 2.6+'\n\nsys.path.insert(0, os.... | python | chosen |
[
{
"from": "system",
"value": "Remove requirement for lxml (it's compiled/installed as a system package)\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport os\n\nversion = '1.0'\n\nsetup(name='rhaptos.cnxmlutils',\n version=version,\n description=\"\"... | python | chosen |
[
{
"from": "system",
"value": "Add s3cmd to the list of requirements.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = open('VERSION').read().strip()\n\nsetup(\n name=\"btw-backup\",\n version=version,\n packages=find_packages(),\n entry_poin... | python | chosen |
[
{
"from": "system",
"value": "Fix URL to renamed github repo.\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup\n\ndef read(*paths):\n \"\"\"Build a file path from *paths* and return the contents.\"\"\"\n with open(os.path.join(*paths), 'r') as f:\n return... | python | chosen |
[
{
"from": "system",
"value": "Make the API read only unless authenticated.\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\nfrom .models import Resource\nfrom .serializers import ResourceSerializer\nfrom rest_framework import generics\n\n\nclass ResourceList(generics.ListC... | python | chosen |
[
{
"from": "system",
"value": "Fix error when run as script\n\nChange method call from alexa_list(), which is undefined, to top_list()\n"
},
{
"from": "human",
"value": "\"\"\"\nThis script downloads the alexa top 1M sites, unzips it, and reads the CSV and\nreturns a list of the top N sites.\n\"\... | python | chosen |
[
{
"from": "system",
"value": "Remove create_wrapper from the API\n"
},
{
"from": "human",
"value": "\"\"\" Simphony engine module\n\nThis module is dynamicaly populated at import with the\nregistered plugins modules. Plugins modules need to be\nregistered at the 'simphony.engine' entry point.\n\... | python | chosen |
[
{
"from": "system",
"value": "Refactor to better inject values into path items\n"
},
{
"from": "human",
"value": "import os\nimport subprocess\nimport sys\nimport signal\n\n\ndef _build_env(target):\n\t\"\"\"\n\tPrepend target to PYTHONPATH\n\t\"\"\"\n\tenv = dict(os.environ)\n\tsuffix = env.get... | python | chosen |
[
{
"from": "system",
"value": "Break if the collection is sorted\n"
},
{
"from": "human",
"value": "\"\"\"\nThis is pure python implementation of bubble sort algorithm\n\nFor doctests run following command:\npython -m doctest -v bubble_sort.py\nor\npython3 -m doctest -v bubble_sort.py\n\nFor manu... | python | chosen |
[
{
"from": "system",
"value": "Remove unused trait definitions in test.\n"
},
{
"from": "human",
"value": "from traits.testing.unittest_tools import unittest\n\nfrom traits.api import Float, HasTraits, Int, List\n\n\nclass Foo(HasTraits):\n x = Float\n\n x_changes = List\n y_changes = Li... | python | chosen |
[
{
"from": "system",
"value": "Change plotDipole to return html instead of saving it as a file\n"
},
{
"from": "human",
"value": "\"\"\"\nanalysis/rxd.py\n\nFunctions to plot and analyze RxD-related results\n\nContributors: salvadordura@gmail.com\n\"\"\"\nfrom __future__ import unicode_literals\n... | python | chosen |
[
{
"from": "system",
"value": "Disable markov until further optimization\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom functools import wraps\nfrom pollirio import reactors\n\nimport re\n\ndef expose(text, args=None):\n def decorator(fn):\n reactors[text] = {\"func\... | python | chosen |
[
{
"from": "system",
"value": "Revert \"remove erroneous items() call\"\n\nThis reverts commit 8c6a79f668901dad2a0c47fa80a6ccbd1264066b.\n"
},
{
"from": "human",
"value": "\nclass WitEmulator(object):\n def __init__(self):\n self.name='wit'\n\n def normalise_request_json(self,data):\... | python | chosen |
[
{
"from": "system",
"value": "mpi4py.futures: Fix backward compatibility exception types\n"
},
{
"from": "human",
"value": "# Author: Lisandro Dalcin\n# Contact: dalcinl@gmail.com\n\n# pylint: disable=unused-import\n# pylint: disable=redefined-builtin\n# pylint: disable=missing-module-docstring... | python | chosen |
[
{
"from": "system",
"value": "Fix permission table creation migration\n"
},
{
"from": "human",
"value": "\"\"\"Add permissions\n\nRevision ID: 29a56dc34a2b\nRevises: 4fdf1059c4ba\nCreate Date: 2012-09-02 14:06:24.088307\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrevision = '29a56dc34a2... | python | chosen |
[
{
"from": "system",
"value": "Test existing config schema members\n"
},
{
"from": "human",
"value": "import mock\n\nfrom mopidy_spotify import Extension, backend as backend_lib\n\n\ndef test_get_default_config():\n ext = Extension()\n\n config = ext.get_default_config()\n\n assert '[spo... | python | chosen |
[
{
"from": "system",
"value": "Add further tests for add_node\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\nimport pytest\n\nfrom graph import Graph\n\n\n@pytest.fixture()\ndef graph_empty():\n g = Graph()\n return g\n\n\n@pytest.fixture()\ndef graph_filled():\... | python | chosen |
[
{
"from": "system",
"value": "Use UUID as primary key of PodcastUpdateResult\n"
},
{
"from": "human",
"value": "from datetime import datetime\n\nfrom django.db import models\n\nfrom mygpo.podcasts.models import Podcast\n\n\nclass PodcastUpdateResult(models.Model):\n \"\"\" Results of a podcas... | python | chosen |
[
{
"from": "system",
"value": "Implement relative path (use loadname) for Templates\n"
},
{
"from": "human",
"value": "def linebreak_iter(template_source):\n yield 0\n p = template_source.find('\\n')\n while p >= 0:\n yield p + 1\n p = template_source.find('\\n', p + 1)\n ... | python | chosen |
[
{
"from": "system",
"value": "common: Allow to register unnamed django views\n"
},
{
"from": "human",
"value": "# Copyright (C) 2017-2018 The Software Heritage developers\n# See the AUTHORS file at the top-level directory of this distribution\n# License: GNU General Public License version 3, or... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.