conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Replace depreciated show_engine to show_pipeline, in examples.\n\n\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"A simple example of how you can use MayaVi and mlab without\nusing Envisage or the MayaVi envisage application.\n\n\"\"\"\n# Author: Ga... | python | chosen |
[
{
"from": "system",
"value": "Add additional tests around scalars\n"
},
{
"from": "human",
"value": "from unittest import TestCase\nfrom polygraph.types.scalar import Int\n\n\nclass IntTest(TestCase):\n def test_class_types(self):\n x = Int(245)\n self.assertIsInstance(x, int)\n... | python | chosen |
[
{
"from": "system",
"value": "Use hass.config.api instead of hass.http\n"
},
{
"from": "human",
"value": "\"\"\"\nThis module exposes Home Assistant via Zeroconf.\n\nZeroconf is also known as Bonjour, Avahi or Multicast DNS (mDNS).\n\nFor more details about Zeroconf, please refer to the document... | python | chosen |
[
{
"from": "system",
"value": "Support class tuples as WATE args\n"
},
{
"from": "human",
"value": "\nclass ParserError(Exception):\n \"\"\"Raised when parsing input fails.\"\"\"\n\nclass OpenParenError(ParserError):\n \"\"\"Raised when there are too few opening parenthesis.\"\"\"\n\n @s... | python | chosen |
[
{
"from": "system",
"value": "Disable pythonxerbla.c patch for win32 (the MSVC linker failes on multiple defined symbols) when using optimized lapack.\n"
},
{
"from": "human",
"value": "\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuratio... | python | chosen |
[
{
"from": "system",
"value": "db: Update db host to mongo\n"
},
{
"from": "human",
"value": "import json\nimport pymongo\nimport praw\n\nfrom pymongo import MongoClient\n\nclient = MongoClient()\ndb = client.reddit\nposts = db.data\nposts.create_index([(\"text\", pymongo.TEXT),\n ... | python | chosen |
[
{
"from": "system",
"value": "Add from_db_value instead of removed SubfieldBase fields\n"
},
{
"from": "human",
"value": "from django.db import models\n\n\nclass ComputedFieldMixin(object):\n def __init__(self, func, *args, **kwargs):\n self.computer = func\n\n kwargs[\"editable... | python | chosen |
[
{
"from": "system",
"value": "[dev] Change method params because they are not necessary.\n"
},
{
"from": "human",
"value": "from string import Template\n\n__author__ = 'maa'\n\ntemplates_folder = 'file_templates_folder\\\\'\n\n\ndef create_and_full_fill_file(template_file_name, destination_file_... | python | chosen |
[
{
"from": "system",
"value": "Make the openquake namespace compatible with old setuptools\n\n\nFormer-commit-id: 529c98ec0a7c5a3fefa4da6cdf2f6a58b5487ebc [formerly e5f4dc01e94694bf9bfcae3ecd6eca34a33a24eb]\nFormer-commit-id: e01df405c03f37a89cdf889c45de410cb1ca9b00"
},
{
"from": "human",
"value"... | python | chosen |
[
{
"from": "system",
"value": "Change license to Apache 2"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\"\"\"\nSimple Kamaelia Example that shows how to use a simple UDP Peer.\nA UDP Peer actually sends and recieves however, so we could have\nmore fun example here with the two peers sendin... | python | chosen |
[
{
"from": "system",
"value": "Correct test data for mach angle\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"Test Mach angle functions.\n\nTest data is obtained from http://www.grc.nasa.gov/WWW/k-12/airplane/machang.html.\n\"\"\"\n\n\nimport nose\nimport nose.tools as nt\n\nf... | python | chosen |
[
{
"from": "system",
"value": "Move the API to the root.\n"
},
{
"from": "human",
"value": "\"\"\"lcp URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunction views\n 1. ... | python | chosen |
[
{
"from": "system",
"value": "Improve test coverage for changelog module\n"
},
{
"from": "human",
"value": "from pytest import mark\nfrom pytest import fixture\nfrom pyramid import testing\n\n\ndef test_changelog_create():\n from . import Changelog\n from . import changelog_meta\n inst ... | python | chosen |
[
{
"from": "system",
"value": "Set targe class on csv document\n"
},
{
"from": "human",
"value": "import csv\nfrom datasource import Datasource\nfrom ..dataset import Dataset\n\nclass CSVDatasource(Datasource):\n\n def read(self):\n with open(self.path, 'rb') as infile:\n rea... | python | chosen |
[
{
"from": "system",
"value": "Use logging to keep debug message\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n__author__ = 'Superbil'\n__version__ = '0.1.0'\n\nimport shapefile\n\nsf = shapefile.Reader(\"shapefiles/路網數值圖103年_西屯區道路路段\")\n\n# 確認 shapeType 種類... | python | chosen |
[
{
"from": "system",
"value": "Delete user sessions with user\n"
},
{
"from": "human",
"value": "from sqlalchemy import String, Column, Integer, ForeignKey, DateTime, Index\nfrom sqlalchemy.dialects import postgresql\nfrom sqlalchemy.orm import relationship\n\nfrom radar.database import db\nfrom ... | python | chosen |
[
{
"from": "system",
"value": "Remove database engine command in initdb\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Runs the development server of the downstream_node app.\n# Not for production use.\n\nimport argparse\n\nfrom downstream_node.startup impo... | python | chosen |
[
{
"from": "system",
"value": "Allow modify experiment status via REST API.\n"
},
{
"from": "human",
"value": "from django.contrib.auth.models import User, Group\nfrom rest_framework import serializers\nfrom damis.models import Dataset, Algorithm, Experiment\n\n\nclass UserSerializer(serializers.... | python | chosen |
[
{
"from": "system",
"value": "Simplify the general Fasta export task\n\nIt doesn't need to be so complicated, so we simplify it.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License, ... | python | chosen |
[
{
"from": "system",
"value": "Handle migrating non-string values (i.e.: NULL)\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.28 on 2020-05-15 15:52\nfrom __future__ import unicode_literals\nimport re\n\nfrom django.db import migrations\n\nREGEX = re.compil... | python | chosen |
[
{
"from": "system",
"value": "Print usage if no word given\n"
},
{
"from": "human",
"value": "import sys\n\ndef prependAbbrev(front, abbr):\n if type(front) is type(abbr[0]):\n return [front + abbr[0]] + abbr[1:]\n else:\n return [front] + abbr\n\ndef prefixAll(p, lst):\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in cancel subscription submit button\n"
},
{
"from": "human",
"value": "from flask_wtf import Form\nfrom wtforms import StringField, HiddenField, SubmitField\nfrom wtforms.validators import DataRequired, Length\nfrom flask_babel import lazy_gettext as _\n\n... | python | chosen |
[
{
"from": "system",
"value": "Make gunicorn log to stdout/stderr\n"
},
{
"from": "human",
"value": "import click\nimport os\nfrom .app import app\nfrom .server import StandaloneServer\n\n\n@click.command()\n@click.option(\n '--port',\n default=8000,\n help='Port to listen on, default is... | python | chosen |
[
{
"from": "system",
"value": "Change script run message output\n"
},
{
"from": "human",
"value": "import os\nimport sys\n\nfrom optparse import OptionParser\n\nfrom conda_verify.errors import RecipeError\nfrom conda_verify.verify import Verify\nfrom conda_verify.utilities import render_metadata,... | python | chosen |
[
{
"from": "system",
"value": "Add ANDS RIF-CS conversion check function\n"
},
{
"from": "human",
"value": "def check_iso_mcp(input_file):\n\t\"\"\"\n\tChecks if MCP conversion is allowed for the given file.\n\n\tMCP files are only created if the DIF has an ISO Topic Category of\n\t\"OCEANS\".\n\... | python | chosen |
[
{
"from": "system",
"value": "Fix deprecated use of REQUEST and only read the GET request\n\nRemovedInDjango19Warning: `request.REQUEST` is deprecated, use\n`request.GET` or `request.POST` instead.\n"
},
{
"from": "human",
"value": "def get_field(self):\n try:\n field = self.REQUEST['s... | python | chosen |
[
{
"from": "system",
"value": "Test that users can not access frontend by default\n"
},
{
"from": "human",
"value": "from django.test import TestCase\nfrom django.contrib.auth.models import User, Group\nfrom osmaxx.contrib.auth.frontend_permissions import user_in_osmaxx_group, FRONTEND_USER_GROUP... | python | chosen |
[
{
"from": "system",
"value": "Fix pep257 - D211: No blank lines allowed before class docstring (found 1)\n"
},
{
"from": "human",
"value": "#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Jon Surrell\n# Copyright (c) 2014 Jon Surrell\n#\... | python | chosen |
[
{
"from": "system",
"value": "Reduce textarea height in Story form\n"
},
{
"from": "human",
"value": "from django import forms\n\nfrom .models import Story\nfrom cms.forms import ContentManageableModelForm\n\n\nclass StoryForm(ContentManageableModelForm):\n class Meta:\n model = Story\... | python | chosen |
[
{
"from": "system",
"value": "Make cart class configurable for braintree task\n"
},
{
"from": "human",
"value": "import logging\n\nfrom celery.decorators import task\n\nfrom hiicart.models import HiiCart\nfrom hiicart.gateway.braintree.ipn import BraintreeIPN\n\nlog = logging.getLogger('hiicart.... | python | chosen |
[
{
"from": "system",
"value": "Fix GET params bug with BaseService.request\n"
},
{
"from": "human",
"value": "import logging\nimport requests\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass APIError(Exception):\n pass\n\n\nclass BaseService(object):\n\n def __init__(self, api, **config... | python | chosen |
[
{
"from": "system",
"value": "Bump app version to 2018.12.2\n\nSigned-off-by: Guillaume Tucker <e7e20b7c30f19d4ca6b81319ef81bf200369d137@collabora.com>\n"
},
{
"from": "human",
"value": "__version__ = \"2018.12.1\"\n__versionfull__ = __version__\n"
},
{
"from": "gpt",
"value": "__ver... | python | chosen |
[
{
"from": "system",
"value": "Fix change on raleted name (Plan x Environment)\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django import template\n\nfrom physical.models import EngineType, Environment, Plan\n\nregister = template.Library()\n\n\n@register.inclusion_tag('dashbo... | python | chosen |
[
{
"from": "system",
"value": "Fix DebugToolbar requirement in non-debug envs\n"
},
{
"from": "human",
"value": "import functools\nimport os\n\nfrom flask.ext.debugtoolbar import DebugToolbarExtension\nfrom flask.ext.migrate import Migrate, MigrateCommand\nfrom flask.ext.script import Manager\n\n... | python | chosen |
[
{
"from": "system",
"value": "Truncate spotify current song if it is too long\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport dbus\n\nsession_bus = dbus.SessionBus()\nspotify_bus = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaP... | python | chosen |
[
{
"from": "system",
"value": "Fix copy page when permission is disabled\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django.utils.html import conditional_escape\nfrom django.core.serializers.json import DjangoJSONEncoder\n\n\nclass SafeJSONEncoder(DjangoJSONEncoder):\n def... | python | chosen |
[
{
"from": "system",
"value": "Correct rules registry addition via plugin (refs GH-2404)\n"
},
{
"from": "human",
"value": "\"\"\"\nsentry.rules\n~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nfr... | python | chosen |
[
{
"from": "human",
"value": "Add basic script to get most common committers\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env python3\n\ntry:\n import configparser\nexcept ImportError:\n raise ImportError(\"Must be using Python 3\")\n\nimport argparse\nimport os\nimport subprocess\n\n\nUBER=... | python | chosen |
[
{
"from": "system",
"value": "Add test route for heroku\n"
},
{
"from": "human",
"value": "from flask import Flask\nfrom SPARQLWrapper import SPARQLWrapper, JSON\nfrom flask import request, jsonify\nfrom flask.ext.cors import CORS\n\napp = Flask(__name__)\nCORS(app)\n\n@app.route('/')\ndef hello... | python | chosen |
[
{
"from": "system",
"value": "Add utility method to delete all documents of given resource\n"
},
{
"from": "human",
"value": "import json\nfrom os import environ\n\nfrom eve import Eve\nfrom eve.io.mongo import Validator\n\nfrom settings import API_NAME, URL_PREFIX\n\n\nclass KeySchemaValidator(... | python | chosen |
[
{
"from": "system",
"value": "Add Tornado settings and log location command line options.\n"
},
{
"from": "human",
"value": "import logging\nimport os\n\nimport tornado.ioloop\nimport tornado.log\nimport tornado.web\n\n\ndef configure_tornado_logging():\n fh = logging.handlers.RotatingFileHan... | python | chosen |
[
{
"from": "system",
"value": "Add helper on not-well-formed commands\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n\nfrom time import gmtime, strftime\nfrom foaas import foaas\nfrom diaspy_client import Client\n\nimport re\nimport urllib2\n\nclient = Client()\nnotify = client.notifi... | python | chosen |
[
{
"from": "system",
"value": "Add reddit endpoint to API\n"
},
{
"from": "human",
"value": "import simplejson as json\nimport os\nimport sys\nimport urllib2\nfrom pprint import pprint\nfrom collections import defaultdict\nfrom flask import Flask, render_template, request, jsonify, redirect\nimpo... | python | chosen |
[
{
"from": "system",
"value": "Remove now not needed path munging\n"
},
{
"from": "human",
"value": "# pop the current directory from search path\n# python interpreter adds this to a top level script\n# but we will likely have a name conflict (runtests.py .vs runtests package)\nimport sys; sys.pa... | python | chosen |
[
{
"from": "system",
"value": "Add bplan model field verbose names\n"
},
{
"from": "human",
"value": "from django.contrib.auth.models import AnonymousUser\nfrom django.db import models\n\nfrom adhocracy4.models.base import TimeStampedModel\nfrom adhocracy4.modules import models as module_models\n... | python | chosen |
[
{
"from": "system",
"value": "Remove networks from welcome activation, replace with challenges\n"
},
{
"from": "human",
"value": "from django.conf.urls.defaults import *\nfrom django.core.urlresolvers import reverse\n# Smrtr\n\n# Uncomment the next two lines to enable the admin:\nfrom django.con... | python | chosen |
[
{
"from": "system",
"value": "Set timeout to 20 seconds\n"
},
{
"from": "human",
"value": "\"\"\"\nTransport for Zuora SOAP API\n\"\"\"\nimport httplib2\n\nfrom suds.transport import Reply\nfrom suds.transport.http import HttpTransport\nfrom suds.transport.http import HttpAuthenticated\n\n\nclas... | python | chosen |
[
{
"from": "system",
"value": "Extend test to see if global name caching actually works.\n"
},
{
"from": "human",
"value": "\"\"\"\n >>> getg()\n 5\n >>> setg(42)\n >>> getg()\n 42\n\"\"\"\n\ng = 5\n\n\ndef setg(a):\n global g\n g = a\n\n\ndef getg():\n return g\n\n\nclass... | python | chosen |
[
{
"from": "system",
"value": "Sort file names so they are displayed in alpha order\n"
},
{
"from": "human",
"value": "from flask import Flask\nfrom flask import render_template\nfrom queries import get_filenames, get_metadata\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\n@app.route(\"/<item>\... | python | chosen |
[
{
"from": "system",
"value": "Use query parameters to limit results\n"
},
{
"from": "human",
"value": "from flask import Flask\nfrom flask import render_template\n\nimport argparse\nimport games\nimport json\n\n\nGAMES_COUNT = 100\n\n\napp = Flask(__name__)\n\n\n@app.route(\"/\")\ndef index():\n... | python | chosen |
[
{
"from": "system",
"value": "Make pytest autodiscover tests depending on the INSTALLED_APPS\n"
},
{
"from": "human",
"value": "import shutil\n\nimport pytest\ntry:\n import six\nexcept ImportError:\n from django.utils import six\nfrom django.conf import settings\n\n\ndef teardown_assets_d... | python | chosen |
[
{
"from": "system",
"value": "Raise supported Python version for currently pinned pylint\n"
},
{
"from": "human",
"value": "'''py.test standard config file.'''\n\nimport sys\n\n# pylint: disable=invalid-name\n\ncollect_ignore = ('setup.py',)\n\n# pylint: enable=invalid-name\n\ndef pytest_cmdline... | python | chosen |
[
{
"from": "system",
"value": "Throw this Raven DSN from the docs at Travis to make it shut up\n"
},
{
"from": "human",
"value": "from prod import *\n\n# The same settings as production, but no database password.\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql... | python | chosen |
[
{
"from": "system",
"value": "Print lines that are logged\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# logger.py\n\n\"\"\"Log the serial output from the Arduino to a text file.\n\"\"\"\n\nimport sys\nimport serial\n\ndef log_serial(filename, device='/dev/ttyACM0', baud=9600):\n ... | python | chosen |
[
{
"from": "system",
"value": "Handle users with no name\n"
},
{
"from": "human",
"value": "from flask import render_template\nfrom flask_login import current_user\n\nfrom goodtablesio import settings\n\n\n# Module API\n\ndef render_component(component, props=None):\n \"\"\"Render frontend com... | python | chosen |
[
{
"from": "system",
"value": "Add background to script's purpose\n\nSigned-off-by: Tomasz Michalak <a2fdaa543b4cc5e3d6cd8672ec412c0eb393b86e@antmicro.com>\n"
},
{
"from": "human",
"value": "import sys\n\nconstant_bits = {\n \"CFG_CENTER_MID.ALWAYS_ON_PROP1\": \"26_2206\",\n \"CFG_CENTER_MI... | python | chosen |
[
{
"from": "system",
"value": "Add teardown to remove ssh dir\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Import Python libs\nfrom __future__ import absolute_import\n\n# Import Salt Testing Libs\nfrom tests.support.case import SSHCase\nfrom tests.support.unit import skipIf\n\n... | python | chosen |
[
{
"from": "system",
"value": "Add a test for math\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*\n\n\"\"\"\nSimple fabric file to test oinspect output\n\"\"\"\n\nfrom __future__ import print_function\n\nimport webbrowser\n\nimport oinspect.sphinxify as oi\n\ndef test_basic():\n \"\... | python | chosen |
[
{
"from": "system",
"value": "Add tests for core.views.index.py. The tests presently test only if the corresponding urls can be accessed.\n"
},
{
"from": "human",
"value": "#/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2010-2012 Cidadania S. Coop. Galega\n#\n# This file is pa... | python | chosen |
[
{
"from": "system",
"value": "Add part loading command on profile instead of session\n"
},
{
"from": "human",
"value": "#import os, json\n#from jasy.core.Util import executeCommand\n#import jasy.core.Console as Console\n#import urllib.parse\n\n# Little helper to allow python modules in current j... | python | chosen |
[
{
"from": "system",
"value": "Add view to get project jobs.\n"
},
{
"from": "human",
"value": "definitions = (\n { \"doc\": \"basicStats\", \"view\": \"addCar\",\n \"map\": \"\"\"\n function(doc) {\n // car creations\n for (var id in doc.cars){\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove Debugging Paths, Comment Out Unfinished Portions\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\... | python | chosen |
[
{
"from": "system",
"value": "Set python classifiers to py34\n"
},
{
"from": "human",
"value": "import setuptools\n\nsetuptools.setup(\n name=\"inidiff\",\n version=\"0.1.0\",\n url=\"https://github.com/kragniz/inidiff\",\n\n author=\"Louis Taylor\",\n author_email=\"louis@kragniz... | python | chosen |
[
{
"from": "system",
"value": "Use more recent packages as minimum requirements\n"
},
{
"from": "human",
"value": "import codecs\n\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\ndef read(*parts):\n filename = path.join(path.dirname(__file__), *parts)\n with codecs.op... | python | chosen |
[
{
"from": "system",
"value": "Revert major version, bump minor version 1.1.0"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\n\nwith open('README.rst') as f:\n long_description = f.read()\n\nsetup(\n name='pylint-venv',\n version='2.0.0.dev0'... | python | chosen |
[
{
"from": "system",
"value": "Set development status to stable."
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nfrom setuputils import find_version, read\n\n\nsetup(\n name='astor',\n version=find_version('astor/__init__.py'),\n description='Rea... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 8.0.2.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n retu... | python | chosen |
[
{
"from": "system",
"value": "Add the README as the long description.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n# Copyright Least Authority Enterprises.\n# See LICENSE for details.\n\nimport setuptools\n\n_metadata = {}\nwith open(\"src/txkube/_metadata.py\") as f:\n exec(f.... | python | chosen |
[
{
"from": "system",
"value": "Bump version for PyPi release\n"
},
{
"from": "human",
"value": "\"\"\"Defines the setup for the declxml library\"\"\"\nfrom setuptools import setup\n\nsetup(\n name='declxml',\n description='Declarative XML processing library',\n version='0.11.0',\n url... | python | chosen |
[
{
"from": "system",
"value": "Update data file references. Skip known test failure to undefined image iterator."
},
{
"from": "human",
"value": "from neuroimaging.testing import *\n\nfrom neuroimaging.algorithms.onesample import ImageOneSample\nfrom neuroimaging.core.api import load_image\nfrom... | python | chosen |
[
{
"from": "system",
"value": "Patch the GitHub API response to work around the header bug\n"
},
{
"from": "human",
"value": "import re\n\n\nINCOMPLETE_TASK_RE = re.compile(r'<li>\\[ \\] (.*?)(<ul.*?>|</li>)', re.DOTALL)\nINCOMPLETE_TASK_SUB = (r'<li class=\"task-list-item\">'\n ... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3.8 to supported versions\n"
},
{
"from": "human",
"value": "# Always prefer setuptools over distutils\nfrom setuptools import setup, find_packages\n\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path... | python | chosen |
[
{
"from": "system",
"value": "Use 1-indexed counting for game IDs\n"
},
{
"from": "human",
"value": "\"\"\"\nThis module is for generating fake game data for use with the API.\n\nAn example of some game data::\n\n {\n \"id\": 1,\n \"logURL\": \"http://derp.nope/\",\n \"up... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Changing this to a release candidate.\"\n\nThis reverts commit a9f8afbc1c5a40d0a35e3a9757f8c96da494d35a.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nGITHUB_ALERT = \"\"\"**NOTE**: These are the docs for the version of ... | python | chosen |
[
{
"from": "system",
"value": "Add dotcloud version requirement (I had 0.4.2 and that didn't work).\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\nimport skypipe\n\nsetup(\n name='skypipe',\n version=skypipe.VERSION,\n ... | python | chosen |
[
{
"from": "human",
"value": "Add fucntion to create bot commands\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, Yo... | python | chosen |
[
{
"from": "system",
"value": "Add test_requires dependency on python-spidermonkey.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport jasinja, sys\n\nrequires = ['Jinja2']\nif sys.version_info < (2, 6):\n requires += ['simplejson']\n\nsetup(\n name='jasinja',\n vers... | python | chosen |
[
{
"from": "system",
"value": "Include xml datafile for alma tests\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n\nimport os\n\n\ndef get_package_data():\n paths = [os.path.join('data', '*.txt')]\n return {'astroquery.alma.tests': path... | python | chosen |
[
{
"from": "system",
"value": "Remove os.scandir usage (not in python 3.4)\n"
},
{
"from": "human",
"value": "import uuid\nimport os\nfrom audio_pipeline.util.AudioFileFactory import AudioFileFactory\nfrom audio_pipeline.util import Exceptions\n\n\nmbid_directory = \"Ready To Filewalk\"\npicard_d... | python | chosen |
[
{
"from": "system",
"value": "Set up framework, need to work on strategy\n"
},
{
"from": "human",
"value": "# creating file\n"
},
{
"from": "gpt",
"value": "# ghost.py\n\n# globals\ng_words = dict()\n_END = \"_END\"\n\ndef addWord(word):\n # check if subset is already in the dicti... | python | chosen |
[
{
"from": "system",
"value": "Fix missing parentheses initialization error"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# ***************************************************************************\n# * ... | python | chosen |
[
{
"from": "system",
"value": "Use 3-point version number as per semver.org\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n\tname = \"idea-collection\", \n\tversion = \"0.1\", \n #url = \"TBD\",\n\tlicense = \"public domain\", \n\tdescription = \"... | python | chosen |
[
{
"from": "system",
"value": "Add Enum backport dependency for python 2\n\nSigned-off-by: Matteo Cafasso <43c758619f0ced9dc5c51a50803f3466c86e4c3d@gmail.com>\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\n\nsetup(\n name=\"clipspy\",\n version=\"0.0.1\",\n ... | python | chosen |
[
{
"from": "system",
"value": "Make turtleart package require ipython\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='turtleart',\n version='0.2',\n description='Library to facilitate Turtle Art',\n author='Ava and Teo Lisitza',\n author_email='m... | python | chosen |
[
{
"from": "system",
"value": "Fix for Python 3.4 html module not containing _escape_map_full\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport re\nfrom html import _escape_map_full\nfrom html.entities import codepoint2name\n\nhtml_entities = {_ord: '&{0};'.format(value)\n ... | python | chosen |
[
{
"from": "system",
"value": "Transform AST to python objects\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Copyright 2015, Dmitry Veselov\n\nfrom plyplus import Grammar, ParseError\ntry:\n # Python 2.x and pypy\n from itertools import imap as map\nexcept ImportError:\n # ... | python | chosen |
[
{
"from": "system",
"value": "Make installation python 2.7 compatible\n"
},
{
"from": "human",
"value": "import os\nimport re\nfrom pathlib import Path\nfrom setuptools import setup\n\n\nproject_path = Path(__file__).parent\n\nREADME = (project_path / 'README.md').read_text()\n\nversion_text = (... | python | chosen |
[
{
"from": "system",
"value": "Update pyyaml requirement from <5.3,>=5.1 to >=5.1,<5.4\n\nUpdates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.\n- [Release notes](https://github.com/yaml/pyyaml/releases)\n- [Changelog](https://github.com/yaml/pyyaml/blob/master/CH... | python | chosen |
[
{
"from": "system",
"value": "Remove dataset installation from fabfile\n"
},
{
"from": "human",
"value": "from fabric.api import task, local, run, lcd, cd, env\nfrom os.path import exists as file_exists\nfrom fabtools.python import virtualenv\nfrom os import path\n\n\nPWD = path.join(path.dirnam... | python | chosen |
[
{
"from": "system",
"value": "Add support for sublime 2\n"
},
{
"from": "human",
"value": "import sublime_plugin\nimport sublime\nimport os\n\n\nclass TypescriptBuildCommand(sublime_plugin.WindowCommand):\n def run(self):\n file_name = self.window.active_view().file_name()\n dir... | python | chosen |
[
{
"from": "system",
"value": "Drop the lower-bound on the Sphinx version\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\nimport sr.comp.scheduler.metadata as md\n\nwith open('README.rst') as f:\n long_description = f.read()\n\nsetup(name='sr.comp.scheduler',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add a proper License PyPI classifier\n"
},
{
"from": "human",
"value": "import re\n\nfrom setuptools import setup\n\nwith open('mashdown/__init__.py') as f:\n version = re.search(\n r'(?<=__version__ = \\')\\d\\.\\d\\.\\d(?=\\')',\n f.read()\n ).... | python | chosen |
[
{
"from": "system",
"value": "Add jinja2 as a required lib\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport os\n\ndata = list()\nfor d in os.walk('markdo/'):\n if len(d[2]) > 0:\n path_list = map(\n lambda x: str.join('/', os.path.join(d[0], x).split('... | python | chosen |
[
{
"from": "system",
"value": "Update minimum version of cli package.\n"
},
{
"from": "human",
"value": "import sys\nimport os\n\nfrom setuptools import setup\n\nlong_description = open('README.rst').read()\n\nclassifiers = [\n 'Development Status :: 4 - Beta',\n 'License :: OSI Approved ::... | python | chosen |
[
{
"from": "system",
"value": "Add functools32 to the requirements for Python < 3.2\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nimport populous\n\nrequirements = [\n \"click\",\n \"cached-property\",\n \"fake-factory\",\n]\n\nsetup(\n name=\"popul... | python | chosen |
[
{
"from": "system",
"value": "Update the PyPI version to 0.2.20.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n ret... | python | chosen |
[
{
"from": "system",
"value": "Rename the PyPI package to td-watson\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nwith open('README.md') as f:\n readme = f.read()\n\n\nsetup(\n name='watson',\n version='1.0.0',\n packages=['watson'],\n author='TailorDev',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add subscription count to comics profile list\n"
},
{
"from": "human",
"value": "from django.contrib import admin\n\nfrom comics.accounts import models\n\n\nclass SubscriptionInline(admin.StackedInline):\n model = models.Subscription\n extra = 1\n\n\ndef email... | python | chosen |
[
{
"from": "system",
"value": "Make the cheapest shipping method the default one\n"
},
{
"from": "human",
"value": "from django.core.exceptions import ImproperlyConfigured\nfrom oscar.apps.shipping.methods import Free, NoShippingRequired\n\n\nclass Repository(object):\n \"\"\"\n Repository ... | python | chosen |
[
{
"from": "system",
"value": "[FIX] account_analytic_invoice_line_menu: Put dependency to \"account_analytic_analysis\" module.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# (c) 2016 Alfredo de la Fuente - AvanzOSC\n# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.