conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Call au lieu de Popen pour synchroniser\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# traitement global des fichiers wav\nimport os,numpy,octaveIO,string,subprocess\n\n\n\ndef createDataFiles():\n if not os.path.exists('data'):\n os.makedir... | python | chosen |
[
{
"from": "system",
"value": "Add monkeypatch to prevent connection closing for memcachier\n"
},
{
"from": "human",
"value": "\"\"\"\nWSGI config for standup project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttp... | python | chosen |
[
{
"from": "system",
"value": "Add test cases for client lib. Need to support specifying push attributes.\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom opendiamond.client.rpc import ControlConnection, BlastConnection\n\nTEST_HOST = '128.2.209.111'\n\n\nclass ClientRPC(unittest.TestCa... | python | chosen |
[
{
"from": "system",
"value": "Use normal function instead of lambda for this\n"
},
{
"from": "human",
"value": "import asyncio\n\nfrom pytest import mark, raises\nfrom oshino.run import main\nfrom mock import patch\n\n\ndef create_loop():\n loop = asyncio.new_event_loop()\n asyncio.set_eve... | python | chosen |
[
{
"from": "system",
"value": "Fix sqlite test on CentOS\n"
},
{
"from": "human",
"value": "import testinfra.utils.ansible_runner\n\ntestinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(\n '.molecule/ansible_inventory').get_hosts('sqlite')\n\n\ndef test_package(Package):\n p = Pac... | python | chosen |
[
{
"from": "system",
"value": "TYP: Update type annotations to reference package names in full\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nfsictools\n=========\nSupporting tools for FSIC-based economic models. See the individual docstrings\nfor dependencies additional to t... | python | chosen |
[
{
"from": "system",
"value": "Create a properly configured SSL Context"
},
{
"from": "human",
"value": "\nfrom OpenSSL.SSL import Context, TLSv1_METHOD\nfrom twisted.internet.ssl import ContextFactory\nfrom txsni.only_noticed_pypi_pem_after_i_wrote_this import (\n certificateOptionsFromPileOf... | python | chosen |
[
{
"from": "human",
"value": "Add utility view for static pages\n"
},
{
"from": "gpt",
"value": "import os\n\nfrom django.views.generic import TemplateView\n\n\nclass PageView(TemplateView):\n def get_template_names(self):\n return [os.path.join('pages', self.args[0] + '.html')]\n\n ... | python | chosen |
[
{
"from": "system",
"value": "EX: Add seed to example and use stationary coefs\n"
},
{
"from": "human",
"value": "\"\"\"\nAutoregressive Moving Average (ARMA) Model\n\"\"\"\nimport numpy as np\nimport statsmodels.api as sm\n\n# Generate some data from an ARMA process\nfrom statsmodels.tsa.arima_... | python | chosen |
[
{
"from": "system",
"value": "Improve import logic for clearer error messages\n"
},
{
"from": "human",
"value": "class Importer(object):\n def __init__(self):\n self.update_dict = {}\n self.ignore = [\"docs\"]\n\n def import_subpackages(self, path):\n import os\n ... | python | chosen |
[
{
"from": "system",
"value": "Locators: Fix angle flips with a Euler filter"
},
{
"from": "human",
"value": "import re\n\nfrom maya import cmds\n\nfrom . import context\n\n\ndef transfer_global_transforms(dst_to_src, time_range=None):\n \"\"\"Bake global transform from one node onto another.\... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Don't check INTEGRATION_TESTS env var in external libs test\"\n\nThis reverts commit 648d02fbfca79241a65902f6dd9a7a767a0f633d.\n"
},
{
"from": "human",
"value": "import unittest\nfrom test.util import ykman_cli\n\n\nclass TestExternalLibraries(unittest.Test... | python | chosen |
[
{
"from": "system",
"value": "Increase blog slug max length\n"
},
{
"from": "human",
"value": "from datetime import datetime\n\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pinax.apps.blog.models import Post\n\n\n\nclass BlogForm(forms.ModelForm):\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove requirement for Python 3+"
},
{
"from": "human",
"value": "import sys\nfrom setuptools import setup\n\nif sys.version_info[:2] < (3, 1):\n sys.exit('raven-bash requires Python 3.1 or higher.')\n\nlong_description = '''\\\nRaven Sentry client for Bash.\n\nL... | python | chosen |
[
{
"from": "system",
"value": "Bump version to fix build\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n long_description = open('README.md').read()\n\nset... | python | chosen |
[
{
"from": "system",
"value": "Return constructed URL for each result.\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\nfrom ord_hackday.search.models import Portal\nimport requests\nimport json\n\n\ndef search(request):\n c = {}\n\n if 'query' in request.GET:\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove print statement from PaxNode config method\n\n"
},
{
"from": "human",
"value": "# coding: latin-1\n\n\"\"\"\npax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node.\n\"\"\"\n\nfrom mininet.node import Node\nfrom mi... | python | chosen |
[
{
"from": "system",
"value": "Add citation to TAS docs\n"
},
{
"from": "human",
"value": "\"\"\"This module provides and API and processor to the Target Affinity Spectrum\ndata set compiled by N. Moret in the Laboratory of Systems Pharmacology at HMS.\nThis data set is based on experiments as op... | python | chosen |
[
{
"from": "system",
"value": "Add 'reverse' argument to get_enum_as_dict.\n"
},
{
"from": "human",
"value": "# Copyright 2013 Rackspace\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work f... | python | chosen |
[
{
"from": "system",
"value": "Add proper css classes to action buttons\n"
},
{
"from": "human",
"value": "from django.utils.translation import ugettext as _\nfrom achilles import blocks, tables\n\nimport nazs\n\nregister = blocks.Library('core')\n\n\n@register.block(template_name='web/core/welco... | python | chosen |
[
{
"from": "system",
"value": "Fix comparing with __class__ of class\n\nSigned-off-by: Michal Juranyi <29976087921aeab920eafb9b583221faa738f3f4@vnet.eu>\n"
},
{
"from": "human",
"value": "import json\nimport decimal\nimport sqlalchemy\n\n\nclass AlchemyJSONEncoder(json.JSONEncoder):\n def defa... | python | chosen |
[
{
"from": "system",
"value": "Improve librmm python API and convert all pytests to use RMM to create device_arrays.\n"
},
{
"from": "human",
"value": "import pytest\nimport functools\nfrom itertools import product\n\nimport numpy as np\nfrom numba import cuda\n\nfrom libgdf_cffi import libgdf\nf... | python | chosen |
[
{
"from": "system",
"value": "Use human-readable variable name in map figure title.\n"
},
{
"from": "human",
"value": "from mpl_toolkits.basemap import Basemap\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom config import ul, lr\nfrom get_data import get_dataset\n\n\ndef draw_map(file... | python | chosen |
[
{
"from": "system",
"value": "Create coverage reports with relative paths"
},
{
"from": "human",
"value": "#!/bin/env/python\n\nimport os\nimport sys\n\nfrom subprocess import call\n\n\nif __name__ == '__main__':\n if 'TRAVIS' in os.environ:\n rc = call('coveralls')\n raise Syst... | python | chosen |
[
{
"from": "system",
"value": "Replace 1st human player with computer player\n"
},
{
"from": "human",
"value": "from Board import *\nfrom Player import *\n\ndef main():\n board = Board()\n players = (HumanPlayer('x', board), HumanPlayer('o', board))\n turnNum = 0\n currentPlayer = Non... | python | chosen |
[
{
"from": "system",
"value": "Return fake behaviour data with /getBehaviourEvent/current\n"
},
{
"from": "human",
"value": "import sys\nsys.path.append(\".env/lib/python2.7/site-packages\")\n\nfrom flask import Flask\nimport requests\napp = Flask(__name__)\n\n@app.route(\"/\")\ndef hello():\n ... | python | chosen |
[
{
"from": "system",
"value": "Check if mirage is installed\n"
},
{
"from": "human",
"value": "import os\n\nfrom core.exceptions.Exceptions import OPAMConfigurationExeception\n\n\ndef check_environment() -> bool:\n __opam_env__ = [\n 'CAML_LD_LIBRARY_PATH',\n 'MANPATH',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add time methods to BmiDakota\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"Basic Model Interface for the Dakota iterative systems analysis toolkit.\"\"\"\n\nfrom basic_modeling_interface import Bmi\nfrom .core import Dakota\n\n\nclass BmiDakota(Bm... | python | chosen |
[
{
"from": "system",
"value": "Correct it to actually follow the README...\n"
},
{
"from": "human",
"value": "def saddle_points(m):\n mt = transpose(m)\n if not m == transpose(mt):\n raise ValueError\n return set((i, j) for i, row in enumerate(m) for j, col in enumerate(mt)\n ... | python | chosen |
[
{
"from": "system",
"value": "Add doc strings to AbstractSource\n"
},
{
"from": "human",
"value": "from abc import abstractmethod, ABCMeta\n\n\nclass AbstractSource(object):\n __metaclass__ = ABCMeta\n\n @abstractmethod\n def set_tilt_angle(self, angle):\n pass\n\n @abstractme... | python | chosen |
[
{
"from": "system",
"value": "Fix the VERSION path for doc\n"
},
{
"from": "human",
"value": "from pathlib import Path\n\nextensions = [\n 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage']\nmaster_doc = 'index'\nproject = 'cairocffi'\ncopyright = '2013-2019, Simon Sapin'\... | python | chosen |
[
{
"from": "system",
"value": "Put the calculated value on the right\n"
},
{
"from": "human",
"value": "from tests.base_case import ChatBotMongoTestCase\n\n\nclass RepetitiveResponseFilterTestCase(ChatBotMongoTestCase):\n \"\"\"\n Test case for the RepetitiveResponseFilter class.\n \"\"\... | python | chosen |
[
{
"from": "system",
"value": "Set invoices to non-draft when done\n"
},
{
"from": "human",
"value": "from django.core.management import BaseCommand\nfrom spiff.payment.models import Invoice\nfrom spiff.subscription.models import SubscriptionPlan\nfrom spiff.api.plugins import find_api_classes\nf... | python | chosen |
[
{
"from": "system",
"value": "Work around a js minification bug.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom flask.ext.assets import Bundle, Environment\n\ncss = Bundle(\n \"libs/bootstrap/dist/css/bootstrap.css\",\n \"css/style.css\",\n filters=\"cssmin\",\n out... | python | chosen |
[
{
"from": "system",
"value": "Remove person from organization serializer\n"
},
{
"from": "human",
"value": "from rest_framework import serializers\n\nfrom bluebottle.utils.model_dispatcher import get_organization_model, get_organizationmember_model\n\nORGANIZATION_MODEL = get_organization_model(... | python | chosen |
[
{
"from": "system",
"value": "Remove the extra comma at the end.\n\nFixes #7\n"
},
{
"from": "human",
"value": "import argparse\nimport simplejson as json\n\nfrom esridump.dumper import EsriDumper\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument(\"url\")\n parse... | python | chosen |
[
{
"from": "system",
"value": "Update type signature of AIRStorePathHandler.opent()\n\nSummary:\nThe previous diff updated the type signature of the\n`PathHandler.opent()` method to return a custom context manager. Here,\nwe update the return type of the overriden `AIRStorePathHandler.opent()`\nmethod to ret... | python | chosen |
[
{
"from": "system",
"value": "Use ls instead of test\n\nOlder versions of Android do not ship with test, and so pulling\nscreenshots always fails. This changes the method for testing\nthe existence of metadata.xml to use ls instead, which is\navailable on all Android versions.\n"
},
{
"from": "human... | python | chosen |
[
{
"from": "system",
"value": "Remove unused functions from util\n"
},
{
"from": "human",
"value": "from datetime import datetime, timedelta, date\n\nimport pytz\nfrom tzlocal import get_localzone\n\n\ndef get_utc_datetime(dt, *args, **kwargs):\n if isinstance(dt, datetime):\n return dt... | python | chosen |
[
{
"from": "system",
"value": "ninja: Fix lookup of ninja executable on MacOSX\n"
},
{
"from": "human",
"value": "import os\nimport platform\nimport subprocess\nimport sys\n\nfrom ._version import get_versions\n\n__version__ = get_versions()['version']\ndel get_versions\n\nDATA = os.path.join(os.... | python | chosen |
[
{
"from": "system",
"value": "Add missing check for None\n"
},
{
"from": "human",
"value": "from ..target import Target\nimport hashlib\nimport dill\nimport joblib\n\nclass PyTarget(Target):\n def __init__(self, name, obj=None):\n self._name = name\n self._obj = obj\n sup... | python | chosen |
[
{
"from": "system",
"value": "WATCH now defaults to False\n"
},
{
"from": "human",
"value": "import os\nfrom optional_django import conf\n\n\nclass Conf(conf.Conf):\n # Environment configuration\n STATIC_ROOT = None\n STATIC_URL = None\n BUILD_SERVER_URL = 'http://127.0.0.1:9009'\n ... | python | chosen |
[
{
"from": "system",
"value": "Change pypi version to 1.6.14-1\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport client\n\nVERSION = client.__version__\n\nsetup(\n name='okpy',\n version=VERSION,\n author='John Denero, Soumya Basu, Stephen Martinis, S... | python | chosen |
[
{
"from": "system",
"value": "Add 'qscintilla' to the program requirements\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nrequirements = [\n 'pyqt5'\n]\n\ntest_requirements = [\n 'pytest',\n 'pytest-cov',\n 'pytest-faulthandler',\n 'pytest-mock',\n 'pytest-q... | python | chosen |
[
{
"from": "system",
"value": "Upgrade version to 0.0.15 (remove numpy dep)\n\nSigned-off-by: Fabrice Normandin <ee438dab901b32439200d6bb23a0e635234ed3f0@gmail.com>\n"
},
{
"from": "human",
"value": "import sys\nimport setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = f... | python | chosen |
[
{
"from": "system",
"value": "Fix for missing author info\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nrid\n~~~~~~~~~~~\n\n\"The Regressive Imagery Dictionary (RID) is a coding scheme for text analysis\nthat is designed to measure 'primordial' and co... | python | chosen |
[
{
"from": "system",
"value": "Add download url for pypi\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name=\"Neighborhoodize\",\n version='0.9',\n description='Utility for translating lat, long coordinates into '\n ... | python | chosen |
[
{
"from": "system",
"value": "Add long description to package.\n"
},
{
"from": "human",
"value": "try:\n from pip._internal.req import parse_requirements\nexcept ImportError:\n from pip.req import parse_requirements\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\ns... | python | chosen |
[
{
"from": "system",
"value": "Change maintainer to Blanc Ltd\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\n# Use latest_tweets.VERSION for version numbers\nversion_tuple = __import__('latest_tweets').VERSION\nversion = '.'.join([str(v) f... | python | chosen |
[
{
"from": "system",
"value": "Migrate to python 3, django 3.2\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='gu-django-filebrowser-no-grappelli',\n version='3.1.32',\n description='Media-Management with the Django Admin-Interface. Withou... | python | chosen |
[
{
"from": "system",
"value": "Update requests requirement from <2.26,>=2.4.2 to >=2.4.2,<2.27\n\nUpdates the requirements on [requests](https://github.com/psf/requests) to permit the latest version.\n- [Release notes](https://github.com/psf/requests/releases)\n- [Changelog](https://github.com/psf/requests/b... | python | chosen |
[
{
"from": "system",
"value": "Add license to the packaging\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\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix NameError on Python 2.6\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import find_packages, Command\n\n\nsetup_params = dict(\n name='bugimporters',\n version=0.1,\n author='Various contributers to the OpenHatch project, Berr... | python | chosen |
[
{
"from": "system",
"value": "Fix package_data to include templates\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"portinus\",\n version=\"0.9.2\",\n author=\"Justin Dray\",\n author_email=\"justin@dray.be\",\... | python | chosen |
[
{
"from": "system",
"value": "Bump minor version to account for changes of MANIFEST\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name = 'graphysio',\n version = '0.4',\n description = 'Graphical visualization of physiologic time series',\n url = 'https:... | python | chosen |
[
{
"from": "system",
"value": "Fix PyPI URL, bump version\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name=\"ordered-set\",\n version = '1.1',\n maintainer='Luminoso Technologies, Inc.',\n maintainer_email='rob@luminoso.com',\n license = \"MIT-LICENS... | python | chosen |
[
{
"from": "system",
"value": "Add Slackclient to the package requirements\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nimport re\n\nfrom setuptools import find_packages, setup\n\n\ndef get_version(filename):\n with open(filename) as fh:\n metadata = dic... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 8.0.1.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n retu... | python | chosen |
[
{
"from": "system",
"value": "Set required python ver to 3.5\n"
},
{
"from": "human",
"value": "from os import path\n\nfrom pip.download import PipSession\nfrom pip.req import parse_requirements\n\nfrom graphene_permissions import __version__\nfrom setuptools import setup\n\nhere = path.abspath(... | python | chosen |
[
{
"from": "system",
"value": "Fix trove classifier: Cython is not used\n"
},
{
"from": "human",
"value": "import sys\nfrom setuptools import setup\n\nif sys.version_info < (2, 6):\n\tsys.stdout.write(\"At least Python 2.6 is required.\\n\")\n\tsys.exit(1)\n\n\nsetup(\n\tname = 'xopen',\n\tversio... | python | chosen |
[
{
"from": "system",
"value": "Correct classifiers from the pypi trove entries\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(name=\"stellar-magnate\",\n version=\"0.1\",\n description=\"A space-themed commodity trading game\",\n long_description... | python | chosen |
[
{
"from": "system",
"value": "Bump version 1.0.8 -- more car details\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nDESCRIPTION = \"A python module which returns details about a Danish car from its license plate number\"\n\nLONG_DESCRIPTI... | python | chosen |
[
{
"from": "system",
"value": "Prepare for submission to PyPI.\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='vprof',\n version='0.1',\n packages=['vprof'],\n description=\"Visual profiler for Python\",\n url='http//github.com/nvdv/vprof',\n li... | python | chosen |
[
{
"from": "system",
"value": "Include README.rst as description for PyPi\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='tsstats',\n version='1.4.1',\n author='Thor77',\n author_email='thor77@thor77.org',\n description='A simple Teamspeak stats-ge... | python | chosen |
[
{
"from": "system",
"value": "Add the dependency to Mardown.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport sys\n\nrequires = ['feedgenerator', 'jinja2', 'pygments', 'docutils']\nif sys.version_info < (2,7):\n requires.append('argparse')\n\nsetup(\n name = \"pelica... | python | chosen |
[
{
"from": "system",
"value": "Move `django-brightcove` dependency into `brightcove` optional extra.\n"
},
{
"from": "human",
"value": "import setuptools\n\nfrom icekit import __version__\n\nsetuptools.setup(\n name='icekit',\n version=__version__,\n packages=setuptools.find_packages(),\... | python | chosen |
[
{
"from": "system",
"value": "Change to custom pyhdb version number.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='django_hana',\n version='1.1',\n description='SAP HANA backend for Django 1.7',\n author='Max Bothe, Kapil R... | python | chosen |
[
{
"from": "system",
"value": "Remove the scripts listing as it causes error if bin/ is empty\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup, find_packages\n\nscripts = [os.path.join('bin', filename) for filename in os.listdir('bin')]\n\nsetup(\n name='mnp',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add the boto as requirement\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nwith open(os.path.join(here, 'README.txt')) as f:\n README = f.read()\nwith open(os.path.... | python | chosen |
[
{
"from": "system",
"value": "Update classifiers to show Python 3 support\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nfrom setuptools import setup, find_packages\nfrom basic_modeling_interface import __version__\n\n\nsetup(name='basic-modeling-interface',\n version=__version_... | python | chosen |
[
{
"from": "system",
"value": "Switch extra-views to lower version for now\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-oscar-stores',\n version=\":versiontools:stores:\",\n url='https://github.c... | python | chosen |
[
{
"from": "system",
"value": "Set development status to stable\n\nThanks Uri Rodberg for the suggestion.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='sorl-thumbnail',\n use_scm_version=True,\n description='Thumbnails for Django',\n ... | python | chosen |
[
{
"from": "system",
"value": "Include package data for wheels\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"cobertura-clover-transform\",\n version='1.1b1',\n packages=find_packages(),\n description=\"Tools for transforming Cobertur... | python | chosen |
[
{
"from": "system",
"value": "Add support for Passlib versions prior to 1.7\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport passlib.hash\n\nclass FilterModule(object):\n def filters(self):\n return {\n 'ciscohash5': self.ciscohash5,\n 'ciscohash... | python | chosen |
[
{
"from": "system",
"value": "Add POST method to ProductList class\n"
},
{
"from": "human",
"value": "from django.http import HttpResponse\nfrom rest_framework.response import Response\nfrom rest_framework.views import APIView\nfrom .models import Product\nfrom .serializers import ProductSeriali... | python | chosen |
[
{
"from": "system",
"value": "Test if the DOI was actually created on DataCite\n\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# encoding: utf-8\n#\n# This file is part of ckanext-doi\n# Created by the Natural History Museum in London, UK\n\nimport nose\nfrom ckanext.doi.lib.api impo... | python | chosen |
[
{
"from": "system",
"value": "Add sleep, and prox_ground, prox_horizontal.\n"
},
{
"from": "human",
"value": "import os\nimport Pyro4\nimport subprocess\nimport signal\nfrom pythymiodw import ThymioSimMR\n\n\nclass ThymioMR():\n\tdef __init__(self):\n\t\tself.pyro4daemon_proc=subprocess.Popen(['... | python | chosen |
[
{
"from": "system",
"value": "Fix Redis backend; BLPOP takes multiple lists.\n\nSigned-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@thread.com>\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import # For 'redis'\n\nimport redis\n\nfrom ..job import Job\nfrom .... | python | chosen |
[
{
"from": "system",
"value": "Use list instead of patterns()\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import patterns, url\n\nurlpatterns = patterns(\n '', url('^json/ge... | python | chosen |
[
{
"from": "system",
"value": "Send output to server by default for attach to process debug.\n"
},
{
"from": "human",
"value": "def attach(port, host):\n try:\n import pydevd\n pydevd.stoptrace() #I.e.: disconnect if already connected\n # pydevd.DebugInfoHolder.DEBUG_RECOR... | python | chosen |
[
{
"from": "system",
"value": "Use new invocations error counter for testing thread sleeps etc\n"
},
{
"from": "human",
"value": "from invocations.docs import docs, www, sites, watch_docs\nfrom invocations.testing import test, integration, coverage, watch_tests\nfrom invocations import packaging\... | python | chosen |
[
{
"from": "system",
"value": "Fix invoke to fix package finding\n"
},
{
"from": "human",
"value": "import invoke\n\n\n@invoke.task\ndef release(version):\n \"\"\"`version`` should be a string like '0.4' or '1.0'.\"\"\"\n invoke.run('git tag -s {0}'.format(version))\n invoke.run('git pus... | python | chosen |
[
{
"from": "system",
"value": "Remove hard coded realm and assume any is fine\n"
},
{
"from": "human",
"value": "import urllib2\n\nfrom urlparse import urljoin\n\nfrom gocd.api import Pipeline\n\n\nclass Server(object):\n def __init__(self, host, user=None, password=None):\n self.host =... | python | chosen |
[
{
"from": "system",
"value": "Fix various documentation related warnings.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\n\nfrom .dataset import *\nfrom . import dataset\nfrom .vonkries import (\n chromatic_adaptatio... | python | chosen |
[
{
"from": "system",
"value": "Test ensure_authority for both nonexistent and already existing Authority records.\n"
},
{
"from": "human",
"value": "def test_ensure_authority(manager_transaction):\n authority = manager_transaction.ensure_authority(\n name='Test Authority',\n rank... | python | chosen |
[
{
"from": "system",
"value": "Add double quotes for MAC address\n"
},
{
"from": "human",
"value": "{\n \"inbound\": [\n {\n \"cookie\": 1,\n \"match\": \n {\n \"tcp_dst\": 4321\n },\n \"action\": \n {\n ... | python | chosen |
[
{
"from": "system",
"value": "Make create a class method.\n"
},
{
"from": "human",
"value": "import re\n\n\nclass RegexFactory(object):\n \"\"\"Generates a regex pattern.\"\"\"\n WORD_GROUP = '({0}|\\*)'\n SEP = '/'\n\n def _generate_pattern(self, path):\n \"\"\"Generates a re... | python | chosen |
[
{
"from": "system",
"value": "Order posts by the creation date"
},
{
"from": "human",
"value": "from django.views.generic import ListView, DetailView\n\nfrom .models import Post\n\n\nclass PostListView(ListView):\n context_object_name = 'posts'\n model = Post\n template_name = 'hermes/p... | python | chosen |
[
{
"from": "system",
"value": "Tag commit for v0.0.18-master generated by gitmake.py\n"
},
{
"from": "human",
"value": "major = 0\nminor=0\npatch=17\nbranch=\"master\"\ntimestamp=1376509025.95"
},
{
"from": "gpt",
"value": "major = 0\nminor=0\npatch=18\nbranch=\"master\"\ntimestamp=13... | python | chosen |
[
{
"from": "system",
"value": "Fix TypeError on mandrill email sending\n\njson.loads() does not accept bytes as input in python < 3.6.\n"
},
{
"from": "human",
"value": "# coding: utf8\n\nimport json\nimport logging\n\nfrom labonneboite.conf import settings\n\n\nlogger = logging.getLogger('main')... | python | chosen |
[
{
"from": "system",
"value": "Load table schema automatically instead of stubbing out\n"
},
{
"from": "human",
"value": "# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\n# Copyright 2011 OpenStack LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use... | python | chosen |
[
{
"from": "system",
"value": "vim: Allow mixed-use-of-spaces-and-tabs in specific line of the spec file.\n"
},
{
"from": "human",
"value": "from Config import *\n\n# Not sure what this number does, but we need some threshold that we'd like to\n# avoid crossing.\nsetOption(\"BadnessThreshold\", 4... | python | chosen |
[
{
"from": "system",
"value": "Correct AttributeError when client isn't explicitly imported.\n"
},
{
"from": "human",
"value": "import logging\n\nimport irc.buffer\n\nlog = logging.getLogger(__name__)\n\n\nclass ErrorReportingBuffer(irc.buffer.LineBuffer):\n\tencoding = 'utf-8'\n\n\tdef lines(sel... | python | chosen |
[
{
"from": "system",
"value": "Implement regex pattern for list values\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nINDENT = r\"(?P<indent>^ *)\"\nVARIABLE = r\"(?P<variable>.+):\"\nVALUE = r\"(?P<value>(?:(?P<q2>['\\\"]).*?(?P=q2))|[^#]+?)\"\nNEWLINE = r\"$\\n\"\nBLANK = r\" +\"... | python | chosen |
[
{
"from": "system",
"value": "Use Django's VERSION to determine which cleanup command to call\n"
},
{
"from": "human",
"value": "\"\"\"\nDaily cleanup job.\n\nCan be run as a cronjob to clean out old data from the database (only expired\nsessions at the moment).\n\"\"\"\n\nfrom django_extensions... | python | chosen |
[
{
"from": "system",
"value": "Add snapshots updated event to remove snapshot\n"
},
{
"from": "human",
"value": "from constants import *\nfrom exec_task import ExecTask\nfrom event import Event\nimport os\nimport time\nimport shlex\nimport logging\nimport shutil\nimport subprocess\n\nlogger = log... | python | chosen |
[
{
"from": "system",
"value": "Fix ui designer dir location\n"
},
{
"from": "human",
"value": "import os\nfrom qtpy.uic import loadUi\n\ndef load_ui(ui_filename, baseinstance):\n cwd = os.getcwd()\n ui_filename = os.path.split(ui_filename)[-1]\n\n # get the location of the designer direc... | python | chosen |
[
{
"from": "system",
"value": "Change order in ordered array\n"
},
{
"from": "human",
"value": "\n\nclass HeapSort:\n\n @classmethod\n def heapsort_support(cls, heap):\n\n # create support array\n ordered_array = []\n\n # extract min until heap is empty\n while n... | python | chosen |
[
{
"from": "system",
"value": "Fix missing close for email logo file handle\n"
},
{
"from": "human",
"value": "from email.mime.image import MIMEImage\n\nfrom django.contrib.staticfiles import finders\nfrom .base import EmailBase\n\n\nclass PlatformEmailMixin:\n \"\"\"\n Attaches the static ... | python | chosen |
[
{
"from": "system",
"value": "Document instance made acessible on form\n"
},
{
"from": "human",
"value": "from flaskext import wtf\nfrom collection.documents import Book\n\nclass BookForm(wtf.Form):\n document_class = Book\n title = wtf.TextField(validators=[wtf.Required()])\n year = wt... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.