conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Disable redirect interception in testing mode\n"
},
{
"from": "human",
"value": "SQLALCHEMY_DATABASE_URI = \"postgresql://jdejoode:isabelle@localhost/annotation_dev\"\nDEBUG = False\n# when testing = True, the login_required decorator is disabled.\nTESTING = False\n... | python | chosen |
[
{
"from": "system",
"value": "Remove a redundant line from get_class\n"
},
{
"from": "human",
"value": "\"\"\"\nThis module adds several functions for interactive source code inspection.\n\"\"\"\n\nfrom __future__ import print_function, division\n\nimport inspect\n\n\ndef source(object):\n \"... | python | chosen |
[
{
"from": "system",
"value": "Move matplotlib import into function\n\nI think importing it at the top-level causes a conflict with our global matplotlib backend settings\n"
},
{
"from": "human",
"value": "# Color palette returns an array of colors (rainbow)\n\nfrom matplotlib import pyplot as pl... | python | chosen |
[
{
"from": "system",
"value": "Enable async update by default when using a WSGI application.\n"
},
{
"from": "human",
"value": "import os\nimport sys\nimport logging\nimport logging.handlers\nfrom wikked.wiki import WikiParameters\n\n\ndef get_wsgi_app(wiki_root, log_file=None):\n os.chdir(wik... | python | chosen |
[
{
"from": "system",
"value": "Add default_state to the magicbot exports\n"
},
{
"from": "human",
"value": "\nfrom .magicrobot import MagicRobot\nfrom .magic_tunable import tunable\nfrom .magic_reset import will_reset_to\n\nfrom .state_machine import AutonomousStateMachine, StateMachine, state, t... | python | chosen |
[
{
"from": "system",
"value": "Add chech for short passwords\n"
},
{
"from": "human",
"value": "from flask import Flask, jsonify, request\nfrom modals.modals import User, Bucket, Item\nfrom api import create_app, db\nfrom validate_email import validate_email\napp = create_app('DevelopmentEnv')\n\... | python | chosen |
[
{
"from": "system",
"value": "prjxray: Add INOUT to direction enum.\n\nINOUT is found on the PS7 interface on the Zynq.\n\nSigned-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>\n"
},
{
"from": "human",
"value": "\"\"\" Description of a site type \"\"\"\n\nfrom col... | python | chosen |
[
{
"from": "system",
"value": "Remove the NullHandler patch because we don't support any python versions that need it\n"
},
{
"from": "human",
"value": "# Set up a null roothandler for our logging system\n\nimport logging\ntry: # Python 2.7+\n from logging import NullHandler\nexcept ImportErr... | python | chosen |
[
{
"from": "system",
"value": "Add support for --token in login command\n\nThis can be used when you already have the token and do not\nwant to open the browser.\n"
},
{
"from": "human",
"value": "import click\nimport webbrowser\n\nimport floyd\nfrom floyd.client.auth import AuthClient\nfrom floy... | python | chosen |
[
{
"from": "system",
"value": "Fix bug where all data points are same height\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport argparse\n\nticks = ('▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')\n\ndef scale_data(data):\n m = min(data)\n n = (max(d... | python | chosen |
[
{
"from": "system",
"value": "Use if-elif instead of multiple if statements to check types\n\nUse if-elif instead of multiple if statements to check types when converting from MongoDB BaseDict and BaseList to python dict and list types. Once the value is converted, use another if-elif block to recursively e... | python | chosen |
[
{
"from": "human",
"value": "Add license to Firmant package.\n"
},
{
"from": "gpt",
"value": "# Copyright (c) 2010, Robert Escriva\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following condition... | python | chosen |
[
{
"from": "system",
"value": "Support multiple Flask apps on the same Aggregator instance\n"
},
{
"from": "human",
"value": "import json\n\nfrom flask import request, Response\nfrom werkzeug.exceptions import BadRequest\nfrom werkzeug.test import EnvironBuilder\n\n\nclass Aggregator(object):\n\n... | python | chosen |
[
{
"from": "system",
"value": "Add WorkSpaces::ConnectionAlias per 2020-10-01 changes\n"
},
{
"from": "human",
"value": "# Copyright (c) 2015, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators... | python | chosen |
[
{
"from": "system",
"value": "Set logger class in init\n"
},
{
"from": "human",
"value": "from .cpnest import CPNest\n\n__version__ = '0.9.8'\n\n__all__ = ['model',\n 'NestedSampling',\n 'parameter',\n 'sampler',\n 'cpnest',\n 'nest2pos',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add py solution for 654. Maximum Binary Tree\n\n654. Maximum Binary Tree: https://leetcode.com/problems/maximum-binary-tree/\n\n Approach 2:\n 1. Use [Sparse Table](https://wcipeg.com/wiki/Range_minimum_query#Sparse_table)\n to quickly lookup maximum and its index\n ... | python | chosen |
[
{
"from": "system",
"value": "Make backend names more flexible.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom pyfr.backends.base import Backend as BaseBackend\nfrom pyfr.backends.cuda import CudaBackend\nfrom pyfr.util import subclass_map\n\n\ndef get_backend(name, cfg):\n ... | python | chosen |
[
{
"from": "system",
"value": "Fix tests for visit_Attribute on 2.5/PyPy\n"
},
{
"from": "human",
"value": "from attest import Tests, assert_hook\nfrom attest.hook import ExpressionEvaluator\n\n\nsuite = Tests()\n\n@suite.test\ndef eval():\n value = 1 + 1\n valgen = (v for v in [value])\n\n... | python | chosen |
[
{
"from": "system",
"value": "Add try-catch if no organism allowed\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport argparse\nimport json\n\nfrom webapollo import AssertUser, WAAuth, WebApolloInstance, accessible_organisms, PasswordGenerat... | python | chosen |
[
{
"from": "system",
"value": "Update parse so it doesn't return anything, just stores objects locally. Lots of tidying\n"
},
{
"from": "human",
"value": "class Backend(object):\n def __init__(self, plugin, params):\n self._plugin = plugin\n self._params = params\n self._... | python | chosen |
[
{
"from": "system",
"value": "Test type of IntervalSet factory output\n"
},
{
"from": "human",
"value": "from cyinterval.cyinterval import Interval, IntervalSet\nfrom nose.tools import assert_equal\n\ndef test_interval_set_construction():\n interval_set = IntervalSet(Interval(0.,1.), Interval... | python | chosen |
[
{
"from": "system",
"value": "PY32: Add encode() to ensure that python 3.2 gets bytes to unhexlify()\n"
},
{
"from": "human",
"value": "import binascii\n\nfrom pandas import read_sql\nimport shapely.wkb\n\n\nfrom geopandas import GeoSeries, GeoDataFrame\n\ndef read_postgis(sql, con, geom_col='ge... | python | chosen |
[
{
"from": "system",
"value": "Add description in test addons to make pylint happier\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n# Copyright 2017 Camptocamp SA\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)\n\n{'name': 'Connector Tests',\n 'summary': 'Automat... | python | chosen |
[
{
"from": "system",
"value": "Fix misspelling from \"applicatin\" to \"application\".\n\nChange-Id: I3c4e455a10deae0d719fdc8534049abf8faba954\n"
},
{
"from": "human",
"value": "# -*- encoding: utf-8 -*-\n#\n# Copyright © 2012 New Dream Network, LLC (DreamHost)\n#\n# Licensed under the Apache Lic... | python | chosen |
[
{
"from": "system",
"value": "Fix missing create=True attribute in docker tests\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport mock\n\nfrom pre_commit.languages import docker\nfrom pre_commit.util import CalledProcessE... | python | chosen |
[
{
"from": "system",
"value": "Fix typo in trove classifiers\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\n__author__ = \"James King\"\n__email__ = \"james@agentultra.com\"\n__version__ = \"0.1.1\"\n__license__ = \"MIT\"\n__description__ = \"\"\"\nA library o... | python | chosen |
[
{
"from": "system",
"value": "Add support for Python 2.7\n"
},
{
"from": "human",
"value": "import textwrap\nimport sys\nimport subprocess\n\n\ndef test_pkg_imported(tmpdir):\n\t\"\"\"\n\tCreate a script that loads cython and ensure it runs.\n\t\"\"\"\n\tbody = textwrap.dedent(\"\"\"\n\t\timport... | python | chosen |
[
{
"from": "system",
"value": "Update requests requirement from <2.25,>=2.4.2 to >=2.4.2,<2.26\n\nUpdates the requirements on [requests](https://github.com/psf/requests) to permit the latest version.\n- [Release notes](https://github.com/psf/requests/releases)\n- [Changelog](https://github.com/psf/requests/b... | python | chosen |
[
{
"from": "system",
"value": "Remove geopandas - installing geos.dll and gdal is too painful on Windows/Anaconda\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name = \"biofloat\",\n version = \"0.3.1\",\n packages = find_packages(),\n requ... | python | chosen |
[
{
"from": "system",
"value": "Make private checkbox not required\n"
},
{
"from": "human",
"value": "from django import forms\n\nclass LeagueForm(forms.Form):\n league_name = forms.CharField(label = \"Group name\", max_length = 30)\n max_size = forms.IntegerField(label = \"Maximum participa... | python | chosen |
[
{
"from": "system",
"value": "Add: Write CHANGES at the end of README in PyPI\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom wsinfo import __version__\n\nwith open(\"README.rst\", \"r\") as f:\n long_description = f.read()\n\nsetup(name=\"wsinfo\",\n packages=[\"ws... | python | chosen |
[
{
"from": "system",
"value": "Use MultiFernet provided by cryptography lib\n\nCloses #9\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, absolute_import\n\nimport os\nfrom cryptography.fernet import Fernet, InvalidToken\n\nfernet = Fernet(os.en... | python | chosen |
[
{
"from": "system",
"value": "Comment on how to run migrations\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nfrom flask.ext.script import Server, Manager, Shell\nfrom flask.ext.evolution import Evolution\n\nfrom example import app, db, models\n\n\nevolution = Evolution(app)\n\nmanage... | python | chosen |
[
{
"from": "system",
"value": "Include README as long description.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\n\nsetup(\n name='Weitersager',\n version='0.1',\n description='A proxy to forward messages received via HTTP to to IRC',\n a... | python | chosen |
[
{
"from": "system",
"value": "Add serenata_toolbox module to packages\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nREPO_URL = 'http://github.com/datasciencebr/serenata-toolbox'\n\n\nsetup(\n author='Serenata de Amor',\n author_email='op.serenatadeamor@gmail.com',\n ... | python | chosen |
[
{
"from": "system",
"value": "Include py.typed marker in package\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name='ansi',\n version='0.3.0',\n description='ANSI cursor movement and graphics',\n author='Wijnand Modderman-Len... | python | chosen |
[
{
"from": "system",
"value": "Add missing test Mako test dependency.\n"
},
{
"from": "human",
"value": "import os\nimport sys\nimport re\n\nfrom setuptools import setup, find_packages\n\nv = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))\nVERSION = re.compile(r\... | python | chosen |
[
{
"from": "system",
"value": "Change Sphinx dependency to 1.1\n\nAccording to @nyergler 1.1 should be sufficient, I hadn't thought to\r\ncheck travis or tox's conf files for the information."
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport os\n\nhere = os.path... | python | chosen |
[
{
"from": "system",
"value": "Add test deps on nose, mock.\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nimport sys\nsys.path.insert(0, 'src')\n\nfrom rosdep2 import __version__\n\nsetup(name='rosdep',\n version= __version__,\n packages=['rosdep2', 'rosdep2.platfor... | python | chosen |
[
{
"from": "system",
"value": "Allow easy local exec of integration suite via eg -H\n"
},
{
"from": "human",
"value": "from fabric.api import env\n\n\nclass Integration(object):\n def setup(self):\n env.host_string = \"127.0.0.1\"\n"
},
{
"from": "gpt",
"value": "from fabric... | python | chosen |
[
{
"from": "system",
"value": "Add pypi description that's shorter than README.rst.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(\n name='vertigo',\n version='0.1.2',\n license='BSD',\n author=\"Daniel Lepage\",\n author_emai... | python | chosen |
[
{
"from": "system",
"value": "Change url to point to github"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\ndef read(name):\n return open(os.path.join(os.path.dirname(__file__), name), 'r').read()\n\nsetup(\n name=\"kitsu.http\",\n version=\"0.0.7\",\n des... | python | chosen |
[
{
"from": "system",
"value": "Add subprocess32 as package dependency"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='pycalico',\n\n # Don't need a version until we publish to PIP or other forum.\n # version='0.0.0',\n\n description='A Py... | python | chosen |
[
{
"from": "system",
"value": "Update Development Status -> Stable\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\nfrom aldryn_categories import __version__\n\n# git tag '[version]'\n# git push --tags origin master\n# python setup.py sdis... | python | chosen |
[
{
"from": "system",
"value": "Include description and long description (README) in package metadata\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"taxii-client\",\n version=\"0.0.2\",\n url=\"https://github.com/Intelworks/taxii-client/\... | python | chosen |
[
{
"from": "system",
"value": "Add 'jump consistent hash' keyword.\n"
},
{
"from": "human",
"value": "from __future__ import print_function\n\nimport sys\n\nfrom setuptools import setup\n\n\nif sys.version_info < (3, 2):\n print('ERROR: jump-consistent-hash requires Python version 3.2 or newer... | python | chosen |
[
{
"from": "system",
"value": "Add paste requirement for testing (for web.py)\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\nrequired_modules = [\n\t\"simplejson\",\n\t\"web.py\",\n\t]\n\nreadme = \"\"\"\nWeb.py Helpers\n\"\"\"\n\nsetup(... | python | chosen |
[
{
"from": "system",
"value": "Remove useless requirement on Python 3.2+\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport io\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='django-pipeline',\n version='1.5.2',\n description='Pipeline is an asset packa... | python | chosen |
[
{
"from": "system",
"value": "Add requires for development use, at least\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\n# Keeping all Python code for package in src directory\n\nsetup(name='quantitation',\n url='http://www.awblocker.com',\n version='0.1',\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove astpp from installation modules\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\nsetup(\n name='flaws',\n version='0.0.1',\n author='Alexander Schepanovski',\n author_email='suor.web@gmail.com',\n\n description='Finds flaws in... | python | chosen |
[
{
"from": "system",
"value": "Update decorator to work with content_type relation\n"
},
{
"from": "human",
"value": "from django.shortcuts import redirect, get_object_or_404\nfrom django.contrib import messages\n\nfrom .models import Course, Enrollment\n\n\ndef enrollment_required(view_func):\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove download URL since Github doesn't get his act together. Damnit\n\ncommitter: Jannis Leidel <jannis@leidel.info>\n\n--HG--\nextra : convert_revision : 410200249f2c4981c9e0e8e5cf9334b0e17ec3d4\n"
},
{
"from": "human",
"value": "from distutils.core import setup\... | python | chosen |
[
{
"from": "system",
"value": "Add isort as a development requirement\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n\nsetup(\n name='polygraph',\n version='0.1.0',\n description='Python library for defining GraphQL schemas',\n url='https://github.com/yen223/polygr... | python | chosen |
[
{
"from": "system",
"value": "Add PLY as a dependency.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\n\nfrom setuptools import setup, find_packages\n\nsetup(\n name='ppp_cas',\n version='0.3.2',\n description='CAS plugin for PPP',\n url='https://github.com/ProjetPP',\n ... | python | chosen |
[
{
"from": "system",
"value": "Upgrade dependency prompt-toolkit to ==1.0\n"
},
{
"from": "human",
"value": "import os\nfrom setuptools import setup\n\nfrom withtool import __version__\n\n\ndef read(fname):\n path = os.path.join(os.path.dirname(__file__), fname)\n with open(path, encoding='... | python | chosen |
[
{
"from": "system",
"value": "Use the redistribution of (now discontinued) mimic as gmcquillan-mimic.\n"
},
{
"from": "human",
"value": "import multiprocessing\n\nfrom setuptools import setup, find_packages\n\nrequirements = []\nwith open('requirements.txt', 'r') as in_:\n requirements = in_.... | python | chosen |
[
{
"from": "system",
"value": "Prepare for development of next release\n"
},
{
"from": "human",
"value": "'''\nXBMC Addon Manager\n------------------\n\nA CLI utility for searching and listing XBMC Addon Repositories.\n\nSetup\n`````\n\n::\n\n $ pip install xam\n $ xam --help\n\nLinks\n````... | python | chosen |
[
{
"from": "system",
"value": "Revert \"Add hypothesis as test requirement.\"\n\nThis reverts commit 7e340017f4bb0a8a99219f3896071ab07a017f4f.\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\nimport unittest\nimport doctest\n\n# Read in the version number\nexec(open... | python | chosen |
[
{
"from": "system",
"value": "Make small molecules read only\n"
},
{
"from": "human",
"value": "from unittest import TestCase\nimport unittest.mock\nfrom molecupy.structures import Model, AtomicStructure, SmallMolecule\n\nclass ModelTest(TestCase):\n\n def setUp(self):\n self.small_mol... | python | chosen |
[
{
"from": "system",
"value": "Make imports work when in .sublime-package\n"
},
{
"from": "human",
"value": "import os\r\nimport sys\r\n\r\ntry: # ST3\r\n from .Lib.sublime_lib.path import get_package_name, get_package_path\r\n\r\n PLUGIN_NAME = get_package_name()\r\n libpath = os.path.... | python | chosen |
[
{
"from": "system",
"value": ":alien: Change Cache Provider Since Flask upgraded\n\nSee: https://github.com/thadeusb/flask-cache/issues/188\n"
},
{
"from": "human",
"value": "# !/usr/bin/python3\n# -*- coding: utf-8 -*-\n# Copyright (c) 2017-2020 Rhilip <rhilipruan@gmail.com>\n\nimport pymysql\n... | python | chosen |
[
{
"from": "system",
"value": "Rename integration tests task for consistency w/ other projs\n"
},
{
"from": "human",
"value": "from invocations import docs\nfrom invocations.testing import test\nfrom invocations.packaging import release\n\nfrom invoke import Collection\nfrom invoke import run\nfr... | python | chosen |
[
{
"from": "system",
"value": "Modify path to use __file__\n"
},
{
"from": "human",
"value": "#! /usr/bin/env python\n# coding:utf-8\n\n\n# the number of loop for train IBM Model 2\nloop_count = 10\nphrase_model_file = \"./phrase.model\"\nbigram_model_file = \"./bigram.model\"\n\nif __name__ == '... | python | chosen |
[
{
"from": "system",
"value": "Change assertIn to assert_ for python 2.6 support\n"
},
{
"from": "human",
"value": "import unittest\n\nimport fiona\nfrom shapely.geometry import Point\nimport geopandas as gpd\n\nfrom geopandas.geocode import geocode, _prepare_geocode_result\n\nclass TestGeocode(u... | python | chosen |
[
{
"from": "system",
"value": "Use IP and PORT environment variables if set\n"
},
{
"from": "human",
"value": "bind = '127.0.0.1:8001'\nworkers = 2\nworker_class = 'gevent'\ntimeout = 30\nkeepalive = 2\nerrorlog = '-'\n"
},
{
"from": "gpt",
"value": "workers = 2\nworker_class = 'geven... | python | chosen |
[
{
"from": "system",
"value": "Create stub functions and skeleton of program\n"
},
{
"from": "human",
"value": "__author__ = 'Jacob Bieker'\nimport os, sys\nimport numpy\nfrom multiprocessing import Pool\n\n"
},
{
"from": "gpt",
"value": "__author__ = 'Jacob Bieker'\nimport os, sys\ni... | python | chosen |
[
{
"from": "system",
"value": "Fix date format on fix render\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\ndef fix_str(value):\n try:\n return unicode(value)\n except UnicodeDecodeError:\n return unicode(value.decode('latin1'))\n\n\ndef pan... | python | chosen |
[
{
"from": "system",
"value": "Add .ico to the allowed extension list.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n# -*-coding: utf8 -*-\n\nfrom BaseHTTPServer import BaseHTTPRequestHandler\nimport mimetypes\nfrom os import curdir, sep\nimport os\n\n\nclass HttpServerHandler(BaseHTTPReq... | python | chosen |
[
{
"from": "system",
"value": "Fix rST formatting in example\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nResonance Raman\n==========\n\nA Resonance Raman plot.\n\"\"\"\n\nimport WrightTools as wt\nfrom WrightTools import datasets\n\np = datasets.BrunoldrRaman.LDS821_514nm_... | python | chosen |
[
{
"from": "system",
"value": "Fix test extraction in FileReaderDecorator.\n"
},
{
"from": "human",
"value": "# Copyright (c) 2017 Renata Hodovan, Akos Kiss.\n#\n# Licensed under the BSD 3-Clause License\n# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.\n# This file may not be cop... | python | chosen |
[
{
"from": "system",
"value": "Enable testing with other subscriber files\n\n`load_subscribers_json(\"json/test_subscribers.json\")` is now possible."
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"The package that contains groups all the functions needed ... | python | chosen |
[
{
"from": "system",
"value": "Fix broken setting of postgres password\n"
},
{
"from": "human",
"value": "\"\"\"\nCreates a database for Molly, and appropriate users, once given login\ninformation as super user, or by running as root.\n\"\"\"\n\nfrom molly.installer.utils import quiet_exec, Comma... | python | chosen |
[
{
"from": "system",
"value": "Allow @ and - in usernames also in umessages.\n"
},
{
"from": "human",
"value": "from django.conf.urls import *\nfrom userena.contrib.umessages import views as messages_views\nfrom django.contrib.auth.decorators import login_required\n\nurlpatterns = patterns('',\n ... | python | chosen |
[
{
"from": "system",
"value": "Add `${temp_file}` marker to `cmd`\n\nImplicit adding of the `${temp_file}` by the framework has been deprecated and SublimeLinter also logs about it."
},
{
"from": "human",
"value": "from SublimeLinter.lint import Linter, util\n\n\nclass CSSLint(Linter):\n cmd =... | python | chosen |
[
{
"from": "system",
"value": "Implement '*' package for all packages in Git\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\n\n\"\"\"\nCode to normalize the source package name specifier into the actual packages.\nReturns the package checkouts.\n\"\"\"\n\nfrom common import BuildError\nimpo... | python | chosen |
[
{
"from": "system",
"value": "Use clean_filename to validate if filename is already used\n"
},
{
"from": "human",
"value": "from django import forms\nfrom django.conf import settings\nfrom django.forms import ModelForm\nfrom ansible.models import Playbook\n\nclass AnsibleForm1(ModelForm):\n c... | python | chosen |
[
{
"from": "system",
"value": "Disable manual input of date.\n\nMade the input field read-only to prevent input of date manually."
},
{
"from": "human",
"value": "from django import forms\nfrom django.conf import settings\nfrom moviealert.base.widgets import CalendarWidget\nfrom .models import Ta... | python | chosen |
[
{
"from": "system",
"value": "Fix cache.manifest generation when desktop app isn't loaded, also don't include unnecessary touchmaplite files (MOLLY-113)\n"
},
{
"from": "human",
"value": "import os\nimport os.path\n\nfrom django.core.management.base import NoArgsCommand\nfrom django.conf import ... | python | chosen |
[
{
"from": "system",
"value": "Add server port to sample config\n"
},
{
"from": "human",
"value": "# Database connection config\n# The URI most scrapers will use to access the DB\nDB_URI = 'sqlite:///db/data.sqlite'\n# The read-only URI the server will use to access the DB\nDB_URI_READ_ONLY = 'fi... | python | chosen |
[
{
"from": "system",
"value": "Remove unused import causing deprecation warning\n\nWarning in the form:\nRemovedInDjango19Warning: \"ModelXYZ\" doesn't declare an explicit app_label\nApparently this happens because it tries to import models before app\nconfiguration runs\n"
},
{
"from": "human",
... | python | chosen |
[
{
"from": "system",
"value": "Make SimRun a new-style Python class.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom .s_ref import RefTypes\nimport s_options as o\n\nclass SimRun:\n\tdef __init__(self, options = None, mode = None):\n\t\t# the options and mode\n\t\tif options is N... | python | chosen |
[
{
"from": "system",
"value": "Remove other secret lookups from init\n"
},
{
"from": "human",
"value": "# mixmind/__init__.py\n\nimport logging\nlog = logging.getLogger(__name__)\n\nfrom flask import Flask\nfrom flask_uploads import UploadSet, DATA, configure_uploads\n\n\napp = Flask(__name__, in... | python | chosen |
[
{
"from": "system",
"value": "Fix some typos in concurrency test\n"
},
{
"from": "human",
"value": "import unittest\nfrom requests import Request\nfrom unittest.mock import patch, MagicMock\n\nfrom concurrency.get_websites import load_url as load_url\n\nclass MockResponse():\n def __init__(se... | python | chosen |
[
{
"from": "system",
"value": "Fix deprecation warning interfering with tests\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n# A set of simple methods for writing messages to stderr\n#\nimport sys\nfrom traceback import extract_tb\nfrom traceback import format_list\n\n\ndef write_... | python | chosen |
[
{
"from": "system",
"value": "Add ffmpeg to the required environment.\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\n\"\"\"Computational environment check script for 2014 SciPy Conference Tutorial:\nReproducible Research: Walking the Walk.\n\nhttps://github.com/reproducible-research... | python | chosen |
[
{
"from": "system",
"value": "Add django media file serving in debug mode\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nfrom django.conf.urls import patterns, include, url\nfrom django.contrib import admin\n\n\nadmin.autodiscover()\n\n\nurlpatterns = patterns('',\... | python | chosen |
[
{
"from": "system",
"value": "Change version number to 1.3.2a1\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\n# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik\n# Author: Dominik Gresch <greschd@gmx.ch>\nr\"\"\"\nTBmodels is a tool for creating / loading and manipulat... | python | chosen |
[
{
"from": "system",
"value": "ADD a new worker connection\n"
},
{
"from": "human",
"value": "from syft.core.node.domain.domain import Domain\n\nnode = Domain(name=\"om-domain\")\n"
},
{
"from": "gpt",
"value": "from syft.grid.grid_client import connect\nfrom syft.core.node.domain.dom... | python | chosen |
[
{
"from": "system",
"value": "Build event and item lists\n"
},
{
"from": "human",
"value": "from ship import ship\nfrom event import event\nfrom character import character\nfrom item import item\n\n\ndef main():\n #Build ship\n laika = ship(\"Laika\", 100.0, 100.0, 100.0)\n character_li... | python | chosen |
[
{
"from": "system",
"value": "Add test for multiplying linear terms\n"
},
{
"from": "human",
"value": "from polypy.base import x\n\n\ndef test_call():\n f = 2 * x\n assert f(2) == 4\n\n f = 3 * x ** 2\n assert f(3) == 27\n\n\ndef test_str():\n f = 2 * x\n assert str(f) == \"2x\... | python | chosen |
[
{
"from": "system",
"value": "Simplify expression, add explicit return value\n"
},
{
"from": "human",
"value": "class SearchList(list):\n\n def find(self, name):\n items = []\n for child in self:\n if child.__class__ == self.__class__:\n items += child.... | python | chosen |
[
{
"from": "system",
"value": "Work on draft Italian tokenizer\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals, print_function\n\nfrom os import path\n\nfrom ..language import Language\n\n\nclass Italian(Language):\n pass\n"
},
{
"from": "gpt",
"value": "... | python | chosen |
[
{
"from": "system",
"value": "Implement basic command line parsing\n"
},
{
"from": "human",
"value": "import os\n\nimport requests\n\n\nclass spyonweb(object):\n\n def __init__(self, token, url=None):\n self.token = token\n if url:\n self.url = url\n else:\n ... | python | chosen |
[
{
"from": "system",
"value": "Add test empty json post data\n"
},
{
"from": "human",
"value": "import pytest\nfrom django.test import TestCase\nfrom rest_framework.request import Request\nfrom rest_framework.test import APIRequestFactory\nfrom rest_framework.parsers import JSONParser\nfrom rest_... | python | chosen |
[
{
"from": "system",
"value": "Change url to test and add -k flag to ignore certificate\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport rethinkdb as r\nimport os\n\nif __name__ == \"__main__\":\n conn = r.connect('localhost', 30815, db='materialscommons')\n apikeys = r.tabl... | python | chosen |
[
{
"from": "system",
"value": "Comment for a slick little trick.\n"
},
{
"from": "human",
"value": "print \"Let's practice everything.\"\nprint \"You\\'d need to know \\'bout escapes with \\\\ that do \\n newlines and \\t tabs.\"\n\npoem = \"\"\"\n\\t the lovely world\nwtih logic so firmly plante... | python | chosen |
[
{
"from": "system",
"value": "Change _oport and _iport to weakref for prevention of loop references\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport ioport\n\nclass Connection(object):\n \"\"\" Connection class for IPFBlock\n \n Connection binding OPort and IPort... | python | chosen |
[
{
"from": "system",
"value": "refactor(verification): Refactor to query straight for user\n\n- Implement get_user\n- Change to make a single query to find the token, using a join to the\n user's email\n"
},
{
"from": "human",
"value": "from django.contrib.auth import get_user_model\n\nfrom .mod... | python | chosen |
[
{
"from": "system",
"value": "Make figure a bit better\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\n pylatex.graphics\n ~~~~~~~~~~~~~~~~\n\n This module implements the class that deals with graphics.\n\n :copyright: (c) 2014 by Jelte Fennema.\n :license: MIT... | python | chosen |
[
{
"from": "system",
"value": "Use correct m2m join table name in LatestCommentsFeed\n\n\ngit-svn-id: http://code.djangoproject.com/svn/django/trunk@9089 bcc190cf-cafb-0310-a4f2-bffc1f526a37\n\n--HG--\nextra : convert_revision : 9ea8b1f1f4ccc068b460e76127f288742d25088e\n"
},
{
"from": "human",
"v... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.