conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add MonadTall to layout module proper.\n\nFixes #126\n"
},
{
"from": "human",
"value": "from stack import Stack\nfrom max import Max\nfrom tile import Tile\nfrom floating import Floating\nfrom ratiotile import RatioTile\nfrom tree import TreeTab\nfrom slice import S... | python | chosen |
[
{
"from": "system",
"value": "Change unicode test string to ascii\n"
},
{
"from": "human",
"value": "from django.test import TestCase\nfrom django.conf import settings\nfrom phonenumber_field.modelfields import PhoneNumberField\n\nfrom whats_fresh.models import *\nfrom django.contrib.gis.db impo... | python | chosen |
[
{
"from": "system",
"value": "Change options so other kernels work with nbgrader\n"
},
{
"from": "human",
"value": "from nbconvert.preprocessors import ExecutePreprocessor\nfrom traitlets import Bool, List\n\nfrom . import NbGraderPreprocessor\n\nclass Execute(NbGraderPreprocessor, ExecutePrepro... | python | chosen |
[
{
"from": "system",
"value": "Fix notify2 being imported with the module\n"
},
{
"from": "human",
"value": "\"\"\"Contains code related to notifications.\"\"\"\n\nimport notify2\n\nfrom .constants import (DEFAULT_ICON_PATH,\n DEFAULT_TIMEOUT,\n ICONS... | python | chosen |
[
{
"from": "system",
"value": "Fix annoying database issue when running tests\n\nNow database name is taken from 'read_default_file' parameter which points to a\nmy.cnf configuration, where database name should be defined.\n\nBut this does not work when running tests for a single file, database name is\nset ... | python | chosen |
[
{
"from": "system",
"value": "Update sqlalchemy command configuration example\n"
},
{
"from": "human",
"value": "import logging\nfrom aio_manager import Manager\nfrom aioapp.app import build_application\n\nlogging.basicConfig(level=logging.WARNING)\n\napp = build_application()\nmanager = Manager... | python | chosen |
[
{
"from": "system",
"value": "Remove default buflen value in UniqueBuffer.__init__()\n"
},
{
"from": "human",
"value": "import collections\nimport http.cookies\nimport logging\n\nclass UniqueBuffer:\n \"\"\"A simple deduplicating buffer. To add new items, manipulate self.items.\n The actua... | python | chosen |
[
{
"from": "system",
"value": "Fix analytics template preflight check\n\nReturning from _run_task didn't work, and using\n\n```python\nself.return_values = True\n```\nresults in `return_values` being coerced to an empty dictionary that\nevaluates as False.\n"
},
{
"from": "human",
"value": "impor... | python | chosen |
[
{
"from": "system",
"value": "Update dm.xmlsec.binding dependency to 1.3.7\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2010-2018 OneLogin, Inc.\n# MIT License\n\nfrom setuptools import setup\n\n\nsetup(\n name='python-saml',\n versi... | python | chosen |
[
{
"from": "system",
"value": "Update future requirement from <0.18,>=0.16 to >=0.16,<0.19\n\nUpdates the requirements on [future](https://github.com/PythonCharmers/python-future) to permit the latest version.\n- [Release notes](https://github.com/PythonCharmers/python-future/releases)\n- [Changelog](https:/... | python | chosen |
[
{
"from": "system",
"value": "Update stratisd-client-dbus requirement to 0.07\n\nSigned-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>\n"
},
{
"from": "human",
"value": "import os\nimport sys\nimport setuptools\nif sys.version_info[0] < 3:\n from codecs import open\n\nd... | python | chosen |
[
{
"from": "system",
"value": "Add Trove classifiers for 2.x and 3.x\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\ndef main():\n setup(\n name = 'logging_levels',\n packages=['logging_levels'],\n package_dir = {'logging_levels':'logging_levels'},\n... | python | chosen |
[
{
"from": "system",
"value": "Make version compliant with pip\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nwith open('requirements.txt') as f:\n required = f.read().splitlines()\n\nsetup(\n name = 'heatmappy',\n packages = ['heatmappy'],\n version = '0.1',\n descri... | python | chosen |
[
{
"from": "system",
"value": "Bump pandas from 1.1.3 to 1.1.4\n\nBumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.3 to 1.1.4.\n- [Release notes](https://github.com/pandas-dev/pandas/releases)\n- [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md)\n- [Commits](https://github... | python | chosen |
[
{
"from": "system",
"value": "Update meta-info, first public package exposed\n"
},
{
"from": "human",
"value": "import os\nimport shutil\nimport sys\n\nfrom setuptools import setup\nfrom setuptools.command.install import install\nimport bzt\n\n\nclass InstallWithHook(install, object):\n \"\"\... | python | chosen |
[
{
"from": "system",
"value": "Update long description and url\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nconfig = {\n 'name': 'timew-report',\n 'version': '0.0.0',\n 'description': 'An interface for TimeWarrior report data',\n 'author': 'Thomas Lauf',\n 'au... | python | chosen |
[
{
"from": "system",
"value": "Set premailer version to 3.1.1"
},
{
"from": "human",
"value": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except IOErr... | python | chosen |
[
{
"from": "system",
"value": "Add scikit-image as a dep\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n\tname='feature-extraction',\n\tauthor='Liam Marshall',\n\tauthor_email='limarshall@wisc.edu',\n\tversion='0.1',\n\tlicense='Apache',\n\n\tpackages=['feature_extract... | python | chosen |
[
{
"from": "system",
"value": "Make sure plugin configuration files are included\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='rawdisk',\n author='D. Bakunas',\n version='0.1dev',\n description='Experimental python code to learn diffe... | python | chosen |
[
{
"from": "system",
"value": "Use io.open to support Python 2"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages # pylint: disable=no-name-in-module,import-error\n\n\ndef dependencies(file):\n with open(file) as f:\n return f.read().splitlines()\n\n\nwith ope... | python | chosen |
[
{
"from": "system",
"value": "Set dev version and link CLI script\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n'''\nThe setup script for napalm-logs\n'''\nimport uuid\n\nfrom setuptools import setup, find_packages\nfrom pip.req import parse_requirements\n\n_... | python | chosen |
[
{
"from": "system",
"value": "Fix download_url, ver bump to coordinate\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='kibana',\n packages=['kibana'],\n version='0.6',\n description='Kibana configuration index (.kibana) command line interface and pyt... | python | chosen |
[
{
"from": "system",
"value": "FIX moved bio script to misc.bio_utils\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nsetup(name='riboutils',\n version='0.1',\n description=\"This package ... | python | chosen |
[
{
"from": "system",
"value": "Add freezegun requirement for tests.\n"
},
{
"from": "human",
"value": "# import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)\nimport multiprocessing\nassert multiprocessing\nimport re\nfrom setuptools import setup, find_packages\n... | python | chosen |
[
{
"from": "system",
"value": "Increment rc version to rc3"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom setuptools import find_packages\nfrom setuptools.command.test import test as TestCommand\n\nclass PyTest(TestCommand):\n def finalize_options(self):\n TestComma... | python | chosen |
[
{
"from": "system",
"value": "Update the numpy requirement since we use numpy.isin, which is only available in numpy 1.13.0 onwards.\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name = 'PyFVCOM',\n packages = ['PyFVCOM'],\n version = '2.1.0',\n descrip... | python | chosen |
[
{
"from": "system",
"value": "Update supported Python and Django versions\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\n\nwith open('README.rst', 'r', 'utf-8') as f:\n readme = f.read()\n\n\nsetup(\n name... | python | chosen |
[
{
"from": "system",
"value": "Add management commands to package.\n\nChange-Id: I6c35981fbe47639e72066ddd802eb4d4d4d2d4a0\nReviewed-on: http://review.pozytywnie.pl:8080/19737\nReviewed-by: Jan <14e793d896ddc8ca6911747228e86464cf420065@pozytywnie.pl>\nTested-by: Jenkins\n"
},
{
"from": "human",
"... | python | chosen |
[
{
"from": "system",
"value": "Set the version to 1.2.0\n"
},
{
"from": "human",
"value": "import os.path\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nROOT_DIR = os.path.dirname(os.path.abspath(__file__))\nREADME_FILE = os.path.join(ROOT_... | python | chosen |
[
{
"from": "system",
"value": "Remove reviewboard requirement; can cause unexpected updates\n"
},
{
"from": "human",
"value": "from reviewboard.extensions.packaging import setup\n\nGITHUB_URL = 'https://github.com/joshguffin/rboard_bugzilla'\nVERSION = \"0.1\"\nPACKAGE = 'rboard_bugzilla'\nEXTENS... | python | chosen |
[
{
"from": "system",
"value": "Add debugtools as a dependency.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n# encoding: utf-8\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nimport re\nwith open('glooey/__init__.py') as file:\n... | python | chosen |
[
{
"from": "system",
"value": "Change version from 1.0 to 1.0.0\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(name='jupyter_c_kernel',\n version='1.0',\n description='Minimalistic C kernel for Jupyter',\n author='Brendan Rius',\n author_email='pi... | python | chosen |
[
{
"from": "system",
"value": "Add license to trove classifiers."
},
{
"from": "human",
"value": "import re\n\nfrom setuptools import setup\n\n# get version without importing\nwith open(\"extra_views/__init__.py\", \"rb\") as f:\n VERSION = str(re.search('__version__ = \"(.+?)\"', f.read().dec... | python | chosen |
[
{
"from": "system",
"value": "Rename blueprint static_pages to staticpages and rename staticpages.show to staticpages.page\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\n flask-rst.modules.staticfiles\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n :copyright: (c) 2011 by Chris... | python | chosen |
[
{
"from": "system",
"value": "Fix bug that raised error when generating coverage\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nimport subprocess\nfrom invoke import task\n\n\n@task\ndef test():\n # invoke.run() does not color output, unfortunately\n nosetests = subprocess.Po... | python | chosen |
[
{
"from": "system",
"value": "[track] Use `spotify-now` to get current song info in i3blocks\n"
},
{
"from": "human",
"value": "import subprocess\n\n\ndef main():\n st = subprocess.getoutput(\"mpc\")\n lin = st.split(\"\\n\")\n if len(lin) > 1:\n sn_status = lin[1]\n durat... | python | chosen |
[
{
"from": "system",
"value": "Add outlines of functions and code for soundspeeds.\n"
},
{
"from": "human",
"value": "''' pyflation.analysis.deltaprel - Module to calculate relative pressure\nperturbations.\n\nAuthor: Ian Huston\nFor license and copyright information see LICENSE.txt which was dis... | python | chosen |
[
{
"from": "system",
"value": "Increase the PMG API timeout, since it's slow at the moment\n"
},
{
"from": "human",
"value": "# For requests to external APIs, timeout after 3 seconds:\nAPI_REQUESTS_TIMEOUT = 3.05\n"
},
{
"from": "gpt",
"value": "# For requests to external APIs, timeou... | python | chosen |
[
{
"from": "system",
"value": "Fix help message of --min_eval_frequency flag\n"
},
{
"from": "human",
"value": "import tensorflow as tf\n\nfrom .flag import FLAGS, FlagAdder\nfrom .estimator import def_estimator\nfrom .inputs import def_def_train_input_fn, def_def_eval_input_fn\n\n\ndef def_def_e... | python | chosen |
[
{
"from": "system",
"value": "Add displaying integration status on GitHub\n"
},
{
"from": "human",
"value": "# This script should be copied into the Run Script trigger of an Xcode Bot\n# `Xcode Bot > Edit Bot > Triggers > After Integration > Run Script`\n"
},
{
"from": "gpt",
"value"... | python | chosen |
[
{
"from": "system",
"value": "Use positional argument to improve clarity\n\nSigned-off-by: Dan Yeaw <2591e5f46f28d303f9dc027d475a5c60d8dea17a@yeaw.me>\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\"\"\"The Gaphor code generator CLI.\n\nProvides the CLI for the code generator which t... | python | chosen |
[
{
"from": "system",
"value": "Check before creating default super user.\n"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\nfrom djangoautoconf.local_key_manager import get_local_key, ConfigurableAttributeGetter\n\nfrom web_manage_tools.user_creator import cre... | python | chosen |
[
{
"from": "system",
"value": "Return a list of lists\n"
},
{
"from": "human",
"value": "def generate_ngrams(text, n):\n ''' Generates all possible n-grams of a\n piece of text\n\n >>> text = 'this is a random piece'\n >>> n = 2\n >>> generate_ngrams(text, n)\n this is\n is a... | python | chosen |
[
{
"from": "system",
"value": "Use the remote getter call only on objects with an object_type.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nclass Manager(object):\n\n # should be re-defined in a subclass\n state_name = None\n object_type = None\n\n def __init__(self, ap... | python | chosen |
[
{
"from": "system",
"value": "Use new property format for WorldcatData\n"
},
{
"from": "human",
"value": "# Copyright (c) 2017 The Regents of the University of Michigan.\n# All Rights Reserved. Licensed according to the terms of the Revised\n# BSD License. See LICENSE.txt for details.\n\nfrom ..... | python | chosen |
[
{
"from": "system",
"value": "Check for syslog. Doesn't exist on Windows\n"
},
{
"from": "human",
"value": "'''\nReturn data to the host operating system's syslog facility\n\nRequired python modules: syslog, json\n\nThe syslog returner simply reuses the operating system's syslog\nfacility to log... | python | chosen |
[
{
"from": "system",
"value": "Transpose and Transpose180 for all Pillow versions\n"
},
{
"from": "human",
"value": "# coding: utf-8\n\nfrom __future__ import print_function, unicode_literals, absolute_import\n\nfrom PIL import Image\n\nfrom .base import rpartial\nfrom .pillow import PillowTestCa... | python | chosen |
[
{
"from": "system",
"value": "Add attribute display to clip extraction script.\n"
},
{
"from": "human",
"value": "from pathlib import Path\nimport wave\n\nimport h5py\n\n\nDIR_PATH = Path('/Users/harold/Desktop/Clips')\nINPUT_FILE_PATH = DIR_PATH / 'Clips.h5'\nCLIP_COUNT = 5\n\n\ndef main():\n\n... | python | chosen |
[
{
"from": "system",
"value": "Add site guarding for ProgramCertRecord data migration\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Generated by Django 1.11.11 on 2018-07-17 20:02\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\n\nfrom credentials.apps... | python | chosen |
[
{
"from": "system",
"value": "Change doc setting for release."
},
{
"from": "human",
"value": "\"\"\"\nFunctions that return external URLs, for example for the Vesper documentation.\n\"\"\"\n\n\nimport vesper.version as vesper_version\n\n\n_USE_LATEST_DOCUMENTATION_VERSION = True\n\"\"\"Set this... | python | chosen |
[
{
"from": "system",
"value": "Update access token variable names\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport pytest\nimport tweepy\nimport vcr\n\nfrom secrets import TWITTER_ACCESS, TWITTER_SECRET\nfrom secrets import CONSUMER_KEY, CONSUMER_SECRET\n\n\nclass TestTweepyInte... | python | chosen |
[
{
"from": "system",
"value": "Fix bug with input number validation\n\n- Want at least 3 inputs\n- Was forcing at least 4\n- Change greater than to greater than or equal to\n"
},
{
"from": "human",
"value": "\"\"\"Quick script to read inputs.\n\"\"\"\n\nif __name__ == '__main__':\n # Read the ... | python | chosen |
[
{
"from": "system",
"value": "Use data provider in PD incident tests.\n"
},
{
"from": "human",
"value": "from unittest import TestCase\nfrom unittest.mock import patch\n\nfrom pagerduty_events_api import PagerdutyIncident\n\n\nclass TestPagerdutyIncident(TestCase):\n def setUp(self):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add drf_yasg module for dev env\n"
},
{
"from": "human",
"value": "#\n# Django Development\n# ..........................\n\nDEBUG = True\n\nEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\n#\n# Developper additions\n# ..........................\n\... | python | chosen |
[
{
"from": "system",
"value": "Enhance get_stain_matrix to take any desired number of vectors\n"
},
{
"from": "human",
"value": "import numpy\n\nfrom .stain_color_map import stain_color_map\n\ndef get_stain_vector(args, index):\n \"\"\"Get the stain corresponding to args.stain_$index and\n ... | python | chosen |
[
{
"from": "system",
"value": "LILY-3349: Fix deprecation of social OAuth scopes\n"
},
{
"from": "human",
"value": "from django.conf import settings\n\nfrom ..exceptions import InvalidProfileError\nfrom .base import BaseAuthProvider\n\n\nclass GoogleAuthProvider(BaseAuthProvider):\n client_id ... | python | chosen |
[
{
"from": "system",
"value": "Add more granular date locators\n"
},
{
"from": "human",
"value": "from matplotlib.dates import DayLocator, WeekdayLocator, MonthLocator, YearLocator\n\ndef parse_break_str(txt):\n \"parses '10 weeks' into tuple (10, week).\"\n txt = txt.strip()\n if len(tx... | python | chosen |
[
{
"from": "system",
"value": "Raise exception in case of config load error\n"
},
{
"from": "human",
"value": "\nimport os\nimport json\n\nclass JSONConfigLoader():\n def __init__(self):\n self.sources = [\n os.path.dirname(os.getcwd()),\n os.path.dirname(os.path.a... | python | chosen |
[
{
"from": "system",
"value": "Reset warnings before testing warnings\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*\nfrom __future__ import absolute_import, unicode_literals\n\nimport warnings\n\nfrom django.test import SimpleTestCase\n\nfrom wagtail.utils.deprecation import RemovedIn... | python | chosen |
[
{
"from": "system",
"value": "Add seaborn, collections, itertools to IPython imports\n"
},
{
"from": "human",
"value": "import numpy as np\nimport pandas as pd\nimport matplotlib_venn\nimport matplotlib.pyplot as plt\nimport brewer2mpl\nimport itertools\n\nset1 = brewer2mpl.get_map('Set1', 'qual... | python | chosen |
[
{
"from": "system",
"value": "Fix event source for S3 put events"
},
{
"from": "human",
"value": "import logging\nimport urllib\n\nimport sentry_sdk\nfrom cloudpathlib import AnyPath\nfrom sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration\n\nfrom .config import Config\nfrom .main im... | python | chosen |
[
{
"from": "system",
"value": "Change from Google TTS to Festival\n"
},
{
"from": "human",
"value": "import urllib\n\nimport gst\n\nmusic_level = 30\n\n\nclass TTS():\n\n def __init__(self, frontend, config):\n self.frontend = frontend\n self.player = gst.element_factory_make(\"p... | python | chosen |
[
{
"from": "system",
"value": "Update imports for MovieLister standrard module\n"
},
{
"from": "human",
"value": "\"\"\"Movies package.\n\nTop-level package of movies library. This package contains catalog of movies\nmodule components - ``MoviesModule``. It is recommended to use movies library\nf... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in bucket name\n"
},
{
"from": "human",
"value": "# Copy this file to development_environment.py\n# and replace OAuth credentials your dev credentials\nTOKENS = {\n '_foo_bucket': '_foo_bucket-bearer-token',\n 'bucket': 'bucket-bearer-token',\n 'fo... | python | chosen |
[
{
"from": "system",
"value": "Fix PactGroup created log message\n"
},
{
"from": "human",
"value": "from .base import PactBase\nfrom .utils import GroupWaitPredicate\n\n\nclass PactGroup(PactBase):\n\n def __init__(self, pacts):\n super(PactGroup, self).__init__()\n self._pacts =... | python | chosen |
[
{
"from": "system",
"value": "Raise ValueError for narrow unicode build\n"
},
{
"from": "human",
"value": "# coding: utf8\nfrom __future__ import unicode_literals\nimport warnings\n\nwarnings.filterwarnings(\"ignore\", message=\"numpy.dtype size changed\")\nwarnings.filterwarnings(\"ignore\", me... | python | chosen |
[
{
"from": "system",
"value": "Add extension_modueles to the default configuration\n"
},
{
"from": "human",
"value": "'''\nParse CLI options\n'''\n# Import python libs\nimport os\nimport copy\nimport argparse\n# Import pkgcmp libs\nimport pkgcmp.scan\n# Import third party libs\nimport yaml\n\nDEF... | python | chosen |
[
{
"from": "system",
"value": "Read the defaults config file and merge it with mediawords.yml\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n \nimport yaml\nimport os.path\n\n_config_file_base_name = 'mediawords.yml'\n_config_file_name = os.path.abspath(os.path.join(os.path.dirname(__file_... | python | chosen |
[
{
"from": "system",
"value": "Use new-style classes, following the same fix in the curriculum.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compl... | python | chosen |
[
{
"from": "human",
"value": "Make end-user modules accessible from top level\n\nThere are several modules that end-users are expected to be\nusing--connection, profile, exceptions, and utils--which could be made\nslightly more accessible by having them available in the top level\n`openstack` namespace. This... | python | chosen |
[
{
"from": "system",
"value": "Add encoding to open file\n"
},
{
"from": "human",
"value": "\"\"\"This file provides a function to load json example situations.\"\"\"\n\nimport json\nimport os\n\n\nDIR_PATH = os.path.dirname(os.path.abspath(__file__))\n\n\ndef parse(file_name):\n \"\"\"Load js... | python | chosen |
[
{
"from": "system",
"value": "Add tags of campaign to user"
},
{
"from": "human",
"value": "from .models import Campaign\n\n\ndef connect_campaign(sender, **kwargs):\n reference = kwargs.get('reference')\n if not reference:\n return\n parts = reference.split(':', 1)\n if len(p... | python | chosen |
[
{
"from": "system",
"value": "Remove header added to gold file\n"
},
{
"from": "human",
"value": "#* This file is part of the MOOSE framework\n#* https://www.mooseframework.org\n#*\n#* All rights reserved, see COPYRIGHT for full restrictions\n#* https://github.com/idaholab/moose/blob/master/COPY... | python | chosen |
[
{
"from": "system",
"value": "Remove WKPB from geosearch - also change test\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom datapunt_geosearch import config\nfrom datapunt_geosearch import datasource\n\n\nclass TestBAGDataset(unittest.TestCase):\n def test_query(self):\n x =... | python | chosen |
[
{
"from": "system",
"value": "Move products:review URLConf above product:detail\n\nThe product:detail view is greedy and previously caused the review\nURLConf never to be resolved by the correct view\n"
},
{
"from": "human",
"value": "from django.conf.urls import url\n\nfrom .views import Produc... | python | chosen |
[
{
"from": "system",
"value": "Update version for local development\n\nConflicts:\n\tPyblosxom/_version.py\n"
},
{
"from": "human",
"value": "#######################################################################\n# This file is part of Pyblosxom.\n#\n# Copyright (C) 2003-2011 by the Pyblosxom t... | python | chosen |
[
{
"from": "system",
"value": "Improve logic in determining latest contribution\n\nLooks like the list will always contain data for the last 366 days, and\nthe last entry in the list will always contain data for the current day\n(PST). Much simpler this way.\n\nAdded some generic error-handling just in case ... | python | chosen |
[
{
"from": "system",
"value": "Disable date_hierarchy for now since it requires tzinfo in MySQL\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django.contrib import admin\nfrom .models import Crash\n\nclass CrashAdmin(admin.ModelAdmin):\n search_fields = ('report',)\n list... | python | chosen |
[
{
"from": "system",
"value": "Set verbose_name_plural properly for queue.Entry.\n\nSigned-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org>\n"
},
{
"from": "human",
"value": "import datetime\n\nfrom django.db import models\n\nfrom .managers import EntryManager\n\nclass Ent... | python | chosen |
[
{
"from": "system",
"value": "Check for maximize in args.\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom gtlaunch import Launcher\n\n\nclass MockOptions(object):\n def __init__(self):\n self.verbose = False\n self.config = ''\n self.project = ''\n\n\nclass Lau... | python | chosen |
[
{
"from": "system",
"value": "Add a 0.0 duty cycle: brief moment of off time.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom blinkenlights import dimmer, setup, cleanup\n\npin = 18\n\nsetup(pin)\n\nup = range(10)\ndown = range(9)\ndown.reverse()\n\nbpm = 70\n\nperiod = 60.0 / b... | python | chosen |
[
{
"from": "system",
"value": "Print XML parse errors in Sparser API\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, print_function, unicode_literals\nfrom builtins import dict, str\nimport logging\nimport xml.etree.ElementTree as ET\nfrom indra.util import UnicodeXMLTr... | python | chosen |
[
{
"from": "system",
"value": "Print table if no file format provided\n"
},
{
"from": "human",
"value": "import colour\nimport csv\nimport json\nimport os\nimport pprint\n\n\n# write to file as json, csv, markdown, plaintext or print table\n\n\ndef write_data(data, user, format=None):\n if for... | python | chosen |
[
{
"from": "system",
"value": "Add det4 to global dets\n"
},
{
"from": "human",
"value": "from bluesky.global_state import (resume, abort, stop, panic, all_is_well,\n state)\n\nfrom bluesky.callbacks.olog import OlogCallback\nfrom bluesky.global_state import gs\n\... | python | chosen |
[
{
"from": "system",
"value": "Fix detection of relative clause\n"
},
{
"from": "human",
"value": "__author__ = 's7a'\n\n# All imports\nfrom nltk.tree import Tree\n\n\n# The Relative clauses class\nclass RelativeClauses:\n\n # Constructor for the Relative Clauses class\n def __init__(self):... | python | chosen |
[
{
"from": "system",
"value": "Exit if imported on Python 2\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, print_function, unicode_literals\n\nimport platform\nimport sys\nimport warnings\n\n\ncompatible_py2 = (2, 7) <= sys.version_info < (3,)\ncompatible_py3 = (3, 7) ... | python | chosen |
[
{
"from": "system",
"value": "Add access token from auth not report\n"
},
{
"from": "human",
"value": "\"\"\" Connection class establishes HTTP connection with server.\n Utilized to send Proto Report Requests.\n\"\"\"\nimport threading\nimport requests\n\nfrom lightstep.collector_pb2 import R... | python | chosen |
[
{
"from": "system",
"value": "Handle attempts to tag empty shell repos\n"
},
{
"from": "human",
"value": "from celery import task\nfrom celery.result import AsyncResult\n\nfrom .models import TeamSubmission\n\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\n@task()\ndef create_shella... | python | chosen |
[
{
"from": "system",
"value": "Improve LQR example for integrator_chains domain\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport roslib; roslib.load_manifest('dynamaestro')\nimport rospy\nfrom dynamaestro.msg import VectorStamped\n\n\nclass... | python | chosen |
[
{
"from": "system",
"value": "Use post_migrate signal instead of post_syncdb\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.utils.translation import ugettext_noop as _\nfrom django.db.models import signals\n\nif \"notification\" in settings.INSTALLED_APPS:\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix Django 1.10 url patterns warning\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, include, url\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n url(r'^admin/', include(admin.site.urls), name='adm... | python | chosen |
[
{
"from": "system",
"value": "Expand test to include query on the created database as restricted user"
},
{
"from": "human",
"value": "import shutil\nimport tempfile\nimport unittest\n\nimport orthomcl_database\n\n\nclass Test(unittest.TestCase):\n\n def setUp(self):\n self.run_dir = t... | python | chosen |
[
{
"from": "system",
"value": "Make windows bigger in this test so the captions can be read.\n\n\nIndex: tests/window/WINDOW_CAPTION.py\n===================================================================\n--- tests/window/WINDOW_CAPTION.py\t(revision 777)\n+++ tests/window/WINDOW_CAPTION.py\t(working copy)\... | python | chosen |
[
{
"from": "system",
"value": "Fix the telemetry statistics test\n\nThis test worked fine on devstack, but failed on the test gate\nbecause not all meters have statistics. Look for a meter with\nstatistics.\n\nPartial-bug: #1665495\n\nChange-Id: Ife0f1f11c70e926801b48000dd0b4e9d863a865f\n"
},
{
"fro... | python | chosen |
[
{
"from": "system",
"value": "Update ColorHax to 2.3.0 address\n\nNeed to make pyGecko auto-find it all\n"
},
{
"from": "human",
"value": "from tcpgecko import TCPGecko\nfrom textwrap import wrap\nfrom struct import pack\nfrom binascii import hexlify, unhexlify\nimport sys\n\ndef pokecolor(pos... | python | chosen |
[
{
"from": "system",
"value": "Fix the accidental removal of IS_PY26\n"
},
{
"from": "human",
"value": "\"\"\"\nCompatibility shims for different Python versions and platforms.\n\"\"\"\ntry:\n import json\nexcept ImportError:\n try:\n import simplejson as json\n except ImportError... | python | chosen |
[
{
"from": "system",
"value": "Update comment to be more specific about stock fields\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Define here the models for your scraped items\n#\n# See documentation in:\n# http://doc.scrapy.org/en/latest/topics/items.html\n\nimport scrapy\n\n\... | python | chosen |
[
{
"from": "system",
"value": "Clear command registry BEFORE each test.\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom nymms import registry\nfrom nymms.resources import Command, MonitoringGroup\nfrom weakref import WeakValueDictionary\n\n\nclass TestRegistry(unittest.TestCase):\n ... | python | chosen |
[
{
"from": "system",
"value": "Add --out option to generate graph at specific location instead of interactive display\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nimport argparse\nimport matplotlib.pyplot as plt\nfrom osta.osta import *\n\n############\n### MAIN ###\n############\npars... | python | chosen |
[
{
"from": "system",
"value": "Make flake8 happy for spd\n"
},
{
"from": "human",
"value": "\"\"\"Digital leben workflow.\"\"\"\nfrom adhocracy_core.workflows import add_workflow\nfrom adhocracy_core.workflows.standard import standard_meta\n\ndigital_leben_meta = standard_meta \\\n ... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.