conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove deleted places from place index\n"
},
{
"from": "human",
"value": "from haystack import indexes\nfrom .models import Event, Place, PublicationStatus\nfrom django.utils.html import strip_tags\n\n\nclass EventIndex(indexes.SearchIndex, indexes.Indexable):\n ... | python | chosen |
[
{
"from": "system",
"value": "Use a buggy pox module\n"
},
{
"from": "human",
"value": "\nfrom config.experiment_config_lib import ControllerConfig\nfrom sts.topology import MeshTopology\nfrom sts.control_flow import Fuzzer\nfrom sts.input_traces.input_logger import InputLogger\nfrom sts.simulat... | python | chosen |
[
{
"from": "system",
"value": "Update download URL and add more output to downloader.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom lbtoolbox.download import download\n\nimport os\nimport inspect\nimport tarfile\n\n\ndef here(f):\n me = inspect.getsourcefile(here)\n retur... | python | chosen |
[
{
"from": "system",
"value": "Make lua autoconfig work better.\n"
},
{
"from": "human",
"value": "from .base_executor import ScriptExecutor\n\n\nclass Executor(ScriptExecutor):\n ext = '.lua'\n name = 'LUA'\n command = 'lua'\n address_grace = 131072\n test_program = \"io.write(io.... | python | chosen |
[
{
"from": "system",
"value": "Use standard library instead of django.utils.importlib\n\n> django.utils.importlib is a compatibility library for when Python 2.6 was\n> still supported. It has been obsolete since Django 1.7, which dropped support\n> for Python 2.6, and is removed in 1.9 per the deprecation cy... | python | chosen |
[
{
"from": "system",
"value": "Remove the plural from the url\n"
},
{
"from": "human",
"value": "# Copyright 2013 Donald Stufft\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 copy of t... | python | chosen |
[
{
"from": "system",
"value": "Extend import statement to support Python 3\n"
},
{
"from": "human",
"value": "# For reasons that I don't fully understand,\n# unless I include __file__ in here, the packaged version\n# of this module will just be a .egg file, not a .egg folder.\n# And if it's just ... | python | chosen |
[
{
"from": "system",
"value": "Simplify pubannotation test to not check exact numbers\n"
},
{
"from": "human",
"value": "\nimport kindred\n\ndef test_pubannotation():\n\tcorpus = kindred.pubannotation.load('bionlp-st-gro-2013-development')\n\n\tassert isinstance(corpus,kindred.Corpus)\n\n\tfileCo... | python | chosen |
[
{
"from": "system",
"value": "Reorder imports based on isort rules.\n"
},
{
"from": "human",
"value": "\"\"\"\n adbwp\n ~~~~~\n\n Android Debug Bridge (ADB) Wire Protocol.\n\"\"\"\n# pylint: disable=wildcard-import\n\nfrom . import exceptions\nfrom .exceptions import *\nfrom . import he... | python | chosen |
[
{
"from": "system",
"value": "Move getting the event loop out of try/except\n"
},
{
"from": "human",
"value": "import logging\nfrom argparse import ArgumentParser\nimport asyncio\n\nfrom .protocol import connect_inotify\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef main():\n parser = Arg... | python | chosen |
[
{
"from": "system",
"value": "Set threads to daemons so that they exit when the main thread exits\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# Copyright 2014 Boundary, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except ... | python | chosen |
[
{
"from": "system",
"value": "Fix xlrd issue\nColumn headers must be strings\n"
},
{
"from": "human",
"value": "import xlrd\nfrom ..exceptions import TableTooBigException, EmptyTableException\nfrom ..configuration import config\nfrom ..utilities import header_population\nfrom ..compat import ran... | python | chosen |
[
{
"from": "system",
"value": "Make plugin work in python 3\n\nPython 3 doesn't have itertools.izip, just the builtin, zip. This logic\nallows us to pull out either one depending on python version\n"
},
{
"from": "human",
"value": "from isort import SortImports\nimport itertools\nimport mothermay... | python | chosen |
[
{
"from": "system",
"value": "Add comment description of methods for gitlab hook\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nfrom app import app, webhooks\n\n@webhooks.hook(\n app.config.get('GITLAB_HOOK','/hooks/gitlab... | python | chosen |
[
{
"from": "system",
"value": "Add honeypot field to feedback form\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"Base forms\"\n\nfrom flask_wtf import Form\nfrom wtforms import StringField, TextAreaField\nfrom cla_public.apps.base.fields import MultiRadioField\n\nfrom cla_public.a... | python | chosen |
[
{
"from": "system",
"value": "Ch03: Add options to Tag model fields. [skip ci]\n\nField options allow us to easily customize behavior of a field.\n\nGlobal Field Options:\n\n https://docs.djangoproject.com/en/1.8/ref/models/fields/#help-text\n https://docs.djangoproject.com/en/1.8/ref/models/fields/#u... | python | chosen |
[
{
"from": "system",
"value": "Fix due to merge conflicts\n"
},
{
"from": "human",
"value": "from jinja2 import Environment, FileSystemLoader \nimport datetime\nimport json\nenv = Environment(loader=FileSystemLoader('templates'), autoescape=True)\n\nnames_template = env.get_template('names.html')... | python | chosen |
[
{
"from": "system",
"value": "Fix wrong import in test\n\nSigned-off-by: Sergey Khoroshavin <b770466c7a06c5fe47531d5f0e31684f1131354d@dsr-corporation.com>\n"
},
{
"from": "human",
"value": "from indy_common.types import Request\n\n\ndef test_request_all_identifiers_returns_empty_list_for_request... | python | chosen |
[
{
"from": "system",
"value": "Bump version number to reflect dev status.\n"
},
{
"from": "human",
"value": "\"\"\"\ndjango-email-bandit is a Django email backend for hijacking email sending in a test environment. \n\"\"\"\n\n__version_info__ = {\n 'major': 0,\n 'minor': 2,\n 'micro': 0... | python | chosen |
[
{
"from": "system",
"value": "Update dsub version to 0.3.2.dev0\n\nPiperOrigin-RevId: 243855458\n"
},
{
"from": "human",
"value": "# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in comp... | python | chosen |
[
{
"from": "system",
"value": "Use admin interface by default\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"onserver URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.10/topics/http/urls/... | python | chosen |
[
{
"from": "system",
"value": "Use compat for unicode import\n"
},
{
"from": "human",
"value": "\"\"\"Coordination chatroom game.\"\"\"\n\nimport dallinger as dlgr\nfrom dallinger.config import get_config\ntry:\n unicode = unicode\nexcept NameError: # Python 3\n unicode = str\n\nconfig = g... | python | chosen |
[
{
"from": "system",
"value": "Remove libfreetype2, which should have been omitted and was breaking the scripts\n"
},
{
"from": "human",
"value": "org = \"servo\"\n\nignore_repos = [\"skia\", \"skia-snapshots\", \"cairo\", \"libpng\", \"libcss\",\n \"libhubbub\", \"libparserutils\"... | python | chosen |
[
{
"from": "system",
"value": "Allow splitting by a particular component (by index)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python2.3\n\n\"\"\"\nRead a MAF from stdin and break into a set of mafs containing \nno more than a certain number of columns\n\"\"\"\n\nusage = \"usage: %prog\"\n... | python | chosen |
[
{
"from": "system",
"value": "Fix spec issue with Transfer::Server ProtocolDetails\n"
},
{
"from": "human",
"value": "patches = [\n {\n \"op\": \"move\",\n \"from\": \"/ResourceTypes/AWS::Transfer::Server/Properties/Protocols/ItemType\",\n \"path\": \"/ResourceTypes/AWS::... | python | chosen |
[
{
"from": "system",
"value": "Fix bug in admin user editing\n\nFixes KeyError when creating or editing a UniqueEmailUser in the admin\ninterface.\n"
},
{
"from": "human",
"value": "from django.contrib.auth.forms import UserCreationForm, UserChangeForm\n\nfrom .models import UniqueEmailUser\n\n\n... | python | chosen |
[
{
"from": "system",
"value": "Remove pointless `_cache` attribute on MemcacheLock class.\n\nIf this was doing anything useful, I have no idea what it was.\n"
},
{
"from": "human",
"value": "import random\nimport time\nfrom datetime import datetime\n\nfrom django.core.cache import cache\n\n\nclas... | python | chosen |
[
{
"from": "system",
"value": "Solve Code Fights circle of numbers problem\n"
},
{
"from": "human",
"value": "#!/usr/local/bin/python\n# Code Fights Circle of Numbers Problem\n\n\ndef circleOfNumbers(n, firstNumber):\n pass\n\n\ndef main():\n tests = [\n [\"crazy\", \"dsbaz\"],\n ... | python | chosen |
[
{
"from": "system",
"value": "Update event context instead of replace (NC-529)\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nimport threading\n\n_locals = threading.local()\n\n\ndef get_event_context():\n return getattr(_locals, 'context', None)\n\n\ndef set_ev... | python | chosen |
[
{
"from": "system",
"value": "Make md.render have the same API as rst.render\n"
},
{
"from": "human",
"value": "# Copyright 2014 Donald Stufft\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 ob... | python | chosen |
[
{
"from": "system",
"value": "Fix issues with importing the Login form\n\nThe Login form lives in openstack_auth.forms and should be directly\nimported from that file.\n\nChange-Id: I42808530024bebb01604adbf4828769812856bf3\nCloses-Bug: #1332149\n"
},
{
"from": "human",
"value": "# Copyright 201... | python | chosen |
[
{
"from": "system",
"value": "Send platform name to defaul template context\n"
},
{
"from": "human",
"value": "import os\nfrom datetime import datetime\n\nimport attr\nfrom jinja2 import Environment, FileSystemLoader, select_autoescape\n\n\n@attr.s\nclass Message:\n id = attr.ib()\n platfo... | python | chosen |
[
{
"from": "system",
"value": "Remove Python 2.6 backwards compatibility\n"
},
{
"from": "human",
"value": "__authors__ = \"Tim Savage\"\n__author_email__ = \"tim@savage.company\"\n__copyright__ = \"Copyright (C) 2014 Tim Savage\"\n__version__ = \"1.0\"\n\n# Disable logging if an explicit handler... | python | chosen |
[
{
"from": "system",
"value": "Add function to check if nbserverproxy is running\n\nProvides a simple check to see if the `nbserverproxy` is installed and\nrunning. As this is a Jupyter server extension and this code is run from\nthe notebook, we can't simply import `nbserverproxy`. In fact that\nwouldn't ev... | python | chosen |
[
{
"from": "system",
"value": "Add octicons in font test script\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ndevicons_start = \"e700\"\ndevicons_end = \"e7c5\"\n\nprint \"Devicons\"\nfor ii in xrange(int(devicons_start, 16), int(devicons_end, 16) + 1):\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix main failing on no event_callback\n"
},
{
"from": "human",
"value": "\"\"\"Read events and parameters from your Axis device.\"\"\"\n\nimport asyncio\nimport argparse\nimport logging\nimport sys\n\nfrom axis import AxisDevice\n\n\nasync def main(args):\n loop ... | python | chosen |
[
{
"from": "system",
"value": "Revise print() in shell_sort() & main()\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\n\ndef _gap_insertion_sort(a_list, start, gap):\n for i in range(start + ga... | python | chosen |
[
{
"from": "system",
"value": "Check that engine fight files are deleted before test\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nimport subprocess, os, sys\n\nif len(sys.argv) < 2:\n print('Must specify file names of 2 chess engines')\n for i in range(len(sys.argv)):\n pr... | python | chosen |
[
{
"from": "system",
"value": "Use django.get_version in prerequisite checker\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\n\n\n# Check that we are in an activated virtual environment\ntry:\n import os\n virtual_env = os.environ['VIRTUAL_ENV']\nexcept KeyError:\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix missing import for sys\n"
},
{
"from": "human",
"value": "import os\nimport candle\n\n\nfile_path = os.path.dirname(os.path.realpath(__file__))\nlib_path2 = os.path.abspath(os.path.join(file_path, '..', '..', 'common'))\nsys.path.append(lib_path2)\n\n\nREQUIRED ... | python | chosen |
[
{
"from": "system",
"value": "Add ability to customize URL\n"
},
{
"from": "human",
"value": "import webquery\nfrom lxml import etree\nimport inspect\nfrom expression import Expression\nfrom collections import defaultdict\n\n\nclass Parser(object):\n registry = defaultdict(dict)\n\n @class... | python | chosen |
[
{
"from": "system",
"value": "Fix false-positive of a type-check\n"
},
{
"from": "human",
"value": "\"\"\"\nThis module contains the high-level functions to access the library. Care is\ntaken to make this as pythonic as possible and hide as many of the gory\nimplementations as possible.\n\"\"\"\... | python | chosen |
[
{
"from": "system",
"value": "Update URL for baseline images"
},
{
"from": "human",
"value": "import matplotlib\nfrom matplotlib import pyplot as plt\n\nfrom astropy.utils.decorators import wraps\n\nMPL_VERSION = matplotlib.__version__\n\n# The developer versions of the form 3.1.x+... contain ch... | python | chosen |
[
{
"from": "system",
"value": "Clean up namespace to get rid of sphinx warnings\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nAccess to Fermi Gamma-ray Space Telescope data.\n\nhttp://fermi.gsfc.nasa.gov\nhttp://fermi.gsfc.nasa.gov/ssc... | python | chosen |
[
{
"from": "system",
"value": "Add a DEBUG environment option to Heroku settings.\n"
},
{
"from": "human",
"value": "import os\n\nimport dj_database_url\n\nfrom .base import * # noqa: F401,F403\n\n\nDEBUG = False\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\n\nSECRET_K... | python | chosen |
[
{
"from": "system",
"value": "MAINT: Add RotationSpline into __all__ of spatial.transform\n"
},
{
"from": "human",
"value": "\"\"\"\nSpatial Transformations (:mod:`scipy.spatial.transform`)\n========================================================\n\n.. currentmodule:: scipy.spatial.transform\n\... | python | chosen |
[
{
"from": "system",
"value": "Fix arguments order of reqon.deprecated.build_terms().\n"
},
{
"from": "human",
"value": "import rethinkdb as r\n\nfrom . import coerce, geo, operators, terms\nfrom .coerce import COERSIONS\nfrom .operators import BOOLEAN, EXPRESSIONS, MODIFIERS\nfrom .terms import ... | python | chosen |
[
{
"from": "system",
"value": "Update player position action script\n"
},
{
"from": "human",
"value": "import mcpi.minecraft as minecraft\nimport time\nmc = minecraft.Minecraft.create()\n\nwhile True:\n pos = mc.player.getPos()\n x = pos.x\n y = pos.y\n z = pos.z\n \n # Display ... | python | chosen |
[
{
"from": "system",
"value": "Add support for Python 2.6"
},
{
"from": "human",
"value": "import subprocess\n\nnagiosPluginsCommandLines = [\n \"/usr/lib64/nagios/plugins/check_sensors\",\n \"/usr/lib64/nagios/plugins/check_mailq -w 10 -c 20 -M postfix\",\n]\n\n\nclass NagiosWrapper:\n ... | python | chosen |
[
{
"from": "system",
"value": "Switch the main post detail view to a CBV\n"
},
{
"from": "human",
"value": "from datetime import datetime\nfrom django.http import Http404\nfrom django.shortcuts import render_to_response, get_object_or_404\nfrom django.template import RequestContext\nfrom django.v... | python | chosen |
[
{
"from": "system",
"value": "[scripts] Use different way to determine 32/64-bit which returns mode of current binary, not of the system\n"
},
{
"from": "human",
"value": "import sim, syscall_strings, platform\n\nif platform.architecture()[0] == '64bit':\n __syscall_strings = syscall_strings.sy... | python | chosen |
[
{
"from": "system",
"value": "fix: Move timestamp before dict for insertion\n"
},
{
"from": "human",
"value": "\"\"\"Notify Slack channel.\"\"\"\nimport time\n\nfrom ..utils import get_properties, get_template, post_slack_message\n\n\nclass SlackNotification:\n \"\"\"Post slack notification.\... | python | chosen |
[
{
"from": "system",
"value": "Delete unused function and imports.\n\n* wqflask/wqflask/database.py: Remove unused sqlalchemy imports.\n(read_from_pyfile): Delete it.\n"
},
{
"from": "human",
"value": "# Module to initialize sqlalchemy with flask\nimport os\nimport sys\nfrom string import Templat... | python | chosen |
[
{
"from": "system",
"value": "Remove access to admin site\n"
},
{
"from": "human",
"value": "from django.conf.urls import patterns, include, url\n\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'pysearch.views.home', name=... | python | chosen |
[
{
"from": "system",
"value": "Add start of get funtion\n"
},
{
"from": "human",
"value": "from flask import request\nfrom flask.ext import restful\nfrom route.base import api\n\nfrom model.base import db\nfrom model.user import User\nimport logging\n\n\nclass StationAPI(restful.Resource):\n d... | python | chosen |
[
{
"from": "system",
"value": "Adjust to new reference handling"
},
{
"from": "human",
"value": "from .models import Campaign, InformationObject\n\n\ndef connect_info_object(sender, **kwargs):\n reference = kwargs.get('reference')\n if reference is None:\n return\n if 'campaign' n... | python | chosen |
[
{
"from": "system",
"value": "Fix prefetch. Add styles view\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.shortcuts import get_object_or_404\nfrom django.views.generic import DetailView\n\nfrom .models import Page\n\n\nclass PageView(DetailView):\n context_o... | python | chosen |
[
{
"from": "system",
"value": "Fix RuntimeError: maximum recursion depth\n"
},
{
"from": "human",
"value": "INSTALLED_APPS = (\n 'oauth_tokens',\n 'taggit',\n 'vkontakte_groups',\n)\n\nOAUTH_TOKENS_VKONTAKTE_CLIENT_ID = 3430034\nOAUTH_TOKENS_VKONTAKTE_CLIENT_SECRET = 'b0FwzyKtO8QiQmgWQMT... | python | chosen |
[
{
"from": "system",
"value": "Add active_seven and active_thirty users\n"
},
{
"from": "human",
"value": "from datetime import datetime, timedelta\n\nfrom django.contrib.auth.models import User\n\n\ndef stats():\n return {\n \"used_site_last_thirty_days\": User.objects.filter(log__time... | python | chosen |
[
{
"from": "system",
"value": "Disable certificate for all if ENABLE_ISSUE_CERTIFICATE == False\n"
},
{
"from": "human",
"value": "from courseware.access import has_access\nfrom django.conf import settings\n\n\ndef is_certificate_allowed(user, course):\n return (course.has_ended()\n ... | python | chosen |
[
{
"from": "system",
"value": "Add users count to json representation.\n"
},
{
"from": "human",
"value": "from models.base_model import BaseModel\nfrom datetime import datetime\nfrom models.user_model import UserModel\nfrom peewee import CharField, TextField, DateTimeField, IntegerField, ForeignK... | python | chosen |
[
{
"from": "system",
"value": "Add a nice banner made using the figlet tool.\n"
},
{
"from": "human",
"value": "__version__ = '0.2.0'\n"
},
{
"from": "gpt",
"value": "# _ _\n# ___ _ __ ___ ___ | |_ ___ ___ | |___\n# / __| '_ ` _ \\/ __| | _... | python | chosen |
[
{
"from": "system",
"value": "Make models inherit from sklearn\n"
},
{
"from": "human",
"value": "from sklearn.ensemble import RandomForestRegressor as randomforest\nfrom sklearn.svm import SVR as svm\nfrom sklearn.pls import PLSRegression as pls\n\nfrom .neuralnetwork import neuralnetwork\n\n__... | python | chosen |
[
{
"from": "system",
"value": "Update to follower, reduce speed to motors.\n"
},
{
"from": "human",
"value": "\n\nimport sys\nfrom time import time\n\n\nclass PID(object):\n\n def __init__(self):\n \"\"\"initizes value for the PID\"\"\"\n self.kd = 0\n self.ki = 0\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove deprecated context parameter from from_db_value\n"
},
{
"from": "human",
"value": "from django.core.exceptions import ValidationError\nfrom django.core.validators import MinValueValidator, MaxValueValidator\nfrom django.db import models\nfrom netaddr import A... | python | chosen |
[
{
"from": "system",
"value": "Allow dashes in proposal kind slugs\n\nWe can see from the setting PROPOSAL_FORMS that at least one proposal kind,\nSponsor Tutorial, has a slug with a dash in it: sponsor-tutorial. Yet the\nURL pattern for submitting a proposal doesn't accept dashes in the slug.\nFix it.\n"
... | python | chosen |
[
{
"from": "system",
"value": "Call testing.run_module at the end of the test\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom chainer import testing\nimport chainer.functions as F\nimport numpy\n\n\ndef make_data(shape, dtype):\n # Input values close to -1 or 1 would make tests unst... | python | chosen |
[
{
"from": "system",
"value": "Check if student can choose a project before allowing them to join it\n"
},
{
"from": "human",
"value": "from aiohttp import web\n\nfrom db_helper import get_project_id, get_most_recent_group, get_user_id\nfrom permissions import view_only, value_set\n\n\n@view_only... | python | chosen |
[
{
"from": "system",
"value": "Update order of patient attributes in model.\n"
},
{
"from": "human",
"value": "from app import db\n\n\nclass User(db.Model):\n __tablename__ = 'users'\n\n username = db.Column(db.String(64), nullable=False, unique=True, primary_key=True)\n password = db.C... | python | chosen |
[
{
"from": "system",
"value": "Remove username and password from repository\n"
},
{
"from": "human",
"value": "from django.db import models\nimport mongoengine\nfrom mongoengine import Document, EmbeddedDocument\nfrom mongoengine.fields import *\n\n\n# Create your models here.\nclass Greeting(mod... | python | chosen |
[
{
"from": "system",
"value": "TST: Test for new data loader\n\nJust a start, should probably add a more detailed test later.\n"
},
{
"from": "human",
"value": "\"\"\"Standard test data.\n\"\"\"\n\nfrom __future__ import (absolute_import, division, print_function,\n unicode... | python | chosen |
[
{
"from": "system",
"value": "Add in a decorator for generating fake request objects for test cases\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.test import TestCase as DjangoTestCase\nimport fudge\n\nclass TestCase(DjangoTestCase):\n def setUp(self):\n ... | python | chosen |
[
{
"from": "system",
"value": "Make this test work when imported from the interpreter instead of run\nfrom regrtest.py (it still works there too, of course).\n"
},
{
"from": "human",
"value": "from test_support import verbose, TestFailed\nimport sunaudiodev\nimport os\n\ndef findfile(file):\n\tif... | python | chosen |
[
{
"from": "system",
"value": "Check the shape of input data earlier\n\nUsing geo.nVoxel to check the input img shape earlier, before geo is casted to float32 (geox). We should use any() instead of all(), since \"!=\" is used?"
},
{
"from": "human",
"value": "from _Ax import _Ax_ext\r\nimport nu... | python | chosen |
[
{
"from": "system",
"value": "Fix message tests after in message.parseMessage args three commits ago\n\n(three commits ago is 08a6c170daa79e74ba538c928e183f441a0fb441)\n"
},
{
"from": "human",
"value": "import os\nimport unittest\n\nfrom txdbus import error, message\n\nclass MessageTester(unitte... | python | chosen |
[
{
"from": "system",
"value": "Use package version for __version__\n"
},
{
"from": "human",
"value": "\"\"\" InfluxDB Alchemy. \"\"\"\n\nfrom .client import InfluxAlchemy\nfrom .measurement import Measurement\n\n__version__ = \"0.1.0\"\n"
},
{
"from": "gpt",
"value": "\"\"\" InfluxDB ... | python | chosen |
[
{
"from": "system",
"value": "Fix context setting on the test context\n"
},
{
"from": "human",
"value": "from awsflow.core import AsyncEventLoop\n\nfrom awsflow.context import ContextBase\n\n\nclass WorkflowTestingContext(ContextBase):\n\n def __init__(self):\n self._event_loop = Async... | python | chosen |
[
{
"from": "system",
"value": "Make sure the isLocal BooleanField is not required\n"
},
{
"from": "human",
"value": "from django import forms\nfrom django.forms.models import BaseModelFormSet\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass BaseWordFormSet(BaseModelFormSet):\n ... | python | chosen |
[
{
"from": "system",
"value": "Mark ObjC testcase as skipUnlessDarwin and fix a typo in test function.\n\ngit-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@326640 91177308-0d34-0410-b5e6-96231b3b80d8\n(cherry picked from commit cb9b1a2163f960e34721f74bad30622fda71e43b)\n"
},
{
"from": "human",
... | python | chosen |
[
{
"from": "system",
"value": "Bump the version since there are commits on top of last tag."
},
{
"from": "human",
"value": "#-*- coding: utf-8 -*-\n# version string following pep-0396 and pep-0386\n__version__ = '0.9pbs.9' # pragma: nocover\n"
},
{
"from": "gpt",
"value": "#-*- codi... | python | chosen |
[
{
"from": "system",
"value": "Correct sys.path when generating docs.\n"
},
{
"from": "human",
"value": "import os\nimport site # get site-packages into sys.path\nimport sys\n\n# add local addons folder to sys.path so blender finds it\nsys.path = (\n [os.path.join(os.path.dirname(__file__), '.... | python | chosen |
[
{
"from": "system",
"value": "Enable remote, rmessage and rnotify plugins by default\n"
},
{
"from": "human",
"value": "# Module: defaults\n# Date: 14th May 2008\n# Author: James Mills, prologic at shortcircuit dot net dot au\n\n\"\"\"defaults - System Defaults\n\nThis module contains de... | python | chosen |
[
{
"from": "system",
"value": "Move Document.__str__ to named method\n"
},
{
"from": "human",
"value": "from django.db import models\nfrom django.urls import reverse\n\n\nclass Document(models.Model):\n FILE_TYPES = ('md', 'txt')\n\n repo = models.ForeignKey('interface.Repo', related_name='... | python | chosen |
[
{
"from": "system",
"value": "Add more titles and suffixes\n"
},
{
"from": "human",
"value": "import tldextract\nimport pyphen\nfrom random import choice\n\nTITLES = ('Mister', 'Little Miss')\nSUFFIXES = ('Destroyer of Worlds', 'the Monkey Botherer', 'PhD')\n\n\ndef generate_name(domain):\n t... | python | chosen |
[
{
"from": "system",
"value": "Remove clear before test results"
},
{
"from": "human",
"value": "from mbaas.settings import *\n\nINSTALLED_APPS += ('django_nose',)\n\nTEST_RUNNER = 'django_nose.NoseTestSuiteRunner'\n\nNOSE_ARGS = [\n '--cover-erase',\n '--with-xunit',\n '--with-coverage'... | python | chosen |
[
{
"from": "system",
"value": "Rework HOME fixture so it doesn't leave os.environ corrupted\n"
},
{
"from": "human",
"value": "import functools\nimport os.path\nimport shutil\nimport sys\nimport tempfile\n\nimport pytest\n\n\n@pytest.fixture(scope=\"function\")\ndef HOME(tmpdir):\n home = os.p... | python | chosen |
[
{
"from": "system",
"value": "Include spider name in item dedupe pipeline\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# Define your item pipelines here\n#\n# Don't forget to add your pipeline to the ITEM_PIPELINES setting\n# See: http://doc.scrapy.org/en/latest/topics/item-pipe... | python | chosen |
[
{
"from": "system",
"value": "Upgrade Lookup model to Expando and DNS result properties from integer to string.\n"
},
{
"from": "human",
"value": "from google.appengine.ext import db\n\nTOP_LEVEL_DOMAINS = 'com net org biz info'.split()\n\n\nclass Lookup(db.Model):\n \"\"\"\n The datastore... | python | chosen |
[
{
"from": "system",
"value": "Fix of the logging system exception\n\nAdded a format to the date for the logging system. '%Y-%m-%d %H:%M:%S’.\n\nFixed an exception opening the logging file because the variable name\nwas not written correctly.\n"
},
{
"from": "human",
"value": "\"\"\"\r\nfile: cas... | python | chosen |
[
{
"from": "system",
"value": "Make sure key has the required size.\n\nsee #867\n"
},
{
"from": "human",
"value": "# coding: utf-8\nfrom Crypto.Cipher import AES\nimport base64\nimport random\nimport string\nfrom modoboa.lib import parameters\n\n\ndef random_key(l=16):\n \"\"\"Generate a rando... | python | chosen |
[
{
"from": "system",
"value": "Update test for actually checking existence of nodes before creating.\n"
},
{
"from": "human",
"value": "from nose.tools import eq_, ok_\nfrom tornado.httpclient import HTTPRequest\nimport json\n\nfrom astral.api.tests import BaseTest\nfrom astral.models.node import... | python | chosen |
[
{
"from": "system",
"value": "Make sure flocker package can be imported even if it's not installed.\n"
},
{
"from": "human",
"value": "# Copyright Hybrid Logic Ltd. See LICENSE file for details.\n\n\"\"\"\nTests for top-level ``flocker`` package.\n\"\"\"\n\nfrom sys import executable\nfrom subp... | python | chosen |
[
{
"from": "system",
"value": "Add more time to mqtt.test.client\n"
},
{
"from": "human",
"value": "import time\nfrom django.test import TestCase\n\nfrom django.contrib.auth.models import User\nfrom django.conf import settings\n\nfrom rest_framework.renderers import JSONRenderer\nfrom rest_framew... | python | chosen |
[
{
"from": "system",
"value": "Remove redundant import, change function name.\n"
},
{
"from": "human",
"value": "import cassiopeia as cass\nfrom cassiopeia.core import Summoner\n\ndef test_cass():\n name = \"Kalturi\"\n\n masteries = cass.get_masteries()\n for mastery in masteries:\n ... | python | chosen |
[
{
"from": "system",
"value": "Add basic test for box writer\n"
},
{
"from": "human",
"value": "from nex import box\n\n\ndef test_glue_flex():\n h_box = box.HBox(contents=[box.Glue(dimen=100, stretch=50, shrink=20),\n box.Glue(dimen=10, stretch=350, shrink=21)],\n... | python | chosen |
[
{
"from": "system",
"value": "Add a new url endpoint for listing all env vars and a delay to root\n"
},
{
"from": "human",
"value": "from flask import Flask\nimport logging\n\napp = Flask(__name__)\napp.debug = True\n\nstream_handler = logging.StreamHandler()\napp.logger.addHandler(stream_handle... | python | chosen |
[
{
"from": "system",
"value": "Add basic options for the CLI\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport click\nimport sys\n\nfrom egpackager.datasources import GspreadDataSource\n\n@click.group()\ndef cli():\n '''\n\n '''\n pass\n\n\n@cli.command()\ndef register()... | python | chosen |
[
{
"from": "system",
"value": "Return 409 for duplicate activity logging.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom tastypie import fields\nfrom tastypie.authorization import DjangoAuthorization\n\nfrom panda.api.utils import PandaApiKeyAuthentication, PandaModelResource, P... | python | chosen |
[
{
"from": "system",
"value": "Make signup just point to landing page\n"
},
{
"from": "human",
"value": "\"\"\"voteswap URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\nFunct... | python | chosen |
[
{
"from": "system",
"value": "Prepare for next development iteration\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n__version__ = '0.3.6'\n__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']\n\nfrom .application_master import ApplicationMaster\nfrom .h... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.