conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "[FIX] account_direct_debit: Fix move lines domain for direct debits\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n##############################################################################\n#\n# Copyright (C) 2013 Therp BV (<http://therp.nl>).\n... | python | chosen |
[
{
"from": "system",
"value": "Move code from _run_worker into main\n"
},
{
"from": "human",
"value": "import eventlet\nimport os\nimport sys\n\nfrom oslo.config import cfg\n\nfrom st2common import log as logging\nfrom st2common.models.db import db_setup\nfrom st2common.models.db import db_teardo... | python | chosen |
[
{
"from": "system",
"value": "Make get_case_ids_modified_with_owner_since accept an end date as well\n"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom casexml.apps.case.models import CommCareCase\nfrom dimagi.utils.parsing im... | python | chosen |
[
{
"from": "system",
"value": "Update test to account for more core products\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom planetary_test_data import PlanetaryTestDataProducts\nimport os\n\n\ndef test_planetary_test_data_object():\n \"\"\"Tests simple PlanetaryTestDataProd... | python | chosen |
[
{
"from": "system",
"value": "Change debug action to production\n"
},
{
"from": "human",
"value": "import sys\nimport os\nimport logging\nimport atexit\nfrom rtrss.basedaemon import BaseDaemon\n\n_logger = logging.getLogger(__name__)\n\n\nclass WorkerDaemon(BaseDaemon):\n def run(self):\n ... | python | chosen |
[
{
"from": "system",
"value": "Make predictions with gender and ticket price\n"
},
{
"from": "human",
"value": "import pandas\n\n\ndef main():\n train_all = pandas.DataFrame.from_csv('train.csv')\n train = train_all[['Survived', 'Sex', 'Fare']]\n print(train)\n\n\nif __name__ == '__main_... | python | chosen |
[
{
"from": "system",
"value": "Fix build failed on scrutinizer-ci\n"
},
{
"from": "human",
"value": "import tcpstat"
},
{
"from": "gpt",
"value": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# The MIT License (MIT)\n\n# Copyright (c) 2014 Ivan Cai\n\n# Permission is hereby granted, ... | python | chosen |
[
{
"from": "system",
"value": "Change xrange for range for py3\n"
},
{
"from": "human",
"value": "\n# From http://stackoverflow.com/questions/2687173/django-how-can-i-get-a-block-from-a-template\nfrom django.template import Context\nfrom django.template.loader_tags import BlockNode, ExtendsNode\n... | python | chosen |
[
{
"from": "system",
"value": "Fix problem with casting to QVariant\n\nThis is a magical fix that Nallath and I found for a problem that shouldn't exist in the first place and sometimes doesn't exist at all and in the same time is a superposition of existing and not existing and it's all very complicated and... | python | chosen |
[
{
"from": "system",
"value": "Add simple serializers for books and authors\n"
},
{
"from": "human",
"value": "\"\"\"restapp URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n https://docs.djangoproject.com/en/1.9/topics/http/urls/\nExamples:\n... | python | chosen |
[
{
"from": "human",
"value": "Add initial setup for solution\n"
},
{
"from": "gpt",
"value": "class Pig_latin(object):\n vowels = [\"a\", \"e\" , \"i\", \"o\", \"u\"]\n\n\n def __init__(self, sentence):\n self.sentence = sentence\n\n def convert_sentence(self):\n new_sentence = self.sent... | python | chosen |
[
{
"from": "system",
"value": "Use new extension setup() API\n"
},
{
"from": "human",
"value": "from __future__ import unicode_literals\n\nimport os\n\nfrom mopidy import config, ext\n\n__version__ = '0.3.0'\n\n\nclass Extension(ext.Extension):\n\n dist_name = 'Mopidy-SomaFM'\n ext_name = '... | python | chosen |
[
{
"from": "system",
"value": "Add test that exercises block includes\n"
},
{
"from": "human",
"value": "import os\nimport unittest\n\nfrom ansiblelint import Runner, RulesCollection\n\n\nclass TestTaskIncludes(unittest.TestCase):\n def setUp(self):\n rulesdir = os.path.join('lib', 'ans... | python | chosen |
[
{
"from": "human",
"value": "Allow django-money to be specified as read-only in a model\n\nMonkey patch the Django admin so that we can display django-money fields\nread-only. In order to do this, we simply catch the exception that\nresults from trying to convert a money object (e.g. '10 USD') into a\nfloat... | python | chosen |
[
{
"from": "system",
"value": "Remove obsolete import (removed in Django 1.10)\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.conf.urls import patterns, url\n\nfrom .views import HomePageView, FormHorizontalView, FormInlineView, ... | python | chosen |
[
{
"from": "system",
"value": "Make the array API constants Python floats\n"
},
{
"from": "human",
"value": "from ._array_object import ndarray\nfrom ._dtypes import float64\n\nimport numpy as np\n\ne = ndarray._new(np.array(np.e, dtype=float64))\ninf = ndarray._new(np.array(np.inf, dtype=float64... | python | chosen |
[
{
"from": "system",
"value": "Add failing tests for iteration and logging config\n"
},
{
"from": "human",
"value": "import pytest\nfrom pyhocon.config_tree import ConfigTree\nfrom pyhocon.exceptions import ConfigMissingException, ConfigWrongTypeException\n\n\nclass TestConfigParser(object):\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Make OrderedChoices available at the package root\n\n"
},
{
"from": "human",
"value": "\"\"\"Little helper application to improve django choices (for fields)\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom .choices import Choices\n\n__author__ = 'Stephane \... | python | chosen |
[
{
"from": "system",
"value": "Add a test on namedtuple\n"
},
{
"from": "human",
"value": "import collections\n\n_d=collections.defaultdict(int)\n\n_d['a']+=1\n_d['a']+=2\n_d['b']+=4\n\nassert _d['a'] == 3\nassert _d['b'] == 4\n\ns = 'mississippi'\nfor k in s:\n _d[k] += 1\n\n_values=list(_d.v... | python | chosen |
[
{
"from": "system",
"value": "Remove a bad typo from reicast\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport Command\n#~ import reicastControllers\nimport recalboxFiles\nfrom generators.Generator import Generator\nimport ppssppControllers\nimport shutil\nimport os.path\nimport C... | python | chosen |
[
{
"from": "human",
"value": "Add package docstring for skimage.future\n"
},
{
"from": "gpt",
"value": "\"\"\"Functionality with an experimental API. Although you can count on the\nfunctions in this package being around in the future, the API may change with\nany version update **and will not fol... | python | chosen |
[
{
"from": "system",
"value": "Fix circular import when used with other add-ons that import django.db\n\neg sorl_thumbnail:\nTraceback (most recent call last):\n File \"/home/rpatterson/src/work/retrans/src/ReTransDjango/bin/manage\", line 40, in <module>\n sys.exit(manage.main())\n File \"/home/rpatter... | python | chosen |
[
{
"from": "system",
"value": "Change SpectrometerReader a little so it can handle more data formats.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Aug 7 12:04:18 2015\n\n@author: wirkert\n\"\"\"\n\nimport numpy as np\nfrom msi.io.reader import Reader\nfrom m... | python | chosen |
[
{
"from": "system",
"value": "Remove unneeded jinja2 import in markdown example\n"
},
{
"from": "human",
"value": "# build.py\n#!/usr/bin/env python3\nimport os\nimport jinja2\n\n# Markdown to HTML library\n# https://pypi.org/project/Markdown/\nimport markdown\n\nfrom staticjinja import Site\n\n... | python | chosen |
[
{
"from": "system",
"value": "Make featured and hidden flags editable from demo listing\n"
},
{
"from": "human",
"value": "from django.contrib import admin\n\nfrom .models import Submission\n\n\nclass SubmissionAdmin(admin.ModelAdmin):\n list_display = ( 'title', 'creator', 'featured', 'hidde... | python | chosen |
[
{
"from": "system",
"value": "Move RedisSessionFactory into its own module\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nfrom twisted.web.server import Site\nfrom webtest.session import RedisSessionFactory\nfrom webtest.request import RedisRequest\nfrom webtest import log\n\nlogger... | python | chosen |
[
{
"from": "system",
"value": "Add TODO to fix bug at later date\n"
},
{
"from": "human",
"value": "class LocalNodeMiddleware(object):\n \"\"\"\n Ensures a Node that represents the local server always exists.\n\n No other suitable hook for code that's run once and can access the server's... | python | chosen |
[
{
"from": "system",
"value": "Add absolute and relative entropy functions.\n"
},
{
"from": "human",
"value": "import entropy._entropy as _entropy\n\ndef entropy(data):\n\t\"\"\"Compute the Shannon entropy of the given string.\n\n\tReturns a floating point value indicating how many bits of entrop... | python | chosen |
[
{
"from": "system",
"value": "[FIX] hr: Add the color field to public employee\n\nThe color field is necessary to be able to display some fields\n(many2many_tags) and used in the kanban views\n\ncloses odoo/odoo#35216\n\nSigned-off-by: Yannick Tivisse (yti) <yti@odoo.com>\n\ncloses odoo/odoo#35462\n\nSigned... | python | chosen |
[
{
"from": "system",
"value": "Use port 80 to serve the API\n"
},
{
"from": "human",
"value": "from eve import Eve\n\napp = Eve()\n\nif __name__ == '__main__':\n app.run()\n"
},
{
"from": "gpt",
"value": "from eve import Eve\n\napp = Eve()\n\nif __name__ == '__main__':\n app.run... | python | chosen |
[
{
"from": "system",
"value": "Add status codes to the 404/500 error handlers.\n"
},
{
"from": "human",
"value": "import random\n\nimport jingo\n\nfrom users.models import Profile\nfrom projects.models import Project\nfrom events.models import Event\nfrom feeds.models import Entry\n\n\ndef splash... | python | chosen |
[
{
"from": "system",
"value": "Make sure the filename is alphanumeric\n"
},
{
"from": "human",
"value": "# encoding: utf-8\nfrom django.db import models\nimport uuid\nimport os\n\n\ndef unique_file_name(instance, filename):\n path = 'benchmarkLogs/'\n name = str(uuid.uuid4()) + '.log'\n ... | python | chosen |
[
{
"from": "system",
"value": "Add Bézout's identity into comments\n"
},
{
"from": "human",
"value": "def gcf(a, b):\n while b:\n a, b = b, a % b\n\n return a\n\n\ndef xgcf(a, b):\n s1, s2 = 1, 0\n t1, t2 = 0, 1\n\n while b:\n q, r = divmod(a, b)\n a, b = b, r\... | python | chosen |
[
{
"from": "system",
"value": "DOC: Add doc for pynifti package."
},
{
"from": "human",
"value": "\nfrom niftiimage import NiftiImage\n"
},
{
"from": "gpt",
"value": "\"\"\"\nNifti\n=====\n\n Python bindings for the nifticlibs. Access through the NiftiImage class.\n\n See help ... | python | chosen |
[
{
"from": "system",
"value": "Fix support for SSL for proxied sites, or otherwise uncertain situations\n\nMy particular situation is deployed through ElasticBeanstalk, proxying\nHTTPS to HTTP on the actual endpoints. This makes flask think that it is\nonly running with http, not https\n"
},
{
"from"... | python | chosen |
[
{
"from": "system",
"value": "Add fields to driller list serializer\n"
},
{
"from": "human",
"value": "from rest_framework import serializers\nfrom registries.models import Organization\nfrom gwells.models import ProvinceState\n\nclass DrillerListSerializer(serializers.ModelSerializer):\n pro... | python | chosen |
[
{
"from": "system",
"value": "Fix packagename spelling for testing header\n"
},
{
"from": "human",
"value": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import print_function\nimport os\n\n\n# This is to figure out the astroquery version, rather than using As... | python | chosen |
[
{
"from": "system",
"value": "Make settings.DEBUG available to templates\nIt's used in the default base.html template so makes sense for it to actually appear in the context.\n"
},
{
"from": "human",
"value": "from django.conf import settings\n\ndef add_settings( request ):\n \"\"\"Add some s... | python | chosen |
[
{
"from": "system",
"value": "Update coverage script to only output the first 4 cols which shows\ncoverage.\n"
},
{
"from": "human",
"value": "\"\"\"Script to generate coverage data.\n\"\"\"\n\nimport os\nimport subprocess\n\nfrom django.conf import settings\n\nfrom main.models import get_datase... | python | chosen |
[
{
"from": "system",
"value": "Fix inline phone number form\n"
},
{
"from": "human",
"value": "# from wtforms import Form\nfrom flask.ext.babel import gettext as _\nfrom flask.ext.wtf import Form\nfrom wtforms import SubmitField, RadioField, StringField\nfrom wtforms.ext.sqlalchemy.orm import mod... | python | chosen |
[
{
"from": "system",
"value": "Make running FTs against staging a bit less verbose\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nfrom unipath import Path\nimport subprocess\n\nTHIS_FOLDER = Path(__file__).parent\n\ndef reset_database(host):\n subprocess.check_call(['fab', 'rese... | python | chosen |
[
{
"from": "system",
"value": "tests.http: Test creation of HTTP credentials\n"
},
{
"from": "human",
"value": "try:\n import unittest2 as unittest\nexcept ImportError:\n import unittest\n\nimport sys\nsys.path.append('..')\nfrom pyrabbit import http\n\n\n\nclass TestHTTPClient(unittest.Tes... | python | chosen |
[
{
"from": "system",
"value": "[HOUSEKEEPING] Use Factory class from module instead of from __init__\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\nimport os\n\nfrom infcommon import Factory\nfrom infcommon.postgres.postgres import PostgresClient\n\ndef postgres_client_from_connect... | python | chosen |
[
{
"from": "system",
"value": "Add a more semantic test\n"
},
{
"from": "human",
"value": "\"\"\"Tests for main.py\"\"\"\nfrom ..main import _solve_weight_vector\nimport numpy as np\nfrom nose.tools import assert_raises, assert_equal, assert_true\n\n\ndef test_solve_weight_vector():\n # smoke ... | python | chosen |
[
{
"from": "system",
"value": "Read bank list from config file.\n"
},
{
"from": "human",
"value": "#!/usr/bin/python\nimport os\nimport sys\nimport api\nimport json\nimport getpass\n\n# Banks\nbanks = {}\nimport bankofamerica\nbanks[\"bankofamerica\"] = bankofamerica\n\nprint \"Login\"\nprint \"U... | python | chosen |
[
{
"from": "system",
"value": "Build with PIC by default.\n"
},
{
"from": "human",
"value": "from conans import ConanFile, CMake, tools\n\n\nclass VarconfConan(ConanFile):\n name = \"varconf\"\n version = \"1.0.3\"\n license = \"GPL-2.0+\"\n author = \"Erik Ogenvik <erik@ogenvik.org>\... | python | chosen |
[
{
"from": "system",
"value": "Fix the handling of missing prefixes\n\nTwisted defaults to an empty string, while IRCBase defaults to None.\n"
},
{
"from": "human",
"value": "# Taken from txircd:\n# https://github.com/ElementalAlchemist/txircd/blob/8832098149b7c5f9b0708efe5c836c8160b0c7e6/txircd/... | python | chosen |
[
{
"from": "system",
"value": "Add extra type formatter for `list` type\n"
},
{
"from": "human",
"value": "from jinja2 import Markup\n\n\ndef null_formatter(value):\n \"\"\"\n Return `NULL` as the string for `None` value\n\n :param value:\n Value to check\n \"\"\"\n... | python | chosen |
[
{
"from": "system",
"value": "Fix index_for_role function to use index field in Role class.\n"
},
{
"from": "human",
"value": "from 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 de... | python | chosen |
[
{
"from": "system",
"value": "Use .get instead of getattr, dummy.\n"
},
{
"from": "human",
"value": "import twitter\nimport urllib2\n\nNOAA_URL = \"http://weather.noaa.gov/pub/data/observations/metar/stations/*station_id*.TXT\"\n\ndef retrieve_and_post(conf):\n post = False\n\n pull_url = ... | python | chosen |
[
{
"from": "system",
"value": "Allow importing of config from current directory\n"
},
{
"from": "human",
"value": "import logging\n\nfrom config import *\nfrom slackminion.bot import Bot\n\n\ndef main():\n level = logging.DEBUG if DEBUG else logging.INFO\n logging.basicConfig(level=level, f... | python | chosen |
[
{
"from": "system",
"value": "Fix no-replace-server to accurately preview update\n\nThis override of OS::Nova::Server needs to reflect the fact\nthat it never replaces on update or the update --dry-run output\nends up being wrong.\n\nCloses-Bug: 1561076\nChange-Id: I9256872b877fbe7f91befb52995c62de006210ef\... | python | chosen |
[
{
"from": "system",
"value": "Add FIXME for delete PDF\n"
},
{
"from": "human",
"value": "# coding: utf8\nimport errno\nimport logging\nimport os\n\nfrom slugify import slugify\n\nfrom labonneboite.conf import settings\n\nlogger = logging.getLogger('main')\n\n\ndef get_file_path(office):\n fi... | python | chosen |
[
{
"from": "system",
"value": "Fix flake8 E113 unexpected indentation\n"
},
{
"from": "human",
"value": "import pickle\nfrom sqlobject import *\nfrom sqlobject.tests.dbtest import *\n\n########################################\n## Pickle instances\n########################################\n\nclass... | python | chosen |
[
{
"from": "system",
"value": "Set production databse to test database\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\nimport os\n\nHERE = os.path.abspath(os.path.dirname(__file__))\nPROJECT_ROOT = os.path.abspath(os.path.join(HERE, os.pardir))\n\n\nclass Config:\n SECRET_KEY = os.... | python | chosen |
[
{
"from": "system",
"value": "Add a ProjectDetailSerializer and EntryDetailSerializer\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n#\n# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>\n#\n# See LICENSE comming with the source of 'trex' for details.\n#\n\nfrom rest_framework.seriali... | python | chosen |
[
{
"from": "system",
"value": "Set correct program name in 'help' output\n"
},
{
"from": "human",
"value": "\"\"\"\nThe default module run when imported from the command line and also the main entry point defined in\nsetup.py. Ex:\n\n python3 -m srm\n\"\"\"\n\nimport click\n\nfrom . import __... | python | chosen |
[
{
"from": "system",
"value": "Change the string to concatenate it by using str() and then make new variable equal the first str() to the second str()\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Provides variables for string and integer conversion.\"\"... | python | chosen |
[
{
"from": "system",
"value": "Upgrade to 0.2 : Centralized logging support"
},
{
"from": "human",
"value": "from __future__ import absolute_import\nimport deployer.logger\nfrom celery.signals import setup_logging\n\n\n__version__ = '0.1.10'\n__author__ = 'sukrit'\n\ndeployer.logger.init_logging(... | python | chosen |
[
{
"from": "system",
"value": "Include threadName in DEBUG format\n"
},
{
"from": "human",
"value": "import sys\nimport logging\n\nDEBUG_FORMAT = (\"[%(asctime)s] %(levelname)s %(name)s:%(lineno)d\"\n \"(%(funcName)s): %(message)s\")\nINFO_FORMAT = (\"[%(asctime)s] %(message)s\")\n... | python | chosen |
[
{
"from": "system",
"value": "Fix name error in setting daemon\n"
},
{
"from": "human",
"value": "from threading import Timer\nfrom . import track\n\n_listeners = []\n\nclass TrackChecker():\n\tdef __init__(self, interval = 5):\n\t\tself.listeners = []\n\t\tself.CHECK_INTERVAL = interval\n\t\tse... | python | chosen |
[
{
"from": "system",
"value": "Fix base url for public generation\n"
},
{
"from": "human",
"value": "from base64 import urlsafe_b64encode\nfrom datetime import timedelta\nfrom marshmallow import Schema, fields, post_load\n\nfrom zeus.models import Hook\nfrom zeus.utils import timezone\n\n\nclass ... | python | chosen |
[
{
"from": "system",
"value": "Make sure that the interests_register tables are created\n\nNose tries to run the interests_register tests, but they will\nfail unless the interest_register app is added to INSTALLED_APPS,\nbecause its tables won't be created in the test database.\n"
},
{
"from": "human... | python | chosen |
[
{
"from": "system",
"value": "Remove output expect when there is an error.\n"
},
{
"from": "human",
"value": "'''\nMain command which is meant to be run daily to get the information\nfrom various social networks into the local db.\n'''\nimport traceback\n\nfrom django.core.management.base import... | python | chosen |
[
{
"from": "system",
"value": "Add get_self and change get_or_create to avoid mis-creation.\n\n"
},
{
"from": "human",
"value": "from utils import models\n\n\nclass Plugin:\n plugin_name = None\n display_name = None\n description = None\n author = None\n short_name = None\n stag... | python | chosen |
[
{
"from": "system",
"value": "Remove email from User API"
},
{
"from": "human",
"value": "from django.contrib.auth import get_user_model\nfrom rest_framework import serializers\n\nUser = get_user_model()\n\n\nclass UserSerializer(serializers.ModelSerializer):\n class Meta:\n model = Us... | python | chosen |
[
{
"from": "system",
"value": "Move iterator to own function\n"
},
{
"from": "human",
"value": "import csv\n\nppelm_s3_key = ''\n\n\ndef process_from_dump(fname=None, delimiter='\\t'):\n ppelm_json = []\n if fname is None:\n # ToDo Get from S3\n pass\n else:\n with o... | python | chosen |
[
{
"from": "system",
"value": "Make path parser robust to trailing /\n"
},
{
"from": "human",
"value": "import json\nimport sys\nimport re\n\ndef parse(version, endpoint_path):\n \"\"\"Map an HTTP call to an API path\"\"\"\n\n with open('opendc/api/{}/paths.json'.format(version)) as paths_f... | python | chosen |
[
{
"from": "system",
"value": "Extend test to cover corrections output\n"
},
{
"from": "human",
"value": "import pytest\n\nfrom gingerit.gingerit import GingerIt\n\n\n@pytest.mark.parametrize(\"text,expected\", [\n (\n \"The smelt of fliwers bring back memories.\",\n \"The smell ... | python | chosen |
[
{
"from": "system",
"value": "Include pygame and numpy in discription.\n"
},
{
"from": "human",
"value": "# -*- coding: utf-8 -*-\n\"\"\"\nFLUID DYNAMICS SIMULATOR\n\nRequires Python 2.7 and OpenCV 2\n\nTom Blanchet (c) 2013 - 2014 (revised 2017)\n\"\"\"\nimport cv2\nfrom fluidDoubleCone import ... | python | chosen |
[
{
"from": "system",
"value": "Fix counterexample to be more explicit\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python3\nfor i in range(1000):\n print(337*i%1000+1)\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env python3\n\nimport sys\n\n# This submission exposes a bug in a... | python | chosen |
[
{
"from": "system",
"value": "Create 2D list of Neurons in NeuronNetwork's init\n"
},
{
"from": "human",
"value": "class Neuron:\n pass\n\nclass NeuronNetwork:\n neurons = []\n"
},
{
"from": "gpt",
"value": "class Neuron:\n pass\n\nclass NeuronNetwork:\n neurons = []\n\n ... | python | chosen |
[
{
"from": "system",
"value": "Add help, make output more user friendly\n"
},
{
"from": "human",
"value": "'''\nFile: antifuzz.py\n\nAuthors: Kaitlin Keenan and Ryan Frank\n\n'''\n\nimport sys\nfrom shutil import copy2\nimport subprocess\nimport ssdeep #http://python-ssdeep.readthedocs.io/en/lat... | python | chosen |
[
{
"from": "system",
"value": "Include YAML data file in the package\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nimport versioneer\n\nwith open('requirements.txt') as f:\n requirements = f.read().splitlines()\n\nrequirements = ['setuptools'] + requirements... | python | chosen |
[
{
"from": "system",
"value": "Fix glibc version detect string\n"
},
{
"from": "human",
"value": "import sys\nimport platform\nfrom setuptools import setup, Extension\n\ncpython = platform.python_implementation() == 'CPython'\nis_glibc = platform.libc_ver()[0] == 'glibc'\nlibc_ok = is_glibc and p... | python | chosen |
[
{
"from": "system",
"value": "Add long description to the package.\n"
},
{
"from": "human",
"value": "from distutils.core import setup\nfrom setuptools import find_packages\n\nsetup(name='geventconnpool',\n version = \"0.1\",\n description = 'TCP connection pool for gevent',\n url=\"htt... | python | chosen |
[
{
"from": "system",
"value": "Use readme file for package long description\n"
},
{
"from": "human",
"value": "import names\nfrom setuptools import setup, find_packages\n\n\nsetup(\n name=names.__title__,\n version=names.__version__,\n author=names.__author__,\n url=\"https://github.c... | python | chosen |
[
{
"from": "system",
"value": "Add description and bump version\n"
},
{
"from": "human",
"value": "from setuptools import setup\n\n__version__ = '0.2.2'\n\nsetup(\n name='kuberender',\n version=__version__,\n py_modules=['kuberender'],\n install_requires=[\n 'Jinja2==2.9.6',\n ... | python | chosen |
[
{
"from": "system",
"value": "Remove an incorrect documentation URL\n\nFixes #9.\n"
},
{
"from": "human",
"value": "\"\"\"\nPy-Tree-sitter\n\"\"\"\n\n\nimport platform\nfrom setuptools import setup, Extension\n\n\nsetup(\n name = \"tree_sitter\",\n version = \"0.0.8\",\n maintainer = \"... | python | chosen |
[
{
"from": "system",
"value": "Add geojson as required dependency\n"
},
{
"from": "human",
"value": "import versioneer\n\nfrom setuptools import setup, find_packages\nfrom codecs import open\nfrom os import path\n\nhere = path.abspath(path.dirname(__file__))\n\n# Read long description from the RE... | python | chosen |
[
{
"from": "system",
"value": "Include windows.cpp only on Windows"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\nimport sys\nimport io\ntry:\n import setuptools\nexcept ImportError:\n from distribute_setup import use_setuptools\n use_setuptools()\nfrom setuptools imp... | python | chosen |
[
{
"from": "system",
"value": "Add author and URL info to make mkrelease happy.\n\n\n"
},
{
"from": "human",
"value": "import os\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = open(os.path.join(here, 'README.txt')).read()\nCHANGES = o... | python | chosen |
[
{
"from": "system",
"value": "Update package configuration, pt. ii\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\n\nsetup(\n name='tangled',\n version='0.1a3.dev0',\n description='Tangled namespace and utilities',\n long_description=open('README.rst... | python | chosen |
[
{
"from": "system",
"value": "Fix bugs in install script. Now it works fine.\n"
},
{
"from": "human",
"value": "#from distutils.core import setup\nfrom setuptools import setup\n\nsetup(\n name='nubomedia',\n version='0.1',\n packages=['core', 'test', 'util', 'wsgi', 'model'],\n install_requi... | python | chosen |
[
{
"from": "system",
"value": "Fix version number to comply with PEP 440\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nsetup(\n name='bfg9000',\n version='0.1.0pre',\n license='BSD',\n\n author='Jim Porter',\n author_email='porterj@alum.rit.edu',... | python | chosen |
[
{
"from": "system",
"value": "Add env subdirectory to package list\n\nHi,\n\nThis patch adds the ovf/env subdirectory to the package list so that\nsetup.py installs it properly.\n\nSigned-off-by: David L. Leskovec <376f07f909b7d4aee248a1433ee4548cc2bf1d1b@linux.vnet.ibm.com>\nSigned-off-by: Scott Moser <f41... | python | chosen |
[
{
"from": "system",
"value": "Increment version number for latest linter version\n"
},
{
"from": "human",
"value": "from distutils.core import setup\n\nsetup(\n name='scrAPI Utils',\n version='0.4.7',\n author='Chris Seto',\n author_email='Chris@seto.xyz',\n packages=['scrapi.lint... | python | chosen |
[
{
"from": "system",
"value": "Add long_description from README + URL\n"
},
{
"from": "human",
"value": "from setuptools import find_packages, setup\n\nsetup(\n name='txkazoo',\n version='0.0.4',\n description='Twisted binding for Kazoo',\n maintainer='Manish Tomar',\n maintainer_e... | python | chosen |
[
{
"from": "system",
"value": "Fix missing raven.processors in build\n\n"
},
{
"from": "human",
"value": "import importlib\nfrom cx_Freeze import setup, Executable\n\nbackend_path = importlib.import_module(\"bcrypt\").__path__[0]\n\nbackend_path = backend_path.replace(\"bcrypt\", \".libs_cffi_bac... | python | chosen |
[
{
"from": "system",
"value": "Add entry point for quick_add_keys_to_file\n"
},
{
"from": "human",
"value": "from setuptools import setup\nfrom setuptools.command.test import test as TestCommand\nimport sys\n\n\nclass PyTest(TestCommand):\n def finalize_options(self):\n TestCommand.fina... | python | chosen |
[
{
"from": "system",
"value": "Exclude test_runner from dist package\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\ntry:\n long_description = open(\"README.rst\").read()\nexcept IOError:\n long_description = \"\"\n\nsetup(\n name='baldr',\n version='... | python | chosen |
[
{
"from": "system",
"value": "Allow later patch versions of argcomplete\n\nUsing ~ should install 1.12.1 if available (which it is)\n\nSpecifically, we want the changes here:\nhttps://github.com/kislyuk/argcomplete/issues/321\n\nimportlib-metadata 2.0 was released, and argcomplete defined that 2.0\nshould n... | python | chosen |
[
{
"from": "system",
"value": "Add markdown content type for README\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\nimport os\n\nfrom setuptools import find_packages, setup\n\nSCRIPT_DIR = os.path.dirname(__file__)\nif not SCRIPT_DIR:\n SCRIPT_DIR = os.getcwd()\n\nSRC_PREFIX = 'src'\... | python | chosen |
[
{
"from": "system",
"value": "Implement server-sent events and basic worker support\n"
},
{
"from": "human",
"value": "#!/usr/bin/env python\n\nimport sys\nimport os\nfrom flask import Flask, render_template, make_response\n\napp = Flask(__name__)\n\n\n@app.route('/')\ndef index():\n \"\"\"Re... | python | chosen |
[
{
"from": "system",
"value": "Add URL to the package descirption\n"
},
{
"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\n\nsetup(\n name=\"sphinx-refdoc\",\n v... | python | chosen |
[
{
"from": "system",
"value": "Add macfsevents dependency on Mac OS X\n"
},
{
"from": "human",
"value": "from setuptools import setup, find_packages\n\nwith open('README.rst') as f:\n readme = f.read()\n\nexecfile('substance/_version.py')\n\ninstall_requires = ['setuptools>=1.1.3', 'PyYAML', '... | python | chosen |
[
{
"from": "system",
"value": "Return Status 422 on bad JSON content\n"
},
{
"from": "human",
"value": "import json\nimport os\nimport webapp2\nfrom webapp2_extras import jinja2\n\n\nclass BaseHandler(webapp2.RequestHandler):\n @webapp2.cached_property\n def jinja2(self):\n return jinja2... | python | chosen |
[
{
"from": "system",
"value": "Add --config argument as a path to the config file\n"
},
{
"from": "human",
"value": "import json\nimport discord\nfrom handlers.message_handler import MessageHandler\n\n\nwith open(\"config.json\", \"r\") as f:\n\tconfig = json.load(f)\nclient = discord.Client()\nm... | python | chosen |
[
{
"from": "system",
"value": "Add Fibonacci class and use it in representation\n"
},
{
"from": "human",
"value": "def fibrepr(n):\n fibs = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]\n def fib_iter(n, fibs, l):\n for i, f in enumerate(fibs):\n if f == n:\n yield '1... | python | chosen |
[
{
"from": "system",
"value": "Hide logger from outside of the package\n"
},
{
"from": "human",
"value": "# encoding: utf-8\n\n\"\"\"\n.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>\n\"\"\"\n\nfrom __future__ import absolute_import\n\nfrom tabledata import DataError, InvalidHeade... | python | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.