conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update cofnig_default: add elastic search config\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 2015-10-23 08:06:00\n\n@author: Tran Huu Cuong <tranhuucuong91@gmail.com>\n\n\"\"\"\nimport os\n\n# Blog configuration values.\n\n# You ma...
python
chosen
[ { "from": "human", "value": "Add varint and varlong tests\n" }, { "from": "gpt", "value": "from spock.mcp import datautils\nfrom spock.utils import BoundBuffer\n\n\ndef test_unpack_varint():\n largebuff = BoundBuffer(b'\\x80\\x94\\xeb\\xdc\\x03')\n smallbuff = BoundBuffer(b'\\x14')\n as...
python
chosen
[ { "from": "system", "value": "Modify add_occupant method to raise exception in case of a duplicate\n" }, { "from": "human", "value": "class Room(object):\n def __init__(self, room_name, room_type, max_persons):\n self.room_name = room_name\n self.room_type = room_type\n s...
python
chosen
[ { "from": "system", "value": "Send only pics and gifs to OOO_B_R." }, { "from": "human", "value": "#encoding:utf-8\n\nfrom utils import get_url, weighted_random_subreddit\n\n\n# Group chat https://yal.sh/dvdahoy\nt_channel = '-1001065558871'\nsubreddit = weighted_random_subreddit({\n 'ANormal...
python
chosen
[ { "from": "system", "value": "Improve git tag to version conversion\n\nThere is also aarch64 arch.\n" }, { "from": "human", "value": "#!/usr/bin/env python3\n\nimport os\nimport subprocess\nimport re\nimport semver\n\n\ndef tag_to_version(tag):\n version = re.sub(r'binary-', '', tag)\n ver...
python
chosen
[ { "from": "system", "value": "Correct pyhande dependencies (broken for some time)\n\nThis allows pyhande to be installed in a virtualenv again...\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name='pyhande',\n version='0.1',\n author='HANDE developers',...
python
chosen
[ { "from": "system", "value": "Fix compatibility with oslo.db 12.1.0\n\noslo.db 12.1.0 has changed the default value for the 'autocommit'\nparameter of 'LegacyEngineFacade' from 'True' to 'False'. This is a\nnecessary step to ensure compatibility with SQLAlchemy 2.0. However, we\nare currently relying on the...
python
chosen
[ { "from": "system", "value": "Comment out semipar notebook in travis runner until pip build us updated.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\"\"\"This script manages all tasks for the TRAVIS build server.\"\"\"\nimport os\nimport subprocess\n\nif __name__ == \"__main__\":\n...
python
chosen
[ { "from": "system", "value": "Use mutli_reduce instead of reduce in enum file loading\n" }, { "from": "human", "value": "import os\nimport json\n\nfrom lib import contract\n\ndata_dir = os.path.join(os.environ['PORTER'], 'data')\n\n\n@contract.accepts(str)\n@contract.returns(list)\ndef read_and_...
python
chosen
[ { "from": "system", "value": "Fix edit control assessment modal\n\nThis works, because our client side verification checks only if the\naudit attr exists.\n\nref: core-1643\n" }, { "from": "human", "value": "# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>\n# Licens...
python
chosen
[ { "from": "system", "value": "Add new lab_members fieldset_website to fieldsets for cms_lab_members\n" }, { "from": "human", "value": "from django.contrib import admin\nfrom cms.admin.placeholderadmin import PlaceholderAdminMixin\n\nfrom lab_members.models import Scientist\nfrom lab_members.admi...
python
chosen
[ { "from": "system", "value": "Move Data Portal / Other to bottom of contact select\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# encoding: utf-8\n#\n# This file is part of ckanext-nhm\n# Created by the Natural History Museum in London, UK\nfrom collections import OrderedDict\n\n# t...
python
chosen
[ { "from": "system", "value": "Revert \"added more crappy codes\"\n\nThis reverts commit 6f10d506bf36572b53f0325fef6dc8a1bac5f4fd.\n" }, { "from": "human", "value": "import os\n\ndef foo():\n\t\"\"\"\n\tThis is crappy function. should be removed using git checkout\n\t\"\"\"\n\tif True == True:\n\...
python
chosen
[ { "from": "system", "value": "Fix duplicate cookie issue and header parsing\n" }, { "from": "human", "value": "import time\nimport requests\nimport bs4\n\nfrom databot.recursive import call\n\n\nclass DownloadErrror(Exception):\n pass\n\n\ndef dump_response(response):\n return {\n '...
python
chosen
[ { "from": "system", "value": "Add method to generate list of abscissa dicts\n\nThis method will generate a list of dicts which can initialize an\nobject which features a method to calculate the ordinates the user\nwants.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nimport copy\n" ...
python
chosen
[ { "from": "system", "value": "Create a list of messages that contain system time.\n" }, { "from": "human", "value": "from .core import *\nfrom . import ros\n\nmessage_type_to_class = {\n # Navigation solution messages.\n PoseMessage.MESSAGE_TYPE: PoseMessage,\n PoseAuxMessage.MESSAGE_TY...
python
chosen
[ { "from": "system", "value": "Fix url id to pk.\n" }, { "from": "human", "value": "from django.urls import path\nimport eventex.subscriptions.views as s\n\n\napp_name = 'subscriptions'\n\n\nurlpatterns = [\n path('', s.new, name='new'),\n path('<int:id>/', s.detail, name='detail'),\n pa...
python
chosen
[ { "from": "system", "value": "Modify return tag search data with tag_name\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nfrom django.shortcuts import render\nfrom django.contrib.auth.decorators import login_required\nfrom posts.models import Post, Tag\n\n@login_required\ndef index...
python
chosen
[ { "from": "system", "value": "Return a random set of factors\n" }, { "from": "human", "value": "from collections import defaultdict\n\n\ndef largest_palindrome(max_factor, min_factor=0):\n return _palindromes(max_factor, min_factor, max)\n\n\ndef smallest_palindrome(max_factor, min_factor=0):...
python
chosen
[ { "from": "system", "value": "Add user data export for comments" }, { "from": "human", "value": "from django.apps import AppConfig\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass CommentConfig(AppConfig):\n name = 'froide.comments'\n verbose_name = _('Comments')\n\n ...
python
chosen
[ { "from": "system", "value": "Use comment builder for dirhtml too\n" }, { "from": "human", "value": "from django.utils.importlib import import_module\nfrom django.conf import settings\n\n# Managers\nmkdocs = import_module(getattr(settings, 'MKDOCS_BACKEND', 'doc_builder.backends.mkdocs'))\nsphin...
python
chosen
[ { "from": "system", "value": "Allow negative numbers in the GEOS string\n\nThe regular expression for parsing the GEOS string did not accept\nnegative numbers. This means if you selected a location in most parts of\nthe world the retrieve would fail and the map would center around the\ndefault location.\n\n...
python
chosen
[ { "from": "system", "value": "Test for types in __mul__\n" }, { "from": "human", "value": "from csympy import Symbol, Integer\n\ndef test_arit1():\n x = Symbol(\"x\")\n y = Symbol(\"y\")\n e = x + y\n e = x * y\n e = Integer(2)*x\n e = 2*x\n\ndef test_arit2():\n x = Symbol(\...
python
chosen
[ { "from": "system", "value": "Fix for libtest for cpython 2.6 / jython / pypy\n" }, { "from": "human", "value": "\nexec_order = []\n\nclass Imports(object):\n exec_order = exec_order\n def __init__(self):\n self.v = 1\n\nimports = Imports()\n\noverrideme = \"not overridden\"\n\nfrom...
python
chosen
[ { "from": "system", "value": "Fix for the component lookup error in vocabulary\n" }, { "from": "human", "value": "from zope.interface import directlyProvides\nfrom zope.schema.interfaces import IVocabularyFactory\nfrom zope.schema.vocabulary import (\n SimpleVocabulary,\n SimpleTerm,\n)\nf...
python
chosen
[ { "from": "system", "value": "Update list of extraordinary gentlemen\n" }, { "from": "human", "value": "ADMINFAG = [\"RealDolos\"]\nPARROTFAG = \"Parrot\"\n\nBLACKFAGS = [i.casefold() for i in (\n \"kalyx\", \"merc\", \"loliq\", \"annoying\", \"bot\", \"RootBeats\", \"JEW2FORU\", \"quag\", \"...
python
chosen
[ { "from": "system", "value": "Remove monkey patching in favor of inheritance for SpatialReference\n" }, { "from": "human", "value": "\"\"\"Spatial reference systems\"\"\"\nfrom osgeo import osr\n\n\n# Monkey patch SpatialReference since inheriting from SWIG classes is a hack\ndef srid(self):\n ...
python
chosen
[ { "from": "system", "value": "Prepare for next development iteration\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n__version__ = '0.3.7'\n__all__ = ['ApplicationMaster', 'HistoryServer', 'NodeManager', 'ResourceManager']\n\nfrom .application_master import ApplicationMaster\nfrom .h...
python
chosen
[ { "from": "system", "value": "Make sure \"fab publish\" cleans the dist folder\n\nThis avoids accidentally uploading a package twice\n" }, { "from": "human", "value": "import fabric.api as fab\n\n\ndef generate_type_hierarchy():\n \"\"\"\n Generate a document containing the available varia...
python
chosen
[ { "from": "system", "value": "Fix enable action on plugins\n" }, { "from": "human", "value": "from __future__ import absolute_import\n\nfrom django.core.urlresolvers import reverse\n\nfrom sentry.plugins import plugins\nfrom sentry.web.frontend.base import ProjectView\n\n\nclass ProjectPluginEna...
python
chosen
[ { "from": "system", "value": "Add identifier for UT Brownsville\n" }, { "from": "human", "value": "from . import base\nfrom . import mixins\n\n\nclass TransformedRecord(mixins.GenericCompensationMixin,\n mixins.GenericDepartmentMixin, mixins.GenericIdentifierMixin,\n mixins.Generic...
python
chosen
[ { "from": "system", "value": "Add function for flashing all form errors\n" }, { "from": "human", "value": "import re\nfrom flask import url_for\n\n\ndef register_template_utils(app):\n \"\"\"Register Jinja 2 helpers (called from __init__.py).\"\"\"\n\n @app.template_test()\n def equalto...
python
chosen
[ { "from": "system", "value": "Make ip_type a RadioSelect in the PTR form\n" }, { "from": "human", "value": "from django import forms\n\nfrom cyder.cydns.forms import DNSForm\nfrom cyder.cydns.ptr.models import PTR\n\n\nclass PTRForm(DNSForm):\n def delete_instance(self, instance):\n in...
python
chosen
[ { "from": "system", "value": "Make portal_config fetch config from a URL\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport rospy\nfrom portal_config.srv import *\n\n\nclass ConfigRequestHandler():\n def __init__(self, url):\n self.url = url\n\n def get_config(self):...
python
chosen
[ { "from": "system", "value": "Add parameter for log level\n" }, { "from": "human", "value": "\"\"\"The parameters dictionary contains global parameter settings.\"\"\"\n\n__all__ = ['Parameters', 'parameters']\n\n# Be EXTREMELY careful when writing to a Parameters dictionary\n# Read here for refe...
python
chosen
[ { "from": "system", "value": "Use request helper function in LayersScraper\n" }, { "from": "human", "value": "import requests\nimport json\nfrom . import Scraper\n\n\nclass LayersScraper:\n \"\"\"A superclass for scraping Layers of the UofT Map.\n\n Map is located at http://map.utoronto.ca...
python
chosen
[ { "from": "system", "value": "Remove confusing and useless \"\\n\"\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nMain server script for a pyqode.python backend. You can directly use this\nscript in your application if it fits your needs or use it as a...
python
chosen
[ { "from": "system", "value": "Add additional spacing to improve readability\n" }, { "from": "human", "value": "#!/usr/bin/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 ...
python
chosen
[ { "from": "system", "value": "ENH: Allow codata tests to be run as script.\n\ngit-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@6562 d6536bca-fef9-0310-8506-e4c0a848fbcf\n" }, { "from": "human", "value": "\nimport warnings\n\nfrom scipy.constants import find\nfrom numpy.testing import assert_...
python
chosen
[ { "from": "system", "value": "Add tests for slice intersection and sanitization." }, { "from": "human", "value": "import unittest\nfrom distarray import utils\n\n\nclass TestMultPartitions(unittest.TestCase):\n \"\"\"\n Test the multiplicative parition code.\n \"\"\"\n\n def test_bot...
python
chosen
[ { "from": "system", "value": "Revert \"log integrations with zabbix through pyzabbix\"\n\nThis reverts commit 1506b6ad3e35e4a10ca36d42a75f3a572add06b7.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport logging\nimport sys\n\nfrom dbaas_zabbix.dbaas_api imp...
python
chosen
[ { "from": "system", "value": "Add kamerstukken to dossier API\n" }, { "from": "human", "value": "from rest_framework import serializers, viewsets\n\nfrom document.models import Document, Kamerstuk, Dossier\n\n\nclass DossierSerializer(serializers.HyperlinkedModelSerializer):\n documents = ser...
python
chosen
[ { "from": "system", "value": "Update DictStack implementation from jaraco.collections 3.5.1\n" }, { "from": "human", "value": "import collections\nimport itertools\n\n\n# from jaraco.collections 3.5\nclass DictStack(list, collections.abc.Mapping):\n \"\"\"\n A stack of dictionaries that be...
python
chosen
[ { "from": "system", "value": "Update leaflet request to be over https\n" }, { "from": "human", "value": "from django.contrib.gis.forms import widgets\n\nclass LeafletPointWidget(widgets.BaseGeometryWidget):\n template_name = 'leaflet/leaflet.html'\n\n class Media:\n css = {\n ...
python
chosen
[ { "from": "system", "value": "Make the Websocket's connection header value case-insensitive\n" }, { "from": "human", "value": "# This script makes mitmproxy switch to passthrough mode for all HTTP\n# responses with \"Connection: Upgrade\" header. This is useful to make\n# WebSockets work in untr...
python
chosen
[ { "from": "system", "value": "Add staleness to MonthCache Admin display\n" }, { "from": "human", "value": "from django.contrib import admin\n\n\nfrom .models import Calendar,MonthCache\n\n\n# Register your models here.\n@admin.register(Calendar)\nclass CalendarAdmin(admin.ModelAdmin):\n list_...
python
chosen
[ { "from": "system", "value": "Add more user mapfiles and validate\n" }, { "from": "human", "value": "import logging\nimport cProfile\n\nfrom mappyfile.parser import Parser\nfrom mappyfile.pprint import PrettyPrinter\nfrom mappyfile.transformer import MapfileToDict\n\n\ndef output(fn):\n \"\"\...
python
chosen
[ { "from": "system", "value": "Update example workflow to show you can use classes\n" }, { "from": "human", "value": "import time\n\nfrom simpleflow import (\n activity,\n Workflow,\n futures,\n)\n\n\n@activity.with_attributes(task_list='quickstart', version='example')\ndef increment(x):...
python
chosen
[ { "from": "system", "value": "Add --strict flag to raise exception on undefined variables\n" }, { "from": "human", "value": "import sys\nimport argparse\nimport yaml\nfrom jinja2 import Template\n\n\ndef render(template_string, context_dict):\n template = Template(template_string)\n return...
python
chosen
[ { "from": "system", "value": "Add compatibility for Python 2\n" }, { "from": "human", "value": "# coding: utf-8\n\nfrom __future__ import unicode_literals\n\nimport io\n\nimport six\n\nfrom setuptools.command import setopt\nfrom setuptools.extern.six.moves import configparser\n\n\nclass TestEdit...
python
chosen
[ { "from": "system", "value": "Clean up detrius in parallel test file\n" }, { "from": "human", "value": "from __future__ import with_statement\n\nfrom datetime import datetime\nimport copy\nimport getpass\nimport sys\n\nimport paramiko\nfrom nose.tools import with_setup\nfrom fudge import (Fake, ...
python
chosen
[ { "from": "system", "value": "Change les arguments passés à celery pour gérer la sérialisation JSON.\n" }, { "from": "human", "value": "# coding: utf-8\n\nfrom __future__ import unicode_literals\nfrom celery_haystack.signals import CelerySignalProcessor\nfrom django.contrib.admin.models import L...
python
chosen
[ { "from": "system", "value": "Make sure that all requests for static files are correctly hidden from output\n" }, { "from": "human", "value": "from django.conf import settings\nfrom django.core.servers.basehttp import WSGIRequestHandler\nfrom django.db import connection\n\nfrom devserver.utils.t...
python
chosen
[ { "from": "system", "value": ":green_heart: Fix line length on import statement\n" }, { "from": "human", "value": "from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register, \\\n ThumbnailMixin\n\nfrom website.models import Logo\n\n\nclass LogoAdmin(ThumbnailMixin, ModelA...
python
chosen
[ { "from": "system", "value": "Move fallback URL pattern to the end of the list so it gets matched last.\n" }, { "from": "human", "value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.contrib import admin\n...
python
chosen
[ { "from": "system", "value": "Fix to allow version number to be imported without dependencies being installed.\n" }, { "from": "human", "value": "\r\nfrom django.core.exceptions import ImproperlyConfigured\r\n\r\nfrom email_extras.settings import USE_GNUPG\r\n\n\n__version__ = \"0.1.0\"\r\n\r\ni...
python
chosen
[ { "from": "system", "value": "TST: Add a test for vectorized call\n" }, { "from": "human", "value": "\"\"\"\nTests for ecdf.py\n\n\"\"\"\nimport unittest\nimport numpy as np\nfrom quantecon import ECDF\n\n\nclass TestECDF(unittest.TestCase):\n\n @classmethod\n def setUpClass(cls):\n ...
python
chosen
[ { "from": "system", "value": "Simplify importer paths after dockerization\n" }, { "from": "human", "value": "import os\n\n# --- importer input directory of DPAE and ETABLISSEMENT exports\nINPUT_SOURCE_FOLDER = '/srv/lbb/data'\n\n# --- job 1/8 & 2/8 : check_etablissements & extract_etablissements...
python
chosen
[ { "from": "system", "value": "Correct db `NAME`, use in-memory database for testing\n" }, { "from": "human", "value": "'''\nA configuration for testing in travis CI with sqlite3\n'''\n\nfrom .default import * # noqa\n\nDATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlit...
python
chosen
[ { "from": "system", "value": "Use user ID instead of username to get messages even with username changes\n" }, { "from": "human", "value": "#!/usr/bin/env python3\n\"\"\"\nA program to extract all text sent by a particular user from a Telegram chat log which is in json form\n\"\"\"\nimport argpa...
python
chosen
[ { "from": "system", "value": "Add a TODO for diamondash metric snapshot request auth in diamondash proxy view\n" }, { "from": "human", "value": "from django.http import HttpResponse\nfrom django.contrib.auth.decorators import login_required\nfrom django.views.decorators.http import require_http_...
python
chosen
[ { "from": "system", "value": "Fix assert_raises for catching parents of exceptions.\n" }, { "from": "human", "value": "from __future__ import unicode_literals\n\"\"\"\nPatch courtesy of:\nhttps://marmida.com/blog/index.php/2012/08/08/monkey-patching-assert_raises/\n\"\"\"\n\n# code for monkey-pa...
python
chosen
[ { "from": "system", "value": "Update docs/params for initialization methods.\n" }, { "from": "human", "value": "\"\"\"\nImplementation of methods for sampling initial points.\n\"\"\"\n\n# future imports\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ imp...
python
chosen
[ { "from": "system", "value": "Add feature importance bar chart.\n" }, { "from": "human", "value": "from libgbdt import Forest as _Forest\n\nclass Forest:\n def __init__(self, forest):\n if type(forest) is str or type(forest) is unicode:\n self._forest = _Forest(forest)\n ...
python
chosen
[ { "from": "system", "value": "Make field filter errors ValidationErrors\n" }, { "from": "human", "value": "\nfrom django.db.models.fields import NOT_PROVIDED\n\nfrom nap.utils import digattr\n\n\nclass field(property):\n '''A base class to compare against.'''\n def __get__(self, instance, ...
python
chosen
[ { "from": "system", "value": "Fix logging error for Guru Meditation Report\n\nCurrently, invoking any of the commands under neutron/cmd will trigger a\n\"No handlers could be found\" error for Guru Meditation Report. This is\ninterupting the notify.sh script that is called by dibbler-client during the\nIPv6...
python
chosen
[ { "from": "system", "value": "Add FileListing to objects we export\n" }, { "from": "human", "value": "import os\nfrom .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401\nfrom .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401\nfrom .ma...
python
chosen
[ { "from": "system", "value": "Update because of new number of sequences\n\nWe should have an isolated database to deal with this.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright [2009-2017] EMBL-European Bioinformatics Institute\nLicensed under the Apache License,...
python
chosen
[ { "from": "system", "value": "Set correct gen_description in rss importer.\n" }, { "from": "human", "value": "\nfrom datetime import datetime\nfrom time import mktime\n\nfrom django.core.management.base import BaseCommand\nfrom django.utils.timezone import get_default_timezone, make_aware\nfrom ...
python
chosen
[ { "from": "system", "value": "Order by last seen, descending.\n" }, { "from": "human", "value": "from django.contrib import admin\n\nfrom .models import TaskStore, TaskStoreActivityLog, UserMetadata\n\n\nclass TaskStoreAdmin(admin.ModelAdmin):\n search_fields = ('user__username', 'local_path'...
python
chosen
[ { "from": "system", "value": "Add better exception handling on invalid json\n" }, { "from": "human", "value": "import imp\nimport json\nimport os\nimport sys\n\n\nclass Dot(dict):\n\n def __init__(self, d):\n super(dict, self).__init__()\n for k, v in d.iteritems():\n ...
python
chosen
[ { "from": "system", "value": "Use the same setting for DinoPark.\n" }, { "from": "human", "value": "from django.http import Http404\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.utils.decorators import method_decorator\n\nimport waffle\nfrom csp.decorators import csp_exempt\...
python
chosen
[ { "from": "system", "value": "Include the tests in the dist\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\nimport versioneer\n\nsetup(\n name='iterm2-tools',\n version=versioneer.get_version(),\n cmdclass=versioneer.get_cmdclass(),\n des...
python
chosen
[ { "from": "system", "value": "Deploy Travis CI build 717 to GitHub\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\n\"\"\"Setup script for PythonTemplateDemo.\"\"\"\n\nimport setuptools\n\nfrom demo import __project__, __version__\n\ntry:\n README = open(\"README.rst\").read()\n ...
python
chosen
[ { "from": "system", "value": "Add url / author email for PyPI regs\n" }, { "from": "human", "value": "import tungsten\nfrom distutils.core import setup\n\nsetup(\n name='Tungsten',\n version=tungsten.__version__,\n author='Seena Burns',\n packages={'tungsten': 'tungsten'},\n licen...
python
chosen
[ { "from": "system", "value": "Make test folders and fix pylint errors\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup\n\n\nsetup(\n name='etl-framework',\n version='0.1',\n url=\"https://github.com/pantheon-systems/etl-framework@master\",\n description='Etl...
python
chosen
[ { "from": "system", "value": "Make stratis an installable script.\n\nSigned-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>\n" }, { "from": "human", "value": "import os\nimport sys\nimport setuptools\nif sys.version_info[0] < 3:\n from codecs import open\n\ndef local_fil...
python
chosen
[ { "from": "system", "value": "Fix bump version to federal senate script\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 classifiers=[\n 'Development Status :: ...
python
chosen
[ { "from": "system", "value": "Change cython to Cython in install_requires\n" }, { "from": "human", "value": "from distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Build import cythonize\n\nsetup(\n name='cygroonga',\n version='0.1.0',\n ext_modules=cyt...
python
chosen
[ { "from": "system", "value": "Add supported Python versions to classifier troves\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\nlong_description = (open('README.rst').read() +\n open('CHANGES.rst').read() +\n open('TODO.r...
python
chosen
[ { "from": "system", "value": "Fix stupid typo in requirements specification.\n" }, { "from": "human", "value": "from setuptools import setup\nimport jasinja, sys\n\nrequires = ['Jinja2']\nif sys.version_info < (2, 6):\n requirements += ['simplejson']\n\nsetup(\n name='jasinja',\n versio...
python
chosen
[ { "from": "system", "value": "Make sure the dependencies get installed\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name='wunderclient',\n packages=['wunderclient'],\n version='0.0.1',\n description='A Wunderlist API client',\n author='Kevin LaFl...
python
chosen
[ { "from": "system", "value": "Revert an accidental requirement bump to python 3.7\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom __future__ import print_function\nfrom codecs import open\nfrom setuptools import setup\n\n\nsetup(name=\"abzer\",\n author=\"Wieland Hoffmann\",\...
python
chosen
[ { "from": "system", "value": "Make compilation of extensions optional through an environment variable.\n" }, { "from": "human", "value": "from distutils.core import setup\nfrom distutils.core import Extension\n\nsetup(name = 'wrapt',\n version = '0.9.0',\n description = 'Module for dec...
python
chosen
[ { "from": "system", "value": "Include data files in package\n\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nfrom setuptools import setup, find_packages\n\nsetup(\n name = 'cloudsizzle',\n fullname = 'CloudSizzle',\n version = '0.1',\n ...
python
chosen
[ { "from": "system", "value": "Use IndexError instead of more general Exception.\n" }, { "from": "human", "value": "\"\"\"\nPush/pop stack of buffer names. The top buffer of the stack is the one that\ncurrently has the focus.\n\nNote that the stack can contain `None` values. This means that none ...
python
chosen
[ { "from": "system", "value": "Send what state is saved\n" }, { "from": "human", "value": "import datetime\nimport json\n\nfrom channels.generic.websocket import JsonWebsocketConsumer\n\nfrom auth_API.helpers import get_or_create_user_information\nfrom experiment.models import ExperimentAction\n\...
python
chosen
[ { "from": "system", "value": "Revert \"Added period to line 6\"\n\nThis reverts commit 66ca87943111e5c117578b7407c4e3e752fd195d.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\n\"\"\" Assignment 1, Exercise 1, INF1340, Fall, 2014. Grade to gpa conversion\n\nThis module prints the amo...
python
chosen
[ { "from": "system", "value": "Use all of content in redirect from oauth callback\n" }, { "from": "human", "value": "\"\"\"Main codrspace views\"\"\"\n\nfrom django.shortcuts import render, redirect\nfrom settings import GITHUB_CLIENT_ID\n\nimport requests\n\n\ndef index(request, slug=None, templ...
python
chosen
[ { "from": "system", "value": "Exclude app dir from package\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom __future__ import unicode_literals\nfrom wagtail_mvc import __version__\nfrom setuptools import setup, find_packages\n\nsetup(\n name='wagtail_mvc',\n version=__ver...
python
chosen
[ { "from": "system", "value": "Fix IATISerializer.from_etree() so it uses iati-xslt.xsl\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo ...
python
chosen
[ { "from": "system", "value": "Add test subaccount test creation\n" }, { "from": "human", "value": "import httpretty\n\nfrom paystackapi.tests.base_test_case import BaseTestCase\nfrom paystackapi.subaccount import SubAccount\n\n\nclass TestSubAccount(BaseTestCase):\n\n @httpretty.activate\n ...
python
chosen
[ { "from": "system", "value": "Create a statsd_client anyway, even if there is no STATSD_URL env variable set\n" }, { "from": "human", "value": "import os\nimport datetime\nimport tornado.gen\nimport statsd\n\nif os.environ.get(\"STATSD_URL\", None):\n ip, port = os.environ.get(\"STATSD_URL\")...
python
chosen
[ { "from": "system", "value": "Fix last commit: use config.log()\n" }, { "from": "human", "value": "#! /usr/bin/env python\n#\n#\n#\n\nimport skoleintra.config\nimport skoleintra.pgContactLists\nimport skoleintra.pgDialogue\nimport skoleintra.pgDocuments\nimport skoleintra.pgFrontpage\nimport sko...
python
chosen
[ { "from": "system", "value": "Add version requirements to extras_require\n\nOtherwise, they'll just grab latest-and-greatest.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport versioneer\n\nsetup(name='s3fs',\n version=versioneer.get_version(),...
python
chosen
[ { "from": "system", "value": "Revert commit hash in get_version\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup, find_packages\nimport subprocess\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef get_version(version=None):\n \"Returns a version number wi...
python
chosen
[ { "from": "system", "value": "Increment version in preparation for release" }, { "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 def fi...
python
chosen
[ { "from": "system", "value": "Use more standard package name django-partner-feeds\n" }, { "from": "human", "value": "try:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use_setuptools\n use_setuptools()\n from setuptools import setup, find_p...
python
chosen
[ { "from": "system", "value": "Update pyyaml requirement to >=3.12,<4.2\n\nUpdates the requirements on [pyyaml](https://github.com/yaml/pyyaml) to permit the latest version.\n- [Release notes](https://github.com/yaml/pyyaml/releases)\n- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)\n- [Comm...
python
chosen
[ { "from": "system", "value": "Bump version due to failed markdown/rST conversion in README\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name = \"django-safe-project\",\n version = \"0.0.3\",\n author = \"Matthew Reid\",\n author_email = \"matt@nomadic-r...
python
chosen