conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Increase abstractness for remaining test methods\n"
},
{
"from": "human",
"value": "from django.template import Library\n\nregister = Library()\n\n@register.filter\ndef get_representation_for_user(role, user_role):\n if user_role.type == \"juror\":\n if ro... | python | chosen |
[
{
"from": "system",
"value": "Allow arbitrary resources after ontology\n"
},
{
"from": "human",
"value": "from django.conf.urls import url\nfrom django.conf.urls.static import static\nfrom django.views.generic import TemplateView, RedirectView\nfrom os import walk\nfrom ontology import views\nfr... | python | chosen |
[
{
"from": "system",
"value": "Print a progress meter when pushing windows\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\"\"\"\nUsage: build_windows.py --start=<START> --end=<END> [--interval=<INTERVAL>] --resource=<RESOURCE>\n build_windows.py -h | -... | python | chosen |
[
{
"from": "system",
"value": "Disable ContextLost.WebGLContextLostFromSelectElement on Windows Release.\n\nBUG=528139\nTBR=kbr@chromium.org\n\nReview URL: https://codereview.chromium.org/1319463006\n\nCr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#347374}\n"
},
{
"from": "human",
... | python | chosen |
[
{
"from": "system",
"value": "Add google analytics tracking id\n\nJust so I can get an idea of who/what is looking at this blog\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*- #\nfrom __future__ import unicode_literals\n\n# This file is only used if you use `mak... | python | chosen |
[
{
"from": "system",
"value": "Remove action from required params\n"
},
{
"from": "human",
"value": "class BaseTransport(object):\n \"\"\"Base transport class.\"\"\"\n\n def __init__(self, name, data_format_class, data_format_options,\n handler_class, handler_options):\n ... | python | chosen |
[
{
"from": "system",
"value": "TS.ENH: Add control system data to init.\n"
},
{
"from": "human",
"value": "\nfrom .lattice import default_optics_mode\nfrom .lattice import energy\n\nfrom .accelerator import default_vchamber_on\nfrom .accelerator import default_radiation_on\nfrom .accelerator impo... | python | chosen |
[
{
"from": "system",
"value": "Correct the name of the test function\n"
},
{
"from": "human",
"value": "import pytest\n\nimport parsl\nfrom parsl.app.app import App\nfrom parsl.data_provider.files import File\nfrom parsl.tests.configs.local_threads_globus import config\n\nparsl.clear()\nparsl.loa... | python | chosen |
[
{
"from": "system",
"value": "Add __str__ method to AppToAppPermission\n"
},
{
"from": "human",
"value": "from django.db import models\nfrom django.conf import settings\n\n\nclass AppToAppPermission(models.Model):\n requester = models.ForeignKey(settings.OAUTH2_PROVIDER_APPLICATION_MODEL,\n ... | python | chosen |
[
{
"from": "system",
"value": "Implement read of Python wrapper\n"
},
{
"from": "human",
"value": "import asyncio\n\nclass Sandbox:\n def __init__(self):\n self._process = None\n async def start(self):\n if self._process is not None:\n raise ValueError(\"The sandbox... | python | chosen |
[
{
"from": "system",
"value": "Fix bug dealing with spaces in exports\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"\n stack-builder.hiera_config\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n This module will read metadata set during instance\n launch and override any yaml under ... | python | chosen |
[
{
"from": "system",
"value": "Use exact case for ModestMaps dependency\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport sys, os\n\nversion = '0.0'\n\nsetup(name='tilequeue',\n version=version,\n description=\"\",\n long_description=\"\"\"\\\n\... | python | chosen |
[
{
"from": "system",
"value": "Add specifier for python 2 and 3 for the package\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst'), \"r\") as readme_file:\n readme = readme_file.re... | python | chosen |
[
{
"from": "system",
"value": "Add requirement of argparse on old python\n"
},
{
"from": "human",
"value": "# Copyright 2012 Loop Lab\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a cop... | python | chosen |
[
{
"from": "system",
"value": "Fix issue with path variable\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup\n\nPACKAGE_VERSION = '0.3'\n\n\ndef version():\n def version_file(mode='r'):\n return open(os.path.join(__path__, 'version.txt'), mode)\n\n if os.g... | python | chosen |
[
{
"from": "system",
"value": "Allow newer requests. Still to try out and find any issues.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nfrom ckanext.qa import __version__\n\nsetup(\n name='ckanext-qa',\n version=__version__,\n description='Quality Assur... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3.5 and 3.6 classifiers\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name='slacker',\n version='0.9.42',\n packages=['slacker'],\n description='Slack API client',\n author='Oktay Sancak',\n author_email='... | python | chosen |
[
{
"from": "system",
"value": "Revert to master (for prod host)"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\nimport subprocess\nimport sys\nimport os\n\npath = os.path.dirname(os.path.realpath(__file__))\n\nsubmodule_path = os.path.join(path, \"space... | python | chosen |
[
{
"from": "system",
"value": "Update package version to 2.1.0\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nimport os\nfrom setuptools import setup, find_packages\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n\nos.chdir(os.path.normpath(os.path.join(os.p... | python | chosen |
[
{
"from": "system",
"value": "Fix a remaining reference to 'swingtime' in a comment\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nimport sys\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nif sys.argv[-1] == 'publish'... | python | chosen |
[
{
"from": "system",
"value": "Downgrade the status of the project since it is new.\n"
},
{
"from": "human",
"value": "from setuptools import setup\nimport os\n\ndef read(filename):\n with open(filename) as fin:\n return fin.read()\n\nsetup(\n name='jstree',\n version='0.1',\n author='Will... | python | chosen |
[
{
"from": "system",
"value": "Include package data in builds\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='django-afip',\n version='0.8.0',\n description='AFIP integration for django',\n author='Hugo Osvaldo... | python | chosen |
[
{
"from": "system",
"value": "Make sure 'twisted' doesn't appear in the egg-info top_level.txt file.\n\nWokkel provides a plugin for twistd. As with all twisted plugins, these\nneed to be placed in a directory twisted/plugins so that the plugin mechanism\ncan find them. This is not a real package, and when ... | python | chosen |
[
{
"from": "system",
"value": "Revert \"fix UnicodeDecodeError for long_description\", Py3 only workaround\n\nThis reverts commit 417bf8df61dba0fa2e924008c4dbe204a609d4f2.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from setuptools import setup\n... | python | chosen |
[
{
"from": "system",
"value": "Add Python 3.9 to classifiers list\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nwith open(\"README.rst\") as readme_file:\n readme = readme_file.read()\n\n\nsetup(\n name='pytest-describe',\n version='2.0.0',\n description='Descri... | python | chosen |
[
{
"from": "system",
"value": "Switch file for open = Python3 support\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nimport os.path\n\ndescription = file(\n os.path.join(os.path.dirname(__file__), 'README.md'), 'rb').read()\n\n\nsetup(\... | python | chosen |
[
{
"from": "system",
"value": "Use with statement for reading readme file\n\n1. Without file closing it may cause \"too many files\" error\n on PyPy. It's complicated to explain, but related to difference\n of memory handling from CPython (reference counting) to\n PyPy (garbage collection).\n\n2. READ... | python | chosen |
[
{
"from": "system",
"value": "Upgrade from alpha to beta\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n\nfrom __future__ import print_function\n\nfrom setuptools import setup, find_packages\n\nimport tunic\n\n\nDESCRIPTION = 'Deployment related Fabric utilities'\nAUTHOR = 'TSH L... | python | chosen |
[
{
"from": "system",
"value": "Make version PEP 440 compliant. Name pkg 'txyam' (as still a branch)"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\n\nsetup(\n name=\"txyam2\",\n version=\"0.5.1\",\n description=\"Yet Another Memcached ... | python | chosen |
[
{
"from": "system",
"value": "Correct name for Pypi package\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='snippet',\n version=__import__('snippet').__version__,\n description=__import__('snippet').__doc__,\n long_description=open('RE... | python | chosen |
[
{
"from": "system",
"value": "Increment version number for release\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nversion = \"0.3.0\"\n\nsetup(\n\tname=\"arxiv\",\n\tversion=version,\n\tpackages=[\"arxiv\"],\n\n\t# dependencies\n\tinstall_requires=[\n\t\t'feedparser',\n\t\t'r... | python | chosen |
[
{
"from": "system",
"value": "Update the version before pushing to pypi\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nsetup(name='sophiabus230',\n version='0.1',\n description='Module to get the timetable of the Sop... | python | chosen |
[
{
"from": "system",
"value": "Fix for broken ci tests due to thift 0.10.0 release\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='scales-rpc',\n version='1.0.6',\n author='Steve Niemitz',\n author_email='sniemitz@twitter.com',\n url='https://www.github.com/... | python | chosen |
[
{
"from": "system",
"value": "Reset version for pypi upload\n"
},
{
"from": "human",
"value": "#!/bin/python3\n# coding: utf-8\n\"\"\"sphinxmark setup file.\"\"\"\n\n# To use a consistent encoding\nfrom codecs import open\nfrom os import path\n\nfrom setuptools import setup\n\nhere = path.abspat... | python | chosen |
[
{
"from": "system",
"value": "pywrap: Fix the loaders extend context after API change.\n"
},
{
"from": "human",
"value": "from ..utils import extend, add_swig_getmethod, add_swig_setmethod\nfrom . import loaders_c\n\ndef extend_context(_context):\n \"\"\"\n Extends _context class with loader m... | python | chosen |
[
{
"from": "system",
"value": "Allow to request for item on Lingua Libre\n\nBug: T286303\nChange-Id: Ic0d8824d1bf326f2182fbb64d0cc2ed77f82fd4c\n"
},
{
"from": "human",
"value": "\"\"\"Family module for Lingua Libre.\"\"\"\n#\n# (C) Pywikibot team, 2021\n#\n# Distributed under the terms of the MIT... | python | chosen |
[
{
"from": "system",
"value": "Fix builds on systems where LANG=C\n"
},
{
"from": "human",
"value": "import setuptools\r\n\r\ndef read_long_description():\r\n with open('README.rst') as f:\r\n data = f.read()\r\n with open('CHANGES.rst') as f:\r\n data += '\\n\\n' + f.read()\r... | python | chosen |
[
{
"from": "system",
"value": "Remove download link from GH\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='sfdc-bulk',\n packages=['sfdc_bulk'],\n version='0.1',\n description='Python client library for SFDC bulk API',\n url='https://github.com/do... | python | chosen |
[
{
"from": "system",
"value": "Update project description and GitHub URL\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='borg-summon',\n version='0.1',\n description='A wrapper for the backup program borg',\n url='http://github.com/grensjo/borg-summon',\n ... | python | chosen |
[
{
"from": "system",
"value": "Change initial version to be 0.1.0\n\nIf it's intended to use semantic versioning then it's doesn't make sense to start from a bug fix release."
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n\nwith open('RE... | python | chosen |
[
{
"from": "system",
"value": "Allow passing in config/consoles/emulators.txt locations from command line\n\nSummary: This will be really useful for Integration tests, along with whenever we get the desktop app running (since it will communicate with Ice via the command line)\n\nTest Plan: Run `src/ice.py --... | python | chosen |
[
{
"from": "system",
"value": "Fix return value of list_files\n"
},
{
"from": "human",
"value": "import os\nfrom os import listdir\nfrom django.conf import settings\n\n\ndef handle_uploaded_file(f, title, user):\n targetdir = 'uploads/' + user.__str__() + '/incoming/'\n if not os.path.exist... | python | chosen |
[
{
"from": "system",
"value": "Handle improperly installed xgboost. Fixes GH-162.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\n__version__ = '0.4.1'\n\nfrom .formatters import format_as_html, format_html_styles, format_as_text\nfrom .explai... | python | chosen |
[
{
"from": "system",
"value": "Improve the speed of csv export file generation\n"
},
{
"from": "human",
"value": "import sys\nimport csv\nfrom optparse import make_option\n\nfrom django.core.management.base import BaseCommand\n\nfrom modoboa.core import load_core_settings\nfrom modoboa.core.model... | python | chosen |
[
{
"from": "system",
"value": "Change default mccabe complexity to 12\n\nSee comments at code\n"
},
{
"from": "human",
"value": "\"\"\"Check files with flake8.\"\"\"\nimport flake8.main\nimport re\n\n\nDEFAULTS = {\n 'ignore': 'E226',\n 'complexity': '10',\n}\n\n\nPYTHON_SHEBANG_REGEX = re.... | python | chosen |
[
{
"from": "system",
"value": "Fix dashboard script parsing failure\n\nSigned-off-by: Salim Alam <18ae4dd1e3db1d49a738226169e3b099325c79a0@chef.io>\n"
},
{
"from": "human",
"value": "import time\nfrom datetime import datetime\n\ndef my_log_parser(logger, line):\n if line.count(',') >= 6:\n ... | python | chosen |
[
{
"from": "system",
"value": "Handle Oscar 0.4 dashboard navigation gracefully\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, url\nfrom django.contrib.admin.views.decorators import staff_member_required\n\nfrom oscar.core.application import Application\nfrom oscar.apps... | python | chosen |
[
{
"from": "system",
"value": "Fix unicode issue in example code for python2.x\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import, print_function\n\nimport sys\nimport time\n\nfrom pyspin import spin\n\n\ndef show(name, fram... | python | chosen |
[
{
"from": "system",
"value": "Use historical model in migration, not directly imported model\n"
},
{
"from": "human",
"value": "# Generated by Django 2.2.24 on 2021-06-10 09:13\n\nfrom django.db import migrations\nfrom corehq.messaging.smsbackends.turn.models import SQLTurnWhatsAppBackend\nfrom ... | python | chosen |
[
{
"from": "system",
"value": "Update edit form for StockItem\n\n- Disallow direct quantity editing (must perform stocktake)\n- Add notes field to allow editing\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django import forms\nfrom In... | python | chosen |
[
{
"from": "system",
"value": "Use verbose name for FormSubmissionsPanel heading\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, unicode_literals\n\nfrom django.template.loader import render_to_string\nfrom django.utils.safestring import mark_safe\nfrom django.utils.tra... | python | chosen |
[
{
"from": "system",
"value": "Enable filtering OpenStack package by customer and project (WAL-49)\n"
},
{
"from": "human",
"value": "import django_filters\n\nfrom nodeconductor.core.filters import UUIDFilter\n\nfrom . import models\n\n\nclass PackageTemplateFilter(django_filters.FilterSet):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add GraphQL type for ContentType\n"
},
{
"from": "human",
"value": "import graphene\nfrom graphene.types.generic import GenericScalar\nfrom graphene_django import DjangoObjectType\n\n__all__ = (\n 'BaseObjectType',\n 'ObjectType',\n 'TaggedObjectType',\n)\n... | python | chosen |
[
{
"from": "system",
"value": "Support non-string formats in `get_fields`.\n\nThis commit rewrites the `get_fields` function to be simpler and more general.\nThe previous implementation relied on ad hoc dict mocking and only supported\nformat strings involving string-valued formats ('%(name)s'). From this co... | python | chosen |
[
{
"from": "system",
"value": "Add support for monitor starterlog\n"
},
{
"from": "human",
"value": "#!/bin/env python\n#\n# cat_StarterLog.py\n#\n# Print out the StarterLog for a glidein output file\n#\n# Usage: cat_StarterLog.py logname\n#\n\nimport os.path\nimport sys\nSTARTUP_DIR=sys.path[0]\... | python | chosen |
[
{
"from": "system",
"value": "Fix wrong CLI argument type\n"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\n\nfrom submission.models import Article\nfrom core.models import File\n\n\nclass Command(BaseCommand):\n \"\"\"Dumps the text of files to the datab... | python | chosen |
[
{
"from": "system",
"value": "Add __all__ to morphology package\n"
},
{
"from": "human",
"value": "from .binary import (binary_erosion, binary_dilation, binary_opening,\n binary_closing)\nfrom .grey import *\nfrom .selem import *\nfrom .ccomp import label\nfrom .watershed imp... | python | chosen |
[
{
"from": "system",
"value": "Add pylint to installation requirements\n"
},
{
"from": "human",
"value": "\"\"\"\nCreated on 21/03/2012\n\n@author: losa, sortega\n\"\"\"\n\nimport os\n\nfrom setuptools import setup, find_packages\n\n\ndef find_files(path):\n files = []\n for dirname, subdir... | python | chosen |
[
{
"from": "system",
"value": "[FIX] Update test url for gls web api v1\n"
},
{
"from": "human",
"value": "\"\"\"Implementation for Laposte.\"\"\"\n\nfrom roulier.carrier_action import CarrierGetLabel\nfrom roulier.roulier import factory\n\nfrom .api import GlsEuApiParcel\nfrom .encoder import Gl... | python | chosen |
[
{
"from": "system",
"value": "Normalize usernames properly to prevent clashes from guest accounts\n\nGuest accounts can have non berkeley.edu emails, and might\nget access to a berkeley.edu user's home directory. This\nwill prevent that.\n"
},
{
"from": "human",
"value": "from traitlets import L... | python | chosen |
[
{
"from": "system",
"value": "Add comment explaining unconventional model creation\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python3\n\nimport os\nimport subprocess\n\nODIE_DIR = os.path.dirname(__file__)\n\nsubprocess.call([os.path.join(ODIE_DIR, 'create_garfield_models.py')])\nsubproc... | python | chosen |
[
{
"from": "human",
"value": "Add open directory utility function\n"
},
{
"from": "gpt",
"value": "import pkg_resources\n\n\ndef open_directory(engine, kwargs):\n entry_point = None\n\n for candidate_entry_point in pkg_resources.iter_entry_points(\n 'jacquard.directory_engines',\n ... | python | chosen |
[
{
"from": "system",
"value": "Support `%imgcat <filename>` for the ipython magic\n\nIf <filename> is an existing path, do not evaluate it as a code\nbut display the image file itself. Otherwise, evaluate the expression.\n"
},
{
"from": "human",
"value": "from IPython.core.magic import (Magics, m... | python | chosen |
[
{
"from": "system",
"value": "Switch to list equality check\n"
},
{
"from": "human",
"value": "from tests.base_case import ChatBotTestCase\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\n\nclass ChatterBotCorpusTrainingTestCase(ChatBotTestCase):\n \"\"\"\n Test case for trainin... | python | chosen |
[
{
"from": "system",
"value": "Use SystemExit, not exit() to initiate a shutdown.\n\nexit() has unintented side affects, such as closing stdin, that are\nundesired as stdin is assumed to be writable while libpb/event/run\nunwinds (i.e. Top monitor).\n"
},
{
"from": "human",
"value": "\"\"\"FreeBS... | python | chosen |
[
{
"from": "system",
"value": "Add dynamic mapping creation with nested type\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom elasticsearch import Elasticsearch\nfrom elasticsearch.exceptions import NotFoundError\nfrom storm import Bolt, log\n\n\nclass ESIndexBolt(Bolt):\n de... | python | chosen |
[
{
"from": "system",
"value": "Set developer version 0.1.7\nstart developer version on date 2013.04.16\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport pkg_resources\n\npkg_resources.declare_namespace(__name__)\n\nVERSION = (0, 1, 6)\n\n__version__ = \".\"... | python | chosen |
[
{
"from": "system",
"value": "Simplify exception handling of required argument\n"
},
{
"from": "human",
"value": "import sys\nfrom django.template import Library, TemplateSyntaxError\nfrom django.conf import settings\nfrom django.utils.safestring import mark_safe\nfrom django.utils.text import s... | python | chosen |
[
{
"from": "system",
"value": "Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded.\n\nPiperOrigin-RevId: 413779472\n"
},
{
"from": "human",
"value": "# Lint as: python3\n# Copyright 2021 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apac... | python | chosen |
[
{
"from": "system",
"value": "Correct migration in project template\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.4 on 2017-02-19 11:14\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\... | python | chosen |
[
{
"from": "system",
"value": "Remove argument defaulting from Version()\n\nIt was moved to the ABC and subsequently the check was left behind.\n"
},
{
"from": "human",
"value": "from piper.abc import DynamicItem\nfrom piper.utils import oneshot\n\n\nclass Version(DynamicItem):\n \"\"\"\n B... | python | chosen |
[
{
"from": "system",
"value": "Disable duplicate check mode for merging-- this can cause events to be thrown out for MC data.\n"
},
{
"from": "human",
"value": "import FWCore.ParameterSet.Config as cms\nfrom FWCore.ParameterSet.VarParsing import VarParsing\nimport subprocess\nimport os\nimport sy... | python | chosen |
[
{
"from": "system",
"value": "Add comment parser; get stream links for any (2) team(s)\n"
},
{
"from": "human",
"value": "import praw\nr = praw.Reddit(user_agent='nba_stream_parser')\n\nsubmissions = r.get_subreddit('nbastreams').get_hot(limit=10)\nfor submission in submissions:\n print(submi... | python | chosen |
[
{
"from": "system",
"value": "Add an option to disable code reloader to runserver command\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport os\nfrom argh import arg, ArghParser\nfrom functools import wraps\n\n\ndef with_app(func):\n @wraps(func)\n @arg('--config', help='Pa... | python | chosen |
[
{
"from": "system",
"value": "Fix stress test which was not changed to receive one client value\n\nChange-Id: I186f2827c91d8b1eabd0769dda4765a973bf42b4\nCloses-Bug: 1413980\n"
},
{
"from": "human",
"value": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not... | python | chosen |
[
{
"from": "system",
"value": "Add help text for Roles module.\n"
},
{
"from": "human",
"value": "import discord\nimport shlex\nfrom modules.botModule import BotModule\n\n\nclass Roles(BotModule):\n name = 'Roles'\n\n description = 'Allow for the assignment and removal of roles.'\n\n hel... | python | chosen |
[
{
"from": "system",
"value": "Add logging to delivery receipt view\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom corehq.apps.sms.views import IncomingBackendView\nfrom corehq.messaging.smsbackends.start_enterprise.models import (\n StartEnterpriseBackend,\n ... | python | chosen |
[
{
"from": "system",
"value": "Correct off by one error in trial count"
},
{
"from": "human",
"value": "#!/usr/bin/pyton\nfrom __future__ import division\nimport random\n\ninitial_items = int(raw_input(\"how many items do you have at the start?: \") or \"50\")\niteration_days = int(raw_input(\"ho... | python | chosen |
[
{
"from": "system",
"value": "Add test of hide ip template tag\n"
},
{
"from": "human",
"value": "from .base import BoardAppTest\nfrom board.templatetags.url_parameter import url_parameter\n\n\nclass UrlParameterTest(BoardAppTest):\n def test_contains_correct_string(self):\n parameter ... | python | chosen |
[
{
"from": "system",
"value": "fix(patch): Move files only from Home folder"
},
{
"from": "human",
"value": "import frappe\n\ndef execute():\n\tfrappe.db.sql('''\n\t\tUPDATE tabFile\n\t\tSET folder = 'Home/Attachments'\n\t\tWHERE ifnull(attached_to_doctype, '') != ''\n\t''')\n"
},
{
"from... | python | chosen |
[
{
"from": "system",
"value": "Exit with 1 if there's a difference\n"
},
{
"from": "human",
"value": "from __future__ import print_function\n\nfrom . import diff\n\nimport argparse\n\n\nRED = '\\033[1;31m'\nGREEN = '\\033[1;32m'\nEND = '\\033[0m'\n\n\ndef format_option(opt):\n \"\"\"Return a f... | python | chosen |
[
{
"from": "system",
"value": "Update interacitve.py\n - Add a method to run predefined commands.\n"
},
{
"from": "human",
"value": "#Main program executor\nimport pyRecipeBook\nimport FoodGroups\n\n#Welcome screen\nwelcomeMessage = \"Welcome to pyRecipeBook!\\n\"\nwelcomeMessage += \"Enter a c... | python | chosen |
[
{
"from": "system",
"value": "Print error if dot in project ids\n"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\nfrom xbrowse_server.base.models import Project\n\n\nclass Command(BaseCommand):\n\n def handle(self, *args, **options):\n project_id =... | python | chosen |
[
{
"from": "system",
"value": "Add avatarUrl to team member serializers\n\nConflicts:\n\tsrc/sentry/api/serializers/models/organization_member.py\n\tsrc/sentry/api/serializers/models/release.py\n\ncherry-pick 8ee1bee748ae7f51987ea8ec5ee10795b656cfd9\n"
},
{
"from": "human",
"value": "from __futur... | python | chosen |
[
{
"from": "system",
"value": "Use requests instead of feedparser.\n"
},
{
"from": "human",
"value": "import feedparser\nfrom flask import Flask, render_template\n\napp = Flask(__name__)\n\nBBC_FEED = \"http://feeds.bbci.co.uk/news/rss.xml\"\n\n@app.route(\"/\")\ndef index():\n feed = feedpars... | python | chosen |
[
{
"from": "system",
"value": "Fix options on NoArgsCommand. Huh.\n"
},
{
"from": "human",
"value": "from django.core.management.base import NoArgsCommand\nfrom thezombies.tasks.main import validate_data_catalogs\n\n\nclass Command(NoArgsCommand):\n \"\"\"Validate all of the agency data catalo... | python | chosen |
[
{
"from": "system",
"value": "Add `load_envs` to take a base path and recurse up, looking for .envs\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com>\n\nimport dotenv\n"
},
{
"from": "gpt",
"value": "# -*- ... | python | chosen |
[
{
"from": "system",
"value": "Add trailing '/' for scientist detail URL pattern\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, url\nfrom lab_members.views import ScientistListView, ScientistDetailView\n\nurlpatterns = patterns('',\n url(r'^$', ScientistListView.as_v... | python | chosen |
[
{
"from": "system",
"value": "Tweak order of operations in populate migration\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.10.6 on 2017-04-06 17:33\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\nfrom temba.utils import... | python | chosen |
[
{
"from": "system",
"value": "Convert institutions detail to pytest\n"
},
{
"from": "human",
"value": "from nose.tools import * # flake8: noqa\n\nfrom tests.base import ApiTestCase\nfrom osf_tests.factories import InstitutionFactory\n\nfrom api.base.settings.defaults import API_BASE\n\nclass Te... | python | chosen |
[
{
"from": "system",
"value": "Drop email as property from post_update_user_schema\n"
},
{
"from": "human",
"value": "from app.schema_validation.definitions import uuid, datetime\n\n\npost_create_user_schema = {\n \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n \"description\": ... | python | chosen |
[
{
"from": "system",
"value": "Delete statements from archived bplans\n\nAfter a bplan is archived it's related statements may be deleted.\nFor simpler development/deployment the auto_archive script is extended\nto delete the statements, altough it may have been possible to add\nanother command.\n\nTo preven... | python | chosen |
[
{
"from": "system",
"value": "Load settings from file, fix logic\n"
},
{
"from": "human",
"value": "import argparse\n__author__ = 'perks'\n\nif __name__ == '__main__':\n\n parser = argparse.ArgumentParser(\n description='Migrate columns from one spreadsheet to columns in a new spre... | python | chosen |
[
{
"from": "system",
"value": "Add check_output to be compatible with Py2 and Py3\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom subprocess import check_output\n\n\ndef which(command, which=\"/usr/bin/which\"):\n \"\"\"Find and return the first absolute path of command used... | python | chosen |
[
{
"from": "system",
"value": "Remove logging from fact init\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015 Ansible, Inc.\n# All Rights Reserved.\n\nimport logging\nlogger = logging.getLogger('awx.fact')\n"
},
{
"from": "gpt",
"value": "# Copyright (c) 2015 Ansible, Inc.\n# A... | python | chosen |
[
{
"from": "system",
"value": "Fix reload command for projects where each chrom is in a different vcf\n"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\nfrom xbrowse_server import xbrowse_controls\n\nfrom xbrowse_server.base.models import Project\nfrom xbrowse... | python | chosen |
[
{
"from": "system",
"value": "Fix typo that caused two classes to not get loaded\n"
},
{
"from": "human",
"value": "\"\"\"\nThis enables use of course listings by subdomain. To see it in action, point the\nfollowing domains to 127.0.0.1 in your /etc/hosts file:\n\n berkeley.dev\n harvard.dev\n... | python | chosen |
[
{
"from": "system",
"value": "FIX : fix LLE test (don't ask me why...)\n"
},
{
"from": "human",
"value": "import numpy as np\nfrom numpy.testing import assert_array_equal\n\nfrom sklearn.linear_model.isotonic_regression_ import isotonic_regression\nfrom sklearn.linear_model import IsotonicRegres... | python | chosen |
[
{
"from": "system",
"value": "Fix the main loop & reconnecting\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom autoreiv import AutoReiv\n\nbot = AutoReiv()\nbot.load()\n\ntry:\n\tbot.run(bot.config.get('login'), bot.config.get('password'))\nexcept KeyboardInterrupt:\n\tbot.close... | python | chosen |
[
{
"from": "system",
"value": "Check for matplotlib in tests\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom astropy.tests.helper... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.