conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Bring DB script into line with other prod scripts\n" }, { "from": "human", "value": "from flask.ext.script import Manager, Server\nfrom flask_migrate import Migrate, MigrateCommand\nfrom app import create_app, db\nfrom credstash import getAllSecrets\nimport os\n\nse...
python
chosen
[ { "from": "system", "value": "Add parameters for dealing with SNAP output to Pathoscope sam module\n" }, { "from": "human", "value": "from virtool.pathoscope import sam\n\n\ndef run(isolate_sam, host_sam):\n # Get a mapping score for every read mapped to the host genome\n host_scores = sam...
python
chosen
[ { "from": "system", "value": "FIX end contract depart letter generation\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Copyright (C) 2017 Compassion CH (http://www.compassion.ch)\n# Releasing ...
python
chosen
[ { "from": "system", "value": "Allow passing None for function, and use the executable\nname in that case.\nSave error list anonymously\n\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This software is under a BSD license. See LICENSE.txt for details.\n\n_...
python
chosen
[ { "from": "system", "value": "Add a timestamp field to the Message model\n\nThe timestamp is automatically assigned at the moment of creation\nof the message. It is represented as a Month-based ISO8601\ndate-time format when sending the Message resource representation\nin JSON.\n\nCloses #1\n" }, { ...
python
chosen
[ { "from": "system", "value": "Add a sanity check per @bbangert\n" }, { "from": "human", "value": "import os\nfrom nose import SkipTest\nfrom sys import platform\n\nfrom kazoo.testing import KazooTestCase\n\n\nclass KazooInterruptTests(KazooTestCase):\n def test_interrupted_systemcall(self):\n...
python
chosen
[ { "from": "system", "value": "Add test for single-value fraction_illuminated()\n" }, { "from": "human", "value": "from skyfield import api, almanac\n\n# http://aa.usno.navy.mil/cgi-bin/aa_moonill2.pl?form=1&year=2018&task=00&tz=-05\ndef test_fraction_illuminated():\n ts = api.load.timescale()...
python
chosen
[ { "from": "system", "value": "Fix callback erroneously filtered out\n\nThe tick from pigpio wraps aroud after xFFFFFFFF,\napproximately 1h13. When it wraps the delay was not computed\ncorrectly, causing all following calls to be filtered out.\n" }, { "from": "human", "value": "import functools\n...
python
chosen
[ { "from": "system", "value": "Fix --version to output version\n\nChange-Id: I7d8dc83ac7c2ad7519633d136c1c32ce8537dce8\nFixes: bug 1182675\n" }, { "from": "human", "value": "# Copyright 2012 OpenStack LLC.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice...
python
chosen
[ { "from": "system", "value": "Update \"can delegate via forward on user\" test. Still fails because of permissions\n" }, { "from": "human", "value": "from adhocracy.tests import TestController\nfrom adhocracy.tests.testtools import tt_make_proposal, tt_make_user\n\n\nclass TestUserController(Tes...
python
chosen
[ { "from": "system", "value": "Add security_group_rule to objects registry\n\nThis adds the security_group_rule module to the objects registry,\nwhich allows a service to make sure that all of its objects are\nregistered before any could be received over RPC.\n\nWe don't really have a test for any of these b...
python
chosen
[ { "from": "system", "value": "Remove \"temp\" from temporal workers, as they may have max_seconds_idle to None, not being temp at all\n" }, { "from": "human", "value": "class WorkerPoolNameGenerator:\n def __init__(self, base_name: str, max_workers: int, max_seconds_idle: int):\n self....
python
chosen
[ { "from": "system", "value": "Simplify our argspec compatability shim.\n" }, { "from": "human", "value": "import inspect\n\nimport six\n\nif six.PY3:\n import urllib.parse as urlparse\n from urllib.parse import quote, unquote_plus\n from urllib.request import urlopen, URLError\n from...
python
chosen
[ { "from": "system", "value": "Modify way to find earliest date\n" }, { "from": "human", "value": "import os\r\nfrom dateutil.parser import parse\r\nfrom ...common import run, chdir\r\n\r\n\r\ndef check_dates(spec_id, username, spec, basedir):\r\n \"\"\" Port of the CheckDates program from C++...
python
chosen
[ { "from": "system", "value": "Clean titles before querying the DB" }, { "from": "human", "value": "import MySQLdb\nimport mwparserfromhell\n\nclass Plugin():\n\n def get_wikicode(self, title):\n # TODO Make this a conf\n db = MySQLdb.connect(host=\"localhost\", user=\"root\", pa...
python
chosen
[ { "from": "system", "value": "Add data: and unsafe-local for base64 fonts and inline js\n" }, { "from": "human", "value": "from flask import render_template\nfrom appname import app, db\nfrom models import Foo\nfrom flask.ext.assets import Environment, Bundle\n\n# Static assets\nassets = Enviro...
python
chosen
[ { "from": "system", "value": "Add wrapper for render_to_resposne to include tmpl context processors easily\n\nAutoconverted from SVN (revision:2231)\n" }, { "from": "human", "value": "def get_directory_name(job):\n \"\"\"\n Expected format:\n %sharedPath%watchedDirectories/workFlowD...
python
chosen
[ { "from": "system", "value": "Add run_sftp and remove URL manipulation methods from SCP.\n" }, { "from": "human", "value": "from process import Process\nfrom exit import err_exit\n\n\nclass SCP(object):\n \"\"\"Secure copy abstraction.\"\"\"\n\n def __init__(self, process=None):\n s...
python
chosen
[ { "from": "system", "value": "Fix UTF-8 encoding for json exports\n" }, { "from": "human", "value": "from lib.harvester import Harvester\nfrom lib.cli_helper import is_writable_directory\n\nimport argparse\nimport logging\nimport json\n\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logg...
python
chosen
[ { "from": "system", "value": "Add 'public' field to ActionAdmin list display" }, { "from": "human", "value": "from django.contrib import admin\n\nfrom actstream import models\n\n# Use django-generic-admin widgets if available\ntry:\n from genericadmin.admin import GenericAdminModelAdmin as Mo...
python
chosen
[ { "from": "system", "value": "Cover case when seq is oneven\n" }, { "from": "human", "value": "from grazer.util import time_convert, grouper\n\n\nclass TestTimeConvert(object):\n\n def test_seconds(self):\n assert time_convert(\"10s\") == 10\n\n def test_minutes(self):\n asse...
python
chosen
[ { "from": "system", "value": "Remove close_called test (no longer supported in python 3)\n" }, { "from": "human", "value": "# CREATED: 10/15/16 7:52 PM by Justin Salamon <justin.salamon@nyu.edu>\n\n'''\nTests for functions in util.py\n'''\n\nfrom scaper.util import _close_temp_files\nfrom scaper...
python
chosen
[ { "from": "system", "value": "Rename tests so that they run.\n" }, { "from": "human", "value": "import pytest\n\nimport pyrostest\n\nclass TestSpinUp(pyrostest.RosTest):\n def noop(self):\n pass\n\n @pyrostest.launch_node('pyrostest', 'add_one.py')\n def launches_node(self):\n ...
python
chosen
[ { "from": "system", "value": "Allow test client to be created with kwargs\n" }, { "from": "human", "value": "from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase\n\nclient = None\n\ndef get_client():\n global client\n if client is not None:\n ...
python
chosen
[ { "from": "system", "value": "Fix bug with registering non-school teams\n" }, { "from": "human", "value": "from django.utils.translation import ugettext as _\n\nfrom rest_framework.serializers import ModelSerializer, ValidationError\n\nfrom reg.models import Team\n\n\nclass TeamSerializer(ModelS...
python
chosen
[ { "from": "system", "value": "Prepare Django 1.7 compatibility, use new fluent_pages.adminui module\n" }, { "from": "human", "value": "from fluent_pages.admin import HtmlPageAdmin\nfrom fluent_pages.extensions import page_type_pool, PageTypePlugin\nfrom .models import FaqPage\n\n\n@page_type_poo...
python
chosen
[ { "from": "system", "value": "Allow render to take a template different from the default one.\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, division, absolute_import, unicode_literals\nimport itertools\nfrom .util import trim\n\ndef render(ite...
python
chosen
[ { "from": "system", "value": "Allow values of BitFormField's to be integers (for legacy compatibility in some apps)\n" }, { "from": "human", "value": "from django.forms import CheckboxSelectMultiple, IntegerField, ValidationError\nfrom django.utils.encoding import force_unicode\n\nfrom .types im...
python
chosen
[ { "from": "system", "value": "Update SeasonInfo database table info\n\nAdd columns for the first game star time, home and away teams for the\nfirst NFL game played of the season\n" }, { "from": "human", "value": "from nflpool.data.modelbase import SqlAlchemyBase\nimport sqlalchemy\n\n\nclass Sea...
python
chosen
[ { "from": "system", "value": "Add format parameter to strf functions\n" }, { "from": "human", "value": "import time\nimport datetime\n\n\ndef get_current_utc(time_format=\"%Y-%m-%d %H:%M:%S\"):\n \"\"\"\n @return a string representation of the current time in UTC.\n \"\"\"\n return t...
python
chosen
[ { "from": "system", "value": "Use 1080p as default window size\n" }, { "from": "human", "value": "import os\nPROJECT_DIR = os.path.dirname(os.path.abspath(__file__))\n\nSCREENSHOT_PATH = None\n\nOPENGL = {\n \"version\": (3, 3),\n}\n\nWINDOW = {\n \"class\": \"demosys.context.pyqt.Window\"...
python
chosen
[ { "from": "system", "value": "fix: Use new interface for twine\n" }, { "from": "human", "value": "\"\"\"PyPI\n\"\"\"\nfrom invoke import run\nfrom twine.commands import upload as twine_upload\n\n\ndef upload_to_pypi(\n dists: str = 'sdist bdist_wheel',\n username: str = None,\n ...
python
chosen
[ { "from": "system", "value": "[casslist] Fix error when making first migrations in a new project\n" }, { "from": "human", "value": "from django.views import generic\nfrom django.db.models import Sum\n\nfrom cassupload import models\n\n\nclass CassListView(generic.ListView):\n template_name = ...
python
chosen
[ { "from": "system", "value": "Load profiles on the order page\n" }, { "from": "human", "value": "from django.shortcuts import render\nfrom django.http import HttpResponse\nfrom django.http import HttpResponseRedirect\n\ndef index(request):\n return render(request, 'index.html')\n\ndef append(...
python
chosen
[ { "from": "system", "value": "Add better exception to viewer resolver\n" }, { "from": "human", "value": "from django.contrib.auth import get_user_model\nfrom graphene import AbstractType, Field, String\n\nfrom users.jwt_util import get_token_user_id\nfrom .definitions import Viewer\n\n\nclass Us...
python
chosen
[ { "from": "system", "value": "Add test to validate time ranges\n" }, { "from": "human", "value": "import unittest\nfrom mock import Mock\nfrom cartodb_services.mapbox.true_isolines import MapboxTrueIsolines, DEFAULT_PROFILE\nfrom cartodb_services.tools import Coordinate\n\nfrom credentials impor...
python
chosen
[ { "from": "system", "value": "Make repo serializable via as_dict\n" }, { "from": "human", "value": "\"\"\"\nfile: repository.py\nauthor: Ben Grawi <bjg1568@rit.edu>\ndate: October 2013\ndescription: Holds the repository abstraction class and ORM\n\"\"\"\nimport uuid\nfrom db import *\nfrom datet...
python
chosen
[ { "from": "system", "value": "Use MockRedis instead of dict to mock redis in unit tests\n" }, { "from": "human", "value": "\"\"\"Unit tests configuration file.\"\"\"\nimport pickle\n\nimport numpy as np\nimport pytest\nfrom sklearn import linear_model, tree, svm\n\nfrom cf_predict import create_...
python
chosen
[ { "from": "system", "value": "Add some defaults for form input\n" }, { "from": "human", "value": "from flask_wtf import FlaskForm\nfrom wtforms.fields import StringField, PasswordField, IntegerField, FloatField, SubmitField\nfrom wtforms.validators import InputRequired, NumberRange, Optional\n\n...
python
chosen
[ { "from": "system", "value": "Fix vote view to work with sharded Choice\n" }, { "from": "human", "value": "from django.shortcuts import get_object_or_404, render_to_response\nfrom django.http import HttpResponseRedirect, HttpResponse\nfrom django.core.urlresolvers import reverse\nfrom django.tem...
python
chosen
[ { "from": "system", "value": "Revert the superuser creation in a migration\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations\nfrom django.contrib.auth import models as auth_models\n\n\ndef create_users(apps, sc...
python
chosen
[ { "from": "system", "value": "Revert ntob check to imperative style\n\nAs context manager isn't available under Python 2.6\n" }, { "from": "human", "value": "\"\"\"Test Python 2/3 compatibility module.\"\"\"\nfrom __future__ import unicode_literals\n\nimport unittest\n\nimport pytest\nimport six...
python
chosen
[ { "from": "system", "value": "Add parent directory in path by default\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"settings\")\n\n from django.core.management import e...
python
chosen
[ { "from": "system", "value": "Add OS X GTK to Python path.\n" }, { "from": "human", "value": "\"\"\" Customize Python Interpreter.\n\nLink your user customizing file to this file.\n\nFor more info see: https://docs.python.org/3/library/site.html\n\n\"Default value is ~/.local/lib/pythonX.Y/site-...
python
chosen
[ { "from": "system", "value": "Correct unicode for access tokens\n\nSigned-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>\n" }, { "from": "human", "value": "import datetime\nimport functools\n\nfrom django.db import models\nfrom django.utils.crypto import get_rando...
python
chosen
[ { "from": "system", "value": "Test order file with both dsym and dwarf combination.\n\n\ngit-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@113884 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "\"\"\"\nTest that debug symbols have the correct order as specified by the ...
python
chosen
[ { "from": "system", "value": "[IMP] Replace partial domain by (1,'=',1)\n" }, { "from": "human", "value": "# -*- coding: utf-8 -*-\n#\n##############################################################################\n#\n# Authors: Adrien Peiffer\n# Copyright (c) 2014 Acsone SA/NV (http://ww...
python
chosen
[ { "from": "system", "value": "Remove init mrthod from disk test\n\nRemoved init method from test class for disk test\n" }, { "from": "human", "value": "# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you ma...
python
chosen
[ { "from": "system", "value": "Change history capability for \"Dark Legacy\"\n" }, { "from": "human", "value": "from comics.aggregator.crawler import CrawlerBase, CrawlerImage\nfrom comics.core.comic_data import ComicDataBase\n\n\nclass ComicData(ComicDataBase):\n name = \"Dark Legacy\"\n l...
python
chosen
[ { "from": "system", "value": "Introduce Markup abstract base class\n" }, { "from": "human", "value": "\"\"\" Various kinds of markup (static content) widgets.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom ...properties import abstract\nfrom ...properties import Int, String\nfrom ..wi...
python
chosen
[ { "from": "system", "value": "Make the G-Cloud collector empty the data set\n\nhttps://www.pivotaltracker.com/story/show/72073020\n\n[Delivers #72073020]\n" }, { "from": "human", "value": "from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n\nfrom dshelpers import downlo...
python
chosen
[ { "from": "system", "value": "Add a test for bmc info working eleven times in a row\n\nThis is specifically to check for SW-732, where results stop after 10\nbmc info requests.\n" }, { "from": "human", "value": "import sys, unittest\n\nfrom singlesystemtest import SingleSystemTest\n\nclass TestB...
python
chosen
[ { "from": "system", "value": "Change send bulk message display verb to 'Send message'.\n" }, { "from": "human", "value": "from go.vumitools.conversation.definition import (\n ConversationDefinitionBase, ConversationAction)\n\n\nclass BulkSendAction(ConversationAction):\n action_name = 'bul...
python
chosen
[ { "from": "system", "value": "Resolve broken test in appveyor\n" }, { "from": "human", "value": "from pathlib import Path\nfrom types import ModuleType\n\nimport pytest\n\nfrom sanic.exceptions import LoadFileException\nfrom sanic.utils import load_module_from_file_location\n\n\n@pytest.fixture\...
python
chosen
[ { "from": "system", "value": "Add python script to find unused linux-headers packages\n" }, { "from": "human", "value": "#!/usr/bin/env python\nfrom __future__ import print_function\nimport sys\nimport os\nimport re\nfrom subprocess import check_output\n\n\nIMAGE_PATTERN = re.compile(\n 'linu...
python
chosen
[ { "from": "system", "value": "Read java path from environment variable if set" }, { "from": "human", "value": "\"\"\" Utility functions. \"\"\"\n\n__author__ = 'smartschat'\n\n\ndef clean_via_pos(tokens, pos):\n \"\"\" Clean a list of tokens according to their part-of-speech tags.\n\n In p...
python
chosen
[ { "from": "system", "value": "Add task_options attribute to BaseTask\n" }, { "from": "human", "value": "import logging\n\nclass BaseTask(object):\n def __init__(self, project_config, task_config):\n self.project_config = project_config\n self.task_config = task_config\n s...
python
chosen
[ { "from": "system", "value": "Update last_used_at after successful computer verification\n" }, { "from": "human", "value": "from django.contrib.auth.backends import ModelBackend\nfrom django.utils.timezone import now\nfrom oath import accept_totp\n\n\nclass TokenBackend(ModelBackend):\n def a...
python
chosen
[ { "from": "system", "value": "Fix off by one error in line number enumeration\n" }, { "from": "human", "value": "from __future__ import print_function\n\nimport argparse\nimport sys\n\nCONFLICT_PATTERNS = [\n '<<<<<<< ',\n '=======',\n '>>>>>>> '\n]\nWARNING_MSG = 'Merge conflict string...
python
chosen
[ { "from": "system", "value": "Put name first in range form\n" }, { "from": "human", "value": "from django import forms\n\nfrom cyder.base.eav.forms import get_eav_form\nfrom cyder.base.mixins import UsabilityFormMixin\nfrom cyder.cydhcp.range.models import Range, RangeAV\nfrom cyder.cydns.forms ...
python
chosen
[ { "from": "system", "value": "Add url logging in google shortener\n" }, { "from": "human", "value": "import os\nimport time\nimport json\nimport requests\n\n\ndef get_timezone(lat, long):\n response = requests.get('https://maps.googleapis.com/maps/api/timezone/json', params={\n 'locati...
python
chosen
[ { "from": "system", "value": "Fix print for python 3\n\nFix print statement in copy_from_theme management command." }, { "from": "human", "value": "import errno\nimport glob\nimport os\nimport shutil\n\nfrom optparse import make_option\n\nfrom django.conf import settings\nfrom django.core.manage...
python
chosen
[ { "from": "system", "value": "Test commit (removed extra blank line)\n\ngit-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@98988 91177308-0d34-0410-b5e6-96231b3b80d8\n" }, { "from": "human", "value": "from TestFormats import GoogleTest, ShTest, TclTest\nfrom TestFormats import SyntaxCheckTest,...
python
chosen
[ { "from": "system", "value": "Add MD+CSS processing test to test module.\n" }, { "from": "human", "value": "import publisher\n\ndef from_html_file():\n source_file = \"~/Projects/markdown-publisher/source_test.md\"\n print publisher.get_html_from_file(source_file)\n\ndef from_html():\n ...
python
chosen
[ { "from": "system", "value": "Make relative imports py2/py3 compat\n" }, { "from": "human", "value": "try:\n VERSION = __import__('pkg_resources') \\\n .get_distribution(__name__).version\nexcept Exception as e:\n VERSION = 'unknown'\n\nfrom service import Esios\n" }, { "fro...
python
chosen
[ { "from": "system", "value": "Fix bug: KeyError: 'HOME' in Windows.\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\"\"\"\n Utility to copy ROUGE script.\n It has to be run before `setup.py`\n\n\"\"\"\nimport os\nimport shutil\n\nfrom files2rouge import settings\nfrom six.moves ...
python
chosen
[ { "from": "system", "value": "Fix _get_version for tagged releases\n" }, { "from": "human", "value": "\"\"\"Adaptive configuration dialogs.\n\nAttributes:\n __version__: The current version string.\n\"\"\"\n\nimport os\nimport subprocess\n\n\ndef _get_version(version=None): # overwritten by ...
python
chosen
[ { "from": "system", "value": "ENH: Add helper URLs to qiime.sdk\n\nAdds citation url, help page, and conda channel URLs to qiime.sdk\n" }, { "from": "human", "value": "# ----------------------------------------------------------------------------\n# Copyright (c) 2016--, QIIME 2 development team...
python
chosen
[ { "from": "system", "value": "Print installed packages in pytest\n" }, { "from": "human", "value": "import os\n\nfrom chainer import testing\nfrom chainer.testing import parameterized\n\n\n_pairwise_parameterize = (\n os.environ.get('CHAINER_TEST_PAIRWISE_PARAMETERIZATION', 'never'))\nassert ...
python
chosen
[ { "from": "system", "value": "Add another randomness into the password generator\n\nUses import random for namespace cleanliness\r\nUses list instead of string for 'chars' variable in order to shuffle, increases randomness\r\nInstead of string formatting, uses string concatenation because (currently) it is ...
python
chosen
[ { "from": "system", "value": "Hide unnecessary fields in the admins\n\n* Hide some unnecessary fields from Hearings\n* Hide Public and Commenting flags from Sections\n (Section commenting option follows that of hearings.)\n* Hide Public and Title fields from images\n* Hide Public field from labels\n\nRefs ...
python
chosen
[ { "from": "system", "value": "Fix FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\\t'\n" }, { "from": "human", "value": "import pkgutil\nfrom io import StringIO\n\nimport pandas as pd\nfrom scipy.stats import rankdata\n\n\nclass BackgroundFrequencies(object):\n\t@sta...
python
chosen
[ { "from": "system", "value": "Fix error handling on aggregate status report\n\nPreviously the catch block was a little too aggressive. It was swallowing a\nreal error (since aggregate reports pass a float, not a decimal). Now we\nprevent the original possible errors by converting no matter what the type is\...
python
chosen
[ { "from": "system", "value": "Use the new Game class.\n" }, { "from": "human", "value": "from twisted.cred import portal\nfrom twisted.conch import manhole_ssh\nfrom twisted.conch.checkers import SSHPublicKeyDatabase\n\nfrom carapace.util import ssh as util\n\nfrom peloid.app.shell import gamesh...
python
chosen
[ { "from": "system", "value": "Remove tensorflow from hard dependencies and update the version\n" }, { "from": "human", "value": "from setuptools import find_packages\nfrom setuptools import setup\n\nREQUIRED_PACKAGES = ['distance', 'tensorflow', 'numpy', 'six', 'pillow']\nVERSION = '0.0.2'\ntry:...
python
chosen
[ { "from": "system", "value": "Include changelog in package registration. Up version.\n" }, { "from": "human", "value": "# -*- encoding: utf8 -*-\nfrom setuptools import setup, find_packages\n\nimport os\n\nsetup(\n name=\"aspectlib\",\n version=\"0.7.0\",\n url='https://github.com/ionel...
python
chosen
[ { "from": "system", "value": "Mark 'tvnamer-gui' as a GUI script\n" }, { "from": "human", "value": "#!/usr/bin/env python3\nfrom setuptools import setup\n\n\nwith open(\"README.rst\") as fd:\n long_description = fd.read()\n\nsetup(\n name=\"tvnamer\",\n version=\"1.0.0-dev\",\n descr...
python
chosen
[ { "from": "system", "value": "Add new PyPi classifier \"Development Status\"" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nsetup(\n name=\"yasha\",\n author=\"Kim Blomqvist\",\n author_email=\"kblomqvist@iki.fi\",\n version=\"1.1\",\n description=...
python
chosen
[ { "from": "system", "value": "Fix the test command in the makefile\n" }, { "from": "human", "value": "import os\n\nfrom setuptools import setup, find_packages\n\n\ndef read(fname):\n return open(os.path.join(os.path.dirname(__file__), fname)).read()\n\n\nsetup(\n name='mafiademonstration',...
python
chosen
[ { "from": "system", "value": "Fix a typo in description: it's => its" }, { "from": "human", "value": "from setuptools import setup\nsetup(\n name='python-binary-memcached',\n version='0.24.6',\n author='Jayson Reis',\n author_email='santosdosreis@gmail.com',\n description='A pure ...
python
chosen
[ { "from": "system", "value": "Upgrade djsonb to fix syntax error\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\n\ntests_require = []\n\nsetup(\n name='ashlar',\n version='0.0.2',\n description='Define and validate schemas for met...
python
chosen
[ { "from": "system", "value": "Remove support for Python 2\n\nThis commit will prevent pip from installing natsort on any Python\nversion older than 3.4.\n" }, { "from": "human", "value": "#! /usr/bin/env python\n\nfrom setuptools import find_packages, setup\nsetup(\n name='natsort',\n vers...
python
chosen
[ { "from": "system", "value": "Remove per patch version classifiers" }, { "from": "human", "value": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport argparse_addons\n\nsetup(name='argparse_addons',\n version=argparse_addons.__version__,\n description=('Additional argparse ...
python
chosen
[ { "from": "system", "value": "Change PyPI wheel name to 'magical-il'\n" }, { "from": "human", "value": "#!/usr/bin/env python3\nfrom setuptools import find_packages, setup\n\nsetup(\n name='magical',\n version='0.0.1',\n packages=find_packages(),\n install_requires=[\n 'pymunk...
python
chosen
[ { "from": "system", "value": "Comment out numpy, scipy which cause problems in buildout\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\nimport os\n\nversion = '0.1'\n\nlong_description = (\n open('README.txt').read()\n + '\\n' +\n 'Contributors\\n'\n '...
python
chosen
[ { "from": "system", "value": "Add dateutils to the requirements\n" }, { "from": "human", "value": "import sys\n\nfrom setuptools import setup, find_packages\n\nimport populous\n\nrequirements = [\n \"click\",\n \"cached-property\",\n \"fake-factory\",\n]\n\nif sys.version_info < (3, 2):...
python
chosen
[ { "from": "system", "value": "Increment minor version once more" }, { "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 finalize_opti...
python
chosen
[ { "from": "system", "value": "Revert \"Perhaps need to modify the name\"\n\nThis reverts commit d4ee1a1d91cd13bf0cb844be032eaa527806fad1.\n" }, { "from": "human", "value": "from setuptools import setup\n\nDESCRIPTION = \"A Django oriented templated / transaction email abstraction\"\n\nLONG_DESCR...
python
chosen
[ { "from": "system", "value": "Include buffer.h as a dependency for rebuilds\n" }, { "from": "human", "value": "#!/usr/local/bin/python3\n\nfrom distutils.core import setup, Extension\n\nsetup(\n name = 'Encoder',\n version = '1.0',\n description = 'Encode stuff',\n ext_modules = [\n ...
python
chosen
[ { "from": "system", "value": "Add python_requires to help pip\n" }, { "from": "human", "value": "#!/usr/bin/python\n\n# Copyright 2011 Tomo Krajina\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 m...
python
chosen
[ { "from": "system", "value": "Use same version of messytables as in requirements\n\nAlso pin the version too as it is in requirements.txt.\n" }, { "from": "human", "value": "from setuptools import setup, find_packages\n\nlong_desc = \"\"\"\nXYPath is aiming to be XPath for spreadsheets: it offer...
python
chosen
[ { "from": "system", "value": "Set status to 5 - Production/Stable\n\nSigned-off-by: Chris Warrick <de6f931166e131a07f31c96c765aee08f061d1a5@gmail.com>\n" }, { "from": "human", "value": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\nimport io\nfrom setuptools import setup\n\nwith open('requir...
python
chosen
[ { "from": "system", "value": "Update to v2.0.0 with py3 only support\n" }, { "from": "human", "value": "#!/usr/bin/env python\nimport os\nfrom setuptools import setup\n\nREADME_PATH = os.path.join(os.path.dirname(__file__), \"README.md\")\nwith open(README_PATH, \"r\") as README_FILE:\n READM...
python
chosen
[ { "from": "system", "value": "Modify version string, data files to include init script\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\nimport os\nfrom glob import glob\n\nif os.environ.get('USE_SETUPTOOLS'):\n from setuptools import setup\n setup_kwargs = dict(zip_safe=0)\n\nelse:\...
python
chosen
[ { "from": "system", "value": "Use keys instead of iterkeys to go through all keys on clean_query_set\n" }, { "from": "human", "value": "# django\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\n\n# standard library\n\n\ndef paginate(request, objects, page_size=25):\n ...
python
chosen
[ { "from": "system", "value": "Add pop method on Stack class\n" }, { "from": "human", "value": "#!/usr/bin/env python\n\n'''Implementation of a simple stack data structure.\nThe stack has push, pop, and peek methods. Items in the stack have a value,\nand next_item attribute. The stack has a top a...
python
chosen
[ { "from": "system", "value": "Change to get test to pass.\n" }, { "from": "human", "value": "\"\"\"Tests the menu features.\"\"\"\n\n##==============================================================#\n## SECTION: Imports #\n##===========================...
python
chosen
[ { "from": "system", "value": "Fix TEMPLATES warning on Django 1.9\n" }, { "from": "human", "value": "import dj_database_url\n\n\nDATABASES = {\n 'default': dj_database_url.config(\n default='postgres://localhost/test_utils',\n ),\n}\nINSTALLED_APPS = (\n 'incuna_test_utils',\n\n ...
python
chosen
[ { "from": "system", "value": "Sort tests, to verify they are complete\n\nSigned-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>\n" }, { "from": "human", "value": "import unittest\nfrom parameterized import parameterized\nfrom som.vm.universe import Universe\n\n\ncla...
python
chosen
[ { "from": "system", "value": "Test to ensure all samplers and analyzers have required functions\n\nAll methods should have `cli_parse` and `cli_action` functions available" }, { "from": "human", "value": "import subprocess\n\n\ndef test_cli_usage():\n cmd = [\"salib\"]\n out = subprocess.c...
python
chosen