commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
9a9d968f979dd12ee2bf4b1922aa1e0d70d27974
switch to cmake
DeadSix27/python_cross_compile_script
packages/dependencies/libogg.py
packages/dependencies/libogg.py
{ 'repo_type' : 'git', 'url' : 'https://github.com/xiph/ogg.git', 'conf_system' : 'cmake', 'source_subfolder' : '_build', 'configure_options' : '.. {cmake_prefix_options} -DCMAKE_INSTALL_PREFIX={target_prefix} -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Release', '_info' : { 'version' : None, 'fancy_name' : 'ogg' }, }
{ 'repo_type' : 'git', 'url' : 'https://github.com/xiph/ogg.git', # 'folder_name' : 'ogg-1.3.2', 'configure_options' : '{autoconf_prefix_options}', '_info' : { 'version' : None, 'fancy_name' : 'ogg' }, }
mpl-2.0
Python
5d136b1fc8d2d4945352e7ee9e6d25ebd2190e56
rename tags to subjects to better match schema
erinspace/scrapi,alexgarciac/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,ostwald/scrapi,icereval/scrapi,jeffreyliu3230/scrapi,mehanig/scrapi,fabianvf/scrapi,felliott/scrapi,mehanig/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi
scrapi/base/schemas.py
scrapi/base/schemas.py
from __future__ import unicode_literals from dateutil.parser import parse from .helpers import ( default_name_parser, oai_extract_url, # oai_extract_doi, oai_process_contributors, compose, single_result, format_tags, language_code ) CONSTANT = lambda x: lambda *_, **__: x BASEXMLSCHEMA = { "description": ('//dc:description/node()', compose(lambda x: x.strip(), single_result)), "contributors": ('//dc:creator/node()', compose(default_name_parser, lambda x: x.split(';'), single_result)), "title": ('//dc:title/node()', compose(lambda x: x.strip(), single_result)), "providerUpdatedDateTime": ('//dc:dateEntry/node()', compose(lambda x: x.strip(), single_result)), "uris": { "canonicalUri": ('//dcq:identifier-citation/node()', compose(lambda x: x.strip(), single_result)), } } OAISCHEMA = { "contributors": ('//dc:creator/node()', '//dc:contributor/node()', oai_process_contributors), "uris": { "canonicalUri": ('//dc:identifier/node()', oai_extract_url) }, 'providerUpdatedDateTime': ('//ns0:header/ns0:datestamp/node()', lambda x: parse(x[0]).replace(tzinfo=None).isoformat()), 'title': ('//dc:title/node()', single_result), 'description': ('//dc:description/node()', single_result), 'subjects': ('//dc:subject/node()', format_tags), 'publisher': { 'name': ('//dc:publisher/node()', single_result) }, 'languages': ('//dc:language', compose(lambda x: [x], language_code, single_result)) }
from __future__ import unicode_literals from dateutil.parser import parse from .helpers import ( default_name_parser, oai_extract_url, # oai_extract_doi, oai_process_contributors, compose, single_result, format_tags, language_code ) CONSTANT = lambda x: lambda *_, **__: x BASEXMLSCHEMA = { "description": ('//dc:description/node()', compose(lambda x: x.strip(), single_result)), "contributors": ('//dc:creator/node()', compose(default_name_parser, lambda x: x.split(';'), single_result)), "title": ('//dc:title/node()', compose(lambda x: x.strip(), single_result)), "providerUpdatedDateTime": ('//dc:dateEntry/node()', compose(lambda x: x.strip(), single_result)), "uris": { "canonicalUri": ('//dcq:identifier-citation/node()', compose(lambda x: x.strip(), single_result)), } } OAISCHEMA = { "contributors": ('//dc:creator/node()', '//dc:contributor/node()', oai_process_contributors), "uris": { "canonicalUri": ('//dc:identifier/node()', oai_extract_url) }, 'providerUpdatedDateTime': ('//ns0:header/ns0:datestamp/node()', lambda x: parse(x[0]).replace(tzinfo=None).isoformat()), 'title': ('//dc:title/node()', single_result), 'description': ('//dc:description/node()', single_result), 'tags': ('//dc:subject/node()', format_tags), 'publisher': { 'name': ('//dc:publisher/node()', single_result) }, 'languages': ('//dc:language', compose(lambda x: [x], language_code, single_result)) }
apache-2.0
Python
076d3831aa04941e6ae8d36dc95f03269a05436f
Fix python formatting issues.
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/mcapi/machine.py
backend/mcapi/machine.py
from mcapp import app from decorators import crossdomain, apikey, jsonp from flask import request, g import rethinkdb as r import dmutil import args import access @app.route('/machines', methods=['GET']) @jsonp def get_all_machines(): rr = r.table('machines').order_by(r.desc('birthtime')) selection = list(rr.run(g.conn, time_format='raw')) return args.json_as_format_arg(selection) @app.route('/machines/<machine_id>', methods=['GET']) @jsonp def get_machine(machine_id): return dmutil.get_single_from_table('machines', machine_id) @app.route('/machines/new', methods=['POST']) @apikey @crossdomain(origin='*') def create_machine(): j = request.get_json() machine = dict() machine['additional'] = dmutil.get_required('additional', j) machine['name'] = dmutil.get_required('Name', j) machine['notes'] = dmutil.get_required('Notes', j) machine['birthtime'] = r.now() return dmutil.insert_entry('machines', machine) @app.route('/materials', methods=['GET']) @apikey(shared=True) @jsonp def get_all_materials(): rr = r.table('materials').order_by(r.desc('birthtime')) selection = list(rr.run(g.conn, time_format='raw')) return args.json_as_format_arg(selection) @app.route('/materials/new', methods=['POST']) @apikey @crossdomain(origin='*') def create_material(): j = request.get_json() material = dict() user = access.get_user() material['name'] = dmutil.get_required('name', j) material['alloy'] = dmutil.get_required('alloy', j) material['notes'] = dmutil.get_required('notes', j) material['model'] = dmutil.get_required('model', j) material['birthtime'] = r.now() material['created_by'] = user material['treatments_order'] = dmutil.get_optional('treatments_order', j) material['treatments'] = dmutil.get_optional('treatments', j) return dmutil.insert_entry('materials', material) @app.route('/materials/<material_id>', methods=['GET']) @jsonp def get_material(material_id): return dmutil.get_single_from_table('materials', material_id)
from mcapp import app from decorators import crossdomain, apikey, jsonp from flask import request, g import error import rethinkdb as r import dmutil import json import args import access @app.route('/machines', methods=['GET']) @jsonp def get_all_machines(): rr = r.table('machines').order_by(r.desc('birthtime')) selection = list(rr.run(g.conn, time_format='raw')) return args.json_as_format_arg(selection) @app.route('/machines/<machine_id>', methods=['GET']) @jsonp def get_machine(machine_id): return dmutil.get_single_from_table('machines', machine_id) @app.route('/machines/new', methods=['POST']) @apikey @crossdomain(origin='*') def create_machine(): j = request.get_json() machine = dict() machine['additional'] = dmutil.get_required('additional', j) machine['name'] = dmutil.get_required('Name', j) machine['notes'] = dmutil.get_required('Notes', j) machine['birthtime'] = r.now() return dmutil.insert_entry('machines', machine) @app.route('/materials', methods=['GET']) @apikey(shared=True) @jsonp def get_all_materials(): rr = r.table('materials').order_by(r.desc('birthtime')) selection = list(rr.run(g.conn, time_format='raw')) return args.json_as_format_arg(selection) @app.route('/materials/new', methods=['POST']) @apikey @crossdomain(origin='*') def create_material(): j = request.get_json() material = dict() user = access.get_user() material['name'] = dmutil.get_required('name', j) material['alloy'] = dmutil.get_required('alloy', j) material['notes'] = dmutil.get_required('notes', j) material['model'] = dmutil.get_required('model', j) material['birthtime'] = r.now() material['created_by'] = user material['treatments_order'] = dmutil.get_optional('treatments_order',j) material['treatments'] = dmutil.get_optional('treatments', j) return dmutil.insert_entry('materials', material) @app.route('/materials/<material_id>', methods=['GET']) @jsonp def get_material(material_id): return dmutil.get_single_from_table('materials', material_id)
mit
Python
f8f63d4b15ce68797d6e16943bd85efb19a77752
Fix recording failure for system pollster
MisterPup/Ceilometer-Juno-Extension,maestro-hybrid-cloud/ceilometer,sileht/aodh,fabian4/ceilometer,froyobin/ceilometer,pczerkas/aodh,MisterPup/Ceilometer-Juno-Extension,ityaptin/ceilometer,eayunstack/ceilometer,eayunstack/ceilometer,pczerkas/aodh,m1093782566/openstack_org_ceilometer,redhat-openstack/ceilometer,fabian4/ceilometer,chungg/aodh,cernops/ceilometer,cernops/ceilometer,r-mibu/ceilometer,m1093782566/openstack_org_ceilometer,openstack/ceilometer,openstack/aodh,Juniper/ceilometer,openstack/ceilometer,pkilambi/ceilometer,pkilambi/ceilometer,isyippee/ceilometer,idegtiarov/ceilometer,idegtiarov/ceilometer,mathslinux/ceilometer,openstack/aodh,sileht/aodh,froyobin/ceilometer,chungg/aodh,redhat-openstack/ceilometer,mathslinux/ceilometer,r-mibu/ceilometer,isyippee/ceilometer,Juniper/ceilometer,ityaptin/ceilometer,maestro-hybrid-cloud/ceilometer
ceilometer/hardware/pollsters/system.py
ceilometer/hardware/pollsters/system.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from ceilometer.hardware import plugin from ceilometer.hardware.pollsters import util from ceilometer import sample class _Base(plugin.HardwarePollster): CACHE_KEY = 'system' class _SystemBase(_Base): def generate_one_sample(self, host, c_data): value, metadata, extra = c_data return util.make_sample_from_host(host, name=self.IDENTIFIER, sample_type=self.TYPE, unit=self.UNIT, volume=value, res_metadata=metadata, extra=extra) class SystemCpuIdlePollster(_SystemBase): IDENTIFIER = 'system_stats.cpu.idle' TYPE = sample.TYPE_GAUGE UNIT = '%' class SystemIORawSentPollster(_SystemBase): IDENTIFIER = 'system_stats.io.outgoing.blocks' TYPE = sample.TYPE_CUMULATIVE UNIT = 'blocks' class SystemIORawReceivedPollster(_SystemBase): IDENTIFIER = 'system_stats.io.incoming.blocks' TYPE = sample.TYPE_CUMULATIVE UNIT = 'blocks'
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from ceilometer.hardware import plugin from ceilometer.hardware.pollsters import util from ceilometer import sample class _Base(plugin.HardwarePollster): CACHE_KEY = 'system' class _SystemBase(_Base): def generate_one_sample(self, host, c_data): value, metadata, extra = c_data return util.make_sample_from_host(host, name=self.IDENTIFIER, sample_type=self.TYPE, unit=self.UNIT, volume=value, res_metadata=metadata, extra=extra) class SystemCpuIdlePollster(_SystemBase): IDENTIFIER = 'system_stats.cpu.idle' TYPE = sample.TYPE_GAUGE UNIT = '%' class SystemIORawSentPollster(_SystemBase): IDENTIFIER = 'system_stats.io.outgoing.blocks' TYPE = sample.TYPE_CUMULATIVE, UNIT = 'blocks' class SystemIORawReceivedPollster(_SystemBase): IDENTIFIER = 'system_stats.io.incoming.blocks' TYPE = sample.TYPE_CUMULATIVE, UNIT = 'blocks'
apache-2.0
Python
cd28805878328e87a4c2f16d5d912a31805de332
Add description to IPNetworkField
Kromey/piroute,Kromey/piroute,Kromey/piroute
helpers/models.py
helpers/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ from . import validators # Create your models here. class IPNetworkField(models.CharField): description = _("IP address or network") def __init__(self, *args, **kwargs): kwargs['max_length'] = 18 self.default_validators = [validators.validate_ipv4_network] super().__init__(*args, **kwargs) def deconstruct(self): name, path, args, kwargs = super().deconstruct() del kwargs['max_length'] return name, path, args, kwargs
from django.db import models from . import validators # Create your models here. class IPNetworkField(models.CharField): def __init__(self, *args, **kwargs): kwargs['max_length'] = 18 self.default_validators = [validators.validate_ipv4_network] super().__init__(*args, **kwargs) def deconstruct(self): name, path, args, kwargs = super().deconstruct() del kwargs['max_length'] return name, path, args, kwargs
mit
Python
18618a56ce674c479a0737dcabd4a47913ae2dde
Add functionality to copy any missing files to the other folder
itko/itko.github.io,itko/itko.github.io,itko/itko.github.io,itko/itko.github.io
scripts/compare_dir.py
scripts/compare_dir.py
import os from shutil import copyfile FOLDER_A = '/media/itto/TOSHIBA EXT/Photos/Southeast Asia' FOLDER_B = '/media/itto/disk/PRIVATE/AVCHD/BDMV/STREAM' files_a = [] files_b = [] for dirpath, dirnames, filenames in os.walk(FOLDER_A): files_a += filenames for dirpath, dirnames, filenames in os.walk(FOLDER_B): files_b += filenames inA_notB = [] inB_notA = [] for file in files_b: if file not in files_a: inB_notA.append(file) for file in files_a: if file not in files_b: inA_notB.append(file) print('{} in Folder A. {} in Folder B.'.format(len(files_a), len(files_b))) print('In A but not B: {}'.format(len(inA_notB))) print('In B but not A: {}'.format(len(inB_notA))) def EnsureFolder(path): if os.path.isdir(path): pass else: # Make folder os.mkdir(path) def CopyLeftoverFromBToA(): for file in inB_notA: EnsureFolder(os.path.join(FOLDER_A, 'transfer')) src = os.path.join(FOLDER_B, file) dst = os.path.join(FOLDER_A, 'transfer', file) if not os.path.exists(dst): print('Copying {}'.format(file)) copyfile(src, dst) else: print('{} previously copied'.format(file))
import os dropboxFiles = [] localFiles = [] for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'): dropboxFiles += filenames for dirpath, dirnames, filenames in os.walk( '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'): if ('Process' not in dirpath): localFiles += filenames localNotInDropbox = [] for file in localFiles: if file not in dropboxFiles: localNotInDropbox.append(file) print('************') for file in dropboxFiles: if file not in localFiles: print(file) print(len(localNotInDropbox))
mit
Python
b40d9aaf107fadc477d0a8463c25945c2e83153c
Make it easier to override has_sudo_privileges check in middleware
edx/django-sudo,waheedahmed/django-sudo,mattrobenolt/django-sudo
django_sudo/middleware.py
django_sudo/middleware.py
""" django_sudo.middleware ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2014 by Matt Robenolt. :license: BSD, see LICENSE for more details. """ from django_sudo import COOKIE_NAME from django_sudo.utils import has_sudo_privileges class SudoMiddleware(object): def has_sudo_privileges(self, request): ## Override me to alter behavior return has_sudo_privileges(request) def process_request(self, request): assert hasattr(request, 'session'), 'django_sudo depends on SessionMiddleware!' request.is_sudo = lambda: self.has_sudo_privileges(request) def process_response(self, request, response): is_sudo = getattr(request, '_sudo', None) if is_sudo is None: return response # We have explicitly had sudo revoked, so clean up cookie if is_sudo is False and COOKIE_NAME in request.COOKIES: response.delete_cookie(COOKIE_NAME) return response # Sudo mode has been granted, and we have a token to send back to the user agent if is_sudo is True and hasattr(request, '_sudo_token'): token = request._sudo_token max_age = request._sudo_max_age response.set_cookie( COOKIE_NAME, token, max_age=max_age, # If max_age is None, it's a session cookie secure=request.is_secure(), httponly=True, # Not accessible by JavaScript ) return response
""" django_sudo.middleware ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2014 by Matt Robenolt. :license: BSD, see LICENSE for more details. """ from django_sudo import COOKIE_NAME from django_sudo.utils import has_sudo_privileges class SudoMiddleware(object): def process_request(self, request): assert hasattr(request, 'session'), 'django_sudo depends on SessionMiddleware!' request.is_sudo = lambda: has_sudo_privileges(request) def process_response(self, request, response): is_sudo = getattr(request, '_sudo', None) if is_sudo is None: return response # We have explicitly had sudo revoked, so clean up cookie if is_sudo is False and COOKIE_NAME in request.COOKIES: response.delete_cookie(COOKIE_NAME) return response # Sudo mode has been granted, and we have a token to send back to the user agent if is_sudo is True and hasattr(request, '_sudo_token'): token = request._sudo_token max_age = request._sudo_max_age response.set_cookie( COOKIE_NAME, token, max_age=max_age, # If max_age is None, it's a session cookie secure=request.is_secure(), httponly=True, # Not accessible by JavaScript ) return response
bsd-3-clause
Python
31231afea71b3fd9213b39cf1bb32e10b2a9e843
Add Bitpay config model to Django Admin panel
intelligenia/django-virtual-pos,intelligenia/django-virtual-pos,intelligenia/django-virtual-pos
djangovirtualpos/admin.py
djangovirtualpos/admin.py
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal, VPOSBitpay admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.register(VPOSRedsys) admin.site.register(VPOSPaypal) admin.site.register(VPOSSantanderElavon) admin.site.register(VPOSBitpay)
# coding=utf-8 from django.contrib import admin from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal admin.site.register(VirtualPointOfSale) admin.site.register(VPOSRefundOperation) admin.site.register(VPOSCeca) admin.site.register(VPOSRedsys) admin.site.register(VPOSPaypal) admin.site.register(VPOSSantanderElavon)
mit
Python
3811543581d8c0ce31f7db332444f31802e68b46
Bump version to 0.1a15
letuananh/chirptext,letuananh/chirptext
chirptext/__version__.py
chirptext/__version__.py
# -*- coding: utf-8 -*- # chirptext's package version information __author__ = "Le Tuan Anh" __email__ = "[email protected]" __copyright__ = "Copyright (c) 2012, Le Tuan Anh" __credits__ = [] __license__ = "MIT License" __description__ = "ChirpText is a collection of text processing tools for Python." __url__ = "https://github.com/letuananh/chirptext" __maintainer__ = "Le Tuan Anh" __version_major__ = "0.1" __version__ = "{}a15".format(__version_major__) __version_long__ = "{} - Alpha".format(__version_major__) __status__ = "Prototype"
# -*- coding: utf-8 -*- # chirptext's package version information __author__ = "Le Tuan Anh" __email__ = "[email protected]" __copyright__ = "Copyright (c) 2012, Le Tuan Anh" __credits__ = [] __license__ = "MIT License" __description__ = "ChirpText is a collection of text processing tools for Python." __url__ = "https://github.com/letuananh/chirptext" __maintainer__ = "Le Tuan Anh" __version_major__ = "0.1" __version__ = "{}a14".format(__version_major__) __version_long__ = "{} - Alpha".format(__version_major__) __status__ = "Prototype"
mit
Python
ef15a8ba699e10b9f2d059669b63af6f4c768d39
Change to console command prompt
joshuaprince/Cassoundra,joshuaprince/Cassoundra,joshuaprince/Cassoundra
casspy/admin_commands.py
casspy/admin_commands.py
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command = await loop.run_in_executor(None, input) if str(command).split(" ")[0].lower() == "shutdown": return print(await handle(command)) async def handle(cmd: str) -> str: tok = cmd.split(' ') try: if tok[0].lower() == 'shutdown': return await cmd_shutdown() elif tok[0].lower() == 'say': return await cmd_say(tok[1], ' '.join(tok[2:])) else: return "Unknown command " + tok[0] + "." except IndexError: pass async def cmd_shutdown() -> str: raise KeyboardInterrupt async def cmd_say(channel: str, content: str) -> str: ch = cassoundra.client.get_channel(channel) if ch is None: return '<#{}>: I couldn\'t find that channel!'.format(channel) if ch.type == discord.ChannelType.voice: return '<#{}>: Is a voice channel.'.format(channel) await cassoundra.client.send_message(ch, content) return '<#{}>: "{}"'.format(channel, content)
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Cassoundra: admin-commands ~~~~~~~~~~ Module to handle special commands to control the bot once it is already running. Created by Joshua Prince, 2017 """ import discord from casspy import cassoundra async def process_input(loop): while True: command = await loop.run_in_executor(None, input, "> ") if str(command).split(" ")[0].lower() == "shutdown": return print(await handle(command)) async def handle(cmd: str) -> str: tok = cmd.split(' ') try: if tok[0].lower() == 'shutdown': return await cmd_shutdown() elif tok[0].lower() == 'say': return await cmd_say(tok[1], ' '.join(tok[2:])) else: return "Unknown command " + tok[0] + "." except IndexError: pass async def cmd_shutdown() -> str: raise KeyboardInterrupt async def cmd_say(channel: str, content: str) -> str: ch = cassoundra.client.get_channel(channel) if ch is None: return '<#{}>: I couldn\'t find that channel!'.format(channel) if ch.type == discord.ChannelType.voice: return '<#{}>: Is a voice channel.'.format(channel) await cassoundra.client.send_message(ch, content) return '<#{}>: "{}"'.format(channel, content)
mit
Python
2d8570f35dd507236d9c3bdc9209da248f572ef2
update version
Netflix-Skunkworks/cloudaux
cloudaux/__about__.py
cloudaux/__about__.py
__all__ = [ '__title__', '__summary__', '__uri__', '__version__', '__author__', '__email__', '__license__', '__copyright__' ] __title__ = 'cloudaux' __summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers' __uri__ = 'https://github.com/Netflix-Skunkworks/cloudaux' __version__ = '1.5.1' __author__ = 'The Cloudaux Developers' __email__ = '[email protected]' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2018 %s' % __author__
__all__ = [ '__title__', '__summary__', '__uri__', '__version__', '__author__', '__email__', '__license__', '__copyright__' ] __title__ = 'cloudaux' __summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers' __uri__ = 'https://github.com/Netflix-Skunkworks/cloudaux' __version__ = '1.4.19' __author__ = 'The Cloudaux Developers' __email__ = '[email protected]' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2018 %s' % __author__
apache-2.0
Python
11aa00c96a456c3e3bb9699fc96c61ebbe7574d4
fix removal of temp file
lubosz/cerbero,brion/cerbero,EricssonResearch/cerbero,freedesktop-unofficial-mirror/gstreamer__sdk__cerbero,AlertMe/cerbero,shoreflyer/cerbero,brion/cerbero,sdroege/cerbero,atsushieno/cerbero,ford-prefect/cerbero,atsushieno/cerbero,freedesktop-unofficial-mirror/gstreamer__cerbero,freedesktop-unofficial-mirror/gstreamer__cerbero,freedesktop-unofficial-mirror/gstreamer__cerbero,ikonst/cerbero,centricular/cerbero,EricssonResearch/cerbero,sdroege/cerbero,superdump/cerbero,brion/cerbero,lubosz/cerbero,ramaxlo/cerbero,atsushieno/cerbero,flexVDI/cerbero,nirbheek/cerbero,flexVDI/cerbero,ikonst/cerbero,shoreflyer/cerbero,justinjoy/cerbero,fluendo/cerbero,sdroege/cerbero,nirbheek/cerbero-old,nirbheek/cerbero-old,jackjansen/cerbero,freedesktop-unofficial-mirror/gstreamer__cerbero,superdump/cerbero,GStreamer/cerbero,multipath-rtp/cerbero,GStreamer/cerbero,AlertMe/cerbero,OptoFidelity/cerbero,nirbheek/cerbero-old,nirbheek/cerbero,jackjansen/cerbero,ikonst/cerbero,nirbheek/cerbero,AlertMe/cerbero,atsushieno/cerbero,ramaxlo/cerbero,shoreflyer/cerbero,nzjrs/cerbero,ford-prefect/cerbero,sdroege/cerbero,sdroege/cerbero,justinjoy/cerbero,AlertMe/cerbero,nirbheek/cerbero-old,lubosz/cerbero,lubosz/cerbero,fluendo/cerbero,GStreamer/cerbero,centricular/cerbero,nirbheek/cerbero,nzjrs/cerbero,jackjansen/cerbero,GStreamer/cerbero,fluendo/cerbero,ramaxlo/cerbero,superdump/cerbero,freedesktop-unofficial-mirror/gstreamer__sdk__cerbero,fluendo/cerbero,ford-prefect/cerbero,shoreflyer/cerbero,GStreamer/cerbero,justinjoy/cerbero,flexVDI/cerbero,flexVDI/cerbero,brion/cerbero,OptoFidelity/cerbero,freedesktop-unofficial-mirror/gstreamer__sdk__cerbero,ford-prefect/cerbero,superdump/cerbero,atsushieno/cerbero,EricssonResearch/cerbero,EricssonResearch/cerbero,nzjrs/cerbero,multipath-rtp/cerbero,fluendo/cerbero,multipath-rtp/cerbero,centricular/cerbero,OptoFidelity/cerbero,OptoFidelity/cerbero,brion/cerbero,centricular/cerbero,freedesktop-unofficial-mirror/gstreamer__sdk__cerbero,ramaxlo/cerbero,AlertMe/cerbero,multipath-rtp/cerbero,multipath-rtp/cerbero,justinjoy/cerbero,nzjrs/cerbero,flexVDI/cerbero,nzjrs/cerbero,EricssonResearch/cerbero,shoreflyer/cerbero,ikonst/cerbero,ikonst/cerbero,ramaxlo/cerbero,centricular/cerbero,jackjansen/cerbero
cerbero/bootstrap/osx.py
cerbero/bootstrap/osx.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. import os import tempfile import shutil from cerbero.bootstrap import BootstrapperBase from cerbero.bootstrap.bootstrapper import register_bootstrapper from cerbero.config import Distro, DistroVersion from cerbero.utils import shell class OSXBootstrapper (BootstrapperBase): GCC_BASE_URL = 'https://github.com/downloads/kennethreitz/'\ 'osx-gcc-installer/' GCC_TAR = { DistroVersion.OS_X_MOUNTAIN_LION: 'GCC-10.7-v2.pkg', DistroVersion.OS_X_LION: 'GCC-10.7-v2.pkg', DistroVersion.OS_X_SNOW_LEOPARD: 'GCC-10.6.pkg'} CPANM_URL = 'https://raw.github.com/miyagawa/cpanminus/master/cpanm' def start(self): # skip system package install if not needed if not self.config.distro_packages_install: return self._install_perl_deps() # FIXME: enable it when buildbots are properly configured return tar = self.GCC_TAR[self.config.distro_version] url = os.path.join(self.GCC_BASE_URL, tar) pkg = os.path.join(self.config.local_sources, tar) shell.download(url, pkg, check_cert=False) shell.call('sudo installer -pkg %s -target /' % pkg) def _install_perl_deps(self): # Install cpan-minus, a zero-conf CPAN wrapper cpanm_installer = tempfile.NamedTemporaryFile() shell.download(self.CPANM_URL, cpanm_installer.name) shell.call('chmod +x %s' % cpanm_installer.name) # Install XML::Parser, required for intltool shell.call("sudo %s XML::Parser" % cpanm_installer.name) cpanm_installer.close() def register_all(): register_bootstrapper(Distro.OS_X, OSXBootstrapper)
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. import os import tempfile import shutil from cerbero.bootstrap import BootstrapperBase from cerbero.bootstrap.bootstrapper import register_bootstrapper from cerbero.config import Distro, DistroVersion from cerbero.utils import shell class OSXBootstrapper (BootstrapperBase): GCC_BASE_URL = 'https://github.com/downloads/kennethreitz/'\ 'osx-gcc-installer/' GCC_TAR = { DistroVersion.OS_X_MOUNTAIN_LION: 'GCC-10.7-v2.pkg', DistroVersion.OS_X_LION: 'GCC-10.7-v2.pkg', DistroVersion.OS_X_SNOW_LEOPARD: 'GCC-10.6.pkg'} CPANM_URL = 'https://raw.github.com/miyagawa/cpanminus/master/cpanm' def start(self): # skip system package install if not needed if not self.config.distro_packages_install: return self._install_perl_deps() # FIXME: enable it when buildbots are properly configured return tar = self.GCC_TAR[self.config.distro_version] url = os.path.join(self.GCC_BASE_URL, tar) pkg = os.path.join(self.config.local_sources, tar) shell.download(url, pkg, check_cert=False) shell.call('sudo installer -pkg %s -target /' % pkg) def _install_perl_deps(self): # Install cpan-minus, a zero-conf CPAN wrapper cpanm_installer = tempfile.NamedTemporaryFile().name shell.download(self.CPANM_URL, cpanm_installer) shell.call('chmod +x %s' % cpanm_installer) # Install XML::Parser, required for intltool shell.call("sudo %s XML::Parser" % cpanm_installer) cpanm_installer.close() def register_all(): register_bootstrapper(Distro.OS_X, OSXBootstrapper)
lgpl-2.1
Python
d5a9d238ebdb312d3bc69071227175d0d49756a9
Fix the security filtering to handle None as a severity.
dlorenc/runtimes-common,sharifelgamal/runtimes-common,nkubala/runtimes-common,GoogleCloudPlatform/runtimes-common,GoogleCloudPlatform/runtimes-common,sharifelgamal/runtimes-common,GoogleCloudPlatform/runtimes-common,dlorenc/runtimes-common,duggelz/runtimes-common,cftorres/runtimes-common,huyhg/runtimes-common,nkubala/runtimes-common,duggelz/runtimes-common,sharifelgamal/runtimes-common,priyawadhwa/runtimes-common,nkubala/runtimes-common,sharifelgamal/runtimes-common,nkubala/runtimes-common,sharifelgamal/runtimes-common,sharifelgamal/runtimes-common,priyawadhwa/runtimes-common,abbytiz/runtimes-common,cftorres/runtimes-common,priyawadhwa/runtimes-common,priyawadhwa/runtimes-common,huyhg/runtimes-common,cftorres/runtimes-common,priyawadhwa/runtimes-common,duggelz/runtimes-common,abbytiz/runtimes-common,sharifelgamal/runtimes-common,abbytiz/runtimes-common,dlorenc/runtimes-common,nkubala/runtimes-common,huyhg/runtimes-common,priyawadhwa/runtimes-common,priyawadhwa/runtimes-common
security_check/main.py
security_check/main.py
"""Checks the specified image for security vulnerabilities.""" import argparse import json import logging import sys import subprocess _GCLOUD_CMD = ['gcloud', 'beta', 'container', 'images', '--format=json'] # Severities _LOW = 'LOW' _MEDIUM = 'MEDIUM' _HIGH = 'HIGH' _CRITICAL = 'CRITICAL' _SEV_MAP = { _LOW: 0, _MEDIUM: 1, _HIGH: 2, _CRITICAL: 3, } def _run_gcloud(cmd): full_cmd = _GCLOUD_CMD + cmd output = subprocess.check_output(full_cmd) return json.loads(output) def _check_image(image, severity): digest = _resolve_latest(image) full_name = '%s@%s' % (image, digest) parsed = _run_gcloud(['describe', full_name]) unpatched = 0 for vuln in parsed.get('vulz_analysis', {}).get('FixesAvailable', []): if _filter_severity(vuln['severity'], severity): unpatched += 1 if unpatched: logging.info('Found %s unpatched vulnerabilities in %s. Run ' '[gcloud beta container images describe %s] ' 'to see the full list.', unpatched, image, full_name) return unpatched def _resolve_latest(image): parsed = _run_gcloud(['list-tags', image, '--no-show-occurrences']) for digest in parsed: if 'latest' in digest['tags']: return digest['digest'] raise Exception("Unable to find digest of 'latest' tag for %s" % image) def _filter_severity(sev1, sev2): """Returns whether sev1 is higher than sev2""" return _SEV_MAP.get(sev1, _LOW) >= _SEV_MAP.get(sev2, _LOW) def _main(): parser = argparse.ArgumentParser() parser.add_argument('image', help='The image to test') parser.add_argument('--severity', choices=[_LOW, _MEDIUM, _HIGH, _CRITICAL], default=_MEDIUM, help='The minimum severity to filter on.') args = parser.parse_args() logging.basicConfig(level=logging.DEBUG) return _check_image(args.image, args.severity) if __name__ == '__main__': sys.exit(_main())
"""Checks the specified image for security vulnerabilities.""" import argparse import json import logging import sys import subprocess _GCLOUD_CMD = ['gcloud', 'beta', 'container', 'images', '--format=json'] # Severities _LOW = 'LOW' _MEDIUM = 'MEDIUM' _HIGH = 'HIGH' _SEV_MAP = { _LOW: 0, _MEDIUM: 1, _HIGH: 2 } def _run_gcloud(cmd): full_cmd = _GCLOUD_CMD + cmd output = subprocess.check_output(full_cmd) return json.loads(output) def _check_image(image, severity): digest = _resolve_latest(image) full_name = '%s@%s' % (image, digest) parsed = _run_gcloud(['describe', full_name]) unpatched = 0 for vuln in parsed['vulz_analysis']['FixesAvailable']: if _filter_severity(vuln['severity'], severity): unpatched += 1 if unpatched: logging.info('Found %s unpatched vulnerabilities in %s. Run ' '[gcloud beta container images describe %s] ' 'to see the full list.', unpatched, image, full_name) return unpatched def _resolve_latest(image): parsed = _run_gcloud(['list-tags', image, '--no-show-occurrences']) for digest in parsed: if 'latest' in digest['tags']: return digest['digest'] raise Exception("Unable to find digest of 'latest' tag for %s" % image) def _filter_severity(sev1, sev2): """Returns whether sev1 is higher than sev2""" return _SEV_MAP[sev1] > _SEV_MAP[sev2] def _main(): parser = argparse.ArgumentParser() parser.add_argument('image', help='The image to test') parser.add_argument('--severity', choices=[_LOW, _MEDIUM, _HIGH], default=_MEDIUM, help='The minimum severity to filter on.') args = parser.parse_args() logging.basicConfig(level=logging.DEBUG) return _check_image(args.image, args.severity) if __name__ == '__main__': sys.exit(_main())
apache-2.0
Python
da9a50ad2d5a5a254c7a842407d046485e410057
Drop excessive import
fusionbox/satchless,fusionbox/satchless,taedori81/satchless,fusionbox/satchless
satchless/util/__init__.py
satchless/util/__init__.py
from decimal import Decimal def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decimal_places: digits.append(0) have_decimal_places += 1 while have_decimal_places > min_decimal_places and not digits[-1]: digits = digits[:-1] have_decimal_places -= 1 return Decimal((decimal_tuple.sign, digits, -have_decimal_places))
from decimal import Decimal import locale def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decimal_places: digits.append(0) have_decimal_places += 1 while have_decimal_places > min_decimal_places and not digits[-1]: digits = digits[:-1] have_decimal_places -= 1 return Decimal((decimal_tuple.sign, digits, -have_decimal_places))
bsd-3-clause
Python
b32eab807b54c9c378542474631b3bdbced94456
add filter
s0hvaperuna/Not-a-bot
cogs/r9k.py
cogs/r9k.py
import asyncio import logging import re from cogs.cog import Cog from utils import unzalgo logger = logging.getLogger('terminal') class R9K(Cog): def __init__(self, bot): super().__init__(bot) self._messages = [] self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), loop=bot.loop) self.emote_regex = re.compile(r'<:(\w+):\d+>') def cog_unload(self): self._update_task.cancel() try: self._update_task.result(timeout=20) except (TimeoutError, asyncio.CancelledError): pass async def _update_loop(self): while True: if not self._messages: await asyncio.sleep(10) continue messages = self._messages self._messages = [] try: sql = 'INSERT INTO r9k (message) VALUES ($1) ON CONFLICT DO NOTHING' await self.bot.dbutil.execute(sql, messages, insertmany=True) except: logger.exception('Failed to insert r9k') await asyncio.sleep(10) @Cog.listener() async def on_message(self, msg): if not msg.guild or msg.guild.id != 217677285442977792: return # Don't wanna log bot messages if msg.author.bot: return # Gets the content like you see in the client content = msg.clean_content # Remove zalgo text content = unzalgo.unzalgo(content) content = self.emote_regex.sub(r'\1', content) self._messages.append((content,)) if self._update_task.done(): self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), loop=self.bot.loop) def setup(bot): bot.add_cog(R9K(bot))
import asyncio import logging import re from cogs.cog import Cog from utils import unzalgo logger = logging.getLogger('terminal') class R9K(Cog): def __init__(self, bot): super().__init__(bot) self._messages = [] self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), loop=bot.loop) self.emote_regex = re.compile(r'<:(\w+):\d+>') def cog_unload(self): self._update_task.cancel() try: self._update_task.result(timeout=20) except (TimeoutError, asyncio.CancelledError): pass async def _update_loop(self): while True: if not self._messages: await asyncio.sleep(10) continue messages = self._messages self._messages = [] try: sql = 'INSERT INTO r9k (message) VALUES ($1) ON CONFLICT DO NOTHING' await self.bot.dbutil.execute(sql, messages, insertmany=True) except: logger.exception('Failed to insert r9k') await asyncio.sleep(10) @Cog.listener() async def on_message(self, msg): # Don't wanna log bot messages if msg.author.bot: return # Gets the content like you see in the client content = msg.clean_content # Remove zalgo text content = unzalgo.unzalgo(content) content = self.emote_regex.sub(r'\1', content) self._messages.append((content,)) if self._update_task.done(): self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), loop=self.bot.loop) def setup(bot): bot.add_cog(R9K(bot))
mit
Python
75c0861608871de2a2b1a6b4f2ea89c800dd8c07
Make verbose loading messages optional
laffra/pava,laffra/pava
pava/implementation/__init__.py
pava/implementation/__init__.py
import new import sys DEBUG = False method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count if DEBUG: print 'define', name, method_count method_count += 1 globals_dict = {} for module_name in modules: if not '[' in module_name and not '.' in module_name: globals_dict[module_name] = __import__(module_name, {}) code = new.code(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab) method = new.function(code, globals_dict, name) return staticmethod(method) if static else method nan = None inf = sys.maxint
import sys method_count = 0 def method(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab, modules, static): global method_count print 'define', name, method_count method_count += 1 globals_dict = {} for module_name in modules: if not '[' in module_name and not '.' in module_name: globals_dict[module_name] = __import__(module_name, {}) code = new.code(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab) method = new.function(code, globals_dict, name) return staticmethod(method) if static else method nan = None inf = sys.maxint
mit
Python
c62d69249f7413e2142f7147ccce0872dbbae90a
Fix nipap CLI setup.py to include man file
fredsod/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,SoundGoof/NIPAP,plajjan/NIPAP,bbaja42/NIPAP,plajjan/NIPAP,bbaja42/NIPAP,SpriteLink/NIPAP,garberg/NIPAP,garberg/NIPAP,bbaja42/NIPAP,ettrig/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,garberg/NIPAP,bbaja42/NIPAP,plajjan/NIPAP,ettrig/NIPAP,ettrig/NIPAP,ettrig/NIPAP,fredsod/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP,garberg/NIPAP,garberg/NIPAP,SoundGoof/NIPAP,fredsod/NIPAP,plajjan/NIPAP,plajjan/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,plajjan/NIPAP,fredsod/NIPAP,SpriteLink/NIPAP,garberg/NIPAP,fredsod/NIPAP
nipap-cli/setup.py
nipap-cli/setup.py
#!/usr/bin/env python from distutils.core import setup import subprocess import sys import nipap_cli # return all the extra data files def get_data_files(): # This is a bloody hack to circumvent a lack of feature with Python distutils. # Files specified in the data_files list cannot be renamed upon installation # and we don't want to keep two copies of the .nipaprc file in git import shutil shutil.copyfile('nipaprc', '.nipaprc') # generate man pages using rst2man try: subprocess.call(["rst2man", "nipap.man.rst", "nipap.1"]) subprocess.call(["gzip", "-f", "-9", "nipap.1"]) except OSError as exc: print >> sys.stderr, "rst2man failed to run:", str(exc) sys.exit(1) files = [ ('/etc/nipap/', ['local_auth.db', 'nipap.conf']), ('/usr/sbin/', ['nipapd', 'nipap-passwd']), ('/usr/share/nipap/sql/', [ 'sql/functions.plsql', 'sql/ip_net.plsql', 'sql/clean.plsql' ]), ('/usr/share/man/man1/', 'nipap.1.gz') ] return files setup( name = 'nipap-cli', version = nipap_cli.__version__, description = "NIPAP shell command", long_description = "A shell command to interact with NIPAP.", author = nipap_cli.__author__, author_email = nipap_cli.__author_email__, license = nipap_cli.__license__, url = nipap_cli.__url__, packages = [ 'nipap_cli', ], keywords = ['nipap_cli', ], requires = ['pynipap', ], data_files = [ ('/etc/skel/', ['.nipaprc']), ('/usr/bin/', ['helper-nipap', 'nipap']), ('/usr/share/doc/nipap-cli/', ['bash_complete', 'nipaprc']) ], classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: Telecommunications Industry', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 2.6', 'Topic :: Internet' ] ) # Remove the .nipaprc put the by the above hack. import os os.remove('.nipaprc')
#!/usr/bin/env python from distutils.core import setup import nipap_cli # This is a bloody hack to circumvent a lack of feature with Python distutils. # Files specified in the data_files list cannot be renamed upon installation # and we don't want to keep two copies of the .nipaprc file in git import shutil shutil.copyfile('nipaprc', '.nipaprc') setup( name = 'nipap-cli', version = nipap_cli.__version__, description = "NIPAP shell command", long_description = "A shell command to interact with NIPAP.", author = nipap_cli.__author__, author_email = nipap_cli.__author_email__, license = nipap_cli.__license__, url = nipap_cli.__url__, packages = [ 'nipap_cli', ], keywords = ['nipap_cli', ], requires = ['pynipap', ], data_files = [ ('/etc/skel/', ['.nipaprc']), ('/usr/bin/', ['helper-nipap', 'nipap']), ('/usr/share/doc/nipap-cli/', ['bash_complete', 'nipaprc']) ], classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: Telecommunications Industry', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 2.6', 'Topic :: Internet' ] ) # Remove the .nipaprc put the by the above hack. import os os.remove('.nipaprc')
mit
Python
b16d5c08b5766e40fbf1773e3490dce461b20098
Exit code as int.
cf-platform-eng/aws-pcf-quickstart,cf-platform-eng/aws-pcf-quickstart,cf-platform-eng/aws-pcf-quickstart
ci/github-pullrequest.py
ci/github-pullrequest.py
import json import sys import os import requests token = os.environ['GITHUB_ACCESS_TOKEN'] with open('version/version') as version_file: version = version_file.read() print("Making PR request to this release {}".format(version)) response = requests.post( url='https://api.github.com/repos/aws-quickstart/quickstart-pivotal-cloudfoundry/pulls', data=json.dumps({ "title": "PR via CI updating to release {}".format(version), "body": "Please pull this in!", "head": "cf-platform-eng:develop", "base": "develop" }), headers={ 'Authorization': 'Token {}'.format(token), 'Content-Type': 'application/json', } ) print(response.status_code) if response.status_code < 300: sys.exit(0) else: sys.exit(1)
import json import sys import os import requests token = os.environ['GITHUB_ACCESS_TOKEN'] with open('version/version') as version_file: version = version_file.read() print("Making PR request to this release {}".format(version)) response = requests.post( url='https://api.github.com/repos/aws-quickstart/quickstart-pivotal-cloudfoundry/pulls', data=json.dumps({ "title": "PR via CI updating to release {}".format(version), "body": "Please pull this in!", "head": "cf-platform-eng:develop", "base": "develop" }), headers={ 'Authorization': 'Token {}'.format(token), 'Content-Type': 'application/json', } ) print(response.status_code) print(response) sys.exit(response.status_code < 300)
apache-2.0
Python
b1bc019320eaa8ceb7a70eca21b20fcda9cf609e
Add a timeout to the nginx cache clearing request
NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm
ckanext/nhm/lib/cache.py
ckanext/nhm/lib/cache.py
# !/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK import logging import requests from ckan.plugins import toolkit log = logging.getLogger(__name__) def cache_clear_nginx_proxy(): '''Clear NGINX Proxy Cache - issue PURGE request to load balancer.''' url = toolkit.config.get(u'ckan.site_url') # Prepare a PURGE request to send to front end proxy req = requests.Request(u'PURGE', url) s = requests.Session() try: r = s.send(req.prepare(), timeout=0.5) r.raise_for_status() except: log.critical(u'Error clearing NGINX Cache')
# !/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK import logging import requests from ckan.plugins import toolkit log = logging.getLogger(__name__) def cache_clear_nginx_proxy(): '''Clear NGINX Proxy Cache - issue PURGE request to load balancer.''' url = toolkit.config.get(u'ckan.site_url') # Prepare a PURGE request to send to front end proxy req = requests.Request(u'PURGE', url) s = requests.Session() try: r = s.send(req.prepare()) r.raise_for_status() except: log.critical(u'Error clearing NGINX Cache')
mit
Python
c7990836b51cc5e05c5ae3bd49a316c418bac44e
Revert "redirect www.storycheck.co.za to storycheck.co.za"
Code4SA/redirects
code4sa/middleware.py
code4sa/middleware.py
from django.http import HttpResponse, HttpResponsePermanentRedirect, Http404 import newrelic.agent class RedirectsMiddleware(object): redirects = { # domain (without www.) -> full new URL 'living-wage.code4sa.org': 'http://livingwage.code4sa.org/', 'livingwagestory.code4sa.org': 'http://livingwage.code4sa.org/', 'maps.code4sa.org': 'http://mapit.code4sa.org/', 'compliancetracker.org.za': 'http://muni.compliancetracker.org.za/', 'wazimap.org': 'http://wazimap.co.za', 'wazimap.com': 'http://wazimap.co.za', 'wazimap.info': 'http://wazimap.co.za', 'info.speakupmzansi.org.za': 'http://speakupmzansi.org.za', 'speakupmzansi.co.za': 'http://speakupmzansi.org.za', 'speakupmzansi.org': 'http://speakupmzansi.org.za', 'speakup.org.za': 'http://speakupmzansi.org.za', 'hackforwater.org.za': 'http://www.hack4water.org.za', # this redirects www -> non-www 'vote4thebudget.org': 'http://vote4thebudget.org', # this redirects non-www -> www 'hack4water.org.za': 'http://www.hack4water.org.za', } def process_request(self, request): host = request.get_host() if host.startswith("www."): host = host[4:] if host in self.redirects: return HttpResponsePermanentRedirect(self.redirects[host]) if request.path == '/ping': newrelic.agent.ignore_transaction() return HttpResponse('pong') raise Http404()
from django.http import HttpResponse, HttpResponsePermanentRedirect, Http404 import newrelic.agent class RedirectsMiddleware(object): redirects = { # domain (without www.) -> full new URL 'living-wage.code4sa.org': 'http://livingwage.code4sa.org/', 'livingwagestory.code4sa.org': 'http://livingwage.code4sa.org/', 'maps.code4sa.org': 'http://mapit.code4sa.org/', 'compliancetracker.org.za': 'http://muni.compliancetracker.org.za/', 'wazimap.org': 'http://wazimap.co.za', 'wazimap.com': 'http://wazimap.co.za', 'wazimap.info': 'http://wazimap.co.za', 'info.speakupmzansi.org.za': 'http://speakupmzansi.org.za', 'speakupmzansi.co.za': 'http://speakupmzansi.org.za', 'speakupmzansi.org': 'http://speakupmzansi.org.za', 'speakup.org.za': 'http://speakupmzansi.org.za', 'hackforwater.org.za': 'http://www.hack4water.org.za', # this redirects www -> non-www 'vote4thebudget.org': 'http://vote4thebudget.org', 'storycheck.co.za': 'http://storycheck.co.za', # this redirects non-www -> www 'hack4water.org.za': 'http://www.hack4water.org.za', } def process_request(self, request): host = request.get_host() if host.startswith("www."): host = host[4:] if host in self.redirects: return HttpResponsePermanentRedirect(self.redirects[host]) if request.path == '/ping': newrelic.agent.ignore_transaction() return HttpResponse('pong') raise Http404()
mit
Python
7e6dc283dbecf4bf9674559198b4a2c06e9f4c2e
Fix unicode import in test
aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,honnibal/spaCy,spacy-io/spaCy
spacy/tests/regression/test_issue1799.py
spacy/tests/regression/test_issue1799.py
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' from __future__ import unicode_literals import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = numpy.asarray([[1, 397], [4, 436], [2, 426], [1, 402], [0, 8206900633647566924], [18446744073709551615, 440], [18446744073709551614, 442]], dtype='uint64') doc = Doc(Vocab(), words='Just what I was looking for .'.split()) doc.vocab.strings.add('ROOT') doc = doc.from_array([HEAD, DEP], heads_deps) assert len(list(doc.sents)) == 1
'''Test sentence boundaries are deserialized correctly, even for non-projective sentences.''' import pytest import numpy from ... tokens import Doc from ... vocab import Vocab from ... attrs import HEAD, DEP def test_issue1799(): problem_sentence = 'Just what I was looking for.' heads_deps = numpy.asarray([[1, 397], [4, 436], [2, 426], [1, 402], [0, 8206900633647566924], [18446744073709551615, 440], [18446744073709551614, 442]], dtype='uint64') doc = Doc(Vocab(), words='Just what I was looking for .'.split()) doc.vocab.strings.add('ROOT') doc = doc.from_array([HEAD, DEP], heads_deps) assert len(list(doc.sents)) == 1
mit
Python
a2f66370843658090ccca3fbdbb2ff9d12c7605a
Update to current spotpy code stlye
thouska/spotpy,thouska/spotpy,thouska/spotpy
spotpy/examples/tutorial_own_database.py
spotpy/examples/tutorial_own_database.py
''' Copyright 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska This example implements the Rosenbrock function into SPOT. ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import spotpy from spotpy.objectivefunctions import rmse class spot_setup(object): a = spotpy.parameter.Uniform(low=0, high=1) b = spotpy.parameter.Uniform(low=0, high=1) def __init__(self): self.db_headers = ["obj_functions", "parameters", "simulations"] self.database = open('MyOwnDatabase.txt', 'w') self.database.write("\t".join(self.db_headers) + "\n") def simulation(self, vector): x = np.array(vector) simulations = [sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0)] return simulations def evaluation(self): observations = [0] return observations def objectivefunction(self, simulation, evaluation): objectivefunction = -rmse(evaluation=evaluation, simulation=simulation) return objectivefunction def save(self, objectivefunctions, parameter, simulations, *args, **kwargs): param_str = "\t".join((str(p) for p in parameter)) sim_str = "\t".join((str(s) for s in simulations)) line = "\t".join([str(objectivefunctions), param_str, sim_str]) + '\n' self.database.write(line) if __name__ == "__main__": spot_setup = spot_setup() # set dbformat to custom and spotpy will return results in spot_setup.save function sampler = spotpy.algorithms.mc(spot_setup, dbformat='custom') sampler.sample(100) # Choose equal or less repetitions as you have parameters in your List spot_setup.database.close() # Close the created txt file
''' Copyright 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska This example implements the Rosenbrock function into SPOT. ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import spotpy from spotpy.objectivefunctions import rmse class spot_setup(object): slow = 1000 def __init__(self): self.params = [spotpy.parameter.List('x', [1, 2, 3, 4, 6, 7, 8, 9, 0]), #Give possible x values as a List spotpy.parameter.List('y', [0, 1, 2, 5, 7, 8, 9, 0, 1])] #Give possible y values as a List self.db_headers = ["obj_functions", "parameters", "simulations"] self.database = open('MyOwnDatabase.txt', 'w') self.database.write("\t".join(self.db_headers) + "\n") def parameters(self): return spotpy.parameter.generate(self.params) def simulation(self, vector): x = np.array(vector) for i in range(self.slow): _ = np.sin(i) simulations = [sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0)] return simulations def evaluation(self): observations = [0] return observations def objectivefunction(self, simulation, evaluation): objectivefunction = -rmse(evaluation=evaluation, simulation=simulation) return objectivefunction def save(self, objectivefunctions, parameter, simulations, *args, **kwargs): param_str = "|".join((str(p) for p in parameter)) sim_str = "|".join((str(s) for s in simulations)) line = "\t".join([str(objectivefunctions), param_str, sim_str]) + '\n' self.database.write(line) spot_setup = spot_setup() # Leave out dbformat and dbname and spotpy will return results in spot_setup.save function sampler = spotpy.algorithms.mc(spot_setup) sampler.sample(9) # Choose equal or less repetitions as you have parameters in your List spot_setup.database.close() # Close the created txt file
mit
Python
2ccdaf4ac5397a7fb1795cf3f3e52348e775dbbb
Bump version.
incuna/django-settingsjs,incuna/django-settingsjs
settingsjs/__init__.py
settingsjs/__init__.py
__version__ = (0, 1, 3) def get_version(): return '.'.join(map(str, __version__))
__version__ = (0, 1, 2) def get_version(): return '.'.join(map(str, __version__))
bsd-2-clause
Python
2b299ab6b26ab5f0cfdbe08d3bff57a03483ca93
update import script for Epsom & Ewell (closes #2134)
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_epsom_and_ewell.py
polling_stations/apps/data_collection/management/commands/import_epsom_and_ewell.py
from addressbase.models import Address from uk_geo_utils.helpers import Postcode from data_collection.github_importer import BaseGitHubImporter class Command(BaseGitHubImporter): srid = 27700 districts_srid = 27700 council_id = "E07000208" elections = ["parl.2019-12-12"] scraper_name = "wdiv-scrapers/DC-PollingStations-EpsomAndEwell" geom_type = "gml" # districts file has station address and UPRN for district # parse the districts file twice stations_query = "districts" def geocode_from_uprn(self, uprn, station_postcode): uprn = uprn.lstrip("0").strip() ab_rec = Address.objects.get(uprn=uprn) ab_postcode = Postcode(ab_rec.postcode) station_postcode = Postcode(station_postcode) if ab_postcode != station_postcode: print( "Using UPRN {uprn} for station ID but '{pc1}' != '{pc2}'".format( uprn=uprn, pc1=ab_postcode.with_space, pc2=station_postcode.with_space, ) ) return ab_rec.location def district_record_to_dict(self, record): poly = self.extract_geometry(record, self.geom_type, self.get_srid("districts")) return { "internal_council_id": record["wardcode"], "name": record["wardcode"], "area": poly, "polling_station_id": record["wardcode"], } def station_record_to_dict(self, record): postcode = " ".join(record["address"].split(" ")[-2:]) try: location = self.geocode_from_uprn(record["uprn"].strip(), postcode) except Address.DoesNotExist: location = None return { "internal_council_id": record["wardcode"], "address": record["address"], "postcode": "", "location": location, }
from addressbase.models import Address from uk_geo_utils.helpers import Postcode from data_collection.github_importer import BaseGitHubImporter class Command(BaseGitHubImporter): srid = 27700 districts_srid = 27700 council_id = "E07000208" elections = ["europarl.2019-05-23"] scraper_name = "wdiv-scrapers/DC-PollingStations-EpsomAndEwell" geom_type = "gml" # districts file has station address and UPRN for district # parse the districts file twice stations_query = "districts" def geocode_from_uprn(self, uprn, station_postcode): uprn = uprn.lstrip("0").strip() ab_rec = Address.objects.get(uprn=uprn) ab_postcode = Postcode(ab_rec.postcode) station_postcode = Postcode(station_postcode) if ab_postcode != station_postcode: print( "Using UPRN {uprn} for station ID but '{pc1}' != '{pc2}'".format( uprn=uprn, pc1=ab_postcode.with_space, pc2=station_postcode.with_space, ) ) return ab_rec.location def district_record_to_dict(self, record): poly = self.extract_geometry(record, self.geom_type, self.get_srid("districts")) return { "internal_council_id": record["wardcode"], "name": record["wardcode"], "area": poly, "polling_station_id": record["wardcode"], } def station_record_to_dict(self, record): postcode = " ".join(record["address"].split(" ")[-2:]) try: location = self.geocode_from_uprn(record["uprn"].strip(), postcode) except Address.DoesNotExist: location = None return { "internal_council_id": record["wardcode"], "address": record["address"], "postcode": "", "location": location, }
bsd-3-clause
Python
f4f600a82d652d25cb7fe8fcc3bbea8efa49c0b8
update help
alvare/chingolo-bot
commands.py
commands.py
import requests import random import config def help(): msg = """ *Command list* `/js <library>` - checks if library is cool or not `/help` - return this `/sadness` - cry """ return 'message', {'text': msg, 'parse_mode': 'Markdown'} def js(string): if string: return 'message', {'text': '{} is gay'.format(string)} else: return None, None def sadness(): url = 'https://api.tumblr.com/v2/blog/{}/posts/photo?api_key={}'\ .format('vaporwave.tumblr.com', config.TUMBLR_KEY) r = requests.get(url) if r.ok: data = r.json() post = random.choice(data['response']['posts']) text = post['summary'] url = post['photos'][0]['original_size']['url'] return 'photo', {'photo': url, 'caption': text} else: return None, None
import requests import random import config def help(): msg = """ *Commands:* `/js <library>`: checks if library is cool or not `/help`: return this """ return 'message', {'text': msg, 'parse_mode': 'Markdown'} def js(string): if string: return 'message', {'text': '{} is gay'.format(string)} else: return None, None def sadness(): url = 'https://api.tumblr.com/v2/blog/{}/posts/photo?api_key={}'\ .format('vaporwave.tumblr.com', config.TUMBLR_KEY) r = requests.get(url) if r.ok: data = r.json() post = random.choice(data['response']['posts']) text = post['summary'] url = post['photos'][0]['original_size']['url'] return 'photo', {'photo': url, 'caption': text} else: return None, None
mit
Python
0c5daf77caaa6674a011b94ac06c308dbb430cc5
add PDF and TXT minetype
yjlou/simple-restful
composer.py
composer.py
#!/usr/bin/python from types import * import db import json class Composer(): def __init__(self, output_format, db): self.output_format = output_format self.db = db def compose(self, content, path): if self.output_format == "JSON": if type(content) is ListType: # directory list, DIR return ("application/json; charset=UTF-8", json.dumps(content)) else: return ("application/json; charset=UTF-8", json.dumps({ "content": content, "last_modified": self.db.get_last_modified(path.split("/")), })) else: if type(content) is ListType: # directory list, DIR ret = "<HTML><BODY><UL>" for entry in content: if entry["type"] == db.Db.DIR: name = entry["name"] + "/" else: name = entry["name"] if path[-1] != "/": path = path + "/" link = "%s%s" % (path, entry["name"]) ret = ret + "<LI><A HREF='%s'>%s</A>" % (link, name) ret = ret + "</UL></BODY></HTML>" content_type = 'text/html' # TODO: Use magic lib to tell the MIME type. elif content.startswith('\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46'): content_type = 'image/jpeg' ret = content elif content.startswith('\x00\x00\x00\x20\x66\x74\x79\x70\x69'): content_type = 'video/mp4' ret = content elif content.startswith('\x52\x49\x46\x46'): content_type = 'video/avi' ret = content elif content.startswith('\x89\x50\x4e\x47\x0d\x0a'): content_type = 'image/png' ret = content elif path.endswith('.txt'): content_type = 'text/plain' ret = content elif path.endswith('.css'): content_type = 'text/css' ret = content elif path.endswith('.pdf'): content_type = 'application/x-pdf' ret = content else: content_type = 'text/html' ret = content return (content_type, ret)
#!/usr/bin/python from types import * import db import json class Composer(): def __init__(self, output_format, db): self.output_format = output_format self.db = db def compose(self, content, path): if self.output_format == "JSON": if type(content) is ListType: # directory list, DIR return ("application/json; charset=UTF-8", json.dumps(content)) else: return ("application/json; charset=UTF-8", json.dumps({ "content": content, "last_modified": self.db.get_last_modified(path.split("/")), })) else: if type(content) is ListType: # directory list, DIR ret = "<HTML><BODY><UL>" for entry in content: if entry["type"] == db.Db.DIR: name = entry["name"] + "/" else: name = entry["name"] if path[-1] != "/": path = path + "/" link = "%s%s" % (path, entry["name"]) ret = ret + "<LI><A HREF='%s'>%s</A>" % (link, name) ret = ret + "</UL></BODY></HTML>" content_type = 'text/html' # TODO: Use magic lib to tell the MIME type. elif content.startswith('\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46'): content_type = 'image/jpeg' ret = content elif content.startswith('\x00\x00\x00\x20\x66\x74\x79\x70\x69'): content_type = 'video/mp4' ret = content elif content.startswith('\x52\x49\x46\x46'): content_type = 'video/avi' ret = content elif content.startswith('\x89\x50\x4e\x47\x0d\x0a'): content_type = 'image/png' ret = content elif path.endswith('.css'): content_type = 'text/css' ret = content else: content_type = 'text/html' ret = content return (content_type, ret)
mit
Python
e9cb40d1c044aa48beb221686df3cbfb47524a72
Remove unused import
MeirKriheli/statirator,MeirKriheli/statirator,MeirKriheli/statirator
statirator/blog/views.py
statirator/blog/views.py
from __future__ import absolute_import from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.base import TemplateView from .models import Post, I18NTag class PostView(DetailView): models = Post def get_queryset(self): qs = Post.objects.filter(language=self.request.LANGUAGE_CODE) return qs class ArchiveView(ListView): models = Post def get_queryset(self): qs = Post.objects.filter(language=self.request.LANGUAGE_CODE, is_published=True).order_by('-pubdate') return qs class TagView(DetailView): model = I18NTag def get_object(self): return I18NTag.objects.get(language=self.request.LANGUAGE_CODE, slug_no_locale=self.kwargs['slug']) def get_context_data(self, **kwargs): ctx = super(TagView, self).get_context_data(**kwargs) tag = ctx['object'] ctx['posts'] = Post.objects.filter( language=self.request.LANGUAGE_CODE, is_published=True, tags__slug__in=[tag.slug]).order_by('-pubdate') return ctx class TagsView(TemplateView): template_name = 'blog/i18ntag_list.html'
from __future__ import absolute_import from django.db.models import Count from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.base import TemplateView from .models import Post, I18NTag class PostView(DetailView): models = Post def get_queryset(self): qs = Post.objects.filter(language=self.request.LANGUAGE_CODE) return qs class ArchiveView(ListView): models = Post def get_queryset(self): qs = Post.objects.filter(language=self.request.LANGUAGE_CODE, is_published=True).order_by('-pubdate') return qs class TagView(DetailView): model = I18NTag def get_object(self): return I18NTag.objects.get(language=self.request.LANGUAGE_CODE, slug_no_locale=self.kwargs['slug']) def get_context_data(self, **kwargs): ctx = super(TagView, self).get_context_data(**kwargs) tag = ctx['object'] ctx['posts'] = Post.objects.filter( language=self.request.LANGUAGE_CODE, is_published=True, tags__slug__in=[tag.slug]).order_by('-pubdate') return ctx class TagsView(TemplateView): template_name = 'blog/i18ntag_list.html'
mit
Python
c767ec0308d61c73b41bf20f9c5bf069238a04e4
change in the iteration state to make things slightly more readable.
mchrzanowski/ProjectEuler,mchrzanowski/ProjectEuler
src/python/Problem066.py
src/python/Problem066.py
''' Created on Feb 21, 2012 @author: mchrzanowski ''' from math import sqrt from Problem064 import getQuotients from Problem065 import findRationalApproximation from time import time LIMIT = 10 ** 3 def getConvergentPair(i, difference=1): ''' a generator that will return iterations of increasingly-precise numerator,denominator tuples of sqrt(i) ''' quotientList = getQuotients(i) # get the quotient list. this method will only return up to one full period. # we might need more to get convergence, though. convergentState = -1 # expansion of the quotient list causes some state to be reset. # save state because we don't want to send convergents that we've already sent while True: quotientList.extend(quotientList[1:]) # here, we just double the number of periods in the list. The first value is the integer portion. numerators, denominators = findRationalApproximation(quotientList) # indexed numerator, denominator dicts for j in xrange(convergentState + 1, len(numerators) - 1): # these dicts are weirdly indexed; they begin at -1. if numerators[j] ** 2 - i * denominators[j] ** 2 == difference: yield numerators[j], denominators[j] convergentState = j def main(): ''' http://en.wikipedia.org/wiki/Pell's_equation here we use two methods from previous problems: Problem064 dealt with getting the list of quotients for use in the continued fraction Problem065 then dealt with constructing the continued fraction from these quotients ''' maxD = 0 maxX = 0 for i in xrange(1, LIMIT + 1): if sqrt(i).is_integer(): continue # skip perfect squares. numerator, denominator = getConvergentPair(i).next() # first pair will do as we want minimal solutions. if numerator > maxX: maxX = numerator maxD = i print "D <=", LIMIT, "that maximizes x:", maxD if __name__ == '__main__': start = time() main() end = time() print "Runtime: ", end - start, " seconds."
''' Created on Feb 21, 2012 @author: mchrzanowski ''' from math import sqrt from Problem064 import getQuotients from Problem065 import findRationalApproximation from time import time LIMIT = 10 ** 3 def getConvergentPair(i, difference=1): ''' a generator that will return iterations of increasingly-precise numerator,denominator tuples of sqrt(i) ''' quotientList = getQuotients(i) # get the quotient list. this method will only return up to one full period. # we might need more to get convergence, though. convergentState = 0 # expansion of the quotient list causes some state to be reset. # save state because we don't want to send convergents that we've already sent while True: quotientList.extend(quotientList[1:]) # here, we just double the number of periods in the list. The first value is the integer portion. numerators, denominators = findRationalApproximation(quotientList) # indexed numerator, denominator dicts for j in xrange(convergentState, len(numerators) - 1): # these dicts are weirdly indexed; they begin at -1. if numerators[j] ** 2 - i * denominators[j] ** 2 == difference: yield numerators[j], denominators[j] convergentState = j + 1 def main(): ''' http://en.wikipedia.org/wiki/Pell's_equation here we use two methods from previous problems: Problem064 dealt with getting the list of quotients for use in the continued fraction Problem065 then dealt with constructing the continued fraction from these quotients ''' start = time() maxD = 0 maxX = 0 for i in xrange(1, LIMIT + 1): if sqrt(i).is_integer(): continue # skip perfect squares. numerator, denominator = getConvergentPair(i).next() # first pair will do as we want minimal solutions. if numerator > maxX: maxX = numerator maxD = i print "D <=", LIMIT, "that maximizes x:", maxD end = time() print "Runtime: ", end - start, " seconds." if __name__ == '__main__': main()
mit
Python
da3c550bfd935fcdf18c04c021b3ff0cd33e13b3
Fix show_launcher logic
quozl/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit,samdroid-apps/sugar-toolkit-gtk3,manuq/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit,tchx84/debian-pkg-sugar-toolkit,sugarlabs/sugar-toolkit,samdroid-apps/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,puneetgkaur/backup_sugar_sugartoolkit,sugarlabs/sugar-toolkit,puneetgkaur/sugar-toolkit-gtk3,puneetgkaur/backup_sugar_sugartoolkit,puneetgkaur/backup_sugar_sugartoolkit,puneetgkaur/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit,puneetgkaur/sugar-toolkit-gtk3,tchx84/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,manuq/sugar-toolkit-gtk3,quozl/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit,tchx84/debian-pkg-sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,godiard/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,i5o/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,manuq/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,Daksh/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit-gtk3,ceibal-tatu/sugar-toolkit,sugarlabs/sugar-toolkit,tchx84/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3
sugar/activity/bundle.py
sugar/activity/bundle.py
import logging import os from ConfigParser import ConfigParser class Bundle: """Info about an activity bundle. Wraps the activity.info file.""" def __init__(self, path): self._name = None self._icon = None self._service_name = None self._show_launcher = False self._valid = True self._path = path self._activity_version = 0 info_path = os.path.join(path, 'activity', 'activity.info') if os.path.isfile(info_path): self._parse_info(info_path) else: self._valid = False def _parse_info(self, info_path): cp = ConfigParser() cp.read([info_path]) section = 'Activity' if cp.has_option(section, 'service_name'): self._service_name = cp.get(section, 'service_name') else: self._valid = False logging.error('%s must specify a service name' % self._path) if cp.has_option(section, 'name'): self._name = cp.get(section, 'name') else: self._valid = False logging.error('%s must specify a name' % self._path) if cp.has_option(section, 'exec'): self._exec = cp.get(section, 'exec') else: self._valid = False logging.error('%s must specify an exec' % self._path) if cp.has_option(section, 'show_launcher'): if cp.get(section, 'show_launcher') == 'no': self._show_launcher = False if cp.has_option(section, 'icon'): self._icon = cp.get(section, 'icon') if cp.has_option(section, 'activity_version'): self._activity_version = int(cp.get(section, 'activity_version')) def is_valid(self): return self._valid def get_path(self): """Get the activity bundle path.""" return self._path def get_name(self): """Get the activity user visible name.""" return self._name def get_service_name(self): """Get the activity service name""" return self._service_name def get_icon(self): """Get the activity icon name""" return self._icon def get_activity_version(self): """Get the activity version""" return self._activity_version def get_exec(self): """Get the command to execute to launch the activity factory""" return self._exec def get_show_launcher(self): """Get whether there should be a visible launcher for the activity""" return self._show_launcher # Compatibility with the old activity registry, remove after BTest-1 def get_id(self): return self._service_name
import logging import os from ConfigParser import ConfigParser class Bundle: """Info about an activity bundle. Wraps the activity.info file.""" def __init__(self, path): self._name = None self._icon = None self._service_name = None self._show_launcher = False self._valid = True self._path = path self._activity_version = 0 info_path = os.path.join(path, 'activity', 'activity.info') if os.path.isfile(info_path): self._parse_info(info_path) else: self._valid = False def _parse_info(self, info_path): cp = ConfigParser() cp.read([info_path]) section = 'Activity' if cp.has_option(section, 'service_name'): self._service_name = cp.get(section, 'service_name') else: self._valid = False logging.error('%s must specify a service name' % self._path) if cp.has_option(section, 'name'): self._name = cp.get(section, 'name') else: self._valid = False logging.error('%s must specify a name' % self._path) if cp.has_option(section, 'exec'): self._exec = cp.get(section, 'exec') else: self._valid = False logging.error('%s must specify an exec' % self._path) if cp.has_option(section, 'show_launcher'): if cp.get(section, 'show_launcher') == 'yes': self._show_launcher = True if cp.has_option(section, 'icon'): self._icon = cp.get(section, 'icon') if cp.has_option(section, 'activity_version'): self._activity_version = int(cp.get(section, 'activity_version')) def is_valid(self): return self._valid def get_path(self): """Get the activity bundle path.""" return self._path def get_name(self): """Get the activity user visible name.""" return self._name def get_service_name(self): """Get the activity service name""" return self._service_name def get_icon(self): """Get the activity icon name""" return self._icon def get_activity_version(self): """Get the activity version""" return self._activity_version def get_exec(self): """Get the command to execute to launch the activity factory""" return self._exec def get_show_launcher(self): """Get whether there should be a visible launcher for the activity""" return self._show_launcher # Compatibility with the old activity registry, remove after BTest-1 def get_id(self): return self._service_name
lgpl-2.1
Python
a21c0ec3ee4518f9072fbc5181fb419b1973afd3
Fix style #373
rledisez/shinken,h4wkmoon/shinken,h4wkmoon/shinken,rledisez/shinken,rledisez/shinken,geektophe/shinken,Simage/shinken,KerkhoffTechnologies/shinken,h4wkmoon/shinken,kaji-project/shinken,claneys/shinken,tal-nino/shinken,naparuba/shinken,lets-software/shinken,Aimage/shinken,claneys/shinken,gst/alignak,Alignak-monitoring/alignak,rednach/krill,fpeyre/shinken,xorpaul/shinken,geektophe/shinken,staute/shinken_deb,kaji-project/shinken,Aimage/shinken,claneys/shinken,kaji-project/shinken,ddurieux/alignak,ddurieux/alignak,kaji-project/shinken,rednach/krill,h4wkmoon/shinken,savoirfairelinux/shinken,claneys/shinken,peeyush-tm/shinken,staute/shinken_package,naparuba/shinken,xorpaul/shinken,peeyush-tm/shinken,KerkhoffTechnologies/shinken,staute/shinken_deb,lets-software/shinken,tal-nino/shinken,titilambert/alignak,staute/shinken_deb,staute/shinken_package,ddurieux/alignak,fpeyre/shinken,xorpaul/shinken,kaji-project/shinken,rednach/krill,rledisez/shinken,staute/shinken_package,lets-software/shinken,peeyush-tm/shinken,staute/shinken_package,Aimage/shinken,rednach/krill,savoirfairelinux/shinken,xorpaul/shinken,mohierf/shinken,dfranco/shinken,tal-nino/shinken,staute/shinken_package,h4wkmoon/shinken,kaji-project/shinken,claneys/shinken,rledisez/shinken,titilambert/alignak,dfranco/shinken,ddurieux/alignak,tal-nino/shinken,Aimage/shinken,naparuba/shinken,mohierf/shinken,lets-software/shinken,rledisez/shinken,staute/shinken_deb,rednach/krill,Simage/shinken,Simage/shinken,xorpaul/shinken,gst/alignak,savoirfairelinux/shinken,geektophe/shinken,lets-software/shinken,savoirfairelinux/shinken,savoirfairelinux/shinken,Aimage/shinken,Aimage/shinken,peeyush-tm/shinken,kaji-project/shinken,fpeyre/shinken,mohierf/shinken,peeyush-tm/shinken,titilambert/alignak,Simage/shinken,naparuba/shinken,KerkhoffTechnologies/shinken,dfranco/shinken,ddurieux/alignak,mohierf/shinken,staute/shinken_package,xorpaul/shinken,fpeyre/shinken,geektophe/shinken,ddurieux/alignak,xorpaul/shinken,h4wkmoon/shinken,KerkhoffTechnologies/shinken,fpeyre/shinken,gst/alignak,gst/alignak,claneys/shinken,rednach/krill,dfranco/shinken,Simage/shinken,peeyush-tm/shinken,mohierf/shinken,savoirfairelinux/shinken,h4wkmoon/shinken,staute/shinken_deb,h4wkmoon/shinken,tal-nino/shinken,naparuba/shinken,staute/shinken_deb,KerkhoffTechnologies/shinken,Simage/shinken,titilambert/alignak,KerkhoffTechnologies/shinken,lets-software/shinken,geektophe/shinken,mohierf/shinken,fpeyre/shinken,tal-nino/shinken,Alignak-monitoring/alignak,dfranco/shinken,dfranco/shinken,geektophe/shinken,xorpaul/shinken,naparuba/shinken
shinken/reactionnerlink.py
shinken/reactionnerlink.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012 : # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Shinken is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with Shinken. If not, see <http://www.gnu.org/licenses/>. from shinken.satellitelink import SatelliteLink, SatelliteLinks from shinken.property import BoolProp, IntegerProp, StringProp, ListProp class ReactionnerLink(SatelliteLink): """Please Add a Docstring to describe the class here""" id = 0 my_type = 'reactionner' properties = SatelliteLink.properties.copy() properties.update({ 'reactionner_name': StringProp(fill_brok=['full_status'], to_send=True), 'port': IntegerProp(default='7769', fill_brok=['full_status']), 'passive': BoolProp(default='0', fill_brok=['full_status'], to_send=True), 'min_workers': IntegerProp(default='1', fill_brok=['full_status'], to_send=True), 'max_workers': IntegerProp(default='30', fill_brok=['full_status'], to_send=True), 'processes_by_worker': IntegerProp(default='256', fill_brok=['full_status'], to_send=True), 'reactionner_tags': ListProp(default='None', to_send=True), }) def get_name(self): return self.reactionner_name def register_to_my_realm(self): self.realm.reactionners.append(self) class ReactionnerLinks(SatelliteLinks):#(Items): """Please Add a Docstring to describe the class here""" name_property = "reactionner_name" inner_class = ReactionnerLink
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012 : # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Shinken is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with Shinken. If not, see <http://www.gnu.org/licenses/>. from shinken.satellitelink import SatelliteLink, SatelliteLinks from shinken.property import BoolProp, IntegerProp, StringProp, ListProp class ReactionnerLink(SatelliteLink): """Please Add a Docstring to describe the class here""" id = 0 my_type = 'reactionner' properties = SatelliteLink.properties.copy() properties.update({ 'reactionner_name': StringProp(fill_brok=['full_status'], to_send=True), 'port': IntegerProp(default='7769', fill_brok=['full_status']), 'passive' : BoolProp(default='0', fill_brok=['full_status'], to_send=True), 'min_workers': IntegerProp(default='1', fill_brok=['full_status'], to_send=True), 'max_workers': IntegerProp(default='30', fill_brok=['full_status'], to_send=True), 'processes_by_worker': IntegerProp(default='256', fill_brok=['full_status'], to_send=True), 'reactionner_tags': ListProp(default='None', to_send=True), }) def get_name(self): return self.reactionner_name def register_to_my_realm(self): self.realm.reactionners.append(self) class ReactionnerLinks(SatelliteLinks):#(Items): """Please Add a Docstring to describe the class here""" name_property = "reactionner_name" inner_class = ReactionnerLink
agpl-3.0
Python
8d59abab151cbdecb623b7b184dade6193144497
Store Group enums as strings in Database (internally still as enums)
ProjetSigma/backend,ProjetSigma/backend
sigma_core/models/group.py
sigma_core/models/group.py
from django.db import models class Group(models.Model): class Meta: pass VIS_PUBLIC = 'public' VIS_PRIVATE = 'private' VISIBILITY_CHOICES = ( (VIS_PUBLIC, 'Anyone can see the group'), (VIS_PRIVATE, 'Group is not visible') ) MEMBER_ANYONE = 'anyone' MEMBER_REQUEST = 'request' MEMBER_INVITATION = 'upon_invitation' MEMBERSHIP_CHOICES = ( (MEMBER_ANYONE, 'Anyone can join the group'), (MEMBER_REQUEST, 'Anyone can request to join the group'), (MEMBER_INVITATION, 'Can join the group only upon invitation') ) VALID_ADMINS = 'admins' VALID_MEMBERS = 'members' VALIDATION_CHOICES = ( (VALID_ADMINS, 'Only admins can accept join requests or invite members'), (VALID_MEMBERS, 'Every member can accept join requests or invite members') ) TYPE_BASIC = 'basic' TYPE_CURSUS = 'cursus' TYPE_ASSO = 'association' TYPE_PROMO = 'school_promotion' TYPE_SCHOOL = 'school' TYPE_CHOICES = ( (TYPE_BASIC, 'Simple group'), (TYPE_CURSUS, 'Cursus or department'), (TYPE_ASSO, 'Association'), (TYPE_PROMO, 'School promotion'), (TYPE_SCHOOL, 'School') ) name = models.CharField(max_length=254) visibility = models.SmallIntegerField(choices=VISIBILITY_CHOICES, default=VIS_PRIVATE) membership_policy = models.SmallIntegerField(choices=MEMBERSHIP_CHOICES, default=MEMBER_INVITATION) validation_policy = models.SmallIntegerField(choices=VALIDATION_CHOICES, default=VALID_ADMINS) type = models.SmallIntegerField(choices=TYPE_CHOICES, default=TYPE_BASIC) def __str__(self): return "%s (%s)" % (self.name, self.get_type_display())
from django.db import models class Group(models.Model): class Meta: pass VIS_PUBLIC = 0 VIS_PRIVATE = 1 VISIBILITY_CHOICES = ( (VIS_PUBLIC, 'PUBLIC'), (VIS_PRIVATE, 'PRIVATE') ) MEMBER_ANYONE = 0 MEMBER_REQUEST = 1 MEMBER_INVITATION = 2 MEMBERSHIP_CHOICES = ( (MEMBER_ANYONE, 'ANYONE'), (MEMBER_REQUEST, 'REQUEST'), (MEMBER_INVITATION, 'INVITATION') ) VALID_ADMINS = 0 VALID_MEMBERS = 1 VALIDATION_CHOICES = ( (VALID_ADMINS, 'ADMINS'), (VALID_MEMBERS, 'MEMBERS') ) TYPE_BASIC = 0 TYPE_CURSUS = 1 TYPE_ASSO = 2 TYPE_PROMO = 3 TYPE_SCHOOL = 4 TYPE_CHOICES = ( (TYPE_BASIC, 'BASIC'), (TYPE_CURSUS, 'CURSUS/DEPARTMENT'), (TYPE_ASSO, 'ASSOCIATION'), (TYPE_PROMO, 'PROMOTION'), (TYPE_SCHOOL, 'SCHOOL') ) name = models.CharField(max_length=254) visibility = models.SmallIntegerField(choices=VISIBILITY_CHOICES, default=VIS_PRIVATE) membership_policy = models.SmallIntegerField(choices=MEMBERSHIP_CHOICES, default=MEMBER_INVITATION) validation_policy = models.SmallIntegerField(choices=VALIDATION_CHOICES, default=VALID_ADMINS) type = models.SmallIntegerField(choices=TYPE_CHOICES, default=TYPE_BASIC) def __str__(self): return "%s (%s)" % (self.name, self.get_type_display())
agpl-3.0
Python
5e66929d051047385cce9d7e910ce02b61fa1afe
Use joined loading for follower lists
skylines-project/skylines,shadowoneau/skylines,Turbo87/skylines,TobiasLohner/SkyLines,skylines-project/skylines,Turbo87/skylines,RBE-Avionik/skylines,shadowoneau/skylines,kerel-fs/skylines,RBE-Avionik/skylines,kerel-fs/skylines,skylines-project/skylines,Turbo87/skylines,Harry-R/skylines,TobiasLohner/SkyLines,TobiasLohner/SkyLines,snip/skylines,snip/skylines,skylines-project/skylines,shadowoneau/skylines,kerel-fs/skylines,snip/skylines,Harry-R/skylines,Harry-R/skylines,Turbo87/skylines,Harry-R/skylines,RBE-Avionik/skylines,shadowoneau/skylines,RBE-Avionik/skylines
skylines/model/follower.py
skylines/model/follower.py
# -*- coding: utf-8 -*- from datetime import datetime from sqlalchemy import ForeignKey, Column from sqlalchemy.types import Integer, DateTime from sqlalchemy.orm import relationship from .base import DeclarativeBase from .session import DBSession class Follower(DeclarativeBase): __tablename__ = 'followers' id = Column(Integer, autoincrement=True, primary_key=True) source_id = Column( Integer, ForeignKey('tg_user.id', ondelete='CASCADE'), index=True) source = relationship( 'User', foreign_keys=[source_id], lazy='joined', backref='following') destination_id = Column( Integer, ForeignKey('tg_user.id', ondelete='CASCADE'), index=True) destination = relationship( 'User', foreign_keys=[destination_id], lazy='joined', backref='followers') time = Column(DateTime, nullable=False, default=datetime.utcnow) @classmethod def follows(cls, source, destination): return cls.query(source=source, destination=destination).count() > 0 @classmethod def follow(cls, source, destination): f = cls.query(source=source, destination=destination).first() if not f: f = Follower(source=source, destination=destination) DBSession.add(f) @classmethod def unfollow(cls, source, destination): cls.query(source=source, destination=destination).delete()
# -*- coding: utf-8 -*- from datetime import datetime from sqlalchemy import ForeignKey, Column from sqlalchemy.types import Integer, DateTime from sqlalchemy.orm import relationship from .base import DeclarativeBase from .session import DBSession class Follower(DeclarativeBase): __tablename__ = 'followers' id = Column(Integer, autoincrement=True, primary_key=True) source_id = Column( Integer, ForeignKey('tg_user.id', ondelete='CASCADE'), index=True) source = relationship( 'User', foreign_keys=[source_id], backref='following') destination_id = Column( Integer, ForeignKey('tg_user.id', ondelete='CASCADE'), index=True) destination = relationship( 'User', foreign_keys=[destination_id], backref='followers') time = Column(DateTime, nullable=False, default=datetime.utcnow) @classmethod def follows(cls, source, destination): return cls.query(source=source, destination=destination).count() > 0 @classmethod def follow(cls, source, destination): f = cls.query(source=source, destination=destination).first() if not f: f = Follower(source=source, destination=destination) DBSession.add(f) @classmethod def unfollow(cls, source, destination): cls.query(source=source, destination=destination).delete()
agpl-3.0
Python
40f4f721b59108a929ca0f8a8f9df6619ebccea3
Fix persona backend
tobias47n9e/social-core,mrwags/python-social-auth,mathspace/python-social-auth,JerzySpendel/python-social-auth,DhiaEddineSaidi/python-social-auth,firstjob/python-social-auth,henocdz/python-social-auth,MSOpenTech/python-social-auth,python-social-auth/social-core,S01780/python-social-auth,degs098/python-social-auth,yprez/python-social-auth,alrusdi/python-social-auth,lneoe/python-social-auth,imsparsh/python-social-auth,jameslittle/python-social-auth,san-mate/python-social-auth,yprez/python-social-auth,VishvajitP/python-social-auth,Andygmb/python-social-auth,msampathkumar/python-social-auth,ariestiyansyah/python-social-auth,contracode/python-social-auth,iruga090/python-social-auth,JerzySpendel/python-social-auth,rsalmaso/python-social-auth,clef/python-social-auth,chandolia/python-social-auth,bjorand/python-social-auth,mrwags/python-social-auth,JJediny/python-social-auth,cmichal/python-social-auth,JJediny/python-social-auth,noodle-learns-programming/python-social-auth,rsteca/python-social-auth,firstjob/python-social-auth,ariestiyansyah/python-social-auth,clef/python-social-auth,DhiaEddineSaidi/python-social-auth,Andygmb/python-social-auth,nirmalvp/python-social-auth,S01780/python-social-auth,rsalmaso/python-social-auth,lneoe/python-social-auth,python-social-auth/social-storage-sqlalchemy,mathspace/python-social-auth,SeanHayes/python-social-auth,ononeor12/python-social-auth,webjunkie/python-social-auth,lawrence34/python-social-auth,jameslittle/python-social-auth,muhammad-ammar/python-social-auth,robbiet480/python-social-auth,muhammad-ammar/python-social-auth,muhammad-ammar/python-social-auth,mark-adams/python-social-auth,python-social-auth/social-app-django,cmichal/python-social-auth,mark-adams/python-social-auth,mchdks/python-social-auth,bjorand/python-social-auth,lamby/python-social-auth,wildtetris/python-social-auth,drxos/python-social-auth,SeanHayes/python-social-auth,bjorand/python-social-auth,DhiaEddineSaidi/python-social-auth,michael-borisov/python-social-auth,firstjob/python-social-auth,rsteca/python-social-auth,mathspace/python-social-auth,lawrence34/python-social-auth,iruga090/python-social-auth,imsparsh/python-social-auth,ononeor12/python-social-auth,duoduo369/python-social-auth,barseghyanartur/python-social-auth,barseghyanartur/python-social-auth,frankier/python-social-auth,yprez/python-social-auth,cjltsod/python-social-auth,jeyraof/python-social-auth,lawrence34/python-social-auth,joelstanner/python-social-auth,webjunkie/python-social-auth,Andygmb/python-social-auth,san-mate/python-social-auth,lneoe/python-social-auth,python-social-auth/social-app-cherrypy,JerzySpendel/python-social-auth,fearlessspider/python-social-auth,daniula/python-social-auth,tkajtoch/python-social-auth,degs098/python-social-auth,nvbn/python-social-auth,JJediny/python-social-auth,alrusdi/python-social-auth,tkajtoch/python-social-auth,VishvajitP/python-social-auth,contracode/python-social-auth,joelstanner/python-social-auth,hsr-ba-fs15-dat/python-social-auth,jeyraof/python-social-auth,tkajtoch/python-social-auth,noodle-learns-programming/python-social-auth,fearlessspider/python-social-auth,robbiet480/python-social-auth,noodle-learns-programming/python-social-auth,fearlessspider/python-social-auth,python-social-auth/social-app-django,ByteInternet/python-social-auth,frankier/python-social-auth,michael-borisov/python-social-auth,drxos/python-social-auth,python-social-auth/social-docs,jneves/python-social-auth,garrett-schlesinger/python-social-auth,mchdks/python-social-auth,S01780/python-social-auth,lamby/python-social-auth,wildtetris/python-social-auth,duoduo369/python-social-auth,jeyraof/python-social-auth,python-social-auth/social-core,cjltsod/python-social-auth,MSOpenTech/python-social-auth,mark-adams/python-social-auth,contracode/python-social-auth,degs098/python-social-auth,lamby/python-social-auth,joelstanner/python-social-auth,merutak/python-social-auth,MSOpenTech/python-social-auth,tutumcloud/python-social-auth,clef/python-social-auth,mrwags/python-social-auth,imsparsh/python-social-auth,garrett-schlesinger/python-social-auth,mchdks/python-social-auth,wildtetris/python-social-auth,webjunkie/python-social-auth,cmichal/python-social-auth,daniula/python-social-auth,alrusdi/python-social-auth,michael-borisov/python-social-auth,falcon1kr/python-social-auth,henocdz/python-social-auth,iruga090/python-social-auth,chandolia/python-social-auth,tutumcloud/python-social-auth,nirmalvp/python-social-auth,msampathkumar/python-social-auth,jameslittle/python-social-auth,merutak/python-social-auth,rsteca/python-social-auth,barseghyanartur/python-social-auth,VishvajitP/python-social-auth,ariestiyansyah/python-social-auth,drxos/python-social-auth,nirmalvp/python-social-auth,jneves/python-social-auth,nvbn/python-social-auth,hsr-ba-fs15-dat/python-social-auth,henocdz/python-social-auth,falcon1kr/python-social-auth,ononeor12/python-social-auth,san-mate/python-social-auth,hsr-ba-fs15-dat/python-social-auth,ByteInternet/python-social-auth,daniula/python-social-auth,robbiet480/python-social-auth,msampathkumar/python-social-auth,jneves/python-social-auth,chandolia/python-social-auth,ByteInternet/python-social-auth,falcon1kr/python-social-auth,python-social-auth/social-app-django,merutak/python-social-auth
social/backends/persona.py
social/backends/persona.py
""" BrowserID support """ from social.backends.base import BaseAuth from social.exceptions import AuthFailed, AuthMissingParameter class PersonaAuth(BaseAuth): """BrowserID authentication backend""" name = 'persona' def get_user_id(self, details, response): """Use BrowserID email as ID""" return details['email'] def get_user_details(self, response): """Return user details, BrowserID only provides Email.""" # {'status': 'okay', # 'audience': 'localhost:8000', # 'expires': 1328983575529, # 'email': '[email protected]', # 'issuer': 'browserid.org'} email = response['email'] return {'username': email.split('@', 1)[0], 'email': email, 'fullname': '', 'first_name': '', 'last_name': ''} def extra_data(self, user, uid, response, details): """Return users extra data""" return {'audience': response['audience'], 'issuer': response['issuer']} def auth_complete(self, *args, **kwargs): """Completes loging process, must return user instance""" if not 'assertion' in self.data: raise AuthMissingParameter(self, 'assertion') response = self.get_json('https://browserid.org/verify', data={ 'assertion': self.data['assertion'], 'audience': self.strategy.request_host() }, method='POST') if response.get('status') == 'failure': raise AuthFailed(self) kwargs.update({'response': response, 'backend': self}) return self.strategy.authenticate(*args, **kwargs)
""" BrowserID support """ from social.backends.base import BaseAuth from social.exceptions import AuthFailed, AuthMissingParameter class PersonaAuth(BaseAuth): """BrowserID authentication backend""" name = 'persona' def get_user_id(self, details, response): """Use BrowserID email as ID""" return details['email'] def get_user_details(self, response): """Return user details, BrowserID only provides Email.""" # {'status': 'okay', # 'audience': 'localhost:8000', # 'expires': 1328983575529, # 'email': '[email protected]', # 'issuer': 'browserid.org'} email = response['email'] return {'username': email.split('@', 1)[0], 'email': email, 'fullname': '', 'first_name': '', 'last_name': ''} def extra_data(self, user, uid, response, details): """Return users extra data""" return {'audience': response['audience'], 'issuer': response['issuer']} def auth_complete(self, *args, **kwargs): """Completes loging process, must return user instance""" if not 'assertion' in self.data: raise AuthMissingParameter(self, 'assertion') response = self.get_json('https://browserid.org/verify', params={ 'assertion': self.data['assertion'], 'audience': self.strategy.request_host() }) if response.get('status') == 'failure': raise AuthFailed(self) kwargs.update({'response': response, 'backend': self}) return self.strategy.authenticate(*args, **kwargs)
bsd-3-clause
Python
538bae320ba46764fbe8cce3aef19f22ddd1b1ec
Add simple Lede to ClustersInJSON
sisirkoppaka/articur8,sisirkoppaka/articur8,sisirkoppaka/articur8,sisirkoppaka/articur8
articulate/clustering/clusterformats.py
articulate/clustering/clusterformats.py
"""Clusters for Humans""" import itertools import simplejson as json from articulate.pymotherlode.api import * def getLede(content): #ledeRE = re.compile('^(.*?(?<!\b\w)[.?!])\s+[A-Z0-9]') #ledes = ledeRE.match(content) #return ledes.group(0) lede = content[:50] lede += "..." return lede def clustersToJSON(articles, assignments, insertContent): tag = "kmeans" clusters = list(set(assignments)) clustersForHumans = [] if insertContent: print "Inserting content into ClusterInJSON" else: print "Not inserting content into ClusterInJSON" for i in clusters: articlesInCluster = [] for j, cluster in enumerate(assignments): if cluster == i: #try: # lede = getLede(articles[j].content) #except: # lede = '' lede = getLede(articles[j].content) if insertContent: #With Content articlesInCluster.append({'title':articles[j].title, 'feed_title':articles[j].feed_title, 'link':articles[j].link, 'author':articles[j].author, 'lede':lede, 'content':articles[j].content, 'updated_at':articles[j].updated_at}) else: #And Without articlesInCluster.append({'title':articles[j].title, 'feed_title':articles[j].feed_title, 'link':articles[j].link, 'author':articles[j].author, 'lede':lede, 'updated_at':articles[j].updated_at}) clustersForHumans.append({'cluster': i,'articles':articlesInCluster}) storeCluster(json.dumps(clustersForHumans),tag) #if __name__ == "__main__": # hello() # articles = [] # assignments = [] # clustersToJSON(articles,assignments)
"""Clusters for Humans""" import itertools import simplejson as json from articulate.pymotherlode.api import * def clustersToJSON(articles, assignments, insertContent): tag = "kmeans" clusters = list(set(assignments)) clustersForHumans = [] if insertContent: print "Inserting content into ClusterInJSON" else: print "Not inserting content into ClusterInJSON" for i in clusters: articlesInCluster = [] for j, cluster in enumerate(assignments): if cluster == i: if insertContent: #With Content articlesInCluster.append({'title':articles[j].title, 'feed_title':articles[j].feed_title, 'link':articles[j].link, 'author':articles[j].author, 'content':articles[j].content, 'updated_at':articles[j].updated_at}) else: #And Without articlesInCluster.append({'title':articles[j].title, 'feed_title':articles[j].feed_title, 'link':articles[j].link, 'author':articles[j].author, 'updated_at':articles[j].updated_at}) clustersForHumans.append({'cluster': i,'articles':articlesInCluster}) storeCluster(json.dumps(clustersForHumans),tag) #if __name__ == "__main__": # hello() # articles = [] # assignments = [] # clustersToJSON(articles,assignments)
mit
Python
f15ebf385bfc6ac706b2344db12a7be9967540ef
Test for symm.symmetrize_space
sunqm/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,sunqm/pyscf,gkc1000/pyscf,sunqm/pyscf,sunqm/pyscf
symm/test/test_addons.py
symm/test/test_addons.py
# # Author: Qiming Sun <[email protected]> # import unittest import numpy from pyscf import gto from pyscf import scf from pyscf.symm import addons mol = gto.Mole() mol.build( verbose = 0, atom = [ ["O" , (0. , 0. , 0.)], [1 , (0. , -0.757 , 0.587)], [1 , (0. , 0.757 , 0.587)] ], basis = 'cc-pvdz', symmetry = 1, ) mf = scf.RHF(mol) mf.scf() class KnowValues(unittest.TestCase): def test_label_orb_symm(self): l = addons.label_orb_symm(mol, mol.irrep_name, mol.symm_orb, mf.mo_coeff) lab0 = ['A1', 'A1', 'B1', 'A1', 'B2', 'A1', 'B1', 'B1', 'A1', 'A1', 'B2', 'B1', 'A1', 'A2', 'B2', 'A1', 'B1', 'B1', 'A1', 'B2', 'A2', 'A1', 'A1', 'B1'] self.assertEqual(l, lab0) def test_symmetrize_orb(self): c = addons.symmetrize_orb(mol, mf.mo_coeff) self.assertTrue(numpy.allclose(c, mf.mo_coeff)) numpy.random.seed(1) c = addons.symmetrize_orb(mol, numpy.random.random((mf.mo_coeff.shape))) self.assertAlmostEqual(numpy.linalg.norm(c), 10.148003411042838) def test_symmetrize_space(self): from pyscf import gto, symm, scf mol = gto.M(atom = 'C 0 0 0; H 1 1 1; H -1 -1 1; H 1 -1 -1; H -1 1 -1', basis = 'sto3g', verbose=0) mf = scf.RHF(mol).run() mol.build(0, 0, symmetry='D2') mo = symm.symmetrize_space(mol, mf.mo_coeff) irreps = symm.label_orb_symm(mol, mol.irrep_name, mol.symm_orb, mo) self.assertEqual(irreps, ['A','A','A','B1','B1','B2','B2','B3','B3']) def test_route(self): orbsym = [0, 3, 0, 2, 5, 6] res = addons.route(7, 3, orbsym) self.assertEqual(res, [0, 3, 4]) if __name__ == "__main__": print("Full Tests for symm.addons") unittest.main()
# # Author: Qiming Sun <[email protected]> # import unittest import numpy from pyscf import gto from pyscf import scf from pyscf.symm import addons mol = gto.Mole() mol.build( verbose = 0, atom = [ ["O" , (0. , 0. , 0.)], [1 , (0. , -0.757 , 0.587)], [1 , (0. , 0.757 , 0.587)] ], basis = 'cc-pvdz', symmetry = 1, ) mf = scf.RHF(mol) mf.scf() class KnowValues(unittest.TestCase): def test_label_orb_symm(self): l = addons.label_orb_symm(mol, mol.irrep_name, mol.symm_orb, mf.mo_coeff) lab0 = ['A1', 'A1', 'B1', 'A1', 'B2', 'A1', 'B1', 'B1', 'A1', 'A1', 'B2', 'B1', 'A1', 'A2', 'B2', 'A1', 'B1', 'B1', 'A1', 'B2', 'A2', 'A1', 'A1', 'B1'] self.assertEqual(l, lab0) def test_symmetrize_orb(self): c = addons.symmetrize_orb(mol, mf.mo_coeff) self.assertTrue(numpy.allclose(c, mf.mo_coeff)) numpy.random.seed(1) c = addons.symmetrize_orb(mol, numpy.random.random((mf.mo_coeff.shape))) self.assertAlmostEqual(numpy.linalg.norm(c), 10.148003411042838) def test_route(self): orbsym = [0, 3, 0, 2, 5, 6] res = addons.route(7, 3, orbsym) self.assertEqual(res, [0, 3, 4]) if __name__ == "__main__": print("Full Tests for symm.addons") unittest.main()
apache-2.0
Python
2cd19b395f4320330b66dff1ef98d149f3a40a31
Add test for notify dataset/update
aptivate/ckanext-syndicate,sorki/ckanext-redmine-autoissues,aptivate/ckanext-syndicate,sorki/ckanext-redmine-autoissues
ckanext/syndicate/tests/test_plugin.py
ckanext/syndicate/tests/test_plugin.py
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestNotify(unittest.TestCase): def setUp(self): super(TestNotify, self).setUp() self.entity = model.Package() self.entity.extras = {'syndicate': 'true'} self.syndicate_patch = patch('ckanext.syndicate.plugin.syndicate_task') self.plugin = SyndicatePlugin() def test_syndicates_task_for_dataset_create(self): with self.syndicate_patch as mock_syndicate: self.plugin.notify(self.entity, DomainObjectOperation.new) mock_syndicate.assert_called_with(self.entity.id, 'dataset/create') def test_syndicates_task_for_dataset_update(self): with self.syndicate_patch as mock_syndicate: self.plugin.notify(self.entity, DomainObjectOperation.changed) mock_syndicate.assert_called_with(self.entity.id, 'dataset/update')
from mock import patch import unittest import ckan.model as model from ckan.model.domain_object import DomainObjectOperation from ckanext.syndicate.plugin import SyndicatePlugin class TestPlugin(unittest.TestCase): def test_notify_syndicates_task(self): entity = model.Package() entity.extras = {'syndicate': 'true'} with patch('ckanext.syndicate.plugin.syndicate_task') as mock_syndicate: plugin = SyndicatePlugin() plugin.notify(entity, DomainObjectOperation.new) mock_syndicate.assert_called_with(entity.id, 'dataset/create')
agpl-3.0
Python
6d6fc2ed77db220ddfeeaa8709a3518724bb278a
Correct paths in extraction of shape per msa
rlouf/patterns-of-segregation
bin/data_prep/extract_shape_msa.py
bin/data_prep/extract_shape_msa.py
"""extract_shape_msa.py Output one shapefile per MSA containing all the blockgroups it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_bg = {} with open('data/crosswalks/msa_blockgroup.csv', 'r') as source: reader = csv.reader(source, delimiter='\t') reader.next() for rows in reader: msa = rows[0] bg = rows[1] if msa not in msa_to_bg: msa_to_bg[msa] = [] msa_to_bg[msa].append(bg) # # Perform the extraction # for msa in msa_to_bg: states = list(set([b[:2] for b in msa_to_bg[msa]])) ## Get all blockgroups all_bg = {} for st in states: with fiona.open('data/shp/state/%s/blockgroups.shp'%st, 'r', 'ESRI Shapefile') as source: source_crs = source.crs for f in source: all_bg[f['properties']['BKGPIDFP00']] = f['geometry'] ## blockgroups within cbsa msa_bg = {bg: all_bg[bg] for bg in msa_to_bg[msa]} ## Save if not os.path.isdir('data/shp/msa/%s'%msa): os.mkdir('data/shp/msa/%s'%msa) schema = {'geometry': 'Polygon', 'properties': {'BKGPIDFP00': 'str'}} with fiona.open('data/shp/msa/%s/blockgroups.shp'%msa, 'w', 'ESRI Shapefile', crs = source_crs, schema = schema) as output: for bg in msa_bg: rec = {'geometry':msa_bg[bg], 'properties':{'BKGPIDFP00':bg}} output.write(rec)
"""extract_shape_msa.py Output one shapefile per MSA containing all the blockgroups it contains """ import os import csv import fiona # # Import MSA to blockgroup crosswalk # msa_to_bg = {} with open('data/2000/crosswalks/msa_blockgroup.csv', 'r') as source: reader = csv.reader(source, delimiter='\t') reader.next() for rows in reader: msa = rows[0] bg = rows[1] if msa not in msa_to_bg: msa_to_bg[msa] = [] msa_to_bg[msa].append(bg) # # Perform the extraction # for msa in msa_to_bg: states = list(set([b[:2] for b in msa_to_bg[msa]])) ## Get all blockgroups all_bg = {} for st in states: with fiona.open('data/2000/shp/state/%s/blockgroups.shp'%st, 'r', 'ESRI Shapefile') as source: source_crs = source.crs for f in source: all_bg[f['properties']['BKGPIDFP00']] = f['geometry'] ## blockgroups within cbsa msa_bg = {bg: all_bg[bg] for bg in msa_to_bg[msa]} ## Save if not os.path.isdir('data/2000/shp/msa/%s'%msa): os.mkdir('data/2000/shp/msa/%s'%msa) schema = {'geometry': 'Polygon', 'properties': {'BKGPIDFP00': 'str'}} with fiona.open('data/2000/shp/msa/%s/blockgroups.shp'%msa, 'w', 'ESRI Shapefile', crs = source_crs, schema = schema) as output: for bg in msa_bg: rec = {'geometry':msa_bg[bg], 'properties':{'BKGPIDFP00':bg}} output.write(rec)
bsd-3-clause
Python
80a1912ce69fd356d6c54bb00f946fbc7874a9ce
Allow multiple alarms for same metric type
voxy/bluecanary
bluecanary/set_cloudwatch_alarm.py
bluecanary/set_cloudwatch_alarm.py
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kwargs['AlarmName'] = '{}_{}'.format(identifier, kwargs.get('MetricName')) if kwargs.get('AlarmNameModifier'): kwargs['AlarmName'] = '{}_{}'.format(kwargs.get('AlarmName'), kwargs.get('AlarmNameModifier')) del(kwargs['AlarmNameModifier']) cloudwatch_client = boto3.client('cloudwatch') return cloudwatch_client.put_metric_alarm(**kwargs) def _get_dimensions(identifier, **kwargs): base_dimensions = { 'AWS/ELB': [{u'Name': 'LoadBalancerName', u'Value': identifier}], 'AWS/EC2': [{u'Name': 'InstanceId', u'Value': identifier}], } try: return base_dimensions[kwargs.get('Namespace')] except KeyError: message = ('Namespace "{}" is not supported by Blue Canary. ' 'If you are using a plugin that supports this Namespace ' 'please ensure that the plugin alarm class does not return ' 'None when calling the "get_dimensions" method.' .format(kwargs.get('Namespace'))) raise NamespaceError(message)
import boto3 from bluecanary.exceptions import NamespaceError from bluecanary.utilities import throttle @throttle() def set_cloudwatch_alarm(identifier, **kwargs): if not kwargs.get('Dimensions'): kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs) if not kwargs.get('AlarmName'): kwargs['AlarmName'] = '{}_{}'.format(identifier, kwargs.get('MetricName')) cloudwatch_client = boto3.client('cloudwatch') return cloudwatch_client.put_metric_alarm(**kwargs) def _get_dimensions(identifier, **kwargs): base_dimensions = { 'AWS/ELB': [{u'Name': 'LoadBalancerName', u'Value': identifier}], 'AWS/EC2': [{u'Name': 'InstanceId', u'Value': identifier}], } try: return base_dimensions[kwargs.get('Namespace')] except KeyError: message = ('Namespace "{}" is not supported by Blue Canary. ' 'If you are using a plugin that supports this Namespace ' 'please ensure that the plugin alarm class does not return ' 'None when calling the "get_dimensions" method.' .format(kwargs.get('Namespace'))) raise NamespaceError(message)
mit
Python
67d0388102c2bbf7abff17a23979bbfd02940ee1
fix gmock/gtest installation
facebook/bistro,facebook/bistro,facebook/bistro,facebook/bistro,facebook/bistro,facebook/bistro
build/fbcode_builder/specs/gmock.py
build/fbcode_builder/specs/gmock.py
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals def fbcode_builder_spec(builder): builder.add_option( 'google/googletest:cmake_defines', {'BUILD_GTEST': 'ON'} ) return { 'steps': [ builder.github_project_workdir('google/googletest', 'build'), builder.cmake_install('google/googletest'), ], }
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals def fbcode_builder_spec(builder): return { 'steps': [ # google mock also provides the gtest libraries builder.github_project_workdir('google/googletest', 'googlemock/build'), builder.cmake_install('google/googletest'), ], }
mit
Python
a84ccc871b5f85f80844d1cd413ddbf44194da17
Add version information to documentation
jrsmith3/ibei
doc/conf.py
doc/conf.py
# coding=utf-8 import ibei # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- project = 'ibei' copyright = '2022, Joshua Ryan Smith' author = 'Joshua Ryan Smith' version = ibei.__version__ # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinxcontrib.bibtex' ] # Configuration for `autodoc`. autodoc_member_order = "bysource" # Configuration for `sphinxcontrib-bibtex`. bibtex_bibfiles = ['bib.bib'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' html_sidebars = { '**': [ 'about.html', 'navigation.html', 'searchbox.html', ] } # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static']
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- project = 'ibei' copyright = '2022, Joshua Ryan Smith' author = 'Joshua Ryan Smith' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinxcontrib.bibtex' ] # Configuration for `autodoc`. autodoc_member_order = "bysource" # Configuration for `sphinxcontrib-bibtex`. bibtex_bibfiles = ['bib.bib'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' html_sidebars = { '**': [ 'about.html', 'navigation.html', 'searchbox.html', ] } # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static']
mit
Python
94c09cb1442f064496a80be7f49781f640bd3a70
Merge [14531] from 1.0-stable
walty8/trac,walty8/trac,walty8/trac,walty8/trac
sample-plugins/workflow/StatusFixer.py
sample-plugins/workflow/StatusFixer.py
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 Edgewall Software # Copyright (C) 2007 Eli Carter <[email protected]> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision # history and logs, available at http://trac.edgewall.org/. from genshi.builder import tag from trac.core import Component, implements from trac.ticket.api import ITicketActionController, TicketSystem from trac.perm import IPermissionRequestor revision = "$Rev$" url = "$URL$" class StatusFixerActionController(Component): """Provides the admin with a way to correct a ticket's status. This plugin is especially useful when you made changes to your workflow, and some ticket status are no longer valid. The tickets that are in those status can then be set to some valid state. Don't forget to add `StatusFixerActionController` to the workflow option in the `[ticket]` section in TracIni. If there is no other workflow option, the line will look like this: {{{ workflow = ConfigurableTicketWorkflow,StatusFixerActionController }}} """ implements(ITicketActionController, IPermissionRequestor) # IPermissionRequestor methods def get_permission_actions(self): return ['TICKET_STATUSFIX'] # ITicketActionController methods def get_ticket_actions(self, req, ticket): actions = [] if 'TICKET_STATUSFIX' in req.perm(ticket.resource): actions.append((0, 'force_status')) return actions def get_all_status(self): """Return all the status that are present in the database, so that queries for status no longer in use can be made. """ return [status for status, in self.env.db_query("SELECT DISTINCT status FROM ticket")] def render_ticket_action_control(self, req, ticket, action): # Need to use the list of all status so you can't manually set # something to an invalid state. selected_value = req.args.get('force_status_value', 'new') all_status = TicketSystem(self.env).get_all_status() render_control = tag.select( [tag.option(x, selected=(x == selected_value and 'selected' or None)) for x in all_status], id='force_status_value', name='force_status_value') return ("force status to", render_control, "The next status will be the selected one") def get_ticket_changes(self, req, ticket, action): return {'status': req.args.get('force_status_value')} def apply_action_side_effects(self, req, ticket, action): pass
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 Edgewall Software # Copyright (C) 2007 Eli Carter <[email protected]> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision # history and logs, available at http://trac.edgewall.org/. from genshi.builder import tag from trac.core import Component, implements from trac.ticket.api import ITicketActionController, TicketSystem from trac.perm import IPermissionRequestor revision = "$Rev$" url = "$URL$" class StatusFixerActionController(Component): """Provides the admin with a way to correct a ticket's status. This plugin is especially useful when you made changes to your workflow, and some ticket status are no longer valid. The tickets that are in those status can then be set to some valid state. Don't forget to add `StatusFixerActionController` to the workflow option in the `[ticket]` section in TracIni. If there is no other workflow option, the line will look like this: {{{ workflow = ConfigurableTicketWorkflow,StatusFixerActionController }}} """ implements(ITicketActionController, IPermissionRequestor) # IPermissionRequestor methods def get_permission_actions(self): return ['TICKET_STATUSFIX'] # ITicketActionController methods def get_ticket_actions(self, req, ticket): actions = [] if 'TICKET_STATUSFIX' in req.perm(ticket.resource): actions.append((0, 'force_status')) return actions def get_all_status(self): """Return all the status that are present in the database, so that queries for status no longer in use can be made. """ return [status for status, in self.env.db_query("SELECT DISTINCT status FROM ticket")] def render_ticket_action_control(self, req, ticket, action): # Need to use the list of all status so you can't manually set # something to an invalid state. selected_value = req.args.get('force_status_value', 'new') all_status = TicketSystem(self.env).get_all_status() render_control = tag.select( [tag.option(x, selected=(x == selected_value and 'selected' or None)) for x in all_status], id='force_status_value', name='force_status_value') return ("force status to:", render_control, "The next status will be the selected one") def get_ticket_changes(self, req, ticket, action): return {'status': req.args.get('force_status_value')} def apply_action_side_effects(self, req, ticket, action): pass
bsd-3-clause
Python
7611a4b3e064868c37b9f52778c8fe9f721e86c5
Update namespace monitor with exception handling
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
polyaxon/events/management/commands/monitor_namespace.py
polyaxon/events/management/commands/monitor_namespace.py
import time from kubernetes.client.rest import ApiException from django.conf import settings from django.db import InterfaceError, ProgrammingError, OperationalError from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(BaseMonitorCommand): help = 'Watch namespace warning and errors events.' def get_cluster_or_wait(self, log_sleep_interval): max_trials = 10 trials = 0 while trials < max_trials: try: return Cluster.load() except (InterfaceError, ProgrammingError, OperationalError) as e: namespace.logger.exception("Database is not synced yet %s\n", e) trials += 1 time.sleep(log_sleep_interval * 2) return None def handle(self, *args, **options): log_sleep_interval = options['log_sleep_interval'] self.stdout.write( "Started a new namespace monitor with, " "log sleep interval: `{}`.".format(log_sleep_interval), ending='\n') k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True) cluster = self.get_cluster_or_wait(log_sleep_interval) if not cluster: # End process return while True: try: namespace.run(k8s_manager, cluster) except ApiException as e: namespace.logger.error( "Exception when calling CoreV1Api->list_event_for_all_namespaces: %s\n", e) time.sleep(log_sleep_interval) except Exception as e: namespace.logger.exception("Unhandled exception occurred: %s\n", e)
import time from kubernetes.client.rest import ApiException from django.conf import settings from clusters.models import Cluster from events.management.commands._base_monitor import BaseMonitorCommand from events.monitors import namespace from polyaxon_k8s.manager import K8SManager class Command(BaseMonitorCommand): help = 'Watch namespace warning and errors events.' def handle(self, *args, **options): log_sleep_interval = options['log_sleep_interval'] self.stdout.write( "Started a new namespace monitor with, " "log sleep interval: `{}`.".format(log_sleep_interval), ending='\n') k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True) cluster = Cluster.load() while True: try: namespace.run(k8s_manager, cluster) except ApiException as e: namespace.logger.error( "Exception when calling CoreV1Api->list_event_for_all_namespaces: %s\n", e) time.sleep(log_sleep_interval) except Exception as e: namespace.logger.exception("Unhandled exception occurred: %s\n", e)
apache-2.0
Python
ad26a38263655ddfb3421f7cb748ce7782a91aeb
Fix tests_require
infoxchange/supervisor-logging,infoxchange/supervisor-logging
setup.py
setup.py
# # Copyright 2014 Infoxchange Australia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Setup script. """ from setuptools import setup, find_packages with open('requirements.txt') as requirements, \ open('test_requirements.txt') as test_requirements: setup( name='supervisor-logging', version='0.0.1', description='Stream supervisord logs to a syslog instance', author='Infoxchange development team', author_email='[email protected]', url='https://github.com/infoxchange/supervisor-logging', license='Apache 2.0', long_description=open('README.md').read(), packages=find_packages(exclude=['tests']), package_data={ 'forklift': [ 'README.md', 'requirements.txt', 'test_requirements.txt', ], }, entry_points={ 'console_scripts': [ 'supervisor_logging = supervisor_logging:main', ], }, install_requires=requirements.read().splitlines(), test_suite='tests', tests_require=test_requirements.read().splitlines(), )
# # Copyright 2014 Infoxchange Australia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Setup script. """ from setuptools import setup, find_packages with open('requirements.txt') as requirements, \ open('test_requirements.txt') as test_requirements: setup( name='supervisor-logging', version='0.0.1', description='Stream supervisord logs to a syslog instance', author='Infoxchange development team', author_email='[email protected]', url='https://github.com/infoxchange/supervisor-logging', license='Apache 2.0', long_description=open('README.md').read(), packages=find_packages(exclude=['tests']), package_data={ 'forklift': [ 'README.md', 'requirements.txt', 'test_requirements.txt', ], }, entry_points={ 'console_scripts': [ 'supervisor_logging = supervisor_logging:main', ], }, install_requires=requirements.read().splitlines(), test_suite='tests', test_requires=test_requirements.read().splitlines(), )
apache-2.0
Python
969acffd6562c27a53973a1fd7551bcf5c6c6cbc
tweak setup to include new version and reqs
eads/tarbell,tarbell-project/tarbell,eads/tarbell,eyeseast/tarbell,eyeseast/tarbell,NUKnightLab/tarbell,NUKnightLab/tarbell,NUKnightLab/tarbell,tarbell-project/tarbell
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup, find_packages APP_NAME = 'tarbell' VERSION = '0.9b3' settings = dict() # Publish Helper. if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name=APP_NAME, version=VERSION, author=u'Chicago Tribune News Applications Team', author_email='[email protected]', url='http://github.com/newsapps/flask-tarbell', license='MIT', description='A very simple content management system', long_description='', zip_safe=False, packages=find_packages(), include_package_data=True, install_requires=[ "Flask==0.10.1", "Jinja2==2.7.1", "MarkupSafe==0.18", "PyYAML==3.10", "Werkzeug==0.9.4", "boto==2.19.0", "clint==0.3.2", "requests==2.1.0", "wsgiref==0.1.2", "google-api-python-client==1.2", "keyring>=3.2.1", "xlrd==0.9.2", "python-dateutil>=2.2", "docutils==0.11", "sh==1.09", "sphinx_rtd_theme==0.1.5", "Markdown==2.3.1"], entry_points={ 'console_scripts': [ 'tarbell = tarbell.cli:main', ], }, keywords=['Development Status :: 3 - alpha', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet', ], ) setup(**settings)
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup, find_packages APP_NAME = 'tarbell' VERSION = '0.9b2' settings = dict() # Publish Helper. if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() settings.update( name=APP_NAME, version=VERSION, author=u'Chicago Tribune News Applications Team', author_email='[email protected]', url='http://github.com/newsapps/flask-tarbell', license='MIT', description='A very simple content management system', long_description='', zip_safe=False, packages=find_packages(), include_package_data=True, install_requires=[ "Flask==0.10.1", "GitPython==0.3.2.RC1", "Jinja2==2.7.1", "MarkupSafe==0.18", "PyYAML==3.10", "Werkzeug==0.9.4", "async==0.6.1", "boto==2.18.0", "clint==0.3.1", "gitdb==0.5.4", "itsdangerous==0.23", "requests==1.2.3", "smmap==0.8.2", "unicodecsv==0.9.4", "wsgiref==0.1.2", "google-api-python-client==1.2", "keyring>=3.2.1", "xlrd==0.9.2", "python-dateutil>=2.2", "docutils==0.11", "sh==1.09", "Markdown==2.3.1"], entry_points={ 'console_scripts': [ 'tarbell = tarbell.cli:main', ], }, keywords=['Development Status :: 3 - alpha', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet', ], ) setup(**settings)
bsd-3-clause
Python
0e178c8bcb0bad2146fede1e6361bc57bdbf8102
Bump version for 0.3.0
jparyani/pycapnp,tempbottle/pycapnp,tempbottle/pycapnp,SymbiFlow/pycapnp,SymbiFlow/pycapnp,rcrowder/pycapnp,rcrowder/pycapnp,tempbottle/pycapnp,jparyani/pycapnp,SymbiFlow/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,jparyani/pycapnp,tempbottle/pycapnp,rcrowder/pycapnp
setup.py
setup.py
#!/usr/bin/env python try: from Cython.Build import cythonize import Cython except ImportError: raise RuntimeError('No cython installed. Please run `pip install cython`') if Cython.__version__ < '0.19.1': raise RuntimeError('Old cython installed. Please run `pip install -U cython`') from distutils.core import setup import os MAJOR = 0 MINOR = 3 MICRO = 0 VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) def write_version_py(filename=None): cnt = """\ version = '%s' short_version = '%s' """ if not filename: filename = os.path.join( os.path.dirname(__file__), 'capnp', 'version.py') a = open(filename, 'w') try: a.write(cnt % (VERSION, VERSION)) finally: a.close() write_version_py() try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = '' setup( name="capnp", packages=["capnp"], version=VERSION, package_data={'capnp': ['*.pxd', '*.pyx', '*.h']}, ext_modules=cythonize('capnp/*.pyx', language="c++"), install_requires=[ 'cython > 0.19', 'setuptools >= 0.8'], # PyPi info description='A cython wrapping of the C++ capnproto library', long_description=long_description, license='BSD', author="Jason Paryani", author_email="[email protected]", url = 'https://github.com/jparyani/capnpc-python-cpp', download_url = 'https://github.com/jparyani/capnpc-python-cpp/archive/v%s.zip' % VERSION, keywords = ['capnp', 'capnproto'], classifiers = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Programming Language :: C++', 'Programming Language :: Cython', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Communications'], )
#!/usr/bin/env python try: from Cython.Build import cythonize import Cython except ImportError: raise RuntimeError('No cython installed. Please run `pip install cython`') if Cython.__version__ < '0.19.1': raise RuntimeError('Old cython installed. Please run `pip install -U cython`') from distutils.core import setup import os MAJOR = 0 MINOR = 2 MICRO = 1 VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) def write_version_py(filename=None): cnt = """\ version = '%s' short_version = '%s' """ if not filename: filename = os.path.join( os.path.dirname(__file__), 'capnp', 'version.py') a = open(filename, 'w') try: a.write(cnt % (VERSION, VERSION)) finally: a.close() write_version_py() try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except (IOError, ImportError): long_description = '' setup( name="capnp", packages=["capnp"], version=VERSION, package_data={'capnp': ['*.pxd', '*.pyx', '*.h']}, ext_modules=cythonize('capnp/*.pyx', language="c++"), install_requires=[ 'cython > 0.19', 'setuptools >= 0.8'], # PyPi info description='A cython wrapping of the C++ capnproto library', long_description=long_description, license='BSD', author="Jason Paryani", author_email="[email protected]", url = 'https://github.com/jparyani/capnpc-python-cpp', download_url = 'https://github.com/jparyani/capnpc-python-cpp/archive/v%s.zip' % VERSION, keywords = ['capnp', 'capnproto'], classifiers = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX', 'Programming Language :: C++', 'Programming Language :: Cython', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Communications'], )
bsd-2-clause
Python
1f14b95b26e84336e4c1e8a11ea2fd06fa1a802d
Bump version to make PyPI happy
momyc/gevent-fastcgi,momyc/gevent-fastcgi
setup.py
setup.py
import os import sys from setuptools import setup, Extension, find_packages ext_modules = [] # C speedups are no good for PyPy if '__pypy__' not in sys.builtin_module_names: ext_modules.append( Extension('gevent_fastcgi.speedups', ['gevent_fastcgi/speedups.c'])) setup( name='gevent-fastcgi', version='1.0.2.1', description='''FastCGI/WSGI client and server implemented using gevent library''', long_description=''' FastCGI/WSGI server implementation using gevent library. No need to monkeypatch and slow down your favourite FastCGI server in order to make it "green". Supports connection multiplexing. Out-of-the-box support for Django and frameworks that use PasteDeploy including Pylons and Pyramid. ''', keywords='fastcgi gevent wsgi', author='Alexander Kulakov', author_email='[email protected]', url='http://github.com/momyc/gevent-fastcgi', packages=find_packages(exclude=('gevent_fastcgi.tests.*',)), zip_safe=True, license='MIT', install_requires=[ "zope.interface", "gevent>=0.13.6", ], entry_points={ 'paste.server_runner': [ 'fastcgi = gevent_fastcgi.adapters.paste_deploy:fastcgi_server_runner', 'wsgi = gevent_fastcgi.adapters.paste_deploy:wsgi_server_runner', 'wsgiref = gevent_fastcgi.adapters.paste_deploy:wsgiref_server_runner', ], }, test_suite="tests", tests_require=['mock'], ext_modules=ext_modules )
import os import sys from setuptools import setup, Extension, find_packages ext_modules = [] # C speedups are no good for PyPy if '__pypy__' not in sys.builtin_module_names: ext_modules.append( Extension('gevent_fastcgi.speedups', ['gevent_fastcgi/speedups.c'])) setup( name='gevent-fastcgi', version='1.0.2', description='''FastCGI/WSGI client and server implemented using gevent library''', long_description=''' FastCGI/WSGI server implementation using gevent library. No need to monkeypatch and slow down your favourite FastCGI server in order to make it "green". Supports connection multiplexing. Out-of-the-box support for Django and frameworks that use PasteDeploy including Pylons and Pyramid. ''', keywords='fastcgi gevent wsgi', author='Alexander Kulakov', author_email='[email protected]', url='http://github.com/momyc/gevent-fastcgi', packages=find_packages(exclude=('gevent_fastcgi.tests.*',)), zip_safe=True, license='MIT', install_requires=[ "zope.interface", "gevent>=0.13.6", ], entry_points={ 'paste.server_runner': [ 'fastcgi = gevent_fastcgi.adapters.paste_deploy:fastcgi_server_runner', 'wsgi = gevent_fastcgi.adapters.paste_deploy:wsgi_server_runner', 'wsgiref = gevent_fastcgi.adapters.paste_deploy:wsgiref_server_runner', ], }, test_suite="tests", tests_require=['mock'], ext_modules=ext_modules )
mit
Python
c4ec856f26e4d83eb11296480ab8180f14588934
Update python versions
glidernet/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,glidernet/ogn-python,glidernet/ogn-python,Meisterschueler/ogn-python,Meisterschueler/ogn-python,Meisterschueler/ogn-python
setup.py
setup.py
#!/usr/bin/env python3 from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='ogn-python', version='0.5.0', description='A database backend for the Open Glider Network', long_description=long_description, url='https://github.com/glidernet/ogn-python', author='Konstantin Gründger aka Meisterschueler, Fabian P. Schmidt aka kerel, Dominic Spreitz', author_email='[email protected]', license='AGPLv3', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: GIS', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9-dev' ], keywords='gliding ogn', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'Flask==1.1.2', 'Flask-SQLAlchemy==2.4.4', 'Flask-Migrate==2.5.3', 'Flask-Bootstrap==3.3.7.1', 'Flask-WTF==0.14.3', 'Flask-Caching==1.9.0', 'geopy==2.0.0', 'celery==5.0.2', 'redis==3.5.3', 'aerofiles==1.0.0', 'geoalchemy2==0.8.4', 'shapely==1.7.1', 'ogn-client==1.0.1', 'mgrs==1.4.0', 'psycopg2-binary==2.8.6', 'xmlunittest==0.5.0', 'flower==0.9.5', 'tqdm==4.51.0', 'requests==2.25.0', ], test_require=[ 'pytest==5.0.1', 'flake8==1.1.1', 'xmlunittest==0.4.0', ], zip_safe=False )
#!/usr/bin/env python3 from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='ogn-python', version='0.5.0', description='A database backend for the Open Glider Network', long_description=long_description, url='https://github.com/glidernet/ogn-python', author='Konstantin Gründger aka Meisterschueler, Fabian P. Schmidt aka kerel, Dominic Spreitz', author_email='[email protected]', license='AGPLv3', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: GIS', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], keywords='gliding ogn', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'Flask==1.1.2', 'Flask-SQLAlchemy==2.4.4', 'Flask-Migrate==2.5.3', 'Flask-Bootstrap==3.3.7.1', 'Flask-WTF==0.14.3', 'Flask-Caching==1.9.0', 'geopy==2.0.0', 'celery==5.0.2', 'redis==3.5.3', 'aerofiles==1.0.0', 'geoalchemy2==0.8.4', 'shapely==1.7.1', 'ogn-client==1.0.1', 'mgrs==1.4.0', 'psycopg2-binary==2.8.6', 'xmlunittest==0.5.0', 'flower==0.9.5', 'tqdm==4.51.0', 'requests==2.25.0', ], test_require=[ 'pytest==5.0.1', 'flake8==1.1.1', 'xmlunittest==0.4.0', ], zip_safe=False )
agpl-3.0
Python
e2455de9a8a9a4d1147b75307d73f513cc866e11
Bump setup.py version to 0.3.0.
ColorGenomics/clr
setup.py
setup.py
from setuptools import setup requirements = ["dataclasses==0.8;python_version<'3.7'"] setup( name="clr", version="0.3.0", description="A command line tool for executing custom python scripts.", author="Color", author_email="[email protected]", url="https://github.com/color/clr", packages=["clr"], entry_points={"console_scripts": ["clr = clr:main"],}, install_requires=requirements, setup_requires=["pytest-runner"], tests_require=requirements + ["pytest==6.2.4"], license="MIT", include_package_data=True, package_data={"": ["completion.*"],}, )
from setuptools import setup requirements = ["dataclasses==0.8;python_version<'3.7'"] setup( name="clr", version="0.2.0", description="A command line tool for executing custom python scripts.", author="Color", author_email="[email protected]", url="https://github.com/color/clr", packages=["clr"], entry_points={"console_scripts": ["clr = clr:main"],}, install_requires=requirements, setup_requires=["pytest-runner"], tests_require=requirements + ["pytest==6.2.4"], license="MIT", include_package_data=True, package_data={"": ["completion.*"],}, )
mit
Python
0404c2d0b25d8d8e3bb542b4872361b24ea568e9
add long description
pyfarm/pyfarm-agent,pyfarm/pyfarm-core,guidow/pyfarm-agent,guidow/pyfarm-agent,guidow/pyfarm-agent,pyfarm/pyfarm-agent,pyfarm/pyfarm-agent
setup.py
setup.py
# No shebang line, this module is meant to be imported # # Copyright 2013 Oliver Palmer # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys assert sys.version_info[0:2] >= (2, 5), "Python 2.5 or higher is required" from textwrap import dedent from setuptools import find_packages from distutils.core import setup PACKAGE = "pyfarm.core" VERSION = (0, 0, 0, "alpha0") NAMESPACE = PACKAGE.split(".")[0] prefixpkg = lambda name: "%s.%s" % (NAMESPACE, name) install_requires = ["statsd"] if sys.version_info[0:2] < (2, 7): install_requires.append("simplejson") setup( name=PACKAGE, version=".".join(map(str, VERSION)), packages=map(prefixpkg, find_packages(NAMESPACE)), namespace_packages=[NAMESPACE], install_requires=install_requires, url="https://github.com/pyfarm/pyfarm-core", license="Apache v2.0", author="Oliver Palmer", author_email="[email protected]", description=dedent("""This sub-library contains core modules, classes, and data types which are used by other parts of PyFarm."""), long_description=open("README.rst", "r").read(), classifiers=[ "Development Status :: 2 - Pre-Alpha", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2 :: Only", # (for now) "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: System :: Distributed Computing"])
# No shebang line, this module is meant to be imported # # Copyright 2013 Oliver Palmer # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys assert sys.version_info[0:2] >= (2, 5), "Python 2.5 or higher is required" from textwrap import dedent from setuptools import find_packages from distutils.core import setup PACKAGE = "pyfarm.core" VERSION = (0, 0, 0, "alpha0") NAMESPACE = PACKAGE.split(".")[0] prefixpkg = lambda name: "%s.%s" % (NAMESPACE, name) install_requires = ["statsd"] if sys.version_info[0:2] < (2, 7): install_requires.append("simplejson") setup( name=PACKAGE, version=".".join(map(str, VERSION)), packages=map(prefixpkg, find_packages(NAMESPACE)), namespace_packages=[NAMESPACE], install_requires=install_requires, url="https://github.com/pyfarm/pyfarm-core", license="Apache v2.0", author="Oliver Palmer", author_email="[email protected]", description=dedent("""This sub-library contains core modules, classes, and data types which are used by other parts of PyFarm."""), classifiers=[ "Development Status :: 2 - Pre-Alpha", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2 :: Only", # (for now) "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: System :: Distributed Computing"])
apache-2.0
Python
b79e11ccc4a07a5a257d2135aa9c7d3c2ff75546
Fix released
dreid/edn
setup.py
setup.py
from setuptools import setup setup( name='edn', version='0.0.1', packages=['edn'], package_data={'edn': ['edn.parsley']}, install_requires=[ 'iso8601>=0.1.6', 'parsley>=1.2', 'perfidy', ], )
from setuptools import setup setup( name='edn', version='0.0.1', packages=['edn'], package_data={'edn': ['edn.parsley']}, install_requires=[ # iso8601 0.1.5 introduces a timezone parsing bug. # https://bitbucket.org/micktwomey/pyiso8601/issue/8/015-parses-negative-timezones-incorrectly 'iso8601==0.1.4', 'parsley>=1.2', 'perfidy', ], )
mit
Python
763d59db4d6369434c55af25caa69cf57f8d712f
Fix user statement rendering issues.
TresysTechnology/setools,TresysTechnology/setools,TresysTechnology/setools,TresysTechnology/setools
libapol/policyrep/user.py
libapol/policyrep/user.py
# Copyright 2014, Tresys Technology, LLC # # This file is part of SETools. # # SETools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2.1 of # the License, or (at your option) any later version. # # SETools is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with SETools. If not, see # <http://www.gnu.org/licenses/>. # import string import setools.qpol as qpol import role import mls import symbol class User(symbol.PolicySymbol): """A user.""" @property def roles(self): """The user's set of roles.""" r = set() aiter = self.qpol_symbol.get_role_iter(self.policy) while not aiter.end(): item = role.Role( self.policy, qpol.qpol_role_from_void(aiter.get_item())) # object_r is implicitly added to all roles by the compiler. # technically it is incorrect to skip it, but policy writers # and analysts don't expect to see it in results, and it # will confuse, especially for set equality user queries. if item != "object_r": r.add(item) aiter.next() return r @property def mls_level(self): """The user's default MLS level.""" return mls.MLSLevel(self.policy, self.qpol_symbol.get_dfltlevel(self.policy)) @property def mls_range(self): """The user's MLS range.""" return mls.MLSRange(self.policy, self.qpol_symbol.get_range(self.policy)) def statement(self): roles = list(str(r) for r in self.roles) stmt = "user {0} roles ".format(self) if (len(roles) > 1): stmt += "{{ {0} }}".format(string.join(roles)) else: stmt += roles[0] try: stmt += " level {0.mls_level} range {0.mls_range};".format(self) except AttributeError: stmt += ";" return stmt
# Copyright 2014, Tresys Technology, LLC # # This file is part of SETools. # # SETools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2.1 of # the License, or (at your option) any later version. # # SETools is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with SETools. If not, see # <http://www.gnu.org/licenses/>. # import string import setools.qpol as qpol import role import mls import symbol class User(symbol.PolicySymbol): """A user.""" @property def roles(self): """The user's set of roles.""" r = set() aiter = self.qpol_symbol.get_role_iter(self.policy) while not aiter.end(): item = role.Role( self.policy, qpol.qpol_role_from_void(aiter.get_item())) # object_r is implicitly added to all roles by the compiler. # technically it is incorrect to skip it, but policy writers # and analysts don't expect to see it in results, and it # will confuse, especially for set equality user queries. if item != "object_r": r.add(item) aiter.next() return r @property def mls_default(self): """The user's default MLS level.""" return mls.MLSRange(self.policy, self.qpol_symbol.get_range(self.policy)) @property def mls_range(self): """The user's MLS range.""" return mls.MLSLevel(self.policy, self.qpol_symbol.get_dfltlevel(self.policy)) def statement(self): roles = list(self.roles) stmt = "user {0} ".format(self) if (len(roles) > 1): stmt += "{{ {0} }}".format(string.join(str(r) for r in roles)) else: stmt += str(roles[0]) try: stmt += " level {0.mls_default} range {0.mls_range};".format(self) except AttributeError: stmt += ";" return stmt
lgpl-2.1
Python
af3a7217b94254f2ce533deefd4d9e636b9937f9
Bump version to 0.2-dev
mwilliamson/zuice
setup.py
setup.py
from distutils.core import setup setup( name='Zuice', version='0.2-dev', description='A dependency injection framework for Python', author='Michael Williamson', author_email='[email protected]', url='http://gitorious.org/zuice', packages=['zuice'], )
from distutils.core import setup setup( name='Zuice', version='0.1', description='A dependency injection framework for Python', author='Michael Williamson', author_email='[email protected]', url='http://gitorious.org/zuice', packages=['zuice'], )
bsd-2-clause
Python
cfec28aca4a4da5ec89b831b1ad13e551d8d73fa
Modify setup.py
rsk-mind/rsk-mind-framework
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages __version__ = "0.1.1" setup( name='RSK Mind', version=__version__, description='Framework for machine learning platform', keywords='machine learning deep learning', url='[email protected]:rasarmy/framework.git', author='RSK Project', author_email='[email protected]', license='MIT', scripts=['rsk_mind/bin/rskmind-admin.py'], entry_points={'console_scripts': [ 'rskmind-admin = rskmind.core.management:execute_from_command_line', ]}, include_package_data=True, packages=find_packages(exclude=('tests', 'tests.*', 'doc', 'tests.*')), install_requires=[ 'xgboost==0.4a30', 'geoip2', 'scikit-learn', 'scipy', 'Jinja2', 'numpy' ], extras_require={ 'docs': ['sphinx'], 'tests': ['nose'] }, zip_safe=False )
#!/usr/bin/env python from setuptools import setup, find_packages __version__ = "0.1.1" setup( name='RSK Mind', version=__version__, description='Framework for machine learning platform', keywords='machine learning deep learning', url='[email protected]:rasarmy/framework.git', author='RSK Project', author_email='[email protected]', license='MIT', scripts=['rsk_mind/bin/rskmind-admin.py'], entry_points={'console_scripts': [ 'rskmind-admin = rskmind.core.management:execute_from_command_line', ]}, include_package_data=True, packages=find_packages(exclude=('tests', 'tests.*')), install_requires=[ 'xgboost==0.4a30', 'geoip2', 'scikit-learn', 'scipy', 'Jinja2', 'numpy' ], extras_require={ 'docs': ['sphinx'], 'tests': ['nose'] }, zip_safe=False )
mit
Python
c7124022925c71bc5b89e02cac059f7f9a03625d
Fix license filename in setup.py
caseydunham/PwnedCheck
setup.py
setup.py
import pwnedcheck from distutils.core import setup setup( name="PwnedCheck", packages=["pwnedcheck"], package_dir={"pwnedcheck": "pwnedcheck"}, version=pwnedcheck.__version__, description="Python package to interact with http://haveibeenpwned.com", long_description=open("README.rst").read() + "\n\n" + open("CHANGES.rst").read(), author="Casey Dunham", author_email="[email protected]", url="https://github.com/caseydunham/PwnedCheck", license=open("LICENSE.rst").read(), classifiers=( "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Healthcare Industry", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Natural Language :: English", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Security", ) )
import pwnedcheck from distutils.core import setup setup( name="PwnedCheck", packages=["pwnedcheck"], package_dir={"pwnedcheck": "pwnedcheck"}, version=pwnedcheck.__version__, description="Python package to interact with http://haveibeenpwned.com", long_description=open("README.rst").read() + "\n\n" + open("CHANGES.rst").read(), author="Casey Dunham", author_email="[email protected]", url="https://github.com/caseydunham/PwnedCheck", license=open("LICENSE.rst.rst").read(), classifiers=( "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Healthcare Industry", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Natural Language :: English", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Security", ) )
mit
Python
528d43ffdf1ae3182f20aab30d73183a6210d3be
include pxd file in depends
mnishida/PyMWM
setup.py
setup.py
import os from distutils.util import get_platform import numpy as np from Cython.Distutils import build_ext from setuptools import Extension, find_packages, setup platform = get_platform() if platform.startswith("win"): extra_compile_args = [] extra_link_args = [] else: extra_compile_args = [ "-fPIC", "-m64", "-fopenmp", "-march=native", "-O3", "-ftree-vectorizer-verbose=2", "-Wl,--no-as-needed", ] extra_link_args = ["-shared"] ext_modules = [] for shape in ["cylinder", "slit"]: pkg = f"pymwm.{shape}.utils.{shape}_utils" basename = os.path.join("pymwm", shape, "utils", f"{shape}_utils") ext_modules.append( Extension( pkg, sources=[basename + ".pyx"], depends=[basename + ".pxd"], include_dirs=[np.get_include(), "."], extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, libraries=[], language="c++", ) ) setup( name="pymwm", version="0.1.0", url="https://github.com/mnishida/RII_Pandas", license="MIT", author="Munehiro Nishida", author_email="[email protected]", description="A metallic waveguide mode solver", long_description=open("README.md").read(), long_description_content_type="text/markdown", zip_safe=False, packages=find_packages(), setup_requires=["cython", "numpy", "scipy"], install_requires=[line.strip() for line in open("requirements.txt").readlines()], python_requires=">=3.7", classifiers=[ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", ], keywords="metallic waveguide mode, electromagnetism", ext_modules=ext_modules, cmdclass={"build_ext": build_ext}, )
import os from distutils.util import get_platform import numpy as np from Cython.Distutils import build_ext from setuptools import Extension, find_packages, setup platform = get_platform() if platform.startswith("win"): extra_compile_args = [] extra_link_args = [] else: extra_compile_args = [ "-fPIC", "-m64", "-fopenmp", "-march=native", "-O3", "-ftree-vectorizer-verbose=2", "-Wl,--no-as-needed", ] extra_link_args = ["-shared"] ext_modules = [] for shape in ["cylinder", "slit"]: pkg = f"pymwm.{shape}.utils.{shape}_utils" pyx = os.path.join("pymwm", shape, "utils", f"{shape}_utils.pyx") ext_modules.append( Extension( pkg, sources=[pyx], depends=[], include_dirs=[np.get_include(), "."], extra_compile_args=extra_compile_args, extra_link_args=extra_link_args, libraries=[], language="c++", ) ) setup( name="pymwm", version="0.1.0", url="https://github.com/mnishida/RII_Pandas", license="MIT", author="Munehiro Nishida", author_email="[email protected]", description="A metallic waveguide mode solver", long_description=open("README.md").read(), long_description_content_type="text/markdown", zip_safe=False, packages=find_packages(), setup_requires=["cython", "numpy", "scipy"], install_requires=[line.strip() for line in open("requirements.txt").readlines()], python_requires=">=3.7", classifiers=[ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", ], keywords="metallic waveguide mode, electromagnetism", ext_modules=ext_modules, cmdclass={"build_ext": build_ext}, )
mit
Python
ad15cc955413575008d6fe242d253c9fce5d744a
update setup.py
bashu/django-facebox,bashu/django-facebox,bashu/django-facebox
setup.py
setup.py
import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-facebox', version='0.2', packages=find_packages(exclude=['example']), include_package_data=True, license='BSD License', description='Simple facebox modal for Django', long_description=README, url='http://github.com/bashu/django-facebox', author='Basil Shubin', author_email='[email protected]', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], zip_safe=False, )
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-facebox', version='0.2', packages=['facebox'], include_package_data=True, license='BSD License', description='Simple facebox modal for Django', long_description=README, url='http://github.com/bashu/django-facebox', author='Basil Shubin', author_email='[email protected]', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], zip_safe=False, )
bsd-3-clause
Python
ca1ef6d34d5ba04c6c1364b60d10314d49d00a8b
add classifiers to setup.py
mfussenegger/easymail
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup setup( name='easymail', version='0.1.0', author='Mathias Fussenegger', author_email='[email protected]', url='http://pypi.python.org/pypi/easymail/', license='LICENSE.txt', description='abstraction layer on top of the email package to make sending\ emails a little bit easier', packages=['easymail'], install_requires=[ ], classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Software Development', 'Topic :: System :: Networking', ], )
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup setup( name='easymail', version='0.1.0', author='Mathias Fussenegger', author_email='[email protected]', url='http://pypi.python.org/pypi/easymail/', license='LICENSE.txt', description='abstraction layer on top of the email package to make sending\ emails a little bit easier', packages=['easymail'], install_requires=[ ] )
mit
Python
ca166c74914f570fa08d95380760fc5a1bea59ba
build new fast integration
adrn/gary,adrn/gary,adrn/gala,adrn/gala,adrn/gary,adrn/gala
setup.py
setup.py
# coding: utf-8 from __future__ import division, print_function __author__ = "adrn <[email protected]>" # Standard library import os from distutils.core import setup from distutils.extension import Extension # Third-party import numpy as np from Cython.Distutils import build_ext from Cython.Build import cythonize # Get numpy path numpy_base_path = os.path.split(np.__file__)[0] numpy_incl_path = os.path.join(numpy_base_path, "core", "include") mac_incl_path = "/usr/include/malloc" extensions = [] potential = Extension("gary.potential.*", ["gary/potential/*.pyx", "gary/potential/_cbuiltin.c"], include_dirs=[numpy_incl_path, mac_incl_path]) extensions.append(potential) integrate = Extension("gary.integrate.*", ["gary/integrate/*.pyx", "gary/integrate/dopri/dop853.c", "gary/integrate/1d/simpson.c"], include_dirs=[numpy_incl_path, mac_incl_path], extra_compile_args=['-std=c99']) extensions.append(integrate) dynamics = Extension("gary.dynamics.*", ["gary/dynamics/*.pyx"], include_dirs=[numpy_incl_path]) extensions.append(dynamics) setup( name="gary", version="0.1", author="Adrian M. Price-Whelan", author_email="[email protected]", license="MIT", cmdclass={'build_ext': build_ext}, ext_modules=cythonize(extensions), packages=["gary", "gary.coordinates", "gary.io", "gary.observation", "gary.integrate", "gary.dynamics", "gary.inference", "gary.potential"], scripts=['bin/plotsnap', 'bin/moviesnap', 'bin/snap2gal'], package_data={'gary.potential': ['*.pxd','*.c'], 'gary.integrate': ['*.pxd','*.c'] }, )
# coding: utf-8 from __future__ import division, print_function __author__ = "adrn <[email protected]>" # Standard library import os from distutils.core import setup from distutils.extension import Extension # Third-party import numpy as np from Cython.Distutils import build_ext from Cython.Build import cythonize # Get numpy path numpy_base_path = os.path.split(np.__file__)[0] numpy_incl_path = os.path.join(numpy_base_path, "core", "include") mac_incl_path = "/usr/include/malloc" extensions = [] potential = Extension("gary.potential.*", ["gary/potential/*.pyx", "gary/potential/_cbuiltin.c"], include_dirs=[numpy_incl_path, mac_incl_path]) extensions.append(potential) integrate = Extension("gary.integrate.*", ["gary/integrate/*.pyx", "gary/integrate/dopri/dop853.c"], include_dirs=[numpy_incl_path, mac_incl_path], extra_compile_args=['-std=c99']) extensions.append(integrate) # dynamics = Extension("gary.dynamics.*", # ["gary/dynamics/*.pyx"], # include_dirs=[numpy_incl_path]) # extensions.append(dynamics) setup( name="gary", version="0.1", author="Adrian M. Price-Whelan", author_email="[email protected]", license="MIT", cmdclass={'build_ext': build_ext}, ext_modules=cythonize(extensions), packages=["gary", "gary.coordinates", "gary.io", "gary.observation", "gary.integrate", "gary.dynamics", "gary.inference", "gary.potential"], scripts=['bin/plotsnap', 'bin/moviesnap', 'bin/snap2gal'], package_data={'gary.potential': ['*.pxd','*.c'], 'gary.integrate': ['*.pxd','*.c'] }, )
mit
Python
2ffa5e8f5c8b3beb0026727d12f8d83cc9f931fe
Bump up version
uda/djaccount,uda/djaccount
setup.py
setup.py
import os from setuptools import setup, find_packages def read(filename): return open(os.path.join(os.path.dirname(__file__), filename)).read() setup( name='djaccount', version='0.0.4-alpha1', description='Django account manager', author='Yehuda Deutsch', author_email='[email protected]', license='MIT', url='https://gitlab.com/uda/djaccount', keywords='django account', packages=find_packages(), long_description=read('README.md'), classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Framework :: Django', 'Framework :: Django :: 1.11', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Systems Administration :: Authentication/Directory', ], )
import os from setuptools import setup, find_packages def read(filename): return open(os.path.join(os.path.dirname(__file__), filename)).read() setup( name='djaccount', version='0.0.3-alpha2', description='Django account manager', author='Yehuda Deutsch', author_email='[email protected]', license='MIT', url='https://gitlab.com/uda/djaccount', keywords='django account', packages=find_packages(), long_description=read('README.md'), classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Framework :: Django', 'Framework :: Django :: 1.11', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Systems Administration :: Authentication/Directory', ], )
mit
Python
f7909707a96d82492a5b569cc50939b379c64b5d
Bump version to 0.0.30
lesjoneshmrc/service-manager,hmrc/service-manager,andrewgee/service-manager,lesjoneshmrc/service-manager,andrewgee/service-manager,lesjoneshmrc/service-manager,andrewgee/service-manager,hmrc/service-manager,andrewgee/service-manager,hmrc/service-manager,hmrc/service-manager,lesjoneshmrc/service-manager
setup.py
setup.py
from setuptools import setup setup(name='servicemanager', version='0.0.30', description='A python tool to manage developing and testing with lots of microservices', url='https://github.com/hmrc/service-manager', author='vaughansharman', license='Apache Licence 2.0', packages=['servicemanager', 'servicemanager.actions', 'servicemanager.server', 'servicemanager.service', 'servicemanager.thirdparty'], install_requires=['requests==2.2.1','pymongo==2.6.3','bottle==0.12.4','pytest==2.5.2','argcomplete==0.8.1'], scripts=['bin/sm', 'bin/smserver'], zip_safe=False)
from setuptools import setup setup(name='servicemanager', version='0.0.29', description='A python tool to manage developing and testing with lots of microservices', url='https://github.com/hmrc/service-manager', author='vaughansharman', license='Apache Licence 2.0', packages=['servicemanager', 'servicemanager.actions', 'servicemanager.server', 'servicemanager.service', 'servicemanager.thirdparty'], install_requires=['requests==2.2.1','pymongo==2.6.3','bottle==0.12.4','pytest==2.5.2','argcomplete==0.8.1'], scripts=['bin/sm', 'bin/smserver'], zip_safe=False)
apache-2.0
Python
509bf6be9bd139f79a16a32bba45d3198d1da74a
Fix for setup.py
blink1073/oct2py,blink1073/oct2py
setup.py
setup.py
"""Setup script for oct2py package. """ DISTNAME = 'oct2py' DESCRIPTION = 'Python to GNU Octave bridge --> run m-files from python.' LONG_DESCRIPTION = open('README.rst', 'rb').read().decode('utf-8') MAINTAINER = 'Steven Silvester' MAINTAINER_EMAIL = '[email protected]' URL = 'http://github.com/blink1073/oct2py' LICENSE = 'MIT' REQUIRES = ["numpy (>= 1.6.0)", "scipy (>= 0.9.0)"] PACKAGES = [DISTNAME, '%s.tests' % DISTNAME, '%s/ipython' % DISTNAME, '%s/ipython/tests' % DISTNAME] PACKAGE_DATA = {DISTNAME: ['tests/*.m']} CLASSIFIERS = """\ Development Status :: 5 - Production/Stable Intended Audience :: Developers Intended Audience :: Science/Research License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 2.7 Programming Language :: Python :: 3.2 Programming Language :: Python :: 3.3 Topic :: Scientific/Engineering Topic :: Software Development """ try: from setuptools import setup except ImportError: from distutils.core import setup with open('oct2py/__init__.py', 'rb') as fid: for line in fid: line = line.decode('utf-8') if line.startswith('__version__'): version = line.strip().split()[-1][1:-1] break setup( name=DISTNAME, version=version, maintainer=MAINTAINER, maintainer_email=MAINTAINER_EMAIL, packages=PACKAGES, package_data=PACKAGE_DATA, url=URL, download_url=URL, license=LICENSE, platforms=["Any"], description=DESCRIPTION, long_description=LONG_DESCRIPTION, classifiers=filter(None, CLASSIFIERS.split('\n')), requires=REQUIRES )
"""Setup script for oct2py package. """ DISTNAME = 'oct2py' DESCRIPTION = 'Python to GNU Octave bridge --> run m-files from python.' LONG_DESCRIPTION = open('README.rst', 'rb').read().decode('utf-8') MAINTAINER = 'Steven Silvester' MAINTAINER_EMAIL = '[email protected]' URL = 'http://github.com/blink1073/oct2py' LICENSE = 'MIT' REQUIRES = ["numpy (>= 1.6.0)", "scipy (>= 0.9.0)"] PACKAGES = [DISTNAME, '%s.tests' % DISTNAME, '%s/ipython' % DISTNAME, '%s/ipython/tests' % DISTNAME] PACKAGE_DATA = {DISTNAME: ['tests/*.m']} CLASSIFIERS = """\ Development Status :: 5 - Production/Stable Intended Audience :: Developers Intended Audience :: Science/Research License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 2.7 Programming Language :: Python :: 3.2 Programming Language :: Python :: 3.3 Topic :: Scientific/Engineering Topic :: Software Development """ try: from setuptools import setup except ImportError: from distutils.core import setup with open('oct2py/__init__.py', 'rb') as fid: for line in fid: line = line.decode('utf-8') if line.startswith('__version__'): version = line.strip().split()[-1][1:-1] break setup( name=DISTNAME, version=version, maintainer=MAINTAINER, maintainer_email=MAINTAINER_EMAIL, packages=PACKAGES, package_data=PACKAGE_DATA, url=URL, download_url=URL, license=LICENSE, platforms=["Any"], description=DESCRIPTION, long_description=LONG_DESCRIPTION, classifiers=filter(None, CLASSIFIERS.split('\n')), requires=REQUIRES )
mit
Python
db88c98cc1b7ba76a3f8efa417bf241d9eec4532
Update to version 0.0.2
hagbarddenstore/cfn
setup.py
setup.py
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.rst"), encoding="utf-8") as f: long_description = f.read() setup( name="cfn", version="0.0.2", description="Small script to manipulate AWS CloudFormation stacks", long_description=long_description, url="https://github.com/hagbarddenstore/cfn", author="Kim Johansson", author_email="[email protected]", license="MIT", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7" ], keywords="aws cfn cloudformation", packages=find_packages(exclude=["contrib", "docs", "tests"]), install_requires=["boto3", "PyYAML", "jinja2"], extras_require={}, package_data={}, data_files=[], entry_points={ "console_scripts": [ "cfn=cfn:main" ] } )
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.rst"), encoding="utf-8") as f: long_description = f.read() setup( name="cfn", version="0.0.1", description="Small script to manipulate AWS CloudFormation stacks", long_description=long_description, url="https://github.com/hagbarddenstore/cfn", author="Kim Johansson", author_email="[email protected]", license="MIT", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7" ], keywords="aws cfn cloudformation", packages=find_packages(exclude=["contrib", "docs", "tests"]), install_requires=["boto3", "PyYAML", "jinja2"], extras_require={}, package_data={}, data_files=[], entry_points={ "console_scripts": [ "cfn=cfn:main" ] } )
mit
Python
bc828d621dbea3e9510c05c1d40b952b710c6187
Update description and link in setup.py
flomotlik/formica
setup.py
setup.py
"""Packaging settings.""" from codecs import open from os.path import abspath, dirname, join from setuptools import setup from formica import __version__ this_dir = abspath(dirname(__file__)) with open(join(this_dir, 'README.md'), encoding='utf-8') as file: long_description = file.read() setup( name='formica', version=__version__, description='Simple AWS CloudFormation stack management tooling.', long_description=long_description, url='https://github.com/flomotlik/formica', author='Florian Motlik', author_email='[email protected]', license='MIT', classifiers=[ 'Intended Audience :: Developers', 'Topic :: Utilities', 'License :: Public Domain', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], keywords='cloudformation, aws, cloud', packages=['formica'], install_requires=['troposphere==1.9.1', 'boto3==1.4.4', 'click==6.7', 'texttable==0.8.7'], entry_points={ 'console_scripts': [ 'formica=formica.cli:main', ], }, test_suite="tests" )
"""Packaging settings.""" from codecs import open from os.path import abspath, dirname, join from setuptools import setup from formica import __version__ this_dir = abspath(dirname(__file__)) with open(join(this_dir, 'README.md'), encoding='utf-8') as file: long_description = file.read() setup( name='formica', version=__version__, description='Simple Cloudformation stack management tooling.', long_description=long_description, url='https://github.com/cloudthropology/formica', author='Florian Motlik', author_email='[email protected]', license='MIT', classifiers=[ 'Intended Audience :: Developers', 'Topic :: Utilities', 'License :: Public Domain', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], keywords='cloudformation, aws, cloud', packages=['formica'], install_requires=['troposphere==1.9.1', 'boto3==1.4.4', 'click==6.7', 'texttable==0.8.7'], entry_points={ 'console_scripts': [ 'formica=formica.cli:main', ], }, test_suite="tests" )
mit
Python
05f8743a0047767dd46cdef3788fef2ede8e9ff0
add Pillow to requirements
Andertaker/django-vkontakte-postcard
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-vkontakte-postcard', version=__import__('vkontakte_postcard').__version__, description='Post photo to vk and add comment to it', long_description=open('README.md').read(), author='krupin.dv', author_email='[email protected]', url='https://github.com/Andertaker/django-vkontakte-postcard', download_url='http://pypi.python.org/pypi/django-vkontakte-postcard', license='BSD', packages=find_packages(), include_package_data=True, zip_safe=False, # because we're including media that Django needs install_requires=[ 'Pillow', 'django-vkontakte-photos', 'django-vkontakte-comments', ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
from setuptools import setup, find_packages setup( name='django-vkontakte-postcard', version=__import__('vkontakte_postcard').__version__, description='Post photo to vk and add comment to it', long_description=open('README.md').read(), author='krupin.dv', author_email='[email protected]', url='https://github.com/Andertaker/django-vkontakte-postcard', download_url='http://pypi.python.org/pypi/django-vkontakte-postcard', license='BSD', packages=find_packages(), include_package_data=True, zip_safe=False, # because we're including media that Django needs install_requires=[ 'django-vkontakte-photos', 'django-vkontakte-comments', ], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
bsd-3-clause
Python
5aa525ed26f34705c58d62ccf8a8945d0a64bd15
add url
tombiasz/django-hibpwned
setup.py
setup.py
from setuptools import setup setup( name='django-hibpwned', version='0.1', description='Django password validator based on haveibeenpwned.com API', url='https://github.com/tombiasz/django-hibpwned', author='tombiasz', author_email='', license='MIT', packages=['haveibeenpwned'], zip_safe=False, install_requires=[ 'Django>=1.9', 'requests>=2' ] )
from setuptools import setup setup( name='django-hibpwned', version='0.1', description='Django password validator based on haveibeenpwned.com API', url='', author='tombiasz', author_email='', license='MIT', packages=['haveibeenpwned'], zip_safe=False, install_requires=[ 'Django>=1.9', 'requests>=2' ] )
mit
Python
8f2c6cb5da0c456cefe958db305292a0abda8607
Fix license trove classifier, bump to 1.0.1
Crossway/antimarkdown,Crossway/antimarkdown
setup.py
setup.py
# -*- coding: utf-8 -*- """setup.py -- setup file for antimarkdown """ import os from setuptools import setup README = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst') setup( name = "antimarkdown", packages = ['antimarkdown'], install_requires = [ 'lxml', ], package_data = { '': ['*.txt', '*.html'], }, zip_safe = False, version = "1.0.1", description = "HTML to Markdown converter.", long_description = open(README).read(), author = "David Eyk", author_email = "[email protected]", url = "http://github.com/Crossway/antimarkdown/", license = 'BSD', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Software Development :: Documentation', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Processing :: Filters', 'Topic :: Text Processing :: Markup :: HTML', 'Topic :: Communications :: Email :: Filters', ], )
# -*- coding: utf-8 -*- """setup.py -- setup file for antimarkdown """ import os from setuptools import setup README = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst') setup( name = "antimarkdown", packages = ['antimarkdown'], install_requires = [ 'lxml', ], package_data = { '': ['*.txt', '*.html'], }, zip_safe = False, version = "1.0.0", description = "HTML to Markdown converter.", long_description = open(README).read(), author = "David Eyk", author_email = "[email protected]", url = "http://github.com/Crossway/antimarkdown/", license = 'BSD', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Software Development :: Documentation', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Text Processing :: Filters', 'Topic :: Text Processing :: Markup :: HTML', 'Topic :: Communications :: Email :: Filters', ], )
mit
Python
bd3b09b3a0dc7cc450d4a6806802712d521b2d22
Remove Python 2
twisted/twistedchecker
setup.py
setup.py
#!/usr/bin/env python # -*- test-case-name: twistedchecker -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from setuptools import find_packages, setup with open('README.rst') as f: longDescription = f.read() setup( name='twistedchecker', description='A Twisted coding standard compliance checker.', version='0.7.2', author='Twisted Matrix Laboratories', author_email='[email protected]', url='https://github.com/twisted/twistedchecker', packages=find_packages(), include_package_data=True, # use MANIFEST.in during install entry_points={ "console_scripts": [ "twistedchecker = twistedchecker.core.runner:main" ] }, license='MIT', classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Quality Assurance" ], keywords=[ "twisted", "checker", "compliance", "pep8" ], install_requires=[ "pylint == 1.5.6", "logilab-common == 1.2.1", "pycodestyle == 2.0.0", 'twisted>=15.0.0', ], extras_require = { 'dev': [ 'pyflakes', 'coverage' ], }, long_description=longDescription )
#!/usr/bin/env python # -*- test-case-name: twistedchecker -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from setuptools import find_packages, setup with open('README.rst') as f: longDescription = f.read() setup( name='twistedchecker', description='A Twisted coding standard compliance checker.', version='0.7.2', author='Twisted Matrix Laboratories', author_email='[email protected]', url='https://github.com/twisted/twistedchecker', packages=find_packages(), include_package_data=True, # use MANIFEST.in during install entry_points={ "console_scripts": [ "twistedchecker = twistedchecker.core.runner:main" ] }, license='MIT', classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Quality Assurance" ], keywords=[ "twisted", "checker", "compliance", "pep8" ], install_requires=[ "pylint == 1.5.6", "logilab-common == 1.2.1", "pycodestyle == 2.0.0", 'twisted>=15.0.0', ], extras_require = { 'dev': [ 'pyflakes', 'coverage' ], }, long_description=longDescription )
mit
Python
4e1360a3c340552be1145be6c474765bcfcf0379
write out imgfac/Version.py instead of using version.txt
redhat-imaging/imagefactory,jmcabandara/imagefactory,henrysher/imagefactory,jmcabandara/imagefactory,redhat-imaging/imagefactory,LalatenduMohanty/imagefactory,LalatenduMohanty/imagefactory,henrysher/imagefactory
setup.py
setup.py
# Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from distutils.core import setup from distutils.command.sdist import sdist as _sdist import os import os.path import subprocess version_file_path = "imgfac/Version.py" version_file = open(version_file_path, 'w') pkg_version = subprocess.check_output('/usr/bin/git describe | tr - _', shell=True).rstrip('\n') version_file.write('VERSION = %s' % pkg_version) version_file.close() datafiles=[('share/man/man1', ['Documentation/man/imagefactory.1']), ('/etc/imagefactory', ['imagefactory.conf']), ('/etc/pki/imagefactory', ['cert-ec2.pem']), ('/etc/sysconfig', ['imagefactory']), ('/etc/logrotate.d', ['imagefactory']), ('/etc/rc.d/init.d', ['scripts/imagefactory'])] class sdist(_sdist): """ custom sdist command to prepare imagefactory.spec file """ def run(self): cmd = (""" sed -e "s/@VERSION@/%s/g" < imagefactory.spec.in """ % pkg_version) + " > imagefactory.spec" os.system(cmd) _sdist.run(self) setup(name='imagefactory', version=pkg_version, description='Image Factory system image generation tool', author='Ian McLeod', author_email='[email protected]', license='Apache License, Version 2.0', url='http://www.aeolusproject.org/imagefactory.html', packages=['imgfac', 'imgfac.builders', 'imgfac.rest', 'imagefactory-plugins'], scripts=['imagefactory'], data_files = datafiles, cmdclass = {'sdist': sdist} )
# Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from distutils.core import setup from distutils.command.sdist import sdist as _sdist import os import os.path import subprocess version_file_name = "version.txt" try: if(not os.path.exists(version_file_name)): subprocess.call('/usr/bin/git describe | tr - _ > %s' % (version_file_name, ), shell=True) version_file = open(version_file_name, "r") VERSION = version_file.read()[0:-1] version_file.close() except Exception, e: raise RuntimeError("ERROR: version.txt could not be found. Run 'git describe > version.txt' to get the correct version info.") datafiles=[('share/man/man1', ['Documentation/man/imagefactory.1']), ('/etc/imagefactory', ['imagefactory.conf']), ('/etc/pki/imagefactory', ['cert-ec2.pem']), ('/etc/sysconfig', ['imagefactory']), ('/etc/logrotate.d', ['imagefactory']), ('/etc/rc.d/init.d', ['scripts/imagefactory'])] class sdist(_sdist): """ custom sdist command to prepare imagefactory.spec file """ def run(self): cmd = (""" sed -e "s/@VERSION@/%s/g" < imagefactory.spec.in """ % VERSION) + " > imagefactory.spec" os.system(cmd) _sdist.run(self) setup(name='imagefactory', version=VERSION, description='Image Factory system image generation tool', author='Ian McLeod', author_email='[email protected]', license='Apache License, Version 2.0', url='http://www.aeolusproject.org/imagefactory.html', packages=['imgfac', 'imgfac.builders', 'imgfac.rest', 'imagefactory-plugins'], scripts=['imagefactory'], data_files = datafiles, cmdclass = {'sdist': sdist} )
apache-2.0
Python
e544009bfdded85c6c3e69b34b0d2a74820a3fe7
Use pip-requirements.txt to populate install_requires
Linux2Go/Surveilr
setup.py
setup.py
#!/usr/bin/python # # Surveilr - Log aggregation, analysis and visualisation # # Copyright (C) 2011 Linux2Go # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public # License along with this program. If not, see # <http://www.gnu.org/licenses/>. # from setuptools import setup def get_install_requires(): install_requires = [] with open('tools/pip-requirements.txt', 'r') as fp: for l in fp: l = l.strip() if l.startswith('#'): continue elif l.startswith('-e'): install_requires.append(l[l.index('#egg=')+5:]) else: install_requires.append(l) return install_requires setup( name='surveilr', version='0.1a1', description='Monitoring System evolved', author='Soren Hansen', license='AGPL', author_email='[email protected]', url='http://surveilr.org/', packages=['surveilr'], install_requires=get_install_requires(), test_suite='nose.collector', install_package_data=True, classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Environment :: Console', 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: GNU Affero General Public License v3', 'GNU Library or Lesser General Public License (LGPL)', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Topic :: Internet :: Log Analysis', 'Topic :: System :: Monitoring', 'Topic :: System :: Networking :: Monitoring', ] )
#!/usr/bin/python # # Surveilr - Log aggregation, analysis and visualisation # # Copyright (C) 2011 Linux2Go # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public # License along with this program. If not, see # <http://www.gnu.org/licenses/>. # from setuptools import setup setup( name='surveilr', version='0.1a1', description='Monitoring System evolved', author='Soren Hansen', license='AGPL', author_email='[email protected]', url='http://surveilr.org/', packages=['surveilr'], install_requires=['riakalchemy'], test_suite='nose.collector', install_package_data=True, classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Environment :: Console', 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: GNU Affero General Public License v3', 'GNU Library or Lesser General Public License (LGPL)', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python', 'Topic :: Internet :: Log Analysis', 'Topic :: System :: Monitoring', 'Topic :: System :: Networking :: Monitoring', ] )
agpl-3.0
Python
f4be8bca302a5124aacbe817c35572e7e4923539
fix issue 217 by adding contrib to setup.py file
pytube/pytube
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """This module contains setup instructions for pytube.""" try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('LICENSE') as readme_file: license = readme_file.read() setup( name='pytube', version='9.0.5', author='Nick Ficano', author_email='[email protected]', packages=['pytube', 'pytube.contrib'], url='https://github.com/nficano/pytube', license=license, entry_points={ 'console_scripts': [ 'pytube = pytube.cli:main', ], }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: MacOS', 'Operating System :: Microsoft', 'Operating System :: POSIX', 'Operating System :: Unix', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python', 'Topic :: Internet', 'Topic :: Multimedia :: Video', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Terminals', 'Topic :: Utilities', ], description=('A pythonic library for downloading YouTube Videos.'), long_description=readme, zip_safe=True, )
#!/usr/bin/env python # -*- coding: utf-8 -*- """This module contains setup instructions for pytube.""" try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('LICENSE') as readme_file: license = readme_file.read() setup( name='pytube', version='9.0.5', author='Nick Ficano', author_email='[email protected]', packages=['pytube'], url='https://github.com/nficano/pytube', license=license, entry_points={ 'console_scripts': [ 'pytube = pytube.cli:main', ], }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: MacOS', 'Operating System :: Microsoft', 'Operating System :: POSIX', 'Operating System :: Unix', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python', 'Topic :: Internet', 'Topic :: Multimedia :: Video', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Terminals', 'Topic :: Utilities', ], description=('A pythonic library for downloading YouTube Videos.'), long_description=readme, zip_safe=True, )
unlicense
Python
4fde19b4b77c80b5d36376a763f644fc3711d1e2
Add Missing Requirement
etscrivner/send_clowder
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', '') requirements = [ 'clowder', 'isodate' ] test_requirements = [ 'nose', 'mock' ] setup( name='send_clowder', version='0.1.2', description="Simple command-line tool for sending messages to clowder", long_description=readme + '\n\n' + history, author="Eric Scrivner", author_email='[email protected]', url='https://github.com/etscrivner/send_clowder', packages=[ 'send_clowder', ], package_dir={'send_clowder': 'send_clowder'}, include_package_data=True, install_requires=requirements, license="BSD", zip_safe=False, keywords='send_clowder', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], test_suite='tests', tests_require=test_requirements, entry_points={ 'console_scripts': { 'send_clowder = send_clowder.send_clowder:send_clowder_main' } } )
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', '') requirements = [ 'clowder' ] test_requirements = [ 'nose', 'mock' ] setup( name='send_clowder', version='0.1.2', description="Simple command-line tool for sending messages to clowder", long_description=readme + '\n\n' + history, author="Eric Scrivner", author_email='[email protected]', url='https://github.com/etscrivner/send_clowder', packages=[ 'send_clowder', ], package_dir={'send_clowder': 'send_clowder'}, include_package_data=True, install_requires=requirements, license="BSD", zip_safe=False, keywords='send_clowder', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], test_suite='tests', tests_require=test_requirements, entry_points={ 'console_scripts': { 'send_clowder = send_clowder.send_clowder:send_clowder_main' } } )
bsd-3-clause
Python
15694fa2f7cc18f256dc2866e6206686de1ab795
remove gevent extras_require
Bluehorn/requests,revolunet/requests,psf/requests,revolunet/requests
setup.py
setup.py
#!/usr/bin/env python """ distutils/setuptools install script. See inline comments for packaging documentation. """ import os import sys import requests from requests.compat import is_py3 try: from setuptools import setup # hush pyflakes setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() packages = [ 'requests', 'requests.packages', 'requests.packages.urllib3', 'requests.packages.urllib3.packages', 'requests.packages.urllib3.packages.ssl_match_hostname', 'requests.packages.urllib3.packages.mimetools_choose_boundary', ] # certifi is a Python package containing a CA certificate bundle for SSL verification. # On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can # use the system CA bundle instead; see `requests.utils` for details. # If your platform is supported, set `requires` to [] instead: requires = ['certifi>=0.0.7'] # chardet is used to optimally guess the encodings of pages that don't declare one. # At this time, chardet is not a required dependency. However, it's sufficiently # important that pip/setuptools should install it when it's unavailable. if is_py3: chardet_package = 'chardet2' else: chardet_package = 'chardet>=1.0.0' requires.append('oauthlib>=0.1.0,<0.2.0') requires.append(chardet_package) setup( name='requests', version=requests.__version__, description='Python HTTP for Humans.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(), author='Kenneth Reitz', author_email='[email protected]', url='http://python-requests.org', packages=packages, package_data={'': ['LICENSE', 'NOTICE']}, include_package_data=True, install_requires=requires, license=open("LICENSE").read(), classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: ISC License (ISCL)', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', ), )
#!/usr/bin/env python """ distutils/setuptools install script. See inline comments for packaging documentation. """ import os import sys import requests from requests.compat import is_py3 try: from setuptools import setup # hush pyflakes setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() packages = [ 'requests', 'requests.packages', 'requests.packages.urllib3', 'requests.packages.urllib3.packages', 'requests.packages.urllib3.packages.ssl_match_hostname', 'requests.packages.urllib3.packages.mimetools_choose_boundary', ] # certifi is a Python package containing a CA certificate bundle for SSL verification. # On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can # use the system CA bundle instead; see `requests.utils` for details. # If your platform is supported, set `requires` to [] instead: requires = ['certifi>=0.0.7'] # chardet is used to optimally guess the encodings of pages that don't declare one. # At this time, chardet is not a required dependency. However, it's sufficiently # important that pip/setuptools should install it when it's unavailable. if is_py3: chardet_package = 'chardet2' else: chardet_package = 'chardet>=1.0.0' requires.append('oauthlib>=0.1.0,<0.2.0') requires.append(chardet_package) # The async API in requests.async requires the gevent package. # This is also not a required dependency. extras_require = { 'async': ['gevent'], } setup( name='requests', version=requests.__version__, description='Python HTTP for Humans.', long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(), author='Kenneth Reitz', author_email='[email protected]', url='http://python-requests.org', packages=packages, package_data={'': ['LICENSE', 'NOTICE']}, include_package_data=True, install_requires=requires, extras_require=extras_require, license=open("LICENSE").read(), classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: ISC License (ISCL)', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', ), )
isc
Python
2de635bbb747b21d04eac8530d1412be2c3cd9c1
Bump version
walkr/nanoservice
setup.py
setup.py
"""Nanoservice installation script https://github.com/walkr/nanoservice """ #!/usr/bin/env python import sys from setuptools import setup def read_long_description(readme_file): """ Read package long description from README file """ try: import pypandoc except (ImportError, OSError) as exception: print('No pypandoc or pandoc: %s' % (exception,)) if sys.version_info.major == 3: handle = open(readme_file, encoding='utf-8') else: handle = open(readme_file) long_description = handle.read() handle.close() return long_description else: return pypandoc.convert(readme_file, 'rst') setup( name='nanoservice', version='0.5.3', packages=['nanoservice'], author='Tony Walker', author_email='[email protected]', url='https://github.com/walkr/nanoservice', license='MIT', description='nanoservice is a small Python library for ' 'writing lightweight networked services using nanomsg', long_description=read_long_description('README.md'), install_requires=[ 'msgpack-python', 'nanomsg', 'nose', ], dependency_links=[ 'git+https://github.com/tonysimpson/nanomsg-python.git@master#egg=nanomsg', ], classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], )
"""Nanoservice installation script https://github.com/walkr/nanoservice """ #!/usr/bin/env python import sys from setuptools import setup def read_long_description(readme_file): """ Read package long description from README file """ try: import pypandoc except (ImportError, OSError) as exception: print('No pypandoc or pandoc: %s' % (exception,)) if sys.version_info.major == 3: handle = open(readme_file, encoding='utf-8') else: handle = open(readme_file) long_description = handle.read() handle.close() return long_description else: return pypandoc.convert(readme_file, 'rst') setup( name='nanoservice', version='0.5.2', packages=['nanoservice'], author='Tony Walker', author_email='[email protected]', url='https://github.com/walkr/nanoservice', license='MIT', description='nanoservice is a small Python library for ' 'writing lightweight networked services using nanomsg', long_description=read_long_description('README.md'), install_requires=[ 'msgpack-python', 'nanomsg', 'nose', ], dependency_links=[ 'git+https://github.com/tonysimpson/nanomsg-python.git@master#egg=nanomsg', ], classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], )
mit
Python
e1200dfc7a882340037448ff64241786e828c8c3
Include changelog on pypi page
F-Secure/mittn,F-Secure/mittn
setup.py
setup.py
from setuptools import setup, find_packages setup( name='mittn', use_scm_version=True, description='Mittn', long_description=open('README.rst').read() + '\n' + open('CHANGELOG.rst').read(), classifiers=[ "Programming Language :: Python :: 2.7" ], license='Apache License 2.0', author='F-Secure Corporation', author_email='[email protected]', url='https://github.com/F-Secure/mittn', packages=find_packages(exclude=['features']), install_requires=open('requirements.txt').readlines(), )
from setuptools import setup, find_packages setup( name='mittn', use_scm_version=True, description='Mittn', long_description=open('README.rst').read(), classifiers=[ "Programming Language :: Python :: 2.7" ], license='Apache License 2.0', author='F-Secure Corporation', author_email='[email protected]', url='https://github.com/F-Secure/mittn', packages=find_packages(exclude=['features']), install_requires=open('requirements.txt').readlines(), )
apache-2.0
Python
ed5119485dcaaf0ff5f68a365fd2cfa44cfd0a16
exclude test package from setup
weinbusch/django-tex
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-tex', description='A simple Django app to render Latex templates and compile them into Pdf files.', url='https://github.com/weinbusch/django-tex', author='Martin Bierbaum', license='MIT', keywords='django latex jinja2', packages=find_packages(exclude=['tests']), use_scm_version=True, setup_requires=[ 'setuptools_scm', ], install_requires=[ 'django>=1.11.4', 'jinja2>=2.9.6', ], python_requires='>=3.6.2', package_data={ '': ['*.tex'], }, )
from setuptools import setup, find_packages setup( name='django-tex', # version='0.2', description='A simple Django app to render Latex templates and compile them into Pdf files.', url='https://github.com/weinbusch/django-tex', author='Martin Bierbaum', license='MIT', keywords='django latex jinja2', packages=find_packages(), use_scm_version=True, setup_requires=[ 'setuptools_scm', ], install_requires=[ 'django>=1.11.4', 'jinja2>=2.9.6', ], python_requires='>=3.6.2', package_data={ '': ['*.tex'], }, )
mit
Python
fe03ecdf9562a9fb08d6a0adab5848d0deeef224
add `zvm` script to setup
zerovm/zerovm-cli,zerovm/zerovm-cli,zerovm/zerovm-cli,zerovm/zerovm-cli,zerovm/zerovm-cli,zerovm/zerovm-cli
setup.py
setup.py
# Copyright 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ ZeroVM Shell """ import sys import zvmlib requires = [] if sys.version_info < (2, 7): requires.append('ordereddict') kwargs = {} try: from setuptools import setup kwargs['install_requires'] = requires except ImportError: sys.stderr.write('warning: setuptools not found, you must ' 'manually install dependencies!\n') from distutils.core import setup ZVM_VERSION = zvmlib.__version__ setup( name='zerovm-cli', version=ZVM_VERSION, maintainer='Rackspace ZeroVM Team', maintainer_email='[email protected]', url='https://github.com/zerovm/zerovm-cli', description='ZeroVM Shell', long_description=__doc__, platforms=['any'], packages=['zvshlib', 'zvmlib'], license='Apache 2.0', keywords='zvsh zerovm zvm', classifiers=( 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: Apache Software License', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Topic :: Software Development :: Build Tools', ), scripts=['zvsh', 'zvm'], **kwargs )
# Copyright 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ ZeroVM Shell """ import sys import zvmlib requires = [] if sys.version_info < (2, 7): requires.append('ordereddict') kwargs = {} try: from setuptools import setup kwargs['install_requires'] = requires except ImportError: sys.stderr.write('warning: setuptools not found, you must ' 'manually install dependencies!\n') from distutils.core import setup ZVM_VERSION = zvmlib.__version__ setup( name='zerovm-cli', version=ZVM_VERSION, maintainer='Rackspace ZeroVM Team', maintainer_email='[email protected]', url='https://github.com/zerovm/zerovm-cli', description='ZeroVM Shell', long_description=__doc__, platforms=['any'], packages=['zvshlib', 'zvmlib'], license='Apache 2.0', keywords='zvsh zerovm zvm', classifiers=( 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: Apache Software License', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Topic :: Software Development :: Build Tools', ), scripts=['zvsh'], **kwargs )
apache-2.0
Python
dafb7d1023d77c2b094b0de5296acc54818722f5
Bump version to 0.4.1
d11wtq/dockerpty
setup.py
setup.py
# dockerpty. # # Copyright 2014 Chris Corbyn <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from setuptools import setup import os def fopen(filename): return open(os.path.join(os.path.dirname(__file__), filename)) def read(filename): return fopen(filename).read() setup( name='dockerpty', version='0.4.1', description='Python library to use the pseudo-tty of a docker container', long_description=read('README.md'), url='https://github.com/d11wtq/dockerpty', author='Chris Corbyn', author_email='[email protected]', install_requires=['six >= 1.3.0'], license='Apache 2.0', keywords='docker, tty, pty, terminal', packages=['dockerpty'], classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Environment :: Console', 'Intended Audience :: Developers', 'Topic :: Terminals', 'Topic :: Terminals :: Terminal Emulators/X Terminals', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
# dockerpty. # # Copyright 2014 Chris Corbyn <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from setuptools import setup import os def fopen(filename): return open(os.path.join(os.path.dirname(__file__), filename)) def read(filename): return fopen(filename).read() setup( name='dockerpty', version='0.4.0', description='Python library to use the pseudo-tty of a docker container', long_description=read('README.md'), url='https://github.com/d11wtq/dockerpty', author='Chris Corbyn', author_email='[email protected]', install_requires=['six >= 1.3.0'], license='Apache 2.0', keywords='docker, tty, pty, terminal', packages=['dockerpty'], classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Environment :: Console', 'Intended Audience :: Developers', 'Topic :: Terminals', 'Topic :: Terminals :: Terminal Emulators/X Terminals', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', ], )
apache-2.0
Python
c82a7b64e98cabc301f4d420483cb384888bb960
prepare for release 1.5
hhromic/python-bcubed
setup.py
setup.py
"""Main setup script.""" from setuptools import setup, find_packages NAME = "bcubed" VERSION = "1.5" DESCRIPTION = "Simple extended BCubed implementation in Python for clustering evaluation" AUTHOR = "Hugo Hromic" AUTHOR_EMAIL = "[email protected]" URL = "https://github.com/hhromic/python-bcubed" DOWNLOAD_URL = URL + "/tarball/" + VERSION def _read_file(filename): with open(filename) as reader: return reader.read() setup( name=NAME, version=VERSION, description=DESCRIPTION, author=AUTHOR, author_email=AUTHOR_EMAIL, maintainer=AUTHOR, maintainer_email=AUTHOR_EMAIL, url=URL, download_url=DOWNLOAD_URL, requires=["numpy"], install_requires=["numpy"], provides=["bcubed"], keywords=["bcubed", "clustering", "evaluation"], classifiers=[ "Environment :: Console", "Topic :: System :: Clustering", "Intended Audience :: Science/Research" ], license="Apache-2.0", platforms=["all"], long_description=_read_file("README.md"), long_description_content_type="text/markdown", packages=find_packages() )
"""Main setup script.""" from setuptools import setup, find_packages NAME = "bcubed" VERSION = "1.4" DESCRIPTION = "Simple extended BCubed implementation in Python for clustering evaluation" AUTHOR = "Hugo Hromic" AUTHOR_EMAIL = "[email protected]" URL = "https://github.com/hhromic/python-bcubed" DOWNLOAD_URL = URL + "/tarball/" + VERSION def _read_file(filename): with open(filename) as reader: return reader.read() setup( name=NAME, version=VERSION, description=DESCRIPTION, author=AUTHOR, author_email=AUTHOR_EMAIL, maintainer=AUTHOR, maintainer_email=AUTHOR_EMAIL, url=URL, download_url=DOWNLOAD_URL, requires=["numpy"], install_requires=["numpy"], provides=["bcubed"], keywords=["bcubed", "clustering", "evaluation"], classifiers=[ "Environment :: Console", "Topic :: System :: Clustering", "Intended Audience :: Science/Research" ], license="Apache-2.0", platforms=["all"], long_description=_read_file("README.md"), long_description_content_type="text/markdown", packages=find_packages() )
apache-2.0
Python
9c72d48b007d71ba53119031d1e4c71662d5988a
Fix for issue 10: chicken/egg issue on importing version number in setup.py
rob-smallshire/cartouche
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup version = '0.9' with open('README.txt', 'r') as readme: long_description = readme.read() requires = ['Sphinx>=0.6'] setup( name='cartouche', packages=['cartouche'], version = "{version}".format(version=version), url='http://code.google.com/p/cartouche/', download_url="http://code.google.com/p/cartouche/downloads/detail?name=cartouche-{version}.zip".format(version=version), license='BSD', author='Robert Smallshire', author_email='[email protected]', description='Sphinx "cartouche" extension', long_description=long_description, zip_safe=False, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" 'Topic :: Documentation', 'Topic :: Utilities', ], platforms='any', #packages=find_packages(), include_package_data=True, install_requires=requires, requires=['sphinx'], )
# -*- coding: utf-8 -*- from setuptools import setup from cartouche import __version__ as version with open('README.txt', 'r') as readme: long_description = readme.read() requires = ['Sphinx>=0.6'] setup( name='cartouche', packages=['cartouche'], version = "{version}".format(version=version), url='http://code.google.com/p/cartouche/', download_url="http://code.google.com/p/cartouche/downloads/detail?name=cartouche-{version}.zip".format(version=version), license='BSD', author='Robert Smallshire', author_email='[email protected]', description='Sphinx "cartouche" extension', long_description=long_description, zip_safe=False, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" 'Topic :: Documentation', 'Topic :: Utilities', ], platforms='any', #packages=find_packages(), include_package_data=True, install_requires=requires, requires=['sphinx'], )
bsd-3-clause
Python
a55282f2ee339061eee2ee8e9202fe15ab6a389f
fix missing commands directory in install
piton-package-manager/piton
setup.py
setup.py
from distutils.core import setup setup( name = 'piton', license='LICENSE', packages = ['piton', 'piton/utils', 'piton/commands'], # this must be the same as the name above version = '0.1.0', description = 'A local python package manager', url = 'https://github.com/piton-package-manager/piton', # use the URL to the github repo keywords = ['package', 'manager', 'local'], # arbitrary keywords classifiers = [ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], entry_points = { 'console_scripts': [ 'piton = piton.main:main' ] } )
from distutils.core import setup setup( name = 'piton', license='LICENSE', packages = ['piton', 'piton/utils'], # this must be the same as the name above version = '0.1.0', description = 'A local python package manager', url = 'https://github.com/piton-package-manager/piton', # use the URL to the github repo keywords = ['package', 'manager', 'local'], # arbitrary keywords classifiers = [ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], entry_points = { 'console_scripts': [ 'piton = piton.main:main' ] } )
mit
Python
8c5dfce7ccbc7729cc085d44177bcf68b370ba02
update numpy dep
Rostlab/nalaf
setup.py
setup.py
from setuptools import setup from setuptools import find_packages def readme(): with open('README.md', encoding='utf-8') as file: return file.read() def license(): with open('LICENSE.txt', encoding='utf-8') as file: return file.read() setup( name='nalaf', version='0.5.6-SNAPSHOT', description='Natural Language Framework, for NER and RE', long_description=readme(), classifiers=[ 'Natural Language :: English', 'Programming Language :: Python :: 3.5', 'Topic :: Text Processing :: Linguistic' ], keywords='nlp nlu ner re natural langauge crf svm extraction entities relationships framework', url='https://github.com/Rostlab/nalaf', author='Aleksandar Bojchevski, Carsten Uhlig, Juan Miguel Cejuela', author_email='[email protected]', license=license(), packages=find_packages(exclude=['tests']), install_requires=[ # ML 'numpy >= 1.11.2, <= 1.13.3', 'scipy >= 0.18.1, <= 0.19.1', # In newer versions they remove scipy.maxentropy 'scikit-learn >= 0.18.1, <= 0.18.2', 'spacy == 1.2.0', 'nltk >= 3.2.1', 'gensim >= 0.13.3, <= 0.13.4.1', # In 1.0.0 they move .vocab: https://github.com/RaRe-Technologies/gensim/blob/master/CHANGELOG.md#100-2017-02-24 'python-crfsuite >= 0.9.3, <= 0.9.6', # Other 'beautifulsoup4 >= 4.5.1', 'requests >= 2.21.0', 'progress >= 1.2', 'hdfs == 2.1.0', 'urllib3 <1.25, >=1.20' # force, due to dependency problems with botocore ], include_package_data=True, zip_safe=False, test_suite='nose.collector', setup_requires=['nose>=1.0'], )
from setuptools import setup from setuptools import find_packages def readme(): with open('README.md', encoding='utf-8') as file: return file.read() def license(): with open('LICENSE.txt', encoding='utf-8') as file: return file.read() setup( name='nalaf', version='0.5.6-SNAPSHOT', description='Natural Language Framework, for NER and RE', long_description=readme(), classifiers=[ 'Natural Language :: English', 'Programming Language :: Python :: 3.5', 'Topic :: Text Processing :: Linguistic' ], keywords='nlp nlu ner re natural langauge crf svm extraction entities relationships framework', url='https://github.com/Rostlab/nalaf', author='Aleksandar Bojchevski, Carsten Uhlig, Juan Miguel Cejuela', author_email='[email protected]', license=license(), packages=find_packages(exclude=['tests']), install_requires=[ # ML 'numpy >= 1.11.2, <= 1.11.3', 'scipy >= 0.18.1, <= 0.19.1', # In newer versions they remove scipy.maxentropy 'scikit-learn >= 0.18.1, <= 0.18.2', 'spacy == 1.2.0', 'nltk >= 3.2.1', 'gensim >= 0.13.3, <= 0.13.4.1', # In 1.0.0 they move .vocab: https://github.com/RaRe-Technologies/gensim/blob/master/CHANGELOG.md#100-2017-02-24 'python-crfsuite >= 0.9.3, <= 0.9.6', # Other 'beautifulsoup4 >= 4.5.1', 'requests >= 2.21.0', 'progress >= 1.2', 'hdfs == 2.1.0', 'urllib3 <1.25, >=1.20' # force, due to dependency problems with botocore ], include_package_data=True, zip_safe=False, test_suite='nose.collector', setup_requires=['nose>=1.0'], )
apache-2.0
Python
9fc336acb5451f257399c8575fe0e6ca7e4f72ef
add install_requires to setup.py
pbs/zencoder-py,torchbox/zencoder-py,zencoder/zencoder-py
setup.py
setup.py
from distutils.core import setup setup(name='zencoder', version='0.3', description='Integration library for Zencoder', author='Alex Schworer', author_email='[email protected]', url='http://github.com/schworer/zencoder-py', license="MIT License", install_requires=['httplib2'], packages=['zencoder'] )
from distutils.core import setup setup(name='zencoder', version='0.3', description='Integration library for Zencoder', author='Alex Schworer', author_email='[email protected]', url='http://github.com/schworer/zencoder-py', license="MIT License", packages=['zencoder'] )
mit
Python
c34ce19b3c1a1f7fb867d2977c924d870b12286c
Bump version to v1.1.0.
MITRECND/yaraprocessor
setup.py
setup.py
#!/usr/bin/env python # Copyright (c) 2013 The MITRE Corporation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. from setuptools import setup DESCRIPTION = "Scan data streams with Yara using various algorithms." LONG_DESCRIPTION = open('README.rst').read() setup( name='yaraprocessor', version='1.1.0', description=DESCRIPTION, long_description=LONG_DESCRIPTION, license=open('LICENSE').read(), author='Stephen DiCato', author_email='[email protected]', url='https://github.com/MITRECND/yaraprocessor', # For a single file, use 'py_modules' instead of 'packages' py_modules=['yaraprocessor'], zip_safe=False, classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Topic :: Security', 'Topic :: System :: Monitoring'))
#!/usr/bin/env python # Copyright (c) 2013 The MITRE Corporation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. from setuptools import setup DESCRIPTION = "Scan data streams with Yara using various algorithms." LONG_DESCRIPTION = open('README.rst').read() setup( name='yaraprocessor', version='1.0.0', description=DESCRIPTION, long_description=LONG_DESCRIPTION, license=open('LICENSE').read(), author='Stephen DiCato', author_email='[email protected]', url='https://github.com/MITRECND/yaraprocessor', # For a single file, use 'py_modules' instead of 'packages' py_modules=['yaraprocessor'], zip_safe=False, classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Topic :: Security', 'Topic :: System :: Monitoring'))
bsd-2-clause
Python
bb1afe0a8571e22d590b64b6003ae1f4bb1ab31f
Revert version to 1.5.0
masschallenge/django-accelerator,masschallenge/django-accelerator
setup.py
setup.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) DJANGO_SPEC = ">=1.8,<2.0" if "DJANGO_VERSION" in os.environ: DJANGO_SPEC = "=={}".format(os.environ["DJANGO_VERSION"]) INSTALL_REQUIRES = [ "django{}".format(DJANGO_SPEC), "django-mptt==0.10.0", "sorl-thumbnail", "django-embed-video", "pillow", "pytz", "swapper", "django-ordered-model==1.5.0", "django-paypal==1.0.0", "django-fluent-pages==2.0.6", "django-polymorphic", "django-sitetree==1.12.0" ] setup( name='django-accelerator', version='0.2.2', packages=find_packages(), include_package_data=True, license='MIT License', # example license description='A Django app to provide MassChallenge Accelerator models.', long_description=README, url='http://masschallenge.org/', author='MassChallenge, Inc.', author_email='[email protected]', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.10', 'Framework :: Django :: 1.11', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], install_requires=INSTALL_REQUIRES, )
# MIT License # Copyright (c) 2017 MassChallenge, Inc. import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) DJANGO_SPEC = ">=1.8,<2.0" if "DJANGO_VERSION" in os.environ: DJANGO_SPEC = "=={}".format(os.environ["DJANGO_VERSION"]) INSTALL_REQUIRES = [ "django{}".format(DJANGO_SPEC), "django-mptt==0.10.0", "sorl-thumbnail", "django-embed-video", "pillow", "pytz", "swapper", "django-ordered-model==3.3.0", "django-paypal==1.0.0", "django-fluent-pages==2.0.6", "django-polymorphic", "django-sitetree==1.12.0" ] setup( name='django-accelerator', version='0.2.2', packages=find_packages(), include_package_data=True, license='MIT License', # example license description='A Django app to provide MassChallenge Accelerator models.', long_description=README, url='http://masschallenge.org/', author='MassChallenge, Inc.', author_email='[email protected]', classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.10', 'Framework :: Django :: 1.11', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], install_requires=INSTALL_REQUIRES, )
mit
Python
926598b3af76c9c4d8c43b0a4d0c4a001e173653
Upgrade version to v0.3.2
AxiaCore/py-expression-eval
setup.py
setup.py
from setuptools import setup setup( name='py_expression_eval', version='0.3.2', description='Python Mathematical Expression Evaluator', url='https://github.com/AxiaCore/py-expression-eval/', author='vero4ka', author_email='[email protected]', license='MIT', packages=['py_expression_eval'], zip_safe=False, test_suite='py_expression_eval.tests', )
from setuptools import setup setup( name='py_expression_eval', version='0.3.1', description='Python Mathematical Expression Evaluator', url='https://github.com/AxiaCore/py-expression-eval/', author='vero4ka', author_email='[email protected]', license='MIT', packages=['py_expression_eval'], zip_safe=False, test_suite='py_expression_eval.tests', )
mit
Python
d68bd4d65d44ac45b689b34e040a44addf327a1e
Bump version.
sashka/flask-googleauth
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup setup( name='Flask-GoogleAuth', version='0.4.lft.1', url='https://github.com/sashka/flask-googleauth', license='BSD', author='Alexander Saltanov', author_email='[email protected]', description='Super simple OpenID and Google Federated Auth for Flask apps.', long_description=open('README.rst', 'r').read(), py_modules=['flask_googleauth'], zip_safe=False, include_package_data=True, platforms='any', install_requires=['Flask', 'requests', 'blinker'], classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
# -*- coding: utf-8 -*- from setuptools import setup setup( name='Flask-GoogleAuth', version='0.4', url='https://github.com/sashka/flask-googleauth', license='BSD', author='Alexander Saltanov', author_email='[email protected]', description='Super simple OpenID and Google Federated Auth for Flask apps.', long_description=open('README.rst', 'r').read(), py_modules=['flask_googleauth'], zip_safe=False, include_package_data=True, platforms='any', install_requires=['Flask', 'requests', 'blinker'], classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
bsd-2-clause
Python
04a6ba1729befd63cd9a4507d633c1497817c40b
Update classifiers
konomae/lastpass-python
setup.py
setup.py
from setuptools import setup def get_version(): import re with open('lastpass/__init__.py', 'r') as f: for line in f: m = re.match(r'__version__ = [\'"]([^\'"]*)[\'"]', line) if m: return m.group(1) raise RuntimeError('Cannot find version information') setup( name='lastpass-python', version=get_version(), description='Read only access to the online LastPass vault (unofficial)', long_description=open('README.rst').read(), license='MIT', author='konomae', author_email='[email protected]', url='https://github.com/konomae/lastpass-python', packages=['lastpass'], install_requires=[ "requests>=1.2.1,<=3.0.0", "pycrypto>=2.6.1", ], classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', ], )
from setuptools import setup def get_version(): import re with open('lastpass/__init__.py', 'r') as f: for line in f: m = re.match(r'__version__ = [\'"]([^\'"]*)[\'"]', line) if m: return m.group(1) raise RuntimeError('Cannot find version information') setup( name='lastpass-python', version=get_version(), description='Read only access to the online LastPass vault (unofficial)', long_description=open('README.rst').read(), license='MIT', author='konomae', author_email='[email protected]', url='https://github.com/konomae/lastpass-python', packages=['lastpass'], install_requires=[ "requests>=1.2.1,<=3.0.0", "pycrypto>=2.6.1", ], classifiers=[ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', ], )
mit
Python
c1fb843497f85eb4e1fb8d26fb7c168d936fc968
Bump version 1.1.1 -> 1.1.2
miyakogi/xfail.py
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from os import path try: from setuptools import setup except ImportError: from distutils.core import setup readme_file = path.join(path.dirname(path.abspath(__file__)), 'README.rst') with open(readme_file) as readme_file: readme = readme_file.read() install_requires = [] if sys.version_info < (3, 6): install_requires.append('typing') setup( name='xfail', version='1.1.2', description='Skip expected failures', long_description=readme, author='Hiroyuki Takagi', author_email='[email protected]', url='https://github.com/miyakogi/xfail.py', py_modules=['xfail'], include_package_data=True, license="MIT", zip_safe=False, keywords='xfail', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], test_suite='test_xfail', install_requires=install_requires, )
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from os import path try: from setuptools import setup except ImportError: from distutils.core import setup readme_file = path.join(path.dirname(path.abspath(__file__)), 'README.rst') with open(readme_file) as readme_file: readme = readme_file.read() install_requires = [] if sys.version_info < (3, 6): install_requires.append('typing') setup( name='xfail', version='1.1.1', description='Skip expected failures', long_description=readme, author='Hiroyuki Takagi', author_email='[email protected]', url='https://github.com/miyakogi/xfail.py', py_modules=['xfail'], include_package_data=True, license="MIT", zip_safe=False, keywords='xfail', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], test_suite='test_xfail', install_requires=install_requires, )
mit
Python
344901baf5d11649fbc5e0c1fc3caa69175e2482
Set core version compatible specifier to packages.
googleapis/python-resource-manager,googleapis/python-resource-manager
setup.py
setup.py
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os from setuptools import find_packages from setuptools import setup PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(PACKAGE_ROOT, 'README.rst')) as file_obj: README = file_obj.read() # NOTE: This is duplicated throughout and we should try to # consolidate. SETUP_BASE = { 'author': 'Google Cloud Platform', 'author_email': '[email protected]', 'scripts': [], 'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python', 'license': 'Apache 2.0', 'platforms': 'Posix; MacOS X; Windows', 'include_package_data': True, 'zip_safe': False, 'classifiers': [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Internet', ], } REQUIREMENTS = [ 'google-cloud-core >= 0.21.0, < 0.22dev', ] setup( name='google-cloud-resource-manager', version='0.21.0', description='Python Client for Google Cloud Resource Manager', long_description=README, namespace_packages=[ 'google', 'google.cloud', ], packages=find_packages(), install_requires=REQUIREMENTS, **SETUP_BASE )
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os from setuptools import find_packages from setuptools import setup PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(PACKAGE_ROOT, 'README.rst')) as file_obj: README = file_obj.read() # NOTE: This is duplicated throughout and we should try to # consolidate. SETUP_BASE = { 'author': 'Google Cloud Platform', 'author_email': '[email protected]', 'scripts': [], 'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python', 'license': 'Apache 2.0', 'platforms': 'Posix; MacOS X; Windows', 'include_package_data': True, 'zip_safe': False, 'classifiers': [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Internet', ], } REQUIREMENTS = [ 'google-cloud-core >= 0.21.0', ] setup( name='google-cloud-resource-manager', version='0.21.0', description='Python Client for Google Cloud Resource Manager', long_description=README, namespace_packages=[ 'google', 'google.cloud', ], packages=find_packages(), install_requires=REQUIREMENTS, **SETUP_BASE )
apache-2.0
Python
09003c9e9ac1d389c04e851c5700662d3006baec
fix package name & add maintainers
GeoNode/geonode-dialogos
setup.py
setup.py
from distutils.core import setup setup( name = "geonode-dialogos", version = "0.6", author = "Eldarion", author_email = "[email protected]", maintaner = "Geonode Developers", maintainer_email = "[email protected]", description = "a flaggable comments app", long_description = open("README.rst").read(), license = "BSD", url = "https://github.com/GeoNode/geonode-dialogos", packages = [ "dialogos", "dialogos.templatetags", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
from distutils.core import setup setup( name = "dialogos", version = "0.6", author = "Eldarion", author_email = "[email protected]", description = "a flaggable comments app", long_description = open("README.rst").read(), license = "BSD", url = "https://github.com/GeoNode/geonode-dialogos", packages = [ "dialogos", "dialogos.templatetags", ], classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Framework :: Django", ] )
bsd-3-clause
Python
c62d63fee453390f5d421dbd8d6b1654fb121b3e
Add pytest as a dependency to setup.py
google/scaaml,google/scaaml
setup.py
setup.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Setup script.""" from setuptools import find_packages from setuptools import setup from time import time long_description = open("README.md").read() version = "2.0.1r%s" % int(time()) setup( name="scaaml", version=version, description="Side Channel Attack Assisted with Machine Learning", long_description=long_description, author="Elie Bursztein", author_email="[email protected]", url="https://github.com/google/scaaml", license="Apache License 2.0", install_requires=[ "colorama", "termcolor", "tqdm", "pandas", "pytest", "numpy", "tabulate", "matplotlib", "Pillow", "tensorflow>=2.2.0", "future-fstrings", "pygments", "chipwhisperer", "scipy", "semver", ], package_data={"": ["*.pickle"]}, classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: Jupyter", "License :: OSI Approved :: Apache Software License", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", "Topic :: Security :: Cryptography", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], packages=find_packages(), )
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Setup script.""" from setuptools import find_packages from setuptools import setup from time import time long_description = open("README.md").read() version = "2.0.1r%s" % int(time()) setup( name="scaaml", version=version, description="Side Channel Attack Assisted with Machine Learning", long_description=long_description, author="Elie Bursztein", author_email="[email protected]", url="https://github.com/google/scaaml", license="Apache License 2.0", install_requires=[ "colorama", "termcolor", "tqdm", "pandas", "numpy", "tabulate", "matplotlib", "Pillow", "tensorflow>=2.2.0", "future-fstrings", "pygments", "chipwhisperer", "scipy", "semver", ], package_data={"": ["*.pickle"]}, classifiers=[ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: Jupyter", "License :: OSI Approved :: Apache Software License", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", "Topic :: Security :: Cryptography", "Topic :: Scientific/Engineering :: Artificial Intelligence", ], packages=find_packages(), )
apache-2.0
Python
a99209821a285c78dc487cac34a3e5b9f449d65b
Update version to 1.0.3
jpdoria/aws_eis
setup.py
setup.py
import os from setuptools import setup, find_packages with open('requirements.txt') as file_requirements: requirements = file_requirements.read().splitlines() setup( name='aws_eis', version='1.0.3', author='John Paul P. Doria', author_email='[email protected]', description=('Register snapshot directory and take and restore ' + 'snapshots of Elasticsearch Service indices.'), license='MIT', keywords='aws elasticsearch index snapshot', url='https://github.com/jpdoria/aws_eis', packages=find_packages(), entry_points={ 'console_scripts': [ 'aws_eis = aws_eis.aws_eis:main' ] }, install_requires=requirements, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 3.6', 'Topic :: System :: Systems Administration', 'Topic :: Utilities' ], )
import os from setuptools import setup, find_packages with open('requirements.txt') as file_requirements: requirements = file_requirements.read().splitlines() setup( name='aws_eis', version='1.0.2', author='John Paul P. Doria', author_email='[email protected]', description=('Register snapshot directory and take and restore ' + 'snapshots of Elasticsearch Service indices.'), license='MIT', keywords='aws elasticsearch index snapshot', url='https://github.com/jpdoria/aws_eis', packages=find_packages(), entry_points={ 'console_scripts': [ 'aws_eis = aws_eis.aws_eis:main' ] }, install_requires=requirements, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 3.6', 'Topic :: System :: Systems Administration', 'Topic :: Utilities' ], )
mit
Python
5f48ee965e17aa1cebf4c6dfb14c08dd934dc0f8
Bump requests library to 2.7.0
jlebzelter/vero-python
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup packages = [ 'vero' ] requires = ['requests==2.7.0'] tests_require = ['mock==1.0.1'] setup( name='vero', description='Python wrapper for Vero API', long_description=open('README.rst').read(), version='1.1.3', author=open('AUTHORS.rst').read(), author_email='[email protected]', url='https://github.com/waveaccounting/vero-python', packages=packages, package_data={'': ['LICENSE.rst', 'AUTHORS.rst', 'README.rst']}, include_package_data=True, zip_safe=True, install_requires=requires, tests_require=tests_require, test_suite='vero.tests.client_test', license=open('LICENSE.rst').read(), classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', ), )
try: from setuptools import setup except ImportError: from distutils.core import setup packages = [ 'vero' ] requires = ['requests==1.2.3'] tests_require = ['mock==1.0.1'] setup( name='vero', description='Python wrapper for Vero API', long_description=open('README.rst').read(), version='1.1.3', author=open('AUTHORS.rst').read(), author_email='[email protected]', url='https://github.com/waveaccounting/vero-python', packages=packages, package_data={'': ['LICENSE.rst', 'AUTHORS.rst', 'README.rst']}, include_package_data=True, zip_safe=True, install_requires=requires, tests_require=tests_require, test_suite='vero.tests.client_test', license=open('LICENSE.rst').read(), classifiers=( 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', ), )
bsd-3-clause
Python
6dc41940388a3bb9ae000c0760514f3a1455e9f1
Use setuptools find_packages
cowlicks/odo,cowlicks/odo,alexmojaki/odo,quantopian/odo,alexmojaki/odo,Dannnno/odo,ContinuumIO/odo,Dannnno/odo,quantopian/odo,cpcloud/odo,blaze/odo,ContinuumIO/odo,blaze/odo,cpcloud/odo
setup.py
setup.py
#!/usr/bin/env python import os from fnmatch import fnmatch from setuptools import setup, find_packages import versioneer def find_data_files(where, exts): exts = tuple(exts) for root, dirs, files in os.walk(where): for f in files: if any(fnmatch(f, pat) for pat in exts): yield os.path.join(root, f) exts = ('*.h5', '*.csv', '*.xls', '*.xlsx', '*.db', '*.json', '*.gz', '*.hdf5', '*.sas7bdat') package_data = [x.replace('odo' + os.sep, '') for x in find_data_files('odo', exts)] def read(filename): with open(filename, 'r') as f: return f.read() setup(name='odo', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Data migration utilities', url='https://github.com/blaze/odo', author='Blaze development team', author_email='[email protected]', license='BSD', keywords='odo data conversion hdf5 sql blaze', packages=find_packages(), install_requires=read('requirements.txt').strip().split('\n'), long_description=read('README.rst'), package_data={'odo': package_data}, zip_safe=False, scripts=[os.path.join('bin', 'odo')])
#!/usr/bin/env python import os from fnmatch import fnmatch from setuptools import setup import versioneer def find_packages(path): for root, _, _ in filter(lambda x: '__init__.py' in x[2], os.walk(path)): yield os.path.relpath(root).replace(os.sep, '.') def find_data_files(where, exts): exts = tuple(exts) for root, dirs, files in os.walk(where): for f in files: if any(fnmatch(f, pat) for pat in exts): yield os.path.join(root, f) exts = ('*.h5', '*.csv', '*.xls', '*.xlsx', '*.db', '*.json', '*.gz', '*.hdf5', '*.sas7bdat') package_data = [x.replace('odo' + os.sep, '') for x in find_data_files('odo', exts)] def read(filename): with open(filename, 'r') as f: return f.read() packages = list(find_packages(os.path.abspath('odo'))) setup(name='odo', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description='Data migration utilities', url='https://github.com/blaze/odo', author='Blaze development team', author_email='[email protected]', license='BSD', keywords='odo data conversion hdf5 sql blaze', packages=packages, install_requires=read('requirements.txt').strip().split('\n'), long_description=read('README.rst'), package_data={'odo': package_data}, zip_safe=False, scripts=[os.path.join('bin', 'odo')])
bsd-3-clause
Python
d04bc63fe078e7147112690a997ec35c69b2ad95
Fix the topic.
valtri/zoosync,valtri/zoosync
setup.py
setup.py
# -*- coding: utf-8 # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='zoosync', version='0.0.9', description='Zookeeper service discovery', long_description=long_description, url='https://github.com/valtri/zoosync', author='František Dvořák', author_email='[email protected]', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Information Technology', 'Topic :: System :: Distributed Computing', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], keywords='service-discovery zookeeper cloud', packages=find_packages(exclude=['contrib', 'docs', 'tests*']), install_requires=['kazoo'], entry_points={ 'console_scripts': [ 'zoosync=zoosync.zoosync:main', ], }, )
# -*- coding: utf-8 # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='zoosync', version='0.0.9', description='Zookeeper service discovery', long_description=long_description, url='https://github.com/valtri/zoosync', author='František Dvořák', author_email='[email protected]', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Information Technology', 'Topic :: Software Development :: Topic :: System :: Distributed Computing', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', ], keywords='service-discovery zookeeper cloud', packages=find_packages(exclude=['contrib', 'docs', 'tests*']), install_requires=['kazoo'], entry_points={ 'console_scripts': [ 'zoosync=zoosync.zoosync:main', ], }, )
mit
Python
24154ca41a5a7d596b8dc9f05c016c272ee130be
Bump version number.
iScienceLuvr/PPP-CAS,ProjetPP/PPP-CAS,iScienceLuvr/PPP-CAS,ProjetPP/PPP-CAS
setup.py
setup.py
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='ppp_cas', version='0.4', description='CAS plugin for PPP', url='https://github.com/ProjetPP', author='Projet Pensées Profondes', author_email='[email protected]', license='MIT', classifiers=[ 'Environment :: No Input/Output (Daemon)', 'Development Status :: 1 - Planning', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', 'Topic :: Software Development :: Libraries', ], install_requires=[ 'ppp_datamodel>=0.5.12', 'ppp_libmodule>=0.7,<0.8', 'ply', ], packages=[ 'ppp_cas', ], )
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='ppp_cas', version='0.3.2', description='CAS plugin for PPP', url='https://github.com/ProjetPP', author='Projet Pensées Profondes', author_email='[email protected]', license='MIT', classifiers=[ 'Environment :: No Input/Output (Daemon)', 'Development Status :: 1 - Planning', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application', 'Topic :: Software Development :: Libraries', ], install_requires=[ 'ppp_datamodel>=0.5.12', 'ppp_libmodule>=0.7,<0.8', 'ply', ], packages=[ 'ppp_cas', ], )
mit
Python
46aebb8479007f03b3a468920ecba2f57ad05241
add URL
vukasin/tornado-shell
setup.py
setup.py
from setuptools import setup setup( name='tornado_shell', version='0.0.1', packages=['tornadoshell'], url='https://github.com/vukasin/tornado-shell', license='LICENSE.txt', author='Vukasin Toroman', author_email='[email protected]', description='', requires=['tornado'] )
from setuptools import setup setup( name='tornado_shell', version='0.0.1', packages=['tornadoshell'], url='', license='LICENSE.txt', author='Vukasin Toroman', author_email='[email protected]', description='', requires=['tornado'] )
bsd-3-clause
Python
15437c33fd25a1f10c3203037be3bfef17716fbb
Add trove classifiers for Python versions
korfuri/django-prometheus,obytes/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus
setup.py
setup.py
import os from setuptools import setup, find_packages LONG_DESCRIPTION = """Django-Prometheus This library contains code to expose some monitoring metrics relevant to Django internals so they can be monitored by Prometheus.io. See https://github.com/korfuri/django-prometheus for usage instructions. """ setup( name="django-prometheus", version="1.0.8", author="Uriel Corfa", author_email="[email protected]", description=( "Django middlewares to monitor your application with Prometheus.io."), license="Apache", keywords="django monitoring prometheus", url="http://github.com/korfuri/django-prometheus", packages=find_packages(), test_suite="django_prometheus.tests", long_description=LONG_DESCRIPTION, install_requires=[ "prometheus_client>=0.0.13", ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Framework :: Django", "Topic :: System :: Monitoring", "License :: OSI Approved :: Apache Software License", ], )
import os from setuptools import setup, find_packages LONG_DESCRIPTION = """Django-Prometheus This library contains code to expose some monitoring metrics relevant to Django internals so they can be monitored by Prometheus.io. See https://github.com/korfuri/django-prometheus for usage instructions. """ setup( name="django-prometheus", version="1.0.8", author="Uriel Corfa", author_email="[email protected]", description=( "Django middlewares to monitor your application with Prometheus.io."), license="Apache", keywords="django monitoring prometheus", url="http://github.com/korfuri/django-prometheus", packages=find_packages(), test_suite="django_prometheus.tests", long_description=LONG_DESCRIPTION, install_requires=[ "prometheus_client>=0.0.13", ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Framework :: Django", "Topic :: System :: Monitoring", "License :: OSI Approved :: Apache Software License", ], )
apache-2.0
Python
94fbc9de5e540e9fc14ac0bd777b259df7e8f5d6
Bump requirements
robotpy/robotpy-wpilib-utilities,Twinters007/robotpy-wpilib-utilities,robotpy/robotpy-wpilib-utilities,Twinters007/robotpy-wpilib-utilities
setup.py
setup.py
#!/usr/bin/env python3 import os from os.path import dirname, exists, join import sys, subprocess from setuptools import setup, find_packages setup_dir = dirname(__file__) git_dir = join(setup_dir, '.git') base_package = 'robotpy_ext' version_file = join(setup_dir, base_package, 'version.py') # Automatically generate a version.py based on the git version if exists(git_dir): p = subprocess.Popen(["git", "describe", "--tags", "--long", "--dirty=-dirty"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() # Make sure the git version has at least one tag if err: print("Error: You need to create a tag for this repo to use the builder") sys.exit(1) # Convert git version to PEP440 compliant version # - Older versions of pip choke on local identifiers, so we can't include the git commit v, commits, local = out.decode('utf-8').rstrip().split('-', 2) if commits != '0' or '-dirty' in local: v = '%s.post0.dev%s' % (v, commits) # Create the version.py file with open(version_file, 'w') as fp: fp.write("# Autogenerated by setup.py\n__version__ = '{0}'".format(v)) if exists(version_file): with open(join(setup_dir, base_package, 'version.py'), 'r') as fp: exec(fp.read(), globals()) else: __version__ = 'master' with open(join(setup_dir, 'README.rst'), 'r') as readme_file: long_description = readme_file.read() install_requires = ['wpilib>=2018.0.0,<2019.0.0', 'pynetworktables>=2018.0.0'] setup( name='robotpy-wpilib-utilities', version=__version__, description='Useful utility functions/objects for RobotPy', long_description=long_description, author='RobotPy Development Team', author_email='[email protected]', url='https://github.com/robotpy/robotpy-wpilib-utilities', keywords='frc first robotics', install_requires=install_requires if not os.environ.get('ROBOTPY_NO_DEPS') else None, packages=find_packages(), license='BSD', classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Education", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", ], )
#!/usr/bin/env python3 import os from os.path import dirname, exists, join import sys, subprocess from setuptools import setup, find_packages setup_dir = dirname(__file__) git_dir = join(setup_dir, '.git') base_package = 'robotpy_ext' version_file = join(setup_dir, base_package, 'version.py') # Automatically generate a version.py based on the git version if exists(git_dir): p = subprocess.Popen(["git", "describe", "--tags", "--long", "--dirty=-dirty"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() # Make sure the git version has at least one tag if err: print("Error: You need to create a tag for this repo to use the builder") sys.exit(1) # Convert git version to PEP440 compliant version # - Older versions of pip choke on local identifiers, so we can't include the git commit v, commits, local = out.decode('utf-8').rstrip().split('-', 2) if commits != '0' or '-dirty' in local: v = '%s.post0.dev%s' % (v, commits) # Create the version.py file with open(version_file, 'w') as fp: fp.write("# Autogenerated by setup.py\n__version__ = '{0}'".format(v)) if exists(version_file): with open(join(setup_dir, base_package, 'version.py'), 'r') as fp: exec(fp.read(), globals()) else: __version__ = 'master' with open(join(setup_dir, 'README.rst'), 'r') as readme_file: long_description = readme_file.read() install_requires = ['wpilib>=2017.1.0,<2018.0.0', 'pynetworktables>=2017.0.1'] setup( name='robotpy-wpilib-utilities', version=__version__, description='Useful utility functions/objects for RobotPy', long_description=long_description, author='RobotPy Development Team', author_email='[email protected]', url='https://github.com/robotpy/robotpy-wpilib-utilities', keywords='frc first robotics', install_requires=install_requires if not os.environ.get('ROBOTPY_NO_DEPS') else None, packages=find_packages(), license='BSD', classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Education", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", ], )
bsd-3-clause
Python
0f97e1427cf86cab4d53f613eb440c1cf4426e6d
Change download url for release 0.3.6
hspandher/django-test-addons
setup.py
setup.py
from distutils.core import setup setup( name = 'django-test-addons', packages = ['test_addons'], version = '0.3.6', description = 'Library to provide support for testing multiple database system like Mongo, Redis, Neo4j along with django.', author = 'Hakampreet Singh Pandher', author_email = '[email protected]', url = 'https://github.com/hspandher/django-test-utils', download_url = 'https://github.com/hspandher/django-test-utils/tarball/0.3.6', keywords = ['testing', 'django', 'mongo', 'redis', 'neo4j', 'TDD', 'python', 'memcache', 'django rest framework'], license = 'MIT', install_requires = [ 'django>1.6' ], extras_require = { 'mongo_testing': ['mongoengine>=0.8.7'], 'redis_testing': ['django-redis>=3.8.2'], 'neo4j_testing': ['py2neo>=2.0.6'], 'rest_framework_testing': ['djangorestframework>=3.0.5'], }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Testing', 'Topic :: Database', ], )
from distutils.core import setup setup( name = 'django-test-addons', packages = ['test_addons'], version = '0.3.5', description = 'Library to provide support for testing multiple database system like Mongo, Redis, Neo4j along with django.', author = 'Hakampreet Singh Pandher', author_email = '[email protected]', url = 'https://github.com/hspandher/django-test-utils', download_url = 'https://github.com/hspandher/django-test-utils/tarball/0.1', keywords = ['testing', 'django', 'mongo', 'redis', 'neo4j', 'TDD', 'python', 'memcache', 'django rest framework'], license = 'MIT', install_requires = [ 'django>1.6' ], extras_require = { 'mongo_testing': ['mongoengine>=0.8.7'], 'redis_testing': ['django-redis>=3.8.2'], 'neo4j_testing': ['py2neo>=2.0.6'], 'rest_framework_testing': ['djangorestframework>=3.0.5'], }, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Testing', 'Topic :: Database', ], )
mit
Python