conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "[REF] openacademy: Modify copy method into inherit\n"
},
{
"from": "human",
"value": "from openerp import fields, models\n\n'''\nThis module create model of Course\n'''\n\nclass Course(models.Model):\n '''\n This class create model of Course\n '''\n _nam... | python | chosen |
[
{
"from": "system",
"value": "Allow Google AppEngine Memcache stub to be used for running unit tests including calls to caching layer\n"
},
{
"from": "human",
"value": "# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses... | python | chosen |
[
{
"from": "system",
"value": "Add get_updated_field to search index\n"
},
{
"from": "human",
"value": "from django.template.loader import get_template\nfrom django.template import Context\n\nfrom haystack import indexes\nfrom haystack import site\n\nfrom comics.core.models import Image\n\nclass ... | python | chosen |
[
{
"from": "system",
"value": "Sort files before hashing to ensure consistency\n"
},
{
"from": "human",
"value": "import os\nimport hashlib\n\nclass Hasher(object):\n def __init__(self):\n self._hash = hashlib.sha1()\n \n def update(self, arg):\n self._hash.update(_sha1(arg... | python | chosen |
[
{
"from": "system",
"value": "Make the error message stand out more for the user when we reject an svn commit.\n"
},
{
"from": "human",
"value": "from django.core.management import BaseCommand, CommandError\nfrom mysite.missions import controllers\nimport sys\n\nclass Command(BaseCommand):\n ... | python | chosen |
[
{
"from": "system",
"value": "CHange settings name for tenant dir\n"
},
{
"from": "human",
"value": "from django.utils._os import safe_join\nimport os\nfrom django.conf import settings\nfrom django.contrib.staticfiles.finders import FileSystemFinder\nfrom bluebottle.clients.models import Client\... | python | chosen |
[
{
"from": "system",
"value": "build: Fix usage of local streamer_binaries module\n\nThe old code would search the directory for the binary to use. This\nworked fine if the package were installed, but when adding the module\npath to PYTHONPATH, this technique would fail because the folder would\nhave execut... | python | chosen |
[
{
"from": "system",
"value": "Raise an error when a symbol cannot be found\n"
},
{
"from": "human",
"value": "class Environment:\n def __init__(self, par=None, bnd=None):\n if bnd:\n self.binds = bnd\n else:\n self.binds = {}\n \n self.par... | python | chosen |
[
{
"from": "system",
"value": "Switch back the good agg version (instead of agg+)\n"
},
{
"from": "human",
"value": "# -----------------------------------------------------------------------------\n# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.\n# Distributed under the (new) B... | python | chosen |
[
{
"from": "system",
"value": "Add file source and subjectID to processing exceptions\n"
},
{
"from": "human",
"value": "import pandas\nimport traceback\nimport typing\n\n\ndef process_files(file_iterator: typing.Iterator[typing.IO], processor: typing.Callable) -> pandas.DataFrame:\n\n def get... | python | chosen |
[
{
"from": "system",
"value": "Fix static url path error.\n"
},
{
"from": "human",
"value": "\"\"\"\n hello/__init__.py\n ------------------\n Initializes Flask application and brings all components together.\n\n\"\"\"\nfrom flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfr... | python | chosen |
[
{
"from": "system",
"value": "Fix pip installs of astropy-helpers"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n# NOTE: most of the configuration, including the version number,\n# is defined in setup.cfg\n\nimport sys\n... | python | chosen |
[
{
"from": "system",
"value": "Use a short string for the license.\n"
},
{
"from": "human",
"value": "from os.path import join, dirname\nfrom setuptools import setup\n\nimport django_ponydebugger\n\n\nwith open(join(dirname(__file__), 'README.rst')) as f:\n readme = f.read()\n\nwith open(join(... | python | chosen |
[
{
"from": "system",
"value": "Update version (0.3 -> 0.4)\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nentry_points = {\n 'console_scripts': [\n 'whatportis=whatportis.main:run',\n ]\n}\nrequirements = open('requirements.txt').read()\nreadme = open('README.rst'... | python | chosen |
[
{
"from": "system",
"value": "Add Python-2.7 as a platform kitchen runs on\n"
},
{
"from": "human",
"value": "#!/usr/bin/python -tt\n# -*- coding: utf-8 -*-\n\nfrom setuptools import find_packages, setup\nimport kitchen.release\n\nsetup(name='kitchen',\n version=kitchen.release.__version__,... | python | chosen |
[
{
"from": "system",
"value": "Update Development Status to stable\n"
},
{
"from": "human",
"value": "\"\"\" Drupdates setup script. \"\"\"\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='Drupdates',\n description='Drupal ... | python | chosen |
[
{
"from": "system",
"value": "Change version lookup for packaging.\n\nThe current approach imports the version directly from crmngr. This\nis a problem if the build environment does not have crmngr runtime\nlibraries installed and leads to having unnecessary build dependencies.\nThe new approach extracts th... | python | chosen |
[
{
"from": "system",
"value": "Update author to CSC - IT Center for Science Ltd.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = '0.2'\n\nsetup(\n name='ckanext-oaipmh',\n version=version,\n description=\"OAI-PMH harvester for CKAN\",\n long... | python | chosen |
[
{
"from": "system",
"value": "Switch to OSI license for Pypi\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\nimport sockjsroom\n\n# Setup library\nsetup(\n # Pypi name\n name = \"sockjsroom\",\n # Rele... | python | chosen |
[
{
"from": "system",
"value": "Add 'ujson' requirement for tests & aiohttp\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nimport codecs\nfrom setuptools import setup, find_packages\n\nsetup(\n name='Venom',\n version='1.0.0a1',\n pack... | python | chosen |
[
{
"from": "system",
"value": "Fix other names of packages\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n rack-ddnsm\n ~~~~~\n\n Dynamic DNS metadata for Rackspace Cloud DNS, \n manages TXT records containing metadata in the format of title... | python | chosen |
[
{
"from": "system",
"value": "Use static definition for package data."
},
{
"from": "human",
"value": "import os\nfrom distutils.core import setup\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\ndef package_data(package):\n package_data = []\n ... | python | chosen |
[
{
"from": "system",
"value": "Include templates in package distribution\n"
},
{
"from": "human",
"value": "import sys\nfrom setuptools import setup\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long descr... | python | chosen |
[
{
"from": "system",
"value": "Add \"box.text\" back to namespaced package\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nfrom __future__ import unicode_literals\nfrom setuptools import setup, find_packages\nfrom os.path import dirname, join\n\n\ndef main():\n base_dir = dirname(__file_... | python | chosen |
[
{
"from": "system",
"value": "Bump version to a major number now that it's tested and we broke some APIs\n"
},
{
"from": "human",
"value": "\nfrom setuptools import setup\n\nsetup(\n name=\"public-drive-urls\",\n version='0.4.0',\n author=\"Brian Peterson\",\n author_email=\"bepeters... | python | chosen |
[
{
"from": "system",
"value": "Increase version number so we can start adding 1.9 support\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nfrom setuptools import find_packages\n\nVERSION = '0.1.4'\n\nsetup(\n name='spockbot',\n description='High level Python framework ... | python | chosen |
[
{
"from": "system",
"value": "Add shapefile library, used for shapefile-based fixtures.\n"
},
{
"from": "human",
"value": "import os.path\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nversion_path = os.path.join(os.path.dirname(__file__), 'VERSION')\nwith open(version_pa... | python | chosen |
[
{
"from": "system",
"value": "Make sure we require at least python 2.7\n"
},
{
"from": "human",
"value": "import os\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nfrom pypvwatts.__version__ import VERSION\n\nsetup(\n name='pypvwatts',\n... | python | chosen |
[
{
"from": "system",
"value": "Add a temporary dependency on nose-parameterized.\n"
},
{
"from": "human",
"value": "import os\nimport setuptools\n\nREADME = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.rst')\n\nsetuptools.setup(\n name='theanets',\n version='0.8.0pre',\n... | python | chosen |
[
{
"from": "system",
"value": "Use Manuel instead of doctest. Missed a bit :-(\n"
},
{
"from": "human",
"value": "# Copyright (c) 2008-2009 Simplistix Ltd\n# See license.txt for license details.\n\nimport os\nfrom setuptools import setup, find_packages\n\nname = 'testfixtures'\nbase_dir = os.path... | python | chosen |
[
{
"from": "system",
"value": "Include .encoders and .decoders packages with the distribution"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom distutils.core import setup\n\nsetup(\n name = 'AudioTranscode',\n version = '1.0',\n packages = ['audioTranscode'],\n scripts = [... | python | chosen |
[
{
"from": "system",
"value": "Add python versions to Trove classifiers\n"
},
{
"from": "human",
"value": "\"\"\"setup.py\"\"\"\n#pylint:disable=line-too-long\n\nfrom codecs import open as codecs_open\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import s... | python | chosen |
[
{
"from": "system",
"value": "Make this one-char variable name a two-char.\n"
},
{
"from": "human",
"value": "from setuptools import find_packages\n\nimport os.path as op\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nhere = op.abspath(op... | python | chosen |
[
{
"from": "system",
"value": "Remove install information because it's picked up by PyPI\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ngifshare - A command-line tool to upload images to S3.\n\nRun with `python setup.py install` to install gifshare in... | python | chosen |
[
{
"from": "system",
"value": "Fix inclusion of static files into the package\n\nand increase the version-number a bit.\n"
},
{
"from": "human",
"value": "#\n# Copyright 2013 by Arnold Krille <arnold@arnoldarts.de>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# y... | python | chosen |
[
{
"from": "system",
"value": "Remove hack that registered the XBlock as a XModule for the LMS\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nBLOCKS = [\n 'mentoring = mentoring:MentoringBlock',\n 'answer = mentoring:AnswerBlock',\n 'quizz = mentoring:QuizzBlock',\n ... | python | chosen |
[
{
"from": "system",
"value": "Update version number to 0.6.2\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = '0.6.1'\n\nsetup(\n name='ckanext-oaipmh',\n version=version,\n description=\"OAI-PMH server and harvester for CKAN\",\n long_descr... | python | chosen |
[
{
"from": "system",
"value": "Update with new azurerm version\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='azurerm',\n version='0.5.3',\n description='Azure Resource Manager REST wrappers',\n url='http://github.com/gbowerman/azurerm',\n autho... | python | chosen |
[
{
"from": "system",
"value": "Fix version numbers of libraries.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='ppp_questionparsing_grammatical',\n version='0.4.7',\n description='Natural language processing modu... | python | chosen |
[
{
"from": "system",
"value": "Update patch-level version number, upload to pypi\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n long_description = open('R... | python | chosen |
[
{
"from": "system",
"value": "Add 'treq' as a requirement for GitHubStatusPush.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='autobuilder',\n version='1.0.2',\n packages=find_packages(),\n license='MIT',\n author='Matt Madison',\n... | python | chosen |
[
{
"from": "system",
"value": "Stop monitoring computer on shutdown.\n"
},
{
"from": "human",
"value": "from core.computer import Computer\nfrom time import sleep\nfrom console import start as start_console\n\n# Initialize computer instance\ncomputer = Computer()\ncomputer.start_monitoring()\ncom... | python | chosen |
[
{
"from": "system",
"value": "Change simulation time of linear trajectory to 60 seconds\n\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nTRAJECTORY = 'linear'\nCONTROLLER = 'pid'\n\nif TRAJECTORY == 'linear':\n SIMULATION_TIME_IN_SECONDS = 80.0\nelif TRAJECTORY == 'circular':\n ... | python | chosen |
[
{
"from": "system",
"value": "Return None if no bed file exists to be opened.\n"
},
{
"from": "human",
"value": "import pybedtools as bt\nimport six\n\ndef concat(bed_files, catted=None):\n \"\"\"\n recursively concat a set of BED files, returning a\n sorted bedtools object of the resul... | python | chosen |
[
{
"from": "system",
"value": "Mark another string for translation\n"
},
{
"from": "human",
"value": "from gettext import gettext as _\n\n\nclass Fixed:\n _(\"A mixin that ensures the presence of a predetermined value\")\n\n def __init__(self, value, *args, **kwargs):\n self.value = ... | python | chosen |
[
{
"from": "system",
"value": "Remove unnecessary values from the config - those should just be constants.\n"
},
{
"from": "human",
"value": "from st2actions.runners.pythonrunner import Action\nimport requests\n\n\nclass TravisCI(Action):\n def __init__(self, config):\n super(TravisCI, ... | python | chosen |
[
{
"from": "system",
"value": "Increase size of test docs\n"
},
{
"from": "human",
"value": "\"\"\"Test helpers specific to LDA\n\n\"\"\"\n\nimport numpy as np\nimport itertools as it\n\nfrom microscopes.common.testutil import permutation_iter\n\n\ndef toy_dataset(defn):\n \"\"\"Generate a toy... | python | chosen |
[
{
"from": "system",
"value": "Configure nova.flags as well as openstack.common.cfg\n\nBecause we are using nova classes directly (Service, Manager, etc.)\nwe need to initialize the configuration modules that those\nclasses use.\n\nChange-Id: Idafd4a8346fc59332114ea7536893470bf9eaff8\n"
},
{
"from": ... | python | chosen |
[
{
"from": "system",
"value": "Remove comments, properly enable admin panel\n"
},
{
"from": "human",
"value": "from django.conf.urls.defaults import patterns, include, url\nfrom django.contrib import admin\nfrom okupy.login.views import *\n\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n ... | python | chosen |
[
{
"from": "system",
"value": "Drop impossible to get right code.\n"
},
{
"from": "human",
"value": "\nimport hashlib\nimport os\nimport shutil\n\nimport cdsapi\n\nSAMPLE_DATA_FOLDER = os.path.join(os.path.dirname(__file__), 'sample-data')\nEXTENSIONS = {'grib': '.grib', 'netcdf': '.nc'}\n\n\ndef... | python | chosen |
[
{
"from": "system",
"value": "Fix error when setting JSON value to be `None`\n\nPreviously this would raise an attribute error as `None` does not\nhave the `coerce` attribute.\n"
},
{
"from": "human",
"value": "from sqlalchemy.ext.mutable import (\n Mutable,\n MutableDict)\nfrom sqlalchemy... | python | chosen |
[
{
"from": "system",
"value": "Update Python/Django: Remove unnecessary reference to __unicode__\n"
},
{
"from": "human",
"value": "from django.contrib import admin\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.contenttypes.models import ContentType\n\n\nclass Permission... | python | chosen |
[
{
"from": "system",
"value": "Expand the logic in our proxito mixin.\n\nThis makes proxito mixin match production for .com/.org\nin the areas where we are overriding the same things.\n"
},
{
"from": "human",
"value": "\"\"\"\nBase settings for Proxito\n\nSome of these settings will eventually be... | python | chosen |
[
{
"from": "system",
"value": "Add more tests against live API\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nimport pytest\nimport holviapi\n\n@pytest.fixture\ndef connection():\n pool = os.environ.get('HOLVI_POOL', None)\n key = os.environ.get('HOLVI_KEY', None)\n ... | python | chosen |
[
{
"from": "system",
"value": "Add ability to pass explicit arguments to LaunchControlDispatcher\n\n"
},
{
"from": "human",
"value": "\"\"\"\nModule with LaunchControlDispatcher - the command dispatcher\n\"\"\"\n\nimport argparse\n\nfrom .interface import Command\n\nclass LaunchControlDispatcher(... | python | chosen |
[
{
"from": "system",
"value": "Fix missing command crash with gadd\n"
},
{
"from": "human",
"value": "from devbot import chat\n\n\ndef call(message: str, name, protocol, cfg, commands):\n if ' ' in message:\n chat.say('/msg {} Sorry, that was not a valid player name: It contains spaces.... | python | chosen |
[
{
"from": "system",
"value": "Update test runner syntax to the new arista-transcode syntax and always output a status report even if the user stops the tests early.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"\n\tRun Arista Transcode Tests\n\t==========================\n\tG... | python | chosen |
[
{
"from": "system",
"value": "Add Trigger model to client and alias it as TriggerSpecification.\n"
},
{
"from": "human",
"value": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for addition... | python | chosen |
[
{
"from": "system",
"value": "Fix and simplify the JSONfield wrapper code\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import connection\n\nfrom shop.apps import get_tuple_version\n\ntry:\n if str(connection.vendor) == '... | python | chosen |
[
{
"from": "system",
"value": "Adjust hashtag to be consistently one word\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.db import models\n\n\nclass HashTag(models.Model):\n # The hash tag length can't be more than the body length minus the `#`\n text = mod... | python | chosen |
[
{
"from": "system",
"value": "tests/convert: Add a list conversion test\n"
},
{
"from": "human",
"value": "import pytest # type: ignore\nfrom hypothesis import given\n\nfrom ppb_vector import Vector2\nfrom utils import vector_likes, vectors\n\nclass V(Vector2): pass\n\n@pytest.mark.parametrize(... | python | chosen |
[
{
"from": "system",
"value": "Prepare 0.15.0rc8 to release it as 0.15.0\n"
},
{
"from": "human",
"value": "# -*- coding: cp1252 -*-\n#\n##################################################################################\n#\n# Copyright 2014-2017 Félix Brezo and Yaiza Rubio (i3visio, contacto@i... | python | chosen |
[
{
"from": "system",
"value": "Update task now updates all dependencies\n"
},
{
"from": "human",
"value": "import subprocess\nimport os\nfrom pathlib import Path\nfrom invoke import task\n\n\n@task\ndef update(ctx):\n \"\"\"\n Update youtube-dl\n\n \"\"\"\n cmd = ['pipenv', 'update', 'youtube... | python | chosen |
[
{
"from": "system",
"value": "Update BuiltIn library reference for RF 2.9 compatibility\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\r\n\r\nimport os\r\nimport sys\r\nfrom robot.variables import GLOBAL_VARIABLES\r\nfrom robot.api import logger\r\nfrom keywordgroup import KeywordGro... | python | chosen |
[
{
"from": "system",
"value": "Add a better default formatter for logs\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\"\"\"\n weasyprint.logging\n ------------------\n\n Logging setup.\n\n The rest of the code gets the logger through this module rather than\n ``logging.getLog... | python | chosen |
[
{
"from": "system",
"value": "Raise TypeError if positional batchable argument is missing\n\ne.g. if it's erroneously been passed as a named argument.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, division, print_function\nfrom builtins import range\n\nimport functoo... | python | chosen |
[
{
"from": "system",
"value": "Put mouse clicks in it's own dictionary\n"
},
{
"from": "human",
"value": "import sys\nfrom PyQt5.QtWidgets import QApplication, QMainWindow\nfrom PyQt5.uic import loadUi\n\nclass MainWindow(QMainWindow):\n\tdef __init__(self, *args):\n\t\tsuper(MainWindow, self).__... | python | chosen |
[
{
"from": "system",
"value": "Print heroku if debug is true\n"
},
{
"from": "human",
"value": "import os\n\nfrom flask import Flask\nfrom flask.ext.sqlalchemy import SQLAlchemy\n\napp = Flask(__name__)\n\n# Running on heroku\nif 'HEROKU' in os.environ:\n from example_config import HEROKU_ENV_... | python | chosen |
[
{
"from": "system",
"value": "Add failing test for ask_question\n"
},
{
"from": "human",
"value": "from pywatson.watson import Watson\n\n\nclass TestWatson:\n def test_init(self, config):\n watson = Watson(url=config['url'], username=config['username'], password=config['password'])\n"
... | python | chosen |
[
{
"from": "system",
"value": "Add doc noting Inktank's lockserver URL\n\nSince I just removed it from lockstatus.py.\n"
},
{
"from": "human",
"value": "import os\nimport yaml\nimport logging\n\nCONF_FILE = os.path.join(os.environ['HOME'], '.teuthology.yaml')\n\nlog = logging.getLogger(__name__)\... | python | chosen |
[
{
"from": "system",
"value": ":green_heart: Add newline at the end of the file\n"
},
{
"from": "human",
"value": "from django.conf.urls import url, include\n\nfrom members import views\n\nurlpatterns = [\n url(r'^profile/$', views.profile, name='profile'),\n\n # Views given by django auth ... | python | chosen |
[
{
"from": "system",
"value": "Implement the EntryPreviewMixin in the EntryDetail view\n"
},
{
"from": "human",
"value": "\"\"\"Views for Zinnia entries\"\"\"\nfrom django.views.generic.dates import BaseDateDetailView\n\nfrom zinnia.models.entry import Entry\nfrom zinnia.views.mixins.archives imp... | python | chosen |
[
{
"from": "system",
"value": "Update path vars for the new source location\n"
},
{
"from": "human",
"value": "# -*- set coding: utf-8 -*-\n\nimport os\n\n# directories constants\nPARERGA_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))\nPARERGA_ENTRY_DIR = os.path.join(PARERGA_ROOT_DIR, \"p... | python | chosen |
[
{
"from": "system",
"value": "Fix parent package of io.matlab.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('matlab', parent_package, top_path)\... | python | chosen |
[
{
"from": "system",
"value": "Update to copy new scripts\n"
},
{
"from": "human",
"value": "import os\nimport shutil\n\ndef main():\n cwd = os.getcwd()\n if not cwd.endswith(os.path.join('FRENSIE', 'scripts')):\n print 'This script must be run in \\\"FRENSIE/scipts\\\"'\n pri... | python | chosen |
[
{
"from": "system",
"value": "Modify call to personal surveis\n"
},
{
"from": "human",
"value": "from django.conf.urls.defaults import *\n\nfrom . import views\n\nurlpatterns = patterns('',\n url(r'^profile/$', views.profile_index, name='survey_profile'),\n url(r'^profile/electric/$', view... | python | chosen |
[
{
"from": "system",
"value": "Enable linker preprocessing for armclang.\n\nThis should be temporary; for some reason the .sct cpp shebang isn't working for me. Same result in any case.\n"
},
{
"from": "human",
"value": "# Copyright 2020 Chris Reed\n#\n# Licensed under the Apache License, Version... | python | chosen |
[
{
"from": "system",
"value": "Add RUD endpoint for Company\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom rest_framework import filters\nfrom rest_framework import generics... | python | chosen |
[
{
"from": "system",
"value": "Use Setext strategy in GitHub built in Writer\n"
},
{
"from": "human",
"value": "\"\"\"\nFile that initializes a Writer object designed for GitHub style markdown files.\n\"\"\"\n\nfrom anchorhub.writer import Writer\nfrom anchorhub.builtin.github.wstrategies import ... | python | chosen |
[
{
"from": "system",
"value": "Change deprecated flask_wtf.Form with flask_wtf.FlaskForm\n"
},
{
"from": "human",
"value": "from flask_wtf import Form\nfrom wtforms import StringField, PasswordField\nfrom wtforms.validators import DataRequired, Email\n\n\nclass Login(Form):\n username = String... | python | chosen |
[
{
"from": "system",
"value": "Build fix for syntax error in test files.\n"
},
{
"from": "human",
"value": "import unittest\nfrom nose.tools import (assert_is_not_none, assert_false, assert_raises, assert_equal)\n\nimport numpy as np\n\n\nfrom sknn.mlp import MultiLayerPerceptronRegressor as MLPR... | python | chosen |
[
{
"from": "system",
"value": "Add fi:wikivoyage and sort by current article count\n\nFix also pycodestyle (former PEP8) E402 problem\n\nBug: T153470\nChange-Id: Id9bc980c7a9cfb21063597a3d5eae11c31d8040c\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"Family module for Wikivoyag... | python | chosen |
[
{
"from": "system",
"value": "Remove not needed request argument in view decorator.\n\nPatch by: Pawel Solyga\nReview by: to-be-reviewed\n"
},
{
"from": "human",
"value": "#!/usr/bin/python2.5\n#\n# Copyright 2008 the Melange authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"L... | python | chosen |
[
{
"from": "system",
"value": "Use leonardo settings instead of django settings.\n"
},
{
"from": "human",
"value": "from . import settings, utils\nfrom django.conf import settings as django_settings\n\n\nclass Config(object):\n \"\"\"\n The global config wrapper that handles the backend.\n ... | python | chosen |
[
{
"from": "system",
"value": "Add classifier type to the base class\n"
},
{
"from": "human",
"value": "class BaseBackend(object):\n \"\"\"\n A base class for backend plugins.\n \"\"\"\n\n def __init__(self, config):\n pass\n\n def reset(self):\n \"\"\"\n Reset... | python | chosen |
[
{
"from": "system",
"value": "Fix problem rendering oneof() predicate when the members aren't strings\n"
},
{
"from": "human",
"value": "class OneOf:\n\tdef __init__(self, members):\n\t\tself.members = members\n\n\tdef __call__(self, candidate):\n\t\tif candidate in self.members:\n\t\t\treturn T... | python | chosen |
[
{
"from": "system",
"value": "Support Sort Order For TEXT Index\n"
},
{
"from": "human",
"value": "#!/bin/env python\n# \n# Copyright 2010 bit.ly\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may ob... | python | chosen |
[
{
"from": "system",
"value": "Modify PYTHONPATH so that pylint is able to find wedutil.\n"
},
{
"from": "human",
"value": "checks = {\n 'pre-commit': [\n # BEFORE_COMMIT in the root of the working tree can be used as\n # reminder to do something before the next commit.\n ... | python | chosen |
[
{
"from": "system",
"value": "Add missing rpnpy.range reference for Python 3.\n\nSigned-off-by: Stephane_Chamberland <1054841519c328088796c1f3c72c14f95c4efe35@science.gc.ca>\n(cherry picked from commit 23860277c006d9635dedcaaa5e065c7aad199d8c)\n"
},
{
"from": "human",
"value": "import sys\nimpor... | python | chosen |
[
{
"from": "system",
"value": "Remove last reference to generators\n"
},
{
"from": "human",
"value": "import re\n\n\n# A regular expression is a string like what you see below between the quote\n# marks, and the ``re`` module interprets it as a pattern. Each regular\n# expression describes a smal... | python | chosen |
[
{
"from": "human",
"value": "Add eul2quat function. Currently only accept scalar. Need to do input checking.\n"
},
{
"from": "gpt",
"value": "import numpy as np\n\ndef eul2quat(rotAngle1,rotAngle2,rotAngle3,\n input_unit='rad',rotation_sequence='ZYX'):\n \"\"\"\n \n \"\"\... | python | chosen |
[
{
"from": "system",
"value": "Make it possible to set custom Lock\n"
},
{
"from": "human",
"value": "from .observable import Observable\nfrom .anonymousobservable import AnonymousObservable\nfrom .observer import Observer\nfrom . import checkedobserver\nfrom . import linq\nfrom . import backpres... | python | chosen |
[
{
"from": "system",
"value": "Change iteritems to items for changes made in python 3\n"
},
{
"from": "human",
"value": "def to_ini(databases = []):\n \"\"\"\n Custom ansible filter to print out pgbouncer database connection settings\n from a list of variable objects.\n \"\"\"\n s ... | python | chosen |
[
{
"from": "system",
"value": "Patch version bump to v2.1.1"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n__version__ = '2.1.0'\nprogram_name = 'bio_hansel'\nprogram_summary = 'Subtype microbial genomes using SNV targeting k-mer subtyping schemes.'\nprogram_desc = program_summary + ... | python | chosen |
[
{
"from": "system",
"value": "Update dsub version to 0.3.5.dev0\n\nPiperOrigin-RevId: 272470402\n"
},
{
"from": "human",
"value": "# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in comp... | python | chosen |
[
{
"from": "system",
"value": "Add basic output of found lines\n"
},
{
"from": "human",
"value": "import os\n\nclass Searcher(object):\n \"\"\"Searches files in dirs for specified string.\"\"\"\n def __init__(self, currentdir, string_to_search_for):\n self.currentdir = currentdir\n ... | python | chosen |
[
{
"from": "system",
"value": "Make the staticfiles serve view raise a 404 for paths which could not be resolved.\n"
},
{
"from": "human",
"value": "\"\"\"\nViews and functions for serving static files. These are only to be used during\ndevelopment, and SHOULD NOT be used in a production setting.... | python | chosen |
[
{
"from": "system",
"value": "Remove old LICENSE that was there for astropy-ported code\n"
},
{
"from": "human",
"value": "# Adapted from Astropy core package until 1.0 is released\n#\n# Copyright (c) 2011-2014, Astropy Developers\n#\n# All rights reserved.\n#\n# Redistribution and use in source... | python | chosen |
[
{
"from": "system",
"value": "Add new dump public method\n"
},
{
"from": "human",
"value": "import logging\nimport pkg_resources\nimport sys\nfrom types import ModuleType\n# allow high-level functions to be accessed directly from the mappyfile module\nfrom mappyfile.utils import load, loads, fin... | python | chosen |
[
{
"from": "system",
"value": "Remove unnecessary line from detect\n"
},
{
"from": "human",
"value": "######################## BEGIN LICENSE BLOCK ########################\n# This library is free software; you can redistribute it and/or\n# modify it under the terms of the GNU Lesser General Publi... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.