conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Fix wrong url regxp for accoutns\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nadmin.autodiscover()\n\nurlpatterns = patterns(\n '',\n url(r'^', include('api... | python | chosen |
[
{
"from": "system",
"value": "Make aether package initialisation work for both Python 3.7 and 3.8.\n"
},
{
"from": "human",
"value": "import os\nimport platform\nimport sys\n\n\nif platform.system() == \"Windows\":\n os.add_dll_directory(os.path.join(sys.prefix, \"Library\", \"bin\"))\n\n"
... | python | chosen |
[
{
"from": "system",
"value": "Use iteritems in Python 2.\n"
},
{
"from": "human",
"value": "import os\nimport tee\n\n\nclass Process(object):\n \"\"\"Process related functions using the tee module.\"\"\"\n\n def __init__(self, quiet=False, env=None):\n self.quiet = quiet\n se... | python | chosen |
[
{
"from": "system",
"value": "Make the default for DEBUG be False.\n"
},
{
"from": "human",
"value": "import os\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\nSECRET_KEY = os.environ['SECRET_KE... | python | chosen |
[
{
"from": "system",
"value": "Fix resolution of dependencies in a regular install of lexicon distribution\n"
},
{
"from": "human",
"value": "\"\"\"\nThis module takes care of finding information about the runtime of Lexicon:\n* what are the providers installed, and available\n* what is the versi... | python | chosen |
[
{
"from": "system",
"value": "Handle TZ change in iso8601 >=0.1.12\n\nThe iso8601 lib introduced a change such that if running on python\n3.2 or later it internally uses the python timezone information\ninstead of its own implementation. This does not change direct\ndate handling, but when converting this v... | python | chosen |
[
{
"from": "system",
"value": "Fix basic test case for Queryable class in Python 3\n"
},
{
"from": "human",
"value": "from busbus.queryable import Queryable\n\n\ndef test_queryable():\n q = Queryable(xrange(10)).where(lambda x: x % 5 == 0)\n assert next(q) == 0\n assert next(q) == 5\n"
... | python | chosen |
[
{
"from": "system",
"value": "Add more missing functions in numscons namespace"
},
{
"from": "human",
"value": "# XXX those are needed by the scons command only...\nfrom core.misc import get_scons_path, get_scons_build_dir, \\\n get_scons_configres_dir, get_scons_configres_f... | python | chosen |
[
{
"from": "system",
"value": "Move stream out of function\n"
},
{
"from": "human",
"value": "import asyncio\nfrom rx import Observable\n\n\nasync def hello_world():\n stream = Observable.just(\"Hello, world!\")\n n = await stream\n print(n)\n\nloop = asyncio.get_event_loop()\n# Blocking... | python | chosen |
[
{
"from": "system",
"value": "Add tf implementation of KL between normals\n"
},
{
"from": "human",
"value": "\"\"\" Assumes softplus activations for gaussian\n\"\"\"\nimport tensorflow as tf\nimport numpy as np\n\ndef log_bernoulli(x, logits, eps=0.0, axis=-1):\n return log_bernoulli_with_log... | python | chosen |
[
{
"from": "system",
"value": "Return version in app setup\n"
},
{
"from": "human",
"value": "# :coding: utf-8\n\nimport os\n\nfrom ._version import __version__\n\nfrom directive import (\n AutoDataDirective,\n AutoFunctionDirective,\n AutoClassDirective\n)\nfrom viewcode import (\n a... | python | chosen |
[
{
"from": "system",
"value": "Set Django to version 1.8.13 and add mock as dependency\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nPACKAGE = \"patlms-web\"\n\nsetup(\n name=PACKAGE,\n version=0.1,\n d... | python | chosen |
[
{
"from": "system",
"value": "Update search api to produce results more consistant with those found on youtube\n"
},
{
"from": "human",
"value": "from apiclient.discovery import build\nimport json\n\n\n# Set DEVELOPER_KEY to the API key value from the APIs & auth > Registered apps\n# tab of\n# ... | python | chosen |
[
{
"from": "system",
"value": "Add extra vars \"machine\" and \"processor\" for the cmake dictionary.\n"
},
{
"from": "human",
"value": "import sublime, string, platform\n\ndef expand_variables(the_dict, the_vars):\n return _expand_variables_recursive(the_dict, the_vars)\n\ndef _expand_variabl... | python | chosen |
[
{
"from": "system",
"value": "Add real author to author key too.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# © <YEAR(S)> <AUTHOR(S)>\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n{\n \"name\": \"Module name\",\n \"summary\": \"Module summary\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Add some headers in osu! direct download\n"
},
{
"from": "human",
"value": "from helpers import requestHelper\nimport requests\nimport glob\n\n# Exception tracking\nimport tornado.web\nimport tornado.gen\nimport sys\nimport traceback\nfrom raven.contrib.tornado impo... | python | chosen |
[
{
"from": "system",
"value": "Apply default style on import\n"
},
{
"from": "human",
"value": "import sys, os\n\n# Add param submodule to sys.path\ncwd = os.path.abspath(os.path.split(__file__)[0])\nsys.path.insert(0, os.path.join(cwd, '..', 'param'))\n\nimport param\n\n__version__ = param.Versi... | python | chosen |
[
{
"from": "system",
"value": "Make output terse and parseable.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nfrom __future__ import print_function\n\nimport os.path\nimport sys\nimport json\nimport uuid\n\nroot = sys.path[0]\ntemplate_path = os.path.join(root, 'templates', 'simple.j... | python | chosen |
[
{
"from": "system",
"value": "Switch to Python 3.4 wording.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n#\n# **THIS SCRIPT IS WRITTEN FOR PYTHON 3.**\n#\n\n\"\"\"\nUsage: python3.4 parse.py ELECTION_NAME PRECINCTS.csv WINEDS.txt OUTPUT.tsv\n\nParses the given files and writes a new... | python | chosen |
[
{
"from": "system",
"value": "Fix Activity CSV field test\n"
},
{
"from": "human",
"value": "import datetime\n\nfrom django.test import TestCase\nfrom journal.models import Activity, Entry\nfrom journal.serializers import ActivitySerializer\n\n\nclass ActivityTestCase(TestCase):\n \"\"\"Sanit... | python | chosen |
[
{
"from": "system",
"value": ": Create documentation of DataSource Settings \n\nTask-Url: "
},
{
"from": "human",
"value": "######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: christoph.stoettner@stoeps.de\n# Documentation: http://scri... | python | chosen |
[
{
"from": "system",
"value": "Set dummy address info for tests.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2012 Alexander Shorin\n# All rights reserved.\n#\n# This software is licensed as described in the file COPYING, which\n# you should have received as part... | python | chosen |
[
{
"from": "system",
"value": "Print \"Language not recognized.\" on failure"
},
{
"from": "human",
"value": "import argparse\nfrom .util import identify\n\nparser = argparse.ArgumentParser(\n prog=\"cypher\",\n description=\"A source code identification tool.\"\n)\nparser.add_argument(\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix it so it still works with a setter.\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 additional information regarding c... | python | chosen |
[
{
"from": "system",
"value": "Print LICENSE on top of the amalgamation\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\nfrom os.path import basename, dirname, join\nimport re\n\nINCLUDE_PATTERN = re.compile(r'^\\s*#include \"([\\w.]+)\"')\n\nseen_files = set()\nout = sys.s... | python | chosen |
[
{
"from": "system",
"value": "Fix bug with SQLAlchemy, change TEXT to STRING\n"
},
{
"from": "human",
"value": "from app import db\n\nclass Sprinkler(db.Model):\n id = db.Column(db.Integer, primary_key=True)\n name = db.Column(db.Text(25))\n status = db.Column(db.Text(25))\n flow = d... | python | chosen |
[
{
"from": "system",
"value": "Ch23: Enable sorting of number of Post tags.\n"
},
{
"from": "human",
"value": "from django.contrib import admin\n\nfrom .models import Post\n\n\n@admin.register(Post)\nclass PostAdmin(admin.ModelAdmin):\n # list view\n date_hierarchy = 'pub_date'\n list_di... | python | chosen |
[
{
"from": "system",
"value": "Fix problems with UTF-8 README.rst\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-paginationlinks',\n version='0.1',\n description='Django Pagination Links',\n long_descripti... | python | chosen |
[
{
"from": "system",
"value": "Remove python 3.2 from trove classifiers\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name = 'sphinx-csharp',\n version = '0.1.0',\n author = 'djungelorm',\n author_email = 'djungelorm@users.noreply.github.com',\n packag... | python | chosen |
[
{
"from": "system",
"value": "Install tests along with the rest of the code\n"
},
{
"from": "human",
"value": "# coding=utf-8\n\nfrom distutils.core import setup\n\n__version__ = 'unknown'\nwith open('po_localization/version.py') as version_file:\n exec(version_file.read())\n\nsetup(\n nam... | python | chosen |
[
{
"from": "system",
"value": "Set release version to 0.2.0\n\nchange repository for maintenance\n"
},
{
"from": "human",
"value": "from os.path import dirname, abspath, join, exists\nfrom setuptools import setup\n\nlong_description = None\nif exists(\"README.md\"):\n long_description = open(\... | python | chosen |
[
{
"from": "system",
"value": "Improve importing for install mode\n"
},
{
"from": "human",
"value": "\"\"\"Installation script for proselint.\"\"\"\n\nfrom setuptools import setup\n\nsetup(\n name='proselint',\n version='0.1',\n description='Making your writing better',\n url='http://... | python | chosen |
[
{
"from": "system",
"value": "Make explicit that the project is released under the MIT license.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Generated by jaraco.develop (https://bitbucket.org/jaraco/jaraco.develop)\nimport setuptools\n\nwith open('README.txt') as readme:\n\tlong_d... | python | chosen |
[
{
"from": "system",
"value": "ZON-3409: Update to version with celery.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(\n name='zeit.wysiwyg',\n version='2.0.8.dev0',\n author='gocept, Zeit Online',\n author_email='zon-backend@zeit.de',\n ... | python | chosen |
[
{
"from": "system",
"value": "Update release version to 0.3.1\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nfrom os.path import join, dirname\n\n\nsetup(\n name='pandas-validation',\n version='0.3.0',\n description=(\n 'A Python package for valid... | python | chosen |
[
{
"from": "system",
"value": "Add missing header file to the list of sources"
},
{
"from": "human",
"value": "try:\n from setuptools import setup\n from setuptools.extension import Extension\nexcept ImportError:\n from distutils.core import setup, Extension\n\n\ndef main():\n module ... | python | chosen |
[
{
"from": "system",
"value": "Set the description's content type.\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import find_packages, setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:\n README = readme.read()\n\n# allow setup.py to be run from... | python | chosen |
[
{
"from": "system",
"value": "Add python compatibility tags for 2.7 and 3.6\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nrequirements = [\n 'boto>=2.8.0,<3.0',\n]\n\nsetup(\n name='celery-s3',\n version='0.1',\n description='An S3 result store bac... | python | chosen |
[
{
"from": "system",
"value": "Upgrade pyflakes from 0.7.3 to 0.8\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name='tangled',\n version='0.1a8.dev0',\n description='Tangled namespace and utilities',\n long_description=open('README.rst').read(),\n u... | python | chosen |
[
{
"from": "system",
"value": "Add css and img files to bdist\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python \n# vim: set sts=4 sw=4 et:\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nVERSION = \"0.0.4\"\n\nsetup (name = \"tupel... | python | chosen |
[
{
"from": "system",
"value": "Correct parameter name is download_url.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='upcloud-api',\n version='0.4.5',\n description='UpCloud API Client',\n author='Elias Nygren',\n maintain... | python | chosen |
[
{
"from": "system",
"value": "Use pillow instead of ordinary pil\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\nimport os\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'calibre_books.settings')\n\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Add int detection to interpreting results\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nwith open('README.rst') as readme_... | python | chosen |
[
{
"from": "system",
"value": "Add entry_point for command-line application\n\nCloses #31.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom distutils.core import setup\nimport refmanage\n\nsetup(name=\"refmanage\",\n version=refmanage.__version__,\n author=\"Joshua Ryan ... | 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": "Include package data in package.\n\nAlso up version and better long_description logic.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport codecs\n\nfrom setuptools import setup\n\nversion = 0.1\n\ndef read(filename):\n try:\n with codecs.op... | python | chosen |
[
{
"from": "system",
"value": "Add URL to make it easier to find this GitHub page"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='pyticketswitch',\n version='1.6.4',\n author='Ingresso',\n author_email='systems@ingresso.co.uk',\n packages=[\n ... | python | chosen |
[
{
"from": "system",
"value": "Allow newer neo4j driver versions (<2)\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = '1.1.3'\n\nrequires = [\n 'neo4j-driver<1.5.0',\n 'six>=1.10.0',\n]\n\ntesting_requires = [\n 'nose',\n 'coverage',\n 'n... | python | chosen |
[
{
"from": "system",
"value": "Include doubles.targets in packages list.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\nimport doubles\n\n\nwith open('README.md') as f:\n long_description = f.read()\n\n\nc... | python | chosen |
[
{
"from": "system",
"value": "Bump the version number - 0.2.0-dev.\n\nSigned-off-by: Lewis Gunsch <748e1641a368164906d4a0c0e3965345453dcc93@gunsch.ca>\n"
},
{
"from": "human",
"value": "import os\n\nfrom distutils.core import setup\n\nVERSION = '0.1.0'\n\nREADME = open(os.path.join(os.path.dirna... | python | chosen |
[
{
"from": "system",
"value": "Change version back to 0.2.0a post-release.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='vumi-wikipedia',\n version='0.1.2',\n description='Vumi Wikipedia App',\n packages=find_packages(),\n include_... | python | chosen |
[
{
"from": "system",
"value": "Increment version in preparation for release"
},
{
"from": "human",
"value": "import subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n def fi... | python | chosen |
[
{
"from": "system",
"value": "Update mozci version to 0.13.2\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\ndeps = [\n 'mozillapulse>=1.1',\n 'mozci>=0.13.1',\n 'treeherder-client>=1.5',\n 'ijson>=2.2',\n 'requests',\n]\n\nsetup(name='pulse-actio... | python | chosen |
[
{
"from": "system",
"value": "Make enum34 dependency conditional on python version\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom sys import version_info\n\n\nsetup(\n name='avatar2',\n version='1.3.0',\n packages=['avatar2',\n 'avatar2/archs',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add long description from README.rst"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='timeflow',\n packages=['timeflow'],\n version='0.1',\n description='Small CLI time logger',\n author='Justas Trimailovas',\n author... | python | chosen |
[
{
"from": "system",
"value": "Add classifiers for Python 2 and 3\n"
},
{
"from": "human",
"value": "#\n# setup.py\n#\n# Copyright (c) 2013 Luis Garcia.\n# This source file is subject to terms of the MIT License. (See file LICENSE)\n#\n\n\"\"\"Setup script for the scope library.\"\"\"\n\nfrom dis... | python | chosen |
[
{
"from": "system",
"value": "Include decorator requirement for tests as well\n\nOne would think setup.py would include runtime deps with test deps, but\nno...\n\nReferences #6\n"
},
{
"from": "human",
"value": "import codecs\nfrom setuptools import find_packages, setup\n\nimport digestive\n\n\n... | python | chosen |
[
{
"from": "system",
"value": "Update ldap3 1.0.3 => 1.0.4\n"
},
{
"from": "human",
"value": "import sys\n\nfrom setuptools import find_packages, setup\n\n\nwith open('VERSION') as version_fp:\n VERSION = version_fp.read().strip()\n\n\ninstall_requires = [\n 'django-local-settings>=1.0a13',... | python | chosen |
[
{
"from": "system",
"value": "Fix the version dependency on ruffus to 2.2, rather than >= 2.0.0\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='Rubra',\n version='0.1.5',\n author='Bernie Pope',\n author_email='bjpope@unimelb... | python | chosen |
[
{
"from": "system",
"value": "Change version number to 0.1dev\n"
},
{
"from": "human",
"value": "\"\"\"\nFlask-FlatPages\n---------------\n\nProvides flat static pages to a Flask application, based on text files\nas opposed to a relationnal database.\n\"\"\"\n\nfrom setuptools import setup\n\nse... | python | chosen |
[
{
"from": "system",
"value": "Add better timeout killing to file conversion"
},
{
"from": "human",
"value": "import os\nimport tempfile\nimport subprocess\nimport logging\n\n\ndef convert_to_pdf(filepath, binary_name=None, construct_call=None):\n if binary_name is None and construct_call is N... | python | chosen |
[
{
"from": "system",
"value": "Make MpdFrontend a subclass of BaseFrontend\n"
},
{
"from": "human",
"value": "import logging\n\nfrom mopidy.frontends.mpd.dispatcher import MpdDispatcher\nfrom mopidy.frontends.mpd.process import MpdProcess\nfrom mopidy.utils.process import unpickle_connection\n\nl... | python | chosen |
[
{
"from": "system",
"value": "Set type for subject ID\n"
},
{
"from": "human",
"value": "import click\nfrom panoptes_client.panoptes import Panoptes\n\npanoptes = Panoptes('https://panoptes.zooniverse.org/api')\n\n@click.group()\ndef cli():\n pass\n\n@cli.command()\n@click.option('--id', help... | python | chosen |
[
{
"from": "system",
"value": "Delete a private method from interface\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com>\n\"\"\"\n\nfrom __future__ import absolute_import\nimport abc\n\nimport six\n\nfrom .acceptor import Loader... | python | chosen |
[
{
"from": "system",
"value": "Correct typo, comment about deprecating class.\n"
},
{
"from": "human",
"value": "\"\"\" The base ScatterPlot class now accepts variable sized markers.\n\nThis definition remains for backwards compatability.\n\"\"\"\nfrom chaco.scatterplot import ScatterPlot\n\n\ncl... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in method name\n"
},
{
"from": "human",
"value": "class Provider(object):\n \"\"\"Base provider class\"\"\"\n regions = {}\n\n def __init__(self, key=''):\n self.key = key\n\n def create(self, region, name='hello'):\n raise NotImpl... | python | chosen |
[
{
"from": "system",
"value": "Fix Django 1.10 deprecation warnings\n\nIn django_app/urls.py:\n* Use a list instead of `patterns`\n* Use view callables instead of strings\n\nFixes #804, #754\n"
},
{
"from": "human",
"value": "\"\"\"URLs module\"\"\"\nfrom django.conf import settings\ntry:\n fr... | python | chosen |
[
{
"from": "system",
"value": "Change coordinates order to Lat,Lng to match the frontend geocoding.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport json, os, sys\nfrom utils.file import load_json\n\n# Parse a json-formatted input instance and produce a csv file with\n# all invo... | python | chosen |
[
{
"from": "system",
"value": "Fix z2loader import path in tests.\n"
},
{
"from": "human",
"value": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport unittest\nimport pkg_resources\nimport pathlib\n\nfrom akllt.z2loader import load_metadata\n\n\nclass Z2LoaderTests(unittest.Test... | python | chosen |
[
{
"from": "system",
"value": "Handle where with variables in Select generator\n"
},
{
"from": "human",
"value": "from .base import Generator\n\n\nclass Select(Generator):\n\n def get_arguments(self, table=None, where=None, pk='id', **kwargs):\n super(Select, self).get_arguments(**kwarg... | python | chosen |
[
{
"from": "system",
"value": "Improve the docstring of AdditiveGaussian"
},
{
"from": "human",
"value": "from __future__ import division\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom builtins import * # NOQA\nfrom f... | python | chosen |
[
{
"from": "system",
"value": "Change time difference assert from > to >= 0\n\ndiff == 0 occurs on when executing trivial code in a cell. Updating the\nassert to include this.\n"
},
{
"from": "human",
"value": "from __future__ import print_function\n\nimport time\n\nfrom IPython.core.magics.execu... | python | chosen |
[
{
"from": "system",
"value": "Fix location of line length check\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\"\"\"\n pyalysis.analysers.raw\n ~~~~~~~~~~~~~~~~~~~~~~\n\n :copyright: 2014 by Daniel Neuhäuser and Contributors\n :license: BSD, see LICENSE.rst for details\n\"\"\"\... | python | chosen |
[
{
"from": "system",
"value": "Add readonly text to form\n"
},
{
"from": "human",
"value": "from django.shortcuts import get_object_or_404, render\nfrom django import forms\n\n\nclass ExampleForm(forms.Form):\n text = forms.CharField()\n disabled_text = forms.CharField(disabled=True)\n r... | python | chosen |
[
{
"from": "system",
"value": "Mark export test XFAIL since no chain mockup exists\n"
},
{
"from": "human",
"value": "from StringIO import StringIO\nimport subprocess\nfrom pyethapp.app import app\nfrom click.testing import CliRunner\nfrom ethereum.blocks import BlockHeader\nimport rlp\n\n\ndef t... | python | chosen |
[
{
"from": "system",
"value": "Use mock_open and remove unnecessary stubbing of open.\n"
},
{
"from": "human",
"value": "from pork.data import Data\n\nfrom mock import Mock, patch\nfrom StringIO import StringIO\n\npatch.TEST_PREFIX = 'it'\n\nclass TestData:\n def it_sets_and_gets_keys(self):\n... | python | chosen |
[
{
"from": "system",
"value": "Fix favicon tests to match the new scheme\n"
},
{
"from": "human",
"value": "import unittest\nimport foauth.providers\n\n\nclass ProviderTests(unittest.TestCase):\n def setUp(self):\n class Example(foauth.providers.OAuth):\n provider_url = 'http... | python | chosen |
[
{
"from": "system",
"value": "Improve test case for bulk_create\n"
},
{
"from": "human",
"value": "import json\n\nfrom django.db import models\nfrom django.conf import settings\nfrom django.test import TestCase\n\nfrom localized_fields.fields import LocalizedField, LocalizedUniqueSlugField\n\nfr... | python | chosen |
[
{
"from": "system",
"value": "Add User Serializer to be able to create users from REST API\n"
},
{
"from": "human",
"value": "from django.forms import widgets\nfrom rest_framework import serializers\nfrom api.models import Reading\nfrom django.contrib.auth.models import User\n\nclass ReadingSeri... | python | chosen |
[
{
"from": "system",
"value": "Remove print statement and change mask to use a fixed length\n"
},
{
"from": "human",
"value": "\"\"\"\nsentry.core.processors\n~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more deta... | python | chosen |
[
{
"from": "system",
"value": "Remove no longer existing assembly cache option.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom thetis.utility import *\nfrom thetis.log import *\nimport thetis.timeintegrator as timeintegrator # NOQA\nimport thetis.solver as solver... | python | chosen |
[
{
"from": "system",
"value": "Revert \"It shouldn't be that hard to define a producer, really\"\n\nSometimes it is.\n\nThis reverts commit 883c518d8844bd006d6abc783b315aea01d59b69.\n"
},
{
"from": "human",
"value": "from datetime import datetime\n\nfrom django.db import models\nfrom django.db.mo... | python | chosen |
[
{
"from": "system",
"value": "Modify lldb_suite.py to enable python debugging\n\nSummary:\npudb and pdb interfere with the behavior of the inspect module. calling\n`inspect.getfile(inspect.currentframe())` returns a different result\ndepending on whether or not you're in a debugger. Calling\n`os.path.abspat... | python | chosen |
[
{
"from": "system",
"value": "DOC: Add fopen()/fclose() to CFFI mock module\n"
},
{
"from": "human",
"value": "\"\"\"Mock module for Sphinx autodoc.\"\"\"\n\n\nclass FFI(object):\n\n NULL = NotImplemented\n I_AM_FAKE = True # This is used for the documentation of \"default\"\n\n def cd... | python | chosen |
[
{
"from": "system",
"value": "Update ex12 test so it actually reads output.\n"
},
{
"from": "human",
"value": "from nose.tools import *\nfrom exercises import ex12\n\ndef test_histogram():\n '''\n Test our histogram output is correct\n '''\n\n test_histogram = ex12.histogram([1, 2, 3... | python | chosen |
[
{
"from": "system",
"value": "Modify licensing info for css parser\n"
},
{
"from": "human",
"value": "\"\"\"Pure-Python CSS parser - no dependencies!\"\"\"\n\n# Copyright held by Yo Studios AB <opensource@yo.se>, 2011 \n#\n# Some kind of BSD license, contact above e-mail for more information on\... | python | chosen |
[
{
"from": "system",
"value": "Use hasattr instead of try/except to call django setup.\n"
},
{
"from": "human",
"value": "import os\nimport pytest\n\ntry:\n from django.conf import settings\nexcept ImportError:\n settings = None # NOQA\n\n\ndef is_configured():\n if settings is None:\n ... | python | chosen |
[
{
"from": "system",
"value": "[EOM] Add EOM_CCSD ref imp to tests\n"
},
{
"from": "human",
"value": "from addons import *\nfrom utils import *\n\n\ntdir = 'Coupled-Cluster'\n\n\ndef test_CCSD_DIIS(workspace):\n exe_py(workspace, tdir, 'CCSD_DIIS')\n\n\ndef test_CCSD(workspace):\n exe_py(wo... | python | chosen |
[
{
"from": "system",
"value": "Change dot generate message to suggest PDF format.\n"
},
{
"from": "human",
"value": "\nimport click\nfrom textx.metamodel import metamodel_from_file\nfrom textx.lang import get_language\nfrom textx.exceptions import TextXError\nfrom txtools.vis import metamodel_exp... | python | chosen |
[
{
"from": "system",
"value": "Allow debug mode to be configured via an environment variable.\n"
},
{
"from": "human",
"value": "import os\n\nfrom mmmpaste import app\n\n# Get the port from the enviroment or fall back to the default.\nPORT = int(os.environ.get('PORT', 5000))\n\napp.run(debug = Tr... | python | chosen |
[
{
"from": "system",
"value": "Fix so that application is due to 24:00 the 2.\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\nfrom applications.forms import ApplicationForm\nfrom datetime import datetime\nfrom django.views.generic.edit import FormView\n\n\nAPPLICATION_STAR... | python | chosen |
[
{
"from": "system",
"value": "Add missing requirement to example app\n"
},
{
"from": "human",
"value": "import os\n\nimport dj_database_url\n\n\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\nDEBUG = TEMPLATE_DEBUG = True\n\n\nSECRET_KEY = 'example-app!'\nROOT_URLCONF = 'example.urls'\nS... | python | chosen |
[
{
"from": "system",
"value": "Stop interlude removes non-player characters.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- encoding: UTF-8 -*-\n\n# This file is part of Addison Arches.\n#\n# Addison Arches is free software: you can redistribute it and/or modify it\n# under the... | python | chosen |
[
{
"from": "system",
"value": "Use collections.Callable test for future compatibility.\n"
},
{
"from": "human",
"value": "# :coding: utf-8\n# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips\n# :license: See LICENSE.txt.\n\nfrom .base import Logger\n\n\nclass Dynamic(Logger):\n '''Dynam... | python | chosen |
[
{
"from": "system",
"value": "Make malformed/mismatched manifest.json an infra failure\n\nSummary:\n- This was disabled for a while due to problems with phased jobsteps, but\n Sentry shows that these errors occasionally still happen, but seem to be\n \"real\" errors now. Should almost certainly be marked ... | python | chosen |
[
{
"from": "system",
"value": "Prepend date/time to log messages, and expand the size of the message log to 128 entries.\n"
},
{
"from": "human",
"value": "from google.appengine.api import memcache as MC\r\n\r\n\r\ndef logmsg(msg, log_name='default'):\r\n # TODO Should optimize to avoid memcac... | python | chosen |
[
{
"from": "system",
"value": "Implement binary tree at Narity Airportx\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n\nclass BinaryTree(oject):\n \"\"\"Binary Tree using class.\"\"\"\n de... | python | chosen |
[
{
"from": "system",
"value": "Fix config name error for autocloud service\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport ConfigParser\nimport os\n\nPROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))\n\nname = '/etc/autocloud/autocloud.cfg'\nif not os.path.exists(name... | python | chosen |
[
{
"from": "system",
"value": "Rename dir variable to directory.\n"
},
{
"from": "human",
"value": "import os\n\nclass RunDir(object):\n def __init__(self, dir, create=False):\n self._run_dir = dir\n self._create = create\n\n def __enter__(self):\n self._starting_dir = ... | python | chosen |
[
{
"from": "system",
"value": "Remove blank line in init\n"
},
{
"from": "human",
"value": "__author__ = 'David Zuber'\n__email__ = 'zuber.david@gmx.de'\n__version__ = '0.1.0'\n\n"
},
{
"from": "gpt",
"value": "__author__ = 'David Zuber'\n__email__ = 'zuber.david@gmx.de'\n__version__ ... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.