conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Change repository URL to point to OpenPrinting's organisation\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\nfrom distutils.command.sdist import sdist as _sdist\n\nclass sdist(_sdist):\n def run(self):\n try:\... | python | chosen |
[
{
"from": "system",
"value": "Add source site to api\n"
},
{
"from": "human",
"value": "from rest_framework import serializers\n\nfrom obcy.models import Joke\n\n\nclass ObcyJokeSerializer(serializers.ModelSerializer):\n added = serializers.DateTimeField(source='added', format='%Y-%m-%dT%XZ')... | python | chosen |
[
{
"from": "system",
"value": "Test on thumbnail update to new reference naming\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Author: Óscar Nájera\n# License: 3-clause BSD\n\"\"\"\nTesting the rst files generator\n\"\"\"\nfrom __future__ import division, absolute_import, print_fun... | python | chosen |
[
{
"from": "system",
"value": "Add a test for config file permissions check.\n"
},
{
"from": "human",
"value": "import os\n\nfrom nose.tools import *\n\nfrom lctools import config\n\nclass TestConfig(object):\n test_filename = \"bebebe\"\n\n def setup(self):\n fd = open(self.test_fil... | python | chosen |
[
{
"from": "system",
"value": "Fix: TEST gossip was crashing as the data directory was not exists for history data\nEnh: now directory creation is by default recursive\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Copyright (C) 2014:\n# Gabes Jean, naparuba@gmail.com\n\nimport th... | python | chosen |
[
{
"from": "system",
"value": "Change string formating for Credential\n"
},
{
"from": "human",
"value": "import os\n\n\nclass Credential(object):\n def __init__(self, name, login, password, comments):\n self.name = name\n self.login = login\n self.password = password\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix ImportError when installing without BeautifulSoup\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nimport ofxparse\n\nsetup(name='ofxparse',\n version=ofxparse.__version__,\n description=\"Tools for working with the OFX... | python | chosen |
[
{
"from": "system",
"value": "Sort vacation type by id when displaying on home page\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom .base import RedirectView\nfrom pyvac.models import VacationType\n\n\nclass Index(RedirectView):\n redirect_route = u'login'\n\n\nclass Home(Red... | python | chosen |
[
{
"from": "system",
"value": "Exclude .DS_Store from package build.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\n\ndef readme():\n with open('README.rst') as f:\n return f.read()\n\n\nsetup(\n name='pneumatic',\n version='0.1.8',\n ... | python | chosen |
[
{
"from": "system",
"value": "Increment version. New in 1.3: Linux binaries are properly included\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport sys\n\n\nif sys.version_info.major != 3:\n raise RuntimeError(\"PhenoGraph requires Python 3\")\n\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Exclude handling of the situation where Pillow is not available from test coverage.\n"
},
{
"from": "human",
"value": "\"\"\"\nImport the required subclasses of :class:`~qrcode.image.base.BaseImage` from the qrcode library with a fallback to SVG\nformat when the Pil... | python | chosen |
[
{
"from": "system",
"value": "Update dependency to Markdown 2.6+ & bleach 2.0.0+\n"
},
{
"from": "human",
"value": "import os.path as path\nfrom setuptools import setup\n\n\ndef get_readme(filename):\n if not path.exists(filename):\n return \"\"\n\n with open(path.join(path.dirname(... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 7.0.16.\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 ret... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 0.2.7\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 retur... | python | chosen |
[
{
"from": "system",
"value": "FIX missing Rules directory in package\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 04.08.2017 19:00\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom distutils.core import setup\n\n\nsetup(\n name='grammpy'... | python | chosen |
[
{
"from": "system",
"value": "Remove h5py requirement and made it optional.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom setuptools import find_packages\n\n\nsetup(name='Keras',\n version='0.1.2',\n description='Theano-based Deep Learning library',\n autho... | python | chosen |
[
{
"from": "system",
"value": "Allow Django 1.6 install while preventing 1.3.X\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nfrom mutant import __version__\n\ngithub_url = 'https://github.com/charettes/django-mutant'\nlong_desc = open('RE... | python | chosen |
[
{
"from": "system",
"value": "Prepare for publication on pypi\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='pyW215',\n version='0.4',\n description='Interface for d-link W215 Smart Plugs.',\n url='https://github.com/linuxchristian... | python | chosen |
[
{
"from": "system",
"value": "Fix the XRC package_data entry.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\nfrom thotkeeper import __version__ as tk_version\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\n... | python | chosen |
[
{
"from": "system",
"value": "Use semantic versioning and re-publish to PyPi\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nVERSION = '0.2'\n\nsetup(name='tornado-httpclient-session'... | python | chosen |
[
{
"from": "system",
"value": "Fix compile error on OS X 10.9\n"
},
{
"from": "human",
"value": "from distutils.core import setup, Extension\n\nsetup(name = \"Indexer\", version = \"0.1\", ext_modules = [Extension(\"rabin\", [\"src/rabin.c\", ])])\n"
},
{
"from": "gpt",
"value": "from... | python | chosen |
[
{
"from": "system",
"value": "Install header files to include/\n"
},
{
"from": "human",
"value": "from distutils.core import setup, Extension\nfrom glob import glob\n\nmodule1 = Extension('hashpumpy',\n sources = glob('*.cpp'),\n libraries = ['crypto'])\n\ns... | python | chosen |
[
{
"from": "system",
"value": "Set to the next version\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='crasync',\n packages=['crasync'], # this must be the same as the name above\n version='v1.0.0a',\n description='An async wrapper for cr-api.com... | python | chosen |
[
{
"from": "system",
"value": "Correct version number for sk-video"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nimage analysis group tools\n\"\"\"\nfrom setuptools import setup\n\n\nsetup(\n name='image-analysis',\n version='0.0.1',\n url='https://github.com/CoDaS-La... | python | chosen |
[
{
"from": "system",
"value": "Make it installable with PyPI\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='flickruper',\n version='0.1.0',\n author='Igor Katson',\n author_email='igor.katson@gmail.com',\n py_modules=['flickruper'],\n scrip... | python | chosen |
[
{
"from": "system",
"value": "Use py2.4' package_data thing instead of hacking it.\n"
},
{
"from": "human",
"value": "try:\n from setuptools import setup\nexcept:\n from distutils.core import setup\nfrom distutils.command import install\n\nimport forms\n\nfor scheme in install.INSTALL_SCHE... | python | chosen |
[
{
"from": "system",
"value": "Handle encoding better across python versions\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup\nimport maxmindupdater\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read().decode('utf8')\n\nsetup(\n name... | python | chosen |
[
{
"from": "system",
"value": "Handle building the package in absence of README.md\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='Lookupy',\n version='0.1',\n author='Vineet Naik',\n author_email='naikvin@gmail.com',\n packages=['lookupy',],\n... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in import statement\n"
},
{
"from": "human",
"value": "form setuptools import setup, find_packages\n\nsetup(name='todo-man',\n version='0.0.1',\n author='Rylan Santinon',\n license='Apache',\n packages=['todo-man'])\n"
},
{
"from... | python | chosen |
[
{
"from": "system",
"value": "Add newline to make flake happy\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup\n\n\ndef read(fname):\n with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile:\n content =... | python | chosen |
[
{
"from": "system",
"value": "Support .dev<N> extension to version via env var.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(name='confab',\n version='0.2',\n description='Configuration management with Fabric and Jinja... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3.8 to supported versions\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nimport os.path\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Support bdist_zipapp when buildtools is available\n"
},
{
"from": "human",
"value": "import subprocess\nfrom setuptools import setup\n\nimport startup\n\n\nsubprocess.check_call('./gen_manifest.sh')\n\n\nsetup(\n name = 'startup',\n version = startup.__version... | python | chosen |
[
{
"from": "system",
"value": "Update pypi classifier to Alpha status\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(name='pyramid_es',\n version='0.3.2.dev',\n description='Elasticsearch integration for Pyramid.',\n long_description=open(... | python | chosen |
[
{
"from": "system",
"value": "Install missing templatetags test package\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='armstrong.base',\n version='0.1.2',\n description='Base functionality that needs to be shared widely',\n author='Texas Tribune',\n... | python | chosen |
[
{
"from": "system",
"value": "Change the parser library requirement to reference master\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:\n README = readme.read()\n\n# allow setup.py to be ... | python | chosen |
[
{
"from": "system",
"value": "Fix missing quote after version number."
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name = \"fastly\",\n version... | python | chosen |
[
{
"from": "system",
"value": "Update description and bump version to 0.1.3\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='permission',\n version='0.1.2',\n author='Zhipeng Liu',\n author_email='hustlzp@qq.com',\n url='https://github.com/hust... | python | chosen |
[
{
"from": "system",
"value": "Add twitter services to install since they work again\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='Frappy',\n version='0.1',\n description='Framework for creating Web APIs in Python',\n au... | python | chosen |
[
{
"from": "system",
"value": "Include cmt in installed packages.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nimport versioneer\n\n\ndef read_requirements():\n import os\n\n\n path = os.path.dirname(os.path.abspath(__file__))\n requirements_file = os... | python | chosen |
[
{
"from": "system",
"value": "Raise an exception when the API response is not successful\n"
},
{
"from": "human",
"value": "BASE_URL = 'https://api.box.com/2.0'\n\nFOLDERS_URL = '{}/folders/{{}}/items'.format(BASE_URL)\n\nMAX_FOLDERS = 1000\n\n\nclass Client(object):\n def __init__(self, prov... | python | chosen |
[
{
"from": "system",
"value": "Remove versiontools dependency and change version number.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup\nimport os\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\ndescription = \"\"\"\nDjango settings resolver... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Fixed reading of requirements from the file\"\n\nThis reverts commit 29be75d\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nrequirements = []\n\nwith open('requirements.txt', 'r') as f:\n for line in f:\n requirements.appen... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3 classifier trove\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nsetup(\n name = \"django-jsonfield\",\n version = open(os.path.join(os.path.dirname(__file__), 'jsonfield', 'VERSION')).read().strip(),\n description... | python | chosen |
[
{
"from": "system",
"value": "Use `find_packages()` like all the cool kids do."
},
{
"from": "human",
"value": "from setuptools import setup\n\nexec (open('plotly/version.py').read())\n\n\ndef readme():\n with open('README.rst') as f:\n return f.read()\n\n\nsetup(name='plotly',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add pubsub dependency for tests\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport sys, os\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n README = open(os.path.join(here, 'README.rst')).read()\nexcept IOError:\n ... | python | chosen |
[
{
"from": "system",
"value": "Install some more packages for trac.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nfrom fabric.api import sudo, task, put\n\nfrom twisted.python.filepath import FilePath\n\nfrom braid import pypy, service, authbind, git, package, bazaa... | python | chosen |
[
{
"from": "system",
"value": "Set description content type so it renders on PyPI\n"
},
{
"from": "human",
"value": "import setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nsetuptools.setup(\n name=\"mock-firestore\",\n version=\"0.1.2\",\n author... | python | chosen |
[
{
"from": "system",
"value": "Fix bug `No module named yaml`\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# coding: utf-8\n\nimport re\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='dictmixin',\n __version__=re.search(\n r'__version__\\s*=\\s*[\\'\"]([... | python | chosen |
[
{
"from": "system",
"value": "Add CONTRIBUTING file to package description\n"
},
{
"from": "human",
"value": "import names\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=names.__title__,\n version=names.__version__,\n author=names.__author__,\n url=\"https://github.c... | python | chosen |
[
{
"from": "system",
"value": "Make 'pages' compatible with 'djangorestframework' 3.2\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\n\n\nversion = '1.1.0'\n\n\ninstall_requires = (\n 'djangorestframework>=3.0.5,<3.2',\n 'FeinCMS>=1.9,<1.11',\n 'django-ord... | python | chosen |
[
{
"from": "system",
"value": "Allow null values in UUID field.\n"
},
{
"from": "human",
"value": "from django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('core', '0007_changeemailrequest'),\n ]\n\n operations = [\n migra... | python | chosen |
[
{
"from": "system",
"value": "Use invocations' integration task, also add watch_tests\n"
},
{
"from": "human",
"value": "from invocations import docs\nfrom invocations.testing import test\nfrom invocations.packaging import release\n\nfrom invoke import Collection\nfrom invoke import run\nfrom in... | python | chosen |
[
{
"from": "system",
"value": "Add task for building docs\n"
},
{
"from": "human",
"value": "# coding=utf-8\n\n\"\"\"Useful task commands for development and maintenance.\"\"\"\n\nfrom invoke import run, task\n\n\n@task\ndef clean():\n\t\"\"\"Clean the project directory of unwanted files and dire... | python | chosen |
[
{
"from": "system",
"value": "Change Python package version to 1.2.1\n"
},
{
"from": "human",
"value": "__version__='1.1.0'\nfrom .pylazperfapi import PyDecompressor as Decompressor\nfrom .pylazperfapi import PyCompressor as Compressor\nfrom .pylazperfapi import PyVLRDecompressor as VLRDecompres... | python | chosen |
[
{
"from": "system",
"value": "Use a slightly more specific bank name\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n'''\nTests for the salt-run command\n'''\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing libs\nimport tests.integration as integ... | python | chosen |
[
{
"from": "system",
"value": "Add URL enter in dynamic process\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom .views import MainHandler, ProcessHandler, DashboardHandler\n\n\nINCLUDE_URLS = [\n (r\"/process/(?P<slug>[\\w-]+).json\", ProcessHandler),\n ... | python | chosen |
[
{
"from": "system",
"value": "Add other side of condition\n"
},
{
"from": "human",
"value": "# coding: utf8\nfrom atlassian import Confluence\n\nconfluence = Confluence(\n url='http://localhost:8090',\n username='admin',\n password='admin')\n# this example related get all user from grou... | python | chosen |
[
{
"from": "system",
"value": "Fix tests for human readable numbers\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom LinkMeBot.utils import get_text_from_markdown, human_readable_download_number\n\nclass TestUtils(unittest.TestCase):\n def test_get_text_from_markdown(self):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add bbox to parking area statistics view set\n"
},
{
"from": "human",
"value": "from django.utils import timezone\nfrom rest_framework import serializers, viewsets\n\nfrom parkings.models import Parking, ParkingArea\n\n\nclass ParkingAreaStatisticsSerializer(seriali... | python | chosen |
[
{
"from": "system",
"value": "Remove the tail slash from approce and cancel url\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, url\nfrom harvest.views import ApproveJobView, CancelJobView\n\nurlpatterns = patterns('',\n url(r'^(?P<job_id>\\d+)/approve/?$', ApproveJ... | python | chosen |
[
{
"from": "system",
"value": "Use dictionary get() method to access 'detail'\n"
},
{
"from": "human",
"value": "\nfrom rest_framework import status\nfrom rest_framework.exceptions import APIException\n\n\ndef json_api_exception_handler(exc, context):\n \"\"\"\n Custom exception handler tha... | python | chosen |
[
{
"from": "system",
"value": "Add stem test for spanish stemmer\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\nimport unittest\nfrom nltk.stem.snowball import SnowballStemmer\n\nclass SnowballTest(unittest.TestCase):\n\n de... | python | chosen |
[
{
"from": "system",
"value": "Remove default config path (development.ini)\n\nTowards #1\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# ###\n# Copyright (c) 2015, Rice University\n# This software is subject to the provisions of the GNU Affero General\n# Public License version 3 (A... | python | chosen |
[
{
"from": "system",
"value": "Test that tqdm fails when iterating over a csv file\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\nfrom tqdm import format_interval, format_meter\n\n\ndef test_format_interval():\n assert format_interval(60) == '01:00'\n assert for... | python | chosen |
[
{
"from": "system",
"value": "Mark gdal tests as requiring internet"
},
{
"from": "human",
"value": "\"\"\" Test gdal plugin functionality.\n\"\"\"\nimport pytest\nfrom imageio.testing import run_tests_if_main, get_test_dir\n\nimport imageio\nfrom imageio.core import get_remote_file\n\ntest_dir ... | python | chosen |
[
{
"from": "system",
"value": "Upgrade libchromiumcontent to fix icu symbols\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport platform\nimport sys\n\nBASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'\nLIBCHROMIUMCONTENT_COMMIT = 'e375124044f9044ac88076... | python | chosen |
[
{
"from": "system",
"value": "retention: Fix migration making archive_transaction field not null.\n\nDELETing from archive tables and ALTERing ArchivedMessage needs to be\nsplit into separate transactions.\n\nzerver_archivedattachment_messages needs to be cleared out before\nzerver_archivedattachment.\n"
... | python | chosen |
[
{
"from": "system",
"value": "Enable backported ``int`` in future.builtins\n"
},
{
"from": "human",
"value": "\"\"\"\nA module that brings in equivalents of the new and modified Python 3\nbuiltins into Py2. Has no effect on Py3.\n\nSee the docs for these modules for more information::\n\n- futur... | python | chosen |
[
{
"from": "system",
"value": "Make SqliteConnection read_only parameter optional"
},
{
"from": "human",
"value": "\nimport sqlite3\n\nfrom binder.conn import Connection\nfrom binder.sqlgen import DIALECT_SQLITE\n\nclass SqliteConnection(Connection):\n\n def __init__(self, dbfile, read_only):\... | python | chosen |
[
{
"from": "system",
"value": "Create or load index directory\n"
},
{
"from": "human",
"value": "import argparse\nimport yaml\nfrom os.path import expanduser\n\n\ndef load_config_from(path):\n with open(expanduser(path)) as file:\n return yaml.load(file)\n\ndef parse_options():\n parser = ar... | python | chosen |
[
{
"from": "system",
"value": "Allow direct SPPF generation from interactive script\n\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom viper.interactive import *\n\n\nif __name__ == '__main__':\n import argparse\n parser = argparse.ArgumentParser()\n parser.add_argument(... | python | chosen |
[
{
"from": "system",
"value": "Add test cases for python implementation of binary search function\n"
},
{
"from": "human",
"value": "# iterative approach to binary search function (assume list has distinct elements and elements are in ascending order)\n\ndef binary_search(arr, data):\n\tlow = 0 #... | python | chosen |
[
{
"from": "system",
"value": "Change CaseInsensitiveComparator to support all operations.\n"
},
{
"from": "human",
"value": "from sqlalchemy import func\nfrom sqlalchemy.ext.hybrid import Comparator\n\n\nclass CaseInsensitiveComparator(Comparator):\n def __eq__(self, other):\n return f... | python | chosen |
[
{
"from": "system",
"value": "Make decorators.task, Task, PeriodicTask, apply* available from celery.py\n"
},
{
"from": "human",
"value": "\"\"\"Distributed Task Queue\"\"\"\nfrom celery.distmeta import __version__, __author__, __contact__\nfrom celery.distmeta import __homepage__, __docformat__... | python | chosen |
[
{
"from": "system",
"value": "Add \"full scale\" to antler settings.\n"
},
{
"from": "human",
"value": "from caribou.settings.setting_types import *\nfrom caribou.i18n import _\n\nAntlerSettings = SettingsTopGroup(\n _(\"Antler Preferences\"), \"/org/gnome/antler/\", \"org.gnome.antler\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Add a test that a non-GET method is rejected\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nimport uuid\n\nimport archive_report_ingest_status as report_ingest_status\n\n\ndef test_get_returns_status(dynamodb_resource, table_name):\n guid = str(u... | python | chosen |
[
{
"from": "system",
"value": "Order Secret objects by `created` date.\n"
},
{
"from": "human",
"value": "# THIRD PARTY\nfrom djangae.fields import CharField\nfrom django.db import models\n\n\nclass Secret(models.Model):\n created = models.DateTimeField(auto_now_add=True)\n url_slug = CharF... | python | chosen |
[
{
"from": "system",
"value": "Add a test case for test.echo\n"
},
{
"from": "human",
"value": "import api\nimport unittest\nimport os\nfrom getpass import getpass\n\nclass ApiTest(unittest.TestCase):\n\n def setUp(self):\n self.linode = api.Api(os.environ['LINODE_API_KEY'])\n\n def ... | python | chosen |
[
{
"from": "system",
"value": "Fix invocation of subprocess.call to pass arguments as a list - makes doctests run again.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Run all tests\n\nimport os\nimport subprocess\nimport sys\n\ntopdir = os.path.dirname(os.path.realpath(os.path.abspa... | python | chosen |
[
{
"from": "system",
"value": "Use if/else instead of try/except"
},
{
"from": "human",
"value": "# rcstreamlistener.py\nimport urllib3.contrib.pyopenssl\nimport logging\nfrom ipaddress import ip_address\nfrom socketIO_client import SocketIO, BaseNamespace\n\nurllib3.contrib.pyopenssl.inject_into... | python | chosen |
[
{
"from": "system",
"value": "Add swat network layers class.\n"
},
{
"from": "human",
"value": "\"\"\"\nRecreate the SWaT network with the highest level of precision.\n\"\"\"\n\nfrom mininet.net import Mininet\nfrom mininet.topo import Topo\nfrom minicps import constants as c\n\n\nclass EthRing(... | python | chosen |
[
{
"from": "system",
"value": "Add interface to interpreter's \"-m\" option.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport argparse\nfrom . import compiler\n\n\ndef main():\n parser = argparse.ArgumentParser(description='CodeKit Language Compiler.')\n parser.add_argum... | python | chosen |
[
{
"from": "system",
"value": "Add func to return logger configured for multiproc\n"
},
{
"from": "human",
"value": "\"\"\" Multiprocess helpers\n\"\"\"\n\n\nclass SerialExecutor(object):\n \"\"\" Make regular old 'map' look like :mod:`futures.concurrent`\n \"\"\"\n map = map\n\n\ndef ge... | python | chosen |
[
{
"from": "system",
"value": "Fix a bug in the Azure credentials package in which they would overwrite the directory.\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=248750675\n"
},
{
"from": "human",
"value": "# Copyright 2016 PerfKitBenchmarker Authors. All ... | python | chosen |
[
{
"from": "system",
"value": "Add URL for project to the project metadata\n"
},
{
"from": "human",
"value": "\"\"\"A Python 3 package for interacting with *all* aspects of the Pushover API\"\"\"\n\nfrom .error import PushoverCompleteError, BadAPIRequestError\nfrom .pushover_api import PushoverAP... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Do not assume all answers in our session are valid.\"\n\nThis reverts commit 0f7e535d645086f9c29e77e28588a3165f7bb2b8.\n"
},
{
"from": "human",
"value": "import mysite.search.models\nimport logging\nKEY='answer_ids_that_are_ours'\n\ndef similar_project_name... | python | chosen |
[
{
"from": "system",
"value": "Add train config to audio train\n"
},
{
"from": "human",
"value": "#%% Setup.\nimport numpy as np\nimport scipy.io.wavfile\n\nfrom keras.utils.visualize_util import plot\nfrom keras.callbacks import TensorBoard, ModelCheckpoint\nfrom keras.utils import np_utils\n\nf... | python | chosen |
[
{
"from": "system",
"value": "Remove debug and use warngins\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport csv\n\nclass CsvConverter:\n\n def __init__(self, csv_file_path):\n self.csv_file_path = csv_file_path\n self.rows = []\n ... | python | chosen |
[
{
"from": "system",
"value": "Add request and response size\n"
},
{
"from": "human",
"value": "# Run this with mitmdump -q -s morph_proxy.py\n\ndef request(context, flow):\n # print out all the basic information to determine what request is being made\n # coming from which container\n # print... | python | chosen |
[
{
"from": "system",
"value": "Choose the version of python at runtime (portable version)\n\n- Try `py -3` first for windows compatibility\n- Fall back to `python3` if `py` doesn't work\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n# This file is only a \"symlink\" to bootstrap.py, ... | python | chosen |
[
{
"from": "system",
"value": "Make a sixteen byte plaintext\n"
},
{
"from": "human",
"value": "from subprocess import Popen, PIPE\n\nproc = Popen([\"./badencrypt.py\", \"hello!!!\"],stdout=PIPE)\nhexCiphertext = proc.communicate()[0].strip()\n\n#import pdb\n#pdb.set_trace()\nprint hexCiphertext\... | python | chosen |
[
{
"from": "system",
"value": "Change the date key to non-unicode in the test fixture.\n"
},
{
"from": "human",
"value": "from collections import OrderedDict\nfrom elifetools.utils import date_struct\n\n\nexpected = [\n OrderedDict([\n ('event_type', 'preprint-publication'),\n ('... | python | chosen |
[
{
"from": "system",
"value": "Update to read README.md for the long description"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='Yify',\n version='0.1.0',\n author='Batista Harahap',\n author_email='batista@bango29.com',\n packages=['yify'],\n ... | python | chosen |
[
{
"from": "system",
"value": "Add django-keyedcache as a requirement\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nVERSION = (1, 4, 13)\n\n# Dynamically calculate the version based on VERSION tuple\nif len(VERSION)>2 and VERSION[2] is not None:\n str_versio... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Freeze mozlog version because of proposed API changes.\"\n\nThis reverts commit 932b9d0b8e432ec1a7ff175c8716c8948b0beddd.\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 ... | python | chosen |
[
{
"from": "system",
"value": "Update Mesos bindings to 0.27.0\n\nSummary: Won't take effect until we update the deb that's installed.\n\nTest Plan: staging (I've been able to install the generated deb on the staging scheduler)\n\nReviewers: kylec, paulruan\n\nReviewed By: paulruan\n\nSubscribers: changesbot... | python | chosen |
[
{
"from": "system",
"value": "Change package name, add license\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(name='nanomon',\n version='1.0',\n author='Michael Barrett',\n author_email='mike@brkt.com',\n description='The Nano Monitoring Syste... | python | chosen |
[
{
"from": "system",
"value": "ZON-4070: Fix typo (belongs to commit:9ec5886)\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='zeit.brightcove',\n version='2.10.2.dev0',\n author='gocept, Zeit Online',\n author_email='zon-backend@zeit.de... | python | chosen |
[
{
"from": "system",
"value": "Use git tag for package version.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"comt\",\n version=\"2.6.0\",\n url='http://www.co-ment.org',\n license='AGPL3',\n description=\"Web-based Text Annotatio... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.