conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Increment version after fix to frozendict version"
},
{
"from": "human",
"value": "import subprocess\nimport sys\n\nfrom setuptools import Command, setup\n\n\nclass RunTests(Command):\n user_options = []\n\n def initialize_options(self):\n pass\n\n d... | python | chosen |
[
{
"from": "system",
"value": "Change the tagline for PyPI\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nsetup(\n name='jute',\n packages=['jute'],\n package_dir={'jute': 'python3/jute'},\n version='0.1',\n description='Yet another interface module for Python... | python | chosen |
[
{
"from": "system",
"value": "Upgrade requests-facebook version to 0.4.0\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nsetup(\n name='requests-facebook',\n version='0.3.0',\n install_requires=['requests>=1.0.0'],\n author='Mike Helmick',\... | python | chosen |
[
{
"from": "system",
"value": "Remove 3.1 and 3.2 from python_requires (and classifiers) to allow it to still install for those versions\n"
},
{
"from": "human",
"value": "import io\nimport os\nimport re\nfrom setuptools import setup, find_packages\n\n\ndef find_version():\n file_dir = os.path... | python | chosen |
[
{
"from": "system",
"value": "Address review comments, remove zip_safe=True because GeoIP\n"
},
{
"from": "human",
"value": "__author__ = 'katharine'\n\nimport sys\nfrom setuptools import setup, find_packages\n\nrequires = [\n 'backports.ssl-match-hostname==3.4.0.2',\n 'gevent>=1.1b5',\n 'gev... | python | chosen |
[
{
"from": "system",
"value": "Add missing libgettid to py_modules\n"
},
{
"from": "human",
"value": "import sys\n\nfrom setuptools import setup\nfrom setuptools.extension import Extension\n\n#XXX gettid only works on Linux, don't bother else\nif 'linux' in sys.platform:\n exts = [Extension('_... | python | chosen |
[
{
"from": "system",
"value": "Remove an overlooked from __future__ import\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom setuptools import setup, find_packages\n\nlong_desc = \"\"\"\nTransform Excel spreadsheets\n\"\"\"\n# See https://pypi.python.org/pypi?%3Aacti... | python | chosen |
[
{
"from": "system",
"value": "Bump version: 0.0.2 -> 0.0.3\n\nPyPI won't let me delete the 0.0.2 release, so we have to issue a new one to add the project URL.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015 CaT Concepts and Training GmbH\n\n\ntry:\n from setuptools import setup, find... | python | chosen |
[
{
"from": "system",
"value": "Add gnu99 build flag for linuxy builds\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"\nsetup.py file for helium-client-python\n\"\"\"\n\nfrom distutils.core import setup, Extension\n\nsourcefiles = ['src/helium_client.c',\n 'src/hel... | python | chosen |
[
{
"from": "system",
"value": "Make sure wheel is installed.\n"
},
{
"from": "human",
"value": "__author__ = 'mbach'\n\nimport multiprocessing # avoid crash on teardown\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name = 'Brandon',\n version = '0.1-dev',\n packages = find_p... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Added netaddr as an install-time requirement.\"\n\nThis reverts commit a0bf258c63ad71b7301b51dcc8e470d43b4a9c82.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\ntry:\n from setuptools import setup\n extra = dict(test_suite=\"tests.test.sui... | python | chosen |
[
{
"from": "system",
"value": "Update to Apache Airflow 1.8.1\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom os import path\nimport codecs\n\nhere = path.abspath(path.dirname(__file__))\n\nwith codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:\n long_des... | python | chosen |
[
{
"from": "system",
"value": "Add Framework::Pytest to list of classifiers\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name=\"pytest-xdist\",\n use_scm_version={'write_to': 'xdist/_version.py'},\n description='py.test xdist plugin for distributed testing'... | python | chosen |
[
{
"from": "system",
"value": "Add rarely, mostly and other alias\n"
},
{
"from": "human",
"value": "import random\n\n\nin_percentage = lambda x: random.randint(1,100) <= x\n\n\n\"\"\"\nThey've done studies, you know. 50% of the time,\nit works every time.\n\"\"\"\ndef sometimes(fn):\n \n d... | python | chosen |
[
{
"from": "system",
"value": "Revert service grid to tabular view\n"
},
{
"from": "human",
"value": "from suit.apps import DjangoSuitConfig\n\nclass MyDjangoSuitConfig(DjangoSuitConfig):\n admin_name = 'XOS'\n menu_position = 'vertical'\n menu_open_first_child = False\n menu = (\n ... | python | chosen |
[
{
"from": "system",
"value": "Clean up some of our dashboard container imports\n"
},
{
"from": "human",
"value": "from moksha.api.widgets.layout.layout import layout_js, layout_css, ui_core_js, ui_draggable_js, ui_droppable_js, ui_sortable_js\n\nfrom tw.api import Widget\nfrom tw.jquery import j... | python | chosen |
[
{
"from": "system",
"value": "Tweak logging configuration - record debug info, display info level\n"
},
{
"from": "human",
"value": "import sys\nimport logging\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nplt.ion()\n\nhandler = logging.StreamHandler(sys.stderr)\nfmt = logging.Format... | python | chosen |
[
{
"from": "system",
"value": "Fix TSV Assembler reference to Signor files\n"
},
{
"from": "human",
"value": "import os\nfrom indra.assemblers.tsv_assembler import TsvAssembler\nfrom indra.sources.signor import SignorProcessor\n\n# Get some statements from Signor\nsp = SignorProcessor()\nstmts = ... | python | chosen |
[
{
"from": "system",
"value": "Add google measurement protocol back\n"
},
{
"from": "human",
"value": "# from google_measurement_protocol import Event, report\nimport uuid\n\n\nGENDERS = {\n 'female': 'Gender Female',\n 'male': 'Gender Male'\n}\n\n\ndef log_fetch(count, gender):\n label ... | python | chosen |
[
{
"from": "system",
"value": "Add ENFORCE_PRIVACY to Travis testing settings.\n"
},
{
"from": "human",
"value": "SQLALCHEMY_DATABASE_TEST_URI = 'postgresql://postgres:@localhost/pybossa'\nGOOGLE_CLIENT_ID = ''\nGOOGLE_CLIENT_SECRET = ''\nTWITTER_CONSUMER_KEY=''\nTWITTER_CONSUMER_SECRET=''\nFACEB... | python | chosen |
[
{
"from": "system",
"value": "Mod: Remove leading comments and allow control characters directly.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nJSON-LD extractor\n\"\"\"\n\nimport json\nimport re\n\nimport lxml.etree\nimport lxml.html\n\n\nHTML_OR_JS_COMMENTLINE = re.compil... | python | chosen |
[
{
"from": "system",
"value": "Update plugin for ansible 2.0\n"
},
{
"from": "human",
"value": "import os\nimport urllib2\nimport json\nimport sys\nfrom urlparse import urljoin\n\nfrom ansible import utils, errors\nfrom ansible.utils import template\n\nclass LookupModule(object):\n\n def __ini... | python | chosen |
[
{
"from": "system",
"value": "Revert previous commit by adding missing imports\n"
},
{
"from": "human",
"value": "from .permission_checks import user_id_matches\nfrom .public import permission_check\nfrom .public import get_public_task_data\nfrom .retrieve import TaskNotFound\nfrom .retrieve imp... | python | chosen |
[
{
"from": "system",
"value": "Move CACHE_TYPE to Config; add TestingConfig\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import, unicode_literals\n\nimport json\nfrom os import path\n\n\nclass Config(object):\n cwd = path.... | python | chosen |
[
{
"from": "system",
"value": "Add test for exception to uncomparable check\n"
},
{
"from": "human",
"value": "\"\"\"Test dfw.uncomparables.\"\"\"\n\nfrom check import Check\nfrom proselint.checks.wallace import uncomparables as chk\n\n\nclass TestCheck(Check):\n\n \"\"\"The test class for dfw... | python | chosen |
[
{
"from": "system",
"value": "Hide stderr messages when detecting git dir\n"
},
{
"from": "human",
"value": "# coding=utf-8\r\n\"\"\"\r\nSome simple, generic usefull methods.\r\n\"\"\"\r\n\r\nimport subprocess\r\nimport sys\r\n\r\n\r\ndef find(seq, test):\r\n \"\"\" Return first item in seque... | python | chosen |
[
{
"from": "system",
"value": "Include timestamps in log messages\n"
},
{
"from": "human",
"value": "# Copyright (c) 2014 Wieland Hoffmann\n# License: MIT, see LICENSE for details\nimport argparse\nimport logging\n\n\nfrom . import config\nfrom .indexing import reindex\n\n\nlogger = logging.getLo... | python | chosen |
[
{
"from": "system",
"value": "Fix bad ref, forgot the __salt__ :P\n"
},
{
"from": "human",
"value": "'''\nDisk monitoring state\n\nMonitor the state of disk resources\n'''\n\ndef status(name, max=None, min=None):\n '''\n Return the current disk usage stats for the named device\n '''\n ... | python | chosen |
[
{
"from": "system",
"value": "Update the script to directly use pypi client\n\n * Faster to get to the data\n"
},
{
"from": "human",
"value": "import caniusepython3 as ciu\n\n\ndef main():\n import sys\n project = sys.argv[1]\n result = ciu.check(projects=[project])\n print(result)\n... | python | chosen |
[
{
"from": "system",
"value": "Refactor fixture to provide meaningful ids\n"
},
{
"from": "human",
"value": "import socket\n\nimport pytest\n\nimport portend\n\n\ndef socket_infos():\n\t\"\"\"\n\tGenerate addr infos for connections to localhost\n\t\"\"\"\n\thost = ''\n\tport = portend.find_availa... | python | chosen |
[
{
"from": "system",
"value": "Fix find_neighbours_2D to ignore out of bounds points\n\n... rather than 'trim' the coords, which made no sense.\n"
},
{
"from": "human",
"value": "from __future__ import division\n\nimport itertools\n\n\ndef get_offsets(span):\n \"\"\"\n Get matrix offsets fo... | python | chosen |
[
{
"from": "system",
"value": "Add form validator for icon_emoji"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom baseframe import __\nimport baseframe.forms as forms\n\n__all__ = ['LabelForm', 'LabelOptionForm']\n\n\nclass LabelForm(forms.Form):\n name = forms.StringField(\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix lv2 effect builder for travis build\n"
},
{
"from": "human",
"value": "import os\nimport json\n\nfrom pluginsmanager.model.lv2.lv2_plugin import Lv2Plugin\nfrom pluginsmanager.model.lv2.lv2_effect import Lv2Effect\n\n\nclass Lv2EffectBuilder(object):\n \"\"\"... | python | chosen |
[
{
"from": "system",
"value": "Bump version to 1.4.16 for previous merge\n"
},
{
"from": "human",
"value": "__all__ = [\n '__title__',\n '__summary__',\n '__uri__',\n '__version__',\n '__author__',\n '__email__',\n '__license__',\n '__copyright__'\n]\n\n__title__ = 'clouda... | python | chosen |
[
{
"from": "system",
"value": "Add comment show test usage from console.\n"
},
{
"from": "human",
"value": "import unittest\nfrom tvmazereader import main\n\nclass TestMethods(unittest.TestCase):\n \n def test_readerMain(self):\n data = main()\n self.assertEqual(len(data),2)\n... | python | chosen |
[
{
"from": "system",
"value": "Add user data export for teams"
},
{
"from": "human",
"value": "from django.apps import AppConfig\nfrom django.urls import reverse\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass TeamConfig(AppConfig):\n name = 'f... | python | chosen |
[
{
"from": "system",
"value": "Make conformance test 55 compatible with Python 3\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n# Toy program to search inverted index and print out each line the term\n# appears.\n\nimport sys\n\nmainfile = sys.argv[1]\nindexfile = sys.argv[1] + \".id... | python | chosen |
[
{
"from": "system",
"value": "Allow passing extra kwargs into register decorator\n\nIn order to support extra key-word arguments in add_url_rule method, e.g. subdomain."
},
{
"from": "human",
"value": "from flask import Blueprint\nfrom functools import wraps\nfrom flask_mongorest.methods import ... | python | chosen |
[
{
"from": "system",
"value": "Prepare next development cycle 3.1.0a1\n"
},
{
"from": "human",
"value": "# Copyright (C) 2015 UCSC Computational Genomics Lab\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.... | python | chosen |
[
{
"from": "system",
"value": "Set PYTHONPATH and use sys.executable\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_cookiecutter_invocation\n----------------------------\n\nTests to make sure that cookiecutter can be called from the cli without\nusing the entry point s... | python | chosen |
[
{
"from": "system",
"value": "Add finally block for deletion of temp file\n"
},
{
"from": "human",
"value": "import sys\nimport tempfile\nimport os\nfrom subprocess import call\nimport argparse\n\n\nguide = \"\"\"# Remove or modify lines.\n# Lines that are prefixed with the # character are filte... | python | chosen |
[
{
"from": "system",
"value": "Support loading with a specified username so that we can test more easily\n\nExample timelines that can be used with the data are at:\nhttps://github.com/shankari/data-collection-eval/tree/master/results_dec_2015/ucb.sdb.android.1/timeseries\n\nNote that timeline dumps contain ... | python | chosen |
[
{
"from": "system",
"value": "Add test to check that we do not overwrite input file\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom pikepdf import Pdf\nfrom io import BytesIO\n\n\n@pytest.fixture\ndef sandwich(resources):\n # Has XMP, docinfo, <?adobe-xap-filters esc=\"CRLF\"?>, shor... | python | chosen |
[
{
"from": "system",
"value": "Update TEXT_CHARACTER_LIMIT from 320 to 640 in ButtonTemplate\n"
},
{
"from": "human",
"value": "from copy import deepcopy as copy\n\nfrom text import TextTemplate\nTextTemplate.get_text = lambda self: self.get_message()['text']\n\nTEXT_CHARACTER_LIMIT = 320\n\ntemp... | python | chosen |
[
{
"from": "system",
"value": "Add version number to parameter meta data\n"
},
{
"from": "human",
"value": "from xml.dom.minidom import getDOMImplementation\nimport codecs\n\nclass XMLOutput():\n def __init__(self, groups):\n impl = getDOMImplementation()\n xml_document = impl.cr... | python | chosen |
[
{
"from": "system",
"value": "Use class methods for unittests\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom app import create_app, db\nfrom app.utils import get_or_create\nfrom app.models import User\n\n\nclass TestUtils(unittest.TestCase):\n def setUp(self):\n self.app = ... | python | chosen |
[
{
"from": "system",
"value": "Remove load_config() from the tistory module\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nimport json\nimport os\nfrom shlex import quote as shlex_quote\n\nfrom tistory.api import Tistory, TistoryError\nfrom tistory.auth import TistoryOAuth2\n\n\ndef... | python | chosen |
[
{
"from": "system",
"value": "Replace function calls with set literals\n"
},
{
"from": "human",
"value": "import hashlib\n\n\nclass Algorithms(object):\n NONE = 'none'\n HS256 = 'HS256'\n HS384 = 'HS384'\n HS512 = 'HS512'\n RS256 = 'RS256'\n RS384 = 'RS384'\n RS512 = 'RS512'... | python | chosen |
[
{
"from": "system",
"value": "Fix an error of passing unicode literals to cupy\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom builtins import int\nfro... | python | chosen |
[
{
"from": "system",
"value": "Add word class converter to URL map\n"
},
{
"from": "human",
"value": "from flask import Flask\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_login import LoginManager\nfrom flask_oauthlib.client import OAuth\n\nfrom config import config\n\ndb = SQLAlchemy()\n... | python | chosen |
[
{
"from": "system",
"value": "Drop the unicode skull-and-crossbones from the project name. Causes problems too easily.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Flask application default config:\n# http://flask.pocoo.org/docs/config/#configuring-from... | python | chosen |
[
{
"from": "system",
"value": "Add object creation methods for Message\n"
},
{
"from": "human",
"value": "import json\n\n\nclass Message:\n def __init__(self, sender, message_type, content=None):\n self.message = {\n 'sender': sender,\n 'type': message_type,\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix bug with timestamp_to_datetime when value is not a number\n"
},
{
"from": "human",
"value": "from django import template\nfrom django.core import urlresolvers\nimport datetime\nimport time\n\nregister = template.Library()\n\n\n# Adapted from: http://blog.scur.pl... | python | chosen |
[
{
"from": "system",
"value": "8: Create documentation of DataSource Settings \n\nTask-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8"
},
{
"from": "human",
"value": "######\n# Check ExId (GUID) by Email through JDBC\n#\n# Author: Christoph Stoettner\n# Mail: christoph.... | 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# Create a file (html or markdown) with the output of\n# - JVMHeap\n# - LogFiles\n# - Ports\n# ... | python | chosen |
[
{
"from": "system",
"value": "Add logic for availability population\n"
},
{
"from": "human",
"value": "import random\nimport csv\n\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom portal.models import Location\n\n\nclass Command(BaseCommand):\n \"\"\"\n \"\"\"\n\n... | python | chosen |
[
{
"from": "system",
"value": "Remove the distance from the cleaned trip\n\nSince it is already in the base class (trip) and has been there since the very\nfirst wrapper class commit.\n\nhttps://github.com/e-mission/e-mission-server/commit/c4251f5de5dc65f0ddd458dc909c111ddec67153\n"
},
{
"from": "hum... | python | chosen |
[
{
"from": "system",
"value": "Use memory for notebook notary file.\n\nWorkaround possible file integrity issues.\n"
},
{
"from": "human",
"value": "# Disable history manager, we don't really use it\n# and by default it puts an sqlite file on NFS, which is not something we wanna do\nc.Historymana... | python | chosen |
[
{
"from": "system",
"value": "Change from unicode to string for domain\n\nDNS entries won't contain unicode characters, and by default are ASCII.\n"
},
{
"from": "human",
"value": "# File: Domain.py\n# Author: Bert JW Regeer <bertjw@regeer.org>\n# Created: 2013-09-02\n\nfrom meta import Base\n\n... | python | chosen |
[
{
"from": "system",
"value": "Fix Libdoc API unit tests on Python 2\n"
},
{
"from": "human",
"value": "from io import StringIO\nimport sys\nimport tempfile\nimport unittest\n\nfrom robot import libdoc\nfrom robot.utils.asserts import assert_equal\n\n\nclass TestLibdoc(unittest.TestCase):\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Use 'range' rather than 'xrange' for Python 3 compatibility.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# coding=utf-8\n\"\"\"\nBalanced ternary binary encoding\n============\n\nTools for encoding balanced ternary data into binary formats and back aga... | python | chosen |
[
{
"from": "system",
"value": "Complete reversed vowel pos sol\n"
},
{
"from": "human",
"value": "\"\"\"Leetcode 345. Reverse Vowels of a String\nEasy\n\nURL: https://leetcode.com/problems/reverse-vowels-of-a-string/\n\nWrite a function that takes a string as input and reverse only the vowels of\... | python | chosen |
[
{
"from": "system",
"value": "Fix an error when number of predictor columns is less than max_features.\n"
},
{
"from": "human",
"value": "# import numpy\nfrom sklearn.ensemble import RandomForestClassifier as RandomForest\nfrom sklearn.preprocessing import Imputer\nfrom numpy import isnan\nimpor... | python | chosen |
[
{
"from": "system",
"value": "feat: Delete condition of type in event as it should always be true\n"
},
{
"from": "human",
"value": "import time\nimport linkatos.parser as parser\nimport linkatos.printer as printer\nimport linkatos.firebase as fb\nimport linkatos.reaction as react\n\n\ndef is_em... | python | chosen |
[
{
"from": "system",
"value": "Add dummy SECRET_KEY for development (and Travis).\n"
},
{
"from": "human",
"value": "import os\n\nroot = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nDB_PATH = os.path.join(root, 'mcbench.sqlite')\nDATA_ROOT = os.path.expanduser('~/mcbench-benchmark... | python | chosen |
[
{
"from": "system",
"value": "Remove redundant ugettext_lazy from non-text labels\n"
},
{
"from": "human",
"value": "from django import forms\nfrom django.core import validators\nfrom django.forms.widgets import TextInput\nfrom django.utils.translation import ugettext_lazy\n\n\nclass URLOrAbsolu... | python | chosen |
[
{
"from": "system",
"value": "Update warehouse as per master_name if master_name exists\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: GNU General Public License v3. See license.txt\n\nfrom __future__ import unicode_literals\ni... | python | chosen |
[
{
"from": "system",
"value": "Add multi_select in the DateEditor params for Custom editors.\n"
},
{
"from": "human",
"value": "#------------------------------------------------------------------------------\n#\n# Copyright (c) 2008, Enthought, Inc.\n# All rights reserved.\n# \n# This softwar... | python | chosen |
[
{
"from": "system",
"value": "Fix the image masking in HaralickTexture\n"
},
{
"from": "human",
"value": "from . import Measurement\nimport feature_extraction.util.cleanup as cleanup\nfrom skimage.morphology import binary_erosion, disk\n\nclass HaralickTexture(Measurement):\n\tdefault_options = ... | python | chosen |
[
{
"from": "system",
"value": "Select popular pbs first instead of only closest"
},
{
"from": "human",
"value": "from django.contrib.gis.measure import D\nfrom django.contrib.gis.db.models.functions import Distance\n\nfrom froide.publicbody.models import PublicBody\n\n\nfrom .amenity import Ameni... | python | chosen |
[
{
"from": "system",
"value": "Add metadata and resource distinction in DataManager\n"
},
{
"from": "human",
"value": "import logging\n\nfrom collections import OrderedDict\nfrom egpackager.datasources import GspreadDataSource, RasterDataSource\n\n\nclass DataManager(object):\n\n def __init__(... | python | chosen |
[
{
"from": "system",
"value": "gn: Fix issue with finding llvm when using python3\n\nWith python3, subprocess output is a byte sequence. This needs to be\ndecoded to string so that the string functions work. Fix it so we can\nfind LLVM when building perfetto.\n\nAlso fix 'print' operator which is a function ... | python | chosen |
[
{
"from": "system",
"value": "Add preprocessing steps for mat input\n"
},
{
"from": "human",
"value": "from get_data_from_source import GetDataFromSource\nfrom regularized_log_reg import RegularizedLogReg\nimport matplotlib.pyplot as plt\n\nclass AdvancedLogReg(RegularizedLogReg):\n\tdef test_so... | python | chosen |
[
{
"from": "human",
"value": "Add class validator for CURP field\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\n\nfrom django.core import validators\nfrom django.utils.deconstruct import deconstructible\nfrom django.utils.translation import ugettext_... | python | chosen |
[
{
"from": "system",
"value": "Use more turns in test_sickle\n\nThe weird bugs only showed up late\n"
},
{
"from": "human",
"value": "from LiSE.examples import college, kobold, polygons, sickle\n\n\ndef test_college(engy):\n college.install(engy)\n engy.turn = 10 # wake up the students\n ... | python | chosen |
[
{
"from": "system",
"value": "[db] Fix max retake migration file\n"
},
{
"from": "human",
"value": "\"\"\"add max retake parameter\n\nRevision ID: 5a291251823c\nRevises: 4095103c7d01\nCreate Date: 2022-06-29 10:56:13.556495\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\nimport sqlal... | python | chosen |
[
{
"from": "system",
"value": "Add missing validate method to GoogleAppsPasswordValidator\n\nDjango complains when updating the password:\n\n 'GoogleAppsPasswordValidator' object has no attribute 'validate'\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright (c) Polytechniq... | python | chosen |
[
{
"from": "system",
"value": "Test str repr of exception\n"
},
{
"from": "human",
"value": "# Testing use of cpl_errs\n\nimport pytest\n\nimport rasterio\nfrom rasterio.errors import RasterioIOError\n\n\ndef test_io_error(tmpdir):\n with pytest.raises(RasterioIOError) as exc_info:\n ra... | python | chosen |
[
{
"from": "system",
"value": "Update the contenttypes before trying to access them.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django import VERSION as DJANGO_VERSION\nfrom django.db import migrations\n\n\ndef create_indepth_page(a... | python | chosen |
[
{
"from": "system",
"value": "Adjust network_settings config format for salt 2018.3.0.\n\nBefore this release the format did not use the 'interfaces' key.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n'''\nBeacon to monitor default network adapter setting changes on Linux\n'''\n\nf... | python | chosen |
[
{
"from": "system",
"value": "Fix error code on non existent page\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python2\nfrom testlib import *\n\nset_port(\"80\")\nset_server(\"us.bittoll.com\")\n\ndef test_page_error():\n r = apicall(\"nonexistant\", \"hi\")\n assert \"error\" in r\n ... | python | chosen |
[
{
"from": "system",
"value": "Make sure the opened workflow file gets closed after it's been loaded\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport argparse\nfrom bioblend import galaxy\nimport json\n\n\ndef main():\n \"\"\"\n This script uses bioblend to import .ga wo... | python | chosen |
[
{
"from": "system",
"value": "Disable query string auth for django compressor.\n"
},
{
"from": "human",
"value": "from firecares.settings.base import *\n\nINSTALLED_APPS = (\n 'django_statsd',\n) + INSTALLED_APPS\n\nSTATSD_HOST = 'stats.garnertb.com'\nSTATSD_PREFIX = 'firecares'\n\nSTATSD_PAT... | python | chosen |
[
{
"from": "system",
"value": "Remove unnecessary imports for Unity module\n"
},
{
"from": "human",
"value": "import gi\nimport time\n\ngi.require_version('Unity', '7.0')\nfrom gi.repository import Unity, GObject\n\n\ndef update_counter(count):\n launcher = Unity.LauncherEntry.get_for_desktop_... | python | chosen |
[
{
"from": "system",
"value": "Reset Hecuba config when setUp a test\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom storage.api import getByID\nfrom hecuba.hdict import StorageDict\n\n\nclass ApiTestSDict(StorageDict):\n '''\n @TypeSpec <<key:int>, value:double>\n '''\n\nclas... | python | chosen |
[
{
"from": "system",
"value": "Create execCmd function and use\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\nimport os.path\nimport re\nimport subprocess\nimport sys\n\n### CONFIGURE THESE PATHS ###\nbinaryPath = \"/home/opensim/opensim/opensim-current/bin\"\npidPath = \"/tmp/OpenSim.pi... | python | chosen |
[
{
"from": "system",
"value": "Fix call to HTTP404 now it is a function.\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n\"\"\"\nAragog Router Decorator\n-----------------------\n\nConvert any function into a WSGI endpoint with a simple decorator.\n\"\"\"\n\nfrom aragog.wsgi import get... | python | chosen |
[
{
"from": "system",
"value": "Add type field to source\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n#\n# Copyright 2016 BMC Software, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# Y... | python | chosen |
[
{
"from": "system",
"value": "Add some debugging for the worker generation\n"
},
{
"from": "human",
"value": "from bitHopper.Website import app, flask\nimport btcnet_info\nimport bitHopper.Configuration.Workers\n \n@app.route(\"/worker\", methods=['POST', 'GET'])\ndef worker():\n\n #Check ... | python | chosen |
[
{
"from": "system",
"value": "Add rasterization microbenchmark for silk\n\nAdd rasterize_and_record_micro_key_silk_cases for keeping track of\nrasterization and recording performance of silk content. This mirrors\nthe existing rasterize_and_record_key_silk_cases benchmark and will\npotentially allow us to r... | python | chosen |
[
{
"from": "system",
"value": "Set path.py to a fixed version"
},
{
"from": "human",
"value": "########\n# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance ... | python | chosen |
[
{
"from": "system",
"value": "Read version without importing package\n"
},
{
"from": "human",
"value": "import setuptools\n\nfrom valohai_yaml import __version__\n\ndev_dependencies = [\n 'flake8',\n 'isort',\n 'pydocstyle',\n 'pytest-cov',\n]\n\nif __name__ == '__main__':\n setup... | python | chosen |
[
{
"from": "system",
"value": "Add drawing centroids with inverted colors\n"
},
{
"from": "human",
"value": "import matplotlib.pyplot as plt\nimport numpy as np\n\n\ndef display_result(vectors, clusters):\n colors = [np.random.rand(3, 1) for i in range(len(clusters))]\n for cluster_index, (... | python | chosen |
[
{
"from": "system",
"value": "Remove some cruft that was accidentally pushed\n\nChange-Id: If75577316398c9d02230882766463f00aa13efd9\n"
},
{
"from": "human",
"value": "#\n# ========================================================\n# Copyright (c) 2012 Whamcloud, Inc. All rights reserved.\n# ===... | python | chosen |
[
{
"from": "system",
"value": "Return exception details when failing to load link\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom __future__ import division\nimport requests\nimport json\nimport sys\nfrom requests.exceptions import SSLError, InvalidSchema, ConnectionError\n\ndef ... | python | chosen |
[
{
"from": "system",
"value": "Add test case for SparkContext.emptyRDD()\n"
},
{
"from": "human",
"value": "import unittest\n\nfrom bermann.spark_context import SparkContext\n\n\nclass TestSparkContext(unittest.TestCase):\n\n def test_parallelize_with_list_input(self):\n sc = SparkConte... | python | chosen |
[
{
"from": "system",
"value": "Add setFreq/setColor methods for FlashingBox\n"
},
{
"from": "human",
"value": "from PyQt5.QtWidgets import QOpenGLWidget\nfrom PyQt5.QtCore import Qt\nfrom PyQt5.QtGui import QPainter, QBrush\n\nclass FlashingBox(QOpenGLWidget):\n\n def __init__(self, parent, freq... | python | chosen |
[
{
"from": "system",
"value": "Change package name to tempodb\n"
},
{
"from": "human",
"value": "\n#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\ntempodb/setup.py\n\nCopyright (c) 2012 TempoDB Inc. All rights reserved.\n\"\"\"\n\nimport os\nfrom setuptools import setup\n\nimport tempodb\n\n\nd... | python | chosen |
[
{
"from": "system",
"value": "Update minimum babel version to >=2.3.\n\nBabel 1.0 is now 3 years obsolete. Numerous critical bug fixes are\nincluded in the 1.0 - 2.3 range.\n"
},
{
"from": "human",
"value": "\"\"\"\nFlask-Babel\n-----------\n\nAdds i18n/l10n support to Flask applications with th... | python | chosen |
[
{
"from": "system",
"value": "Add pytest to surveymonkey dependencies\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nwith open('README.rst') as readme_file:\n readme = readme_file.read()\n\nrequirements = [\n 'furl==0.5.... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.