conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add bodytemplate.md to build artifacts\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nif __name__ == \"__main__\":\n import falafel\n\n setup(\n name=falafel.NAME,\n version=falafel.VERSION,\n description... | python | chosen |
[
{
"from": "system",
"value": "Remove version limit on sphinx\n"
},
{
"from": "human",
"value": "import setuptools\nimport versioneer\n\nif __name__ == \"__main__\":\n setuptools.setup(\n name='basis_set_exchange',\n version=versioneer.get_version(),\n cmdclass=versioneer.... | python | chosen |
[
{
"from": "system",
"value": "Add pytz to required dependencies\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nimport mzgtfs\n\nsetup(\n name='mzgtfs',\n version=mzgtfs.__version__,\n description='Mapzen GTFS',\n author='Ian Rees',\n author_email='ian@mapzen.com',\n url... | python | chosen |
[
{
"from": "system",
"value": "Fix version (0.2.2 never made it to PyPI)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# coding: utf8\n\n# Copyright 2014-2015 Vincent Jacques <vincent@vincent-jacques.net>\n\nimport contextlib\nimport os\nimport setuptools\nimport setuptools.command.te... | python | chosen |
[
{
"from": "system",
"value": "Change version from 12.3.0 to 12.3.1\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nREPO_URL = 'http://github.com/datasciencebr/serenata-toolbox'\n\n\nsetup(\n author='Serenata de Amor',\n author_email='op.serenatadeamor@gmail.com',\n cl... | python | chosen |
[
{
"from": "system",
"value": "Add holidays module to packages list\n\nCloses #14"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"How to release a new version: https://packaging.python.org/en/latest/distributing.html#uploading-your-project-to-pypi\"\"\"\n\nfrom businesstime import... | python | chosen |
[
{
"from": "system",
"value": "Update description and categories for PyPI\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nimport pykka\n\nsetup(\n name='Pykka',\n version=pykka.get_version(),\n author='Stein Magnus Jodal',\n author_email='stein.magnus@jodal.no',... | python | chosen |
[
{
"from": "system",
"value": "Change status from pre-alpha to beta (yeay \\o/)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\nfrom setuptools import setup, find_packages\nimport pyecore\n\nif sys.version_info < (3, 0):\n sys.exit('Sorry, Python < 3.0 is not supported'... | python | chosen |
[
{
"from": "system",
"value": "Prepare for next development cycle\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='udiskie',\n version='0.3.10',\n description='Removable disk automounter for udisks',\n author='Byron Clark',\n author_email='byron... | python | chosen |
[
{
"from": "system",
"value": "Add xlrd dependency for notebook\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='OpenFisca-Senegal',\n version='0.5.1',\n author='OpenFisca Team',\n a... | python | chosen |
[
{
"from": "system",
"value": "Put nbresuse js files in appropriate path\n\nHow did this work before?\n"
},
{
"from": "human",
"value": "import setuptools\n\nsetuptools.setup(\n name=\"nbresuse\",\n version='0.2.0',\n url=\"https://github.com/yuvipanda/nbresuse\",\n author=\"Yuvi Pand... | python | chosen |
[
{
"from": "system",
"value": "Update GitHub repos from blancltd to developersociety\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\n\nwith open('README.rst', 'r', 'utf-8') as f:\n readme = f.read()\n\n\nsetup(... | python | chosen |
[
{
"from": "system",
"value": "Enable Isosurface class by default"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nfrom setuptools import setup, find_packages\n\nentry_points = \"\"\"\n[glue.plugins]\nvispy_volume=glue_vispy_viewers.volume:setup\n... | python | chosen |
[
{
"from": "system",
"value": "Remove copy_file call because it doesn't work right with bdist_deb\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom distutils.core import setup\nfrom distutils.file_util import copy_file\nimport platform\n\nversion = \"0.1.0\"\n\nsetup(name=\"riemann-s... | python | chosen |
[
{
"from": "system",
"value": "Add polib as a dependency.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\ntry:\n from pypandoc import convert\n long_description = convert('README.md', 'rst')\nexcept IOError:\n print(\"w... | python | chosen |
[
{
"from": "system",
"value": "BLD: Implement alternative way of getting version number\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nAdapted from:\nhttps://packaging.python.org/tutorials/packaging-projects/\n\"\"\"\n\nimport setuptools\nfrom fsic import __version__\n\n\nwit... | python | chosen |
[
{
"from": "system",
"value": "Add vcrpy back to main program requirements\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='k2catalogue',\n version='0.0.1',\n author='Simon Walker',\n install_requires=['requests', 'sqlalchemy', 'ipython'... | python | chosen |
[
{
"from": "system",
"value": "Add six as a dependency.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport distutils.core\n\n# Uploading to PyPI\n# =================\n# $ python setup.py register -r pypi\n# $ python setup.py sdist upload -r pypi\n\nversion = '1.1'\ndistutils.core.... | python | chosen |
[
{
"from": "system",
"value": "Add 'Programming Language :: Python :: 3.4' to classifiers\n\nhttps://travis-ci.org/RyanBalfanz/django-smsish/builds/105968596"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.md'))... | python | chosen |
[
{
"from": "system",
"value": "feat: Add cert generator script as entry point\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup\n\nsetup(\n name='pynubank',\n version='1.2.0',\n url='https://github.com/andreroggeri/pynubank',\n author='André Rogg... | python | chosen |
[
{
"from": "system",
"value": "Upgrade tangled 1.0a11 => 1.0a12\n"
},
{
"from": "human",
"value": "from setuptools import setup, PEP420PackageFinder\n\n\nsetup(\n name='tangled.web',\n version='1.0a13.dev0',\n description='RESTful Web Framework',\n long_description=open('README.rst').... | python | chosen |
[
{
"from": "system",
"value": "Increment version with bug fixes"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='daffodil',\n version='0.3.0',\n author='James Robert',\n description='A Super-simple DSL for filtering datasets',\n license='MIT',\n ke... | python | chosen |
[
{
"from": "system",
"value": "Change version from dev to 0.1.0\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\n\nfrom setuptools import setup, find_packages\n\n\nREADME_FILE = os.path.join(os.path.dirname(__file__), 'README.rst')\n\nsetup(\n name='tomako',\n version=... | python | chosen |
[
{
"from": "system",
"value": "Update the required vectormath version to 0.1.0\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"\n properties: Fancy properties for Python.\n\"\"\"\n\nfrom distutils.core import setup\nfrom setuptools import find_packages\n\nCLASSIFIERS = [\n '... | python | chosen |
[
{
"from": "system",
"value": "Install the Avena library too.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python2\n\nfrom distutils.core import setup\n\nfrom hipshot import hipshot\n\n\n_classifiers = [\n 'Development Status :: 4 - Beta',\n 'Environment :: Console',\n 'Intended Aud... | python | chosen |
[
{
"from": "system",
"value": "Use exec instead of import to determine package version\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nfrom flask_mwoauth import __version__\n\nsetup(name='flask-mwoauth',\n version=__version__,\n description='Flask blueprint to connect... | python | chosen |
[
{
"from": "system",
"value": "Fix E226 missing whitespace around arithmetic operator\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n__all__ = [\"FibonacciGenerator\"]\n\n\nclass FibonacciGenerator(object):\n \"\"\"\n \"\"\"\n\n # We use List to cache already founded fibon... | python | chosen |
[
{
"from": "system",
"value": "Make example auth always true.\n"
},
{
"from": "human",
"value": "\"\"\"This is your typical app, demonstrating usage.\"\"\"\n\nimport os\n\nfrom flask_jsondash.charts_builder import charts\n\nfrom flask import (\n Flask,\n session,\n)\n\napp = Flask(__name__)... | python | chosen |
[
{
"from": "system",
"value": "Add port as conf var\n"
},
{
"from": "human",
"value": "from flask import Flask\n\n# from image_classification import ImageClassifier\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef home():\n return 'Hello classification world!'\n\n\nif __name__ == '__main__':... | python | chosen |
[
{
"from": "system",
"value": "Support plotting multiple score files\n"
},
{
"from": "human",
"value": "from __future__ import print_function\nfrom __future__ import unicode_literals\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom future import standard_library\nsta... | python | chosen |
[
{
"from": "system",
"value": "Fix baud rate for temperature sensor\n"
},
{
"from": "human",
"value": "import serial\nimport threading\n\nprint('Starting server...')\n\ntemperature_usb = '/dev/ttyAMA0'\nBAUD_RATE = 9600\ntemperature_ser = serial.Serial(temperature_usb, BAUD_RATE)\n\ndef process_l... | python | chosen |
[
{
"from": "system",
"value": "Check 'role_list' before sending it to little_chef\n"
},
{
"from": "human",
"value": "\"\"\"Dashboard template filters\"\"\"\nfrom django import template\nimport littlechef\n\nfrom kitchen.settings import REPO\n\nregister = template.Library()\n\n\n@register.filter(n... | python | chosen |
[
{
"from": "system",
"value": "Remove + character from generated URLs\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport re\n\n_strip_re = re.compile(ur'[\\'\"`‘’“”′″‴]+')\n_punctuation_re = re.compile(ur'[\\t !#$%&()*\\-/<=>?@\\[\\\\\\]^_{|}:;,.…‒–—―]+')\n\ndef makename(text, d... | python | chosen |
[
{
"from": "system",
"value": "Refactor method string to date\n"
},
{
"from": "human",
"value": "from datetime import datetime\n\nfrom rest_framework import renderers\nfrom icalendar import Calendar, Event\n\n\nclass ICalRenderer(renderers.BaseRenderer):\n media_type = 'text/calendar'\n for... | python | chosen |
[
{
"from": "human",
"value": "Raise ImproperlyConfigured if django migrations module does not exist (for South users).\n"
},
{
"from": "gpt",
"value": "\"\"\"\nDjango migrations for robots app\n\nThis package does not contain South migrations. South migrations can be found\nin the ``south_migrati... | python | chosen |
[
{
"from": "system",
"value": "Use named tuple for return value\n"
},
{
"from": "human",
"value": "# from subprocess import CalledProcessError\nimport subprocess\n\n\ndef run_through_shell(command, enable_shell=False):\n \"\"\"\n Retrieves output of command\n Returns tuple success (boole... | python | chosen |
[
{
"from": "system",
"value": "Use Glass.wav if it exists.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom random import randint\nfrom time import sleep\nfrom os import system\nfrom easygui import msgbox\n\nwhile True:\n delay = randint(60, 2000)\n sleep(delay)\n system(\"aplay ... | python | chosen |
[
{
"from": "system",
"value": "Add test to make sure `run_applescript` throws on bad script\n"
},
{
"from": "human",
"value": "\"\"\"\ntest_itunes.py\n\nCopyright © 2015 Alex Danoff. All Rights Reserved.\n2015-08-02\n\nThis file tests the functionality provided by the itunes module.\n\"\"\"\n\nim... | python | chosen |
[
{
"from": "system",
"value": "Fix unicode string syntax for Python 3\n"
},
{
"from": "human",
"value": "from os.path import abspath, join, dirname\nimport random\n\n\n__title__ = 'names'\n__version__ = '0.2'\n__author__ = 'Trey Hunner'\n__license__ = 'MIT'\n\n\nfull_path = lambda filename: abspa... | python | chosen |
[
{
"from": "system",
"value": "Bump version 0.1.0 -> 0.2.0\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom textblob_fr.taggers import PatternTagger\nfrom textblob_fr.sentiments import PatternAnalyzer\n\n__version__ = '0.2.0-dev'\n__author__... | python | chosen |
[
{
"from": "system",
"value": "Add tests for UNC path validator\n"
},
{
"from": "human",
"value": "from unittest import TestCase\n\nfrom win_unc import validators as V\n\n\nclass TestIsValidDriveLetter(TestCase):\n def test_valid(self):\n self.assertTrue(V.is_valid_drive_letter('A'))\n ... | python | chosen |
[
{
"from": "system",
"value": "Add method save, manager create or update on opps db redis\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom opps.db.conf import settings\n\nfrom redis import ConnectionPool\nfrom redis import Redis as RedisClient\n\n\nclass Red... | python | chosen |
[
{
"from": "system",
"value": "Implement autoloading and summary function\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\"\"\"Processor for remote INDRA JSON files.\"\"\"\n\nimport requests\nfrom typing import List\n\nfrom ..statements import Statement, stmts_from_json\n\n__all__ ... | python | chosen |
[
{
"from": "system",
"value": "Add exception to be thrown by select()\n"
},
{
"from": "human",
"value": "class McDatabaseHandlerException(Exception):\n \"\"\"Database handler exception.\"\"\"\n pass\n\n\nclass McConnectException(McDatabaseHandlerException):\n \"\"\"__connect() exception.... | python | chosen |
[
{
"from": "system",
"value": "Fix invalid fallback leading to circular calls\n\nRemove redundant finally\n"
},
{
"from": "human",
"value": "from djoser.conf import settings\n\ntry:\n from django.contrib.auth.password_validation import validate_password\nexcept ImportError:\n from password_... | python | chosen |
[
{
"from": "system",
"value": "Add test for template parsing\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, division, print_function\n\nimport pytest\nfrom i19.command_line.screen import I19Screen\n\ndef test_i19screen_command_line_help_does_not_crash():\n I19Screen()... | python | chosen |
[
{
"from": "system",
"value": "Add unit test using mock\n"
},
{
"from": "human",
"value": "from os.path import join\nimport sublime\nimport sys\nfrom unittest import TestCase\n\nversion = sublime.version()\n\nif version < '3000':\n from libsass import pathutils\nelse:\n from sublime_libsass... | python | chosen |
[
{
"from": "system",
"value": "Revert to using jmbo gis flag\n"
},
{
"from": "human",
"value": "from django.utils.translation import ugettext as _\n\nfrom jmbo.views import ObjectList\n\nfrom jmbo_calendar.models import Event\n\n\nclass ObjectList(ObjectList):\n\n def get_context_data(self, **... | python | chosen |
[
{
"from": "system",
"value": "Modify gatekeeper config for master.chromium.chrome after switch to recipes\n\nBUG=338501\n\nReview URL: https://codereview.chromium.org/131033006\n\ngit-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@249524 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human"... | python | chosen |
[
{
"from": "system",
"value": "Add deps for python lib\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\nsetup(name='Spiff',\n version='0.1',\n description=\"API to Spaceman Spiff\",\n author='Trever Fischer',\n author_email='wm161@wm161.net... | python | chosen |
[
{
"from": "system",
"value": "Correct test - vanilla_date not tuple.\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom calexicon.internal.julian import distant_julian_to_gregorian, julian_to_gregorian\n\n\nclass TestJulian(unittest.TestCase):\n def test_distant_julian_to_gregorian(se... | python | chosen |
[
{
"from": "system",
"value": "Change UI gets to use readline instead of read\n"
},
{
"from": "human",
"value": "from pythonwarrior.config import Config\nimport time\n\n\nclass UI(object):\n @staticmethod\n def puts(msg):\n if Config.out_stream:\n return Config.out_stream.... | python | chosen |
[
{
"from": "system",
"value": "Add __repr__ and __str__ for DB model\n"
},
{
"from": "human",
"value": "import sqlalchemy as sa\nfrom database import Base\n\n\nclass Song(Base):\n __tablename__ = 'songs'\n song_hash = sa.Column(sa.String(40), primary_key=True)\n filename = sa.Column(sa.T... | python | chosen |
[
{
"from": "system",
"value": "Remove 'None' in embed description\n"
},
{
"from": "human",
"value": "import discord\nfrom discord.ext import commands\n\n\nclass CustomContext(commands.Context):\n async def error(self, title: str, description: str = None):\n em = discord.Embed(\n ... | python | chosen |
[
{
"from": "system",
"value": "Handle non-enum inputs (if they are enum names)\n"
},
{
"from": "human",
"value": "\"\"\"\nCustom types.\n\n\"\"\"\nfrom six import text_type\n\nfrom sqlalchemy.types import TypeDecorator, Unicode\n\n\nclass EnumType(TypeDecorator):\n \"\"\"\n SQLAlchemy enum ... | python | chosen |
[
{
"from": "system",
"value": "Fix docstring and class name"
},
{
"from": "human",
"value": "#\n# Copyright (c) 2006, 2007 Canonical\n#\n# Written by Gustavo Niemeyer <gustavo@niemeyer.net>\n#\n# This file is part of Storm Object Relational Mapper.\n#\n# Storm is free software; you can redistribu... | python | chosen |
[
{
"from": "system",
"value": "Fix warnings during installation with python 3.8\n\nThe warning was:\n> .../lib/python3.8/site-packages/tigre/utilities/im3Dnorm.py:36:\n> SyntaxWarning: \"is\" with a literal. Did you mean \"==\"?\n"
},
{
"from": "human",
"value": "import numpy as np\r\n\r\ndef im3... | python | chosen |
[
{
"from": "system",
"value": "Improve the responses. In the case of the success the json was invalid. It required quotes\n"
},
{
"from": "human",
"value": "\"\"\"\n@author: Ferdinand E. Silva\n@email: ferdinandsilva@ferdinandsilva.com\n@website: http://ferdinandsilva.com\n\"\"\"\nimport os\n\n\n... | python | chosen |
[
{
"from": "system",
"value": "Change this test to not expect an error."
},
{
"from": "human",
"value": "import unittest\n\nfrom flask import Flask\nfrom flask_selfdoc import Autodoc\n\n\nclass TestErrorHandling(unittest.TestCase):\n def test_app_not_initialized(self):\n app = Flask(__n... | python | chosen |
[
{
"from": "system",
"value": "Disable tests the launch programs with 'watch'\n"
},
{
"from": "human",
"value": "import os\nimport time\nimport subprocess\n\nfrom sniffer.api import select_runnable, file_validator, runnable\ntry:\n from pync import Notifier\nexcept ImportError:\n notify = N... | python | chosen |
[
{
"from": "system",
"value": "Patch to update old accounts property\n"
},
{
"from": "human",
"value": "# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors\n# License: GNU General Public License v3. See license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\n\nd... | python | chosen |
[
{
"from": "system",
"value": "Update face detect example to take a path argument\n"
},
{
"from": "human",
"value": "from scannerpy import Database, DeviceType, Job\nfrom scannerpy.stdlib import pipelines\nimport subprocess\nimport cv2\nimport sys\nimport os.path\nsys.path.append(os.path.dirname(... | python | chosen |
[
{
"from": "system",
"value": "Add http dependency for plugins.\n"
},
{
"from": "human",
"value": "from .service import PluginService\n\n__meta__ = {\n \"name\": \"Plugin Manager\",\n \"class\": PluginService,\n \"deps\": [\"messaging\", \"simpledb\", \"appmanager\"],\n \"config\": [\... | python | chosen |
[
{
"from": "system",
"value": "Allow searching of vanity urls\n"
},
{
"from": "human",
"value": "from django.contrib import admin\nfrom friendlyurls.models import *\n\nclass UrlMappingAdmin(admin.ModelAdmin):\n list_display = ('friendly_path', 'resolved_url', 'content_type', 'object')\nadmin.sit... | python | chosen |
[
{
"from": "system",
"value": "Set serializer_class on ObtainAuthToken view\n"
},
{
"from": "human",
"value": "from rest_framework.views import APIView\nfrom rest_framework import parsers\nfrom rest_framework import renderers\nfrom rest_framework.response import Response\nfrom rest_framework.auth... | python | chosen |
[
{
"from": "system",
"value": "Make role_id & bypass opt args in Policy __init__\n"
},
{
"from": "human",
"value": "from sqlalchemy import UniqueConstraint\nfrom infosystem.common.subsystem import entity\nfrom infosystem.database import db\n\n\nclass Policy(entity.Entity, db.Model):\n\n attrib... | python | chosen |
[
{
"from": "system",
"value": "Fix Intro Eval with Unbuffered Streams\n"
},
{
"from": "human",
"value": "#!/usr/bin/python2.7\n\ndel __builtins__.__dict__['__import__']\ndel __builtins__.__dict__['reload']\n\nflag = \"eval_is_fun\"\n\ndef main():\n print \"Hi, welcome to the flag database. We ... | python | chosen |
[
{
"from": "system",
"value": "Add initial data for the ``Interest`` model.\n"
},
{
"from": "human",
"value": "import urlparse\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.sites.models import Site\n\n\nclass Command(BaseCommand):\n\... | python | chosen |
[
{
"from": "system",
"value": "Change version to 1.0.3 (dev)\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n{\n \"name\": \"Account Credit Transfer\",\n \"version\": \"1.0.2\",\n \"author\": \"XCG Consulting\",\n \"website\": \"http://www.openerp-experts.com\",\n \"c... | python | chosen |
[
{
"from": "system",
"value": "trivial: Make it obvious where we're getting our names from\n\nChange-Id: Ib9aa790c8999e50a2a3587561604ff1e51666f38\nSigned-off-by: Stephen Finucane <492121341a95b3c3aab646bed44634f739dd019b@redhat.com>\n"
},
{
"from": "human",
"value": "# Copyright 2012 Nebula, Inc... | python | chosen |
[
{
"from": "system",
"value": "Make stable builder pull from 1.10\n\nR=kasperl@google.com\nBUG=\n\nReview URL: https://codereview.chromium.org/1107673002\n\ngit-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@294974 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human",
"value": "# Copyri... | python | chosen |
[
{
"from": "system",
"value": "Allow dumping illegal utf-8 contents\n"
},
{
"from": "human",
"value": "import sys\nimport bsddb3\nfrom xclib.utf8 import utf8, unutf8\n\ndef perform(args):\n domain_db = bsddb3.hashopen(args.domain_db, 'c', 0o600)\n if args.get:\n print(unutf8(domain_d... | python | chosen |
[
{
"from": "system",
"value": "Add the PXE VendorPassthru interface to PXEDracDriver\n\nWithout the PXE VendorPassthru interface to expose the \"pass_deploy_info\"\nmethod in the vendor_passthru endpoint of the API the DRAC it can't\ncontinue the deployment after the ramdisk is booted.\n\nCloses-Bug: #137970... | python | chosen |
[
{
"from": "system",
"value": "Use bare image name dependent on base image name\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\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 obtain ... | python | chosen |
[
{
"from": "system",
"value": "Test now prints out all kanji\n"
},
{
"from": "human",
"value": "from readKanjiFile import *\n\ndef main():\n testDict = readKanjiFile('kanjiTestFile.txt')\n\n print('There are {} entries in this dictionary.'.format(len(testDict)))\n for entry in list(testD... | python | chosen |
[
{
"from": "system",
"value": "Move an import to top\n"
},
{
"from": "human",
"value": "from sixquiprend.sixquiprend import app, db\n\nclass ChosenCard(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n user_id = db.Column(db.Integer, db.ForeignKey('user.id', ondelete=\"CASCADE\"))... | python | chosen |
[
{
"from": "system",
"value": "Set the secure flag for both our cookies\n"
},
{
"from": "human",
"value": "from .base import *\n\nDEBUG = False\nALLOWED_HOSTS = ['selling-online-overseas.export.great.gov.uk']\nADMINS = (('David Downes', 'david@downes.co.uk'),)\n\nMIDDLEWARE_CLASSES += [\n 'cor... | python | chosen |
[
{
"from": "system",
"value": "Remove reference to non-existing data directory.\n\ngit-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@513 ead46cd0-7350-4e37-8683-fc4c6f79bf00\n"
},
{
"from": "human",
"value": "def configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_ut... | python | chosen |
[
{
"from": "system",
"value": "Remove config files from filesystem on teardown\n\n[DEV-13843]\n"
},
{
"from": "human",
"value": "\"\"\"\nTeardown the CloudBolt resources (container_orchestrator, environment)\nassociated with this Kubernetes cluster.\n\"\"\"\nfrom common.methods import set_progres... | python | chosen |
[
{
"from": "system",
"value": "Add command line option to set log level\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"Command Line Interface.\"\"\"\n\nimport argparse\nimport sys\n\ndef main(argv):\n \"\"\"Entry point for the pic2map.py script.\"\"\"\n args = parse_argum... | python | chosen |
[
{
"from": "system",
"value": "Fix wrong destination for postactivate file."
},
{
"from": "human",
"value": "# coding: utf-8\nfrom os.path import join, dirname, pardir, abspath\nfrom shutil import copy\nimport subprocess\n\n\nBOOTSTRAP = abspath(dirname(__file__))\nROOT = abspath(join(BOOTSTRAP, ... | python | chosen |
[
{
"from": "system",
"value": "Make program close on any keypress\n"
},
{
"from": "human",
"value": "import map\nimport curses\n\n# Set up Curses screen\nscreen = curses.initscr()\n\ncurses.noecho()\nscreen.keypad(True)\ncurses.cbreak()\ncurses.halfdelay(5) # Wait for half a second for input ... | python | chosen |
[
{
"from": "system",
"value": "Enable native custom elements for Pica benchmark\n\nR=tonyg@chromium.org\nBUG=245358\n\nReview URL: https://codereview.chromium.org/22884003\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@217042 0039d316-1c4b-4281-b951-d872f2087c98\n"
},
{
"from": "human",
... | python | chosen |
[
{
"from": "system",
"value": "Use broker IP instead of domain name\n\nChange-Id: Ide27c97a00c18ac62c1a92e2ec51c74c5af4cf30\nReviewed-on: http://review.couchbase.org/81029\nTested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>\nReviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828c... | python | chosen |
[
{
"from": "system",
"value": "Fix test error when coverage is not installed\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license... | python | chosen |
[
{
"from": "system",
"value": "Use dynamic self.__class__ and not name directly\n"
},
{
"from": "human",
"value": "import logging\n\nimport yaml\n\n\nl = logging.getLogger(__name__)\n\n\ndef _replace_with_type(type_, replace_type, data):\n if isinstance(data, type_):\n return replace_ty... | python | chosen |
[
{
"from": "system",
"value": "Create the user if it isn't already in the database first, then make it an admin.\n"
},
{
"from": "human",
"value": "from pyramid.response import Response\nfrom pi_director.models.models import (\n DBSession,\n MyModel,\n )\nfrom pi_director.models.UserMode... | python | chosen |
[
{
"from": "system",
"value": "Use collect_libs for finding libs"
},
{
"from": "human",
"value": "from conans import ConanFile, CMake\n\n\nclass SocketwConan(ConanFile):\n name = \"SocketW\"\n version = \"3.10.36\"\n license = \"GNU Lesser General Public License v2.1\"\n url = \"https... | python | chosen |
[
{
"from": "system",
"value": "Adjust the example_projects to work\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom django_jinja.base import Library\nimport jinja2\n\nregister = Library()\n\n@register.filter\n@jinja2.contextfilter\ndef datetimeformat(ctx, value, format='%H:%M / ... | python | chosen |
[
{
"from": "system",
"value": "feat: Add description column to Restaurant\n"
},
{
"from": "human",
"value": "import sys\nfrom sqlalchemy import Column, ForeignKey, Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import relationship\nfrom sqlalchemy im... | python | chosen |
[
{
"from": "system",
"value": "Fix import error during setup.py install\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# libgreader\n# Copyright (C) 2012 Matt Behrens <askedrelic@gmail.com>\n# Python library for the Google Reader API\n\n__author__ = \"Matt Behrens <askedrelic@gma... | python | chosen |
[
{
"from": "system",
"value": "Add early import to fix problems with other packages and Twisted.\n"
},
{
"from": "human",
"value": "from django.apps import AppConfig\n\n#from .binding.base import BindingMetaclass\nfrom .package_checks import check_all\n\n\nclass ChannelsConfig(AppConfig):\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Test that an error in post_gen_project aborts generation\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport pytest\n\nfrom cookiecutter import generate\nfrom cookiecutter import exceptions\n\n\n@pytest.mark.usefixtures('clean_system')\ndef test_pre... | python | chosen |
[
{
"from": "system",
"value": "Use the UFOs not the OTFs\n\nOops, the OTF are not interpolation compatible due to overlap removal, I\nshould have use the UFOs all along. Now the script passes without\nerrors, still need to verify the output.\n"
},
{
"from": "human",
"value": "from psautohint impo... | python | chosen |
[
{
"from": "system",
"value": "Remove db interfaces from the alembic version reset helper script.\n\nArguably, this script is no longer especially useful now that we\nonly have a single database for the broker. That said, removed the\ninterfaces in case folks are still using it.\n"
},
{
"from": "huma... | python | chosen |
[
{
"from": "system",
"value": "Break out items pending deprecation, remove double underscores\n"
},
{
"from": "human",
"value": "from fabric import api as __api\n\n# Setup some default values.\n__api.env.deploy_user = 'webapps'\n\nfrom denim.paths import (cd_deploy, cd_package, deploy_path, packa... | python | chosen |
[
{
"from": "system",
"value": "Add a getConcentrationRequirement to corrospond to getMajorRequirement\n"
},
{
"from": "human",
"value": "from major import Major\n\nclass Concentration(Major):\n\tdef __init__(self, dept=\"NONE\"):\n\t\tsuper().__init__(dept, path=\"concentrations/\")\n\nif __name_... | python | chosen |
[
{
"from": "system",
"value": "Fix container list bug when missing image\n"
},
{
"from": "human",
"value": "\n\ndef getContainerDetails(container):\n ip = 'N/A'\n if container.state().network != None and container.state().network.get('eth0') != None:\n if len(container.state().networ... | python | chosen |
[
{
"from": "system",
"value": "Fix logging of stats collected by MemoryDebugger extension.\n\nStats are printed on spider_closed event;\nengine_stopped signal is called after spider_closed signal,\nso stats for MemoryDebugger extension were not printed to user.\n"
},
{
"from": "human",
"value": "... | python | chosen |
[
{
"from": "system",
"value": "Refactor split_path code for brevity and clarity\n"
},
{
"from": "human",
"value": "import os\n\n\ndef split_path(path):\n \"\"\"\n Split a url path into its sub-paths.\n\n A url's sub-paths consist of all substrings ending in / and starting at\n the sta... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.