conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Use ServerClass definition for server creation\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport BaseHTTPServer\n\nServerClass = BaseHTTPServer.HTTPServer\nRequestHandlerClass = BaseHTTPServer.BaseHTTPRequestHandler\n\nSERVER_NAME = ''\nSERVER_PORT ... | python | chosen |
[
{
"from": "system",
"value": "Make delete command message more meaningful"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\nfrom dateutil.relativedelta import relativedelta\n\nfrom legalaid.models import Case\nfrom cla_butler.tasks import DeleteOldData\n\n\ncl... | python | chosen |
[
{
"from": "system",
"value": "Fix one more get_query_set to get_queryset\n"
},
{
"from": "human",
"value": "from django.db import models\n\n\nclass SponsorManager(models.Manager):\n\n def active(self):\n return self.get_query_set().filter(active=True).order_by(\"level\")\n\n def wit... | python | chosen |
[
{
"from": "system",
"value": "Add a newline between files\n"
},
{
"from": "human",
"value": "from os.path import basename\nimport sys\n\nfrom django.core.management.base import BaseCommand\n\nfrom ...utils import to_db, transformer\n\n\n# TODO: Display help if unable to transform a file\n# TODO:... | python | chosen |
[
{
"from": "system",
"value": "Split `clean_content` into component functions\n\nProvides ability to use newspaper to parse articles whose source has\nalready been downloaded.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nfrom flask import Markup\nfrom newspaper imp... | python | chosen |
[
{
"from": "system",
"value": "Fix document query for existing documents\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nimport os\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"api.api.settings\")\n\n# import django\nimport logging\n\nfrom scrapi import events\... | python | chosen |
[
{
"from": "system",
"value": "Revert \"autodiff: remove unused imports\"\n\nThis reverts commit d0ad4944671d94673d0051bd8faf4f3cf5d93ca9.\n"
},
{
"from": "human",
"value": "class Function(object):\n def __init__(self, function, arg, backend):\n self._function = function\n self._... | python | chosen |
[
{
"from": "system",
"value": "Fix minor bug in broctl plugin.\n"
},
{
"from": "human",
"value": "import BroControl.plugin\nimport BroControl.config\n\nclass Napatech(BroControl.plugin.Plugin):\n def __init__(self):\n super(Napatech, self).__init__(apiversion=1)\n\n def name(self):\n... | python | chosen |
[
{
"from": "system",
"value": "Update the migration to changed text\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('sponso... | python | chosen |
[
{
"from": "system",
"value": "Add test of Position Angle from NASA HORIZONS\n"
},
{
"from": "human",
"value": "from skyfield.trigonometry import position_angle_of\nfrom skyfield.units import Angle\n\ndef test_position_angle():\n a = Angle(degrees=0), Angle(degrees=0)\n b = Angle(degrees=1)... | python | chosen |
[
{
"from": "system",
"value": "Fix migrations conflict after rebase\n"
},
{
"from": "human",
"value": "# Generated by Django 2.2.13 on 2020-10-25 18:35\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('workshops', '0220_even... | python | chosen |
[
{
"from": "system",
"value": "Disable Faye on development, for now.\n"
},
{
"from": "human",
"value": "from bugle_project.configs.settings import *\n\nFAYE_URL = None\n\nDATABASE_ENGINE = 'postgresql_psycopg2'\nDATABASE_NAME = 'bugle'\nDATABASE_USER = 'bugle'\n"
},
{
"from": "gpt",
"... | python | chosen |
[
{
"from": "system",
"value": "Handle dashboard redirect when there are no Child objects.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.contrib.auth.mixins import (LoginRequiredMixin,\n Per... | python | chosen |
[
{
"from": "system",
"value": "Include kv files in package.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport cplcom\n\n\nsetup(\n name='CPLCom',\n version=cplcom.__version__,\n packages=find_packages(),\n package_data={'cplcom': ['../media/*', '*.... | python | chosen |
[
{
"from": "system",
"value": "Set upgrade to version 0.2.0\n"
},
{
"from": "human",
"value": "# -*- coding: utf8 -*-\nimport os\nfrom setuptools import setup, find_packages\n\nos.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'\n\nsetup(\n name=\"django-basis\",\n version='0.1.9',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add missing required metadata for registering\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\n\nNAME = 'kaggle_tools'\nVERSION = '0.0.1'\nAUTHOR = 'Yassine Alouini'\nDESCRIPTION = \"\"\"This is a suite of tools to help you participate... | python | chosen |
[
{
"from": "system",
"value": "Include subdirectories in pip install\n"
},
{
"from": "human",
"value": "import os\nimport sys\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nconfig = {\n 'name': 'clouseau',\n 'description': 'A si... | python | chosen |
[
{
"from": "system",
"value": "Remove support for python 2.7 in package classifiers\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\nfrom github_backup import __version__\n\n\ndef open_file(fname):\n return open(os.pa... | python | chosen |
[
{
"from": "system",
"value": "Mark version as 2.0 beta for now\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef long_description():\n \"\"\"\n Build the long description from a README file located in the same director... | python | chosen |
[
{
"from": "system",
"value": "Include examples and scripts and comply with PEP8\n"
},
{
"from": "human",
"value": "try:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\nsetup(name='parcels',\n version='0.0.1',\n description=... | python | chosen |
[
{
"from": "system",
"value": "Rename exponentjs references in our libraries\n\nfbshipit-source-id: 21072ac\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='exponent_server_sdk',\n version='0.0.1',\n description='Exponent Server SDK for Python',\n url='https... | python | chosen |
[
{
"from": "system",
"value": "Add dependencies, psycopg2 for Postgres integration and PasteDeploy for configuration file support.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\n\ninstall_requires = (\n )\ndescription = \"An archive f... | python | chosen |
[
{
"from": "system",
"value": "Make caktus the owner, listing myself as a maintainer.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\n\nsetup(name=\"django-sanitizer\",\n version=\"0.3\",\n description=\"Django template filter application ... | python | chosen |
[
{
"from": "system",
"value": "Remove south from test requirements\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name = \"django-report-builder\",\n version = \"2.0.2\",\n author = \"David Burke\",\n author_email = \"david@burkesoftware.com... | python | chosen |
[
{
"from": "system",
"value": "Add six package version specifier\n"
},
{
"from": "human",
"value": "import os.path\n\nfrom ez_setup import use_setuptools\nuse_setuptools(min_version='0.6')\n\nfrom setuptools import setup, find_packages\n\n# read README as the long description\nreadme = 'README' i... | python | chosen |
[
{
"from": "system",
"value": "Add extra_require for development deps\n"
},
{
"from": "human",
"value": "import sys\nfrom setuptools import setup, find_packages\nfrom django_summernote import version, PROJECT\n\n\nMODULE_NAME = 'django_summernote'\nPACKAGE_DATA = list()\nCLASSIFIERS = [\n 'Dev... | python | chosen |
[
{
"from": "system",
"value": "Remove the README.md loading step\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nwith open('README.md') as f:\n description = f.read()\n\nfrom beewarn import VERSION\n\nsetup(name='beewarn',\n version=VERSION,\n description='Utility ... | python | chosen |
[
{
"from": "system",
"value": "Use Markdown description instead of pandoc conversion hack. Bump version.\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\ntry:\n import pypandoc\n\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n ... | python | chosen |
[
{
"from": "system",
"value": "Scrub references to \"Idiotic\" testing framework\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Copyright 2009, 2012 Dietrich Epp <depp@zdome.net>\n# See LICENSE.txt for details.\nfrom distutils.core import setup\nsetup(name='IdioTest',\n version=... | python | chosen |
[
{
"from": "system",
"value": "Update repo URL to github.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n# setup.py\n# colorific\n#\n\n\"\"\"\nPackage information for colorific.\n\"\"\"\n\nimport os\nfrom setuptools import setup\n\nreadme = os.path.join(os.path.dirname(__file__)... | python | chosen |
[
{
"from": "system",
"value": "Fix message lost issue in samples\n"
},
{
"from": "human",
"value": "import os.path\nimport shutil\nimport tempfile\nimport threading\nimport sys\n\nimport nanomsg as nn\n\n\ndef ping(url, event):\n with nn.Socket(protocol=nn.Protocol.NN_PUSH) as sock, sock.conne... | python | chosen |
[
{
"from": "system",
"value": "Enable versioning using Git tags, rendering of README in markdown syntax and limit depenencies by version.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nfrom codecs import open # To use a consistent encodin... | python | chosen |
[
{
"from": "system",
"value": "pypi: Add more Python version/implementation classifiers\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nimport re\n\n\ndef get_version():\n init_py = open('pykka/__init__.py').read()\n metadata = dict(re.findall(\"__([a-z]+)__ = '([^']+)'... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 7.0.3.\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": "Package name must be string, not Unicode\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nimport gutter\n\nsetup(\n name = u'gutter',\n version = gutter.__version__,\n author = gutter.__author__,\n author_email = u'william@subtlecoo... | python | chosen |
[
{
"from": "system",
"value": "Include missing numpy modules in build\n\n"
},
{
"from": "human",
"value": "from cx_Freeze import setup, Executable\n\n# Dependencies are automatically detected, but it might need\n# fine tuning.\nbuild_exe_options = {\n \"excludes\": [\n \"numpy\"\n ],... | python | chosen |
[
{
"from": "system",
"value": "Convert `packages` to a list\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name='cmsplugin-biography',\n version='0.0.1',\n packages='cmsplugin_biography',\n install_requires=[\n 'django-cms',\n 'djangocms-te... | python | chosen |
[
{
"from": "system",
"value": "Update for 1.6.0 - TODO: Add Windows"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name = 'brunnhilde',\n version = '1.5.4',\n url = 'https://github.com/timothyryanwalsh/brunnhilde',\n author = 'Tim Walsh',\n author_email =... | python | chosen |
[
{
"from": "system",
"value": "Change long description to URL.\n"
},
{
"from": "human",
"value": "import os, sys\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\ndef main():\n setup(\n name='stcrestclient',\n version= '1.0.2'... | python | chosen |
[
{
"from": "system",
"value": "Change title and fix spelling for pip package\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom setuptools import find_packages\n\nsetup(name='DSPP-Keras',\n version='0.0.3',\n description='Integration of DSPP database with Keral Machin... | python | chosen |
[
{
"from": "system",
"value": "Install future as a dependency\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom distutils.core import setup\ntry:\n long_description = open('README.md', 'r').read()\nexcept:\n long_description = ''\n\nsetup(\n name='samp-client',\n version=... | python | chosen |
[
{
"from": "system",
"value": "Include management commands when installed."
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n# 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\n# file, You can obtain... | python | chosen |
[
{
"from": "system",
"value": "Update project URL to point to GitHub.\n"
},
{
"from": "human",
"value": "# I prefer Markdown to reStructuredText. PyPi does not. This allows people to\n# install and not get any errors.\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md'... | python | chosen |
[
{
"from": "system",
"value": "Switch to using README.md for project description on pypi.\n"
},
{
"from": "human",
"value": "\"\"\"\nFlask-Babel\n-----------\n\nAdds i18n/l10n support to Flask applications with the help of the\n`Babel`_ library.\n\nLinks\n`````\n\n* `documentation <http://package... | python | chosen |
[
{
"from": "system",
"value": "Update release version to 0.0.5\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\nimport os\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\... | python | chosen |
[
{
"from": "system",
"value": "Add noop to migration file\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.13 on 2018-05-08 19:56\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nfrom django.db import migrations\nfrom corehq... | python | chosen |
[
{
"from": "system",
"value": "Use full file path for getting list of requirements (thanks @hodgestar)\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\n\n\ndef listify(filename):\n return filter(None, open(filename, 'r').readlines())\n\n\ndef read_file... | python | chosen |
[
{
"from": "system",
"value": "Include nt.db with package data.\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\ndescription = 'New testament greek app for django.'\nlong_desc = open('README.rst').read()\n\nsetup(\n name='django-greekapp',\n version='0.0.1',\n url='http... | python | chosen |
[
{
"from": "system",
"value": "Add specific version of rest framework\n"
},
{
"from": "human",
"value": "import ez_setup\nez_setup.use_setuptools()\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name = \"mobile-city-history\",\n version = \"1.0.0b2\",\n author = \"Jan-Christo... | python | chosen |
[
{
"from": "system",
"value": "Change path name to './'\n"
},
{
"from": "human",
"value": "from __future__ import print_function, division\n\nimport hashlib\nimport os\nimport json\n\n\nd = json.load(open(\"data/hashList.txt\"))\n\n\ndef generate_file_md5(filename, blocksize=2**20):\n m = hash... | python | chosen |
[
{
"from": "system",
"value": "Fix for when using python3.5. Don't install enum34 if enum already exists (python35)\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nreadme_path = os.path.join(os.path.dirname(\n os.path.abspath(__file__)),\n 'README.rst',\n)\nlong_de... | python | chosen |
[
{
"from": "system",
"value": "Add default value for filter so things don't break\n"
},
{
"from": "human",
"value": "from django.http import HttpResponse\nfrom django.shortcuts import render_to_response\nfrom store.models import FandomHierarchy\n\ndef frontpage(request, filter):\n\treturn render_... | python | chosen |
[
{
"from": "system",
"value": "Change SERVICE_LIST to a tuple\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\n# file, You can obtain one at http://mozilla.org/MPL/2.0/.... | python | chosen |
[
{
"from": "system",
"value": "Update collections.Callable typecheck to collections.abc.Callable\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport warnings\nimport collections\n\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\n\n\ndef su... | python | chosen |
[
{
"from": "system",
"value": "Remove manual INTERNAL_TYPE_ORDERING map in favor of explicit import tables\n"
},
{
"from": "human",
"value": "import itertools\n\nfrom thinglang.lexer.values.identifier import Identifier\n\n\"\"\"\nThe internal ordering of core types used by the compiler and runtim... | python | chosen |
[
{
"from": "system",
"value": "Add download and login functions\n"
},
{
"from": "human",
"value": "import os\n\nfrom synapseclient import Synapse, File\n\nexpression = 'syn11311347'\nmetadata = 'syn11311931'\n\n\ndef upload_file(file_path, login, parent, description=None):\n \"\"\"\n Upload... | python | chosen |
[
{
"from": "system",
"value": "Add test for 'No handlers could be found' problem\n"
},
{
"from": "human",
"value": "# Copyright 2018 gRPC authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | python | chosen |
[
{
"from": "system",
"value": "Test for infinite beam QC\n"
},
{
"from": "human",
"value": "import os\n\nimport unittest2 as unittest\nfrom tkp.quality.restoringbeam import beam_invalid\n\nfrom tkp.testutil.decorators import requires_data\nfrom tkp import accessors\nfrom tkp.testutil.data import ... | python | chosen |
[
{
"from": "system",
"value": "Correct bug in preflight check\n"
},
{
"from": "human",
"value": "import simple_salesforce\nfrom cumulusci.tasks.salesforce import BaseSalesforceApiTask\n\nclass is_rd2_enabled(BaseSalesforceApiTask):\n def _run_task(self):\n try:\n settings = s... | python | chosen |
[
{
"from": "system",
"value": "Add two tests for templates"
},
{
"from": "human",
"value": "\nfrom ..templates import QuandlFT\n\nclass TestTemplates(object):\n\n def test_quandl_ft(self):\n ftemp = QuandlFT(\"xxx\", trim_start=\"yyyy-mm-dd\", authtoken=\"yyy\")\n assert ftemp.so... | python | chosen |
[
{
"from": "system",
"value": "Fix no header test for csv formatter\n"
},
{
"from": "human",
"value": "import unittest, argparse\nfrom echolalia.formatter.csver import Formatter\n\nclass CsverTestCase(unittest.TestCase):\n\n def setUp(self):\n self.parser = argparse.ArgumentParser()\n self... | python | chosen |
[
{
"from": "system",
"value": "Fix accounts api wrapper import error\n"
},
{
"from": "human",
"value": "# Beyonic API Python bindings\r\n\r\n#default values if any\r\nDEFAULT_ENDPOINT_BASE = 'https://app.beyonic.com/api/'\r\n\r\n#config\r\napi_key = None\r\napi_endpoint_base = None\r\napi_version... | python | chosen |
[
{
"from": "system",
"value": "Add 'shared_targets' only when it doesn't exist\n\nAdd existence check before actually create it.\n\nChange-Id: I96946f736d7263f80f7ad24f8cbbc9a09eb3cc63\n"
},
{
"from": "human",
"value": "# Licensed under the Apache License, Version 2.0 (the \"License\"); you ma... | python | chosen |
[
{
"from": "system",
"value": "Make features accessible from root\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\n__version__ = '0.2.0.dev'\n\nfrom folium.folium import Map, initialize_notebook\n"
},
{
"from": "gpt",
"value": "# -*... | python | chosen |
[
{
"from": "system",
"value": "Fix MethodType only takes two parameters\n\nSigned-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>\n"
},
{
"from": "human",
"value": "\"\"\"\nSome extra picklers needed to gracefully dump and load a canvas.\n\"\"\"\n\nfrom future import standard_... | python | chosen |
[
{
"from": "system",
"value": "Split off two functions from GeometryExporter.__init__\n"
},
{
"from": "human",
"value": "print \"Loading \", __name__\n\nimport geometry, from_poser, to_lux\nreload(geometry)\nreload(from_poser)\nreload(to_lux)\nimport from_poser, to_lux\n\n\nclass GeometryExporter... | python | chosen |
[
{
"from": "system",
"value": "Add valid attribute with setter/getter\n"
},
{
"from": "human",
"value": "__version__ = (2014, 10, 0)\n\n\ndef get_version():\n \"\"\"\n :rtype: str\n \"\"\"\n return '.'.join(str(i) for i in __version__)\n\n\nclass Gignore(object):\n BASE_URL = 'http... | python | chosen |
[
{
"from": "system",
"value": "Fix to finding paths in nineml2nmodl\n\ngit-svn-id: c3c03ae8de67eddb7d242ee89b936c58f5138363@496 e4a6332b-da94-4e19-b8c2-16eed22ecab5\n"
},
{
"from": "human",
"value": "import nineml\nfrom nineml.abstraction_layer.testing_utils import RecordValue, TestableComponent\... | python | chosen |
[
{
"from": "system",
"value": "Set default to False, and update existing users.\n"
},
{
"from": "human",
"value": "\"\"\"GDPR restrict processing\n\nRevision ID: 174eb928136a\nRevises: d5b07c8f0893\nCreate Date: 2018-05-14 11:21:55.138387\n\n\"\"\"\n\n# revision identifiers, used by Alembic.\nrev... | python | chosen |
[
{
"from": "system",
"value": "Fix the thing that @quis broke.\n"
},
{
"from": "human",
"value": "import re\n\n\nclass Presenters(object):\n\n def __init__(self):\n return None\n\n def present(self, value, question_content):\n if \"type\" in question_content:\n fiel... | python | chosen |
[
{
"from": "system",
"value": "Use .string so we keep within BS parse tree\n"
},
{
"from": "human",
"value": "import markgen\nfrom bs4 import BeautifulSoup\n\nTAGS = {\n 'p': 'paragraph',\n 'div': 'paragraph',\n 'a': 'link',\n 'strong': 'emphasis',\n 'em': 'emphasis',\n 'b': 'em... | python | chosen |
[
{
"from": "system",
"value": "Check for router platform in auto-deploy script.\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nimport logging\n\nfrom django.core.management.base import BaseCommand\n\nfrom peering.models import InternetExchange\n\n\nclass Command(Bas... | python | chosen |
[
{
"from": "system",
"value": "Make version number match the latest tag\n\nWe have a 2.0.0 tag in github which points to code where the version\nclaims to be 1.0.0:\n\nhttps://github.com/alphagov/backdrop-collector/blob/2.0.0/backdrop/collector/__init__.py\n\nWe definitely have code which specifies 2.0.0 as ... | python | chosen |
[
{
"from": "system",
"value": "Add parents and gender to the list of values in serializer\n"
},
{
"from": "human",
"value": "from rest_framework import serializers\nfrom .models import Animal\n\nclass AnimalSerializer(serializers.HyperlinkedModelSerializer):\n class Meta:\n model = Anim... | python | chosen |
[
{
"from": "system",
"value": "Use absolute / implicit relative imports for local deps\n\nSince Composer is Python 2.7 only for now, this sample can use implicit\nrelative imports. Airflow doesn't seem to support explicit relative\nimports when I try to run the use_local_deps.py file in Composer.\n\nAside: A... | python | chosen |
[
{
"from": "system",
"value": "Install views on post_migrate rather than post_syncdb.\n"
},
{
"from": "human",
"value": "'''\nCreated on 3.12.2011\n\n@author: xaralis\n'''\nfrom os.path import dirname, join\n\nfrom django.db import models, connection\n\nfrom boris import reporting\nfrom boris.rep... | python | chosen |
[
{
"from": "system",
"value": "Remove copyright notice during preprocessing\n"
},
{
"from": "human",
"value": "import os\nimport pickle\n\n\ndef load_data(path):\n \"\"\"\n Load Dataset from File\n \"\"\"\n input_file = os.path.join(path)\n with open(input_file, \"r\") as f:\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix deprecated class NoArgsCommand class.\n\nSolve the warning RemovedInDjango110Warning: NoArgsCommand class is deprecated and will be removed in Django 1.10. Use BaseCommand instead, which takes no arguments by default.\n"
},
{
"from": "human",
"value": "\"\"\"\nA... | python | chosen |
[
{
"from": "system",
"value": "Fix pyglet breackage by controlling exports.\n"
},
{
"from": "human",
"value": "from contextlib import contextmanager\nfrom pyglet.gl import *\n\ndef ptr(*args):\n return (GLfloat * len(args))(*args)\n\n@contextmanager\ndef gl_disable(*bits):\n glPushAttrib(GL... | python | chosen |
[
{
"from": "system",
"value": "Use Docker config pointing at the correct interface/subnect for networking.\n"
},
{
"from": "human",
"value": "from pyinfra import inventory, state\n\nfrom pyinfra_docker import deploy_docker\nfrom pyinfra_etcd import deploy_etcd\nfrom pyinfra_kubernetes import depl... | python | chosen |
[
{
"from": "system",
"value": "Fix outdated PySDL2 version and non-PyPI install source\n"
},
{
"from": "human",
"value": "\nfrom pythonforandroid.recipe import PythonRecipe\n\n\nclass PySDL2Recipe(PythonRecipe):\n version = '0.9.3'\n url = 'https://bitbucket.org/marcusva/py-sdl2/downloads/P... | python | chosen |
[
{
"from": "system",
"value": "Remove generation of unnecessary generated.rst file\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom os.path import join, dirname, abspath\n\nfrom IPython.terminal.ipapp import TerminalIPythonApp\nfrom ipykernel.kernelapp import IPKernelApp\n\nhere =... | python | chosen |
[
{
"from": "system",
"value": "Add example of logging setting for Manila\n\nThis change demonstrates how we can define logging setting specific to\nmanila-ui, so that operators can easily understand how to customize\nlogging level and so on.\n\nChange-Id: Ia8505d988ed75e0358452b5b3c2889b364680f22\n"
},
{... | python | chosen |
[
{
"from": "system",
"value": "FEATURE: Return sys/platform version in tileserver health check\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\n__author__ = 'ray'\n__date__ = '3/2/15'\n\nfrom flask import make_response\n\n\ndef health_check():\n \"\"\"Return a dummy response\"\"... | python | chosen |
[
{
"from": "system",
"value": "Make api poitn to the right object\n"
},
{
"from": "human",
"value": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://w... | python | chosen |
[
{
"from": "system",
"value": "Add tests of terminal adding when grammar is create\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 23.06.2017 16:39\n:Licence GNUv3\nPart of grammpy\n\n\"\"\"\n\nfrom unittest import TestCase, main\nfrom grammpy i... | python | chosen |
[
{
"from": "system",
"value": "Tweak to migration so it is a bit faster for future migraters\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\n\nclass Migration(migrati... | python | chosen |
[
{
"from": "system",
"value": "Allow scope processor to handle multivalued attributes\n"
},
{
"from": "human",
"value": "from ..attribute_processor import AttributeProcessorError\nfrom .base_processor import BaseProcessor\n\n\nCONFIG_KEY_SCOPE = 'scope'\nCONFIG_DEFAULT_SCOPE = ''\n\n\nclass Scope... | python | chosen |
[
{
"from": "system",
"value": "Make View inherit from objects instead of PassthroughFuse\n"
},
{
"from": "human",
"value": "import os\nfrom abc import ABCMeta, abstractmethod\n\nfrom gitfs import FuseMethodNotImplemented\nfrom gitfs.filesystems.passthrough import PassthroughFuse\n\nclass View(Pa... | python | chosen |
[
{
"from": "system",
"value": "Change fixture upload task to json serializer\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom corehq.apps.fixtures.upload import upload_fixture_file\nfrom soil import DownloadBase\nfrom celery.... | python | chosen |
[
{
"from": "system",
"value": "Change runhooks failures on WebKit XP to not close the chromium.webkit tree.\n\nSince the failures are usually the bot's fault, not the patch's.\n\nR=maruel@chromium.org, iannucci@chromium.org, ojan@chromium.org\nBUG=262577\n\nReview URL: https://chromiumcodereview.appspot.com/... | python | chosen |
[
{
"from": "system",
"value": "Improve efficiency of new year chaos\n"
},
{
"from": "human",
"value": "#!/bin/python3\n\nimport math\nimport os\nimport random\nimport re\nimport sys\n\n# Complete the minimumBribes function below.\ndef minimumBribes(finalLine):\n if invalid(finalLine):\n retur... | python | chosen |
[
{
"from": "system",
"value": "Fix typos in comment of example code\n"
},
{
"from": "human",
"value": "\"\"\"\nExtend the Python Grammar\n==============================\n\nThis example demonstrates how to use the `%extend` statement,\nto add new syntax to the example Python grammar.\n\n\"\"\"\n\n... | python | chosen |
[
{
"from": "human",
"value": "Add test for conversation definition.\n"
},
{
"from": "gpt",
"value": "from vumi.tests.helpers import VumiTestCase\n\nfrom go.apps.rapidsms.definition import ConversationDefinition\n\n\nclass TestConversationDefinition(VumiTestCase):\n def test_conversation_type(s... | python | chosen |
[
{
"from": "system",
"value": "Add ability to convert to/from an array\n\nThis is needed as an easy way to serialize an interpolator for sending/receiving over HTTP\n"
},
{
"from": "human",
"value": "class Interpolator:\n def __init__(self):\n self.data = []\n\n def addIndexValue(sel... | python | chosen |
[
{
"from": "system",
"value": "Fix node/nodejs name conflict on Ubuntu systems\n"
},
{
"from": "human",
"value": "\"\"\"Host-only environment for Node.js.\"\"\"\n\nfrom pathlib import Path\n\nfrom foreman import define_parameter, decorate_rule\nfrom shipyard import install_packages\n\n\n(define_p... | python | chosen |
[
{
"from": "system",
"value": "Fix incompatibilities with latest paho lib\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom hackeriet.mqtt import MQTT\nfrom hackeriet.door import Doors\nimport threading, os, logging\n\nlogging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(... | python | chosen |
[
{
"from": "system",
"value": "Use pytest.skip so we can check the test wasn't skipped on the CI.\n"
},
{
"from": "human",
"value": "import os\nimport subprocess\n\nimport pathlib\nfrom django.conf import settings\nfrom django.test import TestCase\n\n\nclass MakeMessagesCommandRunTestCase(TestCas... | python | chosen |
[
{
"from": "system",
"value": "Update extension testdata to take **kwargs.\n"
},
{
"from": "human",
"value": "from grow import Preprocessor\nfrom protorpc import messages\n\n\nclass CustomPreprocessor(Preprocessor):\n KIND = 'custom_preprocessor'\n\n class Config(messages.Message):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add some extensions to the markdown parser\n\nUltimately we should make this a setting or hookset so it could be overridden at the site level."
},
{
"from": "human",
"value": "from markdown import Markdown\nfrom markdown.inlinepatterns import ImagePattern, IMAGE_LIN... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.