conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Put license and readme into share/doc/webracer rather than installation root\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='webracer',\n version='0.2.0',\n description='Comprehensive web application ... | python | chosen |
[
{
"from": "system",
"value": "Add json5 and toml to supported formats, add Python 3.5 to supported Python versions\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='anymarkup-core',\n version=... | python | chosen |
[
{
"from": "system",
"value": "Update the URL for the move.\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n \n \nsetup(\n name = \"django-templatetag-sugar\",\n version = __import__(\"templatetag_sugar\").__version__,\n author = \"Alex Gaynor\",\n author_email = ... | python | chosen |
[
{
"from": "system",
"value": "Update pyyaml requirement from <4.2,>=3.12 to >=3.12,<5.2\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/... | python | chosen |
[
{
"from": "system",
"value": "Set a timeout of 5 seconds\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nDESCRIPTION = \"FFXI Linkshell Community Scraper\"\n\nwith open('README.md') as f:\n LONG_DESCRIPTION = f.read()\n\nwith open('requirements.txt') as f:\n ... | python | chosen |
[
{
"from": "system",
"value": "Revert dependencies for ES client\n"
},
{
"from": "human",
"value": "from setuptools import setup\ntry:\n from pypandoc import convert\n read_md = lambda f: convert(f, 'rst')\nexcept ImportError:\n print(\"warning: pypandoc module not found, could not conve... | python | chosen |
[
{
"from": "system",
"value": "Add contact information and readme in long description.\n"
},
{
"from": "human",
"value": "import os\nimport re\nfrom setuptools import setup, find_packages\n\n_here = os.path.dirname(__file__)\n_init = os.path.join(_here, 'van', 'contactology', '__init__.py')\n_ini... | python | chosen |
[
{
"from": "system",
"value": "Update classifiers to show off supported python versions\n"
},
{
"from": "human",
"value": "import os\nimport codecs\nfrom setuptools import setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n # intentionally *not* adding an encodi... | python | chosen |
[
{
"from": "system",
"value": "Remove dependencies that Sentry has\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nfrom sentry_youtrack import VERSION\nimport os\n\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings')\n\ninstall_r... | python | chosen |
[
{
"from": "system",
"value": "Use official OSI name in the license metadata\n\nThis makes it easier for automatic license checkers to verify the license of this package.\r\n\r\nThe license file is included in MANIFEST.in as is standard practice."
},
{
"from": "human",
"value": "#!/usr/bin/env py... | python | chosen |
[
{
"from": "system",
"value": "Include data in release package\n\nCloses #3\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nversion = '0.3.2'\n\nsetup(\n name='django-tagging-ext',\n version=version,\n description=\"Adds in new features to supplement dja... | python | chosen |
[
{
"from": "system",
"value": "Update Twisted requirement to add a minimum version.\n"
},
{
"from": "human",
"value": "import os.path\n\nfrom setuptools import setup, find_packages\n\n\ndef readme():\n path = os.path.join(os.path.dirname(__file__), 'README.rst')\n return open(path, 'r').rea... | python | chosen |
[
{
"from": "system",
"value": "Fix dumb bug in release task\n"
},
{
"from": "human",
"value": "from os import mkdir\nfrom os.path import join\nfrom shutil import rmtree, copytree\n\nfrom invoke import Collection, ctask as task\nfrom invocations.docs import docs, www\nfrom invocations.packaging im... | python | chosen |
[
{
"from": "system",
"value": "Fix unittest failure in python 3.x.\n"
},
{
"from": "human",
"value": "import json\nimport unittest\nfrom pyunio import pyunio\nimport urllib \n\npyunio.use('httpbin')\n\nparams_get = {\n 'params': {\n 'name': 'James Bond'\n ... | python | chosen |
[
{
"from": "system",
"value": "Implement range of possible values with clamping if values are outside range\n"
},
{
"from": "human",
"value": "#/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport click\nimport requests\nimport requests_cache\n\n# Cache the API calls and expire after 12 hours\n... | python | chosen |
[
{
"from": "system",
"value": "Clean up default FP settings\n"
},
{
"from": "human",
"value": "########## INSTALLED APPS\nFANCYPAGES_REQUIRED_APPS = (\n 'rest_framework',\n 'model_utils',\n 'south',\n 'compressor',\n 'twitter_tag',\n 'sorl.thumbnail',\n)\nFANCYPAGES_APPS = (\n ... | python | chosen |
[
{
"from": "system",
"value": "Correct access of backend name from AuthException\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.shortcuts import redirect\n\nfrom social_auth.backends.exceptions imp... | python | chosen |
[
{
"from": "system",
"value": "Update : bump version 0.1.27\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nversion = (0, 1, 26)\n\n__title__ = \"python-simple-workflow\"\n__author__ = \"Oleiade\"\n__license__ = \"MIT\"\n\n__version__ = '.'.join(map(str, versi... | python | chosen |
[
{
"from": "system",
"value": "Add assertion for query and data of request\n"
},
{
"from": "human",
"value": "def mock_api(path, file_path):\n from httmock import urlmatch, response\n @urlmatch(scheme = 'https', netloc = 'api.webpay.jp', path = '/v1' + path)\n def webpay_api_mock(url, re... | python | chosen |
[
{
"from": "human",
"value": "Implement proper rotation tool handles\n"
},
{
"from": "gpt",
"value": "from UM.Scene.ToolHandle import ToolHandle\nfrom UM.Mesh.MeshData import MeshData\nfrom UM.Mesh.MeshBuilder import MeshBuilder\nfrom UM.Math.Vector import Vector\n\nclass RotateToolHandle(ToolHan... | python | chosen |
[
{
"from": "system",
"value": "Change field name from datetime to date_and_time for avoid problems with datetime python's module\n"
},
{
"from": "human",
"value": "from django.db import models\nfrom django.contrib.auth.models import User\nfrom thumbs import ImageWithThumbsField\nfrom apps.project... | python | chosen |
[
{
"from": "system",
"value": "Remove a BillingOrder factory class that wasn't use\n\nThere was a problem with this class... but since I couldn't find\ncode using it, I simply deleted it.\n"
},
{
"from": "human",
"value": "import factory\nimport random\nfrom billing.models import Billing, OrderBi... | python | chosen |
[
{
"from": "system",
"value": "Drop django.core.management.base.NoArgsCommand (django 1.10 compat)\n\nSee https://github.com/django/django/blob/stable/1.9.x/django/core/management/base.py#L574-L578\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\nfrom django.core.manage... | python | chosen |
[
{
"from": "system",
"value": "Fix flaky logout on FF 45\n"
},
{
"from": "human",
"value": "\"\"\"\nEnd to end tests for Studio Login\n\"\"\"\nimport os\nfrom flaky import flaky\nfrom bok_choy.web_app_test import WebAppTest\nfrom regression.pages.studio.studio_home import DashboardPageExtended\nf... | python | chosen |
[
{
"from": "system",
"value": "Use pytest for test discovery in build_ext\n"
},
{
"from": "human",
"value": "\"\"\"build_ext tests\n\"\"\"\nimport unittest\nimport distutils.command.build_ext as orig\n\nfrom setuptools.command.build_ext import build_ext\nfrom setuptools.dist import Distribution\n... | python | chosen |
[
{
"from": "system",
"value": "Support offscreen matplotlib plots in mms module\n\n(refs #13181)\n"
},
{
"from": "human",
"value": "try:\n import sympy\n\nexcept ImportError:\n print(\"The 'mms' package requires sympy, it can be installed by running \" \\\n \"`pip install sympy --u... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in token decorator\n"
},
{
"from": "human",
"value": "# -*- coding: utf8 -*-\nfrom functools import wraps\n\nfrom django.conf import settings\nfrom django.http import HttpResponseForbidden\nfrom django.views.decorators.csrf import csrf_exempt\n\n\ndef token... | python | chosen |
[
{
"from": "system",
"value": "Use absolute imports and fix the version string\n"
},
{
"from": "human",
"value": "\"\"\"AMQP Specifications and Classes\"\"\"\n\n__author__ = 'Gavin M. Roy'\n__email__ = 'gavinmroy@gmail.com'\n__since__ = '2011-09-23'\n__version__ '1.0.1'\n\nfrom header import Prot... | python | chosen |
[
{
"from": "system",
"value": "Create Base class for enum\n\nChange-Id: Ia0de5c1c99cabcab38d1a64949b50e916fadd8b8\n"
},
{
"from": "human",
"value": "# Copyright 2019 Zadara Storage, Inc.\n# Originally authored by Jeremy Brown - https://github.com/jwbrown77\n#\n# Licensed under the Apache License,... | python | chosen |
[
{
"from": "system",
"value": "Add todo for hp stuff\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport hackarena.constants\nfrom hackarena.constants import Classes\nfrom hackarena.constants import Spell\nfrom hackarena.game_objects import BaseGameObject\n\n\nAVAILABLE_SPELLS = {\... | python | chosen |
[
{
"from": "system",
"value": "Update distance formula to be more standard\n"
},
{
"from": "human",
"value": "import math\n\ndef update_image_rect(image, rect):\n image_rect = image.get_rect()\n image_rect.x = rect.x\n image_rect.y = rect.y\n\ndef distance_between_rects(rect1, rect2):\n ... | python | chosen |
[
{
"from": "system",
"value": "Set country minimum vote filter back to 500.\n"
},
{
"from": "human",
"value": "from os import getenv\n\nGEOIP_DB_FILE = '/usr/local/share/GeoIP/GeoIP2-City.mmdb'\n\nSTATSD_HOST = 'graphite1.private.phx1.mozilla.com'\nSTATSD_PORT = 8125\nSTATSD_PREFIX = 'glow-worker... | python | chosen |
[
{
"from": "system",
"value": "Make TF2_BEHAVIOR=0 disable TF2 behavior.\n\nPrior to this change, the mere presence of a TF2_BEHAVIOR\nenvironment variable would enable TF2 behavior. With this,\nsetting that environment variable to \"0\" will disable it.\n\nPiperOrigin-RevId: 223804383\n"
},
{
"from"... | python | chosen |
[
{
"from": "system",
"value": ":white_check_mark: Update completion tests, checking for printed message\n\n"
},
{
"from": "human",
"value": "import os\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nimport typer\nfrom typer.testing import CliRunner\n\nfrom first_steps import tutorial0... | python | chosen |
[
{
"from": "system",
"value": "Fix : bug in fail2ban status.\n"
},
{
"from": "human",
"value": "import socket\nimport os\n\n\ndef getHostname():\n \"\"\"\n Returns the current host hostname\n \"\"\"\n return socket.gethostname()\n\n\ndef fail2banStatus():\n \"\"\"\n Returns the ... | python | chosen |
[
{
"from": "system",
"value": "Rename should_call future in test, raise exception on timeout\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport nose.tools as nt\nfrom asyncio import Future, gather, get_event_loop, sleep\n\nfrom pyee import EventEmitter\n\n\ndef test_async_emit():\... | python | chosen |
[
{
"from": "system",
"value": "Put all the rooms under lobby, so it will be easier to configure.\n"
},
{
"from": "human",
"value": "service_room = \"FIXME.lobby\"\naccesslog_room = \"FIXME.accesslog\"\ncombined_room = \"FIXME.combined\"\npath = \"\"\nxmpp_jid = \"\"\nxmpp_password = \"FIXME\"\nxm... | python | chosen |
[
{
"from": "system",
"value": "Add not equals test for version function\n"
},
{
"from": "human",
"value": "import shutil\nimport tempfile\nfrom os import path\nimport unittest\nfrom libs.qpanel.upgrader import __first_line as firstline, get_current_version\n\n\nclass UpgradeTestClass(unittest.Tes... | python | chosen |
[
{
"from": "system",
"value": "Fix qs error in history\n"
},
{
"from": "human",
"value": "import logging\n\nfrom django.conf import settings\nfrom django.http import Http404\nfrom django.shortcuts import render\nfrom pytz import timezone\n\nfrom dojo.filters import LogEntryFilter\nfrom dojo.utils... | python | chosen |
[
{
"from": "system",
"value": "Maintain project release sort order\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nfrom sentry.api.base import DocSection\nfrom sentry.api.bases.project import ProjectEndpoint\nfrom sentry.api.serializers import serialize\nfrom sentry.m... | python | chosen |
[
{
"from": "system",
"value": "Use lowercase for symbol paths\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nimport glob\n\nfrom lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config\n\n\nSOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))\nSYM... | python | chosen |
[
{
"from": "system",
"value": "Refactor encoders to have base class\n"
},
{
"from": "human",
"value": "import datetime\nimport decimal\nimport logging\n\nimport elasticsearch\n\nfrom nefertari.renderers import _JSONEncoder\n\n\nlog = logging.getLogger(__name__)\n\n\nclass JSONEncoder(_JSONEncoder... | python | chosen |
[
{
"from": "system",
"value": "Include channel list in connection\n"
},
{
"from": "human",
"value": "from sockjs.tornado import SockJSConnection\nfrom ..pubsub_providers.redis_pubsub_provider import RedisPubSubProvider\nfrom .. import route_handler\nimport json\n\n\npub_sub = RedisPubSubProvider(... | python | chosen |
[
{
"from": "system",
"value": "DBServer: Change BDB test to match naming scheme\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python2\nimport unittest\nfrom socket import *\n\nfrom common import *\nfrom testdc import *\n\nfrom test_dbserver import DatabaseBaseTests\n\nCONFIG = \"\"\"\\\nmessa... | python | chosen |
[
{
"from": "system",
"value": "Implement finding of nonterminals rewritable to epsilon\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"\n:Author Patrik Valkovic\n:Created 20.08.2017 15:42\n:Licence GNUv3\nPart of grammpy-transforms\n\n\"\"\"\n\nfrom grammpy import Grammar\n\n\ndef... | python | chosen |
[
{
"from": "system",
"value": "Remove check for Wagtail 1.1"
},
{
"from": "human",
"value": "from django.shortcuts import render\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\n\nfrom wagtail.wagtailcore.models import Page\nfrom wagtail.wagtailsearch.models import Query... | python | chosen |
[
{
"from": "system",
"value": "Add failing test for unicode string encryption\n"
},
{
"from": "human",
"value": "# Import libnacl libs\nimport libnacl.secret\n# Import python libs\nimport unittest\n\nclass TestSecret(unittest.TestCase):\n '''\n '''\n def test_secret(self):\n msg =... | python | chosen |
[
{
"from": "system",
"value": "Implement conversion of Yahoo! tickers to CSV.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# encoding: utf-8\ndef main():\n pass\n\nif __name__ == '__main__':\n main()\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env python\n# encoding... | python | chosen |
[
{
"from": "system",
"value": "Fix typo on ipython config\n\ns/Historymanager/HistoryManager/\n"
},
{
"from": "human",
"value": "# Disable history manager, we don't really use it\n# and by default it puts an sqlite file on NFS, which is not something we wanna do\nc.Historymanager.enabled = False\... | python | chosen |
[
{
"from": "system",
"value": "Modify exception handling to local config names\n"
},
{
"from": "human",
"value": "# Default settings\nimport ConfigParser\nimport os\nimport pyaudio\n\nPROG = 'soundmeter'\nUSER_DIR = os.path.join(os.path.expanduser('~'), '.' + PROG)\nUSER_LOGFILE = os.path.join(US... | python | chosen |
[
{
"from": "system",
"value": "Add LED and Button classes\n"
},
{
"from": "human",
"value": "import subprocess\n\n\ndef speak(say_wa):\n echo_string = \"'{0}'\".format(say_wa.replace(\"'\", \"'\\''\"))\n\n echo = subprocess.Popen(['echo', echo_string], stdout=subprocess.PIPE)\n espeak = ... | python | chosen |
[
{
"from": "system",
"value": "Improve docs and import WebFingerBuilder\n"
},
{
"from": "human",
"value": "\"\"\"A simple Python client implementation of WebFinger (RFC 7033).\n\nWebFinger is a discovery protocol that allows you to find information about\npeople or things in a standardized way.\n... | python | chosen |
[
{
"from": "system",
"value": "Test broken harvest doesn't break everything.\n"
},
{
"from": "human",
"value": "\"\"\"Tests related to the remotes.tasks functions.\"\"\"\n\nfrom django_celery_beat.models import IntervalSchedule, PeriodicTask\n\nfrom jobs.models import Post\nfrom ..models import S... | python | chosen |
[
{
"from": "system",
"value": "Set timestamp on item lock operation\n"
},
{
"from": "human",
"value": "from models.item import ItemModel\nfrom models.base_model import ETAG\nfrom superdesk import SuperdeskError\n\n\nLOCK_USER = 'lock_user'\nSTATUS = '_status'\n\n\nclass ItemLock():\n def __ini... | python | chosen |
[
{
"from": "system",
"value": "Change URL used for CSS diagrams\n"
},
{
"from": "human",
"value": "\"\"\"\nA Sphinx extension adding a 'css' role creating links to\nthe spec’s railroad diagrams.\n\n\"\"\"\n\nfrom docutils import nodes\n\n\ndef role_fn(_name, rawtext, text, lineno, inliner, option... | python | chosen |
[
{
"from": "system",
"value": "Bump to next dev cycle\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom .utils.version import get_version\n\n#: This may not be the exact version as it's... | python | chosen |
[
{
"from": "system",
"value": "Remove no longer needed local variable.\n"
},
{
"from": "human",
"value": "import json\nimport os\n\nfrom django.conf import settings\nfrom django.utils.translation import get_language\nfrom django.utils.translation import to_locale\n\n_JSON_MESSAGES_FILE_CACHE = {}... | python | chosen |
[
{
"from": "system",
"value": "Use importlib instead of __import__\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright (c) 2013-2014 Simon Jagoe\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the 3-clause BSD license. See the... | python | chosen |
[
{
"from": "system",
"value": "Fix local dist to see if that fixes things\n"
},
{
"from": "human",
"value": "RAW_PROCESSING = ['cassandra']\nNORMALIZED_PROCESSING = ['elasticsearch', 'cassandra']\n"
},
{
"from": "gpt",
"value": "RAW_PROCESSING = ['postgres']\nNORMALIZED_PROCESSING = [... | python | chosen |
[
{
"from": "system",
"value": "Update pyunit to compare a list value instead of a scalar\n"
},
{
"from": "human",
"value": "from __future__ import print_function\nimport sys\nsys.path.insert(1,\"../../\")\nimport h2o\nfrom tests import pyunit_utils\n\n\n\n\ndef space_headers():\n \n \n\n ... | python | chosen |
[
{
"from": "system",
"value": "Print out nicer error messages on connection errors\n"
},
{
"from": "human",
"value": "\"\"\"Command-line interface to pycat.\"\"\"\n\nimport argparse\nimport sys\nimport socket\nfrom .talk import talk\n\n\ndef argument_parser():\n \"\"\"Generate an `argparse` ar... | python | chosen |
[
{
"from": "system",
"value": "Update md test for render fix\n"
},
{
"from": "human",
"value": "from mfr.ext.md import Handler, render\nfrom mock import MagicMock\n\ndef test_render_html():\n fakefile = MagicMock(spec=file)\n fakefile.read.return_value = '# foo'\n assert render.render_ht... | python | chosen |
[
{
"from": "system",
"value": "DOC: Change comment Google -> numpy docstring format\n"
},
{
"from": "human",
"value": "\"\"\"\nModule provides a simple cubic_rectification function.\n\"\"\"\n\nimport numpy as np\n\n\ndef cubic_rectification(x):\n \"\"\"\n Rectified cube of an array.\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Update the script to accept arguments\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# Copyright 2010 Jonathan Kinred\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. Y... | python | chosen |
[
{
"from": "system",
"value": "Fix the python script that runs the tests.\n"
},
{
"from": "human",
"value": "import sys\nimport os\nimport subprocess\n\ndef main():\n\texecutableName = 'CuraEngine'\n\tif len(sys.argv) > 1:\n\t\texecutableName = sys.argv[1]\n\t\n\texitValue = 0\n\tfor subPath in o... | python | chosen |
[
{
"from": "system",
"value": "Switch to using oslo_* instead of oslo.*\n\nChange-Id: Ibb578a945f6cb655a35acb744837a14b43117333\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Copyright 2015 Spanish National Research Council\n#\n# Licensed under the Apache License, Version 2.0 (th... | python | chosen |
[
{
"from": "system",
"value": "Add ability to perform 'duplicate up'.\n"
},
{
"from": "human",
"value": "import sublime, sublime_plugin\n\nclass DuplicateLinesCommand(sublime_plugin.TextCommand):\n def run(self, edit):\n for region in self.view.sel():\n if region.empty():\n ... | python | chosen |
[
{
"from": "system",
"value": "Make all the things unicode.\n"
},
{
"from": "human",
"value": "\"\"\"\nAn example client. Run simpleserv.py first before running this.\n\"\"\"\n\nimport json\n\nfrom twisted.internet import reactor, protocol\n\n\n# a client protocol\n\nclass NethackClient(protocol.... | python | chosen |
[
{
"from": "system",
"value": "Add session info to extra data\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# encoding: utf-8\n\nimport logging\n\nfrom raven.contrib.flask import Sentry\n\nfrom framework.sessions import get_session\n\nfrom website import settings\n\nlogger = logging.g... | python | chosen |
[
{
"from": "system",
"value": "Fix for part category API\n"
},
{
"from": "human",
"value": "from rest_framework import generics\n\nfrom .models import PartCategory, Part, PartParameter\nfrom .serializers import PartSerializer\nfrom .serializers import PartCategoryBriefSerializer, PartCategoryDeta... | python | chosen |
[
{
"from": "system",
"value": "Verify that new attribute doesn't already exist in database\n"
},
{
"from": "human",
"value": "# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n# Created B... | python | chosen |
[
{
"from": "system",
"value": "Add test cases for login process\n"
},
{
"from": "human",
"value": "from django.test import TestCase\n\n# Create your tests here.\n"
},
{
"from": "gpt",
"value": "from django.contrib.auth.models import User\nfrom django.test import TestCase, Client\n\n\n... | python | chosen |
[
{
"from": "system",
"value": "Add redirect middleware to heroku configs\n"
},
{
"from": "human",
"value": "import os\nimport urllib.parse\n\nfrom gamecraft.settings_heroku_base import *\n\nDEBUG = False\nTEMPLATE_DEBUG = False\n\nINSTALLED_APPS = INSTALLED_APPS + (\n 'raven.contrib.django.rav... | python | chosen |
[
{
"from": "system",
"value": "Test that asserts odd numbered windows dont work\n"
},
{
"from": "human",
"value": "import pytest\nimport mdct.windows\n\n\ndef test_kbd():\n mdct.windows.kaiser_derived(50)\n"
},
{
"from": "gpt",
"value": "import pytest\nimport mdct.windows\n\n\ndef ... | python | chosen |
[
{
"from": "system",
"value": "Add the 'gthread' worker to the gunicorn.workers.SUPPORTED_WORKERS dictionary\n\nFixes #1011.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimpo... | python | chosen |
[
{
"from": "system",
"value": "Add option FEEDLY_HOST for feedly.com provider"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nimport requests\nfrom allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,\n ... | python | chosen |
[
{
"from": "system",
"value": "Add NullHandler to logger to quiet Python 2.7\n"
},
{
"from": "human",
"value": "\"\"\"__init__.py\"\"\"\nfrom jsonrpcclient.request import Request\n"
},
{
"from": "gpt",
"value": "\"\"\"__init__.py\"\"\"\n\nimport logging\nlogging.getLogger('jsonrpcclie... | python | chosen |
[
{
"from": "system",
"value": "tools/scyllatop: Use 'erase' to clear the screen\n\nThe 'clear' function explicitly clears the screen and repaints it which\ncauses really annoying flicker. Use 'erase' to make scyllatop more\npleasant on the eyes.\n\nMessage-Id: <2bf04f96d7d510dddf38de01959db6b168f25a31@scylla... | python | chosen |
[
{
"from": "system",
"value": "Use one of the stock examples for the open/save test\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport unittest\nfrom xml.etree import ElementTree\n\nfrom openfilerooms import openFileRooms\nfrom savefilerooms import saveFileRooms\n\nclass Test(unit... | python | chosen |
[
{
"from": "system",
"value": "Put back to 12 hours.\n"
},
{
"from": "human",
"value": "import os\nimport time\nfrom crawl import crawl\n\nimport tweepy\n\nclass TwitterAPI:\n \"\"\"\n Class for accessing the Twitter API.\n\n Requires API credentials to be available in environment\n v... | python | chosen |
[
{
"from": "system",
"value": "Use split_up in both places\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nimport os.path\nimport time\nfrom time import strftime\nimport os\nimport sys\nimport shutil\n\nFILE = 'todo.md'\n\ndef date_to_append():\n return strftime(\"%m-%d-%Y\", time.g... | python | chosen |
[
{
"from": "system",
"value": "Use Heroku post & open interface\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom flask_debugtoolbar import DebugToolbarExtension\n\nfrom app import app\nfrom app.models import connect_to_db\n\n\nif __name__ == '__main__':\n\n # debug = True as De... | python | chosen |
[
{
"from": "system",
"value": "Read env variables with dotenv\n"
},
{
"from": "human",
"value": "import argparse\nimport os\nimport sys\nfrom src.main import run\nimport logging\n\nif __name__ == '__main__':\n # Parse filename.\n parser = argparse.ArgumentParser(description=\"TODO write des... | python | chosen |
[
{
"from": "system",
"value": "Update to use unique_name for task update"
},
{
"from": "human",
"value": "# Download the helper library from https://www.twilio.com/docs/python/install\nfrom twilio.rest import Client\n\n# Your Account Sid and Auth Token from twilio.com/console\naccount_sid = 'ACXX... | python | chosen |
[
{
"from": "system",
"value": "Make vectorizer Ignore decode errors\n\nThis isn't ideal and could harm our results, but it actually runs now. Figuring out the proper encoding would be better if possible.\n"
},
{
"from": "human",
"value": "from sklearn.datasets import load_files\nfrom sklearn.feat... | python | chosen |
[
{
"from": "system",
"value": "Fix test data after syncing with typeshed\n"
},
{
"from": "human",
"value": "map<warning descr=\"Unexpected type(s):(str, (c: Any) -> int)Possible types:(None, Iterable)((Any) -> Any, Iterable)\">('foo', lambda c: 42)</warning>\n"
},
{
"from": "gpt",
"va... | python | chosen |
[
{
"from": "system",
"value": "Fix compatibility with Py3 (generators no longer have next())\n\nBut there is a next() function as a general built-in and works in 2.6 too\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nPart of the pyosf package\nhttps://github.com/psychopy/pyos... | python | chosen |
[
{
"from": "system",
"value": "tests/basics: Add further tests for OrderedDict.\n"
},
{
"from": "human",
"value": "try:\n from collections import OrderedDict\nexcept ImportError:\n try:\n from ucollections import OrderedDict\n except ImportError:\n print(\"SKIP\")\n ... | python | chosen |
[
{
"from": "system",
"value": "Add Timetables Admin model to Django Admin Interface\n"
},
{
"from": "human",
"value": "from django.contrib import admin\n\nfrom .models import Course, Meal, MealOption, Weekday, Timetable, Dish\n\n\nadmin.site.register(Weekday)\nadmin.site.register(Meal)\nadmin.sit... | python | chosen |
[
{
"from": "system",
"value": "Add a basic unit test\n"
},
{
"from": "human",
"value": "import unittest\n\n\nclass MyTestCase(unittest.TestCase):\n def test_something(self):\n self.assertEqual(True, False)\n\n\nif __name__ == '__main__':\n unittest.main()\n"
},
{
"from": "gpt... | python | chosen |
[
{
"from": "system",
"value": "Add an explicit default for REDIS_URI\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\n# The base domain name for this installation. Used to control linking to\n# ... | python | chosen |
[
{
"from": "system",
"value": "Add newline to end fle"
},
{
"from": "human",
"value": "class RedisConnectionMock(object):\n \"\"\" Simple class to mock a dummy behaviour for Redis related functions \"\"\"\n\n def zscore(self, redis_prefix, day):\n pass\n\n def zincrby(self, redis_... | python | chosen |
[
{
"from": "system",
"value": "Remove blueprint specific template directories.\n"
},
{
"from": "human",
"value": "from flask import Blueprint\n\npublic = Blueprint('public', __name__, template_folder='templates')\n\n\n@public.route('/')\ndef index():\n return 'Hello World'\n"
},
{
"fro... | python | chosen |
[
{
"from": "system",
"value": "Sort build files for consistent link order.\n\nPrior to the introduction of find.py, GMs were liked in the order they\nwere listed in the gypi file, which was generally alphabetically. This\nmade it fairly easy to predict where slides would show up in SampleApp\nand the order w... | python | chosen |
[
{
"from": "system",
"value": "[logicmind] Allow more representations when parsing\n"
},
{
"from": "human",
"value": "from tokens.andd import And\nfrom tokens.expression import Expression\nfrom tokens.iff import Iff\nfrom tokens.nop import Not\nfrom tokens.orr import Or\nfrom tokens.then import T... | python | chosen |
[
{
"from": "system",
"value": "Change root site to just / not imagr/\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\nurlpatterns = patterns('',\n url(r'^imagr/', include('imagr.urls', namespace='imagr')),\n url(r'^a... | python | chosen |
[
{
"from": "system",
"value": "Fix bug when using the optional IP parameter\n\nWhen the IP parameter is used the first element of kwargs needs to be skipped because its value is the string 'ip'."
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\n\nfrom axes.util... | python | chosen |
[
{
"from": "system",
"value": "Send command in the child process\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n# Auto-launching using this: export PROMPT_COMMAND='/Users/putilin/client.py \"`fc -nl -1`\"'\n\nimport requests\nimport sys\nimport os\nimport re\n\nassert len(sys.argv) =... | python | chosen |
[
{
"from": "system",
"value": "Add test demonstrating aware comparisons\n"
},
{
"from": "human",
"value": "\"\"\"\nFacilities for common time operations in UTC.\n\nInspired by the `utc project <https://pypi.org/project/utc>`_.\n\n>>> dt = now()\n>>> dt == fromtimestamp(dt.timestamp())\nTrue\n>>> ... | python | chosen |
[
{
"from": "system",
"value": "Modify the type signature for `RepresentativeDataset` from a `Callable` to an `Iterator`.\n\nCurrently the usage for `RepresentativeDataset` is an iterator instead of a callable.\nThis fix changes the type signature accordingly.\n\nPiperOrigin-RevId: 457393586\n"
},
{
"... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.