conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "packet: Add all submodules to import *\n\nYou can now access pox.lib.packet.icmp as pox.lib.packet.ICMP if\nyou import the whole package (e.g., import pox.lib.packet as pkg).\n\n--HG--\nextra : rebase_source : b48d05949977468a669bdd55caab7ac898689441\n" }, { "from": "hu...
python
chosen
[ { "from": "system", "value": "Make this derive from the correct type\n" }, { "from": "human", "value": "import werkzeug.debug\nimport werkzeug.serving\n\nfrom jacquard.commands import BaseCommand\nfrom jacquard.service import get_wsgi_app\n\n\nclass RunServer(object):\n help = \"run a (local,...
python
chosen
[ { "from": "system", "value": "Add test for user does not exist\n" }, { "from": "human", "value": "from django.test import TestCase\nfrom handover_api.models import User\nimport mock\nimport mail_draft\nfrom mail_draft.dds_util import DDSUtil\n\n\nclass DDSUtilTestCase(TestCase):\n @mock.patch...
python
chosen
[ { "from": "system", "value": "Fix imports to be able to import properly from the worker nodes" }, { "from": "human", "value": "from artgraph.plugins.plugin import Plugin\nfrom artgraph.node import Node, NodeTypes\nfrom artgraph.relationship import AssociatedActRelationship\n\nclass InfoboxPlugin...
python
chosen
[ { "from": "system", "value": "Fix invalid access to CachedObject\n" }, { "from": "human", "value": "import logging\n\nfrom importer.management.commands._import_base_command import ImportBaseCommand\nfrom importer.models import ExternalList, CachedObject\n\nlogger = logging.getLogger(__name__)\n\...
python
chosen
[ { "from": "system", "value": "Use context management with `FTP`\n" }, { "from": "human", "value": "import posixpath\n\nfrom ftplib import error_perm, FTP\nfrom posixpath import dirname\n\ndef ftp_makedirs_cwd(ftp, path, first_call=True):\n \"\"\"Set the current directory of the FTP connection...
python
chosen
[ { "from": "system", "value": "Fix bug in RealLikelihood due to not importing numpy.\n" }, { "from": "human", "value": "\"\"\"\nImplementation of the squared-exponential kernels.\n\"\"\"\n\n# future imports\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ ...
python
chosen
[ { "from": "system", "value": "Check for account activity before password verification\n" }, { "from": "human", "value": "\"\"\"\nbyceps.services.authentication.service\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Copyright: 2006-2018 Jochen Kupperschmidt\n:License: Modified BSD, see LICENSE for d...
python
chosen
[ { "from": "system", "value": "Reset Neon version to 0.1.0\n" }, { "from": "human", "value": "'''\n Copyright 2015 University of Auckland\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obta...
python
chosen
[ { "from": "system", "value": "Add show on image function\n" }, { "from": "human", "value": "import matplotlib.pyplot as plt\n\n\ndef plot_transiting(lc, period, epoch, ax=None, unit='mjd', colour=None):\n if unit.lower() == 'jd':\n epoch -= 2400000.5\n\n lc.compute_phase(period, epo...
python
chosen
[ { "from": "system", "value": "Fix 'boot script' serializer to allow 'created_by' to be inferred as the request.user\n" }, { "from": "human", "value": "from core.models.boot_script import BootScript, ScriptType\nfrom core.models.user import AtmosphereUser\nfrom rest_framework import serializers\n...
python
chosen
[ { "from": "system", "value": "Update search pattern for Keystone setup plugin\n\nDevstack (and possibly elsewhere) is using a newer version of keystone,\nv3.4, so the match_pattern generated by the detection plugin (v3.0) was\nfailing. This patch changes the patter to match any \"v3.\" version.\n\nChange-I...
python
chosen
[ { "from": "system", "value": "[r] Use set's intersection and difference for better readability\n" }, { "from": "human", "value": "from robber import expect\nfrom robber.explanation import Explanation\nfrom robber.matchers.base import Base\n\n\nclass Contain(Base):\n \"\"\"\n expect({'key':...
python
chosen
[ { "from": "system", "value": "Format migration for Django 1.7\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.conf import settings\nimport django.contrib.auth.models\n\n\nclass Migration(...
python
chosen
[ { "from": "system", "value": "Replace placeholder image in tests\n" }, { "from": "human", "value": "from mock import Mock\nfrom django.contrib.staticfiles.templatetags.staticfiles import static\nfrom saleor.product.templatetags.product_images import (\n get_thumbnail, product_first_image)\n\n...
python
chosen
[ { "from": "system", "value": "Fix unescaped content in training progress description templatetag\n\nThis template tag was using content from entry notes directly. In cases\nof some users this messed up the display of label in the templates.\n" }, { "from": "human", "value": "from django import t...
python
chosen
[ { "from": "system", "value": "Update export path to new structure\n" }, { "from": "human", "value": "from enum import Enum\n\n\nclass Constants:\n app_title = \"RTGraph\"\n app_version = '0.2.0'\n app_export_path = \"../data\"\n app_sources = [\"Serial\", \"Simulator\"]\n app_enco...
python
chosen
[ { "from": "system", "value": "Remove limit on recipe list object\n" }, { "from": "human", "value": "from django.views import generic\nfrom django.contrib.auth.mixins import LoginRequiredMixin\n\nfrom normandy.recipes.models import Recipe\n\n\nclass IndexView(LoginRequiredMixin, generic.ListView)...
python
chosen
[ { "from": "system", "value": "Add option to save model in script\n" }, { "from": "human", "value": "import graph\n\n\n# default\ndata = ('iOS', 'iOS-wifi', 'AC', 'IC2012')\nmodels = ('constant', 'distance', 'countries', 'full')\nplot_dir = '../../report2/figures'\nshow_plots = False\noa_max_dela...
python
chosen
[ { "from": "system", "value": "Fix the test; solution found by Christian Heimes. Thanks!\n" }, { "from": "human", "value": "#! -*- coding: koi8-r -*-\r\n# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.\r\n\r\nimport unittest\r\nfrom test import test_support\r\n\r\n...
python
chosen
[ { "from": "system", "value": "Make handle ports better when choosing shop\n\nRefs EE-235\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n# This file is part of Shuup.\n#\n# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.\n#\n# This source code is licensed under the ...
python
chosen
[ { "from": "system", "value": "Update the factory for Provider\n" }, { "from": "human", "value": "import factory\n\nfrom silver.models import Provider\n\n\nclass ProviderFactory(factory.django.DjangoModelFactory):\n class Meta:\n model = Provider\n" }, { "from": "gpt", "valu...
python
chosen
[ { "from": "system", "value": "Add missing imports, correct indentation\n\n" }, { "from": "human", "value": "\n\ndef usage():\n print(\"usage: \" + sys.argv[0] + \" -i directory-of-documents -d dictionary-file -p postings-file\")\n\nif __name__ == '__main__':\n\tdir_doc = dict_file = postings_...
python
chosen
[ { "from": "system", "value": "Add match error msg pattern like \"<file>:<line>: syntax error\"\n\nThis error msg is available in iverilog 0.10.0 (devel).\n" }, { "from": "human", "value": "#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by ...
python
chosen
[ { "from": "system", "value": "Remove deprecated attributes comment_re and check_version\n" }, { "from": "human", "value": "#\n# linter.py\n# Linter for SublimeLinter3, a code checking framework for Sublime Text 3\n#\n# Written by Ben Stoutenburgh\n# Copyright (c) 2016 Ben Stoutenburgh\n#\n# Lice...
python
chosen
[ { "from": "system", "value": "Add period at end of description\n\nThis is in line with other plug-ins.\n\nContributes to issue CURA-1190.\n" }, { "from": "human", "value": "# Copyright (c) 2015 Ultimaker B.V.\n# Uranium is released under the terms of the AGPLv3 or higher.\n\nfrom . import LocalF...
python
chosen
[ { "from": "system", "value": "Add transformations to Wallace init\n" }, { "from": "human", "value": "from . import models, information, agents, networks, processes\n\n__all__ = ['models', 'information', 'agents',\n 'sources', 'networks', 'processes']\n" }, { "from": "gpt", ...
python
chosen
[ { "from": "system", "value": "Add infixes and abbreviation exceptions (fr)\n" }, { "from": "human", "value": "# encoding: utf8\nfrom __future__ import unicode_literals\n\nfrom .. import language_data as base\nfrom ..language_data import strings_to_exc, update_exc\n\nfrom .stop_words import STOP_...
python
chosen
[ { "from": "system", "value": "Fix default wait timeout calculation to add extra time correctly\n" }, { "from": "human", "value": "import json\n\n\nclass TestConfig():\n def __init__(self):\n configFile = open('config/test.json')\n data = json.load(configFile)\n\n configFi...
python
chosen
[ { "from": "system", "value": "Allow script to take multiple paths, and adjust to standard __main__ idiom\nfor cmdline scripts.\n\n* tools/dev/wc-format.py:\n (usage): remove. all paths are allowed.\n (print_format): move guts of format fetching and printing into this\n function. print 'not under versio...
python
chosen
[ { "from": "system", "value": "Remove requirement in DataFieldCommand to pass labels\n\nThe behavior is now (naturally) defaults to all datafields\n" }, { "from": "human", "value": "from django.core.management.base import BaseCommand, CommandError\nfrom .utils import get_fields_by_label\n\n\nclas...
python
chosen
[ { "from": "system", "value": "Allow navigationgroup to be blank\n" }, { "from": "human", "value": "\"\"\"\nPage navigation groups allow assigning pages to differing navigation lists\nsuch as header, footer and what else.\n\"\"\"\n\nfrom __future__ import absolute_import, unicode_literals\n\nfrom...
python
chosen
[ { "from": "system", "value": "Add test showing issue with rna_type\n" }, { "from": "human", "value": "from django.test import TestCase\nfrom portal.models import Rna\n\n\nclass GenericRnaTypeTest(TestCase):\n def rna_type_of(self, upi, taxid=None):\n return Rna.objects.\\\n ...
python
chosen
[ { "from": "system", "value": "Make thread non-daemon so we don't partially process message.\n\nLWR should still stop properly since loop is tracking if manager is alive.\n" }, { "from": "human", "value": "from lwr.managers import status\nfrom lwr.lwr_client import amqp_exchange\nfrom lwr import ...
python
chosen
[ { "from": "system", "value": "Test primary key in register fields\n" }, { "from": "human", "value": "import pytest\n\nfrom data import registers, fields, phases\n\n\n@pytest.mark.parametrize('register', registers)\ndef test_register_key_matches_filename(register):\n assert registers[register]...
python
chosen
[ { "from": "system", "value": "Change of arguments, remove unused modules, source is now a directory\n" }, { "from": "human", "value": "\nimport json\nimport os\nfrom urlparse import urlparse\nimport zipfile \n\nimport click\n\nimport adapters\nfrom filters import BasicFilterer\nimport utils\nimp...
python
chosen
[ { "from": "system", "value": "Support the persistence of modules that accept arguments, provided that they have member variables that match the __init__ argument names\n" }, { "from": "human", "value": "import base64\nimport re\nimport numpy as np\n\nTIMEDELTA_DTYPE_RE = re.compile(r'\\[(?P<dtyp...
python
chosen
[ { "from": "system", "value": "Check for editor_mode before creating editor user.\n" }, { "from": "human", "value": "from django.db import models\nfrom django.db.models.signals import post_syncdb\nfrom django.dispatch import receiver\nfrom django.contrib.auth.models import Group\nfrom mezzanine.c...
python
chosen
[ { "from": "system", "value": "WebRTC: Fix builder triggering in client.webrtc.fyi\n\nIn https://codereview.chromium.org/867283002 I missed to\nadd the new builders to the triggering.\n\nTBR=phoglund@chromium.org\n\nReview URL: https://codereview.chromium.org/875733002\n\ngit-svn-id: 239fca9b83025a0b6f823aee...
python
chosen
[ { "from": "system", "value": "Change xfail to skipIf. The exact condition is really difficult to get\nright and doesn't add much signal.\n\ngit-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@340574 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "# coding=utf8\nimport ll...
python
chosen
[ { "from": "system", "value": "Create db before running tests.\n" }, { "from": "human", "value": "\"\"\"Tests for the bot.\"\"\"\n\ndef test_no_logger_crash_if_no_user():\n # Given\n from parktain.main import logger\n user, channel, message = None, '#CTESTING', 'Hello!'\n\n # When\n ...
python
chosen
[ { "from": "system", "value": "Make Python code equivalent to Ruby\n\nUsing a dictionary instead is really unfair.\n\nSmall variation: m must not be equal to n. Not sure how the algorithm is meant is exactly...\n" }, { "from": "human", "value": "import sys\nMax=int(sys.argv[1])\t\t\t\t\t# get Max...
python
chosen
[ { "from": "system", "value": "Change the striping of parameters types (to be more robust)\n" }, { "from": "human", "value": "from Cython.Compiler.Visitor import VisitorTransform\nfrom Cython.Compiler.Nodes import CSimpleBaseTypeNode\n\nclass CDefToDefTransform(VisitorTransform):\n # Does not ...
python
chosen
[ { "from": "system", "value": "Disable echo of sql alchemy" }, { "from": "human", "value": "import sqlalchemy as sa\n\nengine = None\nmetadata = None\ntask_table = None\nmetadata_table = None\n\n\ndef setup_db(db_url):\n global engine, metadata\n engine = sa.create_engine(db_url, echo=True)...
python
chosen
[ { "from": "system", "value": "Fix missing import in solution\n" }, { "from": "human", "value": "heatmap_1_r = resize(heatmap_1, (50,80), mode='reflect', preserve_range=True)\nheatmap_2_r = resize(heatmap_2, (50,80), mode='reflect', preserve_range=True)\nheatmap_3_r = resize(heatmap_3, (50,80), m...
python
chosen
[ { "from": "system", "value": "Fix up the Django Admin a little bit\n" }, { "from": "human", "value": "from form_builder.models import Form, Field, FormResponse, FieldResponse\nfrom django.contrib import admin\n\n\nclass FieldInline(admin.StackedInline):\n model = Field\n extra = 1\n\n\ncla...
python
chosen
[ { "from": "system", "value": "Fix test for wheel in Xenial and Trusty\n" }, { "from": "human", "value": "import pytest\nimport os\n\n\nSECUREDROP_TARGET_PLATFORM = os.environ.get(\"SECUREDROP_TARGET_PLATFORM\", \"trusty\")\ntestinfra_hosts = [\n \"docker://{}-sd-app\".format(SECUREDROP_TA...
python
chosen
[ { "from": "system", "value": "Add option to start server passing lib path\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\"\"\"\nThis is an example snap7 server. It doesn't do much, but accepts\nconnection. Usefull for running the python-snap7 test suite.\n\"\"\"\nimport time\nimport ...
python
chosen
[ { "from": "system", "value": "Remove comma for RT search\n" }, { "from": "human", "value": "import requests\n\nfrom bs4 import BeautifulSoup\nfrom source.models.rt_rating import RTRating\n\n\nclass RottenTomatoesService:\n\n __URL = 'http://www.rottentomatoes.com/m/'\n __SEPERATOR = '_'\n\...
python
chosen
[ { "from": "system", "value": "Update ApiClient host env var to CODECLIMATE_API_HOST\n\nThis commit also strips trailing slashes from the host.\n" }, { "from": "human", "value": "import json\nimport os\nimport requests\n\n\nclass ApiClient:\n def __init__(self, host=None, timeout=5):\n ...
python
chosen
[ { "from": "system", "value": "Revert \"make test output a litte more intuitive\"\n\nThis reverts commit e09fa453b1bb72f08053d13cc3050012a20ba724.\n" }, { "from": "human", "value": "from django.utils.unittest.case import TestCase\nfrom corehq.apps.app_manager.models import Application\nfrom coreh...
python
chosen
[ { "from": "system", "value": "Test commit: Updating version number\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nwith open('README.md') as f:\n readme = f.read()\n\nwith open('LICENSE') as f:\n license = f.read()\n\nsetup(\n name='dfttopif',\n vers...
python
chosen
[ { "from": "system", "value": "Add python-daemon as a dep\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom distutils.core import setup\n\nsetup(name=\"minishift-python\",\n version=\"0.1.2\",\n description=\"Python interface for the minishift\",\n author=\"Nick John...
python
chosen
[ { "from": "system", "value": "Fix a typo: interacive -> interactive" }, { "from": "human", "value": "\nimport setuptools\n\nwith open(\"README.md\", \"r\") as fh:\n long_description = fh.read()\n\nsetuptools.setup(\n name=\"scgv\",\n version=\"1.0.1\",\n author=\"Lubomir Chorbadjiev\...
python
chosen
[ { "from": "system", "value": "Add the 3.2 trove classifier since it's technically supported for now.\n" }, { "from": "human", "value": "import os\n\nfrom setuptools import setup\n\n\nsetup(name='django-contact-form',\n version='1.2',\n zip_safe=False, # eggs are the devil.\n descr...
python
chosen
[ { "from": "system", "value": "Add explanation about default log level.\n" }, { "from": "human", "value": "\"\"\"Configuration file for harness.py\nAuthor: Ian Huston\n\n\"\"\"\nimport logging\n\n# Directory structure\n# Change the names of various directories\n#Change to using the base run direc...
python
chosen
[ { "from": "system", "value": "Modify the logic to get slot transfer entities to return all the entities per org.\n\nThe logic is now changed from having only one slot transfer entity per org to multiple\nslot transfer entities per org.\n\n--HG--\nextra : rebase_source : d5526723d69356f4d076143f4dc537c7eeed7...
python
chosen
[ { "from": "system", "value": "Update dependencies and update version.\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name='GoogleCalendarV3',\n version='0.1.1',\n author='Ashutosh Priyadarshy',\n author_email='static@siftcal.com',\n packages=['goog...
python
chosen
[ { "from": "system", "value": "Add Python 3.5 trove classifier.\n" }, { "from": "human", "value": "import codecs\nfrom os import path\nfrom setuptools import setup, find_packages\n\n\ndef read(*parts):\n filename = path.join(path.dirname(__file__), *parts)\n with codecs.open(filename, encod...
python
chosen
[ { "from": "system", "value": "Fix ResourceWarning: unclosed file of devnull\n" }, { "from": "human", "value": "from __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\nfrom future import standard_libr...
python
chosen
[ { "from": "system", "value": "Adjust spaces and names of variables.\nAdd format of thread to delete and link files.\nAdd to methods of link, delete results of files deleted, linked and with error to list and return for caller method.\n\nSigned-off-by: messiasthi <8562fc1efba9a3c99753c749fdfb1b6932b70fbf@gma...
python
chosen
[ { "from": "system", "value": "Add some Czech character to test, too\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nfrom ella.articles.models import Article\n\nfrom example_project.tests.test_newman.helpers import NewmanTestCase\n\nclass TestArticleBasics(NewmanTestCase):\n\n de...
python
chosen
[ { "from": "system", "value": "Add in html5lib as a requirement for Python 2.6\n\nThis should fix https://travis-ci.org/Manishearth/ChatExchange/jobs/179059319.\n" }, { "from": "human", "value": "import setuptools\n\nsetuptools.setup(\n name='ChatExchange',\n version='0.0.3',\n url='http...
python
chosen
[ { "from": "system", "value": "Add flag mapping to match folder roles\n" }, { "from": "human", "value": "\n# Folder name mappings, based on http://tools.ietf.org/html/rfc6154\nINBOX = 'inbox'\nDRAFTS = 'drafts'\nSPAM = 'spam'\nARCHIVE = 'archive'\nSENT = 'sent'\nTRASH = 'trash'\nALL = 'all'\nIMPO...
python
chosen
[ { "from": "system", "value": "Update name of Syre script in install\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(name = 'infupy',\n version = '0.1',\n description = 'Syringe pump infusion',\n url = 'https://github.com/jaj42/infupy...
python
chosen
[ { "from": "system", "value": "Fix typo in entry point name\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport sys\n\nfrom setuptools import find_packages, setup\n\ninstall_requires = ['robotframework']\nif sys.version_info < (2, 7):\n install_requires.append('argparse')\n\n\ns...
python
chosen
[ { "from": "system", "value": "Add etc/* files to wheel\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nimport sys\n\ninstall_requires_list = [\n 'falcon>=0.1.8',\n 'requests',\n 'six>=1.4.1',\n 'oslo.config>=1.2.0',\n 'softlayer'...
python
chosen
[ { "from": "system", "value": "ci: Exclude a supplementary directory from set of directories where packages can be located\n" }, { "from": "human", "value": "\"\"\"\nJust a regular `setup.py` file.\n\n@author: Nikolay Lysenko\n\"\"\"\n\n\nimport os\nfrom setuptools import setup, find_packages\n\n...
python
chosen
[ { "from": "system", "value": "Add forgotten dependency on PyJWT\n" }, { "from": "human", "value": "import codecs\n\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\ndef read(*parts):\n filename = path.join(path.dirname(__file__), *parts)\n with codecs.open(filename, en...
python
chosen
[ { "from": "system", "value": "Use new name of README." }, { "from": "human", "value": "import os\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\nsetup(\n name='django-authority',\n version='0.7',\...
python
chosen
[ { "from": "system", "value": "Fix typo in package description\n" }, { "from": "human", "value": "import os\nfrom setuptools import setup\n\nwith open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:\n README = readme.read()\n\n# allow setup.py to be run from any path\nos.chdir...
python
chosen
[ { "from": "system", "value": "Clean pip build, bump version\n" }, { "from": "human", "value": "from setuptools import setup\n\ntry:\n import pypandoc\n long_description = pypandoc.convert('README.md', 'rst')\nexcept(IOError, ImportError):\n long_description = open('README.md').read()\n\...
python
chosen
[ { "from": "system", "value": "Use decimal instead of int for money\n\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom __future__ import annotations\n\nfrom datetime import date\nfrom decimal import Decimal\nfrom typing import List, Optional\n\nfrom sipa.model.pycroft.unserialize ...
python
chosen
[ { "from": "system", "value": "Correct version for the master branch\n" }, { "from": "human", "value": "from distutils.core import setup\n\nsetup(\n name=\"spacenavigator\",\n # packages = ['spacenavigator'], # this must be the same as the name above\n version=\"0.2.1\",\n description...
python
chosen
[ { "from": "system", "value": "Add Python version trove classifiers\n" }, { "from": "human", "value": "from setuptools import setup\n\nsetup(\n name='django-easymoney',\n version='0.5',\n author='Alexander Schepanovski',\n author_email='suor.web@gmail.com',\n\n description='An easy...
python
chosen
[ { "from": "system", "value": "Add colorama as a dependency\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport os.path\nfrom setuptools import find_packages, setup\n\nsetup(\n\tname = 'technic-solder-client',\n\tversion = '1.0',\n\tdescription = 'Python i...
python
chosen
[ { "from": "system", "value": "Update url with new Github username.\n" }, { "from": "human", "value": "from distutils.core import setup\n\nwith open('requirements.txt') as f:\n requirements = [l.strip() for l in f]\n\nsetup(\n name='hamper-poll',\n version='0.1',\n packages=['hamper-p...
python
chosen
[ { "from": "system", "value": "Change manage.py to require Pillow 2.0.0 This is to avoid PIL import errors for Mac users\n" }, { "from": "human", "value": "#/usr/bin/env python\nimport os\nfrom setuptools import setup, find_packages\n\nROOT_DIR = os.path.dirname(__file__)\nSOURCE_DIR = os.path.jo...
python
chosen
[ { "from": "system", "value": "Revert \"added geotagging to path\"\n\nThis reverts commit 54ac4a9ec3ddc0876be202546dc4de00a33389f8.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='django-geotagging-new',\n version='0.2.0',\n description=('...
python
chosen
[ { "from": "system", "value": "Add py3.6 to supported version\n" }, { "from": "human", "value": "import esipy\r\nimport io\r\n\r\nfrom setuptools import setup\r\n\r\n# install requirements\r\ninstall_requirements = [\r\n \"requests\",\r\n \"pyswagger\",\r\n \"six\",\r\n \"pytz\",\r\n]...
python
chosen
[ { "from": "system", "value": "Add content type for proper PyPI rendering\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n\nimport codecs\nimport re\nimport sys\n\nfrom setuptools import setup\n\n\ndef get_version():\n return re.search(r\"\"\"__version__\\s+=\\s+(?P<quote>['\"])(?P...
python
chosen
[ { "from": "system", "value": "Increase lib repo size to 50Mb\n" }, { "from": "human", "value": "# Copyright (C) Ivan Kravets <me@ikravets.com>\n# See LICENSE for details.\n\nimport json\nimport logging.config\nimport os\nfrom time import tzset\n\n\nVERSION = (0, 3, 0)\n__version__ = \".\".join([...
python
chosen
[ { "from": "system", "value": "Fix paths to start_craq scripts.\n" }, { "from": "human", "value": "#!/usr/bin/python\n\nimport sys\nimport subprocess\nimport time\n\ndef main():\n print \"Starting zookeeper\"\n subprocess.Popen('./cluster/zookeeper/start_zookeeper.sh', shell=True)\n...
python
chosen
[ { "from": "system", "value": "Fix KoboS3Storage deprecated bucket and acl arguments\n" }, { "from": "human", "value": "# coding: utf-8\nfrom django.conf import settings as django_settings\nfrom django.core.files.storage import FileSystemStorage\nfrom storages.backends.s3boto3 import S3Boto3Stora...
python
chosen
[ { "from": "system", "value": "Remove argparse dependency (not necessary)\n" }, { "from": "human", "value": "# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this\n# file, You can obtain one at http://mozilla.o...
python
chosen
[ { "from": "system", "value": "Add graphitesend dependency for graphiteservice output.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name='braubuddy',\n version='0.3.0',\n author='James Stewart',\n author_email='jstewart101@gmail.com',\n ...
python
chosen
[ { "from": "system", "value": "Update e-mail address; remove obsolete web page\n" }, { "from": "human", "value": "\n# setup.py file for texlib\n\nfrom distutils.core import setup\n\nsetup(name = 'texlib', version = '0.01',\n description = (\"A package of Python modules for dealing with \"\n ...
python
chosen
[ { "from": "system", "value": "Rename to avoid PyPI namespace collision\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\n\nsetup(\n name=\"utilitybelt\",\n version=\"0.1\",\n description=\"Utilities to make you a CND Batman\",\n url=\"https://github.co...
python
chosen
[ { "from": "system", "value": "Update the PyPI version to 7.0.5.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nimport os\nfrom setuptools import setup\n\ndef read(fname):\n try:\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n except:\n retu...
python
chosen
[ { "from": "system", "value": "Update development status trove classifier from Alpha to Beta\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport codecs\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use...
python
chosen
[ { "from": "system", "value": "Rename the package name to junit-xml-output.\n\nSigned-off-by: David Black <c4b737561a711e07c31fd1e1811f33a5d770e31c@atlassian.com>\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom setuptools import setup, find_packages\nimport os\n\n\ndef read(fname):...
python
chosen
[ { "from": "system", "value": "Update license text and classifiers and README ext\n" }, { "from": "human", "value": "##############################################################################\n#\n# Copyright Benji York and Contributors.\n# All Rights Reserved.\n#\n# This software is subject t...
python
chosen
[ { "from": "system", "value": "Make browser_type a property of PossibleBrowser.\n\nBUG=NONE\nTEST=run_tests\nNOTRY=true\nReview URL: https://codereview.chromium.org/12479003\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@186537 0039d316-1c4b-4281-b951-d872f2087c98\n" }, { "from": "human", ...
python
chosen
[ { "from": "system", "value": "Add version constraint for faker\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\ntry:\n with open('README.rst', 'r', encoding='utf-8') as f:\n readme = f.read()\nexcept IOError:\n readme = ''\n\n\nsetup(\n ...
python
chosen
[ { "from": "system", "value": "Update dependency on annotator -> v0.6.3\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name = 'annotateit',\n version = '2.0.0',\n packages = find_packages(),\n\n install_requires = [\n 'annotator==0.6....
python
chosen
[ { "from": "system", "value": "Add nose to tests dependencies\n" }, { "from": "human", "value": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name='OpenFisca-Country-Template',\n version='0.1.0',\n author='OpenFisca Team',...
python
chosen
[ { "from": "system", "value": "Update homepage field, release version 0.2\n" }, { "from": "human", "value": "\"\"\"\nnubo\n----\nAn easy way to deploy Linux VMs on different cloud providers.\n\"\"\"\n\nfrom setuptools import setup\n\nsetup(\n name='nubo',\n version='0.1',\n url='https://...
python
chosen
[ { "from": "system", "value": "Set the Development Status to Beta\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\ntry:\n\tfrom setuptools import setup\nexcept ImportError:\n\tfrom distutils.core import setup\n\nfrom gntp.version import __version__\n\nsetup(\n\tname='gntp',\n\tdescript...
python
chosen
[ { "from": "system", "value": "Add Django as a requirement\n\nDjango>=1.3 is required, although >=1.4.1 is recommended\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from ez_setup import use_setuptools\n ...
python
chosen
[ { "from": "system", "value": "Add consolescripts entry to produce 'dotsecrets' cli script\n" }, { "from": "human", "value": "import os\n\nfrom setuptools import setup, find_packages\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.rst')).read()\nCH...
python
chosen