conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Increment minor version number for new release (v0.02).\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport sys, os\n\nsetup(name='cc.license',\n version='0.01',\n description=\"License selection based on ccREL-based meta... | python | chosen |
[
{
"from": "system",
"value": "Update SQLAlchemy and Geoalchemy2 version range\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# coding: utf-8\n\nfrom setuptools import find_packages, setup\n\nsetup(name='egoio',\n author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES',\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove entry points and bump dev version.\n"
},
{
"from": "human",
"value": "import sys\nIS_PYTHON3 = sys.version_info[0] == 3\nif not IS_PYTHON3:\n print(\"Error: signac requires python version >= 3.x.\")\n sys.exit(1)\n\nfrom setuptools import setup, find_pa... | python | chosen |
[
{
"from": "system",
"value": "Fix module name: test.mysql -> test.mysqld\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom setuptools import setup, find_packages\n\nclassifiers = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License ::... | python | chosen |
[
{
"from": "system",
"value": "Add requests as a dependency\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='flyingcloud',\n version='0.1.9',\n description='Build Docker images using SaltStack',\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix read the docs url.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# encoding: utf-8\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n\nREQUIREMENTS = [i.strip() for i in open(\"requirements.txt\"... | python | chosen |
[
{
"from": "system",
"value": "Set the next dev version number: 1.0.4-dev"
},
{
"from": "human",
"value": "\"\"\"Rachiopy setup script.\"\"\"\nfrom setuptools import find_packages, setup\n\nVERSION = \"1.0.3\"\n\nGITHUB_USERNAME = \"rfverbruggen\"\nGITHUB_REPOSITORY = \"rachiopy\"\n\nGITHUB_PATH ... | python | chosen |
[
{
"from": "system",
"value": "Update initial migration to work on Python 3"
},
{
"from": "human",
"value": "\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\... | python | chosen |
[
{
"from": "system",
"value": "Use None as username and password for SMTP.\n"
},
{
"from": "human",
"value": "__author__ = 'q19420'\n\n\nsmtp_username = \"test\"\nsmtp_password = \"testpass\""
},
{
"from": "gpt",
"value": "__author__ = 'weijia'\n\n\nsmtp_username = None\nsmtp_password... | python | chosen |
[
{
"from": "system",
"value": "Fix case if isCopy is null\n"
},
{
"from": "human",
"value": "from . import JNISimProcedure\nfrom ...engines.soot.values.arrayref import SimSootValue_ArrayRef\n\nclass GetArrayElements(JNISimProcedure):\n\n return_ty = 'reference'\n\n def run(self, ptr_env, ar... | python | chosen |
[
{
"from": "system",
"value": "Print tags out when scanning for URLs.\n"
},
{
"from": "human",
"value": "import re\nimport sys\nfrom xml.sax import make_parser, handler\n\nif len(sys.argv) < 3:\n print \"This script expects two arguments: \\n1. The path to a posts.xml file from a Stack Overflo... | python | chosen |
[
{
"from": "system",
"value": "4: Create script to save documentation to a file \n\nTask-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4"
},
{
"from": "human",
"value": "######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: christop... | python | chosen |
[
{
"from": "system",
"value": "Move Cumbria to the North West\n"
},
{
"from": "human",
"value": "\"\"\"\nImport administrative areas from the NPTG.\n\nUsage:\n\n import_areas < AdminAreas.csv\n\"\"\"\n\nfrom ..import_from_csv import ImportFromCSVCommand\nfrom ...models import AdminArea\n\n\ncl... | python | chosen |
[
{
"from": "system",
"value": "Set develop version to 1.2-dev\n"
},
{
"from": "human",
"value": "__version_info__ = (1, 1, 0, None)\n\n\n# Dot-connect all but the last. Last is dash-connected if not None.\n__version__ = '.'.join([str(i) for i in __version_info__[:-1]])\nif __version_info__[-1] is... | python | chosen |
[
{
"from": "system",
"value": "Modify test to test that bucketlist nolonger exists in system\n"
},
{
"from": "human",
"value": "import json\n\nfrom api.test import BaseTestCase\nfrom api.models import BucketList\n\n\nclass TestDeleteBucketList(BaseTestCase):\n\n def test_delete_bucket_list(sel... | python | chosen |
[
{
"from": "system",
"value": "Add BMP files to supported list\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\n\n\ndef is_image_file(f):\n known_extensions = ('.jpg', '.jpeg', '.png')\n return os.path.isfile(f) and f.lower().endswith(known_ext... | python | chosen |
[
{
"from": "system",
"value": "tests/api: Add more \"GET /users/:id\" tests\n"
},
{
"from": "human",
"value": "from tests.data import add_fixtures, users\n\n\ndef test_read_user(db_session, client):\n john = users.john()\n add_fixtures(db_session, john)\n\n res = client.get('/users/{id}'... | python | chosen |
[
{
"from": "system",
"value": "Set Profile.gender maxlength to 20\n"
},
{
"from": "human",
"value": "from django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom ovp_users.helpers import get_settings, import_from_string\n\ngender_choices = (\n (\"male\", \"Male\"... | python | chosen |
[
{
"from": "system",
"value": "Add a Python2 test for non-unicode commands\n"
},
{
"from": "human",
"value": "\"\"\"Tests for ifcfg.tools.\"\"\"\n\nimport logging\nimport os\nimport unittest\n\nimport ifcfg\nfrom ifcfg.tools import exec_cmd\nfrom nose.tools import eq_\n\n\nclass IfcfgToolsTestCas... | python | chosen |
[
{
"from": "system",
"value": "Remove 'versions/' from archive url path\n"
},
{
"from": "human",
"value": "from django.conf.urls import url\nfrom calaccess_website import views\n\n\nurlpatterns = [\n # The homepage\n url(\n r'^$',\n views.VersionArchiveIndex.as_view(),\n ... | python | chosen |
[
{
"from": "system",
"value": "Add support for connecting to NCBI database\n"
},
{
"from": "human",
"value": "import os\nimport sys\nimport time\nimport math\nfrom contextlib import contextmanager\n\n@contextmanager\ndef timeit_msg(msg):\n\tprint '{}...'.format(msg),\n\tsys.stdout.flush()\n\n\tst... | python | chosen |
[
{
"from": "system",
"value": "Set up JSONP requests to always return 200.\n"
},
{
"from": "human",
"value": "import re\n\nclass JSONPMiddleware(object):\n def process_response(self, request, response):\n if request.GET.get('callback') and re.match('[a-zA-Z0-9_]+$', request.GET.get('cal... | python | chosen |
[
{
"from": "system",
"value": "Return status when executing tests with DiscoverRunner\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nimport sys\n\nfrom django.conf import settings\nimport django\n\n\nDEFAULT_SETTINGS = {\n 'INSTALLED_APPS': (\n 'sqjobs',\n '... | python | chosen |
[
{
"from": "system",
"value": "Extend templates dirs on settings.py\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 platform = attr... | python | chosen |
[
{
"from": "system",
"value": "Update exercise of variables and names\n"
},
{
"from": "human",
"value": "cars = 100\nspace_in_a_car = 4.0\ndrivers = 30\npassengers = 90\ncars_not_driven = cars - drivers\ncars_driven = drivers\ncarpool_capacity = cars_driven * space_in_a_car\naverage_passengers_pe... | python | chosen |
[
{
"from": "system",
"value": "Fix bug where shipping wasn't included in payment amount with cartridge handler\n"
},
{
"from": "human",
"value": "from cartridge.shop.checkout import CheckoutError\nfrom cartridge.shop.models import Cart\n\nfrom commweb.exc import PaymentDeclinedError\nfrom commweb... | python | chosen |
[
{
"from": "system",
"value": "Remove pass_event (deprecated) and replace with next"
},
{
"from": "human",
"value": "import pyrox.filtering as filtering\n\n\nclass SimpleFilter(filtering.HttpFilter):\n \"\"\"\n This is an example of a simple filter that simply prints out the\n user-agent... | python | chosen |
[
{
"from": "system",
"value": "Update example with newer tied layer specification.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport matplotlib.pyplot as plt\nimport theanets\n\nfrom utils import load_mnist, plot_layers, plot_images\n\n\ntrain, valid, _ = load_mnist()\n\ne = thea... | python | chosen |
[
{
"from": "system",
"value": "Fix encoding test: compare with unicode string.\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n\nimport pytest\n\nfrom owslib.fes import PropertyIsEqualTo\nfrom pydov.search.boring import BoringSearch\nfrom tests.abstract import (\n AbstractTestSea... | python | chosen |
[
{
"from": "system",
"value": "Add sys.path for python-twitter for local development\n"
},
{
"from": "human",
"value": "import ConfigParser\nimport os\nimport sys\n\nUSER_DIR = os.path.join(os.path.expanduser('~'))\nUSER_CONFIG = os.path.join(USER_DIR, '.twphotos')\nd = os.path.dirname(__file__)\... | python | chosen |
[
{
"from": "system",
"value": "Fix IndexError when running command without arguments.\n"
},
{
"from": "human",
"value": "from getpass import getpass\n\nfrom scrapy.commands.crawl import Command as BaseCommand\n\n\ndef sanitize_query(query):\n return query.replace(' ', '+')\n\n\nclass Command(B... | python | chosen |
[
{
"from": "system",
"value": "Fix possible problem with middleware\n"
},
{
"from": "human",
"value": "from functools import update_wrapper, wraps\nfrom django.contrib.auth import REDIRECT_FIELD_NAME\nfrom django.http import HttpResponse, HttpResponseRedirect\nfrom django.utils.decorators import ... | python | chosen |
[
{
"from": "system",
"value": "Remove myself from the HTTPie team"
},
{
"from": "human",
"value": "\"\"\"\nGenerate snippets to copy-paste.\n\"\"\"\nimport sys\n\nfrom jinja2 import Template\n\nfrom fetch import HERE, load_awesome_people\n\nTPL_FILE = HERE / 'snippet.jinja2'\nHTTPIE_TEAM = {\n ... | python | chosen |
[
{
"from": "system",
"value": "Make global variable upper-case and use f-strings\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom os import environ, path\n\nfrom ._settings_default import *\nfrom ..exceptions import ImproperlyConfigured\n\nprofile = environ.get(\"GOLD_DIGGER_PRO... | python | chosen |
[
{
"from": "system",
"value": "Add fixture for the advert in the blog sidebar advert.\n"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\n\nfrom us_ignite.snippets.models import Snippet\n\n\nFIXTURES = [\n {\n 'slug': 'home-box',\n 'name': 'UP ... | python | chosen |
[
{
"from": "system",
"value": "Fix homepage after wrong rebase\n"
},
{
"from": "human",
"value": "from django.template.response import TemplateResponse\n\nfrom ..product.utils import products_with_availability, products_with_details\n\n\ndef home(request):\n products = Product.objects.get_avai... | python | chosen |
[
{
"from": "system",
"value": "Adjust test_polint to be less stdout-spammy\n"
},
{
"from": "human",
"value": "from django.core.management import call_command\n\nfrom fjord.base.tests import TestCase\n\n\nclass TestGenerateData(TestCase):\n def test_generate_data(self):\n \"\"\"Make sure... | python | chosen |
[
{
"from": "system",
"value": "Check worker's FQDN against username.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\nfrom django.core.exceptions import PermissionDenied, SuspiciousOperation\nfrom kobo.decorators import decorator_with_args\nfrom kobo.django.xmlrpc.decorators import... | python | chosen |
[
{
"from": "system",
"value": "Fix infinite loop with missing symbol definition\n\nThe local function _resolve_symbol is renamed for improved tracebacks.\n"
},
{
"from": "human",
"value": "import hc2002.plugin as plugin\nimport hc2002.config as config\n\nplugin.register_for_resource(__name__, 'hc... | python | chosen |
[
{
"from": "system",
"value": "[IMP] stock: Make default_picking_policy a required field in settings\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Part of Odoo. See LICENSE file for full copyright and licensing details.\n\nfrom odoo import fields, models\n\n\nclass StockConfigSett... | python | chosen |
[
{
"from": "system",
"value": "Add -i flag for input\n"
},
{
"from": "human",
"value": "import json\n\nfrom collections import Counter\nfrom Bio import SeqIO\nfrom Bio.SeqUtils import GC\nfor seq_record in SeqIO.parse(\"samples/test.fasta\", \"fasta\"):\n cnt = Counter()\n line = str(seq_re... | python | chosen |
[
{
"from": "system",
"value": "Correct issue from Sonar (and black file)\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function\nfrom odin import exceptions\nfrom odin.fields import ScalarField\nfrom odin.validators import EMPTY_VALUES\n... | python | chosen |
[
{
"from": "system",
"value": "Add additional testing to electrochemistry/Nernst\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import (absolute_import, division, print_function)\n\nfrom ..nernst import nernst_potential\n\n\ndef test_nernst_potential():\n # Sodium ... | python | chosen |
[
{
"from": "system",
"value": "Use django.shortcuts.render instead of TemplateView"
},
{
"from": "human",
"value": "from django.conf.urls.defaults import patterns, url\nfrom django.views.generic import TemplateView\n\nurlpatterns = patterns('django.views.generic.simple',\n url(r'^simple/$', Te... | python | chosen |
[
{
"from": "system",
"value": "Add a missing line between imports\n"
},
{
"from": "human",
"value": "from django.conf import settings\nfrom django.conf.urls import url\nfrom django.http import HttpResponse\nfrom django.views import generic\n\nfrom . import views\n\nurlpatterns = (\n url(r'^rob... | python | chosen |
[
{
"from": "system",
"value": "Add date back to build display\n"
},
{
"from": "human",
"value": "\"\"\"Django admin interface for `~builds.models.Build` and related models.\n\n\"\"\"\n\nfrom django.contrib import admin\nfrom readthedocs.builds.models import Build, VersionAlias, Version, BuildComm... | python | chosen |
[
{
"from": "system",
"value": "Move those methods to own class [ci skip]\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"ICU (LEGO Island Configuration Utility).\n\nCreated 2015 Triangle717\n<http://le717.github.io/>\n\nLicensed under The MIT License\n<http://opensource.org/lice... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Added a workaround for abstract models not being handled correctly.\"\n\nThis reverts commit a3e44c187b5abfa6d9b360cecc5c1daa746134f5.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom django.db.models import F, Q\nfrom django.core.management... | python | chosen |
[
{
"from": "system",
"value": "Remove carriage returns in Anki exporter\n"
},
{
"from": "human",
"value": "# Copyright (C) 2013 Braden Walters\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published by\n... | python | chosen |
[
{
"from": "system",
"value": "Select planet and display alt/az data\n\nCreated a function localized to South Bend, IN, to display altitude and\nazimuth data for a planet selected.\n"
},
{
"from": "human",
"value": "import ephem\n\nm = getattr(ephem, (raw_input('Planet: ')))\n\nprint ephem.conste... | python | chosen |
[
{
"from": "system",
"value": "Add execute hook to allow wrapping handler calls\n"
},
{
"from": "human",
"value": "\nfrom cgi import parse_header\nimport json\n\nfrom django.http import HttpResponse, Http404\n\nRPC_MARKER = '_rpc'\n\n\nclass Resource(object):\n\n def __init__(self, request, *a... | python | chosen |
[
{
"from": "system",
"value": "Add tracker and doc URL to metadata\n"
},
{
"from": "human",
"value": "__title__ = 'cihai'\n__package_name__ = 'cihai'\n__version__ = '0.9.0a3'\n__description__ = 'Library for CJK (chinese, japanese, korean) language data.'\n__author__ = 'Tony Narlock'\n__email__ = ... | python | chosen |
[
{
"from": "system",
"value": "Fix import error in Python 2\n"
},
{
"from": "human",
"value": "from .metakernel import MetaKernel\nfrom .process_metakernel import ProcessMetaKernel\nfrom .magic import Magic, option\nfrom .parser import Parser\n\n__all__ = ['Magic', 'MetaKernel', 'option']\n\n__ve... | python | chosen |
[
{
"from": "system",
"value": "Add more docs on how to get drugbank quickly\n"
},
{
"from": "human",
"value": "\"\"\"This module provides an API and processor for DrugBank content.\nIt builds on the XML-formatted data schema of DrugBank and expects\nthe XML file to be available locally. The full ... | python | chosen |
[
{
"from": "system",
"value": "Add two approaches for string word pattern"
},
{
"from": "human",
"value": "\n# @file Word Pattern\n# @brief Given 2 sets check if it is a bijection\n\n# https://leetcode.com/problems/word-pattern/\n\n'''\nGiven a pattern and a string str, find if str follows the s... | python | chosen |
[
{
"from": "system",
"value": "Refactor create_card method to take a list of card dictionaries. Rename method accordingly.\n"
},
{
"from": "human",
"value": "from pymongo import MongoClient\n\nclass Cards:\n def __init__(self, dbname='cards'):\n \"\"\"Instantiate this class.\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Use our classes from tests.lib.* in pytest fixtures\n"
},
{
"from": "human",
"value": "import py\nimport pytest\n\nfrom tests.lib.path import Path\n\n\n@pytest.fixture\ndef tmpdir(request):\n \"\"\"\n Return a temporary directory path object which is unique to... | python | chosen |
[
{
"from": "system",
"value": "Fix potential bug in case LDAP does not return lists\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nimport re\nfrom ldap3 import Server, Connection\n\nclass LDAPError(Exception):\n pass\n\ndef search_ldap(username):\n '''Searches... | python | chosen |
[
{
"from": "human",
"value": "Add basic skeleton of the library, including the implementation of the IO thread system.\n"
},
{
"from": "gpt",
"value": "\"\"\"Provides an API wrapper around the Firmata wire protocol.\n\nThere are two major pieces to the firmata module. When FirmataInit() is called... | python | chosen |
[
{
"from": "system",
"value": "Move logic for fetching md files to it's own function\n\n* wqflask/wqflask/markdown_routes.py\n(render_markdown): New function.\n(glossary): use render_markdown function.\n"
},
{
"from": "human",
"value": "\"\"\"Markdown routes\n\nRender pages from github, or if the... | python | chosen |
[
{
"from": "system",
"value": "Remove iface, if rebrush_contetn ist not set\n"
},
{
"from": "human",
"value": "import zeit.website.interfaces\nfrom zeit.cms.section.interfaces import ISectionMarker\nimport grokcore.component as grok\nimport zeit.cms.checkout.interfaces\nimport zeit.cms.content.in... | python | chosen |
[
{
"from": "system",
"value": "Reset the ImportTnChecker on every call\n\nThe list of phone numbers was being retained, potentially resulting in\nduplicates with every call.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom __future__ import division, absolute_import, print_functio... | python | chosen |
[
{
"from": "system",
"value": "Fix testing for JSON parameter existence.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport json\nimport sys\nfrom db import dbManager\n\n\n# insert an organism into a database table\ndef insert(args):\n if args.json:\n data = json.loads(a... | python | chosen |
[
{
"from": "system",
"value": "Change data structure to multidimensional array\nNow passing Test 2\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\n\nclass Grid(object):\n\n def __init__(self):\n self.board = ['. '*10 for row in range(0,22)]\n self.score = ... | python | chosen |
[
{
"from": "system",
"value": "Add TODO for interactive map classifier\n"
},
{
"from": "human",
"value": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in com... | python | chosen |
[
{
"from": "system",
"value": "Remove states that do not exist anymore\n"
},
{
"from": "human",
"value": "from encdec import RNNEncoderDecoder\nfrom encdec import get_batch_iterator\nfrom encdec import parse_input\nfrom encdec import create_padded_batch\n\nfrom state import prototype_state\nfrom ... | python | chosen |
[
{
"from": "system",
"value": "Update the retries count of a queued message when it is changed back from deferred\n"
},
{
"from": "human",
"value": "from django.db import models\nfrom django_mailer import constants\n\n\nclass QueueManager(models.Manager):\n use_for_related_fields = True\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix python projection of experiment iteration result enumeration.\n"
},
{
"from": "human",
"value": "from enum import unique, IntEnum\n\n\n@unique\nclass ExperimentType(IntEnum):\n Detumbling = 1\n EraseFlash = 2\n SunS = 3\n LEOP = 4\n RadFET = 5\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix PIL bug on OS X.\n"
},
{
"from": "human",
"value": "\"\"\"\nHierarchical visual models in C++ and Python\n============================================\n\nThe Glimpse project is a library for implementing hierarchical visual models\nin C++ and Python. The goal of... | python | chosen |
[
{
"from": "system",
"value": "Fix failing test in Python 3\n"
},
{
"from": "human",
"value": "#-----------------------------------------------------------------------------\n# Copyright (C) 2012- The IPython Development Team\n#\n# Distributed under the terms of the BSD License. The full lice... | python | chosen |
[
{
"from": "system",
"value": "[ModuleInteface] Return false if no alias.\n"
},
{
"from": "human",
"value": "import GlobalVars\n\n\nclass ModuleInterface(object):\n triggers = []\n acceptedTypes = ['PRIVMSG']\n help = '<no help defined (yet)>'\n\n def __init__(self):\n self.onS... | python | chosen |
[
{
"from": "system",
"value": "Align the method signature with subclasses\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>\n\"\"\"\n\nfrom __future__ import absolute_import, unicode_literals\n\nimport abc\n\nimport six... | python | chosen |
[
{
"from": "system",
"value": "Make doctest integration in unittest generic.\n\nRely on introspection rather than redundant typing.\n"
},
{
"from": "human",
"value": "import unittest\nimport doctest\n\nclass TestDoctest(unittest.TestCase):\n\n modules = ('passes',)\n\n def test_package(self... | python | chosen |
[
{
"from": "system",
"value": "Fix bug in wordcloud method\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import Counter\nimport re\n\ndef create_wordcloud( data, stopwords = [\"the\", \"a\", \"or\", \"tai\... | python | chosen |
[
{
"from": "system",
"value": "Use os.rename instead of os.path in moving dirs\n"
},
{
"from": "human",
"value": "\"\"\"\n Script to move corrupt images to 'dirty' directory\n \n Reads list of images to move. Does not verify that images are corrupt - \n Simply moves to 'dirty' directo... | python | chosen |
[
{
"from": "system",
"value": "Fix name clash over \"utils\" in ardinfo plugin script.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\n\nimport os\nimport sys\n\nsys.path.append(\"/usr/local/munki/munkilib\")\nimport FoundationPlist\nsys.path.append(\"/usr/local/sal\")\nimport utils\n\n\n... | python | chosen |
[
{
"from": "system",
"value": "Update tile coordinate for fjord label placement\n"
},
{
"from": "human",
"value": "# San Pablo Bay\n# https://www.openstreetmap.org/way/43950409\nassert_has_feature(\n 14, 2623, 6318, 'water',\n { 'kind': 'bay', 'label_placement': True })\n\n# Sansum Narrows\... | python | chosen |
[
{
"from": "system",
"value": "Remove q.join() / task_done() usage\n\nDon't have to block producer anymore - it will wait for the consumer to\nfinish anyway\n"
},
{
"from": "human",
"value": "\nfrom tqdm import tqdm\nimport asyncio\ntry:\n import uvloop\n asyncio.set_event_loop_policy(uvloo... | python | chosen |
[
{
"from": "system",
"value": "Remove Assert Call not necessary anymore\n"
},
{
"from": "human",
"value": "import pytest\nfrom mock import Mock\n\nfrom formica import cli\nfrom tests.unit.constants import STACK\n\n\ndef test_describes_change_set(boto_client, change_set):\n cli.main(['describe'... | python | chosen |
[
{
"from": "system",
"value": "Fix for using NAG Fortran 95, due to James Graham <jg307@cam.ac.uk>\n\n\ngit-svn-id: 77a43f9646713b91fea7788fad5dfbf67e151ece@2515 94b884b6-d6fd-0310-90d3-974f1d3f35e1\n"
},
{
"from": "human",
"value": "import os\nimport sys\n\nfrom numpy.distutils.cpuinfo import cp... | python | chosen |
[
{
"from": "system",
"value": "Fix unit test for when robotframework is not installed.\n"
},
{
"from": "human",
"value": "import unittest\nimport robot.errors\nfrom robotide.contrib.testrunner.runprofiles import PybotProfile\n\n\nclass TestPybotArgumentsValidation(unittest.TestCase):\n\n def s... | python | chosen |
[
{
"from": "system",
"value": "Use correct value for disable_escaping parameter\n"
},
{
"from": "human",
"value": "########################################################################\n# amara/xslt/tree/text_element.py\n\"\"\"\nImplementation of the `xsl:text` element.\n\"\"\"\n\nfrom amara.x... | python | chosen |
[
{
"from": "system",
"value": "Add rotation matrix, from orbital plane to inertial frame\n"
},
{
"from": "human",
"value": "\"\"\"Computes the least-squares optimal Keplerian elements for a sequence of\n cartesian position observations.\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as... | python | chosen |
[
{
"from": "system",
"value": "Add control events to control jabber clients\n"
},
{
"from": "human",
"value": "from django.core.management.base import BaseCommand\n\nfrom jabdaemon.client import OTRMeClient\nimport logging\n\nclass Command(BaseCommand):\n args = ''\n help = 'Start the JabDa... | python | chosen |
[
{
"from": "system",
"value": "Fix event detail variable key lookup\n"
},
{
"from": "human",
"value": "import boto3\n\niam = boto3.client('iam')\n\n\ndef lambda_handler(event, context):\n details = event['check-item-detail']\n username = details['User Name (IAM or Root)']\n access_key_id... | python | chosen |
[
{
"from": "system",
"value": "Remove a line of debugging code\n"
},
{
"from": "human",
"value": "from __future__ import division # for Python 2.x compatibility\nimport numpy\n\nclass EuclidField(object):\n p = 5.0\n r = 30.0\n @staticmethod\n def dist(x, y):\n return numpy.hyp... | python | chosen |
[
{
"from": "system",
"value": "Change urlparser to use reply\n"
},
{
"from": "human",
"value": "from modules import *\n\nimport re\nimport urllib2\nimport traceback\ntry:\n import simplejson as json\nexcept ImportError:\n import json\n\nfrom unidecode import unidecode\n\nfrom twitter import... | python | chosen |
[
{
"from": "system",
"value": "Add networkx to test dependencies\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\n\nimport sys\nfrom setuptools import setup\n\n_PY2 = sys.version_info.major == 2\n\n# add __version__, __author__, __authoremail__, __description__ to this n... | python | chosen |
[
{
"from": "system",
"value": "Add twill to install requires.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name = \"django-test-utils\",\n version = \"0.3\",\n packages = find_packages(),\n author = \"Eric Holscher\",\n author_email = \... | python | chosen |
[
{
"from": "system",
"value": "Install the treepriors package along with everything else. Feels very wrong that these need to be manually declared one-by-one, but oh well.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ntry:\n from setuptools import setup\nexcept ImportError:\n ... | python | chosen |
[
{
"from": "system",
"value": "Increment version for the new ‘local’ mode.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nrequires = [\n 'amaasutils',\n 'configparser',\n 'python-dateutil',\n 'pytz',\n 'requests',\n 'warrant'\n]\n\nsetup(\n ... | python | chosen |
[
{
"from": "system",
"value": "Add Pygments to install requirements\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(name='cycli',\n version='0.0.1',\n description='A Command Line Interface for Cypher.',\n long_description='Syntax highlighting and autocomple... | python | chosen |
[
{
"from": "system",
"value": "Exclude tests and devtools when packaging\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\ndef readme():\n with open('README.md') as f:\n return f.read()\n\nsetup(name='subvenv',\n version='1.0.0',\n description... | python | chosen |
[
{
"from": "system",
"value": "Add tangled to dev requirements\n\nAlthough `tangled.web[dev]` is already in the dev requirements and\n`tangled.web`'s dev requirememts include `tangled[dev]`, it seems that\n`tangled`'s dev requirements aren't being pulled in via `tangled.web`.\nNot sure if this intentional on... | python | chosen |
[
{
"from": "system",
"value": "Use with statement to ensure file is closed afterwards\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup, find_packages\n\nREADME = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()\n\n# allow setup.py to be run from any pat... | python | chosen |
[
{
"from": "system",
"value": "Install relies on Django and factory boy\n"
},
{
"from": "human",
"value": "import os\nimport setuptools\n\n\nsetuptools.setup(\n name='factory_djoy',\n version='0.1',\n description=\"Wrappers over Factory Boy's Django Factories\",\n url='http://github.c... | python | chosen |
[
{
"from": "system",
"value": "Add .stream to packages list.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom sys import version_info\n\nversion = \"1.3\"\ndeps = [\"pbs\", \"requests>=0.12.1\"]\n\n# require argparse on Python <2.7 and ... | python | chosen |
[
{
"from": "system",
"value": "Update README with new owner.\n"
},
{
"from": "human",
"value": "import setuptools\n\n\n# How do we keep this in sync with requirements.pip?\n#\nREQUIREMENTS = [\n \"nose==1.3.0\",\n \"python-dateutil==1.5\",\n]\n\n\nif __name__ == \"__main__\":\n setuptool... | python | chosen |
[
{
"from": "system",
"value": "Add dependency on the dataclasses library\n\nThis dependency is optional in Python 3.7 or later,\nas [PEP 557] made it part of the standard library.\n\n[PEP 557]: https://www.python.org/dev/peps/pep-0557/\n"
},
{
"from": "human",
"value": "from setuptools import set... | python | chosen |
[
{
"from": "system",
"value": "Fix URL to point to the proper git repository\n\nChange-Id: I436ebe7ad047db84bf4224bb7fdf1c4ad0414115\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name=\"shinkengen\",\n version='0.1',\n author=\"Yuvi Panda\",\n author_emai... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.