conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add an action for adding members to a chat room\n\nEven though django-rest-framework supports a Ruby-on-Rails style\nof updating existing resources by issuing a PATCH or PUT request,\nsuch updates are unsafe and can cause race-conditions to lose\nsome state. The implementation ... | python | chosen |
[
{
"from": "system",
"value": "Add import of new widgets."
},
{
"from": "human",
"value": "__all__ = ['autoScrollbar', 'button', 'combobox', 'listbox', 'window']\n\nfrom .autoScrollbar import autoScrollbar\nfrom .button import button\nfrom .combobox import combobox\nfrom .listbox import listbox\n... | python | chosen |
[
{
"from": "system",
"value": "Increment version number for new release.\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom .impl import *\n\n\n__version__ = (0, 3)\n"
},
{
"from": "gpt",
"value": "from __future__ import absolute_import\nfrom .impl import ... | python | chosen |
[
{
"from": "system",
"value": "Update the example proxy list\n"
},
{
"from": "human",
"value": "\"\"\"\nProxy Server \"Phone Book\".\n\nSimplify running browser tests through a proxy server\nby adding your frequently-used proxies here.\n\nNow you can do something like this on the command line:\n\... | python | chosen |
[
{
"from": "system",
"value": "Adjust import to fix build with PyInstaller.\n"
},
{
"from": "human",
"value": "from grow.pods import pods\nfrom grow.pods import storage\nfrom grow.conversion import *\nimport click\nimport os\n\n\n@click.command()\n@click.argument('pod_path', default='.')\n@click.... | python | chosen |
[
{
"from": "system",
"value": "FIX disable sale require contract\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n{\n 'name': 'Sale Order Require Contract on Confirmation',\n 'version': '1.0',\n 'category': 'Projects & Services',\n 'sequence': 14,\n 'summary': '',\n '... | python | chosen |
[
{
"from": "system",
"value": "Add documentation and py3k compat\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from urllib import urlencode\nexcept ImportError:\n from urllib.parse import urlencode\n\n\ndef urlencode(string):\n return urlenco... | python | chosen |
[
{
"from": "system",
"value": "Add recaptcha to signup page\n\nSignup page is currently not used, but\ndoing it now in case it is forgotten later.\n"
},
{
"from": "human",
"value": "\"\"\"Forms for user application.\"\"\"\n\nfrom django.forms import ModelForm\nfrom django.contrib.auth import get_... | python | chosen |
[
{
"from": "system",
"value": "Remove junk and add more logging\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport sys\nimport logging\n\nfrom website.app import setup_django\nsetup_django()\nfrom website import mails\nfrom osf.models import OSFUser\nfrom addons.mendeley.models im... | python | chosen |
[
{
"from": "system",
"value": "Test that the service is register with the correct txt record\n"
},
{
"from": "human",
"value": "from saluttest import exec_test\nimport avahitest\nfrom avahitest import AvahiListener\n\nimport time\n\ndef test(q, bus, conn):\n a = AvahiListener(q)\n a.listen_... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Adding test failure to ensure that CI is functioning correctly\"\n\nThis reverts commit 754be81c1ccc385d8e7b418460271966d7db2361.\n"
},
{
"from": "human",
"value": "import pkg_resources\nimport random\n\n_insulting_adjectives = []\n\ndef _load_wordlists():\... | python | chosen |
[
{
"from": "system",
"value": "Return querysets in context processor to be more useful\n"
},
{
"from": "human",
"value": "from .models import Thread\n\n\ndef user_messages(request):\n c = {}\n if request.user.is_authenticated():\n c[\"inbox_count\"] = Thread.inbox(request.user).count... | python | chosen |
[
{
"from": "system",
"value": "Define skeleton for the function that will create the superuser\n\nAutoconverted from SVN (revision:2929)\n"
},
{
"from": "human",
"value": "# This file is part of Archivematica.\n#\n# Copyright 2010-2012 Artefactual Systems Inc. <http://artefactual.com>\n#\n# Archi... | python | chosen |
[
{
"from": "system",
"value": "Add argument to run single feed\n"
},
{
"from": "human",
"value": "from core.feed import Feed\nimport core.config.celeryimports\n\n\nif __name__ == '__main__':\n all_feeds = Feed.objects()\n for n in all_feeds:\n print \"Testing: {}\".format(n)\n ... | python | chosen |
[
{
"from": "system",
"value": "Add copyright, license and version information.\n"
},
{
"from": "human",
"value": "\nfrom file_encryptor import (convergence, key_generators)\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# The MIT License (MIT)\n#\n#... | python | chosen |
[
{
"from": "system",
"value": "Configure throughput for 'undefined' collection\n\nhttps://github.com/Automattic/mongoose/issues/6989\nhttps://jira.mongodb.org/browse/NODE-1662\n"
},
{
"from": "human",
"value": "class Azure:\n resource_group = \"MajavaShakki\"\n location = \"northeurope\"\n cos... | python | chosen |
[
{
"from": "system",
"value": "Add awp as an additional shell command\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# coding=utf-8\n\nfrom setuptools import setup\n\nsetup(\n name='alfred-workflow-packager',\n version='0.11.0',\n description='A CLI utility for packaging and e... | python | chosen |
[
{
"from": "system",
"value": "Add missing change from gh-172\n\nNot sure how this got lost\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nfrom distutils.core import Extension\n\nVERSION = '1.0.5'\nLONG_DESCRIPTION = \"\"\"\nA numerical geom... | python | chosen |
[
{
"from": "system",
"value": "Fix classifiers (Python 3.2 is supported).\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='ppp_datamodel',\n version='0.1',\n description='Data model for the Projet Pensées Profondes... | python | chosen |
[
{
"from": "system",
"value": "Update PyPSA version in requirements\n"
},
{
"from": "human",
"value": "\"\"\"This is the docstring for the example.py module. Modules names should\nhave short, all-lowercase names. The module name may have underscores if\nthis improves readability.\nEvery module ... | python | chosen |
[
{
"from": "system",
"value": "Update django-pylibmc dependency to >=0.6.1\n\nAs a bonus, django-pylibmc 0.5.0+ supports Python 3, for which testing\nwill be enabled in another PR.\n\nI've switched to using greater than, since the Python packaging\nguidelines say it's not best practice to use `install_requir... | python | chosen |
[
{
"from": "system",
"value": "Fix pep8 and whitespace issues\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup\nimport ibei\n\nsetup(name = \"ibei\",\n version = ibei.__version__,\n author = \"Joshua Ryan Smith\",\n author_email = \"joshua.r.... | python | chosen |
[
{
"from": "system",
"value": "Upgrade of prompt-toolkit and ptpython.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\nimport pyvim\n\nlong_description = open(\n os.path.join(\n os.path.dirname(__file__),\n 'README... | python | chosen |
[
{
"from": "system",
"value": "Add triggers module to install.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nwith open('requirements.txt') as f:\n required = f.read().splitlines()\n\nsetup(\n name=\"pysovo\",\n version=\"0.4.1\",\n package... | python | chosen |
[
{
"from": "system",
"value": "Include LICENSE file in bdist\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom distutils.core import Extension\n\n\nmodule = Extension('confluent_kafka.cimpl',\n include_dirs = ['/usr/lo... | python | chosen |
[
{
"from": "system",
"value": "Update mozci version to handle credentials in env variables\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\ndeps = [\n 'mozillapulse',\n 'mozci>=0.7.0',\n 'requests',\n]\n\nsetup(name='pulse-actions',\n version='0.1.4'... | python | chosen |
[
{
"from": "system",
"value": "Use Cython version of toolz\n\nUsage of activitysim within popultionsim fails with missing module cytoolz - i believe that activitysim is using cytoolz internally rather than toolz"
},
{
"from": "human",
"value": "from ez_setup import use_setuptools\r\nuse_setuptool... | python | chosen |
[
{
"from": "system",
"value": "Add more versions of Windows + environment\n"
},
{
"from": "human",
"value": "import os, sys\nfrom setuptools import setup\n\nsetup(\n name='reddit_comment_scraper',\n version='2.0.0',\n description='A simple Reddit-scraping script',\n url='https://githu... | python | chosen |
[
{
"from": "system",
"value": "Patch version bump to .post2\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# -*- coding: UTF-8 -*-\nfrom setuptools import setup, find_packages\nimport os\n\ntry:\n import pypandoc\n README = pypandoc.convert('README.md', 'rst')\nexcept (IOError, ImportE... | python | chosen |
[
{
"from": "system",
"value": "Switch entry point to click's cli\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nimport os\nfrom setuptools import find_packages\n\n__version__ = 'unknown'\nversion_path = os.path.join(os.path.split(__file__)[0], 'banneret/version.py')\n\nwit... | python | chosen |
[
{
"from": "system",
"value": "Bring in pytest and pytest-cov\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nrequirements = [\n]\n\ntest_requirements = [\n]\n... | python | chosen |
[
{
"from": "system",
"value": "Prepare for tagging for PyPI\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nsetup(name='dscsrf',\n\tversion='1.0',\n\tdescription='Global double-submit Flask CSRF',\n\tpackages=['dscsrf'],\n \tpy_modules=['flask'],\n)\n"
},
{
"from": "g... | python | chosen |
[
{
"from": "system",
"value": "Update url to current RoR"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nsetup(name='relengapi-mapper',\n version='0.1',\n description='hg to git mapper',\n author='Chris AtLee',\n author_... | python | chosen |
[
{
"from": "system",
"value": "build: Add Python :: Implementation classifiers\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\n\nwith open('README.rst') as f:\n long_description = f.read()\n\nsetup(\n name='ocdsmerge',\n version='0.6.6',\n author='Open ... | python | chosen |
[
{
"from": "system",
"value": "Bump to version 0.4.1 since 0.4 was mis-packaged.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(name='corker',\n version='0.4',\n description='Another WSGI Framework',\n classifiers=[\"Development Status :: 4 ... | python | chosen |
[
{
"from": "system",
"value": "Fix W503 line break before binary operator\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nfrom rewrite_external_links import get_version\n\n\ndescription = (\n 'Rewrite all external (off-site) links to go via a message page, '\n + 'using a ... | python | chosen |
[
{
"from": "system",
"value": "Change license classifier to BSD License to remove PyPI error\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nimport derpibooru\n\nsetup(\n name = \"DerPyBooru\",\n description = \"P... | python | chosen |
[
{
"from": "system",
"value": "Make CACHE_REDIS_PASSWORD really optional, because it does not work with older Werkzeug.\n"
},
{
"from": "human",
"value": "from werkzeug.contrib.cache import (NullCache, SimpleCache, MemcachedCache,\n GAEMemcachedCache, FileSystem... | python | chosen |
[
{
"from": "system",
"value": "Enable extra GLAMkit features by default in ICEkit project\n\nEnable GLAMkit features by default for new ICEkit projects, since they\nwill probably be wanted anyway and because it will also indirectly\nensure we run unit tests for all GLAMkit features.\n"
},
{
"from": "... | python | chosen |
[
{
"from": "system",
"value": "Convert data delimiter from :: to tab character.\n"
},
{
"from": "human",
"value": "# script :: creating a datamodel that fits mahout from ratings.dat\n\nratings_dat = open('../data/movielens-1m/ratings.dat', 'r')\n\nratings_csv = open('../data/movielens-1m/ratings_... | python | chosen |
[
{
"from": "system",
"value": "Print number of terms loaded to Airtable.\n"
},
{
"from": "human",
"value": "import fire\nimport json\nimport sys\n\nfrom source import VocabularyCom\nfrom airtable import Airtable\n\nclass CLI:\n class source:\n \"\"\"Import word lists from various source... | python | chosen |
[
{
"from": "system",
"value": "Add user data export for accesstokens"
},
{
"from": "human",
"value": "from django.apps import AppConfig\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass AccessTokenConfig(AppConfig):\n name = 'froide.accesstoken'\n verbose_name = _('Secret ... | python | chosen |
[
{
"from": "system",
"value": "Add a test for the validate-collated tree output\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# ###\n# Copyright (c) 2016, Rice University\n# This software is subject to the provisions of the GNU Affero General\n# Public License version 3 (AGPLv3).\n#... | python | chosen |
[
{
"from": "system",
"value": "Reduce the width of dependency from analytic_operating_unit to operating_unit\n"
},
{
"from": "human",
"value": "# © 2019 Eficent Business and IT Consulting Services S.L.\n# © 2019 Serpent Consulting Services Pvt. Ltd.\n# License LGPL-3.0 or later (https://www.gnu.o... | python | chosen |
[
{
"from": "system",
"value": "Add tofloat function that transforms from any float-based string into float\n"
},
{
"from": "human",
"value": "\"\"\":mod:`krcurrency.utils` --- Helpers\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\"\"\"\nfrom bs4 import BeautifulSoup as BS\nimport requests\n\n__all_... | python | chosen |
[
{
"from": "system",
"value": "Remove a problematic test on travis.\n"
},
{
"from": "human",
"value": "import mgdpck\nfrom mgdpck import _version\nfrom mgdpck import data_access\nfrom mgdpck import exceptions\nfrom mgdpck import logging_util\nfrom mgdpck import model\nfrom mgdpck import actions\n... | python | chosen |
[
{
"from": "system",
"value": "Correct Author string in module\n"
},
{
"from": "human",
"value": "\"\"\"\"\nIntroduction Adventure\n\nAuthor: igui\n\"\"\"\nimport codecs\nimport io\nimport sys\nimport unittest\nfrom story.adventures import AdventureVerificationError, BaseAdventure\nfrom story.tra... | python | chosen |
[
{
"from": "system",
"value": "Restructure context assembly for CozyLAN site\n"
},
{
"from": "human",
"value": "\"\"\"\nSite-specific code extension\n\"\"\"\n\nfrom __future__ import annotations\nfrom typing import Any\n\nfrom flask import g\n\nfrom byceps.services.seating import seat_service\nfr... | python | chosen |
[
{
"from": "system",
"value": "Migrate online events to the Pole of Inaccessibility lat/long\n\n...and 'internet' as a venue.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef add_country_to_onl... | python | chosen |
[
{
"from": "system",
"value": "Add new line. This was annoying.\n"
},
{
"from": "human",
"value": "from flask import Flask\nfrom redis import Redis\nimport os\napp = Flask(__name__)\nredis = Redis(host='redis', port=6379)\n\n@app.route('/')\ndef hello():\n redis.incr('hits')\n return 'Hello... | python | chosen |
[
{
"from": "system",
"value": "Add full list of default styles\n"
},
{
"from": "human",
"value": "from .results import Result\nfrom . import docx, conversion, style_reader\n\n\ndef convert_to_html(fileobj):\n return docx.read(fileobj).bind(lambda document: \n conversion.convert_document... | python | chosen |
[
{
"from": "system",
"value": "Fix intentionally bad testcase which was not run before\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nfrom numpy.testing import assert_approx_equal, assert_allclose\nfrom UliEngineering.Mechanics.Threads import *\nimport unittes... | python | chosen |
[
{
"from": "system",
"value": "Create main() entry point for final script\n\nSigned-off-by: Lizhou Sha <d6acb26e253550574bc1141efa0eb5e6de15daeb@mit.edu>\n"
},
{
"from": "human",
"value": "import argparse\nimport astropy.io.fits as fits\nimport numpy as np\n\nimport calc\nimport combine\n\nif __n... | python | chosen |
[
{
"from": "system",
"value": "Create solutions directory if it does not exist\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nnbtutor - a small utility to indicate which cells should be cleared (exercises).\n\"\"\"\n\nimport os\n\ntry:\n from nbconvert.preprocessors.base i... | python | chosen |
[
{
"from": "system",
"value": "Add missing assertion in test\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nfrom django.db import models\nfrom sentry.utils.models import Model\nfrom sentry.testutils import TestCase\n\n\n# There's a good chance this model wont get cre... | python | chosen |
[
{
"from": "system",
"value": "Revise doc string and add time complexity\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\ndef kruskal():\n\t\"\"\"Kruskal's algorithm for minimum spanning tree in we... | python | chosen |
[
{
"from": "system",
"value": "Add donation migration dependancy in bb_follow\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.8 on 2018-05-30 14:21\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\n\ndef fix_followers(apps, sche... | python | chosen |
[
{
"from": "system",
"value": "Update to 0.0.11 version for PyPI.\n\nPiperOrigin-RevId: 484429105\n"
},
{
"from": "human",
"value": "# Copyright 2022 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the Lice... | python | chosen |
[
{
"from": "system",
"value": "Update award winner form to use award category enum for select field choices\n"
},
{
"from": "human",
"value": "from flask.ext.wtf import Form\nfrom wtforms import SelectField, RadioField\n\n\n# TODO add validation to ensure same award isn't assigned twice\nclass Aw... | python | chosen |
[
{
"from": "system",
"value": "Remove author notice and add newline at end of file\n"
},
{
"from": "human",
"value": "import os\n\n__author__ = 'mfliri'\n\n\ndef create_directory(output_dir):\n if not os.path.exists(output_dir):\n os.makedirs(output_dir)"
},
{
"from": "gpt",
... | python | chosen |
[
{
"from": "system",
"value": "Test property of wavelength selection\n\nThat afterwards the values are all above and below the min and max\nvalues used.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom __future__ import division, print_function\nimport pytest\n\nimport sys\n# Add ... | python | chosen |
[
{
"from": "system",
"value": "Remove dropout from output/state in rnn cells\n"
},
{
"from": "human",
"value": "import tensorflow as tf\n\n\ndef rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):\n dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0\n\... | python | chosen |
[
{
"from": "system",
"value": "Add a test case of just two identical arguments to a blaze func\n"
},
{
"from": "human",
"value": "import blaze\nfrom blaze.datadescriptor import dd_as_py\nimport unittest\n\n\nclass TestBasic(unittest.TestCase):\n\n def test_add(self):\n types = ['int8', ... | python | chosen |
[
{
"from": "system",
"value": "Add 'rb' flag to FileToList\n"
},
{
"from": "human",
"value": "\"\"\"\nClass for FileToList\n\"\"\"\n\n\nclass FileToList(object):\n \"\"\"\n FileToList is a helper class used to import text files and turn them into\n lists, with each index in the list repr... | python | chosen |
[
{
"from": "system",
"value": "Add middle name display to autocomplete widget\n"
},
{
"from": "human",
"value": "from autocomplete_light import shortcuts as autocomplete_light\nfrom django.contrib.auth.models import User, Group\n\nclass UserAutocomplete(autocomplete_light.AutocompleteModelBase):\... | python | chosen |
[
{
"from": "system",
"value": "Handle queryset argument to get_object\n"
},
{
"from": "human",
"value": "from django.core.urlresolvers import reverse\nfrom django.views.generic import DetailView\nfrom django.contrib.syndication.views import Feed\nfrom django.shortcuts import get_object_or_404\n\n... | python | chosen |
[
{
"from": "system",
"value": "Use PyYAML as YAML's loader and dumper\n"
},
{
"from": "human",
"value": "from pureyaml import dump as dumps\nfrom pureyaml import load as loads\n\n__all__ = ['dumps', 'loads']\n"
},
{
"from": "gpt",
"value": "from __future__ import absolute_import\n\nim... | python | chosen |
[
{
"from": "system",
"value": "Update our message Consumer api to consume a `topic`, not a `queue`.\n"
},
{
"from": "human",
"value": "\"\"\"\nConsumers\n=========\n\nA `Consumer` is a simple consumer of messages. Based on a given `routing_key`,\nyour consumer's :meth:`consume` method will be ca... | python | chosen |
[
{
"from": "system",
"value": "Fix URL for home page (thanks jlongster)\n"
},
{
"from": "human",
"value": "from django.conf.urls.defaults import *\nfrom views import home, contribute, channel, firefox_performance, firefox_features, firefox_customize, firefox_happy, firefox_security, firefox_speed... | python | chosen |
[
{
"from": "system",
"value": "Fix build error due to replacing zero_point_celsius by scipy equivalent\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nUtilities regarding NTC thermistors\n\nSee http://www.vishay.com/docs/29053/ntcintro.pdf for details\n... | python | chosen |
[
{
"from": "system",
"value": "Exclude post_id from the wtform.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\nfrom flask.ext.mongoengine.wtf import model_form\n\nfrom paveldedik.models import User, Post\n\n\npost_args = {\n 'title': {'label': u'Title'},\n 'leading': {'labe... | python | chosen |
[
{
"from": "system",
"value": "Split Broadcast into base class\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport json\nfrom enum import Enum\n\n\nclass BEMessages(Enum):\n ALL_MAIN_BROADCAST = 'ALL_MAIN_BROADCAST'\n\n\nclass FEMessages(Enum):\n pass\n\n\nclass AllMainBroadC... | python | chosen |
[
{
"from": "system",
"value": "Update TRPO, inconsistent results between Travis and local.\n"
},
{
"from": "human",
"value": "# Copyright 2017 reinforce.io. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complian... | python | chosen |
[
{
"from": "system",
"value": "Fix whitespace issue in SecureTransport test"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport contextlib\nimport socket\nimport ssl\n\nimport pytest\n\ntry:\n from urllib3.contrib.securetransport import WrappedSocket\nexcept ImportError:\n pass... | python | chosen |
[
{
"from": "system",
"value": "Fix python tests re: http routing"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom copper.wsgi_support import wsgi\n\ndef test_http_handler(copper_client, copper_http_client):\n def application(environ, start_response):\n message = 'Hello, %s... | python | chosen |
[
{
"from": "system",
"value": "Sort subcommands.all so the tested results are deterministic\n"
},
{
"from": "human",
"value": "\n\ndef _collect():\n from importlib import import_module\n from os import listdir\n from os.path import dirname\n from ..subcommand import Subcommand\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Add hold all function to dicebag\n"
},
{
"from": "human",
"value": "import random\nclass Die(object):\n def __init__(self, sides = 6):\n self.sides = sides\n self.held = False\n self.die_face = 1\n def change_held(self, held):\n sel... | python | chosen |
[
{
"from": "system",
"value": "Fix png for python 2/3 compatibility\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, unicode_literals, print_function, division\nfrom builtins import open\nfrom future import standard_library\nstandard_library.install_aliases()\nimport six... | python | chosen |
[
{
"from": "system",
"value": "Stop using os.path.join, because Visual Studio can actually handle forward\nslash style paths, and the os.path method was creating mixed \\\\ and /\nstyle paths, b0rking everything.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nimport sys\ni... | python | chosen |
[
{
"from": "system",
"value": "Add date/time created timestamp to Vote model\n"
},
{
"from": "human",
"value": "\nfrom django.db import models\nfrom django.contrib.auth.models import User\n\nclass Voter(models.Model):\n '''\n Models someone who may vote\n '''\n user = models.OneToOneF... | python | chosen |
[
{
"from": "system",
"value": "Add short shortcut for experimental flag.\n"
},
{
"from": "human",
"value": "import locale\nimport os\nimport signal\nimport sys\nfrom argparse import ArgumentParser\n\nimport gi\ngi.require_version('Gtk', '3.0')\ngi.require_version('GtkSource', '3.0')\n\nfrom gi.re... | python | chosen |
[
{
"from": "system",
"value": "Refactor args in manage task\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\n\nfrom django.conf import settings\nfrom django.contrib.admin.models import LogEntry\nfrom django.core.management.base import BaseCommand\n\nfrom cla_eventlog.models ... | python | chosen |
[
{
"from": "system",
"value": "Change debug message to exception\n"
},
{
"from": "human",
"value": "import slackclient\nimport time\nimport os\n\nslackClient = slackclient.SlackClient(os.environ[\"SLACK_TOKEN\"])\nslackClient.rtm_connect()\nlastPingTime = 0\nprint(os.environ)\nwhile True:\n fo... | python | chosen |
[
{
"from": "system",
"value": "Fix logic bugs and add historypage handler\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\r\n\r\nimport webapp2\r\n\r\n# Importing request handlers\r\nfrom signup import Signup\r\nfrom login import Login\r\nfrom logout import Logout\r\nfrom wikipage impo... | python | chosen |
[
{
"from": "system",
"value": "Check for .com in url\n"
},
{
"from": "human",
"value": "def main():\n\twebsite = input(\"Input website(cnn, nytimes, bbc, nzherald): \") \n\turl = input(\"Input url: \")\n\tscraper(website, url)\ndef scraper(website, url):\n\tprint(\"%s, %s\" % (website, url))\nif ... | python | chosen |
[
{
"from": "system",
"value": "Use existing code. Delay after delete.\n\n* Use existing code to get the elasticsearch connection. This should\n prevent tests from failing in case the way connections to\n elasticsearch are made change.\n* Delay a while after deleting to allow elasticsearch to re-index the\n... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Py 2.6 support is back\"\n\nThis reverts commit 463c1ab6a7f5a7909b967e0dfa0320a77e166b95.\n"
},
{
"from": "human",
"value": "from pyramid.interfaces import (\n ISessionFactory,\n )\n\nfrom .interfaces import (\n IAuthService,\n IAuthSourceServic... | python | chosen |
[
{
"from": "system",
"value": "Create Workout now checks to see if you worked out once today already, if so tells user they already worked out on that day. fixed error where redirect would not re-instantiate get request to createview\n"
},
{
"from": "human",
"value": "# from datetime import date... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Use clang on mac if XCode >= 4.5\"\n\nWe cannot build v8 after this change because clang reports a warning in\nv8/src/parser.cc about an unused field (and we turn warnings into errors).\n\nWe can enable this change again after we update to a new v8 version (this seems\... | python | chosen |
[
{
"from": "system",
"value": "Remove Questions from queried objects\n"
},
{
"from": "human",
"value": "from django.shortcuts import render\n\nfrom .models import Question, MultipleChoiceQuestion\n\n\ndef index(request):\n pass\n\n\ndef questions(request):\n ques = MultipleChoiceQuestion.ob... | python | chosen |
[
{
"from": "system",
"value": "Load value from json field as string.\n"
},
{
"from": "human",
"value": "import json\nimport copy\n\nfrom django import forms\nfrom django.utils.safestring import mark_safe\nfrom django.template.loader import render_to_string\n\n\nclass JSONEditorWidget(forms.Widget... | python | chosen |
[
{
"from": "system",
"value": "Make the admin a little bit more palatable\n\nRefs #25\n"
},
{
"from": "human",
"value": "from django.contrib import admin\n\nfrom kk.models import Hearing, Label, Introduction, Scenario, Comment\n\nadmin.site.register(Label)\nadmin.site.register(Hearing)\nadmin.sit... | python | chosen |
[
{
"from": "system",
"value": "Mark es_test decorator as nottest\r\n\r\nSecond try..."
},
{
"from": "human",
"value": "import json\nfrom nose.plugins.attrib import attr\n\n\nclass ElasticTestMixin(object):\n\n def checkQuery(self, query, json_output, is_raw_query=False):\n if is_raw_que... | python | chosen |
[
{
"from": "system",
"value": "Remove print statements, not usefull anymore.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\n\n\ndef fix_multiple_default_templates(apps, schema_editor):\n # Some us... | python | chosen |
[
{
"from": "system",
"value": "Increase namespace, sleep before cmd window closes"
},
{
"from": "human",
"value": "''' rename files in local directory with random integer names.\n\nwindows screen saver isn't very good at randomizing fotos shown. \nChange file names regularly to provide more varie... | python | chosen |
[
{
"from": "system",
"value": "Copy backend_register from ControllerSlice to Slice\n"
},
{
"from": "human",
"value": "def handle(controller_slice):\n from core.models import ControllerSlice, Slice\n \n try:\n my_status_code = int(controller_slice.backend_status[0])\n try:\n ... | python | chosen |
[
{
"from": "system",
"value": "Add pyparsing to satori.ars dependencies.\n"
},
{
"from": "human",
"value": "# vim:ts=4:sts=4:sw=4:expandtab\nfrom setuptools import setup, find_packages\n\nsetup(name='satori.ars',\n packages=find_packages(),\n namespace_packages=[\n 'satori',\n ],\... | python | chosen |
[
{
"from": "system",
"value": "Check for env. variable existence\n"
},
{
"from": "human",
"value": "\"\"\"Module with code to be run before and after certain events during the testing.\"\"\"\nimport os\nfrom src.support import helpers\n\n\ndef before_all(_context):\n \"\"\"Perform the setup be... | python | chosen |
[
{
"from": "system",
"value": "Add more modules to __all__\n"
},
{
"from": "human",
"value": "__all__ = ['en_profile']\n__version__ = '0.1.0'\n"
},
{
"from": "gpt",
"value": "__all__ = ['en_profile', 'functions', 'chem_parser']\n__version__ = '0.1.0'\n"
}
] | python | chosen |
[
{
"from": "system",
"value": "Add new state for driving away from cone"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n#\n# Copyright 2017 Robot Garden, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.