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 |
---|---|---|---|---|---|---|---|---|
482f9ffaf1c2998fafc924a91b07656d3c054c91
|
fix string
|
wgerlach/pipeline,teharrison/pipeline,teharrison/pipeline,wgerlach/pipeline,MG-RAST/pipeline,teharrison/pipeline,MG-RAST/pipeline,wgerlach/pipeline,MG-RAST/pipeline
|
bin/extract_darkmatter.py
|
bin/extract_darkmatter.py
|
#!/usr/bin/env python
import argparse
import leveldb
import os
import shutil
import sys
from Bio import SeqIO
def main(args):
parser = argparse.ArgumentParser(description="Script to extract darkmatter - predicted proteins with no similarities")
parser.add_argument("-i", "--input", dest="input", help="Name of input genecall fasta file.")
parser.add_argument("-o", "--output", dest="output", help="Name of output darkmatter fasta file.")
parser.add_argument("-s", "--sims", dest="sims", help="Name of similarity file")
parser.add_argument("-d", "--db", dest="db", default=".", help="Directory to store LevelDB, default CWD")
parser.add_argument("-v", "--verbose", dest="verbose", action="store_true", help="Print informational messages")
args = parser.parse_args()
if ('sims' not in args) or (os.stat(args.sims).st_size == 0):
print "Similarity file was omitted or is empty, copying %s to %s ... " % (args.input, args.output)
shutil.copyfile(args.input, args.output)
return 0
db = leveldb.LevelDB(args.db)
shdl = open(args.sims, 'rU')
if args.verbose:
print "Reading file %s ... " % args.sims
for line in shdl:
parts = line.strip().split('\t')
db.Put(parts[0], "X")
shdl.close()
if args.verbose:
print "Done"
print "Reading file %s ... " % args.input
ihdl = open(args.input, 'rU')
ohdl = open(args.output, 'w')
g_num = 0
d_num = 0
for rec in SeqIO.parse(ihdl, 'fasta'):
g_num += 1
try:
val = db.Get(rec.id)
except KeyError:
d_num += 1
ohdl.write("%s\n%s\n"%(rec.id, str(rec.seq).upper()))
ihdl.close()
ohdl.close()
if args.verbose:
print "Done: %d darkmatter genes found out of %d total" %(d_num, g_num)
return 0
if __name__ == "__main__":
sys.exit( main(sys.argv) )
|
#!/usr/bin/env python
import argparse
import leveldb
import os
import shutil
import sys
from Bio import SeqIO
def main(args):
parser = argparse.ArgumentParser(description="Script to extract darkmatter - predicted proteins with no similarities")
parser.add_argument("-i", "--input", dest="input", help="Name of input genecall fasta file.")
parser.add_argument("-o", "--output", dest="output", help="Name of output darkmatter fasta file.")
parser.add_argument("-s", "--sims", dest="sims", help="Name of similarity file")
parser.add_argument("-d", "--db", dest="db", default=".", help="Directory to store LevelDB, default CWD")
parser.add_argument("-v", "--verbose", dest="verbose", action="store_true", help="Print informational messages")
args = parser.parse_args()
if ('sims' not in args) or (os.stat(args.sims).st_size == 0):
print "Similarity file was omitted or is empty, copying %s to %s ... " % (args.input, args.output)
shutil.copyfile(args.input, args.output)
return 0
db = leveldb.LevelDB(args.db)
shdl = open(args.sims, 'rU')
if args.verbose:
print "Reading file %s ... " % args.sims
for line in shdl:
parts = line.strip().split('\t')
db.Put(parts[0], 1)
shdl.close()
if args.verbose:
print "Done"
print "Reading file %s ... " % args.input
ihdl = open(args.input, 'rU')
ohdl = open(args.output, 'w')
g_num = 0
d_num = 0
for rec in SeqIO.parse(ihdl, 'fasta'):
g_num += 1
try:
val = db.Get(rec.id)
except KeyError:
d_num += 1
ohdl.write("%s\n%s\n"%(rec.id, str(rec.seq).upper()))
ihdl.close()
ohdl.close()
if args.verbose:
print "Done: %d darkmatter genes found out of %d total" %(d_num, g_num)
return 0
if __name__ == "__main__":
sys.exit( main(sys.argv) )
|
bsd-2-clause
|
Python
|
19d5d98350c8ef6f8e3d9153a899a6ce466e5e21
|
Rename `UserOwnedModelManager` to just `UserOwnedManager` for consistency with Django naming convention. Replace `_for_user` methods with methods that override the base manager methods - this should help enforce a user context for models, and implement initial set of method overrides in this manner.
|
discolabs/django-owned-models
|
owned_models/models.py
|
owned_models/models.py
|
from django.conf import settings
from django.db import models
class UserOwnedManager(models.Manager):
"""
Wraps standard Manager query methods and adds a required `user` argument, to enforce all calls
made through this manager to be made within a user context.
"""
def all(self, user):
return super(UserOwnedManager, self).filter(user = user)
def filter(self, user, **kwargs):
return super(UserOwnedManager, self).filter(user = user, **kwargs)
def exclude(self, user, **kwargs):
return self.filter(user).exclude(**kwargs)
def get(self, user, *args, **kwargs):
return super(UserOwnedManager, self).get(user = user, *args, **kwargs)
def create(self, user, **kwargs):
return super(UserOwnedManager, self).create(user = user, **kwargs)
def get_or_create(self, user, defaults = None, **kwargs):
if defaults is None:
defaults = {}
defaults['user'] = user
return super(UserOwnedManager, self).get_or_create(user = user, defaults = defaults, **kwargs)
def update_or_create(self, user, defaults = None, **kwargs):
if defaults is None:
defaults = {}
defaults['user'] = user
return super(UserOwnedManager, self).update_or_create(user = user, defaults = defaults, **kwargs)
class UserOwnedModel(models.Model):
"""
Base class for models that are owned by a user.
"""
user = models.ForeignKey(settings.AUTH_USER_MODEL, editable = False)
objects = UserOwnedManager()
all_objects = models.Manager()
class Meta:
abstract = True
|
from django.conf import settings
from django.db import models
class UserOwnedModelManager(models.Manager):
def filter_for_user(self, user, *args, **kwargs):
return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs)
def get_for_user(self, user, *args, **kwargs):
if 'user' in kwargs:
kwargs.pop('user')
return super(UserOwnedModelManager, self).get_queryset().get(user = user, *args, **kwargs)
def get_or_create_for_user(self, user, **kwargs):
return super(UserOwnedModelManager, self).get_or_create(user = user, **kwargs)
class UserOwnedModel(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL, editable = False)
objects = UserOwnedModelManager()
class Meta:
abstract = True
|
mit
|
Python
|
aa6b1daedbd911c23857033bcc601bdae37627f0
|
Fix the Stream wrapping class. It had moved from elsewhere, but wasn't corrected for its new home in util.py
|
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
|
subversion/bindings/swig/python/svn/util.py
|
subversion/bindings/swig/python/svn/util.py
|
#
# svn.util: public Python interface for miscellaneous bindings
#
# Subversion is a tool for revision control.
# See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copyright (c) 2000-2001 CollabNet. 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://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
######################################################################
#
# to retain backwards Python compat, we don't use 'import foo as bar'
import string
_string = string
del string
# bring all the symbols up into this module
### in the future, we may want to limit this, rename things, etc
from _util import *
def run_app(func, *args, **kw):
'''Run a function as an "APR application".
APR is initialized, and an application pool is created. Cleanup is
performed as the function exits (normally or via an exception.
'''
apr_initialize()
try:
pool = svn_pool_create(None)
try:
return apply(func, (pool,) + args, kw)
finally:
svn_pool_destroy(pool)
finally:
apr_terminate()
# some minor patchups
svn_pool_destroy = apr_pool_destroy
class Stream:
def __init__(self, stream):
self._stream = stream
def read(self, amt=None):
if amt is None:
# read the rest of the stream
chunks = [ ]
while 1:
data = svn_stream_read(self._stream, SVN_STREAM_CHUNK_SIZE)
if not data:
break
chunks.append(data)
return _string.join(chunks, '')
# read the amount specified
return svn_stream_read(self._stream, int(amt))
def write(self, buf):
### what to do with the amount written? (the result value)
svn_stream_write(self._stream, buf)
|
#
# svn.util: public Python interface for miscellaneous bindings
#
# Subversion is a tool for revision control.
# See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copyright (c) 2000-2001 CollabNet. 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://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
#
######################################################################
#
# bring all the symbols up into this module
### in the future, we may want to limit this, rename things, etc
from _util import *
def run_app(func, *args, **kw):
'''Run a function as an "APR application".
APR is initialized, and an application pool is created. Cleanup is
performed as the function exits (normally or via an exception.
'''
apr_initialize()
try:
pool = svn_pool_create(None)
try:
return apply(func, (pool,) + args, kw)
finally:
svn_pool_destroy(pool)
finally:
apr_terminate()
# some minor patchups
svn_pool_destroy = apr_pool_destroy
class Stream:
def __init__(self, stream):
self._stream = stream
def read(self, amt=None):
if amt is None:
# read the rest of the stream
chunks = [ ]
while 1:
data = util.svn_stream_read(self._stream, util.SVN_STREAM_CHUNK_SIZE)
if not data:
break
chunks.append(data)
return string.join(chunks, '')
# read the amount specified
return util.svn_stream_read(self._stream, int(amt))
def write(self, buf):
### what to do with the amount written? (the result value)
util.svn_stream_write(self._stream, buf)
|
apache-2.0
|
Python
|
be10731cab38445a3d1c3a6df3703fba3fecc93f
|
Fix accessing argv
|
Tatsh/xirvik-tools
|
examples/move-by-label.py
|
examples/move-by-label.py
|
#!/usr/bin/env python
"""
Example script to move torrents based on their label set in ruTorrent.
./move-by-label.py USERNAME HOSTNAME [PATH]
"""
from __future__ import print_function
from time import sleep
import sys
from xirvik.client import ruTorrentClient
USERNAME = sys.argv[1]
HOST = sys.argv[2]
try:
PATH = sys.argv[3]
except IndexError:
PATH = ''
PREFIX = '/torrents/{}/{}'.format(USERNAME, PATH)
if __name__ == '__main__':
client = ruTorrentClient(HOST)
count = 0
for hash, info in client.list_torrents_dict().iteritems():
name = info['name'].encode('utf-8')
label = info['custom1']
move_to = '{}/{}'.format(PREFIX, label.lower())
# Ignore torrents that are hash checking, not finished hash checking,
# not complete or that are already moved
if (info['is_hash_checking'] or
not info['is_hash_checked'] or
info['left_bytes'] > 0 or
info['base_path'].startswith(move_to)):
continue
print('Moving {} to {}/'.format(name, move_to.encode('utf-8'), name))
client.move_torrent(hash, move_to)
# Sometimes the web server cannot handle so many requests, so only
# send 10 at a time
count += 1
if count and (count % 10) == 0:
sleep(10)
|
#!/usr/bin/env python
"""
Example script to move torrents based on their label set in ruTorrent.
./move-by-label.py USERNAME HOSTNAME [PATH]
"""
from __future__ import print_function
from time import sleep
import sys
from xirvik.client import ruTorrentClient
USERNAME = sys.argv[1]
HOST = sys.arg[2]
try:
PATH = sys.argv[3]
except IndexError:
PATH = ''
PREFIX = '/torrents/{}/{}'.format(USERNAME, PATH)
if __name__ == '__main__':
client = ruTorrentClient(HOST)
count = 0
for hash, info in client.list_torrents_dict().iteritems():
name = info['name'].encode('utf-8')
label = info['custom1']
move_to = '{}/{}'.format(PREFIX, label.lower())
# Ignore torrents that are hash checking, not finished hash checking,
# not complete or that are already moved
if (info['is_hash_checking'] or
not info['is_hash_checked'] or
info['left_bytes'] > 0 or
info['base_path'].startswith(move_to)):
continue
print('Moving {} to {}/'.format(name, move_to.encode('utf-8'), name))
client.move_torrent(hash, move_to)
# Sometimes the web server cannot handle so many requests, so only
# send 10 at a time
count += 1
if count and (count % 10) == 0:
sleep(10)
|
mit
|
Python
|
6ece7062e539e2196ff04c49f07913c884907878
|
rearrange lines to make colors to player map clear
|
chillpop/RELAX-HARDER,chillpop/RELAX-HARDER
|
run-relax.py
|
run-relax.py
|
#!/usr/bin/env python
import sys
import time
from Mindwave.mindwave import BluetoothHeadset, FakeHeadset
# Note: on OS X, BluetoothHeadset will not work
from parameters import SharedParameters
from threads import HeadsetThread
from gameplay import GameObject
from game_effects import generate_player_renderer
from controller import AnimationController
from renderer import Renderer
from playlist import Playlist
PLAYER_ONE_ADDRESS = '74:E5:43:BE:39:71'
PLAYER_TWO_ADDRESS = '74:E5:43:B1:96:E0'
if __name__ == '__main__':
num_args = len(sys.argv)
test = num_args > 1 and sys.argv[1] == 'test'
ip_address = None
if test and num_args > 2:
ip_address = sys.argv[2]
elif num_args > 1:
ip_address = sys.argv[1]
# ip_address = '192.168.7.2:7890'
shared_params = SharedParameters()
if not test:
shared_params.targetFrameRate = 100.0
shared_params.use_keyboard_input = False
shared_params.debug = False
player1 = FakeHeadset(random_data = True) if test else BluetoothHeadset(PLAYER_ONE_ADDRESS)
yellowish = [1.0, 0.84, 0.28]
greenish = [0.2, 0.4, 0.]
renderer_high = generate_player_renderer(shared_params, greenish, yellowish)
player2 = FakeHeadset(random_data = True) if test else BluetoothHeadset(PLAYER_TWO_ADDRESS)
purple = [0.2, 0., 0.3]
pink = [0.7, 0.5, 0.4]
renderer_low = generate_player_renderer(shared_params, purple, pink, inverse=True)
game = GameObject(shared_params, renderer_low, renderer_high)
game.start()
controller = AnimationController(game_object=game,
renderer_low=renderer_low, renderer_high=renderer_high, params=shared_params, server=ip_address)
threads = [
HeadsetThread(shared_params, player1),
HeadsetThread(shared_params, player2, use_eeg2=True),
]
for thread in threads:
thread.start()
# start the lights
time.sleep(0.05)
controller.drawingLoop()
|
#!/usr/bin/env python
import sys
import time
from Mindwave.mindwave import BluetoothHeadset, FakeHeadset
# Note: on OS X, BluetoothHeadset will not work
from parameters import SharedParameters
from threads import HeadsetThread
from gameplay import GameObject
from game_effects import generate_player_renderer
from controller import AnimationController
from renderer import Renderer
from playlist import Playlist
PLAYER_ONE_ADDRESS = '74:E5:43:BE:39:71'
PLAYER_TWO_ADDRESS = '74:E5:43:B1:96:E0'
if __name__ == '__main__':
num_args = len(sys.argv)
test = num_args > 1 and sys.argv[1] == 'test'
ip_address = None
if test and num_args > 2:
ip_address = sys.argv[2]
elif num_args > 1:
ip_address = sys.argv[1]
# ip_address = '192.168.7.2:7890'
shared_params = SharedParameters()
if not test:
shared_params.targetFrameRate = 100.0
shared_params.use_keyboard_input = False
shared_params.debug = False
player1 = FakeHeadset(random_data = True) if test else BluetoothHeadset(PLAYER_ONE_ADDRESS)
player2 = FakeHeadset(random_data = True) if test else BluetoothHeadset(PLAYER_TWO_ADDRESS)
yellowish = [1.0, 0.84, 0.28]
greenish = [0.2, 0.4, 0.]
purple = [0.2, 0., 0.3]
pink = [0.7, 0.5, 0.4]
renderer_low = generate_player_renderer(shared_params, purple, pink, inverse=True)
renderer_high = generate_player_renderer(shared_params, greenish, yellowish)
game = GameObject(shared_params, renderer_low, renderer_high)
game.start()
controller = AnimationController(game_object=game,
renderer_low=renderer_low, renderer_high=renderer_high, params=shared_params, server=ip_address)
threads = [
HeadsetThread(shared_params, player1),
HeadsetThread(shared_params, player2, use_eeg2=True),
]
for thread in threads:
thread.start()
# start the lights
time.sleep(0.05)
controller.drawingLoop()
|
mit
|
Python
|
0f0fc4037997f6ae4eef019547e3c8d8cf05db9c
|
modify test data
|
nakagami/pydrda
|
drda/tests/test_derby.py
|
drda/tests/test_derby.py
|
##############################################################################
# The MIT License (MIT)
#
# Copyright (c) 2016 Hajime Nakagami
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
##############################################################################
import unittest
import io
import decimal
import datetime
import drda
class TestDerby(unittest.TestCase):
host = 'localhost'
database = 'testdb;create=true'
port = 1527
def setUp(self):
self.connection = drda.connect(
host=self.host,
database=self.database,
port=self.port,
)
def tearDown(self):
self.connection.close()
def test_derby(self):
cur = self.connection.cursor()
cur.execute("""
CREATE TABLE test (
s VARCHAR(20),
i int,
d1 decimal(2, 1),
d2 decimal(18, 2)
)
""")
cur.execute("""
INSERT INTO test (s, i, d1, d2) VALUES
('abcdefghijklmnopq', 1, 1.1, 123456789.12),
('B', 2, 1.2, 2),
('C', 3, null, null)
""")
cur.execute("SELECT * FROM test")
|
##############################################################################
# The MIT License (MIT)
#
# Copyright (c) 2016 Hajime Nakagami
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
##############################################################################
import unittest
import io
import decimal
import datetime
import drda
class TestDerby(unittest.TestCase):
host = 'localhost'
database = 'testdb;create=true'
port = 1527
def setUp(self):
self.connection = drda.connect(
host=self.host,
database=self.database,
port=self.port,
)
def tearDown(self):
self.connection.close()
def test_derby(self):
cur = self.connection.cursor()
cur.execute("create table test (s varchar(20), i int, d decimal(18, 2))")
cur.execute("insert into test (s, i, d) values ('abcdefghijklmnopq', 1, 1.1)")
cur.execute("insert into test (s, i, d) values ('B', 2, 1.2)")
cur.execute("insert into test (s, i) values ('C', 3)")
cur.execute("select * from test")
|
mit
|
Python
|
2ab1c23ca4be991c174514998496ea4f7c8f6c3a
|
Make indentation consistent with other code
|
logandk/serverless-wsgi,logandk/serverless-wsgi
|
serve.py
|
serve.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module serves a WSGI application using werkzeug.
Author: Logan Raarup <[email protected]>
"""
import importlib
import os
import sys
try:
from werkzeug import serving
except ImportError: # pragma: no cover
sys.exit('Unable to import werkzeug (run: pip install werkzeug)')
def serve(cwd, app, port, host='localhost'):
sys.path.insert(0, cwd)
wsgi_fqn = app.rsplit('.', 1)
wsgi_fqn_parts = wsgi_fqn[0].rsplit('/', 1)
if len(wsgi_fqn_parts) == 2:
sys.path.insert(0, os.path.join(cwd, wsgi_fqn_parts[0]))
wsgi_module = importlib.import_module(wsgi_fqn_parts[-1])
wsgi_app = getattr(wsgi_module, wsgi_fqn[1])
# Attempt to force Flask into debug mode
try:
wsgi_app.debug = True
except: # noqa: E722
pass
os.environ['IS_OFFLINE'] = 'True'
serving.run_simple(
host,
int(port),
wsgi_app,
use_debugger=True,
use_reloader=True,
use_evalex=True)
if __name__ == '__main__': # pragma: no cover
if len(sys.argv) != 5:
sys.exit('Usage: {} CWD APP PORT HOST'.format(
os.path.basename(sys.argv[0])))
serve(*sys.argv[1:])
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module serves a WSGI application using werkzeug.
Author: Logan Raarup <[email protected]>
"""
import importlib
import os
import sys
try:
from werkzeug import serving
except ImportError: # pragma: no cover
sys.exit('Unable to import werkzeug (run: pip install werkzeug)')
def serve(cwd, app, port, host='localhost'):
sys.path.insert(0, cwd)
wsgi_fqn = app.rsplit('.', 1)
wsgi_fqn_parts = wsgi_fqn[0].rsplit('/', 1)
if len(wsgi_fqn_parts) == 2:
sys.path.insert(0, os.path.join(cwd, wsgi_fqn_parts[0]))
wsgi_module = importlib.import_module(wsgi_fqn_parts[-1])
wsgi_app = getattr(wsgi_module, wsgi_fqn[1])
# Attempt to force Flask into debug mode
try:
wsgi_app.debug = True
except: # noqa: E722
pass
os.environ['IS_OFFLINE'] = 'True'
serving.run_simple(
str(host),
int(port),
wsgi_app,
use_debugger=True,
use_reloader=True,
use_evalex=True
)
if __name__ == '__main__': # pragma: no cover
if len(sys.argv) != 5:
sys.exit('Usage: {} CWD APP PORT HOST'.format(
os.path.basename(sys.argv[0])))
serve(*sys.argv[1:])
|
mit
|
Python
|
cdedb1d6875a8ab5f42369b1801a1fc0ee205654
|
Add option to generate coverage report
|
necozay/tulip-control,necozay/tulip-control,tulip-control/tulip-control,necozay/tulip-control,tulip-control/tulip-control,tulip-control/tulip-control,tulip-control/tulip-control,necozay/tulip-control,necozay/tulip-control
|
run_tests.py
|
run_tests.py
|
#!/usr/bin/env python
"""
Driver script for testing nu-TuLiP. Try calling it with "-h" flag.
SCL; 5 Sep 2013.
"""
import sys
import os.path
import nose
if __name__ == "__main__":
if ("-h" in sys.argv) or ("--help" in sys.argv):
print """Usage: run_tests.py [--cover] [--fast] [OPTIONS...] [[-]TESTFILES...]
TESTFILES... is space-separated list of test file names, where the
suffix "_test.py" is added to each given name. E.g.,
run_tests.py automaton
causes the automaton_test.py file to be used and no others. If no
arguments are given, then default is to run all tests. To exclude
tests that are marked as slow, use the flag "--fast".
If TESTFILES... each have a prefix of "-", then all tests *except*
those listed will be run. OPTIONS... are passed on to nose.
"""
exit(1)
if len(sys.argv) == 1:
nose.main()
if "--fast" in sys.argv:
skip_slow = True
sys.argv.remove("--fast")
else:
skip_slow = False
if "--cover" in sys.argv:
measure_coverage = True
sys.argv.remove("--cover")
else:
measure_coverage = False
argv = [sys.argv[0]]
if skip_slow:
argv.append("--attr=!slow")
if measure_coverage:
argv.extend(["--with-coverage", "--cover-html", "--cover-package=tulip"])
testfiles = []
excludefiles = []
for basename in sys.argv[1:]: # Only add extant file names
try:
with open(os.path.join("tests", basename+"_test.py"), "r") as f:
testfiles.append(basename+"_test.py")
except IOError:
if basename[0] == "-":
try:
with open(os.path.join("tests", basename[1:]+"_test.py"), "r") as f:
excludefiles.append(basename[1:]+"_test.py")
except IOError:
argv.append(basename)
else:
argv.append(basename)
if len(testfiles) > 0 and len(excludefiles) > 0:
print "You can specify files to exclude or include, but not both."
print "Try calling it with \"-h\" flag."
exit(1)
if len(excludefiles) > 0:
argv.append("--exclude="+"|".join(excludefiles))
argv.extend(testfiles)
nose.main(argv=argv)
|
#!/usr/bin/env python
"""
Driver script for testing nu-TuLiP. Try calling it with "-h" flag.
SCL; 6 May 2013.
"""
import sys
import os.path
import nose
if __name__ == "__main__":
if ("-h" in sys.argv) or ("--help" in sys.argv):
print """Usage: run_tests.py [--fast] [OPTIONS...] [[-]TESTFILES...]
TESTFILES... is space-separated list of test file names, where the
suffix "_test.py" is added to each given name. E.g.,
run_tests.py automaton
causes the automaton_test.py file to be used and no others. If no
arguments are given, then default is to run all tests. To exclude
tests that are marked as slow, use the flag "--fast".
If TESTFILES... each have a prefix of "-", then all tests *except*
those listed will be run. OPTIONS... are passed on to nose.
"""
exit(1)
if len(sys.argv) == 1:
nose.main()
if "--fast" in sys.argv:
skip_slow = True
sys.argv.remove("--fast")
else:
skip_slow = False
argv = [sys.argv[0]]
if skip_slow:
argv.append("--attr=!slow")
testfiles = []
excludefiles = []
for basename in sys.argv[1:]: # Only add extant file names
try:
with open(os.path.join("tests", basename+"_test.py"), "r") as f:
testfiles.append(basename+"_test.py")
except IOError:
if basename[0] == "-":
try:
with open(os.path.join("tests", basename[1:]+"_test.py"), "r") as f:
excludefiles.append(basename[1:]+"_test.py")
except IOError:
argv.append(basename)
else:
argv.append(basename)
if len(testfiles) > 0 and len(excludefiles) > 0:
print "You can specify files to exclude or include, but not both."
print "Try calling it with \"-h\" flag."
exit(1)
if len(excludefiles) > 0:
argv.append("--exclude="+"|".join(excludefiles))
argv.extend(testfiles)
nose.main(argv=argv)
|
bsd-3-clause
|
Python
|
b74d9d3a780082b8cb326a553a9b4c84ca5368be
|
Add IS_OFFLINE environment variable to serve
|
logandk/serverless-wsgi,logandk/serverless-wsgi
|
serve.py
|
serve.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module serves a WSGI application using werkzeug.
Author: Logan Raarup <[email protected]>
"""
import importlib
import os
import sys
try:
from werkzeug import serving
except ImportError: # pragma: no cover
sys.exit('Unable to import werkzeug (run: pip install werkzeug)')
def serve(cwd, app, port):
sys.path.insert(0, cwd)
wsgi_fqn = app.rsplit('.', 1)
wsgi_fqn_parts = wsgi_fqn[0].rsplit('/', 1)
if len(wsgi_fqn_parts) == 2:
sys.path.insert(0, os.path.join(cwd, wsgi_fqn_parts[0]))
wsgi_module = importlib.import_module(wsgi_fqn_parts[-1])
wsgi_app = getattr(wsgi_module, wsgi_fqn[1])
# Attempt to force Flask into debug mode
try:
wsgi_app.debug = True
except:
pass
os.environ['IS_OFFLINE'] = 'True'
serving.run_simple(
'localhost', int(port), wsgi_app,
use_debugger=True, use_reloader=True, use_evalex=True)
if __name__ == '__main__': # pragma: no cover
if len(sys.argv) != 4:
sys.exit('Usage: {} CWD APP PORT'.format(
os.path.basename(sys.argv[0])))
serve(*sys.argv[1:])
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module serves a WSGI application using werkzeug.
Author: Logan Raarup <[email protected]>
"""
import importlib
import os
import sys
try:
from werkzeug import serving
except ImportError: # pragma: no cover
sys.exit('Unable to import werkzeug (run: pip install werkzeug)')
def serve(cwd, app, port):
sys.path.insert(0, cwd)
wsgi_fqn = app.rsplit('.', 1)
wsgi_fqn_parts = wsgi_fqn[0].rsplit('/', 1)
if len(wsgi_fqn_parts) == 2:
sys.path.insert(0, os.path.join(cwd, wsgi_fqn_parts[0]))
wsgi_module = importlib.import_module(wsgi_fqn_parts[-1])
wsgi_app = getattr(wsgi_module, wsgi_fqn[1])
# Attempt to force Flask into debug mode
try:
wsgi_app.debug = True
except:
pass
serving.run_simple(
'localhost', int(port), wsgi_app,
use_debugger=True, use_reloader=True, use_evalex=True)
if __name__ == '__main__': # pragma: no cover
if len(sys.argv) != 4:
sys.exit('Usage: {} CWD APP PORT'.format(
os.path.basename(sys.argv[0])))
serve(*sys.argv[1:])
|
mit
|
Python
|
224aa339ee7f1720ebb3616aa62ba06975c1a11d
|
handle .blend model sources
|
illwieckz/grtoolbox,illwieckz/Urcheon
|
pak_profiles/common.py
|
pak_profiles/common.py
|
#! /usr/bin/env python3
#-*- coding: UTF-8 -*-
### Legal
#
# Author: Thomas DEBESSE <[email protected]>
# License: ISC
#
file_common_deps = {
"file_base": "DEPS",
"description": "Package DEPS file",
"action": "copy",
}
file_common_external_editor = {
"file_ext": [
"xcf",
"psd",
"ora",
],
"description": "External Editor File",
"action": "ignore",
}
file_common_metada_sidecar = {
"file_ext": [
"vorbiscomment",
],
"description": "Metadata Sidecar",
"action": "ignore",
}
file_common_texture = {
"file_ext": [
"jpg",
"jpeg",
"png",
"tga",
"bmp",
"webp",
"crn",
"dds",
],
"description": "Texture",
"action": "copy",
}
file_common_sound = {
"file_ext": [
"wav",
"flac",
"ogg",
"opus",
],
"description": "Sound File",
"action": "copy",
}
file_common_script = {
"file_ext": [
"shader",
"particle",
"trail",
],
"dir_ancestor_name": "scripts",
"description": "Common Script",
"action": "copy",
}
file_common_model = {
"file_ext": [
"ase",
"iqm",
"md3",
"md5anim",
"md5mesh",
"qc",
],
"description": "Common Model File",
"action": "copy",
}
file_common_model_source = {
"file_ext": [
"blend",
],
"description": "Common Model Source",
"action": "ignore",
}
file_common_text = {
"file_ext": [
"txt",
"md",
],
"description": "Common Text file",
"action": "copy",
}
file_common_readme = {
"inherit": "file_common_text",
"file_base": "README",
"description": "Common ReadMe file",
}
file_common_nullwav = {
"inherit": "file_common_sound",
"file_ext": "wav",
"file_base": "null",
"description": "Common NULL Sound File",
"action": "copy",
}
|
#! /usr/bin/env python3
#-*- coding: UTF-8 -*-
### Legal
#
# Author: Thomas DEBESSE <[email protected]>
# License: ISC
#
file_common_deps = {
"file_base": "DEPS",
"description": "Package DEPS file",
"action": "copy",
}
file_common_external_editor = {
"file_ext": [
"xcf",
"psd",
"ora",
],
"description": "External Editor File",
"action": "ignore",
}
file_common_metada_sidecar = {
"file_ext": [
"vorbiscomment",
],
"description": "Metadata Sidecar",
"action": "ignore",
}
file_common_texture = {
"file_ext": [
"jpg",
"jpeg",
"png",
"tga",
"bmp",
"webp",
"crn",
"dds",
],
"description": "Texture",
"action": "copy",
}
file_common_sound = {
"file_ext": [
"wav",
"flac",
"ogg",
"opus",
],
"description": "Sound File",
"action": "copy",
}
file_common_script = {
"file_ext": [
"shader",
"particle",
"trail",
],
"dir_ancestor_name": "scripts",
"description": "Common Script",
"action": "copy",
}
file_common_model = {
"file_ext": [
"ase",
"iqm",
"md3",
"md5anim",
"md5mesh",
"qc",
],
"description": "Common Model File",
"action": "copy",
}
file_common_text = {
"file_ext": [
"txt",
"md",
],
"description": "Common Text file",
"action": "copy",
}
file_common_readme = {
"inherit": "file_common_text",
"file_base": "README",
"description": "Common ReadMe file",
}
file_common_nullwav = {
"inherit": "file_common_sound",
"file_ext": "wav",
"file_base": "null",
"description": "Common NULL Sound File",
"action": "copy",
}
|
isc
|
Python
|
52d835ec8a3dfec53c3cab23598be6f63da9addc
|
Update prims_minimum_spanning.py
|
keon/algorithms
|
algorithms/graph/prims_minimum_spanning.py
|
algorithms/graph/prims_minimum_spanning.py
|
'''
This Prim's Algorithm Code is for finding weight of minimum spanning tree
of a connected graph.
For argument graph, it should be a dictionary type
such as
graph = {
'a': [ [3, 'b'], [8,'c'] ],
'b': [ [3, 'a'], [5, 'd'] ],
'c': [ [8, 'a'], [2, 'd'], [4, 'e'] ],
'd': [ [5, 'b'], [2, 'c'], [6, 'e'] ],
'e': [ [4, 'c'], [6, 'd'] ]
}
where 'a','b','c','d','e' are nodes (these can be 1,2,3,4,5 as well)
'''
import heapq # for priority queue
# prim's algo. to find weight of minimum spanning tree
def prims(graph_used):
vis=[]
s=[[0,1]]
prim = []
mincost=0
while(len(s)>0):
v=heapq.heappop(s)
x=v[1]
if(x in vis):
continue
mincost += v[0]
prim.append(x)
vis.append(x)
for j in graph_used[x]:
i=j[-1]
if(i not in vis):
heapq.heappush(s,j)
return mincost
|
import heapq # for priority queue
# prim's algo. to find weight of minimum spanning tree
def prims(graph):
vis=[]
s=[[0,1]]
prim = []
mincost=0
while(len(s)>0):
v=heapq.heappop(s)
x=v[1]
if(x in vis):
continue
mincost += v[0]
prim.append(x)
vis.append(x)
for j in g[x]:
i=j[-1]
if(i not in vis):
heapq.heappush(s,j)
return mincost
if __name__=="__main__":
# input number of nodes and edges in graph
n,e = map(int,input().split())
# initializing empty graph as a dictionary (of the form {int:list})
g=dict(zip([i for i in range(1,n+1)],[[] for i in range(n)]))
# input graph data
for i in range(e):
a,b,c=map(int,input().split())
g[a].append([c,b])
g[b].append([c,a])
# print weight of minimum spanning tree
print(prims(g))
''' tests-
Input : 4 5
1 2 7
1 4 6
2 4 9
4 3 8
2 3 6
Output : 19
Input : 5 6
1 2 3
1 3 8
2 4 5
3 4 2
3 5 4
4 5 6
Output : 14
'''
|
mit
|
Python
|
9e0f62c3eedd2c5376af4178a0ecf529898a041b
|
Update command doc for open
|
guildai/guild,guildai/guild,guildai/guild,guildai/guild
|
guild/commands/open_.py
|
guild/commands/open_.py
|
# Copyright 2017-2020 TensorHub, 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 __future__ import absolute_import
from __future__ import division
import click
from guild import click_util
from . import runs_support
@click.command("open")
@runs_support.run_arg
@click.option("-p", "--path", metavar="PATH", help="Path to open under run directory.")
@click.option(
"-s", "--sourcecode", is_flag=True, help="Open run source code directory."
)
@click.option(
"-O",
"--output",
is_flag=True,
help="Open run output. Cannot be used with other options.",
)
@click.option("-c", "--cmd", metavar="CMD", help="Command used to open run.")
@click.option(
"--shell", is_flag=True, help="Open a new shell in run directory or PATH."
)
@click.option(
"--shell-cmd",
metavar="CMD",
help="Open a new shell in run directory or PATH using CMD.",
)
@runs_support.all_filters
@click.pass_context
@click_util.use_args
@click_util.render_doc
def open_(ctx, args):
"""Open a run path or output.
This command opens a path a single run.
{{ runs_support.run_arg }}
If `RUN` isn't specified, the latest run is selected.
### Run Paths
`--path` may be used to open a path within the run directory. By
default the run directory itself is opened. PATH must be relative.
`--sourcecode` may be used to open the run source code
directory. If `--path` is also specified, the path applies to the
source code directory rather than the run directory.
### Output
`--output` may be used to open the output for a run. This option
may not be used with other options.
### Open Command
`--cmd` may be used to specify the command used to open the
path. By default the system-defined program is used.
{{ runs_support.all_filters }}
"""
from . import open_impl
open_impl.main(args, ctx)
|
# Copyright 2017-2020 TensorHub, 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 __future__ import absolute_import
from __future__ import division
import click
from guild import click_util
from . import runs_support
@click.command("open")
@runs_support.run_arg
@click.option("-p", "--path", metavar="PATH", help="Path to open under run directory.")
@click.option(
"-s", "--sourcecode", is_flag=True, help="Open run source code directory."
)
@click.option(
"-O",
"--output",
is_flag=True,
help="Open run output. Cannot be used with other options.",
)
@click.option("-c", "--cmd", metavar="CMD", help="Command used to open run.")
@click.option(
"--shell", is_flag=True, help="Open a new shell in run directory or PATH."
)
@click.option(
"--shell-cmd",
metavar="CMD",
help="Open a new shell in run directory or PATH using CMD.",
)
@runs_support.all_filters
@click.pass_context
@click_util.use_args
@click_util.render_doc
def open_(ctx, args):
"""Open a run path.
This command opens a path a single run.
{{ runs_support.run_arg }}
If `RUN` isn't specified, the latest run is selected.
### Run Paths
`--path` may be used to open a path within the run directory. By
default the run directory itself is opened. PATH must be relative.
`--sourcecode` may be used to open the run source code
directory. If `--path` is also specified, the path applies to the
source code directory rather than the run directory.
### Output
`--output` may be used to open the output for a run. This option
may not be used with other options.
### Open Command
`--cmd` may be used to specify the command used to open the
path. By default the system-defined program is used.
{{ runs_support.all_filters }}
"""
from . import open_impl
open_impl.main(args, ctx)
|
apache-2.0
|
Python
|
f12b3f5c5a1409f44fc2acbb54d53fc668028e4a
|
Set print options for numpy 1.14 to 1.13.
|
cmshobe/landlab,landlab/landlab,landlab/landlab,amandersillinois/landlab,landlab/landlab,cmshobe/landlab,amandersillinois/landlab,cmshobe/landlab
|
landlab/__init__.py
|
landlab/__init__.py
|
#! /usr/bin/env python
"""The Landlab
:Package name: TheLandlab
:Release date: 2013-03-24
:Authors: Greg Tucker, Nicole Gasparini, Erkan Istanbulluoglu, Daniel Hobley,
Sai Nudurupati, Jordan Adams, Eric Hutton
:URL: http://csdms.colorado.edu/trac/landlab
:License: MIT
"""
from __future__ import absolute_import
import os
from numpy import set_printoptions
try:
set_printoptions(legacy='1.13')
except TypeError:
pass
finally:
del set_printoptions
from ._registry import registry
cite_as = registry.format_citations
__all__ = ['registry']
if 'DISPLAY' not in os.environ:
try:
import matplotlib
except ImportError:
import warnings
warnings.warn('matplotlib not found', ImportWarning)
else:
matplotlib.use('Agg')
from .core.model_parameter_dictionary import ModelParameterDictionary
from .core.model_parameter_dictionary import (MissingKeyError,
ParameterValueError)
from .core.model_parameter_loader import load_params
from .core.model_component import Component
from .framework.collections import Palette, Arena, NoProvidersError
from .framework.decorators import Implements, ImplementsOrRaise
from .framework.framework import Framework
from .field.scalar_data_fields import FieldError
from .grid import *
from .plot import *
from .testing.nosetester import LandlabTester
test = LandlabTester().test
bench = LandlabTester().bench
__all__.extend(['ModelParameterDictionary', 'MissingKeyError',
'ParameterValueError', 'Component', 'Palette', 'Arena',
'NoProvidersError', 'Implements', 'ImplementsOrRaise',
'Framework', 'FieldError', 'LandlabTester', 'load_params'])
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
|
#! /usr/bin/env python
"""The Landlab
:Package name: TheLandlab
:Release date: 2013-03-24
:Authors: Greg Tucker, Nicole Gasparini, Erkan Istanbulluoglu, Daniel Hobley,
Sai Nudurupati, Jordan Adams, Eric Hutton
:URL: http://csdms.colorado.edu/trac/landlab
:License: MIT
"""
from __future__ import absolute_import
import os
from ._registry import registry
cite_as = registry.format_citations
__all__ = ['registry']
if 'DISPLAY' not in os.environ:
try:
import matplotlib
except ImportError:
import warnings
warnings.warn('matplotlib not found', ImportWarning)
else:
matplotlib.use('Agg')
from .core.model_parameter_dictionary import ModelParameterDictionary
from .core.model_parameter_dictionary import (MissingKeyError,
ParameterValueError)
from .core.model_parameter_loader import load_params
from .core.model_component import Component
from .framework.collections import Palette, Arena, NoProvidersError
from .framework.decorators import Implements, ImplementsOrRaise
from .framework.framework import Framework
from .field.scalar_data_fields import FieldError
from .grid import *
from .plot import *
from .testing.nosetester import LandlabTester
test = LandlabTester().test
bench = LandlabTester().bench
__all__.extend(['ModelParameterDictionary', 'MissingKeyError',
'ParameterValueError', 'Component', 'Palette', 'Arena',
'NoProvidersError', 'Implements', 'ImplementsOrRaise',
'Framework', 'FieldError', 'LandlabTester', 'load_params'])
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
|
mit
|
Python
|
bcac5b2faf882fda49a3bff7eae147bcb8cbd460
|
Fix spelling of setup-readme.md
|
aylward/ITKTubeTK,aylward/ITKTubeTK,aylward/ITKTubeTK,aylward/ITKTubeTK
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
from __future__ import print_function
from os import sys
try:
from skbuild import setup
except ImportError:
print('scikit-build is required to build from source.', file=sys.stderr)
print('Please run:', file=sys.stderr)
print('', file=sys.stderr)
print(' python -m pip install scikit-build')
sys.exit(1)
from pathlib import Path
this_directory = Path(__file__).parent
setup_readme_text = (this_directory / "setup-readme.md").read_text()
#include_dirs=[np.get_include()],
setup(
name='itk-tubetk',
version='1.1',
author='Stephen R. Aylward',
author_email='[email protected]',
packages=['itk'],
package_dir={'itk': 'itk'},
download_url=r'https://github.com/InsightSoftwareConsortium/ITKTubeTK',
description=r'An open-source toolkit, led by Kitware, Inc., for the segmentation, registration, and analysis of tubes and surfaces in images.',
long_description=setup_readme_text,
long_description_content_type='text/markdown',
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: C++",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS"
],
license='Apache',
keywords='ITK InsightToolkit Tubes Vessels Nerves Ultrasound MRI CT Medical',
url=r'https://github.com/InsightSoftwareConsortium/ITKTubeTK/',
project_urls={
'Dashboard': 'https://open.cdash.org/index.php?project=TubeTK',
'Issue Tracker': 'https://github.com/InsightSoftwareConsortium/ITKTubeTK/issues',
'Testing Data': 'https://data.kitware.com/#collection/5888b7d38d777f4f3f3085a8/folder/58a3abf08d777f0721a65b16',
'ITK': 'https://itk.org',
},
install_requires=[
r'numpy',
r'itk>=5.3rc3',
r'itk-minimalpathextraction>=1.2.0'
]
)
|
# -*- coding: utf-8 -*-
from __future__ import print_function
from os import sys
try:
from skbuild import setup
except ImportError:
print('scikit-build is required to build from source.', file=sys.stderr)
print('Please run:', file=sys.stderr)
print('', file=sys.stderr)
print(' python -m pip install scikit-build')
sys.exit(1)
from pathlib import Path
this_directory = Path(__file__).parent
setup_readme_text = (this_directory / "setup_readme.md").read_text()
#include_dirs=[np.get_include()],
setup(
name='itk-tubetk',
version='1.1',
author='Stephen R. Aylward',
author_email='[email protected]',
packages=['itk'],
package_dir={'itk': 'itk'},
download_url=r'https://github.com/InsightSoftwareConsortium/ITKTubeTK',
description=r'An open-source toolkit, led by Kitware, Inc., for the segmentation, registration, and analysis of tubes and surfaces in images.',
long_description=setup_readme_text,
long_description_content_type='text/markdown',
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: C++",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Libraries",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS"
],
license='Apache',
keywords='ITK InsightToolkit Tubes Vessels Nerves Ultrasound MRI CT Medical',
url=r'https://github.com/InsightSoftwareConsortium/ITKTubeTK/',
project_urls={
'Dashboard': 'https://open.cdash.org/index.php?project=TubeTK',
'Issue Tracker': 'https://github.com/InsightSoftwareConsortium/ITKTubeTK/issues',
'Testing Data': 'https://data.kitware.com/#collection/5888b7d38d777f4f3f3085a8/folder/58a3abf08d777f0721a65b16',
'ITK': 'https://itk.org',
},
install_requires=[
r'numpy',
r'itk>=5.3rc3',
r'itk-minimalpathextraction>=1.2.0'
]
)
|
apache-2.0
|
Python
|
caf45bc9d92bb496a3fb32b494db623b5b405208
|
bump version
|
dakrauth/picker,dakrauth/picker
|
picker/__init__.py
|
picker/__init__.py
|
VERSION = (0, 5, 0)
default_app_config = 'picker.apps.PickerConfig'
def get_version():
return '.'.join(map(str, VERSION))
|
VERSION = (0, 4, 0)
default_app_config = 'picker.apps.PickerConfig'
def get_version():
return '.'.join(map(str, VERSION))
|
mit
|
Python
|
2b939c703951c0a7042fa336d9c685c437fb0586
|
Bump to version 1.2
|
Fantomas42/templer.django-project-app
|
setup.py
|
setup.py
|
"""Setup script for templer.django-project-app"""
from setuptools import setup
from setuptools import find_packages
version = '1.2'
setup(
name='templer.django-project-app',
version=version,
description='Templer extension for creating '
'Django applications within projects.',
long_description=open('README.rst').read(),
classifiers=[
'Environment :: Console',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Code Generators',
],
keywords='templer, django, application',
author='Fantomas42',
author_email='[email protected]',
url='https://github.com/Fantomas42/templer.django-project-app',
license='BSD',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['templer'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'templer.core',
],
entry_points="""
[paste.paster_create_template]
django_app = templer.django_project_app:DjangoApp
django_project_app = templer.django_project_app:DjangoProjectApp
[templer.templer_structure]
management_command = templer.django_project_app:ManagementCommandStructure
""",
)
|
"""Setup script for templer.django-project-app"""
from setuptools import setup
from setuptools import find_packages
version = '1.1'
setup(
name='templer.django-project-app',
version=version,
description='Templer extension for creating '
'Django applications within projects.',
long_description=open('README.rst').read(),
classifiers=[
'Environment :: Console',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Code Generators',
],
keywords='templer, django, application',
author='Fantomas42',
author_email='[email protected]',
url='https://github.com/Fantomas42/templer.django-project-app',
license='BSD',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['templer'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'templer.core',
],
entry_points="""
[paste.paster_create_template]
django_app = templer.django_project_app:DjangoApp
django_project_app = templer.django_project_app:DjangoProjectApp
[templer.templer_structure]
management_command = templer.django_project_app:ManagementCommandStructure
""",
)
|
bsd-3-clause
|
Python
|
9669a99d1a76f346b2cfb9b4197636ac3142f9d2
|
Update users table in a batched manner
|
TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse
|
synapse/storage/schema/delta/30/as_users.py
|
synapse/storage/schema/delta/30/as_users.py
|
# Copyright 2016 OpenMarket Ltd
#
# 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 logging
from synapse.storage.appservice import ApplicationServiceStore
logger = logging.getLogger(__name__)
def run_upgrade(cur, database_engine, config, *args, **kwargs):
# NULL indicates user was not registered by an appservice.
try:
cur.execute("ALTER TABLE users ADD COLUMN appservice_id TEXT")
except:
# Maybe we already added the column? Hope so...
pass
cur.execute("SELECT name FROM users")
rows = cur.fetchall()
config_files = []
try:
config_files = config.app_service_config_files
except AttributeError:
logger.warning("Could not get app_service_config_files from config")
pass
appservices = ApplicationServiceStore.load_appservices(
config.server_name, config_files
)
owned = {}
for row in rows:
user_id = row[0]
for appservice in appservices:
if appservice.is_exclusive_user(user_id):
if user_id in owned.keys():
logger.error(
"user_id %s was owned by more than one application"
" service (IDs %s and %s); assigning arbitrarily to %s" %
(user_id, owned[user_id], appservice.id, owned[user_id])
)
owned.setdefault(appservice.id, []).append(user_id)
for as_id, user_ids in owned.items():
n = 100
user_chunks = (user_ids[i:i + 100] for i in xrange(0, len(user_ids), n))
for chunk in user_chunks:
cur.execute(
database_engine.convert_param_style(
"UPDATE users SET appservice_id = ? WHERE name IN (%s)" % (
",".join("?" for _ in chunk),
)
),
[as_id] + chunk
)
|
# Copyright 2016 OpenMarket Ltd
#
# 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 logging
from synapse.storage.appservice import ApplicationServiceStore
logger = logging.getLogger(__name__)
def run_upgrade(cur, database_engine, config, *args, **kwargs):
# NULL indicates user was not registered by an appservice.
try:
cur.execute("ALTER TABLE users ADD COLUMN appservice_id TEXT")
except:
# Maybe we already added the column? Hope so...
pass
cur.execute("SELECT name FROM users")
rows = cur.fetchall()
config_files = []
try:
config_files = config.app_service_config_files
except AttributeError:
logger.warning("Could not get app_service_config_files from config")
pass
appservices = ApplicationServiceStore.load_appservices(
config.server_name, config_files
)
owned = {}
for row in rows:
user_id = row[0]
for appservice in appservices:
if appservice.is_exclusive_user(user_id):
if user_id in owned.keys():
logger.error(
"user_id %s was owned by more than one application"
" service (IDs %s and %s); assigning arbitrarily to %s" %
(user_id, owned[user_id], appservice.id, owned[user_id])
)
owned[user_id] = appservice.id
for user_id, as_id in owned.items():
cur.execute(
database_engine.convert_param_style(
"UPDATE users SET appservice_id = ? WHERE name = ?"
),
(as_id, user_id)
)
|
apache-2.0
|
Python
|
da5a05c27f1c19c69ce23f5cd6cd0f09edb9d7f7
|
Refactor common serializer selection code.
|
jarvis-cochrane/paranuara
|
paranuara_api/views.py
|
paranuara_api/views.py
|
from rest_framework import viewsets
from paranuara_api.models import Company, Person
from paranuara_api.serializers import (
CompanySerializer, CompanyListSerializer, PersonListSerializer,
PersonSerializer
)
class MultiSerializerMixin(object):
def get_serializer_class(self):
return self.serializers[self.action]
class CompanyViewSet(MultiSerializerMixin, viewsets.ReadOnlyModelViewSet):
queryset = Company.objects.all()
lookup_field = 'index'
serializers = {
'list': CompanyListSerializer,
'retrieve': CompanySerializer,
}
class PersonViewSet(MultiSerializerMixin, viewsets.ReadOnlyModelViewSet):
queryset = Person.objects.all()
lookup_field = 'index'
serializers = {
'list': PersonListSerializer,
'retrieve': PersonSerializer,
}
|
from rest_framework import viewsets
from paranuara_api.models import Company, Person
from paranuara_api.serializers import (
CompanySerializer, CompanyListSerializer, PersonListSerializer,
PersonSerializer
)
class CompanyViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Company.objects.all()
lookup_field = 'index'
serializers = {
'list': CompanyListSerializer,
'retrieve': CompanySerializer,
}
def get_serializer_class(self):
return self.serializers[self.action]
class PersonViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Person.objects.all()
lookup_field = 'index'
serializers = {
'list': PersonListSerializer,
'retrieve': PersonSerializer,
}
def get_serializer_class(self):
return self.serializers[self.action]
|
bsd-3-clause
|
Python
|
a2a849f3d425e9c544a66d2b04ab80555be16add
|
Fix path error
|
drivnal/drivnal,drivnal/drivnal,drivnal/drivnal
|
drivnal/handlers/path.py
|
drivnal/handlers/path.py
|
from drivnal.constants import *
from drivnal.backup import Client
import drivnal.utils as utils
from drivnal import server
import os
import flask
@server.app.route('/path', methods=['GET'])
@server.app.route('/path/<path:path>', methods=['GET'])
def path_get(path=None):
path = '/' + (path or '')
paths = []
if path != '/':
paths.append({
'name': '..',
'path': os.path.abspath(os.path.join(path, os.pardir)),
})
try:
path_list = os.listdir(path)
except OSError, error:
return utils.jsonify({
'error': PATH_NOT_FOUND,
'error_msg': error.strerror,
}), 404
for name in sorted(path_list):
full_path = os.path.join(path, name)
if not os.path.isdir(full_path):
continue
paths.append({
'name': name,
'path': full_path,
})
return utils.jsonify(paths)
|
from drivnal.constants import *
from drivnal.backup import Client
import drivnal.utils as utils
from drivnal import server
import os
import flask
@server.app.route('/path', methods=['GET'])
@server.app.route('/path/<path:path>', methods=['GET'])
def path_get(path=None):
path = '/' + (path or '')
paths = []
if path != '/':
paths.append({
'name': '..',
'path': os.path.abspath(os.path.join(path, os.pardir)),
})
try:
path_list = os.listdir(path)
except OSError:
return utils.jsonify({
'error': PATH_NOT_FOUND,
'error_msg': error.strerror,
}), 404
for name in sorted(path_list):
full_path = os.path.join(path, name)
if not os.path.isdir(full_path):
continue
paths.append({
'name': name,
'path': full_path,
})
return utils.jsonify(paths)
|
agpl-3.0
|
Python
|
9728d151967b6796ef2a34d8a9867fd109fe48f3
|
remove psutil from setup.py
|
sailthru/mongo-connector,rassor/mongo-connector,hzwjava/mongo-connector,imclab/mongo-connector,XDestination/mongo-connector,Philmod/mongo-connector,jtharpla/mongo-connector,sachinkeshav/mongo-connector,banzo/mongo-connector,jaredkipe/mongo-connector,devopservices/mongo-connector,dgsh/mongo-connector,algolia/mongo-connector,ShaneHarvey/mongo-connector,jgrivolla/mongo-connector,turbidsoul/mongo-connector,ShaneHarvey/mongo-connector,zatar-iot/mongo-connector,ineo4j/mongo-connector,10gen-labs/mongo-connector,kpsarthi/mongo-connector,jtharpla/mongo-connector,tonyzhu/mongo-connector,adammendoza/mongo-connector,agolo/mongo-connector,Sebmaster/mongo-connector,mvivies/mongo-connector,XDestination/mongo-connector,xmasotto/mongo-connector,lzjun567/mongo-connector,algolia/mongo-connector,thelok/mongo-connector,user-tony/mongo-connector,adammendoza/mongo-connector,anmolonruby/mongo-connector,anmolonruby/mongo-connector,vietanh85/mongo-connector,benjamine/mongo-connector,sat2050/mongo-connector,maxcnunes/mongo-connector,carl0224/mongo-connector,LonelyPale/mongo-connector,dacostaMetaphor/mongo-connector,10gen-labs/mongo-connector,ineo4j/mongo-connector,shridhar-b/mongo-connector,MartinNowak/mongo-connector,Nagriar/mongo-connector,Branor/mongo-connector,agolo/mongo-connector,Livefyre/mongo-connector,orchardmile/mongo-connector,asifhj/mongo-connector,NetIQ/mongo-connector,homerquan/mongo-connector,TPopovich/mongo-connector,orchardmile/mongo-connector,banzo/mongo-connector,rohitkn/mongo-connector,benjamine/mongo-connector,wzeng/mongo-connector,asifhj/mongo-connector,takao-s/mongo-connector,Nagriar/mongo-connector,mvivies/mongo-connector,MartinNowak/mongo-connector,jaredkipe/mongo-connector,turbidsoul/mongo-connector,shridhar-b/mongo-connector,lchqfnu/mongo-connector,mongodb-labs/mongo-connector,gsuresh92/mongo-connector,llvtt/mongo-connector,carl0224/mongo-connector,kauppalehti/mongo-connector,keithhigbee/mongo-connector,izzui/mongo-connector,kpsarthi/mongo-connector,imclab/mongo-connector,vietanh85/mongo-connector,agarwal-karan/mongo-connector,tonyzhu/mongo-connector,user-tony/mongo-connector,sailthru/mongo-connector,lchqfnu/mongo-connector,wzeng/mongo-connector,hzwjava/mongo-connector,Sebmaster/mongo-connector,hannelita/mongo-connector,hannelita/mongo-connector,gsuresh92/mongo-connector,keithhigbee/mongo-connector,skijash/mongo-connector,skijash/mongo-connector,mongodb-labs/mongo-connector,zatar-iot/mongo-connector,LonelyPale/mongo-connector
|
setup.py
|
setup.py
|
# Copyright 2013-2014 MongoDB, 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.
classifiers = """\
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: JavaScript
Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Unix
"""
import sys
try:
from setuptools import setup
except ImportError:
from ez_setup import setup
use_setup_tools()
from setuptools import setup
extra_opts = {"test_suite": "tests"}
if sys.version_info[:2] == (2, 6):
# Need unittest2 to run unittests in Python 2.6
extra_opts["tests_require"] = ["unittest2"]
extra_opts["test_suite"] = "unittest2.collector"
setup(name='mongo-connector',
version="1.1.1+",
author="MongoDB, Inc.",
author_email='[email protected]',
description='Mongo Connector',
keywords='mongo-connector',
url='https://github.com/10gen-labs/mongo-connector',
license="http://www.apache.org/licenses/LICENSE-2.0.html",
platforms=["any"],
classifiers=filter(None, classifiers.split("\n")),
install_requires=['pymongo', 'pysolr >= 3.1.0', 'elasticsearch'],
packages=["mongo_connector", "mongo_connector.doc_managers"],
package_data={
'mongo_connector.doc_managers': ['schema.xml']
},
entry_points={
'console_scripts': [
'mongo-connector = mongo_connector.connector:main',
],
},
**extra_opts
)
|
# Copyright 2013-2014 MongoDB, 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.
classifiers = """\
Development Status :: 4 - Beta
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Programming Language :: Python
Programming Language :: JavaScript
Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Unix
"""
import sys
try:
from setuptools import setup
except ImportError:
from ez_setup import setup
use_setup_tools()
from setuptools import setup
extra_opts = {"test_suite": "tests",
"tests_require": ["psutil>=2.0"]}
if sys.version_info[:2] == (2, 6):
# Need unittest2 to run unittests in Python 2.6
extra_opts["tests_require"] += ["unittest2"]
extra_opts["test_suite"] = "unittest2.collector"
setup(name='mongo-connector',
version="1.1.1+",
author="MongoDB, Inc.",
author_email='[email protected]',
description='Mongo Connector',
keywords='mongo-connector',
url='https://github.com/10gen-labs/mongo-connector',
license="http://www.apache.org/licenses/LICENSE-2.0.html",
platforms=["any"],
classifiers=filter(None, classifiers.split("\n")),
install_requires=['pymongo', 'pysolr >= 3.1.0', 'elasticsearch'],
packages=["mongo_connector", "mongo_connector.doc_managers"],
package_data={
'mongo_connector.doc_managers': ['schema.xml']
},
entry_points={
'console_scripts': [
'mongo-connector = mongo_connector.connector:main',
],
},
**extra_opts
)
|
apache-2.0
|
Python
|
f8ee0fc34d060016f0f601e1d84000b9c612efc6
|
exclude "abstract" methods from coverage
|
stcorp/muninn,stcorp/muninn
|
muninn/storage/base.py
|
muninn/storage/base.py
|
import os.path
import muninn.util as util
class StorageBackend(object):
def __init__(self):
self.supports_symlinks = False
self.global_prefix = ''
def get_tmp_root(self, product):
if self._tmp_root:
tmp_root = os.path.join(self._tmp_root, product.core.archive_path)
util.make_path(tmp_root)
return tmp_root
def run_for_product(self, product, fn, use_enclosing_directory):
tmp_root = self.get_tmp_root(product)
product_path = self.product_path(product)
with util.TemporaryDirectory(dir=tmp_root, prefix=".run_for_product-",
suffix="-%s" % product.core.uuid.hex) as tmp_path:
self.get(product, product_path, tmp_path, use_enclosing_directory)
paths = [os.path.join(tmp_path, basename) for basename in os.listdir(tmp_path)]
return fn(paths)
def prepare(self): # pragma: no cover
# Prepare storage for use.
raise NotImplementedError()
def exists(self): # pragma: no cover
# Check that storage exists.
raise NotImplementedError()
def initialize(self, configuration): # pragma: no cover
# Initialize storage.
raise NotImplementedError()
def destroy(self): # pragma: no cover
# Destroy storage
raise NotImplementedError()
# TODO refactor away?
def product_path(self, product): # pragma: no cover
# Product path within storage
raise NotImplementedError()
# TODO lower-granularity put/get/delete?
def put(self, paths, properties, use_enclosing_directory, use_symlinks=None,
retrieve_files=None, run_for_product=None): # pragma: no cover
# Place product file(s) into storage
raise NotImplementedError()
def get(self, product, product_path, target_path, use_enclosing_directory, use_symlinks=None): # pragma: no cover
# Retrieve product file(s) from storage
raise NotImplementedError()
def size(self, product_path): # pragma: no cover
# Return product storage size
raise NotImplementedError()
def delete(self, product_path, properties): # pragma: no cover
# Delete product file(s) from storage
raise NotImplementedError()
def move(self, product, archive_path, paths=None): # pragma: no cover
# Move product
raise NotImplementedError()
def current_archive_path(self, paths, properties): # pragma: no cover
raise NotImplementedError()
|
import os.path
import muninn.util as util
class StorageBackend(object):
def __init__(self):
self.supports_symlinks = False
self.global_prefix = ''
def get_tmp_root(self, product):
if self._tmp_root:
tmp_root = os.path.join(self._tmp_root, product.core.archive_path)
util.make_path(tmp_root)
return tmp_root
def run_for_product(self, product, fn, use_enclosing_directory):
tmp_root = self.get_tmp_root(product)
product_path = self.product_path(product)
with util.TemporaryDirectory(dir=tmp_root, prefix=".run_for_product-",
suffix="-%s" % product.core.uuid.hex) as tmp_path:
self.get(product, product_path, tmp_path, use_enclosing_directory)
paths = [os.path.join(tmp_path, basename) for basename in os.listdir(tmp_path)]
return fn(paths)
def prepare(self):
# Prepare storage for use.
raise NotImplementedError()
def exists(self):
# Check that storage exists.
raise NotImplementedError()
def initialize(self, configuration):
# Initialize storage.
raise NotImplementedError()
def destroy(self):
# Destroy storage
raise NotImplementedError()
def product_path(self, product): # TODO refactor away?
# Product path within storage
raise NotImplementedError()
# TODO lower-granularity put/get/delete?
def put(self, paths, properties, use_enclosing_directory, use_symlinks=None,
retrieve_files=None, run_for_product=None):
# Place product file(s) into storage
raise NotImplementedError()
def get(self, product, product_path, target_path, use_enclosing_directory, use_symlinks=None):
# Retrieve product file(s) from storage
raise NotImplementedError()
def size(self, product_path):
# Return product storage size
raise NotImplementedError()
def delete(self, product_path, properties):
# Delete product file(s) from storage
raise NotImplementedError()
def move(self, product, archive_path, paths=None):
# Move product
raise NotImplementedError()
def current_archive_path(self, paths, properties):
raise NotImplementedError()
|
bsd-3-clause
|
Python
|
5261aa35eb5ab697310efc5bc8b7d11e8655127b
|
Update project info
|
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
|
setup.py
|
setup.py
|
""" setup script for "portal" package
for development:
python setup.py develop
to install:
python setup.py install
"""
from setuptools import setup
project = "portal"
# maintain long_description as a single long line.
# workaround for a bug in pkg_info._get_metadata("PKG-INFO")
long_description =\
"""Alpha version of the TrueNTH Shared Services RESTful API, to be used by TrueNTH intervention applications. This API attempts to conform with the HL7 FHIR specification as much as is reasonable.
"""
setup(
name=project,
url="https://github.com/uwcirg/true_nth_usa_portal",
description="TrueNTH Shared Services",
long_description=long_description,
author="CIRG, University of Washington",
author_email="[email protected]",
classifiers=(
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: Healthcare Industry",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Medical Science Apps",
),
license = "BSD",
platforms = "any",
include_package_data=True,
use_scm_version=True,
zip_safe=False,
dependency_links=(
"git+https://github.com/pbugni/Flask-User.git#egg=Flask-User-0.6.8.1",
),
packages=["portal"],
setup_requires=("setuptools_scm"),
install_requires=(
"Authomatic>=0.1.0",
"celery",
"coverage",
"Flask>=0.10.1",
"Flask-Babel",
"Flask-Celery-Helper",
"Flask-Migrate",
"Flask-OAuthlib",
"Flask-SQLAlchemy",
"Flask-Script",
"Flask-Swagger",
"Flask-Testing",
"Flask-User>=0.6.8.1",
"Flask-WebTest",
"jsonschema",
"nose",
"oauthlib",
"page_objects",
"pkginfo",
"psycopg2",
"python-dateutil",
"recommonmark",
"redis",
"selenium",
"sphinx",
"sphinx_rtd_theme",
"swagger_spec_validator",
"validators",
"xvfbwrapper",
),
test_suite="tests",
)
|
""" setup script for "portal" package
for development:
python setup.py develop
to install:
python setup.py install
"""
from setuptools import setup
project = "portal"
# maintain long_description as a single long line.
# workaround for a bug in pkg_info._get_metadata("PKG-INFO")
long_description =\
"""Alpha version of the TrueNTH Central Services RESTful API, to be used by TrueNTH intervention applications. This API attempts to conform with the HL7 FHIR specification as much as is reasonable.
"""
setup(
name=project,
url="https://github.com/uwcirg/true_nth_usa_portal_demo",
description="TrueNTH Central Services",
long_description=long_description,
author="University of Washington",
classifiers=(
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: Healthcare Industry",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Medical Science Apps",
),
include_package_data=True,
use_scm_version=True,
zip_safe=False,
dependency_links=(
"git+https://github.com/pbugni/Flask-User.git#egg=Flask-User-0.6.8.1",
),
packages=["portal"],
setup_requires=("setuptools_scm"),
install_requires=(
"Authomatic>=0.1.0",
"celery",
"coverage",
"Flask>=0.10.1",
"Flask-Babel",
"Flask-Celery-Helper",
"Flask-Migrate",
"Flask-OAuthlib",
"Flask-SQLAlchemy",
"Flask-Script",
"Flask-Swagger",
"Flask-Testing",
"Flask-User>=0.6.8.1",
"Flask-WebTest",
"jsonschema",
"nose",
"oauthlib",
"page_objects",
"pkginfo",
"psycopg2",
"python-dateutil",
"recommonmark",
"redis",
"selenium",
"sphinx",
"sphinx_rtd_theme",
"swagger_spec_validator",
"validators",
"xvfbwrapper",
),
test_suite="tests",
)
|
bsd-3-clause
|
Python
|
6ce8537236f6bbc92789dc57a07befad391e2bc8
|
fix install_requires
|
pavel-paulau/cbagent,vmx/cbagent,couchbase/cbagent,mikewied/cbagent
|
setup.py
|
setup.py
|
from setuptools import setup
version = '2.4.2'
setup(
name='cbagent',
version=version,
description='Stats collectors package for Couchbase Server monitoring',
author='Couchbase',
license='Apache Software License',
packages=[
'cbagent',
'cbagent.collectors',
'cbagent.collectors.libstats'
],
entry_points={
'console_scripts': [
'cbagent = cbagent.__main__:main',
]
},
include_package_data=True,
install_requires=[
'couchbase==1.2.1',
'decorator',
'fabric==1.8.0',
'logger',
'requests==2.1.0',
'seriesly',
'spring'
],
dependency_links=[
'git+https://github.com/couchbaselabs/spring.git#egg=spring',
]
)
|
from setuptools import setup
version = '2.4.1'
setup(
name='cbagent',
version=version,
description='Stats collectors package for Couchbase Server monitoring',
author='Couchbase',
license='Apache Software License',
packages=[
'cbagent',
'cbagent.collectors',
'cbagent.collectors.libstats'
],
entry_points={
'console_scripts': [
'cbagent = cbagent.__main__:main',
]
},
include_package_data=True,
install_requires=[
'couchbase==1.2.0',
'decorator',
'fabric==1.8.0',
'logger',
'requests==2.1.0',
'seriesly',
'spring'
],
dependency_links=[
'git+https://github.com/couchbaselabs/spring.git#egg=spring',
]
)
|
apache-2.0
|
Python
|
b1933e4d998d703a14bbb1769e04a078fac215bc
|
Update HexStats.py
|
Vlek/plugins
|
HexChat/HexStats.py
|
HexChat/HexStats.py
|
import hexchat
#Based on Weechat's Weestats: https://weechat.org/scripts/source/weestats.py.html/
#By Filip H.F. 'FiXato' Slagter <fixato [at] gmail [dot] com>
__module_name__ = 'HexStats'
__module_version__ = '0.0.1'
__module_description__ = 'Displays HexChat-wide User Statistics'
__module_author__ = 'Vlek'
def stats(word, word_to_eol, userdata):
context = hexchat.find_context()
context.prnt( getstats() )
return hexchat.EAT_ALL
def printstats(word, word_to_eol, userdata):
context = hexchat.find_context()
context.command('say {}'.format( getstats() ))
return hexchat.EAT_ALL
def getstats():
chans = hexchat.get_list('channels')
types = [i.type for i in chans]
channels = types.count(2)
ops = []
for channel in chans:
if channel.type == 2:
context = channel.context
ops += [user.prefix for user in context.get_list('users') if user.nick == context.get_info('nick')]
ops = ops.count('@')
servers = types.count(1)
queries = types.count(3)
return 'Stats: {} channels ({} OPs), {} servers, {} queries'.format( channels, ops,
servers, queries )
hexchat.hook_command("stats", stats, help="/stats displays HexChat user statistics")
hexchat.hook_command("printstats", printstats, help="/printstats Says HexChat user statistics in current context")
|
import hexchat
#Based on Weechat's Weestats: https://weechat.org/scripts/source/weestats.py.html/
#By Filip H.F. 'FiXato' Slagter <fixato [at] gmail [dot] com>
__module_name__ = 'HexStats'
__module_version__ = '0.0.1'
__module_description__ = 'Displays HexChat Wide User Statistics'
__module_author__ = 'Vlek'
def stats(word, word_to_eol, userdata):
context = hexchat.find_context()
context.prnt( getstats() )
return hexchat.EAT_ALL
def printstats(word, word_to_eol, userdata):
context = hexchat.find_context()
context.command('say {}'.format( getstats() ))
return hexchat.EAT_ALL
def getstats():
chans = hexchat.get_list('channels')
types = [i.type for i in chans]
channels = types.count(2)
contextlist = [i.context for i in chans if i.type == 2]
ops = []
for context in contextlist:
ops += [user.prefix for user in context.get_list('users') if user.nick == context.get_info('nick')]
print('Channel: {} - {}'.format(context.get_info('channel'), context.get_info('nick')))
#ops = ops.count('@')
servers = types.count(1)
queries = types.count(3)
return 'Stats: {} channels ({} OPs), {} servers, {} queries'.format( channels, ops,
servers, queries )
hexchat.hook_command("stats", stats, help="/stats displays HexChat user statistics")
hexchat.hook_command("printstats", printstats, help="/printstats Says HexChat user statistics in current context")
|
mit
|
Python
|
1a6b79629c4e79e3917287a693047fbe5e0129ad
|
Check user if admin before lockdown
|
ProtoxiDe22/Octeon
|
plugins/lock_the_chat.py
|
plugins/lock_the_chat.py
|
"""
Echo plugin example
"""
import octeon
global locked
locked = []
PLUGINVERSION = 2
# Always name this variable as `plugin`
# If you dont, module loader will fail to load the plugin!
plugin = octeon.Plugin()
@plugin.message(regex=".*") # You pass regex pattern
def lock_check(bot, update):
if update.message.chat_id in locked:
for admin in update.message.chat.get_administrators():
if admin.user.username == update.message.from_user.username:
return
update.message.delete()
return
@plugin.command(command="/lock",
description="Locks chat",
inline_supported=True,
hidden=False)
def lock(bot, update, user, args):
if update.message.chat_id in locked:
return octeon.message("Chat is already locked")
if update.message.chat.type != "PRIVATE":
for admin in update.message.chat.get_administrators():
if admin.user.username == update.message.from_user.username:
for admin in update.message.chat.get_administrators():
if admin.user.username == bot.get_me().username:
locked.append(update.message.chat_id)
return octeon.message("Chat locked")
return octeon.message("I am not admin of this chat...")
return octeon.message(text="Hey! You are not admin of this chat!", photo="https://pbs.twimg.com/media/C_I2Xv1WAAAkpiv.jpg")
else:
return octeon.message("Why would you lock a private converstaion?")
@plugin.command(command="/unlock",
description="Unlocks chat",
inline_supported=True,
hidden=False)
def unlock(bot, update, user, args):
if update.message.chat_id in locked:
for admin in update.message.chat.get_administrators():
if admin.user.username == update.message.from_user.username:
locked.remove(update.message.chat_id)
return octeon.message("Chat unlocked")
else:
return octeon.message("This chat wasnt locked at all")
|
"""
Echo plugin example
"""
import octeon
global locked
locked = []
PLUGINVERSION = 2
# Always name this variable as `plugin`
# If you dont, module loader will fail to load the plugin!
plugin = octeon.Plugin()
@plugin.message(regex=".*") # You pass regex pattern
def lock_check(bot, update):
if update.message.chat_id in locked:
for admin in update.message.chat.get_administrators():
if admin.user.username == update.message.from_user.username:
return
update.message.delete()
return
@plugin.command(command="/lock",
description="Locks chat",
inline_supported=True,
hidden=False)
def lock(bot, update, user, args):
if update.message.chat.type != "PRIVATE" and not update.message.chat_id in locked:
for admin in update.message.chat.get_administrators():
if admin.user.username == bot.get_me().username:
locked.append(update.message.chat_id)
return octeon.message("Chat locked")
return octeon.message("I am not admin of this chat...")
else:
return octeon.message("Why would you lock a private converstaion?")
@plugin.command(command="/unlock",
description="Unlocks chat",
inline_supported=True,
hidden=False)
def unlock(bot, update, user, args):
if update.message.chat_id in locked:
locked.remove(update.message.chat_id)
return octeon.message("Chat unlocked")
else:
return octeon.message("This chat wasnt locked at all")
|
mit
|
Python
|
d60f0fa1f942a24ca38ce20f2b5a617eb5181456
|
update session backend
|
pyprism/Hiren-Disk,pyprism/Hiren-Disk,pyprism/Hiren-Disk
|
hiren/hiren/settings.py
|
hiren/hiren/settings.py
|
"""
Django settings for hiren project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '6ajer4-t(c_k3@tb0@g-w5ztxoq61e866pm0xl2t4im%khu9qo'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'debug_toolbar',
'disk',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
ROOT_URLCONF = 'hiren.urls'
WSGI_APPLICATION = 'hiren.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Asia/Dhaka'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),
)
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, "template"),
)
|
"""
Django settings for hiren project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '6ajer4-t(c_k3@tb0@g-w5ztxoq61e866pm0xl2t4im%khu9qo'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'debug_toolbar',
'disk',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
ROOT_URLCONF = 'hiren.urls'
WSGI_APPLICATION = 'hiren.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Asia/Dhaka'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static"),
)
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, "template"),
)
|
mit
|
Python
|
243c4ba66d35efbe58944ff973d668d9a3b7c6f8
|
Update __init__.py
|
bardia73/Graph,bardia73/Graph,bardia-heydarinejad/Graph,bardia-heydarinejad/Graph
|
VertexActions/__init__.py
|
VertexActions/__init__.py
|
#
|
mit
|
Python
|
|
9a9a6643bbc26a3f359df52b0b4bbb4207225017
|
Update VariationalAutoencoderRunner.py
|
cshallue/models,alexgorban/models,sshleifer/object_detection_kitti,jiaphuan/models,tombstone/models,alexgorban/models,alexgorban/models,sshleifer/object_detection_kitti,derekjchow/models,tombstone/models,jiaphuan/models,jiaphuan/models,cshallue/models,jiaphuan/models,cshallue/models,tombstone/models,tombstone/models,derekjchow/models,jiaphuan/models,sshleifer/object_detection_kitti,derekjchow/models,derekjchow/models,cshallue/models,alexgorban/models,jiaphuan/models,cshallue/models,derekjchow/models,tombstone/models,sshleifer/object_detection_kitti,sshleifer/object_detection_kitti,sshleifer/object_detection_kitti,alexgorban/models,tombstone/models
|
autoencoder/VariationalAutoencoderRunner.py
|
autoencoder/VariationalAutoencoderRunner.py
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import sklearn.preprocessing as prep
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from autoencoder_models.VariationalAutoencoder import VariationalAutoencoder
mnist = input_data.read_data_sets('MNIST_data', one_hot=True)
def min_max_scale(X_train, X_test):
preprocessor = prep.MinMaxScaler().fit(X_train)
X_train = preprocessor.transform(X_train)
X_test = preprocessor.transform(X_test)
return X_train, X_test
def get_random_block_from_data(data, batch_size):
start_index = np.random.randint(0, len(data) - batch_size)
return data[start_index:(start_index + batch_size)]
X_train, X_test = min_max_scale(mnist.train.images, mnist.test.images)
n_samples = int(mnist.train.num_examples)
training_epochs = 20
batch_size = 128
display_step = 1
autoencoder = VariationalAutoencoder(
n_input=784,
n_hidden=200,
optimizer=tf.train.AdamOptimizer(learning_rate = 0.001))
for epoch in range(training_epochs):
avg_cost = 0.
total_batch = int(n_samples / batch_size)
# Loop over all batches
for i in range(total_batch):
batch_xs = get_random_block_from_data(X_train, batch_size)
# Fit training using batch data
cost = autoencoder.partial_fit(batch_xs)
# Compute average loss
avg_cost += cost / n_samples * batch_size
# Display logs per epoch step
if epoch % display_step == 0:
print("Epoch:", '%d,' % (epoch + 1),
"Cost:", "{:.9f}".format(avg_cost))
print("Total cost: " + str(autoencoder.calc_total_cost(X_test)))
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import sklearn.preprocessing as prep
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from autoencoder_models.VariationalAutoencoder import VariationalAutoencoder
mnist = input_data.read_data_sets('MNIST_data', one_hot = True)
def min_max_scale(X_train, X_test):
preprocessor = prep.MinMaxScaler().fit(X_train)
X_train = preprocessor.transform(X_train)
X_test = preprocessor.transform(X_test)
return X_train, X_test
def get_random_block_from_data(data, batch_size):
start_index = np.random.randint(0, len(data) - batch_size)
return data[start_index:(start_index + batch_size)]
X_train, X_test = min_max_scale(mnist.train.images, mnist.test.images)
n_samples = int(mnist.train.num_examples)
training_epochs = 20
batch_size = 128
display_step = 1
autoencoder = VariationalAutoencoder(
n_input = 784,
n_hidden = 200,
optimizer = tf.train.AdamOptimizer(learning_rate = 0.001))
for epoch in range(training_epochs):
avg_cost = 0.
total_batch = int(n_samples / batch_size)
# Loop over all batches
for i in range(total_batch):
batch_xs = get_random_block_from_data(X_train, batch_size)
# Fit training using batch data
cost = autoencoder.partial_fit(batch_xs)
# Compute average loss
avg_cost += cost / n_samples * batch_size
# Display logs per epoch step
if epoch % display_step == 0:
print("Epoch:", '%d,' % (epoch + 1),
"Cost:", "{:.9f}".format(avg_cost))
print("Total cost: " + str(autoencoder.calc_total_cost(X_test)))
|
apache-2.0
|
Python
|
32fa9354c221f91cc6790177371a00468d22cb85
|
Fix the scan script
|
OiNutter/microbit-scripts
|
scan/scan.py
|
scan/scan.py
|
# Add your Python code here. E.g.
from microbit import *
MAX_ROWS=4
level = 9
def scan(pause=500, reverse=False):
for i in range(0,10):
x = 0
rows = i
cols = i
while x <= i:
for y in range(0,rows+1):
if x <= MAX_ROWS and y <= MAX_ROWS:
coord_x = MAX_ROWS-x if reverse else x
coord_y = MAX_ROWS-y if reverse else y
display.set_pixel(coord_x,coord_y,max(0,level-((rows-y)*2)))
x = x+1
rows = rows-1
sleep(pause)
while True:
scan(150)
scan(150,True)
|
# Add your Python code here. E.g.
from microbit import *
MAX_ROWS=4
def scan(level,pause=500, reverse=False):
for i in range(0,10):
x = 0
rows = i
cols = i
while x <= i:
for y in range(0,rows+1):
if x <= MAX_ROWS and y <= MAX_ROWS:
coord_x = MAX_ROWS-x if reverse else x
coord_y = MAX_ROWS-y if reverse else y
display.set_pixel(coord_x,coord_y,max(0,level-((rows-y)*2)))
x = x+1
rows = rows-1
sleep(pause)
while True:
scan(9,150)
scan(150,True)
|
mit
|
Python
|
9360c15f8883543ad5d83aa7dc870c60a1fed5ec
|
add infos
|
efficios/pytsdl
|
setup.py
|
setup.py
|
#!/usr/bin/env python3
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Philippe Proulx <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import os
import sys
import subprocess
from setuptools import setup
# make sure we run Python 3+ here
v = sys.version_info
if v.major < 3:
sys.stderr.write('Sorry, pytsdl needs Python 3\n')
sys.exit(1)
# pyPEG2 needs to be installed manually until their PyPI tarball is
# fixed for setuptools.
try:
import pypeg2
except ImportError:
sys.stderr.write('Please install pyPEG2 manually:\n\n')
sys.stderr.write(' sudo pip3 install pyPEG2\n')
sys.exit(1)
packages = [
'pytsdl',
]
setup(name='pytsdl',
version=0.3,
description='TSDL parser implemented entirely in Python 3',
author='Philippe Proulx',
author_email='[email protected]',
license='MIT',
keywords='tsdl ctf metadata',
url='https://github.com/eepp/pytsdl',
packages=packages)
|
#!/usr/bin/env python3
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Philippe Proulx <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import os
import sys
import subprocess
from setuptools import setup
# make sure we run Python 3+ here
v = sys.version_info
if v.major < 3:
sys.stderr.write('Sorry, pytsdl needs Python 3\n')
sys.exit(1)
# pyPEG2 needs to be installed manually until their PyPI tarball is
# fixed for setuptools.
try:
import pypeg2
except ImportError:
sys.stderr.write('Please install pyPEG2 manually:\n\n')
sys.stderr.write(' sudo pip3 install pyPEG2\n')
sys.exit(1)
packages = [
'pytsdl',
]
setup(name='pytsdl',
version=0.3,
description='TSDL parser implemented entirely in Python 3',
author='Philippe Proulx',
author_email='[email protected]',
url='https://github.com/eepp/pytsdl',
packages=packages)
|
mit
|
Python
|
dc1773eaf3e66ddf5cbaa564bb55dbb8e51218ff
|
Fix #752: test case failed
|
yapdns/yapdnsbeat,yapdns/yapdnsbeat
|
topbeat/tests/system/test_filesystem.py
|
topbeat/tests/system/test_filesystem.py
|
from topbeat import TestCase
import numbers
"""
Contains tests for ide statistics.
"""
class Test(TestCase):
def test_filesystems(self):
"""
Checks that system wide stats are found in the output and
have the expected types.
"""
self.render_config_template(
system_stats=False,
process_stats=False,
filesystem_stats=True
)
topbeat = self.start_topbeat()
self.wait_until(lambda: self.output_has(lines=1))
topbeat.kill_and_wait()
output = self.read_output()[0]
for key in [
"fs.device_name",
"fs.mount_point",
]:
assert isinstance(output[key], basestring)
for key in [
"fs.used_p",
]:
assert isinstance(output[key], numbers.Number)
for key in [
"fs.avail",
"fs.files",
"fs.free_files",
"fs.total",
"fs.used",
]:
assert type(output[key]) is int or type(output[key]) is long
|
from topbeat import TestCase
"""
Contains tests for ide statistics.
"""
class Test(TestCase):
def test_filesystems(self):
"""
Checks that system wide stats are found in the output and
have the expected types.
"""
self.render_config_template(
system_stats=False,
process_stats=False,
filesystem_stats=True
)
topbeat = self.start_topbeat()
self.wait_until(lambda: self.output_has(lines=1))
topbeat.kill_and_wait()
output = self.read_output()[0]
for key in [
"fs.device_name",
"fs.mount_point",
]:
assert isinstance(output[key], basestring)
for key in [
"fs.used_p",
]:
assert type(output[key]) is float
for key in [
"fs.avail",
"fs.files",
"fs.free_files",
"fs.total",
"fs.used",
]:
assert type(output[key]) is int or type(output[key]) is long
|
mit
|
Python
|
1dacd99bbe1b32586a013d7d6f0874271e097e7c
|
Revise var to reach
|
bowen0701/algorithms_data_structures
|
lc0055_jump_game.py
|
lc0055_jump_game.py
|
"""Leetcode 55. Jump Game
Medium
URL: https://leetcode.com/problems/jump-game/
Given an array of non-negative integers, you are initially positioned at the
first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if you are able to reach the last index.
Example 1:
Input: [2,3,1,1,4]
Output: true
Explanation: Jump 1 step from index 0 to 1, then 3 steps to the last index.
Example 2:
Input: [3,2,1,0,4]
Output: false
Explanation: You will always arrive at index 3 no matter what. Its maximum
jump length is 0, which makes it impossible to reach the last index.
"""
class SolutionGreedy(object):
def canJump(self, nums):
"""
:type nums: List[int]
:rtype: bool
Time complexity: O(n).
Space complexity: O(1).
"""
# Create max reachable index.
reach = 0
for i in range(len(nums)):
# Index i is not reachable.
if reach < i:
return False
# Update reach by taking max of itself and i+nums[i].
reach = max(reach, i + nums[i])
return True
def main():
# Ans: True
nums = [2,3,1,1,4]
print SolutionGreedy().canJump(nums)
# Ans: False
nums = [3,2,1,0,4]
print SolutionGreedy().canJump(nums)
if __name__ == '__main__':
main()
|
"""Leetcode 55. Jump Game
Medium
URL: https://leetcode.com/problems/jump-game/
Given an array of non-negative integers, you are initially positioned at the
first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if you are able to reach the last index.
Example 1:
Input: [2,3,1,1,4]
Output: true
Explanation: Jump 1 step from index 0 to 1, then 3 steps to the last index.
Example 2:
Input: [3,2,1,0,4]
Output: false
Explanation: You will always arrive at index 3 no matter what. Its maximum
jump length is 0, which makes it impossible to reach the last index.
"""
class SolutionGreedy(object):
def canJump(self, nums):
"""
:type nums: List[int]
:rtype: bool
Time complexity: O(n).
Space complexity: O(1).
"""
# Create max reachable index.
reachable = 0
for i in range(len(nums)):
# Index i is not reachable.
if reachable < i:
return False
# Update reachable by taking max of itself and i+nums[i].
reachable = max(reachable, i + nums[i])
return True
def main():
# Ans: True
nums = [2,3,1,1,4]
print SolutionGreedy().canJump(nums)
# Ans: False
nums = [3,2,1,0,4]
print SolutionGreedy().canJump(nums)
if __name__ == '__main__':
main()
|
bsd-2-clause
|
Python
|
e908792a8a47b4afc478a89f479ab836d7acea5e
|
set 2to3 False
|
desihub/desiutil,desihub/desiutil
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
#
# Standard imports
#
import glob
import os
import sys
from setuptools import setup, find_packages
#
# desiutil needs to import some of its own code.
#
sys.path.insert(int(sys.path[0] == ''),os.path.abspath('./py'))
from desiutil.setup import DesiModule, DesiTest, DesiVersion, get_version
#
# Begin setup
#
setup_keywords = dict()
#
# THESE SETTINGS NEED TO BE CHANGED FOR EVERY PRODUCT.
#
setup_keywords['name'] = 'desiutil'
setup_keywords['description'] = 'DESI utilities package'
setup_keywords['author'] = 'DESI Collaboration'
setup_keywords['author_email'] = '[email protected]'
setup_keywords['license'] = 'BSD'
setup_keywords['url'] = 'https://github.com/desihub/desiutil'
#
# END OF SETTINGS THAT NEED TO BE CHANGED.
#
setup_keywords['version'] = get_version(setup_keywords['name'])
#
# Use README.rst as long_description.
#
setup_keywords['long_description'] = ''
if os.path.exists('README.rst'):
with open('README.rst') as readme:
setup_keywords['long_description'] = readme.read()
#
# Set other keywords for the setup function. These are automated, & should
# be left alone unless you are an expert.
#
# Treat everything in bin/ except *.rst as a script to be installed.
#
if os.path.isdir('bin'):
setup_keywords['scripts'] = [fname for fname in glob.glob(os.path.join('bin', '*'))
if not os.path.basename(fname).endswith('.rst')]
setup_keywords['provides'] = [setup_keywords['name']]
setup_keywords['requires'] = ['Python (>2.7.0)']
# setup_keywords['install_requires'] = ['Python (>2.7.0)']
setup_keywords['zip_safe'] = False
setup_keywords['use_2to3'] = False
setup_keywords['packages'] = find_packages('py')
setup_keywords['package_dir'] = {'':'py'}
setup_keywords['cmdclass'] = {'module_file': DesiModule, 'version': DesiVersion, 'test': DesiTest}
setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
#
# Autogenerate command-line scripts.
#
# setup_keywords['entry_points'] = {'console_scripts':['desiInstall = desiutil.install.desi_install:main']}
#
# Add internal data directories.
#
setup_keywords['package_data'] = {'desiutil.test': ['t/*']}
#
# Run setup command.
#
setup(**setup_keywords)
|
#!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
#
# Standard imports
#
import glob
import os
import sys
from setuptools import setup, find_packages
#
# desiutil needs to import some of its own code.
#
sys.path.insert(int(sys.path[0] == ''),os.path.abspath('./py'))
from desiutil.setup import DesiModule, DesiTest, DesiVersion, get_version
#
# Begin setup
#
setup_keywords = dict()
#
# THESE SETTINGS NEED TO BE CHANGED FOR EVERY PRODUCT.
#
setup_keywords['name'] = 'desiutil'
setup_keywords['description'] = 'DESI utilities package'
setup_keywords['author'] = 'DESI Collaboration'
setup_keywords['author_email'] = '[email protected]'
setup_keywords['license'] = 'BSD'
setup_keywords['url'] = 'https://github.com/desihub/desiutil'
#
# END OF SETTINGS THAT NEED TO BE CHANGED.
#
setup_keywords['version'] = get_version(setup_keywords['name'])
#
# Use README.rst as long_description.
#
setup_keywords['long_description'] = ''
if os.path.exists('README.rst'):
with open('README.rst') as readme:
setup_keywords['long_description'] = readme.read()
#
# Set other keywords for the setup function. These are automated, & should
# be left alone unless you are an expert.
#
# Treat everything in bin/ except *.rst as a script to be installed.
#
if os.path.isdir('bin'):
setup_keywords['scripts'] = [fname for fname in glob.glob(os.path.join('bin', '*'))
if not os.path.basename(fname).endswith('.rst')]
setup_keywords['provides'] = [setup_keywords['name']]
setup_keywords['requires'] = ['Python (>2.7.0)']
# setup_keywords['install_requires'] = ['Python (>2.7.0)']
setup_keywords['zip_safe'] = False
setup_keywords['use_2to3'] = True
setup_keywords['packages'] = find_packages('py')
setup_keywords['package_dir'] = {'':'py'}
setup_keywords['cmdclass'] = {'module_file': DesiModule, 'version': DesiVersion, 'test': DesiTest}
setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
#
# Autogenerate command-line scripts.
#
# setup_keywords['entry_points'] = {'console_scripts':['desiInstall = desiutil.install.desi_install:main']}
#
# Add internal data directories.
#
setup_keywords['package_data'] = {'desiutil.test': ['t/*']}
#
# Run setup command.
#
setup(**setup_keywords)
|
bsd-3-clause
|
Python
|
25ff2bcd545c7429dda5f3cd48ff8272c28d8965
|
Complete recur sort w/ iter merge sol
|
bowen0701/algorithms_data_structures
|
lc0148_sort_list.py
|
lc0148_sort_list.py
|
"""Leetcode 148. Sort List
Medium
URL: https://leetcode.com/problems/sort-list/
Sort a linked list in O(n log n) time using constant space complexity.
Example 1:
Input: 4->2->1->3
Output: 1->2->3->4
Example 2:
Input: -1->5->3->4->0
Output: -1->0->3->4->5
"""
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, val):
self.val = val
self.next = None
class SolutionRecur(object):
def _merge_sorted_lists(self, l1, l2):
if not l1 and not l2:
return None
if not l1 or not l2:
return l1 or l2
prev = ListNode(None)
current = prev
while l1 and l2:
if l1.val <= l2.val:
current.next = l1
l1 = l1.next
else:
current.next = l2
l2 = l2.next
current = current.next
# Link the remaining non-empty list.
current.next = l1 or l2
return prev.next
def sortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
Time complexity: O(n*logn).
Space complexity: O(logn), for stake call.
"""
# Apply recursive sort list with iterative merge sorted lists.
# Create base condition: no or just one node.
if not head or not head.next:
return head
# Use prev, slow & fast pointers to get middle node prev.
prev, slow, fast = None, head, head
while fast and fast.next:
prev = slow
slow = slow.next
fast = fast.next.next
# Split list into two by cutting the link of the 1st to the 2nd.
prev.next = None
# Recursively sort 1st and 2nd lists.
l1 = self.sortList(head)
l2 = self.sortList(slow)
# Merge two sorted lists into the one.
return self._merge_sorted_lists(l1, l2)
def main():
# Input: 4->2->1->3
# Output: 1->2->3->4
head = ListNode(4)
head.next = ListNode(2)
head.next.next = ListNode(1)
head.next.next.next = ListNode(3)
sorted_head = SolutionRecur().sortList(head)
print (sorted_head.val, sorted_head.next.val,
sorted_head.next.next.val,
sorted_head.next.next.next.val)
# Input: -1->5->3->4->0
# Output: -1->0->3->4->5
if __name__ == '__main__':
main()
|
"""Leetcode 148. Sort List
Medium
URL: https://leetcode.com/problems/sort-list/
Sort a linked list in O(n log n) time using constant space complexity.
Example 1:
Input: 4->2->1->3
Output: 1->2->3->4
Example 2:
Input: -1->5->3->4->0
Output: -1->0->3->4->5
"""
# Definition for singly-linked list.
class ListNode(object):
def __init__(self, val):
self.val = val
self.next = None
class Solution(object):
def sortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
pass
def main():
pass
if __name__ == '__main__':
main()
|
bsd-2-clause
|
Python
|
d3d8267588b60f77b6c55ffd8461ddfa163501da
|
add dependency for protobuf
|
Cue/fast-python-pb
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# Copyright 2011 The fast-python-pb Authors.
#
# 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 for fast python protocol buffers."""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='fastpb',
version='0.1',
description='Fast Python Protocol Buffers',
license='Apache',
author='Greplin, Inc.',
author_email='[email protected]',
url='https://www.github.com/Cue/fast-python-pb',
package_dir={'': 'src'},
packages=['fastpb'],
package_data={
'fastpb': ['template/*'],
},
entry_points={
'console_scripts': [
'protoc-gen-fastpython = fastpb.generator:main'
]
},
install_requires=['ez-setup==0.9', 'protobuf >= 2.3.0', 'jinja2 >= 2.0'],
)
|
#!/usr/bin/env python
# Copyright 2011 The fast-python-pb Authors.
#
# 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 for fast python protocol buffers."""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='fastpb',
version='0.1',
description='Fast Python Protocol Buffers',
license='Apache',
author='Greplin, Inc.',
author_email='[email protected]',
url='https://www.github.com/Cue/fast-python-pb',
package_dir={'': 'src'},
packages=['fastpb'],
package_data = {
'fastpb': ['template/*'],
},
entry_points = {
'console_scripts': [
'protoc-gen-fastpython = fastpb.generator:main'
]
},
install_requires=['protobuf >= 2.3.0', 'jinja2 >= 2.0'],
)
|
apache-2.0
|
Python
|
2035099fd78b1d0906403ec836a4b7e7144a6bbc
|
bump to 0.0.6
|
SwingTix/bookkeeper
|
swingtix/bookkeeper/__init__.py
|
swingtix/bookkeeper/__init__.py
|
__VERSION__='0.0.6'
|
__VERSION__='0.0.5'
|
agpl-3.0
|
Python
|
448d1fc24dd92e6d9f063a1b679db2d5be2f7106
|
Simplify n - 1
|
bowen0701/algorithms_data_structures
|
lc0293_flip_game.py
|
lc0293_flip_game.py
|
"""Leetcode 293. Flip Game (Premium)
Easy
URL: https://leetcode.com/problems/flip-game
You are playing the following Flip Game with your friend: Given a string that
contains only these two characters: + and -, you and your friend take turns to
flip two consecutive "++" into "--". The game ends when a person can no longer
make a move and therefore the other person will be the winner.
Write a function to compute all possible states of the string after one valid
move.
Example:
Input: s = "++++"
Output:
[
"--++",
"+--+",
"++--"
]
Note: If there is no valid move, return an empty list [].
"""
class SolutionCheckCharAndNeighborIter(object):
def generatePossibleNextMoves(self, s):
"""
:type s: str
:rtype: List[str]
Time complexity: O(n^2).
Space complexity: O(n).
"""
# Edge cases.
if len(s) <= 1:
return []
n = len(s)
possible_states = []
# Iterate through string to check if char and its next are '++'.
i = 0
while i < n - 1:
if s[i] == '+':
while i < n - 1 and s[i + 1] == '+':
possible_states.append(s[:i] + '--' + s[i+2:])
i += 1
i += 1
return possible_states
def main():
# Input: s = "++++"
# Output:
# [
# "--++",
# "+--+",
# "++--"
# ]
s = '++++'
print SolutionCheckCharAndNeighborIter().generatePossibleNextMoves(s)
if __name__ == '__main__':
main()
|
"""Leetcode 293. Flip Game (Premium)
Easy
URL: https://leetcode.com/problems/flip-game
You are playing the following Flip Game with your friend: Given a string that
contains only these two characters: + and -, you and your friend take turns to
flip two consecutive "++" into "--". The game ends when a person can no longer
make a move and therefore the other person will be the winner.
Write a function to compute all possible states of the string after one valid
move.
Example:
Input: s = "++++"
Output:
[
"--++",
"+--+",
"++--"
]
Note: If there is no valid move, return an empty list [].
"""
class SolutionIter(object):
def generatePossibleNextMoves(self, s):
"""
:type s: str
:rtype: List[str]
Time complexity: O(n^2).
Space complexity: O(n).
"""
# Edge cases.
if len(s) <= 1:
return []
n_minus_1 = len(s) - 1
possible_states = []
# Iterate through string to check if char and its next are '++'.
i = 0
while i < n_minus_1:
if s[i] == '+':
while i < n_minus_1 and s[i + 1] == '+':
possible_states.append(s[:i] + '--' + s[i+2:])
i += 1
i += 1
return possible_states
def main():
# Input: s = "++++"
# Output:
# [
# "--++",
# "+--+",
# "++--"
# ]
s = '++++'
print SolutionIter().generatePossibleNextMoves(s)
if __name__ == '__main__':
main()
|
bsd-2-clause
|
Python
|
4e9444f76ba36ed58b13843017cb2d67a6ebd2a7
|
create version 2.4.8
|
Duke-GCB/DukeDSClient,Duke-GCB/DukeDSClient
|
setup.py
|
setup.py
|
from setuptools import setup
setup(name='DukeDSClient',
version='2.4.8',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
license='MIT',
packages=['ddsc', 'ddsc.core', 'ddsc.sdk', 'DukeDS'],
install_requires=[
'requests>=2.20.0',
'PyYAML>=5.1',
'pytz',
'future',
'six',
'tenacity==5.0.4',
],
test_suite='nose.collector',
tests_require=['nose', 'mock'],
entry_points={
'console_scripts': [
'ddsclient = ddsc.__main__:main'
]
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Utilities',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
)
|
from setuptools import setup
setup(name='DukeDSClient',
version='2.4.7',
description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.',
url='https://github.com/Duke-GCB/DukeDSClient',
keywords='duke dds dukedataservice',
author='John Bradley',
license='MIT',
packages=['ddsc', 'ddsc.core', 'ddsc.sdk', 'DukeDS'],
install_requires=[
'requests>=2.20.0',
'PyYAML>=5.1',
'pytz',
'future',
'six',
'tenacity==5.0.4',
],
test_suite='nose.collector',
tests_require=['nose', 'mock'],
entry_points={
'console_scripts': [
'ddsclient = ddsc.__main__:main'
]
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Utilities',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
)
|
mit
|
Python
|
ac85d822f1c2656ee2c83550e613b52d97b8f2da
|
update message for image check gate when base id is out of date Fixes #50
|
anchore/anchore,anchore/anchore
|
anchore/anchore-modules/gates/11_check_image.py
|
anchore/anchore-modules/gates/11_check_image.py
|
#!/usr/bin/env python
import sys
import os
import json
import re
import anchore
from anchore import anchore_utils
gate_name = "IMAGECHECK"
triggers = {
'BASEOUTOFDATE':
{
'description':'triggers if the image\'s base image has been updated since the image was built/analyzed',
'params':'None'
}
}
try:
config = anchore.anchore_utils.init_gate_cmdline(sys.argv, gate_name, gate_help=triggers)
except Exception as err:
print str(err)
sys.exit(1)
if not config:
print "ERROR: could not set up environment for gate"
sys.exit(1)
imageId = config['imgid']
try:
params = config['params']
except:
params = None
outlist = list()
# do somthing
try:
idata = anchore.anchore_utils.load_image_report(imageId)
humanname = idata['meta']['humanname']
dockerfile_mode = idata['dockerfile_mode']
if dockerfile_mode == 'Actual':
realbaseid = None
if idata and 'familytree' in idata and len(idata['familytree']) > 0:
realbaseid = idata['familytree'][0]
(thefrom, thefromid) = anchore.anchore_utils.discover_from_info(idata['dockerfile_contents'])
if realbaseid != thefromid:
outlist.append("BASEOUTOFDATE Image stored base image ("+str(thefrom)+") ID is ("+str(realbaseid)[0:12]+"), but the latest detected base ID for ("+str(thefrom)+") is ("+str(thefromid)[0:12]+")")
except Exception as err:
import traceback
traceback.print_exc()
print "ERROR: Exception: " + str(err)
sys.exit(1)
# write output
anchore.anchore_utils.save_gate_output(imageId, gate_name, outlist)
sys.exit(0)
|
#!/usr/bin/env python
import sys
import os
import json
import re
import anchore
from anchore import anchore_utils
gate_name = "IMAGECHECK"
triggers = {
'BASEOUTOFDATE':
{
'description':'triggers if the image\'s base image has been updated since the image was built/analyzed',
'params':'None'
}
}
try:
config = anchore.anchore_utils.init_gate_cmdline(sys.argv, gate_name, gate_help=triggers)
except Exception as err:
print str(err)
sys.exit(1)
if not config:
print "ERROR: could not set up environment for gate"
sys.exit(1)
imageId = config['imgid']
try:
params = config['params']
except:
params = None
outlist = list()
# do somthing
try:
idata = anchore.anchore_utils.load_image_report(imageId)
humanname = idata['meta']['humanname']
dockerfile_mode = idata['dockerfile_mode']
if dockerfile_mode == 'Actual':
realbaseid = None
if idata and 'familytree' in idata and len(idata['familytree']) > 0:
realbaseid = idata['familytree'][0]
(thefrom, thefromid) = anchore.anchore_utils.discover_from_info(idata['dockerfile_contents'])
if realbaseid != thefromid:
outlist.append("BASEOUTOFDATE Image base image ("+str(thefrom)+") ID is ("+str(realbaseid)[0:12]+"), but the latest ID for ("+str(thefrom)+") is ("+str(thefromid)[0:12]+")")
except Exception as err:
import traceback
traceback.print_exc()
print "ERROR: Exception: " + str(err)
sys.exit(1)
# write output
anchore.anchore_utils.save_gate_output(imageId, gate_name, outlist)
sys.exit(0)
|
apache-2.0
|
Python
|
7f03e3ee668f272a68fd326d642966eb876609d7
|
Fix a debug email error.
|
grengojbo/satchmo,grengojbo/satchmo
|
satchmo/apps/satchmo_store/mail.py
|
satchmo/apps/satchmo_store/mail.py
|
from django.conf import settings
from django.template import loader, Context
from satchmo_store.shop.models import Config
from socket import error as SocketError
import logging
log = logging.getLogger('satchmo_store.mail')
if "mailer" in settings.INSTALLED_APPS:
from mailer import send_mail
else:
from django.core.mail import send_mail
class NoRecipientsException(StandardError):
pass
def send_store_mail(subject, context, template, recipients_list=None,
format_subject=False, send_to_store=False,
fail_silently=False):
"""
:parameter: subject: A string.
:parameter: format_subject: Determines whether the *subject* parameter
is formatted. Only the %(shop_name)s specifier is supported now.
:parameter: context: A dictionary to use when rendering the message body.
This dictionary overwrites an internal dictionary which provides the key
`shop_name`.
:parameter: template: The path of the template to use when rendering the
message body.
"""
shop_config = Config.objects.get_current()
shop_email = shop_config.store_email
shop_name = shop_config.store_name
if not shop_email:
log.warn('No email address configured for the shop. Using admin settings.')
shop_email = settings.ADMINS[0][1]
c_dict = {'shop_name': shop_name}
if format_subject:
subject = subject % c_dict
c_dict.update(context)
c = Context(c_dict)
t = loader.get_template(template)
body = t.render(c)
recipients = recipients_list or []
if send_to_store:
recipients.append(shop_email)
if not recipients:
raise NoRecipientsException
try:
send_mail(subject, body, shop_email, recipients,
fail_silently=fail_silently)
except SocketError, e:
if settings.DEBUG:
log.error('Error sending mail: %s' % e)
log.warn('Ignoring email error, since you are running in DEBUG mode. Email was:\nTo:%s\nSubject: %s\n---\n%s', ",".join(recipients), subject, body)
else:
log.fatal('Error sending mail: %s' % e)
raise IOError('Could not send email. Please make sure your email settings are correct and that you are not being blocked by your ISP.')
|
from django.conf import settings
from django.template import loader, Context
from satchmo_store.shop.models import Config
from socket import error as SocketError
import logging
log = logging.getLogger('satchmo_store.mail')
if "mailer" in settings.INSTALLED_APPS:
from mailer import send_mail
else:
from django.core.mail import send_mail
class NoRecipientsException(StandardError):
pass
def send_store_mail(subject, context, template, recipients_list=None,
format_subject=False, send_to_store=False,
fail_silently=False):
"""
:parameter: subject: A string.
:parameter: format_subject: Determines whether the *subject* parameter
is formatted. Only the %(shop_name)s specifier is supported now.
:parameter: context: A dictionary to use when rendering the message body.
This dictionary overwrites an internal dictionary which provides the key
`shop_name`.
:parameter: template: The path of the template to use when rendering the
message body.
"""
shop_config = Config.objects.get_current()
shop_email = shop_config.store_email
shop_name = shop_config.store_name
if not shop_email:
log.warn('No email address configured for the shop. Using admin settings.')
shop_email = settings.ADMINS[0][1]
c_dict = {'shop_name': shop_name}
if format_subject:
subject = subject % c_dict
c_dict.update(context)
c = Context(c_dict)
t = loader.get_template(template)
body = t.render(c)
recipients = recipients_list or []
if send_to_store:
recipients.append(shop_email)
if not recipients:
raise NoRecipientsException
try:
send_mail(subject, body, shop_email, recipients,
fail_silently=fail_silently)
except SocketError, e:
if settings.DEBUG:
log.error('Error sending mail: %s' % e)
log.warn('Ignoring email error, since you are running in DEBUG mode. Email was:\nTo:%s\nSubject: %s\n---\n%s', ",".join(recipients), subject, message)
else:
log.fatal('Error sending mail: %s' % e)
raise IOError('Could not send email. Please make sure your email settings are correct and that you are not being blocked by your ISP.')
|
bsd-3-clause
|
Python
|
d146e397b0240d1a22e2f53d3c538a90180a122d
|
remove wxPython from install_requires, as setuptools can't find/install it
|
motmot/wxvideo
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import os
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
'PIL>=1.1.6',
'motmot.imops',
]
setup(name='motmot.wxvideo',
description='wx viewer of image sequences',
long_description = \
"""Allows for display and resizing/rotation of images.
This is a subpackage of the motmot family of digital image utilities.
""",
packages = find_packages(),
namespace_packages = ['motmot'],
url='http://code.astraw.com/projects/motmot',
version='0.5.3',
author='Andrew Straw',
author_email='[email protected]',
license='BSD',
**kws)
|
from setuptools import setup, find_packages
import os
kws = {}
if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )):
kws['install_requires'] = [
'numpy>=1.0.4',
'PIL>=1.1.6',
'motmot.imops',
'wxPython>=2.8'
]
setup(name='motmot.wxvideo',
description='wx viewer of image sequences',
long_description = \
"""Allows for display and resizing/rotation of images.
This is a subpackage of the motmot family of digital image utilities.
""",
packages = find_packages(),
namespace_packages = ['motmot'],
url='http://code.astraw.com/projects/motmot',
version='0.5.3',
author='Andrew Straw',
author_email='[email protected]',
license='BSD',
**kws)
|
bsd-3-clause
|
Python
|
51de92a1402739e4a6a703ce1fc7e2f2ade308f3
|
add information to pypi page (#21)
|
VirusTotal/vt-graph-api,VirusTotal/vt-graph-api
|
setup.py
|
setup.py
|
"""Setup for vt_graph_api module."""
import re
import sys
import setuptools
with open("./vt_graph_api/version.py") as f:
version = (
re.search(r"__version__ = \'([0-9]{1,}.[0-9]{1,}.[0-9]{1,})\'",
f.read()).groups()[0])
# check python version >2.7.x and >=3.2.x
installable = True
if sys.version_info.major == 3:
if sys.version_info.minor < 2:
installable = False
else:
if sys.version_info.minor < 7:
installable = False
if not installable:
sys.exit("Sorry, this python version is not supported")
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = [
"requests",
"six",
"futures"
]
setuptools.setup(
name="vt_graph_api",
version=version,
author="VirusTotal",
author_email="[email protected]",
description="The official Python client library for VirusTotal Graph API",
license="Apache 2",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/virustotal/vt-graph-api",
packages=setuptools.find_packages(),
install_requires=install_requires,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)
|
"""Setup for vt_graph_api module."""
import re
import sys
import setuptools
with open("./vt_graph_api/version.py") as f:
version = (
re.search(r"__version__ = \'([0-9]{1,}.[0-9]{1,}.[0-9]{1,})\'",
f.read()).groups()[0])
# check python version >2.7.x and >=3.2.x
installable = True
if sys.version_info.major == 3:
if sys.version_info.minor < 2:
installable = False
else:
if sys.version_info.minor < 7:
installable = False
if not installable:
sys.exit("Sorry, this python version is not supported")
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = [
"requests",
"six",
"futures"
]
setuptools.setup(
name="vt_graph_api",
version=version,
author="VirusTotal",
author_email="[email protected]",
description="VirusTotal Graph API",
license="Apache 2",
long_description_content_type="text/markdown",
url="https://github.com/virustotal/vt_graph_api",
packages=setuptools.find_packages(),
install_requires=install_requires,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)
|
apache-2.0
|
Python
|
d36e17e3823af74b5a6f75191f141ec98fdf281f
|
Fix failing reconnects; add quit IRC command
|
howard/p1tr-tng,howard/p1tr-tng
|
plugins/irc/irc.py
|
plugins/irc/irc.py
|
from p1tr.helpers import clean_string
from p1tr.plugin import *
@meta_plugin
class Irc(Plugin):
"""Provides commands for basic IRC operations."""
@command
@require_master
def nick(self, server, channel, nick, params):
"""Usage: nick NEW_NICKNAME - changes the bot's nickname."""
if len(params) < 1:
return clean_string(self.nick.__doc__)
self.bot.client.send('NICK', params[0])
@command
@require_master
def join(self, server, channel, nick, params):
"""
Usage: join #CHANNEL [PASSWORD] - the bot will enter the specified
channel. A password may be provided optionally, if it is required.
"""
if len(params) < 1:
return clean_string(self.join.__doc__)
password = ''
if len(params) > 1:
password = params[0]
self.bot.client.send('JOIN', params[0], password)
@command
@require_op
def part(self, server, channel, nick, params):
"""
Usage: part [#CHANNEL] - asks the bot to leave the current channel.
Optionally, a channel may be specified if it should be left instead of
the current one.
"""
if len(params) > 0:
channel = params[0]
self.bot.client.send('PART', channel)
@command
@require_master
def quit(self, server, channel, nick, params):
"""
Usage: quit - Tell the bot to disconnect from the server.
"""
self.bot.intended_disconnect = True
self.bot.exit()
|
from p1tr.helpers import clean_string
from p1tr.plugin import *
@meta_plugin
class Irc(Plugin):
"""Provides commands for basic IRC operations."""
@command
@require_master
def nick(self, server, channel, nick, params):
"""Usage: nick NEW_NICKNAME - changes the bot's nickname."""
if len(params) < 1:
return clean_string(self.nick.__doc__)
self.bot.client.send('NICK', params[0])
@command
@require_master
def join(self, server, channel, nick, params):
"""
Usage: join #CHANNEL [PASSWORD] - the bot will enter the specified
channel. A password may be provided optionally, if it is required.
"""
if len(params) < 1:
return clean_string(self.join.__doc__)
password = ''
if len(params) > 1:
password = params[0]
self.bot.client.send('JOIN', params[0], password)
@command
@require_op
def part(self, server, channel, nick, params):
"""
Usage: part [#CHANNEL] - asks the bot to leave the current channel.
Optionally, a channel may be specified if it should be left instead of
the current one.
"""
if len(params) > 0:
channel = params[0]
self.bot.client.send('PART', channel)
@command
@require_master
def quit(self, server, channel, nick, params):
self.blot.intended_disconnect = True
|
mit
|
Python
|
c831f6bee344b67171900ca7e50bf6fc85ea9345
|
Remove outdated qualifier in setup.py
|
groveco/django-sql-explorer,groveco/django-sql-explorer,groveco/django-sql-explorer,epantry/django-sql-explorer,groveco/django-sql-explorer,epantry/django-sql-explorer,epantry/django-sql-explorer
|
setup.py
|
setup.py
|
import os
from setuptools import setup
from explorer import __version__
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-sql-explorer",
version=__version__,
author="Chris Clark",
author_email="[email protected]",
description=("A pluggable app that allows users (admins) to execute SQL,"
" view, and export the results."),
license="MIT",
keywords="django sql explorer reports reporting csv database query",
url="https://github.com/groveco/django-sql-explorer",
packages=['explorer'],
long_description=read('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Topic :: Utilities',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
install_requires=[
'Django>=1.8.0',
'sqlparse>=0.1.18',
'unicodecsv>=0.14.1',
'six>=1.10.0',
],
include_package_data=True,
zip_safe=False,
)
|
import os
from setuptools import setup
from explorer import __version__
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-sql-explorer",
version=__version__,
author="Chris Clark",
author_email="[email protected]",
description=("A pluggable app that allows users (admins) to execute SQL,"
" view, and export the results."),
license="MIT",
keywords="django sql explorer reports reporting csv database query",
url="https://github.com/groveco/django-sql-explorer",
packages=['explorer'],
long_description=read('README.rst'),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Topic :: Utilities',
'Framework :: Django :: 1.7',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
install_requires=[
'Django>=1.8.0',
'sqlparse>=0.1.18',
'unicodecsv>=0.14.1',
'six>=1.10.0',
],
include_package_data=True,
zip_safe=False,
)
|
mit
|
Python
|
d8e0109e4c697f4a920ff4993c491eb5b0d38d55
|
Update pylint dependency to 1.9.1
|
onelogin/python-saml,onelogin/python-saml
|
setup.py
|
setup.py
|
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2018 OneLogin, Inc.
# MIT License
from setuptools import setup
setup(
name='python-saml',
version='2.4.1',
description='Onelogin Python Toolkit. Add SAML support to your Python software using this library',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
],
author='OneLogin',
author_email='[email protected]',
license='MIT',
url='https://github.com/onelogin/python-saml',
packages=['onelogin', 'onelogin/saml2'],
include_package_data=True,
package_data={
'onelogin/saml2/schemas': ['*.xsd'],
},
package_dir={
'': 'src',
},
test_suite='tests',
install_requires=[
'dm.xmlsec.binding==1.3.3',
'isodate>=0.5.0',
'defusedxml>=0.4.1',
],
extras_require={
'test': (
'coverage>=3.6',
'freezegun==0.3.5',
'pylint==1.9.1',
'pep8==1.5.7',
'pyflakes==0.8.1',
'coveralls==1.1',
),
},
keywords='saml saml2 xmlsec django flask',
)
|
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2018 OneLogin, Inc.
# MIT License
from setuptools import setup
setup(
name='python-saml',
version='2.4.1',
description='Onelogin Python Toolkit. Add SAML support to your Python software using this library',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
],
author='OneLogin',
author_email='[email protected]',
license='MIT',
url='https://github.com/onelogin/python-saml',
packages=['onelogin', 'onelogin/saml2'],
include_package_data=True,
package_data={
'onelogin/saml2/schemas': ['*.xsd'],
},
package_dir={
'': 'src',
},
test_suite='tests',
install_requires=[
'dm.xmlsec.binding==1.3.3',
'isodate>=0.5.0',
'defusedxml>=0.4.1',
],
extras_require={
'test': (
'coverage>=3.6',
'freezegun==0.3.5',
'pylint==1.3.1',
'pep8==1.5.7',
'pyflakes==0.8.1',
'coveralls==1.1',
),
},
keywords='saml saml2 xmlsec django flask',
)
|
mit
|
Python
|
c0566fabd434b2f9722ac37538fd74b4959fedbc
|
Add click as dependency
|
clb6/jarvis-cli
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from jarvis_cli import __version__
setup(
name = "jarvis-cli",
version = __version__,
packages = find_packages(),
author = "Michael Hwang",
author_email = "[email protected]",
description = ("Jarvis command-line tool"),
# Adopted the method of creating bins through setuptools
# http://click.pocoo.org/5/setuptools/#setuptools-integration
# The webpage lists benefits of doing this.
entry_points="""
[console_scripts]
jarvis=jarvis_cli.commands:cli
""",
install_requires=['requests', 'tabulate', 'dateparser<1.0.0', 'click<7.0'],
zip_safe = False
)
|
from setuptools import setup, find_packages
from jarvis_cli import __version__
setup(
name = "jarvis-cli",
version = __version__,
packages = find_packages(),
author = "Michael Hwang",
author_email = "[email protected]",
description = ("Jarvis command-line tool"),
# Adopted the method of creating bins through setuptools
# http://click.pocoo.org/5/setuptools/#setuptools-integration
# The webpage lists benefits of doing this.
entry_points="""
[console_scripts]
jarvis=jarvis_cli.commands:cli
""",
install_requires=['requests', 'tabulate', 'dateparser<1.0.0'],
zip_safe = False
)
|
apache-2.0
|
Python
|
cf16c64e378f64d2267f75444c568aed895f940c
|
Add csblog to installed scripts.
|
mhils/countershape,samtaufa/countershape,cortesi/countershape,cortesi/countershape,samtaufa/countershape,mhils/countershape
|
setup.py
|
setup.py
|
import platform, sys
from distutils.core import setup
from distextend import *
packages, package_data = findPackages("countershape")
setup(
name = "countershape",
version = "0.1",
description = "A framework for rendering static documentation.",
author = "Nullcube Pty Ltd",
author_email = "[email protected]",
url = "http://dev.nullcube.com",
packages = packages,
package_data = package_data,
scripts = ["cshape", "csblog"],
)
|
import platform, sys
from distutils.core import setup
from distextend import *
packages, package_data = findPackages("countershape")
setup(
name = "countershape",
version = "0.1",
description = "A framework for rendering static documentation.",
author = "Nullcube Pty Ltd",
author_email = "[email protected]",
url = "http://dev.nullcube.com",
packages = packages,
package_data = package_data,
scripts = ["cshape"],
)
|
mit
|
Python
|
496abc7854985c6f1bfd8463330f2f07a0f3048c
|
remove unused dependency libcst (#39)
|
googleapis/python-bigquery-migration,googleapis/python-bigquery-migration
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
# 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
#
# 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 io
import os
import setuptools # type: ignore
version = "0.2.1"
package_root = os.path.abspath(os.path.dirname(__file__))
readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
readme = readme_file.read()
setuptools.setup(
name="google-cloud-bigquery-migration",
version=version,
long_description=readme,
author="Google LLC",
author_email="[email protected]",
license="Apache 2.0",
url="https://github.com/googleapis/python-bigquery-migration",
packages=setuptools.PEP420PackageFinder.find(),
namespace_packages=("google", "google.cloud"),
platforms="Posix; MacOS X; Windows",
include_package_data=True,
install_requires=(
"google-api-core[grpc] >= 1.28.0, < 3.0.0dev",
"proto-plus >= 1.15.0",
),
python_requires=">=3.6",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
],
zip_safe=False,
)
|
# -*- coding: utf-8 -*-
# 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
#
# 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 io
import os
import setuptools # type: ignore
version = "0.2.1"
package_root = os.path.abspath(os.path.dirname(__file__))
readme_filename = os.path.join(package_root, "README.rst")
with io.open(readme_filename, encoding="utf-8") as readme_file:
readme = readme_file.read()
setuptools.setup(
name="google-cloud-bigquery-migration",
version=version,
long_description=readme,
author="Google LLC",
author_email="[email protected]",
license="Apache 2.0",
url="https://github.com/googleapis/python-bigquery-migration",
packages=setuptools.PEP420PackageFinder.find(),
namespace_packages=("google", "google.cloud"),
platforms="Posix; MacOS X; Windows",
include_package_data=True,
install_requires=(
"google-api-core[grpc] >= 1.28.0, < 3.0.0dev",
"libcst >= 0.2.5",
"proto-plus >= 1.15.0",
),
python_requires=">=3.6",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
],
zip_safe=False,
)
|
apache-2.0
|
Python
|
a339b96b33fd7f2ef8e2d18c64e997173309a459
|
Prepare for more development.
|
khardix/udiskie,coldfix/udiskie,pstray/udiskie,coldfix/udiskie,pstray/udiskie,mathstuf/udiskie
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='udiskie',
version='0.2.1',
description='Removable disk automounter for udisks',
author='Byron Clark',
author_email='[email protected]',
url='http://bitbucket.org/byronclark/udiskie',
packages=[
'udiskie',
],
scripts=[
'bin/udiskie',
'bin/udiskie-umount',
],
)
|
from distutils.core import setup
setup(
name='udiskie',
version='0.2.0',
description='Removable disk automounter for udisks',
author='Byron Clark',
author_email='[email protected]',
url='http://bitbucket.org/byronclark/udiskie',
packages=[
'udiskie',
],
scripts=[
'bin/udiskie',
'bin/udiskie-umount',
],
)
|
mit
|
Python
|
118c079b2065f1b624f2ed54722483f1dca46eac
|
fix typo in setup.py
|
McLeopold/PythonHtmlr
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='htmlr',
version='0.1.0',
author='Scott Hamilton',
author_email='[email protected]',
packages=['htmlr',
'htmlr.testsuite'
],
url='http://github.com/McLeopold/PythonHtmlr/',
license="BSD",
description='DSL to generate HTML with Python',
long_description=open('README.rst').read(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Topic :: Internet',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
from distutils.core import setup
setup(
name='htmlr',
version='0.1.0',
author='Scott Hamilton',
author_email='[email protected]',
packages=['htmlr',
'skills.testsuite'
],
url='http://github.com/McLeopold/PythonHtmlr/',
license="BSD",
description='DSL to generate HTML with Python',
long_description=open('README.rst').read(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Topic :: Internet',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
bsd-2-clause
|
Python
|
6bd7a61272ca5fe3d916488e24a1dab5e022f61b
|
Fix installing PIP issues
|
nprapps/HypChat,RidersDiscountCom/HypChat,nprapps/HypChat,dougkeen/HypChat,dougkeen/HypChat
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from distutils.core import setup
def read_file(name):
"""
Read file content
"""
f = open(name)
try:
return f.read()
except IOError:
print("could not read %r" % name)
f.close()
setup(name='hypchat',
version='0.4',
description="Package for HipChat's v2 API",
long_description=read_file('README.rst'),
author='James Bliss',
author_email='[email protected]',
url='https://github.com/RidersDiscountCom/HypChat',
packages=['hypchat'],
requires=['requests', 'dateutil'],
provides=['hypchat'],
classifiers=[ # https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2 :: Only',
'Topic :: Communications :: Chat',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
|
#!/usr/bin/env python
from distutils.core import setup
setup(name='hypchat',
version='0.4',
description="Package for HipChat's v2 API",
long_description=open('README.rst').read(),
author='James Bliss',
author_email='[email protected]',
url='https://github.com/RidersDiscountCom/HypChat',
packages=['hypchat'],
requires=['requests', 'dateutil'],
provides=['hypchat'],
classifiers=[ # https://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2 :: Only',
'Topic :: Communications :: Chat',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
|
mit
|
Python
|
91746b5a3352ffc56baf770d6b35f0130b2e4128
|
update version
|
qurit/rt-utils
|
setup.py
|
setup.py
|
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
with open('requirements.txt') as f:
required = f.read().splitlines()
version = '0.0.3'
setuptools.setup(
name="rt-utils",
version=version,
author="Asim Shrestha",
author_email="[email protected]",
description="A small library for handling masks and RT-Structs",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/qurit/rtutils",
packages=setuptools.find_packages(),
keywords=["RTStruct", "Dicom", "Pydicom"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
install_requires=required,
)
|
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
with open('requirements.txt') as f:
required = f.read().splitlines()
version = '0.0.2'
setuptools.setup(
name="rt-utils",
version=version,
author="Asim Shrestha",
author_email="[email protected]",
description="A small library for handling masks and RT-Structs",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/qurit/rtutils",
packages=setuptools.find_packages(),
keywords=["RTStruct", "Dicom", "Pydicom"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
install_requires=required,
)
|
mit
|
Python
|
c754e7fd020ff3bdada2e724087c82ce72ee061b
|
Bump version to 0.2.19
|
rbauction/sfdclib
|
setup.py
|
setup.py
|
"""sfdclib package setup"""
import textwrap
from setuptools import setup
setup(
name='sfdclib',
version='0.2.19',
author='Andrey Shevtsov',
author_email='[email protected]',
packages=['sfdclib'],
url='https://github.com/rbauction/sfdclib',
license='MIT',
description=("SFDClib is a Salesforce.com Metadata API and Tooling "
"API client built for Python 2.7, 3.3 and 3.4."),
long_description=textwrap.dedent(open('README.rst', 'r').read()),
package_data={'': ['LICENSE']},
package_dir={'sfdclib': 'sfdclib'},
install_requires=[
'requests[security]'
],
keywords="python salesforce salesforce.com metadata tooling api",
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4'
]
)
|
"""sfdclib package setup"""
import textwrap
from setuptools import setup
setup(
name='sfdclib',
version='0.2.18',
author='Andrey Shevtsov',
author_email='[email protected]',
packages=['sfdclib'],
url='https://github.com/rbauction/sfdclib',
license='MIT',
description=("SFDClib is a Salesforce.com Metadata API and Tooling "
"API client built for Python 2.7, 3.3 and 3.4."),
long_description=textwrap.dedent(open('README.rst', 'r').read()),
package_data={'': ['LICENSE']},
package_dir={'sfdclib': 'sfdclib'},
install_requires=[
'requests[security]'
],
keywords="python salesforce salesforce.com metadata tooling api",
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Internet :: WWW/HTTP',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4'
]
)
|
mit
|
Python
|
ec070a097ead0370cf7b1ac9c21e6c4a68f9477c
|
Send file before changes
|
edne/pineal
|
bin/py/watch.py
|
bin/py/watch.py
|
#!/usr/bin/env python
from __future__ import print_function
import os
from sys import argv
from time import sleep
import logging
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import liblo
logger = logging.getLogger("watcher.py")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())
def watch_file(file_name, action, *args, **kwargs):
"Return a watchdog observer, it will call the action callback"
def on_modified(event):
"File-changed event"
if not os.path.exists(event.src_path):
return
logger.info("Changed %s" % event.src_path)
if os.path.samefile(event.src_path, file_name):
action(*args, **kwargs)
logger.info("Started watcher")
handler = FileSystemEventHandler()
handler.on_modified = on_modified
observer = Observer()
base_path = os.path.split(file_name)[0]
if not base_path:
base_path = "."
observer.schedule(handler, path=base_path)
observer.start()
return observer
def check_address(addr):
"If only port is specified send to localhost"
splitted = str(addr).split(":")
if splitted[1:]:
return addr
else:
return ":".join(["localhost", splitted[0]])
def send(addr, path, *msg):
"""address path message
Send message on a given path"""
addr = check_address(addr)
target = liblo.Address("osc.udp://" + addr + "/")
liblo.send(target, path, *msg)
def main():
"Main function"
if len(argv) != 4:
print("Watch a file for changes and send it via OSC")
print("Usage:", argv[0], "file_to_watch [ip:]port /path")
return
file_name, addr, path = argv[1:]
def callback():
with open(file_name) as f:
logger.info("Sending content")
send(addr, path, f.read())
watcher = watch_file(file_name, callback)
callback()
try:
while True:
sleep(0.1)
except KeyboardInterrupt:
watcher.stop()
watcher.join()
if __name__ == "__main__":
main()
|
#!/usr/bin/env python
from __future__ import print_function
import os
from sys import argv
from time import sleep
import logging
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import liblo
logger = logging.getLogger("watcher.py")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())
def watch_file(file_name, action, *args, **kwargs):
"Return a watchdog observer, it will call the action callback"
def on_modified(event):
"File-changed event"
if not os.path.exists(event.src_path):
return
logger.info("Changed %s" % event.src_path)
if os.path.samefile(event.src_path, file_name):
action(*args, **kwargs)
logger.info("Started watcher")
handler = FileSystemEventHandler()
handler.on_modified = on_modified
observer = Observer()
base_path = os.path.split(file_name)[0]
if not base_path:
base_path = "."
observer.schedule(handler, path=base_path)
observer.start()
return observer
def check_address(addr):
"If only port is specified send to localhost"
splitted = str(addr).split(":")
if splitted[1:]:
return addr
else:
return ":".join(["localhost", splitted[0]])
def send(addr, path, *msg):
"""address path message
Send message on a given path"""
addr = check_address(addr)
target = liblo.Address("osc.udp://" + addr + "/")
liblo.send(target, path, *msg)
def main():
"Main function"
if len(argv) != 4:
print("Watch a file for changes and send it via OSC")
print("Usage:", argv[0], "file_to_watch [ip:]port /path")
return
file_name, addr, path = argv[1:]
def callback():
with open(file_name) as f:
logger.info("Sending content")
send(addr, path, f.read())
watcher = watch_file(file_name, callback)
try:
while True:
sleep(0.1)
except KeyboardInterrupt:
watcher.stop()
watcher.join()
if __name__ == "__main__":
main()
|
agpl-3.0
|
Python
|
633110a0967f75f590bc24dd9d5d3400cb9efb0a
|
Remove unused classmethod from setup.py
|
vamem9z-Moses/quintet
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
# long option, short option, description
user_options = [
('flakes', None, 'Use pyflakes'),
('coverage', 'C', 'Show coverage statistics'),
('jenkins', None, 'Test setup for jenkins'),
]
def initialize_options(self):
TestCommand.initialize_options(self)
self.flakes = False
self.coverage = False
self.jenkins = False
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ["quintet/tests"]
if self.flakes:
self.test_args.append('--flakes')
if self.coverage:
self.test_args += [ '--cov', 'quintet', '--cov-report', 'term-missing']
if self.jenkins:
self.test_args += [ '--cov', 'quintet', '--cov-report', 'xml']
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(name='Quintet',
version='0.1',
description='Quintet Framework',
author='Moses E. Miles III',
author_email='[email protected]',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
license = 'MIT',
classifiers=[
"Development Status :: 2 - Pre-Alpha",
],
install_requires=['docker-py==0.2.3'],
tests_require=['pytest==2.5.2',
'pytest-flakes',
'pytest-cov==1.6'],
cmdclass = {'test':PyTest},
)
|
#!/usr/bin/env python
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
# long option, short option, description
user_options = [
('flakes', None, 'Use pyflakes'),
('coverage', 'C', 'Show coverage statistics'),
('jenkins', None, 'Test setup for jenkins'),
]
@classmethod
def add_project_specific_options(self):
"""
Function for subclasses to add additional test args eg. location of tests
These options are likely to be specific to the project and are therefore not added to user_options above
"""
pass
def initialize_options(self):
TestCommand.initialize_options(self)
self.flakes = False
self.coverage = False
self.jenkins = False
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ["quintet/tests"]
if self.flakes:
self.test_args.append('--flakes')
if self.coverage:
self.test_args += [ '--cov', 'quintet', '--cov-report', 'term-missing']
if self.jenkins:
self.test_args += [ '--cov', 'quintet', '--cov-report', 'xml']
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(name='Quintet',
version='0.1',
description='Quintet Framework',
author='Moses E. Miles III',
author_email='[email protected]',
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
license = 'MIT',
classifiers=[
"Development Status :: 2 - Pre-Alpha",
],
install_requires=['docker-py==0.2.3'],
tests_require=['pytest==2.5.2',
'pytest-flakes',
'pytest-cov==1.6'],
cmdclass = {'test':PyTest},
)
|
mit
|
Python
|
effe6edab431c133aed40c72698f6a1b976b6a67
|
add dependencies to setup.py
|
ckan/ckanext-qa,ckan/ckanext-qa,ckan/ckanext-qa
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
from ckanext.qa import __version__
setup(
name='ckanext-qa',
version=__version__,
description="Quality Assurance plugin for CKAN",
long_description="""
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='Open Knowledge Foundation',
author_email='[email protected]',
url='http://ckan.org/wiki/Extensions',
license='mit',
packages=find_packages(exclude=['tests']),
namespace_packages=['ckanext', 'ckanext.qa'],
include_package_data=True,
zip_safe=False,
install_requires=[
'celery>=2.3.3',
'kombu-sqlalchemy>=1.1.0',
'SQLAlchemy>=0.6.6',
'requests==0.6.4',
],
tests_require=[
'nose',
'mock',
],
entry_points=\
"""
[paste.paster_command]
qa=ckanext.qa.commands:QACommand
[ckan.plugins]
qa=ckanext.qa.plugin:QAPlugin
""",
)
|
from setuptools import setup, find_packages
from ckanext.qa import __version__
setup(
name='ckanext-qa',
version=__version__,
description="Quality Assurance plugin for CKAN",
long_description="""
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='Open Knowledge Foundation',
author_email='[email protected]',
url='http://ckan.org/wiki/Extensions',
license='mit',
packages=find_packages(exclude=['tests']),
namespace_packages=['ckanext', 'ckanext.qa'],
include_package_data=True,
zip_safe=False,
install_requires=[
#
],
tests_require=[
'nose',
'mock',
],
entry_points=\
"""
[paste.paster_command]
qa=ckanext.qa.commands:QACommand
[ckan.plugins]
qa=ckanext.qa.plugin:QAPlugin
""",
)
|
mit
|
Python
|
6076ceb869a604eb460a19b11b8c17043f21362f
|
bump version to 0.11.2
|
jamtwister/vncdotool,sibson/vncdotool
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup
README = open('README.rst', 'rt').read()
setup(
name='vncdotool',
version='0.11.2',
description='Command line VNC client',
install_requires=[
'Twisted',
"Pillow",
],
tests_require=[
'nose',
'pexpect',
],
url='http://github.com/sibson/vncdotool',
author='Marc Sibson',
author_email='[email protected]',
download_url='',
entry_points={
"console_scripts": [
'vncdo=vncdotool.command:vncdo',
'vncdotool=vncdotool.command:vncdo',
'vnclog=vncdotool.command:vnclog',
],
},
packages=['vncdotool'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Framework :: Twisted',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Multimedia :: Graphics :: Viewers',
'Topic :: Software Development :: Testing',
],
long_description=open('README.rst').read(),
)
|
#!/usr/bin/env python
from setuptools import setup
README = open('README.rst', 'rt').read()
setup(
name='vncdotool',
version='0.11.1',
description='Command line VNC client',
install_requires=[
'Twisted',
"Pillow",
],
tests_require=[
'nose',
'pexpect',
],
url='http://github.com/sibson/vncdotool',
author='Marc Sibson',
author_email='[email protected]',
download_url='',
entry_points={
"console_scripts": [
'vncdo=vncdotool.command:vncdo',
'vncdotool=vncdotool.command:vncdo',
'vnclog=vncdotool.command:vnclog',
],
},
packages=['vncdotool'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Framework :: Twisted',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Multimedia :: Graphics :: Viewers',
'Topic :: Software Development :: Testing',
],
long_description=open('README.rst').read(),
)
|
mit
|
Python
|
921ef5f43e8f6f0c3274ca3ed48b856c50b0ead9
|
Fix build with Python 3
|
nschloe/voropy
|
setup.py
|
setup.py
|
# -*- coding: utf-8 -*-
#
from setuptools import setup, find_packages
import os
import codecs
# https://packaging.python.org/single_source_version/
base_dir = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(base_dir, 'voropy', '__about__.py'), 'rb') as f:
exec(f.read(), about)
def read(fname):
try:
content = codecs.open(
os.path.join(os.path.dirname(__file__), fname),
encoding='utf-8'
).read()
except Exception:
content = ''
return content
setup(
name='voropy',
version=about['__version__'],
author=about['__author__'],
author_email=about['__author_email__'],
packages=find_packages(),
description=(
'Voronoi regions and more for triangular and tetrehedral meshes'
),
long_description=read('README.rst'),
url='https://github.com/nschloe/voropy',
download_url='https://github.com/nschloe/voropy/releases',
license=about['__license__'],
platforms='any',
install_requires=[
'matplotlib',
'meshio',
'meshzoo', # only required by tests
'numpy >= 1.9', # unique return_counts
'scipy',
],
classifiers=[
about['__status__'],
about['__license__'],
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Mathematics'
],
scripts=[
'tools/mesh_smoothing'
]
)
|
# -*- coding: utf-8 -*-
#
from setuptools import setup, find_packages
import os
import codecs
# https://packaging.python.org/single_source_version/
base_dir = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(base_dir, 'voropy', '__about__.py')) as f:
exec(f.read(), about)
def read(fname):
try:
content = codecs.open(
os.path.join(os.path.dirname(__file__), fname),
encoding='utf-8'
).read()
except Exception:
content = ''
return content
setup(
name='voropy',
version=about['__version__'],
author=about['__author__'],
author_email=about['__author_email__'],
packages=find_packages(),
description=(
'Voronoi regions and more for triangular and tetrehedral meshes'
),
long_description=read('README.rst'),
url='https://github.com/nschloe/voropy',
download_url='https://github.com/nschloe/voropy/releases',
license=about['__license__'],
platforms='any',
install_requires=[
'matplotlib',
'meshio',
'meshzoo', # only required by tests
'numpy >= 1.9', # unique return_counts
'scipy',
],
classifiers=[
about['__status__'],
about['__license__'],
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Mathematics'
],
scripts=[
'tools/mesh_smoothing'
]
)
|
mit
|
Python
|
1de80ec1d74c2cf074d8f90a9c7da3c6e0380b05
|
Fix setup.py (really)
|
lorien/grab,lorien/grab
|
setup.py
|
setup.py
|
import os
from setuptools import setup
ROOT = os.path.dirname(os.path.realpath(__file__))
with open("README.md", encoding="utf-8") as inp:
README_CONTENT = inp.read()
setup(
# Meta data
name="grab",
version="0.6.41",
author="Gregory Petukhov",
author_email="[email protected]",
maintainer="Gregory Petukhov",
maintainer_email="[email protected]",
url="http://grablib.org",
description="Web Scraping Framework",
long_description=README_CONTENT,
long_description_content_type="text/markdown",
download_url="https://pypi.python.org/pypi/grab",
keywords="network parsing grabbing scraping lxml xpath data mining",
license="MIT License",
# Package files
packages=[
"grab",
"grab.spider",
"grab.spider.queue_backend",
"grab.spider.service",
"grab.util",
],
include_package_data=True,
# Dependencies
install_requires=[
"weblib>=0.1.28",
"six",
"user_agent",
"selection",
"lxml",
"defusedxml",
],
extras_require={
"full": ["urllib3", "certifi"],
},
# Topics
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
],
)
|
import os
from setuptools import setup
ROOT = os.path.dirname(os.path.realpath(__file__))
with open("README.md", encoding="utf-8") as inp:
README_CONTENT = inp.read()
setup(
# Meta data
name="grab",
version="0.6.41",
author="Gregory Petukhov",
author_email="[email protected]",
maintainer="Gregory Petukhov",
maintainer_email="[email protected]",
url="http://grablib.org",
description="Web Scraping Framework",
long_description=README_CONTENT,
long_description_content_type="text/markdown",
download_url="https://pypi.python.org/pypi/grab",
keywords="network parsing grabbing scraping lxml xpath data mining",
license="MIT License",
# Package files
packages=[
"grab",
"grab.spider",
"grab.spider.queue_backend",
"grab.service",
"grab.util",
],
include_package_data=True,
# Dependencies
install_requires=[
"weblib>=0.1.28",
"six",
"user_agent",
"selection",
"lxml",
"defusedxml",
],
extras_require={
"full": ["urllib3", "certifi"],
},
# Topics
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
],
)
|
mit
|
Python
|
c9a21b84a4fd719fc0cf50cf96e642d7c494ea5d
|
use setup from distribution.py
|
freevo/kaa-base,freevo/kaa-base
|
setup.py
|
setup.py
|
# -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# setup.py - Setup script for kaa.base
# -----------------------------------------------------------------------------
# $Id$
#
# -----------------------------------------------------------------------------
# Copyright (C) 2005, 2006 Dirk Meyer, Jason Tackaberry
#
# First Edition: Dirk Meyer <[email protected]>
# Maintainer: Dirk Meyer <[email protected]>
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version
# 2.1 as published by the Free Software Foundation.
#
# 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# -----------------------------------------------------------------------------
# python imports
import sys
# We have some extensions but kaa.distribution isn't installed yet. So import
# it directly from the source tree. First add src/ to the modules patch ...
sys.path.insert(0, "src")
# ... and now import it.
from distribution import Extension, setup
ext = Extension('kaa.shmmodule', ['src/extensions/shmmodule.c'])
extensions = [ ext ]
objectrow = Extension('kaa._objectrow', ['src/extensions/objectrow.c'])
if objectrow.check_library("glib-2.0", "2.4.0"):
extensions.append(objectrow)
else:
print "glib >= 2.4.0 not found; kaa.db will be unavailable"
inotify_ext = Extension("kaa.inotify._inotify",
["src/extensions/inotify/inotify.c"],
config='src/extensions/inotify/config.h')
if not inotify_ext.check_cc(["<sys/inotify.h>"], "inotify_init();"):
if not inotify_ext.check_cc(["<sys/syscall.h>"], "syscall(0);"):
print "inotify not enabled: doesn't look like a Linux system."
else:
print "inotify not supported in glibc; using built-in support instead."
inotify_ext.config("#define USE_FALLBACK")
extensions.append(inotify_ext)
else:
print "inotify supported by glibc; good."
extensions.append(inotify_ext)
# call setup
setup(
module = 'base',
version = '0.1',
ext_modules = extensions)
|
# -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# setup.py - Setup script for kaa.base
# -----------------------------------------------------------------------------
# $Id$
#
# -----------------------------------------------------------------------------
# Copyright (C) 2005, 2006 Dirk Meyer, Jason Tackaberry
#
# First Edition: Dirk Meyer <[email protected]>
# Maintainer: Dirk Meyer <[email protected]>
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version
# 2.1 as published by the Free Software Foundation.
#
# 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# -----------------------------------------------------------------------------
# python imports
from distutils.core import setup
import sys
# We have some extensions but kaa.distribution isn't installed yet. So import
# it directly from the source tree. First add src/ to the modules patch ...
sys.path.insert(0, "src")
# ... and now import it.
from distribution import Extension
ext = Extension('kaa.shmmodule', ['src/extensions/shmmodule.c']).convert()
extensions = [ ext ]
objectrow = Extension('kaa._objectrow', ['src/extensions/objectrow.c'])
if objectrow.check_library("glib-2.0", "2.4.0"):
extensions.append(objectrow.convert())
else:
print "glib >= 2.4.0 not found; kaa.db will be unavailable"
inotify_ext = Extension("kaa.inotify._inotify",
["src/extensions/inotify/inotify.c"],
config='src/extensions/inotify/config.h')
if not inotify_ext.check_cc(["<sys/inotify.h>"], "inotify_init();"):
if not inotify_ext.check_cc(["<sys/syscall.h>"], "syscall(0);"):
print "inotify not enabled: doesn't look like a Linux system."
else:
print "inotify not supported in glibc; using built-in support instead."
inotify_ext.config("#define USE_FALLBACK")
extensions.append(inotify_ext.convert())
else:
print "inotify supported by glibc; good."
extensions.append(inotify_ext.convert())
# call setup
setup(
name = 'kaa-base',
version = '0.1',
maintainer = 'The Freevo Project',
maintainer_email = '[email protected]',
url = 'http://www.freevo.org/kaa',
package_dir = { 'kaa': 'src',
'kaa.notifier': 'src/notifier',
'kaa.notifier.pynotifier': 'src/notifier/pynotifier',
'kaa.input': 'src/input',
'kaa.inotify': 'src/extensions/inotify' },
packages = [ 'kaa', 'kaa.notifier', 'kaa.notifier.pynotifier',
'kaa.input', 'kaa.inotify' ],
ext_modules = extensions)
|
lgpl-2.1
|
Python
|
b1742f04c0d3c39e5fa7faa2606f46561a82fad7
|
Add requirements to setup.py
|
Spferical/visram
|
setup.py
|
setup.py
|
#!/usr/bin/env python2
from distutils.core import setup
setup(name='visram',
version='0.1.0',
description='Graphical RAM/CPU Visualizer',
license='MIT',
author='Matthew Pfeiffer',
author_email='[email protected]',
url='http://github.com/Spferical/visram',
packages=['visram', 'visram.test'],
install_requires=['wxPython', 'matplotlib', 'psutil'],
scripts=['bin/visram'],
platforms=['any'],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: X11 Applications',
'Environment :: MacOS X :: Cocoa',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python :: 2 :: Only',
'Topic :: System :: Monitoring',
],
)
|
#!/usr/bin/env python2
from distutils.core import setup
setup(name='visram',
version='0.1.0',
description='Graphical RAM/CPU Visualizer',
license='MIT',
author='Matthew Pfeiffer',
author_email='[email protected]',
url='http://github.com/Spferical/visram',
packages=['visram', 'visram.test'],
scripts=['bin/visram'],
platforms=['any'],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: X11 Applications',
'Environment :: MacOS X :: Cocoa',
'Environment :: Win32 (MS Windows)',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python :: 2 :: Only',
'Topic :: System :: Monitoring',
],
)
|
mit
|
Python
|
9c5b61c7ac246db59436e0faf667e20d945244e9
|
Update Development Status
|
harikvpy/crud,harikvpy/crud,harikvpy/crud
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
with open('README.md') as readme_file:
readme = readme_file.read()
setup(
name='singleurlcrud',
description='Django CRUD, implemented using a single view and consequently a single URL.',
long_description=readme,
version='0.13',
author='Hari Mahadevan',
author_email='[email protected]',
url='https://www.github.com/harikvpy/crud/tarball/0.13',
packages=find_packages(),
include_package_data=True,
install_requires=['django-pure-pagination', 'django-bootstrap3'],
license='BSD-3',
keywords=['django', 'crud'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
],
)
|
from setuptools import setup, find_packages
with open('README.md') as readme_file:
readme = readme_file.read()
setup(
name='singleurlcrud',
description='Django CRUD, implemented using a single view and consequently a single URL.',
long_description=readme,
version='0.13',
author='Hari Mahadevan',
author_email='[email protected]',
url='https://www.github.com/harikvpy/crud/tarball/0.13',
packages=find_packages(),
include_package_data=True,
install_requires=['django-pure-pagination', 'django-bootstrap3'],
license='BSD-3',
keywords=['django', 'crud'],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
],
)
|
bsd-3-clause
|
Python
|
b96a5f4bb4c61a272dfd9d7a090b10245535ebbe
|
Fix find_packages() for python3
|
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
|
setup.py
|
setup.py
|
from setuptools import find_packages, setup
setup(
name = 'garage',
description = 'My personal python modules',
license = 'MIT',
packages = find_packages(),
install_requires = [
'lxml',
'requests',
'startup',
],
)
|
from setuptools import find_packages, setup
setup(
name = 'garage',
description = 'My personal python modules',
license = 'MIT',
packages = find_packages(include=['garage', 'garage.*']),
install_requires = [
'lxml',
'requests',
'startup',
],
)
|
mit
|
Python
|
646adedf91ed4b939f95418e5d362f6ad0906d7d
|
Add setup_requires
|
spoqa/nirum-python,spoqa/nirum-python
|
setup.py
|
setup.py
|
import ast
import sys
from setuptools import find_packages, setup
def readme():
try:
with open('README.rst') as f:
return f.read()
except (IOError, OSError):
return
def get_version():
filename = 'nirum/__init__.py'
version = None
with open(filename, 'r') as f:
tree = ast.parse(f.read(), filename)
for node in tree.body:
if (isinstance(node, ast.Assign) and
node.targets[0].id == '__version_info__'):
version = ast.literal_eval(node.value)
return '.'.join([str(x) for x in version])
setup_requires = ['setuptools >= 17.1']
service_requires = [
# FIXME Test Werkzeug 0.9, 0.10, 0.11 as well
'Werkzeug >= 0.11, < 0.12',
]
install_requires = [
'iso8601',
] + service_requires
tests_require = [
'pytest >= 2.9.0',
'import-order',
'flake8',
]
docs_require = [
'Sphinx',
]
below35_requires = [
'typing',
]
if 'bdist_wheel' not in sys.argv and sys.version_info < (3, 5):
install_requires.extend(below35_requires)
setup(
name='nirum',
version=get_version(),
description='',
long_description=readme(),
url='https://github.com/spoqa/nirum-python',
author='Kang Hyojun',
author_email='iam.kanghyojun' '@' 'gmail.com',
license='MIT license',
packages=find_packages(exclude=['tests']),
install_requires=install_requires,
setup_requires=setup_requires,
extras_require={
":python_version<'3.5'": below35_requires,
'service': service_requires,
'tests': tests_require,
'docs': docs_require,
},
classifiers=[]
)
|
import ast
import sys
from setuptools import find_packages, setup
def readme():
try:
with open('README.rst') as f:
return f.read()
except (IOError, OSError):
return
def get_version():
filename = 'nirum/__init__.py'
version = None
with open(filename, 'r') as f:
tree = ast.parse(f.read(), filename)
for node in tree.body:
if (isinstance(node, ast.Assign) and
node.targets[0].id == '__version_info__'):
version = ast.literal_eval(node.value)
return '.'.join([str(x) for x in version])
service_requires = [
# FIXME Test Werkzeug 0.9, 0.10, 0.11 as well
'Werkzeug >= 0.11, < 0.12',
]
install_requires = [
'setuptools >= 25.2.0',
'iso8601',
] + service_requires
tests_require = [
'pytest >= 2.9.0',
'import-order',
'flake8',
]
docs_require = [
'Sphinx',
]
below35_requires = [
'typing',
]
if 'bdist_wheel' not in sys.argv and sys.version_info < (3, 5):
install_requires.extend(below35_requires)
setup(
name='nirum',
version=get_version(),
description='',
long_description=readme(),
url='https://github.com/spoqa/nirum-python',
author='Kang Hyojun',
author_email='iam.kanghyojun' '@' 'gmail.com',
license='MIT license',
packages=find_packages(exclude=['tests']),
install_requires=install_requires,
extras_require={
":python_version<'3.5'": below35_requires,
'service': service_requires,
'tests': tests_require,
'docs': docs_require,
},
classifiers=[]
)
|
mit
|
Python
|
12695de726b1d1c81257a50ec8e3896ee4c9a737
|
bump version; bump requests
|
azweb76/x-cloud
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name="xcloud",
version="0.0.4",
install_requires=[
'PyYaml',
'jinja2',
'glob2',
'python-keystoneclient==3.10.0',
'python-neutronclient==6.2.0',
'python-novaclient==7.1.0',
'requests>=2.19.1',
'babel==2.3.4'
],
author="Dan Clayton",
author_email="[email protected]",
description="Used to provision servers in openstack.",
license="MIT",
keywords="cloud openstack",
url="https://github.com/azweb76/x-cloud",
packages=find_packages(exclude=('tests', 'docs')),
entry_points={
'console_scripts': [
'xcloud=xcloud.cli:main',
],
},
)
|
from setuptools import setup, find_packages
setup(
name="xcloud",
version="0.0.3",
install_requires=[
'PyYaml',
'jinja2',
'glob2',
'python-keystoneclient==3.10.0',
'python-neutronclient==6.2.0',
'python-novaclient==7.1.0',
'requests==2.14.2',
'babel==2.3.4'
],
author="Dan Clayton",
author_email="[email protected]",
description="Used to provision servers in openstack.",
license="MIT",
keywords="cloud openstack",
url="https://github.com/azweb76/x-cloud",
packages=find_packages(exclude=('tests', 'docs')),
entry_points={
'console_scripts': [
'xcloud=xcloud.cli:main',
],
},
)
|
mit
|
Python
|
e165a146805e01fbe4a9f91686c27939bb6abdf0
|
update dependency
|
biothings/biothings_explorer,biothings/biothings_explorer
|
setup.py
|
setup.py
|
from setuptools import setup
install_requires = [
'jsonschema>=3.0.1',
'networkx>=2.3',
'jsonpath-rw>=1.4.0',
'requests>=2.21.0',
'graphviz>=0.11.1',
'aiohttp>=3.5.4'
]
setup(
name="biothings_explorer",
version="0.0.1",
author="Jiwen Xin, Chunlei Wu",
author_email="[email protected]",
description="Python Client for BioThings Explorer",
license="BSD",
keywords="schema biothings",
url="https://github.com/biothings/biothings_explorer",
packages=['biothings_explorer'],
classifiers=[
"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 :: 3.7",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Topic :: Utilities",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
install_requires=install_requires,
)
|
from setuptools import setup
install_requires = [
'jsonschema>=3.0.1',
'networkx>=2.3',
'jsonpath-rw>=1.4.0',
'requests>=2.21.0',
'grequests>=0.4.0',
'graphviz>=0.11.1'
]
setup(
name="biothings_explorer",
version="0.0.1",
author="Jiwen Xin, Chunlei Wu",
author_email="[email protected]",
description="Python Client for BioThings Explorer",
license="BSD",
keywords="schema biothings",
url="https://github.com/biothings/biothings_explorer",
packages=['biothings_explorer'],
classifiers=[
"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 :: 3.7",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Topic :: Utilities",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
install_requires=install_requires,
)
|
apache-2.0
|
Python
|
7a840f58ee083aa5e23ac324beace4b4ad2335ca
|
bump to v30.0.1 so we can use semver on pypi
|
inorton/junit2html
|
setup.py
|
setup.py
|
import os
from setuptools import setup
files = ["*.css",
os.path.join("templates", "*.html")]
setup(
name="junit2html",
version="30.0.1",
description="Generate HTML reports from Junit results",
author="Ian Norton",
author_email="[email protected]",
url="https://gitlab.com/inorton/junit2html",
install_requires=["jinja2>=2.11.2"],
packages=["junit2htmlreport"],
package_data={"junit2htmlreport": files},
entry_points={'console_scripts': ['junit2html=junit2htmlreport.runner:start']},
platforms=["any"],
license="License :: OSI Approved :: MIT License",
long_description="Genearate a single file HTML report from a Junit or XUnit XML results file"
)
|
import os
from setuptools import setup
files = ["*.css",
os.path.join("templates", "*.html")]
setup(
name="junit2html",
version="2.0.1",
description="Generate HTML reports from Junit results",
author="Ian Norton",
author_email="[email protected]",
url="https://gitlab.com/inorton/junit2html",
install_requires=["jinja2>=2.11.2"],
packages=["junit2htmlreport"],
package_data={"junit2htmlreport": files},
entry_points={'console_scripts': ['junit2html=junit2htmlreport.runner:start']},
platforms=["any"],
license="License :: OSI Approved :: MIT License",
long_description="Genearate a single file HTML report from a Junit or XUnit XML results file"
)
|
mit
|
Python
|
6a16baa99d7a23271367b233b514e02721e63e1c
|
Add requests to dependencies
|
jvivian/rnaseq-lib,jvivian/rnaseq-lib
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(name='rnaseq-lib',
version='1.0a6',
description='',
url='http://github.com/jvivian/rnaseq-lib',
author='John Vivian',
author_email='[email protected]',
license='MIT',
package_dir={'': 'src'},
packages=find_packages('src'),
package_data={'rnaseq_lib.utils': ['samples.pickle']},
install_requires=['pandas',
'numpy',
'seaborn',
'requests'])
|
from setuptools import setup, find_packages
setup(name='rnaseq-lib',
version='1.0a6',
description='',
url='http://github.com/jvivian/rnaseq-lib',
author='John Vivian',
author_email='[email protected]',
license='MIT',
package_dir={'': 'src'},
packages=find_packages('src'),
package_data={'rnaseq_lib.utils': ['samples.pickle']},
install_requires=['pandas',
'numpy',
'seaborn'])
|
mit
|
Python
|
5cac38046b708ce83f8dfe7081941c47afed453d
|
Add gmuffin entry point
|
drgarcia1986/muffin,klen/muffin
|
setup.py
|
setup.py
|
#!/usr/bin/env python
import re
from os import path as op
from setuptools import setup, find_packages
def _read(fname):
try:
return open(op.join(op.dirname(__file__), fname)).read()
except IOError:
return ''
_meta = _read('muffin/__init__.py')
_license = re.search(r'^__license__\s*=\s*"(.*)"', _meta, re.M).group(1)
_project = re.search(r'^__project__\s*=\s*"(.*)"', _meta, re.M).group(1)
_version = re.search(r'^__version__\s*=\s*"(.*)"', _meta, re.M).group(1)
install_requires = [
l for l in _read('requirements.txt').split('\n')
if l and not l.startswith('#')]
setup(
name=_project,
version=_version,
license=_license,
description='web framework based on Asyncio stack',
long_description=_read('README.rst'),
platforms=('Any'),
keywords = "django flask sqlalchemy testing mock stub mongoengine data".split(), # noqa
author='Kirill Klenov',
author_email='[email protected]',
url='https://github.com/klen/muffin',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Natural Language :: Russian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Testing',
'Topic :: Utilities',
],
packages=find_packages(),
include_package_data=True,
install_requires=install_requires,
entry_points = {
'pytest11': ['muffin_pytest = muffin.pytest'],
'console_scripts': ['gmuffin = muffin.app:run'],
},
)
|
#!/usr/bin/env python
import re
from os import path as op
from setuptools import setup, find_packages
def _read(fname):
try:
return open(op.join(op.dirname(__file__), fname)).read()
except IOError:
return ''
_meta = _read('muffin/__init__.py')
_license = re.search(r'^__license__\s*=\s*"(.*)"', _meta, re.M).group(1)
_project = re.search(r'^__project__\s*=\s*"(.*)"', _meta, re.M).group(1)
_version = re.search(r'^__version__\s*=\s*"(.*)"', _meta, re.M).group(1)
install_requires = [
l for l in _read('requirements.txt').split('\n')
if l and not l.startswith('#')]
setup(
name=_project,
version=_version,
license=_license,
description='web framework based on Asyncio stack',
long_description=_read('README.rst'),
platforms=('Any'),
keywords = "django flask sqlalchemy testing mock stub mongoengine data".split(), # noqa
author='Kirill Klenov',
author_email='[email protected]',
url='https://github.com/klen/muffin',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Natural Language :: Russian',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Testing',
'Topic :: Utilities',
],
packages=find_packages(),
include_package_data=True,
install_requires=install_requires,
entry_points = {
'pytest11': [
'muffin_pytest = muffin.pytest',
]
},
)
|
mit
|
Python
|
023501d5b6c3355672d7227a7dc30e7decd5688f
|
Bump version
|
machtfit/adyen
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(name='adyen',
version='0.1.1',
description='Python library for the Adyen payment provider',
license="MIT",
author='Markus Bertheau',
author_email='[email protected]',
long_description=open('README.md').read(),
packages=['adyen', 'django_adyen', 'django_adyen.templatetags',
'oscar_adyen'],
install_requires=['pytz', 'zope.dottedname'])
|
from distutils.core import setup
setup(name='adyen',
version='0.1',
description='Python library for the Adyen payment provider',
license="MIT",
author='Markus Bertheau',
author_email='[email protected]',
long_description=open('README.md').read(),
packages=['adyen', 'django_adyen', 'django_adyen.templatetags',
'oscar_adyen'],
install_requires=['pytz', 'zope.dottedname'])
|
mit
|
Python
|
73114498b9c54739812827c89f639828333ad723
|
Fix cross-platform install bug.
|
wsmith323/staticmodel,wsmith323/constantmodel
|
setup.py
|
setup.py
|
import os
from setuptools import setup, find_packages
def file_read(filename):
filepath = os.path.join(os.path.dirname(__file__), filename)
with open(filepath) as flo:
return flo.read()
__version__ = file_read(os.path.join('staticmodel', 'VERSION.txt')).strip()
setup(
name="staticmodel",
version=__version__,
packages=find_packages(exclude=['tests', 'docs']),
include_package_data=True,
install_requires=['six'],
author="Warren A. Smith",
author_email="[email protected]",
description="Static Models.",
long_description=file_read("README.rst"),
license="MIT",
keywords="static constant model enum django",
url="https://github.com/wsmith323/staticmodel",
test_suite="tests",
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'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 :: 3.7',
],
)
|
import os
from setuptools import setup, find_packages
def file_read(filename):
filepath = os.path.join(os.path.dirname(__file__), filename)
with open(filepath) as flo:
return flo.read()
__version__ = file_read('staticmodel/VERSION.txt').strip()
setup(
name="staticmodel",
version=__version__,
packages=find_packages(exclude=['tests', 'docs']),
include_package_data=True,
install_requires=['six'],
author="Warren A. Smith",
author_email="[email protected]",
description="Static Models.",
long_description=file_read("README.rst"),
license="MIT",
keywords="static constant model enum django",
url="https://github.com/wsmith323/staticmodel",
test_suite="tests",
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'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 :: 3.7',
],
)
|
mit
|
Python
|
b1ee098ed3f205923efcae2189ebfb53d3f7b3e0
|
check status codes instead of error message
|
x89/botologist,x89/botologist,anlutro/botologist,moopie/botologist
|
plugins/weather.py
|
plugins/weather.py
|
import logging
log = logging.getLogger(__name__)
import urllib
import json
import ircbot.plugin
import socket
def make_http_request(url):
return urllib.request.urlopen(url, timeout=2).read().decode('utf-8')
class WeatherPlugin(ircbot.plugin.Plugin):
@ircbot.plugin.command('weather')
def weather(self, cmd):
if len(cmd.args) < 1:
return 'Usage: !weather city'
city = '-'.join(cmd.args)
url = 'http://api.openweathermap.org/data/2.5/weather?q={}&units=metric'.format(
city)
try:
response = make_http_request(url)
except (urllib.error.URLError, socket.timeout):
return 'An HTTP error occured, try again later!'
data = json.loads(response)
status = int(data['cod'])
if status == 404:
return 'Error: City not found'
elif status != 200
return data['message']
location = '{}, {}'.format(data['name'], data['sys']['country'])
weather = data['weather'][0]['main']
temperature = data['main']['temp']
return 'Weather in {}: {} - the temperature is {}°C'.format(
location, weather, temperature)
|
import logging
log = logging.getLogger(__name__)
import urllib
import json
import ircbot.plugin
import socket
def make_http_request(url):
return urllib.request.urlopen(url, timeout=2).read().decode('utf-8')
class WeatherPlugin(ircbot.plugin.Plugin):
@ircbot.plugin.command('weather')
def weather(self, cmd):
if len(cmd.args) < 1:
return 'Usage: !weather city'
city = '-'.join(cmd.args)
url = 'http://api.openweathermap.org/data/2.5/weather?q={}&units=metric'.format(
city)
try:
response = make_http_request(url)
except (urllib.error.URLError, socket.timeout):
return 'An HTTP error occured, try again later!'
data = json.loads(response)
if int(data['cod']) != 200:
if 'Error: Not found city' in data['message']:
return 'Error: City not found'
return data['message']
location = '{}, {}'.format(data['name'], data['sys']['country'])
weather = data['weather'][0]['main']
temperature = data['main']['temp']
return 'Weather in {}: {} - the temperature is {}°C'.format(
location, weather, temperature)
|
mit
|
Python
|
a6dc2ce5dea3d216dab1c94138904762290495d9
|
Remove extraneous entry points
|
ooici/coi-services,ooici/coi-services,ooici/coi-services,ooici/coi-services,ooici/coi-services
|
setup.py
|
setup.py
|
#!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
import os
import sys
# Add /usr/local/include to the path for macs, fixes easy_install for several packages (like gevent and pyyaml)
if sys.platform == 'darwin':
os.environ['C_INCLUDE_PATH'] = '/usr/local/include'
version = '0.1'
setup( name = 'coi-services',
version = version,
description = 'OOI ION COI Services',
url = 'https://github.com/ooici/coi-services',
download_url = 'http://ooici.net/releases',
license = 'Apache 2.0',
author = 'Michael Meisinger',
author_email = '[email protected]',
keywords = ['ooici','ioncore', 'pyon', 'coi'],
packages = find_packages(),
dependency_links = [
'http://ooici.net/releases'
],
test_suite = 'pyon',
install_requires = [
'pyon',
],
)
|
#!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
import os
import sys
# Add /usr/local/include to the path for macs, fixes easy_install for several packages (like gevent and pyyaml)
if sys.platform == 'darwin':
os.environ['C_INCLUDE_PATH'] = '/usr/local/include'
version = '0.1'
setup( name = 'coi-services',
version = version,
description = 'OOI ION COI Services',
url = 'https://github.com/ooici/coi-services',
download_url = 'http://ooici.net/releases',
license = 'Apache 2.0',
author = 'Michael Meisinger',
author_email = '[email protected]',
keywords = ['ooici','ioncore', 'pyon', 'coi'],
packages = find_packages(),
entry_points = {
'console_scripts' : [
'pycc=scripts.pycc:entry',
'control_cc=scripts.control_cc:main',
'generate_interfaces=scripts.generate_interfaces:main'
]
},
dependency_links = [
'http://ooici.net/releases'
],
test_suite = 'pyon',
install_requires = [
'pyon',
],
)
|
bsd-2-clause
|
Python
|
230162033388f64e7b2c27b7df8ade4f72b743c4
|
Bump version
|
Rhathe/fixtureupper
|
setup.py
|
setup.py
|
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
# ref: https://tox.readthedocs.org/en/latest/example/basic.html#integration-with-setuptools-distribute-test-commands
class Tox(TestCommand):
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = ''
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
import shlex
errno = tox.cmdline(args=shlex.split(self.tox_args))
sys.exit(errno)
class ToxWithRecreate(Tox):
description = ('Run tests, but recreate the testing environments first. '
'(Useful if the test dependencies change.)')
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = '-r'
setup(
name='fixtureupper',
version='0.0.3',
packages=['fixtureupper'],
url='https://github.com/Rhathe/fixtureupper',
license='MIT',
author='Ramon Sandoval',
description='SqlAlchemy Fixture Generator',
long_description='SqlAlchemy Fixture Generator',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Utilities',
],
install_requires=[
'future >= 0.14.3, < 0.16',
'SQLAlchemy',
],
# tox is responsible for setting up the test runner and its dependencies
# (e.g., code coverage tools) -- see the tox.ini file
tests_require=[
'tox >= 1.9, < 3',
],
cmdclass={
'test': Tox,
'clean_test': ToxWithRecreate,
},
)
|
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
# ref: https://tox.readthedocs.org/en/latest/example/basic.html#integration-with-setuptools-distribute-test-commands
class Tox(TestCommand):
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = ''
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
import shlex
errno = tox.cmdline(args=shlex.split(self.tox_args))
sys.exit(errno)
class ToxWithRecreate(Tox):
description = ('Run tests, but recreate the testing environments first. '
'(Useful if the test dependencies change.)')
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = '-r'
setup(
name='fixtureupper',
version='0.0.2',
packages=['fixtureupper'],
url='https://github.com/Rhathe/fixtureupper',
license='MIT',
author='Ramon Sandoval',
description='SqlAlchemy Fixture Generator',
long_description='SqlAlchemy Fixture Generator',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Utilities',
],
install_requires=[
'future >= 0.14.3, < 0.16',
'SQLAlchemy',
],
# tox is responsible for setting up the test runner and its dependencies
# (e.g., code coverage tools) -- see the tox.ini file
tests_require=[
'tox >= 1.9, < 3',
],
cmdclass={
'test': Tox,
'clean_test': ToxWithRecreate,
},
)
|
mit
|
Python
|
0891664b3d23b31e855eb48d4fea1ac436190e82
|
Read long description from README.rst
|
mitya57/pymarkups,retext-project/pymarkups
|
setup.py
|
setup.py
|
#!/usr/bin/env python3
import sys
try:
from setuptools import setup, Command
except ImportError:
from distutils.core import setup, Command
from markups import __version__ as version
from os.path import dirname, join
with open(join(dirname(__file__), 'README.rst')) as readme_file:
long_description = '\n' + readme_file.read()
classifiers = ['Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Text Processing :: Markup',
'Topic :: Text Processing :: General',
'Topic :: Software Development :: Libraries :: Python Modules'
]
class run_tests(Command):
user_options = []
def initialize_options(self): pass
def finalize_options(self): pass
def run(self):
from unittest.main import main
testprogram = main(module=None, argv=sys.argv[:1], verbosity=2, exit=False)
if not testprogram.result.wasSuccessful():
sys.exit(1)
cmdclass = {}
if sys.version_info[0] >= 3:
cmdclass['test'] = run_tests
setup_args = {
'name': 'Markups',
'version': version,
'description': 'A wrapper around various text markups',
'long_description': long_description,
'author': 'Dmitry Shachnev',
'author_email': '[email protected]',
'url': 'https://github.com/retext-project/pymarkups',
'packages': ['markups'],
'license': 'BSD',
'cmdclass': cmdclass,
'classifiers': classifiers
}
setup(**setup_args)
|
#!/usr/bin/env python3
import sys
try:
from setuptools import setup, Command
except ImportError:
from distutils.core import setup, Command
from markups import __version__ as version
long_description = \
"""This module provides a wrapper around the various text markup languages,
such as Markdown_ and reStructuredText_ (these two are supported by default).
Usage example:
>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.name
'reStructuredText'
>>> markup.attributes[markups.SYNTAX_DOCUMENTATION]
'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html'
>>> text = "Hello, world!\\n=============\\n\\nThis is an example **reStructuredText** document."
>>> markup.get_document_title(text)
'Hello, world!'
>>> markup.get_document_body(text)
'<p>This is an example <strong>reStructuredText</strong> document.</p>\\n'
.. _Markdown: http://daringfireball.net/projects/markdown/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
"""
classifiers = ['Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Text Processing :: Markup',
'Topic :: Text Processing :: General',
'Topic :: Software Development :: Libraries :: Python Modules'
]
class run_tests(Command):
user_options = []
def initialize_options(self): pass
def finalize_options(self): pass
def run(self):
from unittest.main import main
testprogram = main(module=None, argv=sys.argv[:1], verbosity=2, exit=False)
if not testprogram.result.wasSuccessful():
sys.exit(1)
cmdclass = {}
if sys.version_info[0] >= 3:
cmdclass['test'] = run_tests
setup_args = {
'name': 'Markups',
'version': version,
'description': 'A wrapper around various text markups',
'long_description': long_description,
'author': 'Dmitry Shachnev',
'author_email': '[email protected]',
'url': 'https://github.com/retext-project/pymarkups',
'packages': ['markups'],
'license': 'BSD',
'cmdclass': cmdclass,
'classifiers': classifiers
}
setup(**setup_args)
|
bsd-3-clause
|
Python
|
5a70307744d6f33384d4184ebb08f928766247e7
|
Increment version to 3.1
|
GetAmbassador/django-redis,zl352773277/django-redis,smahs/django-redis,lucius-feng/django-redis,yanheng/django-redis
|
setup.py
|
setup.py
|
from setuptools import setup
description = """
Full featured redis cache backend for Django.
"""
setup(
name = "django-redis",
url = "https://github.com/niwibe/django-redis",
author = "Andrei Antoukh",
author_email = "[email protected]",
version='3.1',
packages = [
"redis_cache",
"redis_cache.stats"
],
description = description.strip(),
install_requires=[
'redis>=2.7.0',
],
zip_safe=False,
include_package_data = True,
package_data = {
'': ['*.html'],
},
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Environment :: Web Environment",
"Framework :: Django",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
],
)
|
from setuptools import setup
description = """
Full featured redis cache backend for Django.
"""
setup(
name = "django-redis",
url = "https://github.com/niwibe/django-redis",
author = "Andrei Antoukh",
author_email = "[email protected]",
version='3.0',
packages = [
"redis_cache",
"redis_cache.stats"
],
description = description.strip(),
install_requires=[
'redis>=2.7.0',
],
zip_safe=False,
include_package_data = True,
package_data = {
'': ['*.html'],
},
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Environment :: Web Environment",
"Framework :: Django",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
],
)
|
bsd-3-clause
|
Python
|
357a54f6358dc440ad61ff5c507981d9a79f953c
|
Add hook for installing image package.
|
getwarped/powershift-cli,getwarped/powershift-cli
|
setup.py
|
setup.py
|
import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'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',
'Programming Language :: Python :: 3.6',
]
setup_kwargs = dict(
name='powershift-cli',
version='1.2.1',
description='Pluggable command line client for OpenShift.',
long_description=long_description,
url='https://github.com/getwarped/powershift-cli',
author='Graham Dumpleton',
author_email='[email protected]',
license='BSD',
classifiers=classifiers,
keywords='openshift kubernetes',
packages=['powershift', 'powershift.cli'],
package_dir={'powershift': 'src/powershift'},
package_data={'powershift.cli': ['completion-bash.sh']},
entry_points = {'console_scripts':['powershift = powershift.cli:main']},
install_requires=['click'],
extras_require={'all':['powershift-cluster>=2.2.0'],
'cluster':['powershift-cluster>=2.2.0'],
'image':['powershift-image>=1.0.3']},
)
setup(**setup_kwargs)
|
import sys
import os
from setuptools import setup
long_description = open('README.rst').read()
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: BSD License',
'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',
'Programming Language :: Python :: 3.6',
]
setup_kwargs = dict(
name='powershift-cli',
version='1.2.1',
description='Pluggable command line client for OpenShift.',
long_description=long_description,
url='https://github.com/getwarped/powershift-cli',
author='Graham Dumpleton',
author_email='[email protected]',
license='BSD',
classifiers=classifiers,
keywords='openshift kubernetes',
packages=['powershift', 'powershift.cli'],
package_dir={'powershift': 'src/powershift'},
package_data={'powershift.cli': ['completion-bash.sh']},
entry_points = {'console_scripts':['powershift = powershift.cli:main']},
install_requires=['click'],
extras_require={'all':['powershift-cluster>=2.2.0'],
'cluster':['powershift-cluster>=2.2.0']},
)
setup(**setup_kwargs)
|
bsd-2-clause
|
Python
|
8cdafd66bb59895d24681a79765d7d60006bc4b4
|
remove pip session from setup (#493)
|
google/turbinia,google/turbinia,google/turbinia,google/turbinia,google/turbinia
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 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.
"""This is the setup file for the project."""
# yapf: disable
from __future__ import unicode_literals
import sys
from setuptools import find_packages
from setuptools import setup
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
# make sure turbinia is in path
sys.path.insert(0, '.')
import turbinia # pylint: disable=wrong-import-position
turbinia_description = (
'Turbinia is an open-source framework for deploying, managing, and running'
'forensic workloads on cloud platforms. It is intended to automate running '
'of common forensic processing tools (i.e. Plaso, TSK, strings, etc) to '
'help with processing evidence in the Cloud, scaling the processing of '
'large amounts of evidence, and decreasing response time by parallelizing'
'processing where possible.')
setup(
name='turbinia',
version=turbinia.__version__,
description='Automation and Scaling of Digital Forensics Tools',
long_description=turbinia_description,
license='Apache License, Version 2.0',
url='http://turbinia.plumbing/',
maintainer='Turbinia development team',
maintainer_email='[email protected]',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points={'console_scripts': ['turbiniactl=turbinia.turbiniactl:main']},
install_requires=[str(req.req) for req in parse_requirements(
'requirements.txt', session=False)
],
extras_require={
'dev': ['mock', 'nose', 'yapf', 'celery~=4.1', 'coverage'],
'local': ['celery~=4.1', 'kombu~=4.1', 'redis~=3.0'],
'worker': ['plaso>=20171118', 'pyhindsight>=2.2.0']
}
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 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.
"""This is the setup file for the project."""
# yapf: disable
from __future__ import unicode_literals
import sys
from setuptools import find_packages
from setuptools import setup
try: # for pip >= 10
from pip._internal.download import PipSession
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.download import PipSession
from pip.req import parse_requirements
# make sure turbinia is in path
sys.path.insert(0, '.')
import turbinia # pylint: disable=wrong-import-position
turbinia_description = (
'Turbinia is an open-source framework for deploying, managing, and running'
'forensic workloads on cloud platforms. It is intended to automate running '
'of common forensic processing tools (i.e. Plaso, TSK, strings, etc) to '
'help with processing evidence in the Cloud, scaling the processing of '
'large amounts of evidence, and decreasing response time by parallelizing'
'processing where possible.')
setup(
name='turbinia',
version=turbinia.__version__,
description='Automation and Scaling of Digital Forensics Tools',
long_description=turbinia_description,
license='Apache License, Version 2.0',
url='http://turbinia.plumbing/',
maintainer='Turbinia development team',
maintainer_email='[email protected]',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points={'console_scripts': ['turbiniactl=turbinia.turbiniactl:main']},
install_requires=[str(req.req) for req in parse_requirements(
'requirements.txt', session=PipSession())
],
extras_require={
'dev': ['mock', 'nose', 'yapf', 'celery~=4.1', 'coverage'],
'local': ['celery~=4.1', 'kombu~=4.1', 'redis~=3.0'],
'worker': ['plaso>=20171118', 'pyhindsight>=2.2.0']
}
)
|
apache-2.0
|
Python
|
6f7003f39acb80d375010acebeb2840e1d83a7d7
|
bump to version 0.7.3
|
cdelguercio/slothauth,cdelguercio/slothauth
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name='slothauth',
packages=['slothauth'],
install_requires=['djangorestframework>=3.3.3', ],
version='0.7.3',
description='A Python Django package for user accounts and authentication.',
author='Chris Del Guercio',
author_email='[email protected]',
url='https://github.com/cdelguercio/slothauth',
download_url='https://github.com/cdelguercio/slothauth/tarball/0.7.3',
keywords=['slothauth', 'sloth', 'auth', 'accounts', 'users', 'django', 'python'],
classifiers=[],
test_suite='nose.collector',
tests_require=['nose', 'nose-cover3'],
include_package_data=True,
)
|
from setuptools import setup
setup(
name='slothauth',
packages=['slothauth'],
install_requires=['djangorestframework>=3.3.3', ],
version='0.7.2',
description='A Python Django package for user accounts and authentication.',
author='Chris Del Guercio',
author_email='[email protected]',
url='https://github.com/cdelguercio/slothauth',
download_url='https://github.com/cdelguercio/slothauth/tarball/0.7.2',
keywords=['slothauth', 'sloth', 'auth', 'accounts', 'users', 'django', 'python'],
classifiers=[],
test_suite='nose.collector',
tests_require=['nose', 'nose-cover3'],
include_package_data=True,
)
|
apache-2.0
|
Python
|
79c1f49f5451141192b366aaf62a27c62c9f17b9
|
bump setup.py
|
peerchemist/peercoin_rpc
|
setup.py
|
setup.py
|
from setuptools import setup
setup(name='peercoin_rpc',
version='0.55',
description='Library to communicate with peercoin daemon via JSON-RPC protocol.',
url='https://github.com/peerchemist/peercoin_rpc',
author='Peerchemist',
author_email='[email protected]',
license='MIT',
packages=['peercoin_rpc'],
install_requires=['requests'],
keywords=['peercoin', 'json-rpc', 'cryptocurrency'],
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
platforms="any")
|
from setuptools import setup
setup(name='peercoin_rpc',
version='0.50',
description='Library to communicate with peercoin daemon via JSON-RPC protocol.',
url='https://github.com/peerchemist/peercoin_rpc',
author='Peerchemist',
author_email='[email protected]',
license='MIT',
packages=['peercoin_rpc'],
install_requires=['requests'],
keywords=['peercoin', 'json-rpc', 'cryptocurrency'],
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],
zip_safe=False,
platforms="any")
|
mit
|
Python
|
c021ca2b2faec465c70b89f774c29c58b6312112
|
bump version to 0.6.1
|
PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild
|
setup.py
|
setup.py
|
#!/usr/bin/evn python2
from setuptools import setup, find_packages
setup(name='pprof',
version='0.6.1',
packages= find_packages(),
author = "Andreas Simbuerger",
author_email = "[email protected]",
description = "This is the experiment driver for the pprof study",
license = "MIT",
entry_points={
'console_scripts': [ 'pprof=pprof.driver:main' ]
}
)
|
#!/usr/bin/evn python2
from setuptools import setup, find_packages
setup(name='pprof',
version='0.6',
packages= find_packages(),
author = "Andreas Simbuerger",
author_email = "[email protected]",
description = "This is the experiment driver for the pprof study",
license = "MIT",
entry_points={
'console_scripts': [ 'pprof=pprof.driver:main' ]
}
)
|
mit
|
Python
|
c967bea5399c87b006ae5f057f8b78175e574de5
|
Add 'install_requires'
|
StanczakDominik/PlasmaPy
|
setup.py
|
setup.py
|
from setuptools import setup
# Package metadata
metadata = {}
with open('plasmapy/_metadata.py', 'r') as metadata_file:
exec(metadata_file.read(), metadata)
# Requirements
with open('requirements/base.txt', 'r') as req_file:
requirements = req_file.read().splitlines()
setup(name=metadata['name'],
version=metadata['version'],
description="Python package for plasma physics",
requires=requirements,
install_requires=requirements,
provides=[metadata['name']],
author="The PlasmaPy Community",
author_email="[email protected]", # until we get an email address
license="BSD",
url="https://github.com/PlasmaPy/PlasmaPy", # until we make a webpage
long_description=metadata['description'],
keywords=['plasma', 'plasma physics', 'science'],
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Astronomy',
'Development Status :: 2 - Pre-Alpha',
],
packages=["plasmapy"],
zip_safe=False,
use_2to3=False,
python_requires='>=3.6',
)
|
from setuptools import setup
# Package metadata
metadata = {}
with open('plasmapy/_metadata.py', 'r') as metadata_file:
exec(metadata_file.read(), metadata)
# Requirements
with open('requirements/base.txt', 'r') as req_file:
requirements = req_file.read().splitlines()
setup(name=metadata['name'],
version=metadata['version'],
description="Python package for plasma physics",
requires=requirements,
provides=[metadata['name']],
author="The PlasmaPy Community",
author_email="[email protected]", # until we get an email address
license="BSD",
url="https://github.com/PlasmaPy/PlasmaPy", # until we make a webpage
long_description=metadata['description'],
keywords=['plasma', 'plasma physics', 'science'],
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Astronomy',
'Development Status :: 2 - Pre-Alpha',
],
packages=["plasmapy"],
zip_safe=False,
use_2to3=False,
python_requires='>=3.6',
)
|
bsd-3-clause
|
Python
|
19752f793b82ce4af07d798cdbd781629fa7d887
|
fix development status value
|
joncastro/SafeInCloud
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
zip_safe=True,
name='desafe',
version='0.0.4',
author='pjon',
py_modules=['desafe'],
description='An utility to decrypt Safe in Cloud password files',
license='LICENSE',
install_requires=[
"pycrypto",
"xmltodict",
"passlib",
"docopt"
],
entry_points={
'console_scripts': [
'desafe = desafe:main'
]
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Security :: Cryptography',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS'
]
)
|
from setuptools import setup
setup(
zip_safe=True,
name='desafe',
version='0.0.4',
author='pjon',
py_modules=['desafe'],
description='An utility to decrypt Safe in Cloud password files',
license='LICENSE',
install_requires=[
"pycrypto",
"xmltodict",
"passlib",
"docopt"
],
entry_points={
'console_scripts': [
'desafe = desafe:main'
]
},
classifiers=[
'Development Status :: 4 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: End Users/Desktop',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Security :: Cryptography',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS'
]
)
|
apache-2.0
|
Python
|
075488b6f2b33c211b734dc08414d45cb35c4e68
|
Bump version to prepare for next release.
|
locationlabs/mockredis
|
setup.py
|
setup.py
|
#!/usr/bin/env python
from setuptools import setup, find_packages
# Match releases to redis-py versions
__version__ = '2.9.0.12'
# Jenkins will replace __build__ with a unique value.
__build__ = ''
setup(name='mockredispy',
version=__version__ + __build__,
description='Mock for redis-py',
url='http://www.github.com/locationlabs/mockredis',
license='Apache2',
packages=find_packages(exclude=['*.tests']),
setup_requires=[
'nose'
],
extras_require={
'lua': ['lunatic-python-bugfix==1.1.1'],
},
tests_require=[
'redis>=2.9.0'
],
test_suite='mockredis.tests',
entry_points={
'nose.plugins.0.10': [
'with_redis = mockredis.noseplugin:WithRedis'
]
})
|
#!/usr/bin/env python
from setuptools import setup, find_packages
# Match releases to redis-py versions
__version__ = '2.9.0.11'
# Jenkins will replace __build__ with a unique value.
__build__ = ''
setup(name='mockredispy',
version=__version__ + __build__,
description='Mock for redis-py',
url='http://www.github.com/locationlabs/mockredis',
license='Apache2',
packages=find_packages(exclude=['*.tests']),
setup_requires=[
'nose'
],
extras_require={
'lua': ['lunatic-python-bugfix==1.1.1'],
},
tests_require=[
'redis>=2.9.0'
],
test_suite='mockredis.tests',
entry_points={
'nose.plugins.0.10': [
'with_redis = mockredis.noseplugin:WithRedis'
]
})
|
apache-2.0
|
Python
|
cea141e94259e6ffdff63570b77541c5d7623056
|
bump minor version
|
amlweems/python-paddingoracle,mwielgoszewski/python-paddingoracle
|
setup.py
|
setup.py
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='paddingoracle',
author='Marcin Wielgoszewski',
author_email='[email protected]',
version='0.2.1',
url='https://github.com/mwielgoszewski/python-paddingoracle',
py_modules=['paddingoracle'],
description='A portable, padding oracle exploit API',
zip_safe=False,
classifiers=[
'License :: OSI Approved :: BSD License',
'Programming Language :: Python'
]
)
|
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='paddingoracle',
author='Marcin Wielgoszewski',
author_email='[email protected]',
version='0.2',
url='https://github.com/mwielgoszewski/python-paddingoracle',
py_modules=['paddingoracle'],
description='A portable, padding oracle exploit API',
zip_safe=False,
classifiers=[
'License :: OSI Approved :: BSD License',
'Programming Language :: Python'
]
)
|
bsd-2-clause
|
Python
|
6452a600b29dd191695b91d5402fdffbcc3c755e
|
Bump version to 0.1.0b7
|
wendbv/schemavalidator,wendbv/schemavalidator
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name='schemavalidator',
packages=['schemavalidator'],
version='0.1.0b7',
description='A local JSON schema validator based on jsonschema',
author='Daan Porru (Wend)',
author_email='[email protected]',
license='MIT',
url='https://github.com/wendbv/schemavalidator',
keywords=['json schema', 'validator'],
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3.5',
],
install_requires=['jsonschema', 'requests'],
extras_require={
'test': ['pytest', 'pytest-cov', 'coverage', 'coveralls',
'pytest-mock'],
}
)
|
from distutils.core import setup
setup(
name='schemavalidator',
packages=['schemavalidator'],
version='0.1.0b6',
description='A local JSON schema validator based on jsonschema',
author='Daan Porru (Wend)',
author_email='[email protected]',
license='MIT',
url='https://github.com/wendbv/schemavalidator',
keywords=['json schema', 'validator'],
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python :: 3.5',
],
install_requires=['jsonschema', 'requests'],
extras_require={
'test': ['pytest', 'pytest-cov', 'coverage', 'coveralls',
'pytest-mock'],
}
)
|
mit
|
Python
|
76f254582243dc927ca25eebf2b47702ef43167b
|
Fix install-time dependency on pymongo.
|
rahulg/mongorm
|
setup.py
|
setup.py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
VERSION = (0, 6, 5)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
version = '.'.join(map(str, VERSION))
if __name__ == '__main__':
setup(
name='mongorm',
version=version,
author='Rahul AG',
author_email='[email protected]',
description=('An extremely thin ORM-ish wrapper over pymongo.'),
long_description=read('README.rst'),
license = 'BSD',
keywords = ['mongodb', 'mongo', 'orm', 'odm'],
url = 'https://github.com/rahulg/mongorm',
packages=['mongorm', 'tests'],
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Database :: Front-Ends',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
],
test_suite='tests',
install_requires=[
'pymongo',
'inflection',
'simplejson'
],
)
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from mongorm import VERSION
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
version = '.'.join(map(str, VERSION))
if __name__ == '__main__':
setup(
name='mongorm',
version=version,
author='Rahul AG',
author_email='[email protected]',
description=('An extremely thin ORM-ish wrapper over pymongo.'),
long_description=read('README.rst'),
license = 'BSD',
keywords = ['mongodb', 'mongo', 'orm', 'odm'],
url = 'https://github.com/rahulg/mongorm',
packages=['mongorm', 'tests'],
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Database :: Front-Ends',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
],
test_suite='tests',
install_requires=[
'pymongo',
'inflection',
'simplejson'
],
)
|
bsd-2-clause
|
Python
|
e7ad292b2d38e33dc466fa2114018a2e04076965
|
Bump version to 0.7.3
|
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.3',
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",
'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 :: 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",
'twisted>=15.0.0',
],
extras_require = {
'dev': [
'pyflakes',
'coverage'
],
},
long_description=longDescription
)
|
mit
|
Python
|
98f60aeb3cbcf1ae241620ecfca5884483717347
|
Update setup.py classifiers
|
levi-rs/explicit
|
setup.py
|
setup.py
|
'''
explicit setup
'''
import versioneer
from setuptools import setup, find_packages
install_requires = ['versioneer', ]
setup(
name='explicit',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author='Levi Noecker',
author_email='[email protected]',
url='https://github.com/levi-rs/explicit',
keywords=['selenium', 'explicit', 'wait', 'implicit'],
packages=find_packages(),
description='Easy explicit wait helpers for Selenium',
install_requires=install_requires,
tests_require=[
'mock',
'pytest',
],
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Testing',
'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',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
test_suite="tests",
)
|
'''
explicit setup
'''
import versioneer
from setuptools import setup, find_packages
install_requires = ['versioneer', ]
setup(
name='explicit',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author='Levi Noecker',
author_email='[email protected]',
url='https://github.com/levi-rs/explicit',
packages=find_packages(),
description='Easy explicit wait helpers for Selenium',
install_requires=install_requires,
tests_require=[
'mock',
'pytest',
],
classifiers=[
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
test_suite="tests",
)
|
mit
|
Python
|
b7ec7f787a052c07af18d59990e44ed9fd3a58dd
|
add flask_featureflags.contrib sub package in install script
|
jskulski/Flask-FeatureFlags,trustrachel/Flask-FeatureFlags,iromli/Flask-FeatureFlags
|
setup.py
|
setup.py
|
import os
from setuptools import setup
from sys import argv
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
except:
README = ''
CHANGES = ''
install_requires = ["Flask"]
if "develop" in argv:
install_requires.append('Sphinx')
install_requires.append('Sphinx-PyPI-upload')
setup(
name='Flask-FeatureFlags',
version='0.6-dev',
url='https://github.com/trustrachel/Flask-FeatureFlags',
license='Apache',
author='Rachel Sanders',
author_email='[email protected]',
maintainer='Rachel Sanders',
maintainer_email='[email protected]',
description='Enable or disable features in Flask apps based on configuration',
long_description=README + '\n\n' + CHANGES,
zip_safe=False,
test_suite="tests",
platforms='any',
include_package_data=True,
packages=[
'flask_featureflags',
'flask_featureflags.contrib',
'flask_featureflags.contrib.inline',
'flask_featureflags.contrib.sqlalchemy',
],
install_requires=[
'Flask',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
import os
from setuptools import setup
from sys import argv
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.md')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
except:
README = ''
CHANGES = ''
install_requires = ["Flask"]
if "develop" in argv:
install_requires.append('Sphinx')
install_requires.append('Sphinx-PyPI-upload')
setup(
name='Flask-FeatureFlags',
version='0.6-dev',
url='https://github.com/trustrachel/Flask-FeatureFlags',
license='Apache',
author='Rachel Sanders',
author_email='[email protected]',
maintainer='Rachel Sanders',
maintainer_email='[email protected]',
description='Enable or disable features in Flask apps based on configuration',
long_description=README + '\n\n' + CHANGES,
zip_safe=False,
test_suite="tests",
platforms='any',
include_package_data=True,
packages=['flask_featureflags'],
install_requires=[
'Flask',
],
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
|
apache-2.0
|
Python
|
b7d082b9b8efc441eb849fd6584ecb5e72d9c8fc
|
remove dependency on pyqt5
|
WilliamHPNielsen/broadbean
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name='broadbean',
version='0.9',
# We might as well require what we know will work
# although older numpy and matplotlib version will probably work too
install_requires=['numpy>=1.12.1',
'matplotlib>=2.0.1'],
author='William H.P. Nielsen',
author_email='[email protected]',
description=("Package for easily generating and manipulating signal "
"pulses. Developed for use with qubits in the quantum "
"computing labs of Copenhagen, Delft, and Sydney, but "
"should be generally useable."),
license='MIT',
packages=['broadbean'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3.5'
],
keywords='Pulsebuilding signal processing arbitrary waveforms',
url='https://github.com/QCoDeS/broadbean'
)
|
from setuptools import setup
setup(
name='broadbean',
version='0.9',
# We might as well require what we know will work
# although older numpy and matplotlib version will probably work too
install_requires=['numpy>=1.12.1',
'matplotlib>=2.0.1',
'PyQt5'],
author='William H.P. Nielsen',
author_email='[email protected]',
description=("Package for easily generating and manipulating signal "
"pulses. Developed for use with qubits in the quantum "
"computing labs of Copenhagen, Delft, and Sydney, but "
"should be generally useable."),
license='MIT',
packages=['broadbean'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3.5'
],
keywords='Pulsebuilding signal processing arbitrary waveforms',
url='https://github.com/QCoDeS/broadbean'
)
|
mit
|
Python
|
345fc7fcfea208d36c7e0647b6dccb6fe4fd160d
|
Bump Core dependency to v32
|
openfisca/openfisca-tunisia,openfisca/openfisca-tunisia
|
setup.py
|
setup.py
|
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Tunisia specific model for OpenFisca -- a versatile microsimulation free software"""
from setuptools import setup, find_packages
classifiers = """\
Development Status :: 2 - Pre-Alpha
License :: OSI Approved :: GNU Affero General Public License v3
Operating System :: POSIX
Programming Language :: Python
Topic :: Scientific/Engineering :: Information Analysis
"""
doc_lines = __doc__.split('\n')
setup(
name = 'OpenFisca-Tunisia',
version = '0.29.0',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
description = doc_lines[0],
keywords = 'benefit microsimulation social tax tunisia',
license = 'http://www.fsf.org/licensing/licenses/agpl-3.0.html',
long_description = '\n'.join(doc_lines[2:]),
url = 'https://github.com/openfisca/openfisca-tunisia',
data_files = [
('share/openfisca/openfisca-tunisia', ['CHANGELOG.md', 'LICENSE.AGPL.txt', 'README.md']),
],
extras_require = dict(
tests = [
'pytest >= 4.0.0, < 5.0.0',
],
notebook = [
'ipykernel >= 4.8',
'jupyter-client >= 5.2',
'matplotlib >= 2.2',
'nbconvert >= 5.3',
'nbformat >= 4.4',
'pandas >= 0.22.0',
],
survey = [
'OpenFisca-Survey-Manager >=0.9.5,<0.19',
]
),
include_package_data = True, # Will read MANIFEST.in
install_requires = [
'OpenFisca-Core >=32, <33',
'PyYAML >= 3.10',
'scipy >= 0.12',
],
message_extractors = {'openfisca_tunisia': [
('**.py', 'python', None),
]},
packages = find_packages(exclude=['tests*']),
)
|
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Tunisia specific model for OpenFisca -- a versatile microsimulation free software"""
from setuptools import setup, find_packages
classifiers = """\
Development Status :: 2 - Pre-Alpha
License :: OSI Approved :: GNU Affero General Public License v3
Operating System :: POSIX
Programming Language :: Python
Topic :: Scientific/Engineering :: Information Analysis
"""
doc_lines = __doc__.split('\n')
setup(
name = 'OpenFisca-Tunisia',
version = '0.29.0',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
description = doc_lines[0],
keywords = 'benefit microsimulation social tax tunisia',
license = 'http://www.fsf.org/licensing/licenses/agpl-3.0.html',
long_description = '\n'.join(doc_lines[2:]),
url = 'https://github.com/openfisca/openfisca-tunisia',
data_files = [
('share/openfisca/openfisca-tunisia', ['CHANGELOG.md', 'LICENSE.AGPL.txt', 'README.md']),
],
extras_require = dict(
tests = [
'pytest >= 4.0.0, < 5.0.0',
],
notebook = [
'ipykernel >= 4.8',
'jupyter-client >= 5.2',
'matplotlib >= 2.2',
'nbconvert >= 5.3',
'nbformat >= 4.4',
'pandas >= 0.22.0',
],
survey = [
'OpenFisca-Survey-Manager >=0.9.5,<0.19',
]
),
include_package_data = True, # Will read MANIFEST.in
install_requires = [
'OpenFisca-Core >=31, <32',
'PyYAML >= 3.10',
'scipy >= 0.12',
],
message_extractors = {'openfisca_tunisia': [
('**.py', 'python', None),
]},
packages = find_packages(exclude=['tests*']),
)
|
agpl-3.0
|
Python
|
b1a3831de9c4d52f674cf1b1d4aed7cf74e8d4ba
|
Update setup.py
|
xiaozhouw/663
|
setup.py
|
setup.py
|
#! /usr/bin/env python
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
setup(
name='hmm',
version='1.0.0',
description='Implementation of the Linear Sparse Version Algorithms to Hidden Markov Model',
long_description= This is an implementation of the memory sparse version of the Baum-welch and Viterbi algorithms to HMM.,
url='https://github.com/xiaozhouw/663',
author='Hao Sheng, Xiaozhou Wang',
author_email='[email protected],[email protected]',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Education',
'Topic :: Software Development :: Build Tools',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='hidden markov model',
install_requires=['numpy','numba'],
)
|
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
setup(
name='hmm',
version='1.0.0',
description='Implementation of the Linear Sparse Version Algorithms to Hidden Markov Model',
long_description= This is an implementation of the memory sparse version of the Baum-welch and Viterbi algorithms to HMM.,
url='https://github.com/xiaozhouw/663',
author='Hao Sheng, Xiaozhou Wang',
author_email='[email protected],[email protected]',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Education',
'Topic :: Software Development :: Build Tools',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='hidden markov model',
install_requires=['numpy','numba'],
)
|
mit
|
Python
|
142ef9b0c2a1d7307132a32cb0803fd047af3b14
|
Fix invalid variable name
|
Kynarth/pokediadb
|
pokediadb/utils.py
|
pokediadb/utils.py
|
import sqlite3
def max_sql_variables():
"""Get the maximum number of arguments allowed in a query by the current
sqlite3 implementation.
Returns:
int: SQLITE_MAX_VARIABLE_NUMBER
"""
db = sqlite3.connect(':memory:')
cur = db.cursor()
cur.execute('CREATE TABLE t (test)')
low, high = 0, 100000
while (high - 1) > low:
guess = (high + low) // 2
query = 'INSERT INTO t VALUES ' + ','.join(['(?)' for _ in
range(guess)])
args = [str(i) for i in range(guess)]
try:
cur.execute(query, args)
except sqlite3.OperationalError as err:
if "too many SQL variables" in str(err):
high = guess
else:
return 999
else:
low = guess
cur.close()
db.close()
return low
|
import sqlite3
def max_sql_variables():
"""Get the maximum number of arguments allowed in a query by the current
sqlite3 implementation.
Returns:
int: SQLITE_MAX_VARIABLE_NUMBER
"""
db = sqlite3.connect(':memory:')
cur = db.cursor()
cur.execute('CREATE TABLE t (test)')
low, high = 0, 100000
while (high - 1) > low:
guess = (high + low) // 2
query = 'INSERT INTO t VALUES ' + ','.join(['(?)' for _ in
range(guess)])
args = [str(i) for i in range(guess)]
try:
cur.execute(query, args)
except sqlite3.OperationalError as e:
if "too many SQL variables" in str(e):
high = guess
else:
return 999
else:
low = guess
cur.close()
db.close()
return low
|
mit
|
Python
|
a33df7cb106e0eaf8498b60d3477269f85be891b
|
fix setup
|
torpedoallen/family
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
import sys, os
version = '0.1'
setup(name='family',
version=version,
description="Easy to create your microservice based on Falcon.",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='microservice falcon',
author='torpedoallen',
author_email='[email protected]',
url='https://github.com/daixm/family',
license='MIT',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
'click',
'PasteScript',
'check-manifest',
],
entry_points="""
[console_scripts]
family-createapp=family.commands.createapp:create
[paste.paster_create_template]
falcon = family.templates.basic:FalconTemplate
""",
)
|
from setuptools import setup, find_packages
import sys, os
version = '0.1'
setup(name='family',
version=version,
description="Easy to create your microservice based on Falcon.",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='microservice,falcon',
author='torpedoallen',
author_email='[email protected]',
url='https://github.com/daixm/family',
license='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
'click',
'PasteScript',
'check-manifest',
# -*- Extra requirements: -*-
],
entry_points="""
[console_scripts]
family-createapp=family.commands.createapp:create
[paste.paster_create_template]
falcon = family.templates.basic:FalconTemplate
""",
)
|
mit
|
Python
|
8199edb90c9de9a70c1c4acb69b0e51a3b470a33
|
Update __init__.py
|
phalt/pykemon,PokeAPI/pykemon
|
pokepy/__init__.py
|
pokepy/__init__.py
|
#!/usr/bin/env python
# coding: utf-8
"""
Pokepy
A Python wrapper for PokeAPI (https://pokeapi.co)
Usage:
>>> import pokepy
>>> clientV2 = pokepy.V2Client()
>>> clientV2.get_pokemon('bulbasaur')[0]
<Pokemon - Bulbasaur>
"""
__author__ = 'Paul Hallett'
__email__ = '[email protected]'
__credits__ = ["Paul Hallett", "Owen Hallett", "Kronopt"]
__version__ = '0.5.0'
__copyright__ = 'Copyright Paul Hallett 2016'
__license__ = 'BSD'
from .api import V2Client
|
#!/usr/bin/env python
# coding: utf-8
"""
Pokepy
A Python wrapper for PokeAPI (https://pokeapi.co)
Usage:
>>> import pokepy
>>> clientV2 = pokepy.V2Client()
>>> clientV2.get_pokemon('bulbasaur')[0]
<Pokemon - Bulbasaur>
"""
__author__ = 'Paul Hallett'
__email__ = '[email protected]'
__credits__ = ["Paul Hallett", "Owen Hallett", "Kronopt"]
__version__ = '0.4'
__copyright__ = 'Copyright Paul Hallett 2016'
__license__ = 'BSD'
from .api import V2Client
|
bsd-3-clause
|
Python
|
cc70b8b3b263428c9a0cdffe50077ca1828cb82d
|
Remove Gunicorn from requirements
|
praekelt/familyconnect-registration,praekelt/familyconnect-registration
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
setup(
name="familyconnect-registration",
version="0.1",
url='http://github.com/praekelt/familyconnect-registration',
license='BSD',
author='Praekelt Foundation',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
install_requires=[
'Django==1.10.2',
'djangorestframework==3.4.7',
'dj-database-url==0.3.0',
'psycopg2==2.7.1',
'raven==5.10.0',
'django-filter==0.12.0',
'whitenoise==2.0.6',
'celery==3.1.24',
'django-celery==3.1.17',
'redis==2.10.5',
'pytz==2015.7',
'six==1.10.0',
'django-rest-hooks==1.3.1',
'go-http==0.3.0',
'requests==2.9.1',
'django-filter==0.12.0',
'seed-services-client==0.9.0',
'future==0.15.2',
'pika==0.10.0',
],
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
from setuptools import setup, find_packages
setup(
name="familyconnect-registration",
version="0.1",
url='http://github.com/praekelt/familyconnect-registration',
license='BSD',
author='Praekelt Foundation',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
install_requires=[
'Django==1.10.2',
'djangorestframework==3.4.7',
'dj-database-url==0.3.0',
'psycopg2==2.7.1',
'raven==5.10.0',
'gunicorn==19.4.5',
'django-filter==0.12.0',
'whitenoise==2.0.6',
'celery==3.1.24',
'django-celery==3.1.17',
'redis==2.10.5',
'pytz==2015.7',
'six==1.10.0',
'django-rest-hooks==1.3.1',
'go-http==0.3.0',
'requests==2.9.1',
'django-filter==0.12.0',
'seed-services-client==0.9.0',
'future==0.15.2',
'pika==0.10.0',
],
classifiers=[
'Development Status :: 4 - Beta',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
|
bsd-3-clause
|
Python
|
4199895bacb97cd36257f710266343563cbed1f3
|
bump version to v0.3
|
closeio/freezefrog
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name='freezefrog',
version='0.3',
url='http://github.com/closeio/freezefrog',
license='MIT',
author='Thomas Steinacher',
author_email='[email protected]',
maintainer='Thomas Steinacher',
maintainer_email='[email protected]',
description='Efficient datetime mocking in tests',
test_suite='tests',
tests_require=['mock'],
platforms='any',
install_requires=[
'mock',
],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'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',
],
packages=[
'freezefrog',
],
)
|
from setuptools import setup
setup(
name='freezefrog',
version='0.2',
url='http://github.com/closeio/freezefrog',
license='MIT',
author='Thomas Steinacher',
author_email='[email protected]',
maintainer='Thomas Steinacher',
maintainer_email='[email protected]',
description='Efficient datetime mocking in tests',
test_suite='tests',
tests_require=['mock'],
platforms='any',
install_requires=[
'mock',
],
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'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',
],
packages=[
'freezefrog',
],
)
|
mit
|
Python
|
39205471e6697ec436c4d374248553ecb5411f98
|
bump version
|
yahoo/TensorFlowOnSpark,yahoo/TensorFlowOnSpark
|
setup.py
|
setup.py
|
from setuptools import setup
setup(
name = 'tensorflowonspark',
packages = ['tensorflowonspark'],
version = '1.0.5',
description = 'Deep learning with TensorFlow on Apache Spark clusters',
author = 'Yahoo, Inc.',
url = 'https://github.com/yahoo/TensorFlowOnSpark',
keywords = ['tensorflowonspark', 'tensorflow', 'spark', 'machine learning', 'yahoo'],
install_requires = ['tensorflow'],
license = 'Apache 2.0',
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
]
)
|
from setuptools import setup
setup(
name = 'tensorflowonspark',
packages = ['tensorflowonspark'],
version = '1.0.4',
description = 'Deep learning with TensorFlow on Apache Spark clusters',
author = 'Yahoo, Inc.',
url = 'https://github.com/yahoo/TensorFlowOnSpark',
keywords = ['tensorflowonspark', 'tensorflow', 'spark', 'machine learning', 'yahoo'],
install_requires = ['tensorflow'],
license = 'Apache 2.0',
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
]
)
|
apache-2.0
|
Python
|
387060e7cf342972eb5745b468624ae5c4fc1ccb
|
Bump version to 0.11.3
|
miLibris/flask-rest-jsonapi
|
setup.py
|
setup.py
|
from setuptools import setup, find_packages
__version__ = '0.11.3'
setup(
name="Flask-REST-JSONAPI",
version=__version__,
description='Flask extension to create REST web api according to JSONAPI 1.0 specification with Flask, Marshmallow \
and data provider of your choice (SQLAlchemy, MongoDB, ...)',
url='https://github.com/miLibris/flask-rest-jsonapi',
author='miLibris API Team',
author_email='[email protected]',
license='MIT',
classifiers=[
'Framework :: Flask',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'License :: OSI Approved :: MIT License',
],
keywords='web api rest jsonapi flask sqlalchemy marshmallow',
packages=find_packages(exclude=['tests']),
zip_safe=False,
platforms='any',
install_requires=['six',
'Flask',
'marshmallow==2.13.1',
'marshmallow_jsonapi',
'sqlalchemy'],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
extras_require={'tests': 'pytest', 'docs': 'sphinx'}
)
|
from setuptools import setup, find_packages
__version__ = '0.11.2'
setup(
name="Flask-REST-JSONAPI",
version=__version__,
description='Flask extension to create REST web api according to JSONAPI 1.0 specification with Flask, Marshmallow \
and data provider of your choice (SQLAlchemy, MongoDB, ...)',
url='https://github.com/miLibris/flask-rest-jsonapi',
author='miLibris API Team',
author_email='[email protected]',
license='MIT',
classifiers=[
'Framework :: Flask',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'License :: OSI Approved :: MIT License',
],
keywords='web api rest jsonapi flask sqlalchemy marshmallow',
packages=find_packages(exclude=['tests']),
zip_safe=False,
platforms='any',
install_requires=['six',
'Flask',
'marshmallow==2.13.1',
'marshmallow_jsonapi',
'sqlalchemy'],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
extras_require={'tests': 'pytest', 'docs': 'sphinx'}
)
|
mit
|
Python
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.