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 |
|---|---|---|---|---|---|---|---|---|
182d17186aa1adb283306a28daeaed0b7ae7ca69 | Bump version number. | GreatFruitOmsk/qrc_pathlib | qrc_pathlib/version.py | qrc_pathlib/version.py | VERSION = '1.0.2'
| VERSION = '1.0.1'
| mit | Python |
3e31fc91ad2d53ee97def200f9a15d626d67b00d | Make unit tests properly shut down the Jupyter server when done. | briehl/narrative,msneddon/narrative,msneddon/narrative,msneddon/narrative,jmchandonia/narrative,briehl/narrative,msneddon/narrative,briehl/narrative,mlhenderson/narrative,kbase/narrative,mlhenderson/narrative,briehl/narrative,kbase/narrative,pranjan77/narrative,psnovichkov/narrative,kbase/narrative,msneddon/narrative,kbase/narrative,jmchandonia/narrative,psnovichkov/narrative,psnovichkov/narrative,psnovichkov/narrative,mlhenderson/narrative,msneddon/narrative,mlhenderson/narrative,pranjan77/narrative,mlhenderson/narrative,jmchandonia/narrative,pranjan77/narrative,pranjan77/narrative,briehl/narrative,psnovichkov/narrative,mlhenderson/narrative,msneddon/narrative,pranjan77/narrative,kbase/narrative,pranjan77/narrative,jmchandonia/narrative,jmchandonia/narrative,briehl/narrative,briehl/narrative,psnovichkov/narrative,jmchandonia/narrative,jmchandonia/narrative,pranjan77/narrative,psnovichkov/narrative,kbase/narrative | test/unit/run_tests.py | test/unit/run_tests.py | # Adapted from a Karma test startup script
# developebd by the Jupyter team here;
# https://github.com/jupyter/jupyter-js-services/blob/master/test/run_test.py
#
from __future__ import print_function
import subprocess
import sys
import argparse
import threading
import time
import os
import signal
KARMA_PORT = 9876
argparser = argparse.ArgumentParser(
description='Run KBase Narrative unit tests'
)
argparser.add_argument('-b', '--browsers', default='Firefox',
help="Browsers to use for Karma test")
argparser.add_argument('-d', '--debug', action='store_true',
help="Whether to enter debug mode in Karma")
options = argparser.parse_args(sys.argv[1:])
nb_command = ['kbase-narrative', '--no-browser', '--NotebookApp.allow_origin="*"']
if not hasattr(sys, 'real_prefix'):
nb_command[0] = 'narrative-venv/bin/kbase-narrative'
nb_server = subprocess.Popen(nb_command,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
preexec_fn = os.setsid
)
# wait for notebook server to start up
while 1:
line = nb_server.stdout.readline().decode('utf-8').strip()
if not line:
continue
print(line)
if 'The Jupyter Notebook is running at: http://localhost:8888/' in line:
break
if 'is already in use' in line:
print("Pid: {}".format(nb_server.pid))
os.killpg(os.getpgid(nb_server.pid), signal.SIGTERM)
# nb_server.terminate()
raise ValueError(
'The port 8888 was already taken, kill running notebook servers'
)
def readlines():
"""Print the notebook server output."""
while 1:
line = nb_server.stdout.readline().decode('utf-8').strip()
if line:
print(line)
thread = threading.Thread(target=readlines)
thread.setDaemon(True)
thread.start()
# time.sleep(15)
test_command = ['grunt', 'test']
resp = 1
try:
print("Jupyter server started, starting test script.")
resp = subprocess.check_call(test_command, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
pass
finally:
print("Done running tests, killing server.")
print("Pid: {}".format(nb_server.pid))
os.killpg(os.getpgid(nb_server.pid), signal.SIGTERM)
# nb_server.terminate()
sys.exit(resp)
| # Adapted from a Karma test startup script
# developebd by the Jupyter team here;
# https://github.com/jupyter/jupyter-js-services/blob/master/test/run_test.py
#
from __future__ import print_function
import subprocess
import sys
import argparse
import threading
import time
KARMA_PORT = 9876
argparser = argparse.ArgumentParser(
description='Run KBase Narrative unit tests'
)
argparser.add_argument('-b', '--browsers', default='Firefox',
help="Browsers to use for Karma test")
argparser.add_argument('-d', '--debug', action='store_true',
help="Whether to enter debug mode in Karma")
options = argparser.parse_args(sys.argv[1:])
nb_command = ['kbase-narrative', '--no-browser', '--NotebookApp.allow_origin="*"']
if not hasattr(sys, 'real_prefix'):
nb_command[0] = 'narrative-venv/bin/kbase-narrative'
nb_server = subprocess.Popen(nb_command, shell=False, stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
# wait for notebook server to start up
while 1:
line = nb_server.stdout.readline().decode('utf-8').strip()
if not line:
continue
print(line)
if 'The Jupyter Notebook is running at: http://localhost:8888/' in line:
break
if 'is already in use' in line:
raise ValueError(
'The port 8888 was already taken, kill running notebook servers'
)
def readlines():
"""Print the notebook server output."""
while 1:
line = nb_server.stdout.readline().decode('utf-8').strip()
if line:
print(line)
thread = threading.Thread(target=readlines)
thread.setDaemon(True)
thread.start()
# time.sleep(15)
test_command = ['grunt', 'test']
resp = 1
try:
print("Jupyter server started, starting test script.")
resp = subprocess.check_call(test_command, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
pass
finally:
print("Done running tests, killing server.")
nb_server.kill()
sys.exit(resp)
| mit | Python |
36da09eae8e70afff6dd98c234da95223d53056e | Add getStock test. | LegionXI/pydarkstar,AdamGagorik/pydarkstar | tests/auction/query.py | tests/auction/query.py | """
.. moduleauthor:: Adam Gagorik <adam.gagorik@gmail.com>
"""
import unittest
import pydarkstar.logutils
import pydarkstar.database
import pydarkstar.auction.query
import pydarkstar.rc
pydarkstar.logutils.setDebug()
class TestQuery(unittest.TestCase):
def setUp(self):
self.db = pydarkstar.database.Database.pymysql(**pydarkstar.rc.sql)
def test_getStock(self):
self.assertTrue(False)
if __name__ == '__main__':
unittest.main() | """
.. moduleauthor:: Adam Gagorik <adam.gagorik@gmail.com>
"""
import unittest
import pydarkstar.logutils
import pydarkstar.database
import pydarkstar.auction.query
import pydarkstar.rc
pydarkstar.logutils.setDebug()
class TestQuery(unittest.TestCase):
def setUp(self):
self.db = pydarkstar.database.Database.pymysql(**pydarkstar.rc.sql)
if __name__ == '__main__':
unittest.main() | mit | Python |
18677b16d85722032c8d92e287b028b3012b4651 | use keyword arguments | praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo | molo/core/migrations/0073_run_wagtail_migration_before_core_34.py | molo/core/migrations/0073_run_wagtail_migration_before_core_34.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.core.management.sql import emit_pre_migrate_signal
class Migration(migrations.Migration):
"""
Migration 34 needs migration 0040 from wagtail core
and this Migration will run wagtail migration before
molo core migration 34
"""
def run_wagtail_migration_before_core_34(apps, schema_editor):
db_alias = schema_editor.connection.alias
emit_pre_migrate_signal(verbosity=2, interactive=False, db=db_alias)
dependencies = [
('wagtailcore', '0040_page_draft_title'),
('core', '0072_fb_tracking_id'),
('core', '0033_bannerindexpage_footerindexpage_sectionindexpage'),
]
operations = [
migrations.RunPython(run_wagtail_migration_before_core_34),
]
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.core.management.sql import emit_pre_migrate_signal
class Migration(migrations.Migration):
"""
Migration 34 needs migration 0040 from wagtail core
and this Migration will run wagtail migration before
molo core migration 34
"""
def run_wagtail_migration_before_core_34(apps, schema_editor):
db_alias = schema_editor.connection.alias
emit_pre_migrate_signal(2, False, db_alias)
dependencies = [
('wagtailcore', '0040_page_draft_title'),
('core', '0072_fb_tracking_id'),
('core', '0033_bannerindexpage_footerindexpage_sectionindexpage'),
]
operations = [
migrations.RunPython(run_wagtail_migration_before_core_34),
]
| bsd-2-clause | Python |
f431924ccfeaaea69fb82df3a61a71e5bbab8df2 | Add django.request to default excluded loggers | akheron/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,recht/raven-python,smarkets/raven-python,getsentry/raven-python,ronaldevers/raven-python,someonehan/raven-python,Photonomie/raven-python,hzy/raven-python,arthurlogilab/raven-python,johansteffner/raven-python,icereval/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,jmagnusson/raven-python,recht/raven-python,johansteffner/raven-python,jmp0xf/raven-python,dbravender/raven-python,someonehan/raven-python,jbarbuto/raven-python,arthurlogilab/raven-python,percipient/raven-python,akalipetis/raven-python,inspirehep/raven-python,smarkets/raven-python,jmp0xf/raven-python,collective/mr.poe,akalipetis/raven-python,lepture/raven-python,percipient/raven-python,akheron/raven-python,jmp0xf/raven-python,lepture/raven-python,ewdurbin/raven-python,jbarbuto/raven-python,recht/raven-python,nikolas/raven-python,ronaldevers/raven-python,akheron/raven-python,icereval/raven-python,arthurlogilab/raven-python,nikolas/raven-python,inspirehep/raven-python,hzy/raven-python,getsentry/raven-python,Photonomie/raven-python,smarkets/raven-python,nikolas/raven-python,danriti/raven-python,dbravender/raven-python,ronaldevers/raven-python,jbarbuto/raven-python,jbarbuto/raven-python,icereval/raven-python,Photonomie/raven-python,hzy/raven-python,someonehan/raven-python,ewdurbin/raven-python,nikolas/raven-python,arthurlogilab/raven-python,inspirehep/raven-python,icereval/raven-python,akalipetis/raven-python,inspirehep/raven-python,johansteffner/raven-python,danriti/raven-python,smarkets/raven-python,jmagnusson/raven-python,dbravender/raven-python,jmagnusson/raven-python,lepture/raven-python,danriti/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,ewdurbin/raven-python,Goldmund-Wyldebeast-Wunderliebe/raven-python,getsentry/raven-python,percipient/raven-python | raven/conf/__init__.py | raven/conf/__init__.py | """
raven.conf
~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import logging
from raven.utils.urlparse import urlparse
__all__ = ('load', 'setup_logging')
EXCLUDE_LOGGER_DEFAULTS = (
'raven',
'gunicorn',
'south',
'sentry.errors',
'django.request',
)
# TODO (vng): this seems weirdly located in raven.conf. Seems like
# it's really a part of raven.transport.TransportRegistry
# Not quite sure what to do with this
def load(dsn, scope=None, transport_registry=None):
"""
Parses a Sentry compatible DSN and loads it
into the given scope.
>>> import raven
>>> dsn = 'https://public_key:secret_key@sentry.local/project_id'
>>> # Apply configuration to local scope
>>> raven.load(dsn, locals())
>>> # Return DSN configuration
>>> options = raven.load(dsn)
"""
if not transport_registry:
from raven.transport import TransportRegistry, default_transports
transport_registry = TransportRegistry(default_transports)
url = urlparse(dsn)
if not transport_registry.supported_scheme(url.scheme):
raise ValueError('Unsupported Sentry DSN scheme: %r' % url.scheme)
if scope is None:
scope = {}
scope_extras = transport_registry.compute_scope(url, scope)
scope.update(scope_extras)
return scope
def setup_logging(handler, exclude=EXCLUDE_LOGGER_DEFAULTS):
"""
Configures logging to pipe to Sentry.
- ``exclude`` is a list of loggers that shouldn't go to Sentry.
For a typical Python install:
>>> from raven.handlers.logging import SentryHandler
>>> client = Sentry(...)
>>> setup_logging(SentryHandler(client))
Within Django:
>>> from raven.contrib.django.handlers import SentryHandler
>>> setup_logging(SentryHandler())
Returns a boolean based on if logging was configured or not.
"""
logger = logging.getLogger()
if handler.__class__ in map(type, logger.handlers):
return False
logger.addHandler(handler)
# Add StreamHandler to sentry's default so you can catch missed exceptions
for logger_name in exclude:
logger = logging.getLogger(logger_name)
logger.propagate = False
logger.addHandler(logging.StreamHandler())
return True
| """
raven.conf
~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import logging
from raven.utils.urlparse import urlparse
__all__ = ('load', 'setup_logging')
# TODO (vng): this seems weirdly located in raven.conf. Seems like
# it's really a part of raven.transport.TransportRegistry
# Not quite sure what to do with this
def load(dsn, scope=None, transport_registry=None):
"""
Parses a Sentry compatible DSN and loads it
into the given scope.
>>> import raven
>>> dsn = 'https://public_key:secret_key@sentry.local/project_id'
>>> # Apply configuration to local scope
>>> raven.load(dsn, locals())
>>> # Return DSN configuration
>>> options = raven.load(dsn)
"""
if not transport_registry:
from raven.transport import TransportRegistry, default_transports
transport_registry = TransportRegistry(default_transports)
url = urlparse(dsn)
if not transport_registry.supported_scheme(url.scheme):
raise ValueError('Unsupported Sentry DSN scheme: %r' % url.scheme)
if scope is None:
scope = {}
scope_extras = transport_registry.compute_scope(url, scope)
scope.update(scope_extras)
return scope
def setup_logging(handler, exclude=['raven',
'gunicorn',
'south',
'sentry.errors']):
"""
Configures logging to pipe to Sentry.
- ``exclude`` is a list of loggers that shouldn't go to Sentry.
For a typical Python install:
>>> from raven.handlers.logging import SentryHandler
>>> client = Sentry(...)
>>> setup_logging(SentryHandler(client))
Within Django:
>>> from raven.contrib.django.handlers import SentryHandler
>>> setup_logging(SentryHandler())
Returns a boolean based on if logging was configured or not.
"""
logger = logging.getLogger()
if handler.__class__ in map(type, logger.handlers):
return False
logger.addHandler(handler)
# Add StreamHandler to sentry's default so you can catch missed exceptions
for logger_name in exclude:
logger = logging.getLogger(logger_name)
logger.propagate = False
logger.addHandler(logging.StreamHandler())
return True
| bsd-3-clause | Python |
f661314e2fa6da1008cf8dbff221ea869a785485 | Add some doc | Mapkin/wordutils | wordutils/utils.py | wordutils/utils.py | from __future__ import division
def split_num(n, s):
"""
Split n into groups of size s numbers starting from the least
significant digit
>>> split_num(123, 2)
[1, 23]
>>> split_num(12345, 3)
[12, 345]
>>> split_num(123, 4)
[123]
"""
groups = []
div = 10 ** s
while n:
groups.append(n % div)
n //= div
groups.reverse()
return groups
| from __future__ import division
def split_num(n, s):
"""
Split n into groups of s numbers
>>> split_num(123, 2)
[1, 23]
>>> split_num(12345, 3)
[12, 345]
>>> split_num(123, 4)
[123]
"""
groups = []
div = 10 ** s
while n:
groups.append(n % div)
n //= div
groups.reverse()
return groups
| mit | Python |
b5cd3ef8033b99d45f6684442c87945de4f32b8f | Update RSA.py | orlovcs/Python-RSA | RSA.py | RSA.py |
# Make sure both primes just in case
def phi(primeone, primetwo):
if primeCheck(primeone) and primeCheck(primetwo):
return (primeone - 1) * (primetwo - 1)
# Reads in ints
def primeCheck(prime):
if prime > 1:
for i in range(2,prime):
if (prime % i == 0):
return False
else:
return True
else:
return False
def publickeys():
p = input("Enter a large distinct prime p: ")
q = input("Enter a large distinct prime q: ")
p = int(p)
q = int(q)
while p==q or not primeCheck(p) or not primeCheck(q) or p <=100 or q <= 100:
if p==q:
print("Error: numbers are identical")
if not primeCheck(p):
print("Error: p is not a prime")
if not primeCheck(q):
print("Error: q is not a prime")
if p <= 100:
print("Error: p must be larger than 100")
if q <= 100:
print("Error: q must be larger than 100")
p = input("Enter a large distinct prime p: ")
p = int(p)
q = input("Enter a large distinct prime q: ")
q = int(q)
n = p*q
phiN = phi(p,q)
print("Your p value is:",p)
print("Your q value is:",q)
print("Your n value is:",n)
print("Your phi value is:",phiN)
e = input("Enter a value greater than 1 and less than phi:")
e = int(e)
while e >= phiN or e <= 1 or math.gcd(e,phiN) != 1:
if e >= phiN:
print("Error: e is too large")
if e <= 1:
print("Error: e is too small")
if math.gcd(e,phiN) != 1:
print("Error: e and phi have a non-one common denominator")
e = input("Enter a value greater than 1 and less than phi:" )
e = int(e)
print("Your e value is:",e)
return p,q,n,e
|
# Make sure both primes just in case
def phi(primeone, primetwo):
if primeCheck(primeone) and primeCheck(primetwo):
return (primeone - 1) * (primetwo - 1)
# Reads in ints
def primeCheck(prime):
if prime > 1:
for i in range(2,prime):
if (prime % i == 0):
return False
else:
return True
else:
return False
def publickeys():
p = input("Enter a large distinct prime p: ")
q = input("Enter a large distinct prime q: ")
p = int(p)
q = int(q)
while p==q or not primeCheck(p) or not primeCheck(q) or p <=100 or q <= 100:
if p==q:
print("Error: numbers are identical")
if not primeCheck(p):
print("Error: p is not a prime")
if not primeCheck(q):
print("Error: q is not a prime")
if p <= 100:
print("Error: p must be larger than 100")
if q <= 100:
print("Error: q must be larger than 100")
p = input("Enter a large distinct prime p: ")
p = int(p)
q = input("Enter a large distinct prime q: ")
q = int(q)
n = p*q
phiN = phi(p,q)
print("Your p value is:",p)
print("Your q value is:",q)
print("Your n value is:",n)
print("Your phi value is:",phiN)
e = input("Enter a value greater than 1 and less than phi:")
e = int(e)
while e >= phiN or e <= 1 or math.gcd(e,phiN) != 1:
if e >= phiN:
print("Error: e is too large")
if e <= 1:
print("Error: e is too small")
if math.gcd(e,phiN) != 1:
print("Error: e and phi have a non-one common denominator")
e = input("Enter a value greater than 1 and less than phi:" )
e = int(e)
print("Your e value is:",e)
return p,q,n,e
| apache-2.0 | Python |
53b37016e74ad771094f063d84410697be6031aa | revert the last changes as they're not necessary and don't help. If one uses the right solr url everything works just fine | ZeitOnline/zeit.solr | src/zeit/solr/connection.py | src/zeit/solr/connection.py | # Copyright (c) 2009 gocept gmbh & co. kg
# See also LICENSE.txt
import hashlib
import lxml.etree
import lxml.html
import os.path
import pysolr
import urllib2
import zeit.solr.interfaces
import zope.app.appsetup.product
import zope.interface
class SolrConnection(pysolr.Solr):
# XXX this class is untested
zope.interface.implements(zeit.solr.interfaces.ISolr)
def update_raw(self, xml):
data = lxml.etree.tostring(xml, encoding='UTF-8', xml_declaration=True)
path = '%s/update/' % self.path
result = self._send_request(
'POST', path, data, {'Content-type': 'text/xml'})
return result
def _extract_error(self, response):
# patched to use HTML instead of XML parser, so it does not choke
# on <hr>-Tags, for example
et = lxml.html.parse(response)
return "[%s] %s" % (response.reason, et.findtext('body/h1'))
def _send_request(self, method, path, body=None, headers=None):
"""Override to use urllib2 instead of httplib directly for file urls.
This is used for testing only.
"""
if self.url.startswith('file://'):
assert method == 'GET' and not headers
additional_path = path[len(self.path):]
local_path = '/'.join(
(self.url[7:], hashlib.md5(additional_path).hexdigest()))
if not os.path.exists(local_path):
raise ValueError("Could not find %s while opening %s" % (
local_path, path))
return open(local_path).read()
return super(SolrConnection, self)._send_request(
method, path, body, headers)
@zope.interface.implementer(zeit.solr.interfaces.ISolr)
def solr_connection_factory():
config = zope.app.appsetup.product.getProductConfiguration('zeit.solr')
url = config.get('solr-url')
return SolrConnection(url)
| # Copyright (c) 2009 gocept gmbh & co. kg
# See also LICENSE.txt
import hashlib
import lxml.etree
import lxml.html
import os.path
import pysolr
import urllib2
import zeit.solr.interfaces
import zope.app.appsetup.product
import zope.interface
class SolrConnection(pysolr.Solr):
# XXX this class is untested
zope.interface.implements(zeit.solr.interfaces.ISolr)
def update_raw(self, xml):
data = lxml.etree.tostring(xml, encoding='UTF-8', xml_declaration=True)
path = '%s/update/' % self.path
result = self._send_request(
'POST', path, data, {'Content-type': 'text/xml;charset=UTF-8'})
result = lxml.objectify.fromstring(result)
status = result.get('status')
if status != '0':
raise pysolr.SolrError(status, result.text)
def _extract_error(self, response):
# patched to use HTML instead of XML parser, so it does not choke
# on <hr>-Tags, for example
et = lxml.html.parse(response)
return "[%s] %s" % (response.reason, et.findtext('body/h1'))
def _send_request(self, method, path, body=None, headers=None):
"""Override to use urllib2 instead of httplib directly for file urls.
This is used for testing only.
"""
if self.url.startswith('file://'):
assert method == 'GET' and not headers
additional_path = path[len(self.path):]
local_path = '/'.join(
(self.url[7:], hashlib.md5(additional_path).hexdigest()))
if not os.path.exists(local_path):
raise ValueError("Could not find %s while opening %s" % (
local_path, path))
return open(local_path).read()
return super(SolrConnection, self)._send_request(
method, path, body, headers)
@zope.interface.implementer(zeit.solr.interfaces.ISolr)
def solr_connection_factory():
config = zope.app.appsetup.product.getProductConfiguration('zeit.solr')
url = config.get('solr-url')
return SolrConnection(url)
| bsd-3-clause | Python |
ab8d011ef6f755bf90fb999d64d43da188db6eb9 | migrate `SimilarUserTestCase` to pytest #580 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | tests/lib/user/test_similarity.py | tests/lib/user/test_similarity.py | import pytest
from sqlalchemy import func
from pycroft.helpers.interval import starting_from
from pycroft.helpers.interval import closedopen, Interval
from pycroft.helpers.utc import DateTimeTz
from pycroft.lib import user as UserHelper
from pycroft.model.facilities import Room
from pycroft.model.user import RoomHistoryEntry, User
from tests import factories
from tests.legacy_base import FactoryDataTestBase
THRESHOLD = 0.6
@pytest.mark.parametrize("one,other", [
("Hans", "Hans_"),
(" Franz", "Franz"),
("Tobias Fuenke", "Tobias Fünke"),
("Tobias Fünke", "Tobias"),
("Richard Paul Astley", "Rick Astley"),
])
def test_similar_names(one, other):
assert UserHelper.are_names_similar(one, other, THRESHOLD)
@pytest.mark.parametrize("one,other", [
("Hans", "Definitiv ganz und gar nicht Hans"),
("Tobias Fuenke", "Fünke Tobias"),
("Lukas Juhrich der Große", "Lucas der geile Hecht"),
])
def test_nonsimilar_names(one, other):
assert not UserHelper.are_names_similar(one, other, THRESHOLD)
class TestSimilarUsers:
@pytest.fixture(scope="class")
def room(self, class_session) -> Room:
return factories.RoomFactory()
@pytest.fixture(scope="class")
def inhabitant(self, class_session, room) -> User:
return factories.UserFactory(room=room, name="Tobias Fuenke")
@pytest.fixture(scope="class")
def interval(self, utcnow) -> Interval[DateTimeTz]:
return starting_from(utcnow)
@pytest.fixture(scope="class", autouse=True)
def similar_former_inhabitant(self, class_session, room, interval) -> User:
user = factories.UserFactory(name="Tobias")
class_session.add(
RoomHistoryEntry(room=room, user=user, active_during=interval)
)
return user
@pytest.fixture(scope="class", autouse=True)
def nonsimilar_former_inhabitants(self, class_session, room, interval) -> None:
factories.UserFactory(room=room, name="Other dude")
class_session.add(
RoomHistoryEntry(
room=room,
user=factories.UserFactory(name="Yet someone else"),
active_during=interval,
)
)
def test_similar_users_found(self, room, inhabitant, similar_former_inhabitant):
assert set(UserHelper.find_similar_users("Tobias Fünke", room, THRESHOLD)) == {
inhabitant,
similar_former_inhabitant,
}
| import pytest
from sqlalchemy import func
from pycroft.helpers.interval import starting_from
from pycroft.lib import user as UserHelper
from pycroft.model.user import RoomHistoryEntry
from tests import factories
from tests.legacy_base import FactoryDataTestBase
THRESHOLD = 0.6
@pytest.mark.parametrize("one,other", [
("Hans", "Hans_"),
(" Franz", "Franz"),
("Tobias Fuenke", "Tobias Fünke"),
("Tobias Fünke", "Tobias"),
("Richard Paul Astley", "Rick Astley"),
])
def test_similar_names(one, other):
assert UserHelper.are_names_similar(one, other, THRESHOLD)
@pytest.mark.parametrize("one,other", [
("Hans", "Definitiv ganz und gar nicht Hans"),
("Tobias Fuenke", "Fünke Tobias"),
("Lukas Juhrich der Große", "Lucas der geile Hecht"),
])
def test_nonsimilar_names(one, other):
assert not UserHelper.are_names_similar(one, other, THRESHOLD)
class SimilarUserTestCase(FactoryDataTestBase):
def create_factories(self):
super().create_factories()
utcnow = self.session.query(func.current_timestamp()).scalar()
interval = starting_from(utcnow)
# We need a user in the same room
self.room = factories.RoomFactory()
self.similar_user_this_room = factories.UserFactory(room=self.room, name="Tobias Fuenke")
self.similar_user_room_history = factories.UserFactory(name="Tobias")
self.session.add(RoomHistoryEntry(room=self.room, user=self.similar_user_room_history,
active_during=interval))
# nonsimilar users (same room / room history)
factories.UserFactory(room=self.room, name="Other dude")
self.session.add(RoomHistoryEntry(room=self.room,
user=factories.UserFactory(name="Other dude"),
active_during=interval))
def test_similar_users_found(self):
assert UserHelper.find_similar_users("Tobias Fünke", self.room, THRESHOLD) \
== [self.similar_user_this_room, self.similar_user_room_history]
| apache-2.0 | Python |
55d6c5c7ea2e051c132477469c6e820ef76c1899 | change the test back | scopatz/regolith,scopatz/regolith | tests/test_commands.py | tests/test_commands.py | import subprocess
BILLINGE_TEST = False # special tests for Billinge group, switch it to False before push to remote
def test_fs_to_mongo(make_db):
if BILLINGE_TEST:
from pathlib import Path
repo = str(Path(__file__).parent.parent.parent.joinpath('rg-db-group', 'local'))
else:
repo = make_db
cp = subprocess.run(['regolith', 'fs-to-mongo'], cwd=repo)
assert cp.returncode == 0
| import subprocess
BILLINGE_TEST = False # special tests for Billinge group, switch it to False before push to remote
def test_fs_to_mongo(make_db):
if BILLINGE_TEST:
from pathlib import Path
repo = str(Path(__file__).parent.parent.parent.joinpath('rg-db-group', 'local'))
else:
repo = make_db
cp = subprocess.run(['regolith', 'fs-to-mongo', '--uri', "mongodb+srv://stao:e=2.71828E00@cluster0-txgoy.mongodb.net/rg-db-group?retryWrites=true&w=majority"], cwd=repo)
assert cp.returncode == 0
| cc0-1.0 | Python |
d8396a27bbaf7b302cc001862abf600479045487 | Split off the pol cal | e-koch/canfar_scripts,e-koch/canfar_scripts | EVLA_pipeline1.3.0/EVLA_run_all_mixedsetup.py | EVLA_pipeline1.3.0/EVLA_run_all_mixedsetup.py |
import sys
import os
import numpy as np
import copy
'''
EVLA pipeline running for mixed setups.
Applies the first few steps of the pipeline up to basic flagging
(shadowing, zeros, ...). The continuum and line spws are then split
into their own directories. The full pipeline is then run on each. The lines
do not have rflag run on them.
'''
# Give the name of the ms. The folder containing the ms will be used for the
# splits
try:
vis = sys.argv[1]
path_to_pipeline = sys.argv[2]
except IndexError:
vis = raw_input("MS File?")
path_to_pipeline = raw_input("Path to pipeline?")
if vis[-1] == "/":
vis = vis[:-1]
if not path_to_pipeline[-1] == "/":
path_to_pipeline += "/"
# Chop off the .ms
SDM_name = vis[:-3]
SDM_name_orig = copy.copy(SDM_name)
# Set Hanning smoothing
myHanning = 'y'
# Figure out which are the lines and which are the continuum SPWs.
tb.open(vis + '/SPECTRAL_WINDOW')
bandwidths = tb.getcol('TOTAL_BANDWIDTH')
tb.close()
tb.open(vis + '/FIELD')
fields = tb.getcol('NAMES')
tb.close()
# Drop the pol cal.
fields = fields[np.where(fields != '0521+166=3C138')]
# Define a threshold between expected bandwidths
# Going with 10 MHz
thresh_bw = 1.0e7
spws = np.arange(0, len(bandwidths))
line_spws = [str(i) for i in spws[np.where(bandwidths < thresh_bw)]]
cont_spws = [str(i) for i in spws[np.where(bandwidths > thresh_bw)]]
print("Line SPWs: " + str(line_spws))
print("Coninuum SPWs: " + str(cont_spws))
print("Running initial pipeline.")
execfile(path_to_pipeline + "EVLA_pipeline_initial_mixed.py")
print("Splitting by SPW.")
os.mkdir('speclines')
split(vis=vis, outputvis="speclines/"+SDM_name+".speclines.ms",
spw=",".join(line_spws), datacolumn='DATA', field=",".join(fields))
os.mkdir('continuum')
split(vis=vis, outputvis="continuum/"+SDM_name+".continuum.ms",
spw=",".join(line_spws), datacolumn='DATA', field=",".join(fields))
print("Running full pipeline on the spectral lines.")
os.chdir("speclines")
SDM_name = SDM_name_orig+".speclines"
myHanning = 'n'
execfile(path_to_pipeline + "EVLA_pipeline.py")
print("Running full pipeline on the spectral lines.")
os.chdir("../continuum")
SDM_name = SDM_name_orig+".continuum"
myHanning = 'n'
execfile(path_to_pipeline + "EVLA_pipeline_continuum.py")
print("All done!")
|
import sys
import os
import numpy as np
from datetime import datetime
import copy
'''
EVLA pipeline running for mixed setups.
Applies the first few steps of the pipeline up to basic flagging
(shadowing, zeros, ...). The continuum and line spws are then split
into their own directories. The full pipeline is then run on each. The lines
do not have rflag run on them.
'''
# Give the name of the ms. The folder containing the ms will be used for the
# splits
try:
vis = sys.argv[1]
path_to_pipeline = sys.argv[2]
except IndexError:
vis = raw_input("MS File? : ")
path_to_pipeline = raw_input("Path to pipeline? : ")
if vis[-1] == "/":
vis = vis[:-1]
if not path_to_pipeline[-1] == "/":
path_to_pipeline += "/"
# Chop off the .ms
SDM_name = vis[:-3]
SDM_name_orig = copy.copy(SDM_name)
# Set Hanning smoothing
myHanning = 'y'
# Figure out which are the lines and which are the continuum SPWs.
tb.open(vis + '/SPECTRAL_WINDOW')
bandwidths = tb.getcol('TOTAL_BANDWIDTH')
tb.close()
# Define a threshold between expected bandwidths
# Going with 10 MHz
thresh_bw = 1.0e7
spws = np.arange(0, len(bandwidths))
line_spws = [str(i) for i in spws[np.where(bandwidths < thresh_bw)]]
cont_spws = [str(i) for i in spws[np.where(bandwidths > thresh_bw)]]
print("Line SPWs: " + str(line_spws))
print("Coninuum SPWs: " + str(cont_spws))
print("Running initial pipeline.")
execfile(path_to_pipeline + "EVLA_pipeline_initial_mixed.py")
print("Splitting by SPW.")
print("Starting at: " + str(datetime.now()))
os.mkdir('speclines')
split(vis=vis, outputvis="speclines/"+SDM_name+".speclines.ms",
spw=",".join(line_spws))
os.mkdir('continuum')
split(vis=vis, outputvis="continuum/"+SDM_name+".continuum.ms",
spw=",".join(line_spws))
print("Ending at: " + str(datetime.now()))
print("Running full pipeline on the spectral lines.")
print("Starting at: " + str(datetime.now()))
os.chdir("speclines")
SDM_name = SDM_name+".speclines.ms"
myHanning = 'n'
execfile(path_to_pipeline + "EVLA_pipeline.py")
print("Ending at: " + str(datetime.now()))
print("Running full pipeline on the spectral lines.")
print("Starting at: " + str(datetime.now()))
os.chdir("continuum")
SDM_name = SDM_name+".continuum.ms"
myHanning = 'n'
execfile(path_to_pipeline + "EVLA_pipeline_continuum.py")
print("Ending at: " + str(datetime.now()))
print("All done!")
| mit | Python |
45f84319feca0c655ad3c7def12915541b4b7036 | fix it | alingse/jsoncsv | tests/test_jsontool.py | tests/test_jsontool.py | # coding=utf-8
# author@alingse
# 2016.08.09
import unittest
from jsoncsv.jsontool import expand, restore
from jsoncsv.jsontool import is_array
class Testjsontool(unittest.TestCase):
def test_string(self):
s = "sss"
exp = expand(s)
_s = restore(exp)
self.assertEqual(s, _s)
def test_list(self):
s = ["sss", "ttt", 1, 2, ["3"]]
exp = expand(s)
_s = restore(exp)
self.assertListEqual(s, _s)
def test_dict(self):
s = {
"s": 1,
"w": 5,
"t": {
"m": 0,
"x": {
"y": "z"
}
}
}
exp = expand(s)
_s = restore(exp)
self.assertDictEqual(s, _s)
def test_complex(self):
s = [
{"s": 0},
{"t": ["2", {"x": "z"}]},
0,
"w",
["x", "g", 1]
]
exp = expand(s)
_s = restore(exp)
self.assertDictEqual(s[0], _s[0])
self.assertDictEqual(s[1], _s[1])
self.assertEqual(s[2], _s[2])
self.assertEqual(s[3], _s[3])
self.assertListEqual(s[4], _s[4])
def test_is_array(self):
assert is_array([0, 1, 2, 3])
assert is_array(['0', '1', '2', '3'])
assert not is_array([1, 2, 3])
assert not is_array(['0', 1, 2])
| # coding=utf-8
# author@alingse
# 2016.08.09
import unittest
from jsoncsv.jsontool import expand, restore
from jsoncsv.jsontool import is_array
class Testjsontool(unittest.TestCase):
def test_string(self):
s = "sss"
exp = expand(s)
_s = restore(exp)
self.assertEqual(s, _s)
def test_list(self):
s = ["sss", "ttt", 1, 2, ["3"]]
exp = expand(s)
_s = restore(exp)
self.assertListEqual(s, _s)
def test_dict(self):
s = {
"s": 1,
"w": 5,
"t": {
"m": 0,
"x": {
"y": "z"
}
}
}
exp = expand(s)
_s = restore(exp)
self.assertDictEqual(s, _s)
def test_complex(self):
s = [
{"s": 0},
{"t": ["2", {"x": "z"}]},
0,
"w",
["x", "g", 1]
]
exp = expand(s)
_s = restore(exp)
self.assertDictEqual(s[0], _s[0])
self.assertDictEqual(s[1], _s[1])
self.assertEqual(s[2], _s[2])
self.assertEqual(s[3], _s[3])
self.assertListEqual(s[4], _s[4])
def test_is_array(self):
assert is_array([0, 1, 2, 3])
assert is_array(['0', '1', '2', '3'])
assert not is_array([1, 2, 3])
assert not is_array(['0', 1, 2])
| apache-2.0 | Python |
6f9c797646cf1bf6ac9d6d6a57b80d5e603d0820 | Add another stupid tests for cli parser and handler resolver | beezz/pg_bawler,beezz/pg_bawler | tests/test_listener.py | tests/test_listener.py | #!/usr/bin/env python
import argparse
import os
import pytest
import pg_bawler.core
import pg_bawler.listener
def test_register_handlers():
listener = pg_bawler.core.ListenerMixin()
assert listener.register_handler(None) == 0
assert listener.register_handler(True) == 1
assert listener.unregister_handler(None)
assert not listener.unregister_handler(None)
def test_default_cli_parser():
parser = pg_bawler.listener.get_default_cli_args_parser()
assert isinstance(parser, argparse.ArgumentParser)
def test_resolve_handler():
handler = pg_bawler.listener.resolve_handler(
'pg_bawler.listener:default_handler')
assert handler is pg_bawler.listener.default_handler
@pytest.mark.asyncio
async def test_simple_listen():
class NotificationListener(
pg_bawler.core.BawlerBase,
pg_bawler.core.ListenerMixin
):
pass
class NotificationSender(
pg_bawler.core.BawlerBase,
pg_bawler.core.SenderMixin
):
pass
connection_params = dict(
dbname=os.environ.get('POSTGRES_DB', 'bawler_test'),
user=os.environ.get('POSTGRES_USER', 'postgres'),
host=os.environ.get('POSTGRES_HOST'),
password=os.environ.get('POSTGRES_PASSWORD', ''))
nl = NotificationListener(connection_params=connection_params)
ns = NotificationSender(connection_params=connection_params)
payload = 'aaa'
channel_name = 'pg_bawler_test'
await nl.register_channel(channel='pg_bawler_test')
await ns.send(channel=channel_name, payload=payload)
notification = await nl.get_notification()
assert notification.channel == channel_name
assert notification.payload == payload
| #!/usr/bin/env python
import os
import pytest
import pg_bawler.core
import pg_bawler.listener
def test_register_handlers():
listener = pg_bawler.core.ListenerMixin()
assert listener.register_handler(None) == 0
assert listener.register_handler(True) == 1
assert listener.unregister_handler(None)
assert not listener.unregister_handler(None)
@pytest.mark.asyncio
async def test_simple_listen():
class NotificationListener(
pg_bawler.core.BawlerBase,
pg_bawler.core.ListenerMixin
):
pass
class NotificationSender(
pg_bawler.core.BawlerBase,
pg_bawler.core.SenderMixin
):
pass
connection_params = dict(
dbname=os.environ.get('POSTGRES_DB', 'bawler_test'),
user=os.environ.get('POSTGRES_USER', 'postgres'),
host=os.environ.get('POSTGRES_HOST'),
password=os.environ.get('POSTGRES_PASSWORD', ''))
nl = NotificationListener(connection_params=connection_params)
ns = NotificationSender(connection_params=connection_params)
payload = 'aaa'
channel_name = 'pg_bawler_test'
await nl.register_channel(channel='pg_bawler_test')
await ns.send(channel=channel_name, payload=payload)
notification = await nl.get_notification()
assert notification.channel == channel_name
assert notification.payload == payload
| bsd-3-clause | Python |
e812f0d742b73ffb7e3b4c3d1474a7d71ababe0e | Add test_filesource_image | elaOnMars/logya,yaph/logya,elaOnMars/logya,elaOnMars/logya,yaph/logya | tests/test_template.py | tests/test_template.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logya.core
import logya.template
L = logya.core.Logya(dir_site='logya/sites/docs/')
L.build()
# Test the functions called in templates.
env_globals = logya.template.env.globals
def test_get_docs():
doc_count = len(L.doc_index)
assert doc_count > 1
assert len(env_globals['get_docs']()) == doc_count
assert len(env_globals['get_docs']('')) == doc_count
assert len(env_globals['get_docs']('/')) == doc_count
assert len(env_globals['get_docs'](url='')) == doc_count
assert len(env_globals['get_docs'](url='/')) == doc_count
def test_filesource():
text = env_globals['filesource']('site.yaml')
assert 'base_url:' in text
assert 'collections:' in text
def test_filesource_image():
image = env_globals['filesource']('static/img/logya.png') | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logya.core
import logya.template
L = logya.core.Logya(dir_site='logya/sites/base/')
L.build()
# Test the functions called in templates.
env_globals = logya.template.env.globals
def test_get_docs():
doc_count = len(L.doc_index)
assert doc_count > 1
assert len(env_globals['get_docs']()) == doc_count
assert len(env_globals['get_docs']('')) == doc_count
assert len(env_globals['get_docs']('/')) == doc_count
assert len(env_globals['get_docs'](url='')) == doc_count
assert len(env_globals['get_docs'](url='/')) == doc_count
def test_filesource():
text = env_globals['filesource']('site.yaml')
assert 'base_url: http://localhost:8080' in text
assert 'collections:' in text | mit | Python |
ccad5150e621067ef637104f9a20371bb4533ce8 | Use wal functions. | dylanaraps/pywal,dylanaraps/pywal,dylanaraps/pywal | tests/test_template.py | tests/test_template.py | """Test export functions."""
import unittest
import pathlib
from pywal import wal
from pywal import util
# Import colors.
COLORS = util.read_file_json("tests/test_files/test_file.json")
class TestExportColors(unittest.TestCase):
"""Test the export functions."""
def test_template(self):
"""> Test substitutions in template file."""
# Merge both dicts so we can access their
# values simpler.
COLORS["colors"].update(COLORS["special"])
output_dir = pathlib.Path("/tmp")
template_dir = pathlib.Path("tests/test_files/templates")
wal.export_all_templates(COLORS, output_dir, template_dir)
result = pathlib.Path("/tmp/test_template").is_file()
self.assertTrue(result)
content = pathlib.Path("/tmp/test_template").read_text()
self.assertEqual(content, '\n'.join(["test1 #1F211E",
"test2 #1F211E",
"test3 31,33,30", ""]))
if __name__ == "__main__":
unittest.main()
| """Test export functions."""
import unittest
import pathlib
from pywal import template
from pywal import util
# Import colors.
COLORS = util.read_file_json("tests/test_files/test_file.json")
class TestExportColors(unittest.TestCase):
"""Test the export functions."""
def test_template(self):
"""> Test substitutions in template file."""
# Merge both dicts so we can access their
# values simpler.
COLORS["colors"].update(COLORS["special"])
output_dir = pathlib.Path("/tmp")
template_dir = pathlib.Path("tests/test_files/templates")
template.export_all_templates(COLORS, output_dir, template_dir)
result = pathlib.Path("/tmp/test_template").is_file()
self.assertTrue(result)
content = pathlib.Path("/tmp/test_template").read_text()
self.assertEqual(content, '\n'.join(["test1 #1F211E",
"test2 #1F211E",
"test3 31,33,30", ""]))
if __name__ == "__main__":
unittest.main()
| mit | Python |
f1cca406a265715428d5279b556987ac6ebe9db1 | use cli.formats(). | steenzout/python-barcode | tests/unit/cli_test.py | tests/unit/cli_test.py | # -*- coding: utf-8 -*-
"""Test cases for the steenzout.barcode.cli package."""
import abc
import pytest
import unittest
from click.testing import CliRunner
from steenzout import barcode
from steenzout.barcode import cli
@pytest.fixture
def runner():
return CliRunner()
class ClickTestCase(unittest.TestCase):
"""Abstract class to be used to test click commands."""
__metaclass__ = abc.ABCMeta
def setUp(self):
self.runner = CliRunner()
class EncodingsTestCase(ClickTestCase):
"""Test the encodings command."""
def test(self):
result = self.runner.invoke(cli.cli, ('encodings',), catch_exceptions=False)
assert not result.exception
for enc in barcode.encodings():
assert enc in result.output
class FormatsTestCase(ClickTestCase):
"""Test the formats command."""
def test(self):
result = self.runner.invoke(cli.cli, ('formats',), catch_exceptions=False)
assert not result.exception
for fmt in barcode.formats():
assert fmt in result.output
class GenerateTestCase(ClickTestCase):
"""Test the generate command."""
def test_svg(self):
result = self.runner.invoke(
cli.cli, (
'generate', '-e', 'code128', 'a.txt', 'a.svg'
), catch_exceptions=False)
assert not result.exception
def test_svg(self):
result = self.runner.invoke(
cli.cli, (
'generate', '-e', 'code128', 'a.txt', 'a.png'
), catch_exceptions=False)
assert not result.exception
| # -*- coding: utf-8 -*-
"""Test cases for the steenzout.barcode.cli package."""
import abc
import pytest
import unittest
from click.testing import CliRunner
from steenzout import barcode
from steenzout.barcode import cli
@pytest.fixture
def runner():
return CliRunner()
class ClickTestCase(unittest.TestCase):
"""Abstract class to be used to test click commands."""
__metaclass__ = abc.ABCMeta
def setUp(self):
self.runner = CliRunner()
class EncodingsTestCase(ClickTestCase):
"""Test the encodings command."""
def test(self):
result = self.runner.invoke(cli.cli, ('encodings',), catch_exceptions=False)
assert not result.exception
for enc in barcode.encodings():
assert enc in result.output
class FormatsTestCase(ClickTestCase):
"""Test the formats command."""
def test(self):
result = self.runner.invoke(cli.cli, ('formats',), catch_exceptions=False)
assert not result.exception
for fmt in cli.IMG_FORMATS:
assert fmt in result.output
class GenerateTestCase(ClickTestCase):
"""Test the generate command."""
def test_svg(self):
result = self.runner.invoke(
cli.cli, (
'generate', '-e', 'code128', 'a.txt', 'a.svg'
), catch_exceptions=False)
assert not result.exception
def test_svg(self):
result = self.runner.invoke(
cli.cli, (
'generate', '-e', 'code128', 'a.txt', 'a.png'
), catch_exceptions=False)
assert not result.exception
| mit | Python |
5bbe47b842f04bd315601a260a974c517fa60ce9 | Update diff test case | PinaeOS/py-text,interhui/py-text | text_test/diff_test.py | text_test/diff_test.py | # coding=utf-8
import unittest
from text import diff
from text import text_file
class DiffTest(unittest.TestCase):
def test_compare_text(self):
diff_text_src = text_file.read_file('test_file/diff_text_src')
diff_text_dst = text_file.read_file('test_file/diff_text_dst')
result = diff.compare_text(diff_text_src, diff_text_dst)
summary = diff.stat_compare(result)
self.assertEqual(summary.get('equal'), 3)
self.assertEqual(summary.get('delete'), 1)
self.assertEqual(summary.get('insert'), 1)
self.assertEqual(summary.get('replace'), 1)
src_text = result.get('src-text')
dst_text = result.get('dst-text')
self.assertEqual(len(src_text), 9)
self.assertEqual(len(dst_text), 9)
def test_diff_text(self):
diff_text_src = text_file.read_file('test_file/diff_text_src')
diff_text_dst = text_file.read_file('test_file/diff_text_dst')
result = diff.diff_text(diff_text_src, diff_text_dst)
self.assertEqual(len(result), 6) #equal:3, delete:1, insert:1, replace:1
if __name__ == '__main__':
# import sys;sys.argv = ['', 'Test.testName']
unittest.main()
| # coding=utf-8
import unittest
from text import diff
from text import text_file
class DiffTest(unittest.TestCase):
def test_compare_text(self):
diff_text_src = text_file.read('test_file/diff_text_src')
diff_text_dst = text_file.read('test_file/diff_text_dst')
result = diff.compare_text(diff_text_src, diff_text_dst)
summary = diff.stat_compare(result)
self.assertEqual(summary.get('equal'), 3)
self.assertEqual(summary.get('delete'), 1)
self.assertEqual(summary.get('insert'), 1)
self.assertEqual(summary.get('replace'), 1)
src_text = result.get('src-text')
dst_text = result.get('dst-text')
self.assertEqual(len(src_text), 9)
self.assertEqual(len(dst_text), 9)
def test_diff_text(self):
diff_text_src = text_file.read('test_file/diff_text_src')
diff_text_dst = text_file.read('test_file/diff_text_dst')
result = diff.diff_text(diff_text_src, diff_text_dst)
self.assertEqual(len(result), 6) #equal:3, delete:1, insert:1, replace:1
if __name__ == '__main__':
# import sys;sys.argv = ['', 'Test.testName']
unittest.main()
| apache-2.0 | Python |
a0ca9fba5bb3137ac094cacbf8b863a101335a62 | Use new readme file name | Cisco-AMP/amp4e_splunk_events_input,Cisco-AMP/amp4e_splunk_events_input,Cisco-AMP/amp4e_splunk_events_input,Cisco-AMP/amp4e_splunk_events_input | release/util/abstract_releaser.py | release/util/abstract_releaser.py | import os
import shutil
from distutils.dir_util import copy_tree
class AbstractReleaser(object):
DIRS_TO_ARCHIVE = []
APP_NAME = ''
EXCLUDED_FILES = ['local.meta', 'requirements-splunk.txt', '*.pyc', '*.pyo']
SPLUNKBASE_README = 'README_SPLUNKBASE.md'
LICENSE = 'LICENSE'
def __init__(self, app_dir):
self.app_dir = app_dir
@property
def _tmp_dir(self):
return os.path.join(self.app_dir, 'tmp')
@property
def _tmp_app_dir(self):
return os.path.join(self._tmp_dir, self.APP_NAME)
@property
def _readme_splunkbase_path(self):
return os.path.join(self.app_dir, self.SPLUNKBASE_README)
@property
def _license_path(self):
return os.path.join(self.app_dir, self.LICENSE)
@property
def _excluded_files_arguments(self):
return ' '.join(map(lambda f: "--exclude='{}'".format(f), self.EXCLUDED_FILES))
def copy_dirs(self):
for d in self.DIRS_TO_ARCHIVE:
copy_tree(os.path.join(self.app_dir, d), os.path.join(self._tmp_app_dir, d))
def copy_splunk_readme(self, dest_file='README.md'):
shutil.copyfile(self._readme_splunkbase_path, os.path.join(self._tmp_app_dir, dest_file))
def copy_license(self):
shutil.copyfile(self._license_path, os.path.join(self._tmp_app_dir, self.LICENSE))
def _remove_tmp_app_dir(self):
if os.path.isdir(self._tmp_app_dir):
shutil.rmtree(self._tmp_app_dir)
def _create_tmp_app_dir(self):
if not os.path.isdir(self._tmp_app_dir):
os.makedirs(self._tmp_app_dir)
| import os
import shutil
from distutils.dir_util import copy_tree
class AbstractReleaser(object):
DIRS_TO_ARCHIVE = []
APP_NAME = ''
EXCLUDED_FILES = ['local.meta', 'requirements-splunk.txt', '*.pyc', '*.pyo']
SPLUNKBASE_README = 'README_sb.md'
LICENSE = 'LICENSE'
def __init__(self, app_dir):
self.app_dir = app_dir
@property
def _tmp_dir(self):
return os.path.join(self.app_dir, 'tmp')
@property
def _tmp_app_dir(self):
return os.path.join(self._tmp_dir, self.APP_NAME)
@property
def _readme_splunkbase_path(self):
return os.path.join(self.app_dir, self.SPLUNKBASE_README)
@property
def _license_path(self):
return os.path.join(self.app_dir, self.LICENSE)
@property
def _excluded_files_arguments(self):
return ' '.join(map(lambda f: "--exclude='{}'".format(f), self.EXCLUDED_FILES))
def copy_dirs(self):
for d in self.DIRS_TO_ARCHIVE:
copy_tree(os.path.join(self.app_dir, d), os.path.join(self._tmp_app_dir, d))
def copy_splunk_readme(self, dest_file='README.md'):
shutil.copyfile(self._readme_splunkbase_path, os.path.join(self._tmp_app_dir, dest_file))
def copy_license(self):
shutil.copyfile(self._license_path, os.path.join(self._tmp_app_dir, self.LICENSE))
def _remove_tmp_app_dir(self):
if os.path.isdir(self._tmp_app_dir):
shutil.rmtree(self._tmp_app_dir)
def _create_tmp_app_dir(self):
if not os.path.isdir(self._tmp_app_dir):
os.makedirs(self._tmp_app_dir)
| bsd-2-clause | Python |
be8907db3eac1c96caa62154775a6ef88c65a128 | add additional fields to notify_observer in disabled state | open-cloud/xos,cboling/xos,wathsalav/xos,zdw/xos,xmaruto/mcord,cboling/xos,xmaruto/mcord,cboling/xos,wathsalav/xos,zdw/xos,wathsalav/xos,wathsalav/xos,zdw/xos,zdw/xos,cboling/xos,opencord/xos,jermowery/xos,jermowery/xos,jermowery/xos,xmaruto/mcord,cboling/xos,xmaruto/mcord,opencord/xos,open-cloud/xos,opencord/xos,open-cloud/xos,jermowery/xos | planetstack/observer/__init__.py | planetstack/observer/__init__.py | from planetstack.config import Config
try:
observer_disabled = Config().observer_disabled
except:
observer_disabled = False
print_once = True
if (not observer_disabled):
from .event_manager import EventSender
def notify_observer(model=None, delete=False, pk=None, model_dict={}):
try:
if (model and delete):
if hasattr(model,"__name__"):
modelName = model.__name__
else:
modelName = model.__class__.__name__
EventSender().fire(delete_flag = delete, model = modelName, pk = pk, model_dict=model_dict)
else:
EventSender().fire()
except Exception,e:
print "Exception in Observer. This should not disrupt the front end. %s"%str(e)
else:
def notify_observer(model=None, delete=False, pk=None, model_dict={}):
if (print_once):
print "The observer is disabled"
print_once = False
return
| from planetstack.config import Config
try:
observer_disabled = Config().observer_disabled
except:
observer_disabled = False
print_once = True
if (not observer_disabled):
from .event_manager import EventSender
def notify_observer(model=None, delete=False, pk=None, model_dict={}):
try:
if (model and delete):
if hasattr(model,"__name__"):
modelName = model.__name__
else:
modelName = model.__class__.__name__
EventSender().fire(delete_flag = delete, model = modelName, pk = pk, model_dict=model_dict)
else:
EventSender().fire()
except Exception,e:
print "Exception in Observer. This should not disrupt the front end. %s"%str(e)
else:
def notify_observer(model=None, delete=False):
# if (print_once):
# print "The observer is disabled"
# print_once = False
return
| apache-2.0 | Python |
0f62d65355a7353449528ba497fa6e34422ca38b | Bump version to 0.7.3 | adelq/thermopy | thermochem/__init__.py | thermochem/__init__.py | __version__ = '0.7.3'
| __version__ = '0.7.2'
| bsd-3-clause | Python |
4c14b38af7b14ab3ce2ff1e698f4642eab17971a | add version to package __init__ | Alerion/django-rpc,Alerion/django-rpc,Alerion/django-rpc | djangorpc/__init__.py | djangorpc/__init__.py | from __future__ import unicode_literals
__version__ = '0.3'
VERSION = __version__
from djangorpc.responses import Error, Msg, RpcResponse, RpcHttpResponse
from djangorpc.router import RpcRouter
__all__ = ('Error', 'Msg', 'RpcResponse', 'RpcRouter', 'RpcHttpResponse')
| from __future__ import unicode_literals
from djangorpc.responses import Error, Msg, RpcResponse, RpcHttpResponse
from djangorpc.router import RpcRouter
__all__ = ('Error', 'Msg', 'RpcResponse', 'RpcRouter', 'RpcHttpResponse')
| mit | Python |
c3f2ea775246bd152d4d62bcaa85fde4dd818197 | Write failing unit test for issue #3 | timothycrosley/frosted,mattcaldwell/frosted,hugovk/frosted,timothycrosley/frosted,hugovk/frosted,timothycrosley/frosted_original_fork | frosted/test/test_return_with_arguments_inside_generator.py | frosted/test/test_return_with_arguments_inside_generator.py |
from __future__ import absolute_import, division, print_function, unicode_literals
from sys import version_info
import pytest
from pies.overrides import *
from frosted import messages as m
from frosted.test.harness import TestCase
from .utils import flakes
@pytest.mark.skipif("version_info >= (3,)")
def test_return():
flakes('''
class a:
def b():
for x in a.c:
if x:
yield x
return a
''', m.ReturnWithArgsInsideGenerator)
@pytest.mark.skipif("version_info >= (3,)")
def test_returnNone():
flakes('''
def a():
yield 12
return None
''', m.ReturnWithArgsInsideGenerator)
@pytest.mark.skipif("version_info >= (3,)")
def test_returnYieldExpression():
flakes('''
def a():
b = yield a
return b
''', m.ReturnWithArgsInsideGenerator)
@pytest.mark.skipif("version_info >= (3,)")
def test_return_with_args_inside_generator_not_duplicated():
# doubly nested - should still only complain once
flakes('''
def f0():
def f1():
yield None
return None
''', m.ReturnWithArgsInsideGenerator)
# triple nested - should still only complain once
flakes('''
def f0():
def f1():
def f2():
yield None
return None
''', m.ReturnWithArgsInsideGenerator)
|
from __future__ import absolute_import, division, print_function, unicode_literals
from sys import version_info
import pytest
from pies.overrides import *
from frosted import messages as m
from frosted.test.harness import TestCase
from .utils import flakes
@pytest.mark.skipif("version_info >= (3,)")
def test_return():
flakes('''
class a:
def b():
for x in a.c:
if x:
yield x
return a
''', m.ReturnWithArgsInsideGenerator)
@pytest.mark.skipif("version_info >= (3,)")
def test_returnNone():
flakes('''
def a():
yield 12
return None
''', m.ReturnWithArgsInsideGenerator)
@pytest.mark.skipif("version_info >= (3,)")
def test_returnYieldExpression():
flakes('''
def a():
b = yield a
return b
''', m.ReturnWithArgsInsideGenerator)
| mit | Python |
175fa5181419e268292a3a8e032cef9eae318219 | Fix timezone issue with calendar event filtering. | Starbow/StarbowWebSite,Starbow/StarbowWebSite,Starbow/StarbowWebSite | starbowmodweb/site/views.py | starbowmodweb/site/views.py | from django.http import Http404
from django.shortcuts import render
from django.conf import settings
from datetime import datetime, timedelta
from starbowmodweb import mybb
from starbowmodweb.ladder.helpers import get_leaderboard
from starbowmodweb.ladder.models import BATTLENET_REGION_NA, BATTLENET_REGION_EU, BATTLENET_REGION_KR
def home(request):
now = datetime.now()
later = now+timedelta(seconds=30*86400)
upcoming_events = mybb.get_events_in_range("Default Calendar", now, later)[:7]
recent_articles = mybb.get_threads(forum_name="News and Announcements", count=7, orderby="mybb_threads.dateline", sort="DESC")
recent_discussions = mybb.get_threads(forum_name=settings.DISCUSSION_FORUMS, count=7, orderby="mybb_threads.dateline", sort="DESC")
ladder_na = get_leaderboard(region=BATTLENET_REGION_NA, orderby='ladder_points', sort="DESC", count=10)
ladder_eu = get_leaderboard(region=BATTLENET_REGION_EU, orderby='ladder_points', sort="DESC", count=10)
ladder_kr = get_leaderboard(region=BATTLENET_REGION_KR, orderby='ladder_points', sort="DESC", count=10)
return render(request, 'site_home.html', dict(
upcoming_events=upcoming_events,
recent_articles=recent_articles,
recent_discussions=recent_discussions,
ladder_na=ladder_na,
ladder_eu=ladder_eu,
ladder_kr=ladder_kr,
))
def view_streams(request):
return render(request, 'streams.html')
def view_news(request):
articles = mybb.get_threads(forum_name="News and Announcements", orderby="mybb_threads.dateline", sort="DESC")
return render(request, 'news.html', dict(articles=articles))
def view_calendar(request):
now = datetime.utcnow()
later = now + timedelta(seconds=30*86400)
events = mybb.get_events_in_range("Default Calendar", now, later)
return render(request, 'calendar.html', dict(events=events))
def about_page(request, name):
name = name.lower() or 'overview'
if name not in settings.ABOUT_PAGES:
raise Http404
return render(request, 'thread_page.html', dict(thread=mybb.get_thread(settings.ABOUT_PAGES[name][1])))
| from django.http import Http404
from django.shortcuts import render
from django.conf import settings
from datetime import datetime, timedelta
from starbowmodweb import mybb
from starbowmodweb.ladder.helpers import get_leaderboard
from starbowmodweb.ladder.models import BATTLENET_REGION_NA, BATTLENET_REGION_EU, BATTLENET_REGION_KR
def home(request):
now = datetime.now()
later = now+timedelta(seconds=30*86400)
upcoming_events = mybb.get_events_in_range("Default Calendar", now, later)[:7]
recent_articles = mybb.get_threads(forum_name="News and Announcements", count=7, orderby="mybb_threads.dateline", sort="DESC")
recent_discussions = mybb.get_threads(forum_name=settings.DISCUSSION_FORUMS, count=7, orderby="mybb_threads.dateline", sort="DESC")
ladder_na = get_leaderboard(region=BATTLENET_REGION_NA, orderby='ladder_points', sort="DESC", count=10)
ladder_eu = get_leaderboard(region=BATTLENET_REGION_EU, orderby='ladder_points', sort="DESC", count=10)
ladder_kr = get_leaderboard(region=BATTLENET_REGION_KR, orderby='ladder_points', sort="DESC", count=10)
return render(request, 'site_home.html', dict(
upcoming_events=upcoming_events,
recent_articles=recent_articles,
recent_discussions=recent_discussions,
ladder_na=ladder_na,
ladder_eu=ladder_eu,
ladder_kr=ladder_kr,
))
def view_streams(request):
return render(request, 'streams.html')
def view_news(request):
articles = mybb.get_threads(forum_name="News and Announcements", orderby="mybb_threads.dateline", sort="DESC")
return render(request, 'news.html', dict(articles=articles))
def view_calendar(request):
now = datetime.now()
later = now+timedelta(seconds=30*86400)
events = mybb.get_events_in_range("Default Calendar", now, later)
return render(request, 'calendar.html', dict(events=events))
def about_page(request, name):
name = name.lower() or 'overview'
if name not in settings.ABOUT_PAGES:
raise Http404
return render(request, 'thread_page.html', dict(thread=mybb.get_thread(settings.ABOUT_PAGES[name][1])))
| mit | Python |
6e288e276280b2f3a58ffd49d1f1aac3641f9600 | Update distmappings | fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,Fale/fedora-packages | fedoracommunity/search/distmappings.py | fedoracommunity/search/distmappings.py | # Global list of koji tags we care about
tags = ({'name': 'Rawhide', 'tag': 'f21'},
{'name': 'Fedora 20', 'tag': 'f20-updates'},
{'name': 'Fedora 20', 'tag': 'f20'},
{'name': 'Fedora 20 Testing', 'tag': 'f20-updates-testing'},
{'name': 'Fedora 19', 'tag': 'f19-updates'},
{'name': 'Fedora 19', 'tag': 'f19'},
{'name': 'Fedora 19 Testing', 'tag': 'f19-updates-testing'},
{'name': 'Fedora 18', 'tag': 'f18-updates'},
{'name': 'Fedora 18', 'tag': 'f18'},
{'name': 'Fedora 18 Testing', 'tag': 'f18-updates-testing'},
{'name': 'EPEL 6', 'tag': 'dist-6E-epel'},
{'name': 'EPEL 6 Testing', 'tag': 'dist-6E-epel-testing'},
{'name': 'EPEL 5', 'tag': 'dist-5E-epel'},
{'name': 'EPEL 5 Testing', 'tag': 'dist-5E-epel-testing'},
{'name': 'EPEL 7', 'tag': 'epel7'},
{'name': 'EPEL 7 Testing', 'tag': 'epel7-testing'},
)
tags_to_name_map = {}
for t in tags:
tags_to_name_map[t['tag']] = t['name']
| # Global list of koji tags we care about
tags = ({'name': 'Rawhide', 'tag': 'f21'},
{'name': 'Fedora 20', 'tag': 'f20-updates'},
{'name': 'Fedora 20', 'tag': 'f20'},
{'name': 'Fedora 20 Testing', 'tag': 'f20-updates-testing'},
{'name': 'Fedora 19', 'tag': 'f19-updates'},
{'name': 'Fedora 19', 'tag': 'f19'},
{'name': 'Fedora 19 Testing', 'tag': 'f19-updates-testing'},
{'name': 'Fedora 18', 'tag': 'f18-updates'},
{'name': 'Fedora 18', 'tag': 'f18'},
{'name': 'Fedora 18 Testing', 'tag': 'f18-updates-testing'},
{'name': 'EPEL 6', 'tag': 'dist-6E-epel'},
{'name': 'EPEL 6', 'tag': 'dist-6E-epel-testing'},
{'name': 'EPEL 5', 'tag': 'dist-5E-epel'},
{'name': 'EPEL 5', 'tag': 'dist-5E-epel-testing'},
)
tags_to_name_map = {}
for t in tags:
tags_to_name_map[t['tag']] = t['name']
| agpl-3.0 | Python |
a3c200905dd87c60e951440e3693f97464f3ee20 | load price times 100 (because of gopay api) | adaptive-learning/proso-apps,adaptive-learning/proso-apps,adaptive-learning/proso-apps | proso_subscription/management/commands/load_subscription_plans.py | proso_subscription/management/commands/load_subscription_plans.py | from clint.textui import progress
from django.core.management.base import BaseCommand
from django.db import transaction
from jsonschema import validate
from proso_subscription.models import SubscriptionPlan, SubscriptionPlanDescription
import json
import os
import re
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('filename')
def handle(self, *args, **options):
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "subscription_plans_schema.json"), "r", encoding='utf8') as schema_file:
schema = json.load(schema_file)
with open(options['filename'], 'r', encoding='utf8') as json_file:
with transaction.atomic():
data = json.load(json_file)
validate(data, schema)
self._load_plans(data['plans'])
def _load_plans(self, data):
for plan_json in progress.bar(data):
plan = SubscriptionPlan.objects.filter(identifier=plan_json['id']).first()
if plan is None:
plan = SubscriptionPlan(identifier=plan_json['id'])
plan.months_validity = plan_json['months-validity']
plan.type = plan_json['type']
plan.active = not plan_json.get('disabled', False)
plan.save()
langs = [k[-2:] for k in plan_json.keys() if re.match(r'^description-\w\w$', k)]
for lang in langs:
description_json = plan_json['description-{}'.format(lang)]
description = SubscriptionPlanDescription.objects.filter(plan__identifier=plan.identifier, lang=lang).first()
if description is None:
description = SubscriptionPlanDescription(plan=plan, lang=lang)
description.currency = description_json['currency']
description.price = description_json['price'] * 100
description.name = description_json['name']
description.description = description_json['description']
description.save()
| from clint.textui import progress
from django.core.management.base import BaseCommand
from django.db import transaction
from jsonschema import validate
from proso_subscription.models import SubscriptionPlan, SubscriptionPlanDescription
import json
import os
import re
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('filename')
def handle(self, *args, **options):
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), "subscription_plans_schema.json"), "r", encoding='utf8') as schema_file:
schema = json.load(schema_file)
with open(options['filename'], 'r', encoding='utf8') as json_file:
with transaction.atomic():
data = json.load(json_file)
validate(data, schema)
self._load_plans(data['plans'])
def _load_plans(self, data):
for plan_json in progress.bar(data):
plan = SubscriptionPlan.objects.filter(identifier=plan_json['id']).first()
if plan is None:
plan = SubscriptionPlan(identifier=plan_json['id'])
plan.months_validity = plan_json['months-validity']
plan.type = plan_json['type']
plan.active = not plan_json.get('disabled', False)
plan.save()
langs = [k[-2:] for k in plan_json.keys() if re.match(r'^description-\w\w$', k)]
for lang in langs:
description_json = plan_json['description-{}'.format(lang)]
description = SubscriptionPlanDescription.objects.filter(plan__identifier=plan.identifier, lang=lang).first()
if description is None:
description = SubscriptionPlanDescription(plan=plan, lang=lang)
description.currency = description_json['currency']
description.price = description_json['price']
description.name = description_json['name']
description.description = description_json['description']
description.save()
| mit | Python |
5a838d3fac224e1fad1c7341964cec43cd1710a4 | fix id | legoktm/pythonwikibot | rfd.py | rfd.py | #!usr/bin/python
#
# (C) $Author$, 2009 MIT License
#
__version__ = '$Id$ $Rev$ $Date$'
"""
Tags pages for RFD
Usage: python rfd.py
"""
import re, time
from pywikibot import wiki
o = wiki.Page('User:Arthur Rubin/Roman redirects')
list = re.findall('\[\[:M(.*?)\]\]', o.get())
newlist = []
for i in list:
newlist.append(wiki.Page('M' + i))
append='{{rfd}}\n'
summary='Tagging for [[WP:RFD]] per [[WP:BOTR#Roman_redirects|request]]'
for b in newlist:
oldtext = b.get(force=True)
if 'rfd' in oldtext:
print 'Skipping: ' + b.title()
pass
else:
wiki.showDiff(oldtext, append+oldtext)
b.put(append+oldtext, summary) | #!usr/bin/python
#
# (C) $Author$, 2009 MIT License
#
__version__ = '$ID$ $Rev$ $Date$'
"""
Tags pages for RFD
Usage: python rfd.py
"""
import re, time
from pywikibot import wiki
o = wiki.Page('User:Arthur Rubin/Roman redirects')
list = re.findall('\[\[:M(.*?)\]\]', o.get())
newlist = []
for i in list:
newlist.append(wiki.Page('M' + i))
append='{{rfd}}\n'
summary='Tagging for [[WP:RFD]] per [[WP:BOTR#Roman_redirects|request]]'
for b in newlist:
oldtext = b.get(force=True)
if 'rfd' in oldtext:
print 'Skipping: ' + b.title()
pass
else:
wiki.showDiff(oldtext, append+oldtext)
b.put(append+oldtext, summary) | mit | Python |
b6fc1993f622c5e3658822e611e493c4125afcc6 | Add fb to the list of installed apps in the project. | pure-python/brainmate | purepython/settings.py | purepython/settings.py | """
Django settings for purepython 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 = '=^j)gy=u=y^z$#1&j*=!b9=cz$_j)+u0^3wttm(=07vhmhbik4'
# 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',
'fb',
)
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 = 'purepython.urls'
WSGI_APPLICATION = 'purepython.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 = 'UTC'
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/'
| """
Django settings for purepython 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 = '=^j)gy=u=y^z$#1&j*=!b9=cz$_j)+u0^3wttm(=07vhmhbik4'
# 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',
)
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 = 'purepython.urls'
WSGI_APPLICATION = 'purepython.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 = 'UTC'
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/'
| apache-2.0 | Python |
409fac761beab017fc93eeb955a3b0a7eb2b8565 | print ALL | joaomlneto/id2220-storm-kafka,joaomlneto/id2220-storm-kafka | py_scripts/json2csv.py | py_scripts/json2csv.py | import time
import urllib2
import json
import sys
storm_ui_url = "http://"+sys.argv[1]
topology_string = storm_ui_url+"/api/v1/topology/"+ sys.argv[2]
sleep_t = int(sys.argv[3])
print "emitted, transferred, completeLatency, acked, failed"
while True:
response = urllib2.urlopen(topology_string)
data = json.load(response)
# result_string = ""
# result_string = str(data["topologyStats"][3]["emitted"]) + ", "
# result_string += str(data["topologyStats"][3]["transferred"]) + ", "
# result_string += data["topologyStats"][3]["completeLatency"] +", "
# result_string += str(data["topologyStats"][3]["acked"]) +", "
# result_string += str(data["topologyStats"][3]["failed"])
print data
time.sleep(sleep_t)
| import time
import urllib2
import json
import sys
storm_ui_url = "http://"+sys.argv[1]
topology_string = storm_ui_url+"/api/v1/topology/"+ sys.argv[2]
sleep_t = int(sys.argv[3])
print "emitted, transferred, completeLatency, acked, failed"
while True:
response = urllib2.urlopen(topology_string)
data = json.load(response)
result_string = ""
result_string = str(data["topologyStats"][3]["emitted"]) + ", "
result_string += str(data["topologyStats"][3]["transferred"]) + ", "
result_string += data["topologyStats"][3]["completeLatency"] +", "
result_string += str(data["topologyStats"][3]["acked"]) +", "
result_string += str(data["topologyStats"][3]["failed"])
print result_string
time.sleep(sleep_t)
| unlicense | Python |
019d33092226d1ff8fe36897c03d25ddd48e34b1 | Use SQLAlchemy extension in Flask app. | vmlaker/wabbit,vmlaker/wabbit,vmlaker/wabbit,vmlaker/wabbit | serve.py | serve.py | """
Flask server app.
"""
import datetime as dt
import sys
import flask
from flask.ext.sqlalchemy import SQLAlchemy
import coils
import mapping
# Load configuration file.
CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.cfg'
config = coils.Config(CONFIG)
# Initialize Flask and SQLAlchemy.
app = flask.Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://{}:{}@{}/{}'.format(
config['username'], config['password'],
config['host'], config['db_name'])
db = SQLAlchemy(app)
@app.route('/')
def index():
"""Render the index page."""
return flask.render_template('index.html')
@app.route('/info')
def info():
"""Return JSON of server info."""
now = dt.datetime.now()
datum = db.session.query(mapping.Datum).\
filter(mapping.Datum.name=='size')[0]
return flask.jsonify(server_time=now, db_size=datum.value)
if __name__ == '__main__':
app.run()
| """
Flask server app.
"""
import datetime as dt
import sys
import flask
import sqlalchemy as sa
import coils
import tables
import mapping
app = flask.Flask(__name__)
# Load configuration file.
CONFIG = sys.argv[1] if len(sys.argv)>=2 else 'wabbit.cfg'
config = coils.Config(CONFIG)
@app.route('/')
def index():
"""Render the index page."""
return flask.render_template('index.html')
@app.route('/info')
def info():
"""Return JSON of server info."""
# Connect to database engine.
engine = sa.create_engine(
'mysql://{}:{}@{}/{}'.format(
config['username'], config['password'],
config['host'], config['db_name']))
Session = sa.orm.sessionmaker(bind=engine)
session = Session()
now = dt.datetime.now()
datum = session.query(mapping.Datum).\
filter(mapping.Datum.name=='size')[0]
return flask.jsonify(server_time=now, db_size=datum.value)
if __name__ == '__main__':
app.run()
| mit | Python |
67efd154d9bc37e1a5cd9e6473c6506e3f5069d9 | use extra_requires | nschloe/meshio | setup.py | setup.py | # -*- coding: utf-8 -*-
#
import os
from distutils.core import setup
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, 'meshio', '__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='meshio',
version=about['__version__'],
author=about['__author__'],
author_email=about['__author_email__'],
packages=['meshio'],
description='I/O for various mesh formats',
long_description=read('README.rst'),
url='https://github.com/nschloe/meshio',
download_url='https://pypi.python.org/pypi/meshio',
license='License :: OSI Approved :: MIT License',
platforms='any',
install_requires=[
'numpy',
'pipdated',
],
extras_require={
'dolfin': ['lxml'], # Dolfin's legacy format
'h5m': ['h5py'], # MOAB's format
},
scripts=[
'tools/meshio-convert',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering'
]
)
| # -*- coding: utf-8 -*-
#
import os
from distutils.core import setup
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, 'meshio', '__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='meshio',
version=about['__version__'],
author=about['__author__'],
author_email=about['__author_email__'],
packages=['meshio'],
description='I/O for various mesh formats',
long_description=read('README.rst'),
url='https://github.com/nschloe/meshio',
download_url='https://pypi.python.org/pypi/meshio',
license='License :: OSI Approved :: MIT License',
platforms='any',
install_requires=[
'h5py',
'lxml',
'numpy',
'pipdated',
],
scripts=[
'tools/meshio-convert',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Science/Research',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering'
]
)
| mit | Python |
5bb24ae506020e18b58b7fa3386148d2a19fb90f | Update classifiers in setup.py | mick88/samp-client | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
try:
long_description = open('README.md', 'r').read()
except:
long_description = ''
setup(
name='samp-client',
version='3.0.1',
packages=['samp_client'],
url='https://github.com/mick88/samp-client',
license='MIT',
author='Michal Dabski',
author_email='contact@michaldabski.com',
install_requires=[],
description='SA-MP API client for python supporting both query and RCON APIs',
long_description_content_type='text/markdown',
long_description=long_description,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
],
project_urls={
'Source': 'https://github.com/mick88/samp-client',
'Tracker': 'https://github.com/mick88/samp-client/issues',
},
)
| #!/usr/bin/env python
from setuptools import setup
try:
long_description = open('README.md', 'r').read()
except:
long_description = ''
setup(
name='samp-client',
version='3.0.1',
packages=['samp_client'],
url='https://github.com/mick88/samp-client',
license='MIT',
author='Michal Dabski',
author_email='contact@michaldabski.com',
install_requires=[],
description='SA-MP API client for python supporting both query and RCON APIs',
long_description_content_type='text/markdown',
long_description=long_description,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
],
project_urls={
'Source': 'https://github.com/mick88/samp-client',
'Tracker': 'https://github.com/mick88/samp-client/issues',
},
)
| mit | Python |
1f9a18545748f301e7b8a86710370b875d04d568 | Bump pypi version. | quantopian/serializable-traitlets | setup.py | setup.py | from setuptools import setup, find_packages
from sys import version_info
def install_requires():
requires = [
'traitlets>=4.1',
'six>=1.9.0',
'pyyaml>=3.11',
]
if (version_info.major, version_info.minor) < (3, 4):
requires.append('singledispatch>=3.4.0')
return requires
def extras_require():
return {
'test': [
'tox',
'pytest>=2.8.5',
'pytest-cov>=1.8.1',
'pytest-pep8>=1.0.6',
],
}
def main():
setup(
name='straitlets',
version='0.2.3',
description="Serializable IPython Traitlets",
author="Quantopian Team",
author_email="opensource@quantopian.com",
packages=find_packages(include='straitlets.*'),
include_package_data=True,
zip_safe=True,
url="https://github.com/quantopian/serializable-traitlets",
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: IPython',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python',
],
install_requires=install_requires(),
extras_require=extras_require()
)
if __name__ == '__main__':
main()
| from setuptools import setup, find_packages
from sys import version_info
def install_requires():
requires = [
'traitlets>=4.1',
'six>=1.9.0',
'pyyaml>=3.11',
]
if (version_info.major, version_info.minor) < (3, 4):
requires.append('singledispatch>=3.4.0')
return requires
def extras_require():
return {
'test': [
'tox',
'pytest>=2.8.5',
'pytest-cov>=1.8.1',
'pytest-pep8>=1.0.6',
],
}
def main():
setup(
name='straitlets',
version='0.2.2',
description="Serializable IPython Traitlets",
author="Quantopian Team",
author_email="opensource@quantopian.com",
packages=find_packages(include='straitlets.*'),
include_package_data=True,
zip_safe=True,
url="https://github.com/quantopian/serializable-traitlets",
classifiers=[
'Development Status :: 3 - Alpha',
'Framework :: IPython',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python',
],
install_requires=install_requires(),
extras_require=extras_require()
)
if __name__ == '__main__':
main()
| apache-2.0 | Python |
60e66b8957e63a044bcaca3d02bc75c33924fcab | Add `pkg_path` kwarg to `pkg.packages`. | Fizzadar/pyinfra,Fizzadar/pyinfra | pyinfra/modules/pkg.py | pyinfra/modules/pkg.py | # pyinfra
# File: pyinfra/modules/pkg.py
# Desc: manage BSD packages with pkg_*
'''
Manage BSD packages and repositories. Note that BSD package names are case-sensitive.
'''
from pyinfra.api import operation
from .util.packaging import ensure_packages
@operation
def packages(state, host, packages=None, present=True, pkg_path=None):
'''
Manage pkg_* packages.
+ packages: list of packages to ensure
+ present: whether the packages should be installed
+ pkg_path: the PKG_PATH environment variable to set
pkg_path:
By default this is autogenerated as follows (tested/working for OpenBSD):
``http://ftp.<OS>.org/pub/<OS>/<VERSION>/packages/<ARCH>/``. Note that OpenBSD's
official mirrors only hold the latest two versions packages.
NetBSD/FreeBSD helpfully use their own directory structures, so the default won't
work.
'''
if present is True:
# Autogenerate package path
if not pkg_path:
host_os = host.fact.os or ''
pkg_path = 'http://ftp.{http}.org/pub/{os}/{version}/packages/{arch}/'.format(
http=host_os.lower(),
os=host_os,
version=host.fact.os_version,
arch=host.fact.arch
)
return ensure_packages(
packages, host.fact.pkg_packages, present,
install_command='PKG_PATH={0} pkg_add'.format(pkg_path),
uninstall_command='pkg_delete'
)
| # pyinfra
# File: pyinfra/modules/pkg.py
# Desc: manage BSD packages with pkg_*
'''
Manage BSD packages and repositories. Note that BSD package names are case-sensitive.
'''
from pyinfra.api import operation
from .util.packaging import ensure_packages
@operation
def packages(state, host, packages=None, present=True):
'''
Manage pkg_* packages.
+ packages: list of packages to ensure
+ present: whether the packages should be installed
'''
pkg_path = ''
if present is True:
host_os = host.fact.os or ''
# We have to set the pkg_path manually as the env var (seemingly, OpenBSD 5.6)
# isn't created for non-tty requests such as pyinfra's
pkg_path = 'http://ftp.{http}.org/pub/{os}/{version}/packages/{arch}/'.format(
http=host_os.lower(),
os=host_os,
version=host.fact.os_version,
arch=host.fact.arch
)
return ensure_packages(
packages, host.fact.pkg_packages, present,
install_command='PKG_PATH={0} pkg_add'.format(pkg_path),
uninstall_command='pkg_delete'
)
| mit | Python |
a883888810abb3d62f24789eabf62ec4277a571b | Add handlers for JOIN/PART | tgerdes/toolbot,tgerdes/toolbot | toolbot/adapter/irc.py | toolbot/adapter/irc.py | import irc3
from toolbot.adapter import Adapter
from toolbot.message import (
TextMessage,
EnterMessage,
LeaveMessage,
TopicMessage)
@irc3.plugin
class MyPlugin:
requires = ['irc3.plugins.core', ]
def __init__(self, bot):
self.bot = bot
@irc3.event(irc3.rfc.PRIVMSG)
def message(self, mask, event, target, data):
adapter = self.bot.config['adapter']
bot = adapter.bot
user = bot.brain.userForId(mask, name=mask.nick, room=target)
adapter.receive(TextMessage(user, data))
@irc3.event(irc3.rfc.JOIN)
def join(self, mask, channel):
adapter = self.bot.config['adapter']
bot = adapter.bot
if channel.startswith(":"):
channel = channel[1:]
user = bot.brain.userForId(mask, name=mask.nick, room=channel)
adapter.receive(EnterMessage(user))
@irc3.event(irc3.rfc.PART)
def part(self, mask, channel, data):
adapter = self.bot.config['adapter']
bot = adapter.bot
if channel.startswith(":"):
channel = channel[1:]
user = bot.brain.userForId(mask, name=mask.nick, room=channel)
adapter.receive(LeaveMessage(user, data))
class IrcAdapter(Adapter):
def __init__(self, bot):
super().__init__(bot)
self.irc = irc3.IrcBot(
nick=bot.name,
autojoins=['#irc3'],
host='localhost', port=6667, ssl=False,
includes=[
"irc3.plugins.core",
__name__
],
adapter=self)
def send(self, envelope, *strings):
for string in strings:
self.irc.privmsg(envelope['room'], string)
def emote(self, envelope, *strings):
self.send(envelope, *("\u0001ACTION {}\u0001".format(string)
for string in strings))
def reply(self, envelope, *strings):
self.send(envelope, *("{}: {}".format(envelope['user'].name, string)
for string in strings))
# TODO: topic
# def topic(self, envelope, *strings):
# pass
# def play(self, envelope, *strings):
# pass
def run(self, loop):
self.irc.run(forever=False)
def close(self):
pass
| import irc3
from toolbot.adapter import Adapter
from toolbot.message import TextMessage
@irc3.plugin
class MyPlugin:
requires = [
'irc3.plugins.core',
'irc3.plugins.userlist',
]
def __init__(self, bot):
self.bot = bot
@irc3.event(irc3.rfc.PRIVMSG)
def message(self, mask, event, target, data):
adapter = self.bot.config['adapter']
bot = adapter.bot
user = bot.brain.userForId(mask, name=mask.nick, room=target)
adapter.receive(TextMessage(user, data, "messageId"))
@irc3.event(irc3.rfc.JOIN)
def welcome(self, mask, channel):
"""Welcome people who join a channel"""
if channel.startswith(":"):
channel = channel[1:]
class IrcAdapter(Adapter):
def __init__(self, bot):
super().__init__(bot)
self.irc = irc3.IrcBot(
nick=bot.name,
autojoins=['#irc3'],
host='localhost', port=6667, ssl=False,
includes=[
"irc3.plugins.core",
__name__
],
adapter=self)
def send(self, envelope, *strings):
for string in strings:
self.irc.privmsg(envelope['room'], string)
def emote(self, envelope, *strings):
self.send(envelope, *("\u0001ACTION {}\u0001".format(string)
for string in strings))
def reply(self, envelope, *strings):
self.send(envelope, *("{}: {}".format(envelope['user'].name, string)
for string in strings))
#TODO: topic
#def topic(self, envelope, *strings):
# pass
#def play(self, envelope, *strings):
# pass
def run(self, loop):
self.irc.run(forever=False)
def close(self):
pass
| mit | Python |
2d34b82c8467b2838c786d37c1d120d406640cca | fix #18 | ContentMine/pyCProject | setup.py | setup.py | from setuptools import setup
setup(name='pycproject',
version='0.1.3',
description='Provides basic function to read a ContentMine CProject and CTrees into python datastructures.',
url='http://github.com/ContentMine/pyCProject',
author='Christopher Kittel',
author_email='web@christopherkittel.eu',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3 :: Only'
],
license='MIT',
packages=['pycproject'],
install_requires=[
'lxml>=3.5.0',
'beautifulsoup4==4.4.1',
'pandas==0.19.2'
],
zip_safe=False)
| from setuptools import setup
setup(name='pycproject',
version='0.1.3',
description='Provides basic function to read a ContentMine CProject and CTrees into python datastructures.',
url='http://github.com/ContentMine/pyCProject',
author='Christopher Kittel',
author_email='web@christopherkittel.eu',
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3 :: Only'
],
license='MIT',
packages=['pycproject'],
install_requires=[
'lxml>=3.6.0',
'beautifulsoup4==4.4.1',
'pandas==0.19.2'
],
zip_safe=False)
| mit | Python |
522e08402c4ef3d2b32e6db5e2b47a9084dc5dcf | add list FieldMetaType | breznak/nupic,breznak/nupic,breznak/nupic | py/nupic/data/fieldmeta.py | py/nupic/data/fieldmeta.py | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------
# This script defines the structure of meta-data that describes the field name,
# field type, special field attribute, etc. for a field in a dataset
from collections import namedtuple
###############################################################################
FieldMetaInfoBase = namedtuple('FieldMetaInfoBase', ['name', 'type', 'special'])
class FieldMetaInfo(FieldMetaInfoBase):
"""
This class acts as a container of meta-data for a single field (column) of
a dataset.
The layout is backward-compatible with the tuples exposed via the 'fields'
attribute of the legacy nupic.data.file.File class (in file.py). However, the
elements may be accessed in a less error-prone and more self-documenting way
using object attribute notation (e.g., fieldmeta.special instead of
fieldmeta[2]). Because namedtuple creates a subclass of tuple, the elements
can also be accessed using list access semantics and operations (i.e.,
fieldmeta[2])
Examples:
1. Access a sub-element from an instance of FieldMetaInfo:
metainfo.name
metainfo.type
metainfo.special
2. Convert a single element from nupic.data.file.File.fields to FieldMetaInfo
e = ('pounds', FieldMetaType.float, FieldMetaSpecial.none)
m = FieldMetaInfo.createFromFileFieldElement(e)
3.
"""
@staticmethod
def createFromFileFieldElement(fieldInfoTuple):
""" Creates a FieldMetaInfo instance from an element of the File.fields list
of a nupic.data.file.File class instance.
"""
return FieldMetaInfo._make(fieldInfoTuple)
@classmethod
def createListFromFileFieldList(cls, fields):
""" Creates a FieldMetaInfo list from the File.fields value of a
nupic.data.file.File class instance.
fields: a sequence of field attribute tuples conforming to the format
of the File.fields attribute of a nupic.data.file.File class instance.
Returns: A list of FieldMetaInfo elements corresponding to the given
'fields' list.
"""
return map(lambda x: cls.createFromFileFieldElement(x), fields)
class FieldMetaType(object):
"""
Public values for the field data types
"""
string = 'string'
datetime = 'datetime'
integer = 'int'
float = 'float'
boolean = 'bool'
list = 'list'
class FieldMetaSpecial(object):
"""
Public values for the "special" field attribute
"""
none = ''
reset = 'R'
sequence = 'S'
timestamp = 'T'
category = 'C'
| # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses.
#
# http://numenta.org/licenses/
# ----------------------------------------------------------------------
# This script defines the structure of meta-data that describes the field name,
# field type, special field attribute, etc. for a field in a dataset
from collections import namedtuple
###############################################################################
FieldMetaInfoBase = namedtuple('FieldMetaInfoBase', ['name', 'type', 'special'])
class FieldMetaInfo(FieldMetaInfoBase):
"""
This class acts as a container of meta-data for a single field (column) of
a dataset.
The layout is backward-compatible with the tuples exposed via the 'fields'
attribute of the legacy nupic.data.file.File class (in file.py). However, the
elements may be accessed in a less error-prone and more self-documenting way
using object attribute notation (e.g., fieldmeta.special instead of
fieldmeta[2]). Because namedtuple creates a subclass of tuple, the elements
can also be accessed using list access semantics and operations (i.e.,
fieldmeta[2])
Examples:
1. Access a sub-element from an instance of FieldMetaInfo:
metainfo.name
metainfo.type
metainfo.special
2. Convert a single element from nupic.data.file.File.fields to FieldMetaInfo
e = ('pounds', FieldMetaType.float, FieldMetaSpecial.none)
m = FieldMetaInfo.createFromFileFieldElement(e)
3.
"""
@staticmethod
def createFromFileFieldElement(fieldInfoTuple):
""" Creates a FieldMetaInfo instance from an element of the File.fields list
of a nupic.data.file.File class instance.
"""
return FieldMetaInfo._make(fieldInfoTuple)
@classmethod
def createListFromFileFieldList(cls, fields):
""" Creates a FieldMetaInfo list from the File.fields value of a
nupic.data.file.File class instance.
fields: a sequence of field attribute tuples conforming to the format
of the File.fields attribute of a nupic.data.file.File class instance.
Returns: A list of FieldMetaInfo elements corresponding to the given
'fields' list.
"""
return map(lambda x: cls.createFromFileFieldElement(x), fields)
class FieldMetaType(object):
"""
Public values for the field data types
"""
string = 'string'
datetime = 'datetime'
integer = 'int'
float = 'float'
boolean = 'bool'
class FieldMetaSpecial(object):
"""
Public values for the "special" field attribute
"""
none = ''
reset = 'R'
sequence = 'S'
timestamp = 'T'
category = 'C'
| agpl-3.0 | Python |
826b665ac57410c21b70ff9dd835c80895d43e83 | change author info | gomafutofu/mbserializer,yezorat/mbserializer | setup.py | setup.py | # coding: utf-8
__author__ = 'Junki Ishida'
from mbserializer._compat import PY26
from setuptools import setup
tests_require=['PyYAML', 'lxml', 'defusedxml', 'pytz', ]
if PY26:
tests_require.append('ordereddict')
setup(
name='mbserializer',
version='0.0.1-alpha',
description='model based serializer compatible with json, xml and yaml',
author='Junki Ishida',
author_email='likegomi@gmail.com',
url='https://github.com/likegomi/mbserializer',
packages=['mbserializer', 'mbserializer.fields'],
license='MIT',
tests_require=tests_require,
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'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',
],
)
| # coding: utf-8
__author__ = 'Junki Ishida'
from mbserializer._compat import PY26
from setuptools import setup
tests_require=['PyYAML', 'lxml', 'defusedxml', 'pytz', ]
if PY26:
tests_require.append('ordereddict')
setup(
name='mbserializer',
version='0.0.1-alpha',
description='model based serializer compatible with json, xml and yaml',
author='Junki Ishida',
author_email='junkiish@gmail.com',
url='https://github.com/junkiish/mbserializer',
packages=['mbserializer', 'mbserializer.fields'],
license='MIT',
tests_require=tests_require,
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'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',
],
)
| mit | Python |
9b597c4b3b5b847c4bd98b82ce347aec8bb85aaf | add `inherit_cache` to custom `FunctionElement`s | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | pycroft/model/functions.py | pycroft/model/functions.py | # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
"""
pycroft.model.functions
~~~~~~~~~~~~~~~~~~~~~~~
Add support for various functions present in Postgres to the SQLite SQLAlchemy
dialect.
"""
from sqlalchemy.exc import CompileError
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql import expression
from sqlalchemy.sql.functions import max as sa_max
from sqlalchemy.sql.functions import min as sa_min
from sqlalchemy.types import Numeric, Integer
class greatest(expression.FunctionElement):
inherit_cache = True
type = Numeric()
name = 'greatest'
class least(expression.FunctionElement):
inherit_cache = True
type = Numeric()
name = 'least'
class sign(expression.FunctionElement):
inherit_cache = True
type = Integer()
name = 'sign'
@compiles(greatest)
@compiles(least)
@compiles(sign)
def compile_default_function(element, compiler, **kw):
return compiler.visit_function(element)
@compiles(greatest, 'sqlite')
def compile_sqlite_greatest(element, compiler, **kw):
return compiler.visit_function(sa_max(*list(element.clauses)))
@compiles(least, 'sqlite')
def compile_sqlite_least(element, compiler, **kw):
return compiler.visit_function(sa_min(*list(element.clauses)))
@compiles(sign, 'sqlite')
def compile_sqlite_sign(element, compiler, **kw):
args = list(element.clauses)
if len(args) != 1:
raise CompileError("Sign function takes exactly one argument.")
return (
"CASE WHEN {0} < 0 THEN -1 "
"ELSE CASE WHEN {0} > 0 THEN 1 "
"ELSE 0 END END".format(
compiler.process(args[0])
)
)
| # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
"""
pycroft.model.functions
~~~~~~~~~~~~~~~~~~~~~~~
Add support for various functions present in Postgres to the SQLite SQLAlchemy
dialect.
"""
from sqlalchemy.exc import CompileError
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql import expression
from sqlalchemy.sql.functions import max as sa_max
from sqlalchemy.sql.functions import min as sa_min
from sqlalchemy.types import Numeric, Integer
class greatest(expression.FunctionElement):
type = Numeric()
name = 'greatest'
class least(expression.FunctionElement):
type = Numeric()
name = 'least'
class sign(expression.FunctionElement):
type = Integer()
name = 'sign'
@compiles(greatest)
@compiles(least)
@compiles(sign)
def compile_default_function(element, compiler, **kw):
return compiler.visit_function(element)
@compiles(greatest, 'sqlite')
def compile_sqlite_greatest(element, compiler, **kw):
return compiler.visit_function(sa_max(*list(element.clauses)))
@compiles(least, 'sqlite')
def compile_sqlite_least(element, compiler, **kw):
return compiler.visit_function(sa_min(*list(element.clauses)))
@compiles(sign, 'sqlite')
def compile_sqlite_sign(element, compiler, **kw):
args = list(element.clauses)
if len(args) != 1:
raise CompileError("Sign function takes exactly one argument.")
return (
"CASE WHEN {0} < 0 THEN -1 "
"ELSE CASE WHEN {0} > 0 THEN 1 "
"ELSE 0 END END".format(
compiler.process(args[0])
)
)
| apache-2.0 | Python |
9155355df09e94bb8799d193e69bf64e5ea9e162 | Allow irc 7.0 | jamwt/diesel-pmxbot,jamwt/diesel-pmxbot | setup.py | setup.py | # -*- coding: utf-8 -*-
# vim:ts=4:sw=4:noexpandtab
# c-basic-indent: 4; tab-width: 4; indent-tabs-mode: true;
import sys
import setuptools
py26reqs = ['importlib'] if sys.version_info < (2, 7) else []
setup_params = dict(
name="pmxbot",
use_hg_version=True,
packages=setuptools.find_packages(),
include_package_data=True,
entry_points=dict(
console_scripts = [
'pmxbot=pmxbot.core:run',
'pmxbotweb=pmxbot.web.viewer:run',
],
pmxbot_handlers = [
'pmxbot logging = pmxbot.logging:Logger.initialize',
'pmxbot karma = pmxbot.karma:Karma.initialize',
'pmxbot quotes = pmxbot.quotes:Quotes.initialize',
'pmxbot core commands = pmxbot.commands',
'pmxbot notifier = pmxbot.notify:Notify.init',
'pmxbot feedparser = pmxbot.rss:RSSFeeds',
'pmxbot rolls = pmxbot.rolls:ParticipantLogger.initialize',
'pmxbot config = pmxbot.config_',
'pmxbot system commands = pmxbot.system',
],
),
install_requires=[
"irc>=6.0.1,<8.0dev",
"popquotes>=1.3",
"excuses>=1.1.2",
"pyyaml",
"feedparser",
"pytz",
"wordnik>=2.0,<3.0",
"jaraco.util",
"beautifulsoup4",
#for viewer
"jinja2",
"cherrypy>=3.2.3dev-20121007,<3.3dev",
"jaraco.compat>=1.0.3",
] + py26reqs,
description="IRC bot - full featured, yet extensible and customizable",
license = 'MIT',
author="YouGov, Plc.",
author_email="open.source@yougov.com",
maintainer = 'Jason R. Coombs',
maintainer_email = 'Jason.Coombs@YouGov.com',
url = 'http://bitbucket.org/yougov/pmxbot',
dependency_links = [
'https://bitbucket.org/cherrypy/cherrypy/downloads',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Communications :: Chat :: Internet Relay Chat',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
long_description = open('README.rst').read(),
setup_requires=[
'hgtools<3.0dev',
'pytest-runner>=1.1,<3.0dev',
],
tests_require=[
'pymongo',
'pytest',
'jaraco.test>=1.0.2,<2.0dev',
],
use_2to3=True,
)
if __name__ == '__main__':
setuptools.setup(**setup_params)
| # -*- coding: utf-8 -*-
# vim:ts=4:sw=4:noexpandtab
# c-basic-indent: 4; tab-width: 4; indent-tabs-mode: true;
import sys
import setuptools
py26reqs = ['importlib'] if sys.version_info < (2, 7) else []
setup_params = dict(
name="pmxbot",
use_hg_version=True,
packages=setuptools.find_packages(),
include_package_data=True,
entry_points=dict(
console_scripts = [
'pmxbot=pmxbot.core:run',
'pmxbotweb=pmxbot.web.viewer:run',
],
pmxbot_handlers = [
'pmxbot logging = pmxbot.logging:Logger.initialize',
'pmxbot karma = pmxbot.karma:Karma.initialize',
'pmxbot quotes = pmxbot.quotes:Quotes.initialize',
'pmxbot core commands = pmxbot.commands',
'pmxbot notifier = pmxbot.notify:Notify.init',
'pmxbot feedparser = pmxbot.rss:RSSFeeds',
'pmxbot rolls = pmxbot.rolls:ParticipantLogger.initialize',
'pmxbot config = pmxbot.config_',
'pmxbot system commands = pmxbot.system',
],
),
install_requires=[
"irc>=6.0.1,<7.0dev",
"popquotes>=1.3",
"excuses>=1.1.2",
"pyyaml",
"feedparser",
"pytz",
"wordnik>=2.0,<3.0",
"jaraco.util",
"beautifulsoup4",
#for viewer
"jinja2",
"cherrypy>=3.2.3dev-20121007,<3.3dev",
"jaraco.compat>=1.0.3",
] + py26reqs,
description="IRC bot - full featured, yet extensible and customizable",
license = 'MIT',
author="YouGov, Plc.",
author_email="open.source@yougov.com",
maintainer = 'Jason R. Coombs',
maintainer_email = 'Jason.Coombs@YouGov.com',
url = 'http://bitbucket.org/yougov/pmxbot',
dependency_links = [
'https://bitbucket.org/cherrypy/cherrypy/downloads',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Communications :: Chat :: Internet Relay Chat',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
long_description = open('README.rst').read(),
setup_requires=[
'hgtools<3.0dev',
'pytest-runner>=1.1,<3.0dev',
],
tests_require=[
'pymongo',
'pytest',
'jaraco.test>=1.0.2,<2.0dev',
],
use_2to3=True,
)
if __name__ == '__main__':
setuptools.setup(**setup_params)
| bsd-3-clause | Python |
178ed9d3e5dc715991d85c85045bfedd9e6acf40 | Update download_mnist.py | ashhher3/pylearn2,shiquanwang/pylearn2,alexjc/pylearn2,bartvm/pylearn2,pkainz/pylearn2,jamessergeant/pylearn2,nouiz/pylearn2,theoryno3/pylearn2,jeremyfix/pylearn2,lisa-lab/pylearn2,mkraemer67/pylearn2,chrish42/pylearn,daemonmaker/pylearn2,woozzu/pylearn2,chrish42/pylearn,jamessergeant/pylearn2,sandeepkbhat/pylearn2,shiquanwang/pylearn2,woozzu/pylearn2,skearnes/pylearn2,daemonmaker/pylearn2,ashhher3/pylearn2,aalmah/pylearn2,JesseLivezey/plankton,abergeron/pylearn2,sandeepkbhat/pylearn2,lunyang/pylearn2,Refefer/pylearn2,TNick/pylearn2,lancezlin/pylearn2,JesseLivezey/pylearn2,lancezlin/pylearn2,jamessergeant/pylearn2,pkainz/pylearn2,mkraemer67/pylearn2,KennethPierce/pylearnk,lunyang/pylearn2,alexjc/pylearn2,mkraemer67/pylearn2,KennethPierce/pylearnk,JesseLivezey/pylearn2,mclaughlin6464/pylearn2,kose-y/pylearn2,fulmicoton/pylearn2,w1kke/pylearn2,woozzu/pylearn2,junbochen/pylearn2,bartvm/pylearn2,se4u/pylearn2,ashhher3/pylearn2,lamblin/pylearn2,chrish42/pylearn,shiquanwang/pylearn2,pombredanne/pylearn2,CIFASIS/pylearn2,aalmah/pylearn2,hantek/pylearn2,se4u/pylearn2,lamblin/pylearn2,skearnes/pylearn2,junbochen/pylearn2,daemonmaker/pylearn2,matrogers/pylearn2,JesseLivezey/pylearn2,msingh172/pylearn2,fishcorn/pylearn2,fyffyt/pylearn2,pombredanne/pylearn2,matrogers/pylearn2,goodfeli/pylearn2,w1kke/pylearn2,fyffyt/pylearn2,ddboline/pylearn2,lamblin/pylearn2,caidongyun/pylearn2,msingh172/pylearn2,matrogers/pylearn2,kose-y/pylearn2,Refefer/pylearn2,fishcorn/pylearn2,se4u/pylearn2,hyqneuron/pylearn2-maxsom,lunyang/pylearn2,mclaughlin6464/pylearn2,jeremyfix/pylearn2,hantek/pylearn2,skearnes/pylearn2,fulmicoton/pylearn2,lisa-lab/pylearn2,nouiz/pylearn2,TNick/pylearn2,hyqneuron/pylearn2-maxsom,lancezlin/pylearn2,kose-y/pylearn2,lunyang/pylearn2,kastnerkyle/pylearn2,bartvm/pylearn2,kastnerkyle/pylearn2,fulmicoton/pylearn2,lancezlin/pylearn2,fishcorn/pylearn2,aalmah/pylearn2,ddboline/pylearn2,goodfeli/pylearn2,hantek/pylearn2,abergeron/pylearn2,ashhher3/pylearn2,msingh172/pylearn2,mkraemer67/pylearn2,sandeepkbhat/pylearn2,matrogers/pylearn2,daemonmaker/pylearn2,goodfeli/pylearn2,pkainz/pylearn2,CIFASIS/pylearn2,fulmicoton/pylearn2,w1kke/pylearn2,se4u/pylearn2,shiquanwang/pylearn2,pkainz/pylearn2,jeremyfix/pylearn2,fyffyt/pylearn2,ddboline/pylearn2,lamblin/pylearn2,woozzu/pylearn2,TNick/pylearn2,CIFASIS/pylearn2,hyqneuron/pylearn2-maxsom,cosmoharrigan/pylearn2,caidongyun/pylearn2,KennethPierce/pylearnk,kastnerkyle/pylearn2,chrish42/pylearn,Refefer/pylearn2,abergeron/pylearn2,abergeron/pylearn2,theoryno3/pylearn2,hantek/pylearn2,theoryno3/pylearn2,kastnerkyle/pylearn2,fyffyt/pylearn2,junbochen/pylearn2,lisa-lab/pylearn2,aalmah/pylearn2,sandeepkbhat/pylearn2,mclaughlin6464/pylearn2,msingh172/pylearn2,junbochen/pylearn2,KennethPierce/pylearnk,lisa-lab/pylearn2,CIFASIS/pylearn2,caidongyun/pylearn2,pombredanne/pylearn2,TNick/pylearn2,kose-y/pylearn2,pombredanne/pylearn2,alexjc/pylearn2,hyqneuron/pylearn2-maxsom,JesseLivezey/plankton,jeremyfix/pylearn2,cosmoharrigan/pylearn2,mclaughlin6464/pylearn2,JesseLivezey/pylearn2,JesseLivezey/plankton,nouiz/pylearn2,w1kke/pylearn2,caidongyun/pylearn2,theoryno3/pylearn2,cosmoharrigan/pylearn2,bartvm/pylearn2,nouiz/pylearn2,fishcorn/pylearn2,skearnes/pylearn2,alexjc/pylearn2,ddboline/pylearn2,Refefer/pylearn2,cosmoharrigan/pylearn2,JesseLivezey/plankton,goodfeli/pylearn2,jamessergeant/pylearn2 | pylearn2/scripts/datasets/download_mnist.py | pylearn2/scripts/datasets/download_mnist.py | import os
import urllib
import gzip
assert 'PYLEARN2_DATA_PATH' in os.environ, "PYLEARN2_DATA_PATH not defined"
mnist_path = os.path.join(os.environ['PYLEARN2_DATA_PATH'], "mnist")
if not os.path.isdir(mnist_path):
print "creating path: " + mnist_path
os.makedirs(mnist_path)
in_dir = os.listdir(mnist_path)
mnist_files = ["t10k-images-idx3-ubyte", "t10k-labels-idx1-ubyte",
"train-images-idx3-ubyte", "train-labels-idx1-ubyte"]
mnist_url = "http://yann.lecun.com/exdb/mnist/"
if not all([f in in_dir for f in mnist_files]) or in_dir == []:
print "Downloading MNIST data..."
gz_in = [os.path.join([mnist_path, f + ".gz"]) for f in mnist_files]
gz_out = [os.path.join([mnist_path, f])for f in mnist_files]
mnist_url = ["".join([mnist_url, f, ".gz"]) for f in mnist_files]
for g_in, g_out, m_url in zip(gz_in, gz_out, mnist_url):
print "Downloading " + m_url + "...",
urllib.urlretrieve(m_url, filename=g_in)
print " Done"
with gzip.GzipFile(g_in) as f_gz:
data = f_gz.read()
with open(g_out, 'wb') as f_out:
f_out.write(data)
print "Done downloading MNIST"
else:
print "MNIST files already in PYLEARN2_DATA_PATH"
| import os
import urllib
import gzip
assert os.environ.has_key('PYLEARN2_DATA_PATH'), "PYLEARN2_DATA_PATH not defined"
mnist_path = os.environ['PYLEARN2_DATA_PATH'] + "/mnist"
if not os.path.isdir(mnist_path):
print "creating path:" + mnist_path
os.makedirs(mnist_path)
in_dir = os.listdir(mnist_path)
mnist_files = ["t10k-images-idx3-ubyte", "t10k-labels-idx1-ubyte" ,"train-images-idx3-ubyte", "train-labels-idx1-ubyte"]
if not all([f in in_dir for f in mnist_files]) or in_dir == []:
print "Downloading MNIST data..."
gz_in = ["".join([mnist_path,"/",f,".gz"]) for f in mnist_files]
gz_out = ["".join([mnist_path,"/",f])for f in mnist_files]
mnist_url = ["".join(["http://yann.lecun.com/exdb/mnist/",f,".gz"]) for f in mnist_files]
for g_in,g_out,m_url in zip(gz_in,gz_out,mnist_url):
print "Downloading " + m_url + "...",
urllib.urlretrieve(m_url,filename=g_in)
print " Done"
with gzip.GzipFile(g_in) as f_gz:
data = f_gz.read()
with open(g_out,'wb') as f_out:
f_out.write(data)
print "Done downloading MNIST"
else:
print "MNIST files already in PYLEARN2_DATA_PATH"
| bsd-3-clause | Python |
89370f4f330cbe0fda10ed8d12bdb3dc05e33dc0 | Add test for new time units string. | csdms/coupling,csdms/pymt,csdms/coupling | pymt/framework/tests/test_bmi_time_units.py | pymt/framework/tests/test_bmi_time_units.py | from nose.tools import assert_equal
from pymt.framework.bmi_bridge import _BmiCap
class SimpleTimeBmi():
def get_time_units(self):
return 0, 'h'
def get_start_time(self):
return 0, 1.
def get_current_time(self):
return 0, 10.5
def get_end_time(self):
return 0, 72
def get_time_step(self):
return 0, 0.25
class Bmi(_BmiCap):
_cls = SimpleTimeBmi
def test_time_wrap():
"""Test wrapping BMI time methods."""
bmi = Bmi()
assert_equal(bmi.get_time_units(), 'h')
assert_equal(bmi.get_start_time(), 1.)
assert_equal(bmi.get_current_time(), 10.5)
assert_equal(bmi.get_end_time(), 72.)
assert_equal(bmi.get_time_step(), .25)
assert_equal(bmi.time_units, 'h')
def test_time_conversion():
"""Test unit conversion through units keyword."""
bmi = Bmi()
assert_equal(bmi.get_start_time(units='h'), 1.)
assert_equal(bmi.get_start_time(units='min'), 60.)
assert_equal(bmi.get_current_time(units='min'), 630.)
assert_equal(bmi.get_end_time(units='d'), 3)
def test_change_time_units():
"""Test changing a component's time units."""
bmi = Bmi()
assert_equal(bmi.time_units, 'h')
bmi.time_units = 'min'
assert_equal(bmi.time_units, 'min')
assert_equal(bmi.get_start_time(), 60.)
assert_equal(bmi.get_current_time(), 630.)
assert_equal(bmi.get_end_time(), 72 * 60)
assert_equal(bmi.get_start_time(units='h'), 1.)
assert_equal(bmi.get_current_time(units='h'), 10.5)
assert_equal(bmi.get_end_time(units='h'), 72)
| from nose.tools import assert_equal
from pymt.framework.bmi_bridge import _BmiCap
class SimpleTimeBmi():
def get_time_units(self):
return 0, 'h'
def get_start_time(self):
return 0, 1.
def get_current_time(self):
return 0, 10.5
def get_end_time(self):
return 0, 72
def get_time_step(self):
return 0, 0.25
class Bmi(_BmiCap):
_cls = SimpleTimeBmi
def test_time_wrap():
bmi = Bmi()
assert_equal(bmi.get_time_units(), 'h')
assert_equal(bmi.get_start_time(), 1.)
assert_equal(bmi.get_current_time(), 10.5)
assert_equal(bmi.get_end_time(), 72.)
assert_equal(bmi.get_time_step(), .25)
assert_equal(bmi.time_units, 'h')
def test_time_conversion():
bmi = Bmi()
assert_equal(bmi.get_start_time(units='h'), 1.)
assert_equal(bmi.get_start_time(units='min'), 60.)
assert_equal(bmi.get_current_time(units='min'), 630.)
assert_equal(bmi.get_end_time(units='d'), 3)
def test_change_time_units():
bmi = Bmi()
assert_equal(bmi.time_units, 'h')
bmi.time_units = 'min'
assert_equal(bmi.get_start_time(), 60.)
assert_equal(bmi.get_current_time(), 630.)
assert_equal(bmi.get_end_time(), 72 * 60)
assert_equal(bmi.get_start_time(units='h'), 1.)
assert_equal(bmi.get_current_time(units='h'), 10.5)
assert_equal(bmi.get_end_time(units='h'), 72)
| mit | Python |
38f5966b48263c909d67e923b434eacb8281bef4 | Update version number is setup.py. | friedcell/momoko,friedcell/momoko | setup.py | setup.py | #!/usr/bin/env python
import os
# The multiprocessingimport is to prevent the following error
# after all the tests have been executed.
# Error in atexit._run_exitfuncs:
# TypeError: 'NoneType' object is not callable
# From: http://article.gmane.org/gmane.comp.python.peak/2509
# Work around setuptools bug
# http://article.gmane.org/gmane.comp.python.peak/2509
import multiprocessing
try:
from setuptools import setup, Extension, Command
except ImportError:
from distutils.core import setup, Extension, Command
dependencies = ['tornado']
psycopg2_impl = os.environ.get('MOMOKO_PSYCOPG2_IMPL', 'psycopg2')
if psycopg2_impl == 'psycopg2cffi':
print('Using psycopg2cffi')
dependencies.append('psycopg2cffi')
elif psycopg2_impl == 'psycopg2ct':
print('Using psycopg2ct')
dependencies.append('psycopg2ct')
else:
print('Using psycopg2')
dependencies.append('psycopg2')
setup(
name='Momoko',
version='1.1.0',
description="Momoko wraps Psycopg2's functionality for use in Tornado.",
long_description=open('README.rst').read(),
author='Frank Smit',
author_email='frank@61924.nl',
url='http://momoko.61924.nl/',
packages=['momoko'],
license='MIT',
test_suite='tests',
install_requires=dependencies,
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Topic :: Database',
'Topic :: Database :: Front-Ends'
]
)
| #!/usr/bin/env python
import os
# The multiprocessingimport is to prevent the following error
# after all the tests have been executed.
# Error in atexit._run_exitfuncs:
# TypeError: 'NoneType' object is not callable
# From: http://article.gmane.org/gmane.comp.python.peak/2509
# Work around setuptools bug
# http://article.gmane.org/gmane.comp.python.peak/2509
import multiprocessing
try:
from setuptools import setup, Extension, Command
except ImportError:
from distutils.core import setup, Extension, Command
dependencies = ['tornado']
psycopg2_impl = os.environ.get('MOMOKO_PSYCOPG2_IMPL', 'psycopg2')
if psycopg2_impl == 'psycopg2cffi':
print('Using psycopg2cffi')
dependencies.append('psycopg2cffi')
elif psycopg2_impl == 'psycopg2ct':
print('Using psycopg2ct')
dependencies.append('psycopg2ct')
else:
print('Using psycopg2')
dependencies.append('psycopg2')
setup(
name='Momoko',
version='1.0.0',
description="Momoko wraps Psycopg2's functionality for use in Tornado.",
long_description=open('README.rst').read(),
author='Frank Smit',
author_email='frank@61924.nl',
url='http://momoko.61924.nl/',
packages=['momoko'],
license='MIT',
test_suite='tests',
install_requires=dependencies,
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Topic :: Database',
'Topic :: Database :: Front-Ends'
]
)
| mit | Python |
3e6084a212d0851f0ab2afa15c633512ee7422e2 | Fix command | nano-db/NanoCube | setup.py | setup.py | from setuptools import setup, find_packages
from pip.req import parse_requirements
import os
def reqs():
req_path = os.path.join(os.path.dirname(__file__), "requirements.txt")
install_reqs = parse_requirements(req_path)
return [str(ir.req) for ir in install_reqs]
def readme():
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
return readme.read()
setup(
name="nanodb",
version="0.1.1",
license="Apache License 2.0",
author="Pierre-Marie Dartus",
author_email="dartus.pierremarie@gmail.com",
url="https://github.com/pmdartus/NanoCube",
description="In memory database for geolocated and temporal data",
download_url="https://github.com/pmdartus/NanoCube/tarball/0.1.1",
long_description=readme(),
packages=find_packages(exclude=['test']),
install_requires=reqs(),
entry_points={
"console_scripts": [
"nanodb_server=libs.server.server:init_parser",
"nanodb=libs.client.cli:init_parser"
]
},
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Database :: Database Engines/Servers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 2.7",
]
)
| from setuptools import setup, find_packages
from pip.req import parse_requirements
import os
def reqs():
req_path = os.path.join(os.path.dirname(__file__), "requirements.txt")
install_reqs = parse_requirements(req_path)
return [str(ir.req) for ir in install_reqs]
def readme():
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
return readme.read()
setup(
name="nanodb",
version="0.1.1",
license="Apache License 2.0",
author="Pierre-Marie Dartus",
author_email="dartus.pierremarie@gmail.com",
url="https://github.com/pmdartus/NanoCube",
description="In memory database for geolocated and temporal data",
download_url="https://github.com/pmdartus/NanoCube/tarball/0.1.1",
long_description=readme(),
packages=find_packages(exclude=['test']),
install_requires=reqs(),
entry_points={
"console_scripts": [
"nanodb_server=libs.server:init_parser",
"nanodb=libs.client.cli:init_parser"
]
},
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Database :: Database Engines/Servers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 2.7",
]
)
| apache-2.0 | Python |
fea01346a3d3b8600720444cb43961ffaff2e6ae | Bump version | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='radar',
version='2.3.9',
description='RaDaR - Rare Disease Registry',
author='Rupert Bedford',
author_email='rupert.bedford@renalregistry.nhs.uk',
url='https://www.radar.nhs.uk/',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points={
'console_scripts': [
'radar-exporter = radar.exporter.__main__:main',
'radar-ukrdc-exporter = radar.ukrdc_exporter.__main__:main',
]
},
install_requires=[
'celery',
'click',
'cornflake',
'enum34',
'flask',
'flask-sqlalchemy',
'itsdangerous',
'jinja2',
'librabbitmq',
'psycopg2',
'python-dateutil',
'pytz',
'requests',
'six',
'sqlalchemy',
'sqlalchemy-enum34',
'termcolor',
'uwsgi',
'werkzeug',
'zxcvbn',
],
)
| from setuptools import setup, find_packages
setup(
name='radar',
version='2.3.8',
description='RaDaR - Rare Disease Registry',
author='Rupert Bedford',
author_email='rupert.bedford@renalregistry.nhs.uk',
url='https://www.radar.nhs.uk/',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
entry_points={
'console_scripts': [
'radar-exporter = radar.exporter.__main__:main',
'radar-ukrdc-exporter = radar.ukrdc_exporter.__main__:main',
]
},
install_requires=[
'celery',
'click',
'cornflake',
'enum34',
'flask',
'flask-sqlalchemy',
'itsdangerous',
'jinja2',
'librabbitmq',
'psycopg2',
'python-dateutil',
'pytz',
'requests',
'six',
'sqlalchemy',
'sqlalchemy-enum34',
'termcolor',
'uwsgi',
'werkzeug',
'zxcvbn',
],
)
| agpl-3.0 | Python |
67aee2177f9d64877dec00c41beff6974e23db88 | Disable flaky test Pixel.Canvas2DRedBox. | Just-D/chromium-1,ltilve/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,ltilve/chromium,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,fujunwei/chromium-crosswalk,ltilve/chromium | content/test/gpu/page_sets/pixel_tests.py | content/test/gpu/page_sets/pixel_tests.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class PixelTestsPage(page_module.Page):
def __init__(self, url, name, test_rect, revision, page_set):
super(PixelTestsPage, self).__init__(url=url, page_set=page_set, name=name)
self.user_agent_type = 'desktop'
self.test_rect = test_rect
self.revision = revision
def RunNavigateSteps(self, action_runner):
super(PixelTestsPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
'domAutomationController._finished', timeout_in_seconds=30)
class PixelTestsPageSet(page_set_module.PageSet):
""" Some basic test cases for GPU. """
def __init__(self):
super(PixelTestsPageSet, self).__init__(
user_agent_type='desktop')
# self.AddUserStory(PixelTestsPage(
# url='file://../../data/gpu/pixel_canvas2d.html',
# name='Pixel.Canvas2DRedBox',
# test_rect=[0, 0, 300, 300],
# revision=4,
# page_set=self))
self.AddUserStory(PixelTestsPage(
url='file://../../data/gpu/pixel_css3d.html',
name='Pixel.CSS3DBlueBox',
test_rect=[0, 0, 300, 300],
revision=12,
page_set=self))
self.AddUserStory(PixelTestsPage(
url='file://../../data/gpu/pixel_webgl.html',
name='Pixel.WebGLGreenTriangle',
test_rect=[0, 0, 300, 300],
revision=9,
page_set=self))
| # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class PixelTestsPage(page_module.Page):
def __init__(self, url, name, test_rect, revision, page_set):
super(PixelTestsPage, self).__init__(url=url, page_set=page_set, name=name)
self.user_agent_type = 'desktop'
self.test_rect = test_rect
self.revision = revision
def RunNavigateSteps(self, action_runner):
super(PixelTestsPage, self).RunNavigateSteps(action_runner)
action_runner.WaitForJavaScriptCondition(
'domAutomationController._finished', timeout_in_seconds=30)
class PixelTestsPageSet(page_set_module.PageSet):
""" Some basic test cases for GPU. """
def __init__(self):
super(PixelTestsPageSet, self).__init__(
user_agent_type='desktop')
self.AddUserStory(PixelTestsPage(
url='file://../../data/gpu/pixel_canvas2d.html',
name='Pixel.Canvas2DRedBox',
test_rect=[0, 0, 300, 300],
revision=4,
page_set=self))
self.AddUserStory(PixelTestsPage(
url='file://../../data/gpu/pixel_css3d.html',
name='Pixel.CSS3DBlueBox',
test_rect=[0, 0, 300, 300],
revision=12,
page_set=self))
self.AddUserStory(PixelTestsPage(
url='file://../../data/gpu/pixel_webgl.html',
name='Pixel.WebGLGreenTriangle',
test_rect=[0, 0, 300, 300],
revision=9,
page_set=self))
| bsd-3-clause | Python |
d1c93d46f4d9f5a21ca97c0825add06406569fc7 | Make sure to ship translations with sdists. | tkaemming/django-orderable,tkaemming/django-orderable,tkaemming/django-orderable | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = 'django-orderable',
version = '1.0.1',
description = 'Model ordering for the Django administration site.',
author = 'Ted Kaemming',
author_email = 'ted@kaemming.com',
url = 'http://www.github.com/tkaemming/django-orderable/',
packages = find_packages('src'),
package_dir = {'': 'src'},
package_data = {
'orderable': [
'templates/orderable/change_list.html',
'templates/orderable/edit_inline/stacked.html',
'templates/orderable/edit_inline/tabular.html',
'templates/orderable/orderable.js',
'locale/*/LC_MESSAGES/django.*',
]
},
install_requires = ['setuptools'],
zip_safe = False
) | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = 'django-orderable',
version = '1.0.1',
description = 'Model ordering for the Django administration site.',
author = 'Ted Kaemming',
author_email = 'ted@kaemming.com',
url = 'http://www.github.com/tkaemming/django-orderable/',
packages = find_packages('src'),
package_dir = {'': 'src'},
package_data = {
'orderable': [
'templates/orderable/change_list.html',
'templates/orderable/edit_inline/stacked.html',
'templates/orderable/edit_inline/tabular.html',
'templates/orderable/orderable.js',
]
},
install_requires = ['setuptools'],
zip_safe = False
) | mit | Python |
1545ab81e08d25a0a05ca202a9e0c222e76e1f17 | Update sulong version | pointhi/java-llvm-ir-builder,pointhi/java-llvm-ir-builder | mx.irbuilder/suite.py | mx.irbuilder/suite.py | suite = {
"mxversion" : "5.70.2",
"name" : "java-llvm-ir-builder",
"versionConflictResolution" : "latest",
"imports" : {
"suites" : [
{
"name" : "sulong",
"version" : "6e5a4355382c4abfbe81fe692e9eef290754b79b",
"urls" : [
{
"url" : "https://github.com/graalvm/sulong",
"kind" : "git"
},
]
},
],
},
"javac.lint.overrides" : "none",
"projects" : {
"at.pointhi.irbuilder.irwriter" : {
"subDir" : "projects",
"sourceDirs" : ["src"],
"dependencies" : [],
"javaCompliance" : "1.8",
"license" : "BSD-new",
},
}
}
| suite = {
"mxversion" : "5.70.2",
"name" : "java-llvm-ir-builder",
"versionConflictResolution" : "latest",
"imports" : {
"suites" : [
{
"name" : "sulong",
"version" : "b28e3d4804a9aae68c0c815f52d5d31bd7ef741e",
"urls" : [
{
"url" : "https://github.com/graalvm/sulong",
"kind" : "git"
},
]
},
],
},
"javac.lint.overrides" : "none",
"projects" : {
"at.pointhi.irbuilder.irwriter" : {
"subDir" : "projects",
"sourceDirs" : ["src"],
"dependencies" : [],
"javaCompliance" : "1.8",
"license" : "BSD-new",
},
}
}
| bsd-3-clause | Python |
877c2e1c453386b3fa4d249f3a76a7e345c97d23 | Change project maturity level and bump to 0.3 | filwaitman/jinja2-standalone-compiler | setup.py | setup.py | from setuptools import setup
VERSION = '0.3'
setup(
name='jinja2_standalone_compiler',
packages=['jinja2_standalone_compiler', ],
version=VERSION,
author='Filipe Waitman',
author_email='filwaitman@gmail.com',
install_requires=[x.strip() for x in open('requirements.txt').readlines()],
url='https://github.com/filwaitman/jinja2-standalone-compiler',
download_url='https://github.com/filwaitman/jinja2-standalone-compiler/tarball/{}'.format(VERSION),
test_suite='tests',
keywords=['Jinja2', 'Jinja', 'renderer', 'compiler', 'HTML'],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Operating System :: OS Independent",
],
entry_points="""\
[console_scripts]
jinja2_standalone_compiler = jinja2_standalone_compiler:main_command
""",
)
| from setuptools import setup
VERSION = '0.2.9'
setup(
name='jinja2_standalone_compiler',
packages=['jinja2_standalone_compiler', ],
version=VERSION,
author='Filipe Waitman',
author_email='filwaitman@gmail.com',
install_requires=[x.strip() for x in open('requirements.txt').readlines()],
url='https://github.com/filwaitman/jinja2-standalone-compiler',
download_url='https://github.com/filwaitman/jinja2-standalone-compiler/tarball/{}'.format(VERSION),
test_suite='tests',
keywords=['Jinja2', 'Jinja', 'renderer', 'compiler', 'HTML'],
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Operating System :: OS Independent",
],
entry_points="""\
[console_scripts]
jinja2_standalone_compiler = jinja2_standalone_compiler:main_command
""",
)
| mit | Python |
4642d609b0da5f5c30b1f32e337f667897c662cb | fix setup.py | cloudbrain/cloudbrain,lambdaloop/cloudbrain,lambdaloop/cloudbrain,marionleborgne/cloudbrain,singlerider/cloudbrain,lambdaloop/cloudbrain,cloudbrain/cloudbrain,singlerider/cloudbrain,lambdaloop/cloudbrain,singlerider/cloudbrain,marionleborgne/cloudbrain,singlerider/cloudbrain | setup.py | setup.py | import os
from setuptools import setup, find_packages
from pip.req import parse_requirements
# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements("requirements.txt", session=False)
# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]
def read(fname):
"""
Utility function to read specified file.
"""
path = os.path.join(os.path.dirname(__file__), fname)
return open(path).read()
setup(name="cloudbrain",
version="0.2.1",
description="Platform for real-time sensor data analysis and visualization.",
packages=find_packages(),
install_requires=reqs,
include_package_data=True,
long_description=read("README.md"),
license='GNU Affero General Public License v3',
classifiers=[
'License :: OSI Approved :: GNU Affero General Public License v3'
],
entry_points = {
'console_scripts': [
'cloudbrain = cloudbrain.run:main'
]
})
| import os
from setuptools import setup, find_packages
from pip.req import parse_requirements
# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements("requirements.txt")
# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]
def read(fname):
"""
Utility function to read specified file.
"""
path = os.path.join(os.path.dirname(__file__), fname)
return open(path).read()
setup(name="cloudbrain",
version="0.2.1",
description="Platform for real-time sensor data analysis and visualization.",
packages=find_packages(),
install_requires=reqs,
include_package_data=True,
long_description=read("README.md"),
license='GNU Affero General Public License v3',
classifiers=[
'License :: OSI Approved :: GNU Affero General Public License v3'
],
entry_points = {
'console_scripts': [
'cloudbrain = cloudbrain.run:main'
]
})
| agpl-3.0 | Python |
3fe8cc91e4ef3e143bfaf6172b3899eb0993194f | modify setup.py | encorehu/hublog | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='hublog',
version="0.1",
author='encorehu',
author_email='huyoo353@126.com',
description='a django blog',
url='https://github.com/encorehu/hublog',
packages=find_packages(),
package_dir={'hublog':'blog'},
package_data={'blog':['*.*',
'templates/*.*',
'templates/blog/*.*',
]},
zip_safe = False,
include_package_data=True,
classifiers=[
"Framework :: Django",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Topic :: Software Development"
],
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='hublog',
version="0.1",
author='encorehu',
author_email='huyoo353@126.com',
description='a django blog',
url='https://github.com/encorehu/hublog',
packages=find_packages(),
package_dir={'hublog':'blog'},
package_data={'hublog':['*.*','templates/blog/*.*']},
zip_safe = False,
include_package_data=True,
classifiers=[
"Framework :: Django",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Topic :: Software Development"
],
)
| mit | Python |
5ecf5f5ebc5e977a4e9457fd1d53ae8b58401e19 | Bump version | victorlin/rundocker | setup.py | setup.py | from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='rundocker',
version='1.0.1',
description=(
'A script for running docker container process without worrying '
'about dead container issue'
),
packages=find_packages(),
author='Victor Lin',
author_email='hello@victorlin.me',
url='https://github.com/victorlin/rundocker',
install_requires=[
'docker-py',
],
entry_points="""\
[console_scripts]
rundocker = rundocker.__main__:main
""",
)
| from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='rundocker',
version='1.0.0',
description=(
'A script for running docker container process without worrying '
'about dead container issue'
),
packages=find_packages(),
author='Victor Lin',
author_email='hello@victorlin.me',
url='https://github.com/victorlin/rundocker',
install_requires=[
'docker-py',
],
entry_points="""\
[console_scripts]
rundocker = rundocker.__main__:main
""",
)
| apache-2.0 | Python |
615fa69c4185f51c873a97cb47ff8cd6f853a8c7 | update dependency grpcio to v1.49.1 (#348) | googleapis/storage-testbench | setup.py | setup.py | # Copyright 2021 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 setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="googleapis-storage-testbench",
version="0.31.0",
author="Google LLC",
author_email="googleapis-packages@google.com",
description="A testbench for Google Cloud Storage client libraries",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/googleapis/storage-testbench",
project_urls={
"Bug Tracker": "https://github.com/googleapis/storage-testbench/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache-2.0",
"Operating System :: OS Independent",
],
packages=[
"google/storage/v2",
"google/iam/v1",
"testbench",
"testbench/servers",
"gcs",
],
python_requires=">=3.6",
install_requires=[
"grpcio==1.49.1",
"googleapis-common-protos==1.56.0",
"protobuf==3.20.3",
"flask==2.2.2",
"requests-toolbelt==0.9.1",
"scalpl==0.4.2",
"crc32c==2.3",
"gunicorn==20.1.0",
],
)
| # Copyright 2021 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 setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="googleapis-storage-testbench",
version="0.31.0",
author="Google LLC",
author_email="googleapis-packages@google.com",
description="A testbench for Google Cloud Storage client libraries",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/googleapis/storage-testbench",
project_urls={
"Bug Tracker": "https://github.com/googleapis/storage-testbench/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache-2.0",
"Operating System :: OS Independent",
],
packages=[
"google/storage/v2",
"google/iam/v1",
"testbench",
"testbench/servers",
"gcs",
],
python_requires=">=3.6",
install_requires=[
"grpcio==1.46.1",
"googleapis-common-protos==1.56.0",
"protobuf==3.20.3",
"flask==2.2.2",
"requests-toolbelt==0.9.1",
"scalpl==0.4.2",
"crc32c==2.3",
"gunicorn==20.1.0",
],
)
| apache-2.0 | Python |
ddc9157f6d8e123b0a998e56b9385ca852e24560 | rename plugin | cloudify-cosmo/cloudify-cloudstack-plugin,cloudify-cosmo/cloudify-cloudstack-plugin | setup.py | setup.py | __author__ = 'adaml, boul, jedeko'
from setuptools import setup
setup(
zip_safe=True,
name='cloudify-cloudstack-plugin',
version='0.1.1',
packages=[
'cloudstack_plugin',
'cloudstack_exoscale_plugin'
],
license='Apache License 2.0',
description='Cloudify plugin for the Cloudstack cloud infrastructure.',
install_requires=[
"cloudify-plugins-common",
"cloudify-plugins-common>=3.0",
"apache-libcloud"
]
)
| __author__ = 'adaml, boul, jedeko'
from setuptools import setup
setup(
zip_safe=True,
name='cloudify-plugin',
version='0.1.1',
packages=[
'cloudstack_plugin',
'cloudstack_exoscale_plugin'
],
license='Apache License 2.0',
description='Cloudify plugin for the Cloudstack cloud infrastructure.',
install_requires=[
"cloudify-plugins-common",
"cloudify-plugins-common>=3.0",
"apache-libcloud"
]
)
| apache-2.0 | Python |
df40a8b3291c5c585cf2b17b824a00af1907c312 | Switch value to None type | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | csunplugged/config/settings/production.py | csunplugged/config/settings/production.py | # -*- coding: utf-8 -*-
"""
Django settings for production environment.
- Load secret values from environment variables.
- Set static URL to Google Cloud Storage Bucket.
"""
from .base import * # noqa: F403
# SECRET CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
# Raises ImproperlyConfigured exception if DJANGO_SECRET_KEY not in os.environ
SECRET_KEY = env("DJANGO_SECRET_KEY") # noqa: F405
# SECURITY WARNING: App Engine"s security features ensure that it is safe to
# have ALLOWED_HOSTS = ["*"] when the app is deployed. If you deploy a Django
# app not on App Engine, make sure to set an appropriate host here.
# See https://docs.djangoproject.com/en/1.10/ref/settings/
ALLOWED_HOSTS = ["*"]
# URL Configuration
# ------------------------------------------------------------------------------
if env("DEPLOYMENT", default=None) == "prod": # noqa: F405
PREPEND_WWW = True
else:
PREPEND_WWW = False
# DATABASE CONFIGURATION
# ----------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "csunplugged",
"USER": env("GOOGLE_CLOUD_SQL_DATABASE_USERNAME"), # noqa: F405
"PASSWORD": env("GOOGLE_CLOUD_SQL_DATABASE_PASSWORD"), # noqa: F405
"HOST": "/cloudsql/" + env("GOOGLE_CLOUD_SQL_CONNECTION_NAME"), # noqa: F405
}
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
# Static files
STATIC_URL = "https://storage.googleapis.com/" + env("GOOGLE_CLOUD_STORAGE_BUCKET_NAME") + "/static/" # noqa: F405
# SECURITY CONFIGURATION
# ------------------------------------------------------------------------------
# See https://docs.djangoproject.com/en/dev/ref/middleware/#module-django.middleware.security
# and https://docs.djangoproject.com/en/dev/howto/deployment/checklist/#run-manage-py-check-deploy
# set this to 60 seconds and then to 518400 when you can prove it works
SECURE_HSTS_SECONDS = 60
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool("DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS", default=True) # noqa: F405
SECURE_CONTENT_TYPE_NOSNIFF = env.bool("DJANGO_SECURE_CONTENT_TYPE_NOSNIFF", default=True) # noqa: F405
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True) # noqa: F405
CSRF_COOKIE_SECURE = True
CSRF_COOKIE_HTTPONLY = True
X_FRAME_OPTIONS = "DENY"
| # -*- coding: utf-8 -*-
"""
Django settings for production environment.
- Load secret values from environment variables.
- Set static URL to Google Cloud Storage Bucket.
"""
from .base import * # noqa: F403
# SECRET CONFIGURATION
# ------------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
# Raises ImproperlyConfigured exception if DJANGO_SECRET_KEY not in os.environ
SECRET_KEY = env("DJANGO_SECRET_KEY") # noqa: F405
# SECURITY WARNING: App Engine"s security features ensure that it is safe to
# have ALLOWED_HOSTS = ["*"] when the app is deployed. If you deploy a Django
# app not on App Engine, make sure to set an appropriate host here.
# See https://docs.djangoproject.com/en/1.10/ref/settings/
ALLOWED_HOSTS = ["*"]
# URL Configuration
# ------------------------------------------------------------------------------
if env("DEPLOYMENT", default="none") == "prod": # noqa: F405
PREPEND_WWW = True
else:
PREPEND_WWW = False
# DATABASE CONFIGURATION
# ----------------------------------------------------------------------------
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "csunplugged",
"USER": env("GOOGLE_CLOUD_SQL_DATABASE_USERNAME"), # noqa: F405
"PASSWORD": env("GOOGLE_CLOUD_SQL_DATABASE_PASSWORD"), # noqa: F405
"HOST": "/cloudsql/" + env("GOOGLE_CLOUD_SQL_CONNECTION_NAME"), # noqa: F405
}
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
# Static files
STATIC_URL = "https://storage.googleapis.com/" + env("GOOGLE_CLOUD_STORAGE_BUCKET_NAME") + "/static/" # noqa: F405
# SECURITY CONFIGURATION
# ------------------------------------------------------------------------------
# See https://docs.djangoproject.com/en/dev/ref/middleware/#module-django.middleware.security
# and https://docs.djangoproject.com/en/dev/howto/deployment/checklist/#run-manage-py-check-deploy
# set this to 60 seconds and then to 518400 when you can prove it works
SECURE_HSTS_SECONDS = 60
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_HSTS_INCLUDE_SUBDOMAINS = env.bool("DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS", default=True) # noqa: F405
SECURE_CONTENT_TYPE_NOSNIFF = env.bool("DJANGO_SECURE_CONTENT_TYPE_NOSNIFF", default=True) # noqa: F405
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
SECURE_SSL_REDIRECT = env.bool("DJANGO_SECURE_SSL_REDIRECT", default=True) # noqa: F405
CSRF_COOKIE_SECURE = True
CSRF_COOKIE_HTTPONLY = True
X_FRAME_OPTIONS = "DENY"
| mit | Python |
e3ce72ccbcff614ffb098ba1d239e6cffeb6c3bd | Change README path | NIEHS/muver | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.md') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'numpy>=1.12.0',
'scipy>=0.18.1',
'matplotlib>=2.0.0',
'regex>=2017.6.23',
# TODO: put package requirements here
]
setup_requirements = [
'pytest-runner',
# TODO(lavenderca): put setup requirements (distutils extensions, etc.) here
]
test_requirements = [
'pytest',
# TODO: put package test requirements here
]
setup(
name='muver',
version='0.1.0',
description="SNP and indel caller for mutation accumulation experiments",
long_description=readme + '\n\n' + history,
author="Christopher Andrew Lavender",
author_email='christopher.lavender@nih.gov',
url='https://github.com/lavenderca/muver',
packages=find_packages(include=['muver']),
entry_points={
'console_scripts': [
'muver=muver.cli:main'
]
},
include_package_data=True,
install_requires=requirements,
license="MIT license",
zip_safe=False,
keywords='muver',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements,
setup_requires=setup_requirements,
data_files=[('config', ['paths.cfg'])],
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'numpy>=1.12.0',
'scipy>=0.18.1',
'matplotlib>=2.0.0',
'regex>=2017.6.23',
# TODO: put package requirements here
]
setup_requirements = [
'pytest-runner',
# TODO(lavenderca): put setup requirements (distutils extensions, etc.) here
]
test_requirements = [
'pytest',
# TODO: put package test requirements here
]
setup(
name='muver',
version='0.1.0',
description="SNP and indel caller for mutation accumulation experiments",
long_description=readme + '\n\n' + history,
author="Christopher Andrew Lavender",
author_email='christopher.lavender@nih.gov',
url='https://github.com/lavenderca/muver',
packages=find_packages(include=['muver']),
entry_points={
'console_scripts': [
'muver=muver.cli:main'
]
},
include_package_data=True,
install_requires=requirements,
license="MIT license",
zip_safe=False,
keywords='muver',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements,
setup_requires=setup_requirements,
data_files=[('config', ['paths.cfg'])],
)
| mit | Python |
d50a2c092a6dd38e42324b97db65543024e9d6b9 | Rename exe file | ucoin-io/cutecoin,ucoin-io/cutecoin,ucoin-io/cutecoin,ucoin-bot/cutecoin,Insoleet/cutecoin | setup.py | setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# source d'inspiration: http://wiki.wxpython.org/cx_freeze
import sys, os, subprocess, multiprocessing
from cx_Freeze import setup, Executable
#############################################################################
# preparation des options
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
print(sys.path)
includes = ["sip", "re", "json", "logging", "hashlib", "os", "urllib", "ucoin", "requests"]
excludes = []
packages = ["gnupg"]
options = {"path": sys.path,
"includes": includes,
"excludes": excludes,
"packages": packages,
}
#############################################################################
# preparation des cibles
base = None
file_type=""
if sys.platform == "win32":
base = "Win32GUI"
file_type=".exe"
target = Executable(
script = "src/cutecoin/__init__.py",
targetName="cutecoin"+file_type,
base = base,
compress = True,
icon = None,
)
#############################################################################
# creation du setup
setup(
name = "cutecoin",
version = "0.4.0",
description = "UCoin client",
author = "Inso",
options = {"build_exe": options},
executables = [target]
)
| #!/usr/bin/python
# -*- coding: utf-8 -*-
# source d'inspiration: http://wiki.wxpython.org/cx_freeze
import sys, os, subprocess, multiprocessing
from cx_Freeze import setup, Executable
#############################################################################
# preparation des options
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
print(sys.path)
includes = ["sip", "re", "json", "logging", "hashlib", "os", "urllib", "ucoin", "requests"]
excludes = []
packages = ["gnupg"]
options = {"path": sys.path,
"includes": includes,
"excludes": excludes,
"packages": packages,
}
#############################################################################
# preparation des cibles
base = None
if sys.platform == "win32":
base = "Win32GUI"
target = Executable(
script = "src/cutecoin/__init__.py",
base = base,
compress = True,
icon = None,
)
#############################################################################
# creation du setup
setup(
name = "cutecoin",
version = "0.4.0",
description = "UCoin client",
author = "Inso",
options = {"build_exe": options},
executables = [target]
)
| mit | Python |
4dc8316d1f5378db974437e462df12d697d126ea | Mark project as beta release | rudylattae/compare,rudylattae/compare | setup.py | setup.py | import os
from setuptools import setup
version = '0.2b'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CHANGES.txt').read(),
])
setup(
name = "compare",
version = version,
description = "Alternative syntax for comparing/asserting expressions in Python. Supports pluggable matchers for custom comparisons.",
long_description = long_description,
author = "Rudy Lattae",
author_email = "rudylattae@gmail.com",
url = 'https://github.com/rudylattae/compare',
license = "Simplified BSD",
keywords = ['python', 'compare', 'matcher', 'to be', 'to equal', 'assert', 'test equality', 'specification', 'BDD', 'TDD'],
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
],
py_modules = ['compare'],
zip_safe = False
) | import os
from setuptools import setup
version = '0.2dev'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CHANGES.txt').read(),
])
setup(
name = "compare",
version = version,
description = "Alternative syntax for comparing/asserting expressions in Python. Supports pluggable matchers for custom comparisons.",
long_description = long_description,
author = "Rudy Lattae",
author_email = "rudylattae@gmail.com",
url = 'https://github.com/rudylattae/compare',
license = "Simplified BSD",
keywords = ['python', 'compare', 'matcher', 'to be', 'to equal', 'assert', 'test equality', 'specification', 'BDD', 'TDD'],
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
],
py_modules = ['compare'],
zip_safe = False
) | bsd-3-clause | Python |
7087e92d40310d9bb6c8b4a6bb1baf7c3b73bee7 | bump to v0.8.2 | SLS-Dev/cxmanage,SilverLiningSystems/cxmanage-test2,SilverLiningSystems/cxmanage-test2,SilverLiningSystems/cxmanage-test,SilverLiningSystems/cxmanage-test,Cynerva/cxmanage,SLS-Dev/cxmanage,Cynerva/cxmanage | setup.py | setup.py | # Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Calxeda Inc. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
from setuptools import setup
setup(
name='cxmanage',
version='0.8.2',
packages=['cxmanage', 'cxmanage.commands', 'cxmanage_api'],
scripts=['scripts/cxmanage', 'scripts/sol_tabs'],
description='Calxeda Management Utility',
# NOTE: As of right now, the pyipmi version requirement needs to be updated
# at the top of scripts/cxmanage as well.
install_requires=[
'tftpy',
'pexpect',
'pyipmi>=0.7.1',
'argparse',
],
extras_require={
'docs': ['sphinx', 'cloud_sptheme'],
},
classifiers=[
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7']
)
| # Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Calxeda Inc. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
from setuptools import setup
setup(
name='cxmanage',
version='0.8.1',
packages=['cxmanage', 'cxmanage.commands', 'cxmanage_api'],
scripts=['scripts/cxmanage', 'scripts/sol_tabs'],
description='Calxeda Management Utility',
# NOTE: As of right now, the pyipmi version requirement needs to be updated
# at the top of scripts/cxmanage as well.
install_requires=[
'tftpy',
'pexpect',
'pyipmi>=0.7.1',
'argparse',
],
extras_require={
'docs': ['sphinx', 'cloud_sptheme'],
},
classifiers=[
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2.7']
)
| bsd-3-clause | Python |
f5d60320d262028e9d35b395ba0c582ef9555217 | Bump version number | gears/gears-coffeescript,gears/gears-coffeescript | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='gears-coffeescript',
version='0.1',
url='https://github.com/gears/gears-coffeescript',
license='ISC',
author='Mike Yumatov',
author_email='mike@yumatov.org',
description='CoffeeScript compiler for Gears',
long_description=read('README.rst'),
packages=find_packages(),
include_package_data=True,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)
| import os
from setuptools import setup, find_packages
def read(filename):
return open(os.path.join(os.path.dirname(__file__), filename)).read()
setup(
name='gears-coffeescript',
version='0.1.dev',
url='https://github.com/gears/gears-coffeescript',
license='ISC',
author='Mike Yumatov',
author_email='mike@yumatov.org',
description='CoffeeScript compiler for Gears',
long_description=read('README.rst'),
packages=find_packages(),
include_package_data=True,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
)
| isc | Python |
00e051dfb7cefa682f3bf04f0672990759f4e753 | Add in tx_people as a requirement | texastribune/tx_salaries,texastribune/tx_salaries | setup.py | setup.py | from distutils.core import setup
import os
# Stolen from django-registration
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
for dirpath, dirnames, filenames in os.walk('tx_salaries'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if '__init__.py' in filenames:
pkg = dirpath.replace(os.path.sep, '.')
if os.path.altsep:
pkg = pkg.replace(os.path.altsep, '.')
packages.append(pkg)
elif filenames:
prefix = dirpath[len('tx_salaries/'):]
for f in filenames:
data_files.append(os.path.join(prefix, f))
setup(
name='tx_salaries',
version='0.1.0',
description='Texas Tribune: tx_salaries',
author='Tribune Tech',
author_email='tech@texastribune.org',
url='http://github.com/texastribune/tx_salaries/',
packages=packages,
package_data={'tx_salaries': data_files},
install_requires=[
'tx_people>=0.1.0',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
],
)
| from distutils.core import setup
import os
# Stolen from django-registration
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
for dirpath, dirnames, filenames in os.walk('tx_salaries'):
# Ignore dirnames that start with '.'
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if '__init__.py' in filenames:
pkg = dirpath.replace(os.path.sep, '.')
if os.path.altsep:
pkg = pkg.replace(os.path.altsep, '.')
packages.append(pkg)
elif filenames:
prefix = dirpath[len('tx_salaries/'):]
for f in filenames:
data_files.append(os.path.join(prefix, f))
setup(
name='tx_salaries',
version='0.1.0',
description='Texas Tribune: tx_salaries',
author='Tribune Tech',
author_email='tech@texastribune.org',
url='http://github.com/texastribune/tx_salaries/',
packages=packages,
package_data={'tx_salaries': data_files},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities',
],
)
| apache-2.0 | Python |
d33fe4b1bc31db4745e60164077b50506baf3289 | Update description in `setup.py`. | wtsi-hgi/python-json | setup.py | setup.py | from setuptools import setup, find_packages
try:
from pypandoc import convert
def read_markdown(file: str) -> str:
return convert(file, "rst")
except ImportError:
def read_markdown(file: str) -> str:
return open(file, "r").read()
setup(
name="hgijson",
version="1.3.0",
author="Colin Nolan",
author_email="colin.nolan@sanger.ac.uk",
packages=find_packages(exclude=["tests"]),
install_requires = open("requirements.txt", "r").readline(),
url="https://github.com/wtsi-hgi/python-json",
license="MIT",
description="Python 3 library for easily JSON encoding/decoding complex class-based Python models, using an "
"arbitrarily complex (but easy to write!) mapping schema.",
long_description=read_markdown("README.md"),
keywords=["json", "serialization"],
test_suite="hgijson.tests",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License"
]
)
| from setuptools import setup, find_packages
try:
from pypandoc import convert
def read_markdown(file: str) -> str:
return convert(file, "rst")
except ImportError:
def read_markdown(file: str) -> str:
return open(file, "r").read()
setup(
name="hgijson",
version="1.3.0",
author="Colin Nolan",
author_email="colin.nolan@sanger.ac.uk",
packages=find_packages(exclude=["tests"]),
install_requires = open("requirements.txt", "r").readline(),
url="https://github.com/wtsi-hgi/python-json",
license="MIT",
description="Python 3 library for easily JSON encoding/decoding complex class-based Python models, using an "
"arbitrarily complex mapping schema.",
long_description=read_markdown("README.md"),
keywords=["json", "serialization"],
test_suite="hgijson.tests",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License"
]
)
| mit | Python |
4f41b3512d63f0d59aa8ba9caf7b96c954a74ad2 | update pypi doc | ActivisionGameScience/assertpy | setup.py | setup.py | from distutils.core import setup
import assertpy
desc = """assertpy
========
Dead simple assertions framework for unit testing in Python with a nice fluent
API that supports Python 2 and 3.
Usage
'''''
Just import the ``assert_that`` function, and away you go::
from assertpy import assert_that
class TestSomething(object):
def test_something(self):
assert_that(1 + 2).is_equal_to(3)
assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar')
Of course, ``assertpy`` works best with a python test runner
like `pytest <http://pytest.org/latest/contents.html>`_ (our favorite)
or `Nose <http://nose.readthedocs.org/>`_."""
setup(name = 'assertpy',
packages = ['assertpy'],
version = assertpy.__version__,
description = 'Assertion framework for python unit testing with a fluent API',
long_description = desc,
author = 'Justin Shacklette',
author_email = 'justin@saturnboy.com',
url = 'https://github.com/ActivisionGameScience/assertpy',
download_url = 'https://codeload.github.com/ActivisionGameScience/assertpy/tar.gz/%s' % assertpy.__version__,
keywords = ['test', 'testing', 'assert', 'assertion', 'asserthat', 'assert_that', 'nose', 'nosetests', 'pytest'],
license = 'BSD',
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development',
'Topic :: Software Development :: Testing']
)
| from distutils.core import setup
import assertpy
desc = """assertpy
========
Dead simple assertions framework for unit testing in Python with a nice fluent
API that supports Python 2 and 3.
Usage
'''''
Just import the ``assert_that`` function, and away you go::
from assertpy import assert_that
class TestSomething(object):
def test_something(self):
assert_that(1 + 2).is_equal_to(3)
assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar')
Of course, ``assertpy`` works best with a python test runner
like `Nose <http://nose.readthedocs.org/>`_
or `pytest <http://pytest.org/latest/contents.html>`_."""
setup(name = 'assertpy',
packages = ['assertpy'],
version = assertpy.__version__,
description = 'Assertion framework for python unit testing with a fluent API',
long_description = desc,
author = 'Justin Shacklette',
author_email = 'justin@saturnboy.com',
url = 'https://github.com/ActivisionGameScience/assertpy',
download_url = 'https://codeload.github.com/ActivisionGameScience/assertpy/tar.gz/%s' % assertpy.__version__,
keywords = ['test', 'testing', 'assert', 'assertion', 'asserthat', 'assert_that', 'nose', 'nosetests', 'pytest'],
license = 'BSD',
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development',
'Topic :: Software Development :: Testing']
)
| bsd-3-clause | Python |
7b840886158efcc26c514caa2ccf9f2ad57bdc29 | Bump ITK dependency to 5.0.1 | thewtex/ITKUltrasound,thewtex/ITKUltrasound,KitwareMedical/ITKUltrasound,thewtex/ITKUltrasound,KitwareMedical/ITKUltrasound,KitwareMedical/ITKUltrasound | setup.py | setup.py | from __future__ import print_function
from os import sys
from skbuild import setup
setup(
name='itk-ultrasound',
version='0.2.3',
author='Matthew McCormick',
author_email='matt.mccormick@kitware.com',
packages=['itk'],
package_dir={'itk': 'itk'},
download_url=r'https://github.com/KitwareMedical/ITKUltrasound',
description=(r'Filters for use with the Insight Toolkit (ITK)'
' that may be particularly useful for the reconstruction and'
' analysis of ultrasound images.'),
long_description=(r'This package contains filters for use with the Insight Toolkit'
' (ITK) for the reconstruction and analysis of ultrasound images. This includes'
' B-mode image generation, scan conversion, strain imaging, and '
' ultrasound spectroscopy.'),
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 :: Android",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS"
],
license='Apache',
keywords='ITK InsightToolkit ultrasound imaging',
url=r'http://www.insight-journal.org/browse/publication/722',
install_requires=[
r'itk>=5.0.1',
r'itk-bsplinegradient'
]
)
| from __future__ import print_function
from os import sys
from skbuild import setup
setup(
name='itk-ultrasound',
version='0.2.3',
author='Matthew McCormick',
author_email='matt.mccormick@kitware.com',
packages=['itk'],
package_dir={'itk': 'itk'},
download_url=r'https://github.com/KitwareMedical/ITKUltrasound',
description=(r'Filters for use with the Insight Toolkit (ITK)'
' that may be particularly useful for the reconstruction and'
' analysis of ultrasound images.'),
long_description=(r'This package contains filters for use with the Insight Toolkit'
' (ITK) for the reconstruction and analysis of ultrasound images. This includes'
' B-mode image generation, scan conversion, strain imaging, and '
' ultrasound spectroscopy.'),
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 :: Android",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS"
],
license='Apache',
keywords='ITK InsightToolkit ultrasound imaging',
url=r'http://www.insight-journal.org/browse/publication/722',
install_requires=[
r'itk>=5.0.0.post1',
r'itk-bsplinegradient'
]
)
| apache-2.0 | Python |
afa17347a4065cbddc3f904e609dfbde887ae7c5 | Update version to 0987 | kkzxak47/django_render,YuelianINC/django_render,YuelianINC/django_render,wangtai/django_render,wangtai/django_render,kkzxak47/django_render | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: xiLin.ding
from setuptools import setup, find_packages
setup(
name='django-render-url',
version='0.9.8.7',
packages=find_packages(),
author='WANG Tai',
author_email='i@wangtai.me',
url='https://github.com/wangtai/django_render',
description='a very light django plugin',
#long_description=open('README.md').read(),
license='Apache2',
requires=[
'Django',
'enum34'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Topic :: System :: Installation/Setup'
],
include_package_data=True,
zip_safe=False
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: xiLin.ding
from setuptools import setup, find_packages
setup(
name='django-render-url',
version='0.9.8.6',
packages=find_packages(),
author='WANG Tai',
author_email='i@wangtai.me',
url='https://github.com/wangtai/django_render',
description='a very light django plugin',
#long_description=open('README.md').read(),
license='Apache2',
requires=[
'Django',
'enum34'
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Topic :: System :: Installation/Setup'
],
include_package_data=True,
zip_safe=False
)
| apache-2.0 | Python |
8cbfc45b1ae1dcce507e66555217ff897d057e4c | Bump version number | Jyrno42/tgmfiles,Jyrno42/tgmfiles,Jyrno42/tgmfiles | setup.py | setup.py | import os
from setuptools import setup, find_packages
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
setup(
name='tgm-files',
version='0.1.22',
description='Stuff...',
long_description=readme,
author="Thorgate",
author_email='info@thorgate.eu',
url='https://github.com/Jyrno42/tgmfiles',
packages=find_packages(),
package_data={'tgmfiles': [
'static/tgm-files/css/*',
'static/tgm-files/fonts/*',
'static/tgm-files/js/*',
]},
include_package_data=True,
install_requires=[
'Django',
'Pillow',
],
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',
],
)
| import os
from setuptools import setup, find_packages
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
setup(
name='tgm-files',
version='0.1.21',
description='Stuff...',
long_description=readme,
author="Thorgate",
author_email='info@thorgate.eu',
url='https://github.com/Jyrno42/tgmfiles',
packages=find_packages(),
package_data={'tgmfiles': [
'static/tgm-files/css/*',
'static/tgm-files/fonts/*',
'static/tgm-files/js/*',
]},
include_package_data=True,
install_requires=[
'Django',
'Pillow',
],
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',
],
)
| mit | Python |
8303736d3d0da13a08c5cd5979b56c845583358e | add classifiers for pypi | founders4schools/duedilv3 | setup.py | setup.py | import os
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as test_command
class PyTest(test_command):
def finalize_options(self):
test_command.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
version = '0.2'
setup(name='duedil',
version=version,
description="Duedil API client",
long_description=(
open("README.rst").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read() + "\n" +
open(os.path.join("docs", "TODO.txt")).read()
),
classifiers=['Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Development Status :: 3 - Alpha', ],
# Get strings from
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='duedil, api',
author='Christian Ledermann',
author_email='christian.ledermann@gmail.com',
url='https://github.com/founders4schools/duedil',
license='Apache License 2.0',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
],
tests_require=['pytest'],
cmdclass = {'test': PyTest},
entry_points="""
# -*- Entry points: -*-
""",
)
| import os
import sys
from setuptools import find_packages, setup
from setuptools.command.test import test as test_command
class PyTest(test_command):
def finalize_options(self):
test_command.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
version = '0.2'
setup(name='duedil',
version=version,
description="Duedil API client",
long_description=(
open("README.rst").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read() + "\n" +
open(os.path.join("docs", "TODO.txt")).read()
),
classifiers=[],
# Get strings from
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='duedil, api',
author='Christian Ledermann',
author_email='christian.ledermann@gmail.com',
url='https://github.com/founders4schools/duedil',
license='Apache License 2.0',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
],
tests_require=['pytest'],
cmdclass = {'test': PyTest},
entry_points="""
# -*- Entry points: -*-
""",
)
| apache-2.0 | Python |
a1ed05089c983f3347b5164fffe4030d75b9453d | Include data file in package. | danijar/crafter | setup.py | setup.py | import setuptools
import pathlib
setuptools.setup(
name='crafter',
version='0.18.0',
description='Open world survival game for reinforcement learning.',
url='http://github.com/danijar/crafter',
long_description=pathlib.Path('README.md').read_text(),
long_description_content_type='text/markdown',
packages=['crafter'],
package_data={'crafter': ['data.yaml', 'assets/*']},
entry_points={'console_scripts': ['crafter=crafter.run_gui:main']},
install_requires=[
'numpy', 'imageio', 'pillow', 'opensimplex', 'ruamel.yaml'],
extras_require={'gui': ['pygame']},
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Topic :: Games/Entertainment',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
)
| import setuptools
import pathlib
setuptools.setup(
name='crafter',
version='0.17.0',
description='Open world survival game for reinforcement learning.',
url='http://github.com/danijar/crafter',
long_description=pathlib.Path('README.md').read_text(),
long_description_content_type='text/markdown',
packages=['crafter'],
package_data={'crafter': ['assets/*']},
entry_points={'console_scripts': ['crafter=crafter.run_gui:main']},
install_requires=[
'numpy', 'imageio', 'pillow', 'opensimplex', 'ruamel.yaml'],
extras_require={'gui': ['pygame']},
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Topic :: Games/Entertainment',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
)
| mit | Python |
0d1196f2c393d7fd424932cdaf07a9df1ef29223 | change init | jmcarpenter2/swifter | setup.py | setup.py | from distutils.core import setup
setup(
name = 'swifter',
packages = ['swifter'], # this must be the same as the name above
version = '0.201',
description = 'A package which efficiently applies any function to a pandas dataframe or series in the fastest available manner',
author = 'Jason Carpenter',
author_email = 'jmcarpenter2@dons.usfca.edu',
url = 'https://github.com/jmcarpenter2/swifter', # use the URL to the github repo
download_url = 'https://github.com/jmcarpenter2/swifter/archive/0.200.tar.gz',
keywords = ['pandas', 'apply', 'function', 'parallelize', 'vectorize'],
install_requires=[
'pandas',
'psutil',
'dask[complete]'
],
classifiers = [],
)
| from distutils.core import setup
setup(
name = 'swifter',
packages = ['swifter'], # this must be the same as the name above
version = '0.153',
description = 'A package which efficiently applies any function to a pandas dataframe or series in the fastest available manner',
author = 'Jason Carpenter',
author_email = 'jmcarpenter2@dons.usfca.edu',
url = 'https://github.com/jmcarpenter2/swifter', # use the URL to the github repo
download_url = 'https://github.com/jmcarpenter2/swifter/archive/0.152.tar.gz',
keywords = ['pandas', 'apply', 'function', 'parallelize', 'vectorize'],
install_requires=[
'pandas',
'psutil',
'dask'
],
classifiers = [],
)
| mit | Python |
660c08c708dff47912d0d8fdeb3d441ba2480bd0 | Bump version to 0.4.0 | mwilliamson/whack | setup.py | setup.py | #!/usr/bin/env python
import os
from distutils.core import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='whack',
version='0.4.0',
description='Utility for installing binaries from source with a single command',
long_description=read("README"),
author='Michael Williamson',
url='http://github.com/mwilliamson/whack',
scripts=["scripts/whack"],
packages=['whack'],
install_requires=[
'blah>=0.1.10,<0.2',
'requests>=1,<2',
"catchy>=0.1.2,<0.2",
"spur>=0.3,<0.4",
"locket>=0.1.1,<0.2",
],
)
| #!/usr/bin/env python
import os
from distutils.core import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='whack',
version='0.3.4',
description='Utility for installing binaries from source with a single command',
long_description=read("README"),
author='Michael Williamson',
url='http://github.com/mwilliamson/whack',
scripts=["scripts/whack"],
packages=['whack'],
install_requires=[
'blah>=0.1.10,<0.2',
'requests>=1,<2',
"catchy>=0.1.2,<0.2",
"spur>=0.3,<0.4",
"locket>=0.1.1,<0.2",
],
)
| bsd-2-clause | Python |
8ea9ba8149f21116fde18a1021598b7e5c9c9308 | Update setup.py to use renamed README.rst | Maplecroft/django-countries | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def long_description():
"""
Build the long description from a README file located in the same directory
as this module.
"""
base_path = os.path.dirname(os.path.realpath(__file__))
readme = open(os.path.join(base_path, 'README.rst'))
try:
return readme.read()
finally:
readme.close()
setup(
name='django-countries',
version='1.4',
description='Provides a country field for Django models.',
long_description=long_description(),
author='Chris Beaven',
author_email='smileychris@gmail.com',
url='http://bitbucket.org/smileychris/django-countries/',
packages=find_packages(),
zip_safe=False,
package_data={'django_countries': [
'bin/*.py',
'static/flags/*.gif',
'locale/*/LC_MESSAGES/*',
]},
# titlecase PYPI is broken, copied the module directly for now (in /bin)
# requires=['titlecase'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
)
| #!/usr/bin/env python
import os
from setuptools import setup, find_packages
def long_description():
"""
Build the long description from a README file located in the same directory
as this module.
"""
base_path = os.path.dirname(os.path.realpath(__file__))
readme = open(os.path.join(base_path, 'README'))
try:
return readme.read()
finally:
readme.close()
setup(
name='django-countries',
version='1.4',
description='Provides a country field for Django models.',
long_description=long_description(),
author='Chris Beaven',
author_email='smileychris@gmail.com',
url='http://bitbucket.org/smileychris/django-countries/',
packages=find_packages(),
zip_safe=False,
package_data={'django_countries': [
'bin/*.py',
'static/flags/*.gif',
'locale/*/LC_MESSAGES/*',
]},
# titlecase PYPI is broken, copied the module directly for now (in /bin)
# requires=['titlecase'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
],
)
| mit | Python |
84c46be536bdfe3e34d98a64636ba5c8c11591a0 | Add informations to `setup.py` | hildogjr/KiCost,xesscorp/KiCost,xesscorp/KiCost,hildogjr/KiCost,hildogjr/KiCost,xesscorp/KiCost | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
import kicost
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')
requirements = [
'beautifulsoup4 >= 4.3.2',
'XlsxWriter >= 0.7.3',
'future >= 0.15.0',
'lxml >= 3.7.2',
'yattag >= 1.5.2',
'tqdm >= 4.4.0',
'CurrencyConverter >= 0.5',
# 'wxPython >= 4.0',
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='kicost',
version=kicost.__version__,
description="Build cost spreadsheet for a KiCad project.",
long_description=readme + '\n\n' + history,
author=kicost.__author__,
author_email=kicost.__email__,
url='https://xesscorp.github.io/KiCost',
project_urls={
'Doc': 'https://xesscorp.github.io/KiCost',
'Git': 'https://github.com/xesscorp/KiCost',
}
packages=setuptools.find_packages(),
entry_points={'console_scripts':['kicost = kicost.__main__:main']},
package_dir={'kicost':'kicost'},
include_package_data=True,
package_data={'kicost': ['*.gif', '*.png']},
scripts=[],
install_requires=requirements,
license="MIT",
zip_safe=False,
keywords='kicost, KiCAD',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools
import kicost
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', '')
requirements = [
'beautifulsoup4 >= 4.3.2',
'XlsxWriter >= 0.7.3',
'future >= 0.15.0',
'lxml >= 3.7.2',
'yattag >= 1.5.2',
'tqdm >= 4.4.0',
'CurrencyConverter >= 0.5',
# 'wxPython >= 4.0',
]
test_requirements = [
# TODO: put package test requirements here
]
setup(
name='kicost',
version=kicost.__version__,
description="Build cost spreadsheet for a KiCad project.",
long_description=readme + '\n\n' + history,
author=kicost.__author__,
author_email=kicost.__email__,
url='https://github.com/xesscorp/KiCost',
packages=setuptools.find_packages(),
entry_points={'console_scripts':['kicost = kicost.__main__:main']},
package_dir={'kicost':'kicost'},
include_package_data=True,
package_data={'kicost': ['*.gif', '*.png']},
scripts=[],
install_requires=requirements,
license="MIT",
zip_safe=False,
keywords='kicost, KiCAD',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
],
test_suite='tests',
tests_require=test_requirements
)
| mit | Python |
775f3754d3949e1c4b9553f8550060093af86b91 | Remove comment | MikeVasmer/GreenGraphCoursework | greengraph/command.py | greengraph/command.py | from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True, nargs="+",
help="The starting location ")
parser.add_argument("--end", required=True, nargs="+",
help="The ending location")
parser.add_argument("--steps",
help="The number of steps between the starting and ending locations, defaults to 10")
parser.add_argument("--out",
help="The output filename, defaults to graph.png")
arguments = parser.parse_args()
mygraph = Greengraph(arguments.start, arguments.end)
if arguments.steps:
data = mygraph.green_between(arguments.steps)
else:
data = mygraph.green_between(10)
plt.plot(data)
# TODO add a title and axis labels to this graph
if arguments.out:
plt.savefig(arguments.out)
else:
plt.savefig("graph.png")
print arguments.start
print arguments.end
if __name__ == "__main__":
process()
| from argparse import ArgumentParser
from matplotlib import pyplot as plt
from graph import Greengraph
def process():
parser = ArgumentParser(
description="Produce graph quantifying the amount of green land between two locations")
parser.add_argument("--start", required=True, nargs="+",
help="The starting location ")
parser.add_argument("--end", required=True, nargs="+",
help="The ending location")
parser.add_argument("--steps",
help="The number of steps between the starting and ending locations, defaults to 10")
parser.add_argument("--out",
help="The output filename, defaults to graph.png")
arguments = parser.parse_args()
#mygraph = Greengraph(arguments.start, arguments.end)
if arguments.steps:
data = mygraph.green_between(arguments.steps)
else:
data = mygraph.green_between(10)
plt.plot(data)
# TODO add a title and axis labels to this graph
if arguments.out:
plt.savefig(arguments.out)
else:
plt.savefig("graph.png")
print arguments.start
print arguments.end
if __name__ == "__main__":
process()
| mit | Python |
3e083c4ed6f6ebd6739d10a639939c8a290aebc9 | Change package name before publishing to PyPI | trac-hacks/TicketGuidelinesPlugin | setup.py | setup.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2010 Sebastian Krysmanski
# Copyright (C) 2012 Greg Lavallee
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
from setuptools import setup
PACKAGE = 'TracTicketGuidelines'
VERSION = '1.0.0'
setup(
name=PACKAGE,
version=VERSION,
author='Sebastian Krysmanski',
url='https://trac-hacks.org/wiki/TicketGuidelinesPlugin',
description="Adds your ticket guidelines to the ticket view. The "
"guidelines are specified in the wiki pages "
"'TicketGuidelines/NewShort' and "
"'TicketGuidelines/ModifyShort'.",
keywords='trac plugin',
license='Modified BSD',
install_requires=['Trac'],
packages=['ticketguidelines'],
package_data={'ticketguidelines': ['htdocs/*']},
entry_points={'trac.plugins': '%s = ticketguidelines.web_ui' % PACKAGE},
)
| # -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2010 Sebastian Krysmanski
# Copyright (C) 2012 Greg Lavallee
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
from setuptools import setup
PACKAGE = 'TicketGuidelinesPlugin'
VERSION = '1.0.0'
setup(
name=PACKAGE,
version=VERSION,
author='Sebastian Krysmanski',
url='https://trac-hacks.org/wiki/TicketGuidelinesPlugin',
description="Adds your ticket guidelines to the ticket view. The "
"guidelines are specified in the wiki pages "
"'TicketGuidelines/NewShort' and "
"'TicketGuidelines/ModifyShort'.",
keywords='trac plugin',
license='Modified BSD',
install_requires=['Trac'],
packages=['ticketguidelines'],
package_data={'ticketguidelines': ['htdocs/*']},
entry_points={'trac.plugins': '%s = ticketguidelines.web_ui' % PACKAGE},
)
| bsd-3-clause | Python |
707f3246b8f73c88a8a5a808f042a96f75a2d699 | update classifiers | saghul/pyuv,saghul/pyuv,saghul/pyuv | setup.py | setup.py | # coding=utf-8
import codecs
import re
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
from setup_libuv import libuv_build_ext
def get_version():
return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('pyuv/_version.py').read()).group('version')
setup(name = 'pyuv',
version = get_version(),
author = 'Saúl Ibarra Corretgé',
author_email = 'saghul@gmail.com',
url = 'http://github.com/saghul/pyuv',
description = 'Python interface for libuv',
long_description = codecs.open('README.rst', encoding='utf-8').read(),
platforms = ['POSIX', 'Microsoft Windows'],
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
cmdclass = {'build_ext': libuv_build_ext},
packages = ['pyuv'],
ext_modules = [Extension('pyuv._cpyuv',
sources = ['src/pyuv.c'],
)]
)
| # coding=utf-8
import codecs
import re
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
from setup_libuv import libuv_build_ext
def get_version():
return re.search(r"""__version__\s+=\s+(?P<quote>['"])(?P<version>.+?)(?P=quote)""", open('pyuv/_version.py').read()).group('version')
setup(name = 'pyuv',
version = get_version(),
author = 'Saúl Ibarra Corretgé',
author_email = 'saghul@gmail.com',
url = 'http://github.com/saghul/pyuv',
description = 'Python interface for libuv',
long_description = codecs.open('README.rst', encoding='utf-8').read(),
platforms = ['POSIX', 'Microsoft Windows'],
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
cmdclass = {'build_ext': libuv_build_ext},
packages = ['pyuv'],
ext_modules = [Extension('pyuv._cpyuv',
sources = ['src/pyuv.c'],
)]
)
| mit | Python |
1773caf9b94a372b68a2c4272012ba7d6dea5d0b | use master branch for plugin versions | Fewbytes/cosmo-plugin-chef-appmodule-installer | setup.py | setup.py | __author__ = 'dank'
import setuptools
COSMO_CELERY_VERSION = "0.1.1"
COSMO_CELERY_BRANCH = "master"
COSMO_CELERY = "https://github.com/CloudifySource/cosmo-celery-common/tarball/{0}".format(COSMO_CELERY_BRANCH)
CHEF_CLIENT_COMMON_VERSION = "0.1.0"
CHEF_CLIENT_COMMON_BRANCH = "master"
CHEF_CLIENT_COMMON = "https://github.com/CloudifySource/cosmo-plugin-chef-client-common/tarball/{0}".format(CHEF_CLIENT_COMMON_BRANCH)
setuptools.setup(
zip_safe=False,
name='cosmo-plugin-chef-appmodule-installer',
version='0.1.0',
author='yoni',
author_email='yoni@fewbytes.com',
packages=['chef_appmodule_installer'],
license='LICENSE',
description='Chef plugin implementing comso appmodule installer interface',
install_requires=[
"celery",
"cosmo-celery-common",
"cosmo-plugin-chef-client-common"
],
dependency_links=["{0}#egg=cosmo-celery-common-{1}".format(COSMO_CELERY, COSMO_CELERY_VERSION),
"{0}#egg=cosmo-plugin-chef-client-common-{1}".format(CHEF_CLIENT_COMMON, CHEF_CLIENT_COMMON_VERSION)]
)
| __author__ = 'dank'
import setuptools
COSMO_CELERY_VERSION = "0.1.1"
COSMO_CELERY_BRANCH = "develop"
COSMO_CELERY = "https://github.com/CloudifySource/cosmo-celery-common/tarball/{0}".format(COSMO_CELERY_BRANCH)
CHEF_CLIENT_COMMON_VERSION = "0.1.0"
CHEF_CLIENT_COMMON_BRANCH = "develop"
CHEF_CLIENT_COMMON = "https://github.com/CloudifySource/cosmo-plugin-chef-client-common/tarball/{0}".format(CHEF_CLIENT_COMMON_BRANCH)
setuptools.setup(
zip_safe=False,
name='cosmo-plugin-chef-appmodule-installer',
version='0.1.0',
author='yoni',
author_email='yoni@fewbytes.com',
packages=['chef_appmodule_installer'],
license='LICENSE',
description='Chef plugin implementing comso appmodule installer interface',
install_requires=[
"celery",
"cosmo-celery-common",
"cosmo-plugin-chef-client-common"
],
dependency_links=["{0}#egg=cosmo-celery-common-{1}".format(COSMO_CELERY, COSMO_CELERY_VERSION),
"{0}#egg=cosmo-plugin-chef-client-common-{1}".format(CHEF_CLIENT_COMMON, CHEF_CLIENT_COMMON_VERSION)]
)
| apache-2.0 | Python |
3e194cc1661db01113a30df7dd334f6b2921e4fa | update deps | Nic30/HWToolkit | setup.py | setup.py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from os import path
from setuptools import setup, find_packages
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(name="hwt",
version="3.2",
description="hdl synthesis toolkit",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Nic30/hwt",
author="Michal Orsak",
author_email="michal.o.socials@gmail.com",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: System :: Hardware",
"Topic :: System :: Emulators",
"Topic :: Utilities"],
install_requires=[
"hdlConvertorAst>=0.1", # conversions to SystemVerilog, VHDL
"ipCorePackager>=0.5", # generator of IPcore packages (IP-xact, ...)
"pycocotb>=0.7", # simulator API
"pyDigitalWaveTools>=0.6", # simulator output dump
],
license="MIT",
packages=find_packages(),
include_package_data=True,
zip_safe=False
)
| #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from os import path
from setuptools import setup, find_packages
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(name="hwt",
version="3.2",
description="hdl synthesis toolkit",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Nic30/hwt",
author="Michal Orsak",
author_email="michal.o.socials@gmail.com",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: System :: Hardware",
"Topic :: System :: Emulators",
"Topic :: Utilities"],
install_requires=[
"hdlConvertorAst>=0.1", # conversions to SystemVerilog, VHDL
"ipCorePackager>=0.5", # generator of IPcore packages (IP-xact, ...)
"pycocotb>=0.6", # simulator API
"pyDigitalWaveTools>=0.5", # simulator output dump
],
license="MIT",
packages=find_packages(),
package_data={"hwt": ["*.vhd", "*.v",
"*.py.template",
"*.cpp.template"]},
include_package_data=True,
zip_safe=False
)
| mit | Python |
c366c8923d61bfb75dde1576f0bb95513ae2886e | change version number to 1.0.0 | wroberts/pytimeparse | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
setup.py
(c) Will Roberts 14 April, 2014
distutils setup script for pytimeparse.
'''
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name = 'pytimeparse',
version = '1.0.0',
description = 'Time expression parser',
author = 'Will Roberts',
author_email = 'wildwilhelm@gmail.com',
url = 'https://github.com/wroberts/pytimeparse',
packages = ['pytimeparse'],
long_description = long_description,
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
setup.py
(c) Will Roberts 14 April, 2014
distutils setup script for pytimeparse.
'''
from distutils.core import setup
with open('README.rst') as file:
long_description = file.read()
setup(name = 'pytimeparse',
version = '1.0',
description = 'Time expression parser',
author = 'Will Roberts',
author_email = 'wildwilhelm@gmail.com',
url = 'https://github.com/wroberts/pytimeparse',
packages = ['pytimeparse'],
long_description = long_description,
)
| mit | Python |
065f52be203cc5813a1b648e8b8a26fbff96bafe | Bump version | andreroggeri/pynubank | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name='pynubank',
version='2.13.1',
url='https://github.com/andreroggeri/pynubank',
author='André Roggeri Campos',
author_email='a.roggeri.c@gmail.com',
license='MIT',
packages=find_packages(),
package_data={'pynubank': ['queries/*.gql', 'utils/mocked_responses/*.json']},
install_requires=['requests', 'qrcode', 'pyOpenSSL', 'colorama', 'requests-pkcs12'],
long_description=read("README.md"),
long_description_content_type="text/markdown",
entry_points={
'console_scripts': [
'pynubank = pynubank.cli:main'
]
},
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
]
)
| import os
from setuptools import setup, find_packages
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name='pynubank',
version='2.13.0',
url='https://github.com/andreroggeri/pynubank',
author='André Roggeri Campos',
author_email='a.roggeri.c@gmail.com',
license='MIT',
packages=find_packages(),
package_data={'pynubank': ['queries/*.gql', 'utils/mocked_responses/*.json']},
install_requires=['requests', 'qrcode', 'pyOpenSSL', 'colorama', 'requests-pkcs12'],
long_description=read("README.md"),
long_description_content_type="text/markdown",
entry_points={
'console_scripts': [
'pynubank = pynubank.cli:main'
]
},
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
]
)
| mit | Python |
5f259f24fceb5dcd05a91277b2fbae04a6121209 | Bump version: 0.0.11 -> 0.0.12 | polysquare/python-parse-shebang | setup.py | setup.py | # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.12",
description="""Parse shebangs and return their components.""",
long_description_markdown_filename="README.md",
author="Sam Spilsbury",
author_email="smspillaz@gmail.com",
classifiers=["Development Status :: 3 - Alpha",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Intended Audience :: Developers",
"Topic :: System :: Shells",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License"],
url="http://github.com/polysquare/parse-shebang",
license="MIT",
keywords="development",
packages=find_packages(exclude=["test"]),
install_requires=["setuptools"],
extras_require={
"upload": ["setuptools-markdown"]
},
test_suite="nose.collector",
zip_safe=True,
include_package_data=True)
| # /setup.py
#
# Installation and setup script for parse-shebang
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for parse-shebang."""
from setuptools import find_packages, setup
setup(name="parse-shebang",
version="0.0.11",
description="""Parse shebangs and return their components.""",
long_description_markdown_filename="README.md",
author="Sam Spilsbury",
author_email="smspillaz@gmail.com",
classifiers=["Development Status :: 3 - Alpha",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Intended Audience :: Developers",
"Topic :: System :: Shells",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License"],
url="http://github.com/polysquare/parse-shebang",
license="MIT",
keywords="development",
packages=find_packages(exclude=["test"]),
install_requires=["setuptools"],
extras_require={
"upload": ["setuptools-markdown"]
},
test_suite="nose.collector",
zip_safe=True,
include_package_data=True)
| mit | Python |
7ee5a80766d1497732cef866521f60c09fca1fdc | Bump version | jdgillespie91/twads,jdgillespie91/twitter-ads-api,jdgillespie91/twads | setup.py | setup.py | from distutils.core import setup
setup(
name='twads',
packages=['twads'],
version='0.1.4',
description='A wrapper for the Twitter Ads API',
author='Jacob Gillespie',
author_email='jdgillespie91@gmail.com',
url='https://github.com/jdgillespie91/twads',
install_requires=[
'requests',
'requests_oauthlib'
]
)
| from distutils.core import setup
setup(
name='twads',
packages=['twads'],
version='0.1.3',
description='A wrapper for the Twitter Ads API',
author='Jacob Gillespie',
author_email='jdgillespie91@gmail.com',
url='https://github.com/jdgillespie91/twads',
install_requires=[
'requests',
'requests_oauthlib'
]
)
| mit | Python |
9997965391e88760aa52f4eb8d1e85a159e2c7af | Move setup.py to Python 3. | lamby/django-email-from-template | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='django-email-from-template',
description="Send emails generated entirely from Django templates.",
version='2.3.1',
url='https://chris-lamb.co.uk/projects/django-email-from-template',
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license="BSD",
packages=find_packages(),
package_data={'': [
'templates/*/*',
]},
install_requires=(
'Django>=1.8',
),
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-email-from-template',
description="Send emails generated entirely from Django templates.",
version='2.3.1',
url='https://chris-lamb.co.uk/projects/django-email-from-template',
author="Chris Lamb",
author_email='chris@chris-lamb.co.uk',
license="BSD",
packages=find_packages(),
package_data={'': [
'templates/*/*',
]},
install_requires=(
'Django>=1.8',
),
)
| bsd-3-clause | Python |
fc64b927df9551a4ce360e2c5a8af697a61862d7 | Fix description in setup.py | arminha/python-aosd | setup.py | setup.py | #!/usr/bin/env python
# coding=utf8
from distutils.core import setup
from distutils.extension import Extension
try:
from Cython.Distutils import build_ext
except ImportError:
from Pyrex.Distutils import build_ext
import commands
def pkgconfig_include_dirs(*packages):
flag_map = {'-I': 'include_dirs'}
kw = {}
for token in commands.getoutput("pkg-config --cflags %s" % ' '.join(packages)).split():
kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
return kw['include_dirs']
package_version = '0.2.2'
setup (
cmdclass = {'build_ext' : build_ext},
name = 'python-aosd',
version = package_version,
ext_modules = [
Extension(
'aosd',
['src/aosd.pyx'],
include_dirs= pkgconfig_include_dirs('pangocairo') + ['/usr/include/libaosd', '/usr/include/pycairo'],
libraries = ['aosd', 'aosd-text']
)
],
requires = ['cairo'],
author = 'Armin Häberling',
author_email = 'armin.aha@gmail.com',
url = 'http://code.google.com/p/python-aosd/',
download_url = 'http://python-aosd.googlecode.com/files/python-aosd-' + package_version + '.tar.gz',
description = 'Python bindings for libaosd',
long_description =
'''
python-aosd is a Python binding for libaosd an on screen display (OSD) library, which uses Cairo to create high quality rendered graphics to be overlaid on top of the screen.
''',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: X11 Applications',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3',
'Intended Audience :: Developers',
'Topic :: Desktop Environment',
'Topic :: Software Development :: Libraries',
],
)
| #!/usr/bin/env python
# coding=utf8
from distutils.core import setup
from distutils.extension import Extension
try:
from Cython.Distutils import build_ext
except ImportError:
from Pyrex.Distutils import build_ext
import commands
def pkgconfig_include_dirs(*packages):
flag_map = {'-I': 'include_dirs'}
kw = {}
for token in commands.getoutput("pkg-config --cflags %s" % ' '.join(packages)).split():
kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
return kw['include_dirs']
package_version = '0.2.2'
setup (
cmdclass = {'build_ext' : build_ext},
name = 'python-aosd',
version = package_version,
ext_modules = [
Extension(
'aosd',
['src/aosd.pyx'],
include_dirs= pkgconfig_include_dirs('pangocairo') + ['/usr/include/libaosd', '/usr/include/pycairo'],
libraries = ['aosd', 'aosd-text']
)
],
requires = ['cairo'],
author = 'Armin Häberling',
author_email = 'armin.aha@gmail.com',
url = 'http://code.google.com/p/python-aosd/',
download_url = 'http://python-aosd.googlecode.com/files/python-aosd-' + package_version + '.tar.gz',
description = 'Python bindings for libaosd',
long_description =
'''
python-aosd is a Python binding for libaosd_ an on screen display (OSD) library, which uses Cairo to create high quality rendered graphics to be overlaid on top of the screen.
''',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: X11 Applications',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3',
'Intended Audience :: Developers',
'Topic :: Desktop Environment',
'Topic :: Software Development :: Libraries',
],
)
| mit | Python |
2d3d7f31ff85a6c3d6b58e3d731ecad886a07295 | change requirements in setup.py | DmytroObertan/reports,yshalenyk/reports,DmytroObertan/reports,DmytroObertan/reports,openprocurement/reports,DmytroObertan/reports,yshalenyk/reports,openprocurement/reports,yshalenyk/reports,yshalenyk/reports,openprocurement/reports,openprocurement/reports | setup.py | setup.py | from setuptools import setup
install_requires = [
'couchdb>=1.0.1',
'dateparser>=0.3.4',
'pbkdf2',
'requests',
'requests_cache',
'pytz',
'iso8601'
]
setup(
name='reports',
version='0.0.1',
packages=[
'reports',
],
entry_points={
'console_scripts': [
'bids = reports.utilities.bids:run',
'tenders = reports.utilities.tenders:run',
'refunds = reports.utilities.refunds:run',
'invoices = reports.utilities.invoices:run',
'init = reports.db_init:run',
]
},
install_requires=install_requires
)
| from setuptools import setup
install_requires = [
'couchdb>=1.0.1',
'dateparser>=0.3.4',
'pbkdf2',
'requests',
'requests_cache',
]
setup(
name='reports',
version='0.0.1',
packages=[
'reports',
],
entry_points={
'console_scripts': [
'bids = reports.utilities.bids:run',
'tenders = reports.utilities.tenders:run',
'refunds = reports.utilities.refunds:run',
'invoices = reports.utilities.invoices:run',
'init = reports.db_init:run',
]
},
install_requires=install_requires
)
| apache-2.0 | Python |
2a66c8be39b5bcd62115d33ed80a356fbe0d40db | update dependency on graphenelib | xeroc/python-bitshares | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup
# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))
VERSION = '0.1.7'
setup(
name='bitshares',
version=VERSION,
description='Python library for bitshares',
long_description=open('README.md').read(),
download_url='https://github.com/xeroc/python-bitshares/tarball/' + VERSION,
author='Fabian Schuh',
author_email='Fabian@chainsquad.com',
maintainer='Fabian Schuh',
maintainer_email='Fabian@chainsquad.com',
url='http://www.github.com/xeroc/python-bitshares',
keywords=['bitshares', 'library', 'api', 'rpc'],
packages=[
"bitshares",
"bitsharesapi",
"bitsharesbase"
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Topic :: Office/Business :: Financial',
],
install_requires=[
"graphenelib>=0.5.3",
"websockets",
"appdirs",
"Events",
"scrypt",
"pycrypto", # for AES, installed through graphenelib already
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
include_package_data=True,
)
| #!/usr/bin/env python3
from setuptools import setup
# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))
VERSION = '0.1.7'
setup(
name='bitshares',
version=VERSION,
description='Python library for bitshares',
long_description=open('README.md').read(),
download_url='https://github.com/xeroc/python-bitshares/tarball/' + VERSION,
author='Fabian Schuh',
author_email='Fabian@chainsquad.com',
maintainer='Fabian Schuh',
maintainer_email='Fabian@chainsquad.com',
url='http://www.github.com/xeroc/python-bitshares',
keywords=['bitshares', 'library', 'api', 'rpc'],
packages=[
"bitshares",
"bitsharesapi",
"bitsharesbase"
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Topic :: Office/Business :: Financial',
],
install_requires=[
"graphenelib==0.5.2",
"websockets",
"appdirs",
"Events",
"scrypt",
"pycrypto", # for AES
],
setup_requires=['pytest-runner'],
tests_require=['pytest'],
include_package_data=True,
)
| mit | Python |
a734f34497d0814b8b6f7c3c7d48aad706cbb74e | Add missing comma to setup.py classifiers list. | amacd31/bom_data_parser,amacd31/bom_data_parser | setup.py | setup.py | import versioneer
versioneer.versionfile_source = 'bom_data_parser/_version.py'
versioneer.versionfile_build = 'bom_data_parser/_version.py'
versioneer.tag_prefix = 'v'
versioneer.parentdir_prefix = 'bom_data_parser-'
from setuptools import setup
setup(
name='bom_data_parser',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='Basic library for parsing data formats supplied by the Australian Bureau of Meteorology.',
author='Andrew MacDonald',
author_email='andrew@maccas.net',
license='BSD',
url='https://github.com/amacd31/bom_data_parser',
install_requires=['numpy', 'pandas'],
packages = ['bom_data_parser'],
test_suite = 'tests',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)
| import versioneer
versioneer.versionfile_source = 'bom_data_parser/_version.py'
versioneer.versionfile_build = 'bom_data_parser/_version.py'
versioneer.tag_prefix = 'v'
versioneer.parentdir_prefix = 'bom_data_parser-'
from setuptools import setup
setup(
name='bom_data_parser',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='Basic library for parsing data formats supplied by the Australian Bureau of Meteorology.',
author='Andrew MacDonald',
author_email='andrew@maccas.net',
license='BSD',
url='https://github.com/amacd31/bom_data_parser',
install_requires=['numpy', 'pandas'],
packages = ['bom_data_parser'],
test_suite = 'tests',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Libraries :: Python Modules'
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)
| bsd-3-clause | Python |
8b35364b6f5d7cec1c120667a2ade78fb375b9d4 | Bump version to 0.4 | reberhardt7/sofa | setup.py | setup.py | from setuptools import setup
requires = [
'pyramid',
'SQLAlchemy',
'transaction',
'validate_email',
'pyDNS',
'passlib',
'pycrypto',
'requests',
'python-slugify',
'uritemplate',
'pyyaml',
]
setup(name='sofa',
version='0.4',
description='A lightweight REST API framework',
author='Ryan Eberhardt',
author_email='ryan@reberhardt.com',
url='https://github.com/reberhardt/sofa',
download_url='https://github.com/reberhardt/sofa/tarball/0.4',
keywords=['rest', 'api'],
packages=['sofa', 'sofa.scripts'],
install_requires=requires,
entry_points="""\
[paste.app_factory]
main = sofa:main
[console_scripts]
sofa = sofa.scripts.js:main
"""
)
| from setuptools import setup
requires = [
'pyramid',
'SQLAlchemy',
'transaction',
'validate_email',
'pyDNS',
'passlib',
'pycrypto',
'requests',
'python-slugify',
'uritemplate',
'pyyaml',
]
setup(name='sofa',
version='0.3',
description='A lightweight REST API framework',
author='Ryan Eberhardt',
author_email='ryan@reberhardt.com',
url='https://github.com/reberhardt/sofa',
download_url='https://github.com/reberhardt/sofa/tarball/0.3',
keywords=['rest', 'api'],
packages=['sofa', 'sofa.scripts'],
install_requires=requires,
entry_points="""\
[paste.app_factory]
main = sofa:main
[console_scripts]
sofa = sofa.scripts.js:main
"""
)
| mit | Python |
c7d2753169aa249a880d35bde4f68a891185503f | bump version | bsmr-opengl/glad,aaronmjacobs/glad,QUSpilPrgm/glad,0x1100/glad,QUSpilPrgm/glad,hrehfeld/glad,0x1100/glad,QUSpilPrgm/glad,aaronmjacobs/glad,0x1100/glad,bsmr-opengl/glad,QUSpilPrgm/glad,bsmr-opengl/glad,aaronmjacobs/glad,bsmr-opengl/glad,0x1100/glad,hrehfeld/glad,aaronmjacobs/glad,hrehfeld/glad,hrehfeld/glad | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Uses the official Khronos-XML specs to generate a
GL/GLES/EGL/GLX/WGL Loader made for your needs. Glad currently supports
the languages C, D and Volt.
Note: this package might be slightly outdated, for always up to date versions
checkout the GitHub repository: https://github.com/Dav1dde/glad
"""
from setuptools import setup, find_packages
if __name__ == '__main__':
setup(
name='glad',
version='0.1.5a0',
description='Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.',
long_description=__doc__,
packages=find_packages(),
install_requires=[],
entry_points={
'console_scripts': [
'glad = glad.__main__:main'
]
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Topic :: Games/Entertainment',
'Topic :: Multimedia :: Graphics',
'Topic :: Multimedia :: Graphics :: 3D Rendering',
'Topic :: Software Development',
'Topic :: Software Development :: Build Tools',
'Topic :: Utilities'
],
keywords='opengl glad generator gl wgl egl gles glx',
author='David Herberth',
author_email='admin@dav1d.de',
url='https://github.com/Dav1dde/glad',
license='MIT',
platforms='any'
)
| #!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Uses the official Khronos-XML specs to generate a
GL/GLES/EGL/GLX/WGL Loader made for your needs. Glad currently supports
the languages C, D and Volt.
Note: this package might be slightly outdated, for always up to date versions
checkout the GitHub repository: https://github.com/Dav1dde/glad
"""
from setuptools import setup, find_packages
if __name__ == '__main__':
setup(
name='glad',
version='0.1.4a0',
description='Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.',
long_description=__doc__,
packages=find_packages(),
install_requires=[],
entry_points={
'console_scripts': [
'glad = glad.__main__:main'
]
},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Topic :: Games/Entertainment',
'Topic :: Multimedia :: Graphics',
'Topic :: Multimedia :: Graphics :: 3D Rendering',
'Topic :: Software Development',
'Topic :: Software Development :: Build Tools',
'Topic :: Utilities'
],
keywords='opengl glad generator gl wgl egl gles glx',
author='David Herberth',
author_email='admin@dav1d.de',
url='https://github.com/Dav1dde/glad',
license='MIT',
platforms='any'
)
| mit | Python |
d06596219755d02d76852f43ef42bcbd4592baef | Remove unuseful coding comment in setup.py | mruse/wechatpy,cysnake4713/wechatpy,Luckyseal/wechatpy,tdautc19841202/wechatpy,tdautc19841202/wechatpy,zaihui/wechatpy,cloverstd/wechatpy,hunter007/wechatpy,zhaoqz/wechatpy,cysnake4713/wechatpy,Luckyseal/wechatpy,chenjiancan/wechatpy,chenjiancan/wechatpy,mruse/wechatpy,zhaoqz/wechatpy,messense/wechatpy,Luckyseal/wechatpy,cysnake4713/wechatpy,zaihui/wechatpy,tdautc19841202/wechatpy,EaseCloud/wechatpy,navcat/wechatpy,EaseCloud/wechatpy,wechatpy/wechatpy,jxtech/wechatpy,Dufy/wechatpy,cloverstd/wechatpy,Dufy/wechatpy,navcat/wechatpy,hunter007/wechatpy | setup.py | setup.py | #!/usr/bin/env python
from __future__ import with_statement
import os
from setuptools import setup, find_packages
import wechatpy
readme = 'README.md'
if os.path.exists('README.rst'):
readme = 'README.rst'
with open(readme) as f:
long_description = f.read()
with open('requirements.txt') as f:
requirements = [l for l in f.read().splitlines() if l]
setup(
name='wechatpy',
version=wechatpy.__version__,
author=wechatpy.__author__,
author_email='messense@icloud.com',
url='https://github.com/messense/wechatpy',
packages=find_packages(),
keywords='WeChat, wexin, SDK',
description='wechatpy: WeChat SDK for Python',
long_description=long_description,
install_requires=requirements,
include_package_data=True,
tests_require=['nose'],
test_suite='nose.collector',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: PyPy'
],
)
| #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import os
from setuptools import setup, find_packages
import wechatpy
readme = 'README.md'
if os.path.exists('README.rst'):
readme = 'README.rst'
with open(readme) as f:
long_description = f.read()
with open('requirements.txt') as f:
requirements = [l for l in f.read().splitlines() if l]
setup(
name='wechatpy',
version=wechatpy.__version__,
author=wechatpy.__author__,
author_email='messense@icloud.com',
url='https://github.com/messense/wechatpy',
packages=find_packages(),
keywords='WeChat, wexin, SDK',
description='wechatpy: WeChat SDK for Python',
long_description=long_description,
install_requires=requirements,
include_package_data=True,
tests_require=['nose'],
test_suite='nose.collector',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS',
'Operating System :: POSIX',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: PyPy'
],
)
| mit | Python |
60645ea79cf4f6dde6d13a086603f4f01107511d | update python version | phrocker/sharkbite,phrocker/sharkbite,phrocker/sharkbite,phrocker/sharkbite,phrocker/sharkbite | setup.py | setup.py | import os
import re
import sys
import platform
import subprocess
import multiprocessing
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion
cores = multiprocessing.cpu_count()*1.25
threads="-j" + str(int(cores))
class CMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
def readme():
with open("PYTHONREADME.md", "r") as fh:
return fh.read()
def operatingsystem():
if (platform.platform().find("Darwin") >= 0):
return "Operating System :: MacOS"
else:
return "Operating System :: POSIX :: Linux"
setup(
name='sharkbite',
version='0.7.0',
author='Marc Parisi',
author_email='phrocker@apache.org',
url='https://docs.sharkbite.io/',
description='Apache Accumulo and Apache HDFS Python Connector',
long_description=readme(),
long_description_content_type='text/markdown',
ext_modules=[CMakeExtension('pysharkbite')],
zip_safe=False,
classifiers=[
"Programming Language :: C++",
"License :: OSI Approved :: Apache Software License",
operatingsystem(),
],
python_requires='>=3.7',
)
| import os
import re
import sys
import platform
import subprocess
import multiprocessing
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion
cores = multiprocessing.cpu_count()*1.25
threads="-j" + str(int(cores))
class CMakeExtension(Extension):
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
def readme():
with open("PYTHONREADME.md", "r") as fh:
return fh.read()
def operatingsystem():
if (platform.platform().find("Darwin") >= 0):
return "Operating System :: MacOS"
else:
return "Operating System :: POSIX :: Linux"
setup(
name='sharkbite',
version='0.6.7',
author='Marc Parisi',
author_email='phrocker@apache.org',
url='https://docs.sharkbite.io/',
description='Apache Accumulo and Apache HDFS Python Connector',
long_description=readme(),
long_description_content_type='text/markdown',
ext_modules=[CMakeExtension('pysharkbite')],
zip_safe=False,
classifiers=[
"Programming Language :: C++",
"License :: OSI Approved :: Apache Software License",
operatingsystem(),
],
python_requires='>=3.7',
)
| apache-2.0 | Python |
924f8a0f7768b26c3dfe275d57be6d17ebdb268f | Remove simplejson from dependencies. | scast/python-phabricator,MediaMiser/python-phabricator,folsom-labs/python-phabricator,wikimedia/operations-debs-python-phabricator,jamesmeador/python-phabricator,Khan/python-phabricator,disqus/python-phabricator,disqus/python-phabricator | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='phabricator',
version='0.1.1',
author='DISQUS',
author_email='mike@disqus.com',
url='http://github.com/disqus/python-phabricator',
description = 'Phabricator API Bindings',
packages=find_packages(),
zip_safe=False,
test_suite='nose.collector',
install_requires=[''],
tests_require=['nose==1.0.0', 'unittest2', 'mock'],
include_package_data=True,
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='phabricator',
version='0.1.1',
author='DISQUS',
author_email='mike@disqus.com',
url='http://github.com/disqus/python-phabricator',
description = 'Phabricator API Bindings',
packages=find_packages(),
zip_safe=False,
test_suite='nose.collector',
install_requires=['simplejson'],
tests_require=['nose==1.0.0', 'unittest2', 'mock'],
include_package_data=True,
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Topic :: Software Development'
],
)
| apache-2.0 | Python |
fb9caf05bf526a2d4cc08e8463667d9eed548fdd | Revert "completion: Install via setup.py" | JonathonReinhart/scuba,JonathonReinhart/scuba,JonathonReinhart/scuba | setup.py | setup.py | #!/usr/bin/env python
from __future__ import print_function
import scuba.version
from setuptools import setup
from setuptools.command.build_py import build_py
import os.path
from subprocess import check_call
class BuildHook(build_py):
def run(self):
print('Building scubainit...')
check_call(['make'])
build_py.run(self)
setup(
name = 'scuba',
version = scuba.version.__version__,
description = 'Simplify use of Docker containers for building software',
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Topic :: Software Development :: Build Tools',
],
license = 'MIT',
keywords = 'docker',
author = 'Jonathon Reinhart',
author_email = 'jonathon.reinhart@gmail.com',
url = 'https://github.com/JonathonReinhart/scuba',
packages = ['scuba'],
package_data = {
'scuba': [
'scubainit',
],
},
zip_safe = False, # http://stackoverflow.com/q/24642788/119527
entry_points = {
'console_scripts': [
'scuba = scuba.__main__:main',
]
},
install_requires = [
'PyYAML',
],
# http://stackoverflow.com/questions/17806485
# http://stackoverflow.com/questions/21915469
cmdclass = {
'build_py': BuildHook,
},
)
| #!/usr/bin/env python
from __future__ import print_function
import scuba.version
from setuptools import setup
from setuptools.command.build_py import build_py
import os.path
from subprocess import check_call
class BuildHook(build_py):
def run(self):
print('Building scubainit...')
check_call(['make'])
build_py.run(self)
setup(
name = 'scuba',
version = scuba.version.__version__,
description = 'Simplify use of Docker containers for building software',
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS :: MacOS X',
'Topic :: Software Development :: Build Tools',
],
license = 'MIT',
keywords = 'docker',
author = 'Jonathon Reinhart',
author_email = 'jonathon.reinhart@gmail.com',
url = 'https://github.com/JonathonReinhart/scuba',
packages = ['scuba'],
package_data = {
'scuba': [
'scubainit',
],
},
data_files = [
('/etc/bash_completion.d', ['bash_completion/scuba']),
],
zip_safe = False, # http://stackoverflow.com/q/24642788/119527
entry_points = {
'console_scripts': [
'scuba = scuba.__main__:main',
]
},
install_requires = [
'PyYAML',
],
# http://stackoverflow.com/questions/17806485
# http://stackoverflow.com/questions/21915469
cmdclass = {
'build_py': BuildHook,
},
)
| mit | Python |
642b2f2782bb57d64f2a5ed3f0e5c99614b8b9eb | Fix project description for pypi | kokosing/docker-release,kokosing/docker-release | setup.py | setup.py | from setuptools import setup, find_packages
requirements = [
'GitPython == 1.0.1',
'docker-py >= 1.7.0',
'requests ==2.7.0'
]
setup_requirements = [
'flake8'
]
description = """
Tool for releasing docker images. It is useful when your docker image files
are under continuous development and you want to have a
convenient way to release (publish) them.
This utility supports:
- tagging git repository when a docker image gets released
- tagging docker image with a git hash commit
- incrementing docker image version (tag)
- updating 'latest' tag in the docker hub
"""
setup(
name='docker-release',
version='0.3-SNAPSHOT',
description=description,
author='Grzegorz Kokosinski',
author_email='g.kokosinski a) gmail.com',
keywords='docker image release',
url='https://github.com/kokosing/docker-release',
packages=find_packages(),
package_dir={'docker_release': 'docker_release'},
install_requires=requirements,
setup_requires=setup_requirements,
entry_points={'console_scripts': ['docker-release = docker_release.main:main']}
)
| from setuptools import setup, find_packages
requirements = [
'GitPython == 1.0.1',
'docker-py >= 1.7.0',
'requests ==2.7.0'
]
setup_requirements = [
'flake8'
]
setup(
name='docker-release',
version='0.3-SNAPSHOT',
description='Tool for releasing docker images.',
author='Grzegorz Kokosinski',
author_email='g.kokosinski a) gmail.com',
keywords='docker image release',
url='https://github.com/kokosing/docker_release',
packages=find_packages(),
package_dir={'docker_release': 'docker_release'},
install_requires=requirements,
setup_requires=setup_requirements,
entry_points={'console_scripts': ['docker-release = docker_release.main:main']}
)
| apache-2.0 | Python |
322b45c346e32917bebabdd2b4bfa0f640644baa | fix small bug in setup.py | Yelp/send_nsca,Roguelazer/send_nsca | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="send_nsca",
version="0.1.3",
author="Yelp",
author_email="yelplabs@yelp.com",
url="http://github.com/Roguelazer/send_nsca",
description='pure-python nsca sender',
classifiers=[
"Programming Language :: Python",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
"Topic :: System :: Monitoring",
"Intended Audience :: Developers",
"Development Status :: 4 - Beta",
],
scripts=["bin/py_send_nsca"],
packages=["send_nsca"],
provides=["send_nsca"],
requires=["pycrypto (>=2.0.0)"],
long_description="""send_nsca -- a pure-python nsca sender
NSCA is the remote passive acceptance daemon used with many Nagios installs. It
ships with a (C-language) executable called send_nsca for submitting checks.
This is a mostly-clean re-implementation of send_nsca in pure-python. It
supports 10 of the 26 crypto functions used by upstream NSCA, sending to
multiple hosts with one invocation, and timeouts.
"""
)
| try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="send_nsca",
version="0.1.3",
author="Yelp",
author_email="yelplabs@yelp.com",
url="http://github.com/Roguelazer/send_nsca",
description='pure-python nsca sender',
classifiers=[
"Programming Language :: Python",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)"
"Topic :: System :: Monitoring"
"Intended Audience :: Developers",
"Development Status :: 4 - Beta",
],
scripts=["bin/py_send_nsca"],
packages=["send_nsca"],
provides=["send_nsca"],
requires=["pycrypto (>=2.0.0)"],
long_description="""send_nsca -- a pure-python nsca sender
NSCA is the remote passive acceptance daemon used with many Nagios installs. It
ships with a (C-language) executable called send_nsca for submitting checks.
This is a mostly-clean re-implementation of send_nsca in pure-python. It
supports 10 of the 26 crypto functions used by upstream NSCA, sending to
multiple hosts with one invocation, and timeouts.
"""
)
| lgpl-2.1 | Python |
342154692e8147eddde82c55520e58d79ce9947f | bump version | yjzhang/uncurl_python,yjzhang/uncurl_python | setup.py | setup.py | from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy
#directive_defaults['linetrace'] = True
#directive_defaults['binding'] = True
extensions = [
Extension('uncurl.nolips', ['uncurl/nolips.pyx'],
extra_compile_args=['-O3', '-ffast-math']),
Extension('uncurl.sparse_utils', ['uncurl/sparse_utils.pyx'],
extra_compile_args=['-O3', '-ffast-math'])
]
parallel_extensions = [
Extension('uncurl.nolips_parallel', ['uncurl/nolips_parallel.pyx'],
extra_compile_args=['-O3', '-ffast-math', '-fopenmp'],
extra_link_args=['-fopenmp'])
]
setup(name='uncurl_seq',
version='0.2.8',
description='Tool for pre-processing single-cell RNASeq data',
url='https://github.com/yjzhang/uncurl_python',
author='Yue Zhang',
author_email='yjzhang@cs.washington.edu',
license='MIT',
include_dirs=[numpy.get_include()],
ext_modules = cythonize(extensions + parallel_extensions),
packages=find_packages("."),
install_requires=[
'numpy',
'scipy',
'cython',
'scikit-learn',
],
test_suite='nose.collector',
tests_require=['nose', 'flaky'],
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
zip_safe=False)
| from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy
#directive_defaults['linetrace'] = True
#directive_defaults['binding'] = True
extensions = [
Extension('uncurl.nolips', ['uncurl/nolips.pyx'],
extra_compile_args=['-O3', '-ffast-math']),
Extension('uncurl.sparse_utils', ['uncurl/sparse_utils.pyx'],
extra_compile_args=['-O3', '-ffast-math'])
]
parallel_extensions = [
Extension('uncurl.nolips_parallel', ['uncurl/nolips_parallel.pyx'],
extra_compile_args=['-O3', '-ffast-math', '-fopenmp'],
extra_link_args=['-fopenmp'])
]
setup(name='uncurl_seq',
version='0.2.7',
description='Tool for pre-processing single-cell RNASeq data',
url='https://github.com/yjzhang/uncurl_python',
author='Yue Zhang',
author_email='yjzhang@cs.washington.edu',
license='MIT',
include_dirs=[numpy.get_include()],
ext_modules = cythonize(extensions + parallel_extensions),
packages=find_packages("."),
install_requires=[
'numpy',
'scipy',
'cython',
'scikit-learn',
],
test_suite='nose.collector',
tests_require=['nose', 'flaky'],
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
zip_safe=False)
| mit | Python |
c73e147b9d2a99bec10ace97a1f6e972083c46b5 | update version | openbaton/openbaton-cli,openbaton/openbaton-cli | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="openbaton-cli",
version="3.2.8",
author="Open Baton",
author_email="dev@openbaton.org",
description="The Open Baton CLI",
license="Apache 2",
keywords="python vnfm nfvo open baton openbaton sdk cli rest",
url="http://openbaton.github.io/",
packages=find_packages(),
scripts=["openbaton"],
install_requires=['requests', 'texttable', 'tabulate'],
long_description=read('README.rst'),
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
'Topic :: Software Development :: Build Tools',
"Topic :: Utilities",
"License :: OSI Approved :: Apache Software License",
],
entry_points={
'console_scripts': [
'openbaton = org.openbaton.cli.openbaton:start',
]
}
)
| import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="openbaton-cli",
version="3.2.7",
author="Open Baton",
author_email="dev@openbaton.org",
description="The Open Baton CLI",
license="Apache 2",
keywords="python vnfm nfvo open baton openbaton sdk cli rest",
url="http://openbaton.github.io/",
packages=find_packages(),
scripts=["openbaton"],
install_requires=['requests', 'texttable', 'tabulate'],
long_description=read('README.rst'),
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
'Topic :: Software Development :: Build Tools',
"Topic :: Utilities",
"License :: OSI Approved :: Apache Software License",
],
entry_points={
'console_scripts': [
'openbaton = org.openbaton.cli.openbaton:start',
]
}
)
| apache-2.0 | Python |
b15747ab3173e24c00a986c7ab109cbdeaec006d | use hdlConvertorAst>=0.4, pycocotb>=0.8, pyDigitalWaveTools>=0.8 | Nic30/HWToolkit | setup.py | setup.py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from os import path
from setuptools import setup, find_packages
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(name="hwt",
version="3.3",
description="hdl synthesis toolkit",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Nic30/hwt",
author="Michal Orsak",
author_email="michal.o.socials@gmail.com",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: System :: Hardware",
"Topic :: System :: Emulators",
"Topic :: Utilities"],
install_requires=[
"hdlConvertorAst>=0.4", # conversions to SystemVerilog, VHDL
"ipCorePackager>=0.5", # generator of IPcore packages (IP-xact, ...)
"pycocotb>=0.8", # simulator API
"pyDigitalWaveTools>=0.8", # simulator output dump
],
license="MIT",
packages=find_packages(),
include_package_data=True,
zip_safe=False
)
| #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from os import path
from setuptools import setup, find_packages
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(name="hwt",
version="3.3",
description="hdl synthesis toolkit",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Nic30/hwt",
author="Michal Orsak",
author_email="michal.o.socials@gmail.com",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Topic :: System :: Hardware",
"Topic :: System :: Emulators",
"Topic :: Utilities"],
install_requires=[
"hdlConvertorAst>=0.3", # conversions to SystemVerilog, VHDL
"ipCorePackager>=0.5", # generator of IPcore packages (IP-xact, ...)
"pycocotb>=0.7", # simulator API
"pyDigitalWaveTools>=0.6", # simulator output dump
],
license="MIT",
packages=find_packages(),
include_package_data=True,
zip_safe=False
)
| mit | Python |
954f8e7c86bd4a6e6015022ee234beebbbee279a | update version to 0.4.2 for package build #51 | michaelw/ezmomi,snobear/ezmomi,imsweb/ezmomi | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='ezmomi',
version='0.4.2',
author='Jason Ashby',
author_email='jashby2@gmail.com',
packages=['ezmomi'],
package_dir={'ezmomi': 'ezmomi'},
package_data={'ezmomi': ['config/config.yml.example']},
scripts=['bin/ezmomi'],
url='https://github.com/snobear/ezmomi',
license='LICENSE.txt',
description='VMware vSphere Command line tool',
long_description=open('README.txt').read(),
install_requires=[
"PyYAML==3.11",
"argparse==1.2.1",
"netaddr==0.7.11",
"pyvmomi==5.5.0",
"wsgiref==0.1.2",
],
)
| try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='ezmomi',
version='0.4.1',
author='Jason Ashby',
author_email='jashby2@gmail.com',
packages=['ezmomi'],
package_dir={'ezmomi': 'ezmomi'},
package_data={'ezmomi': ['config/config.yml.example']},
scripts=['bin/ezmomi'],
url='https://github.com/snobear/ezmomi',
license='LICENSE.txt',
description='VMware vSphere Command line tool',
long_description=open('README.txt').read(),
install_requires=[
"PyYAML==3.11",
"argparse==1.2.1",
"netaddr==0.7.11",
"pyvmomi==5.5.0",
"wsgiref==0.1.2",
],
)
| bsd-2-clause | Python |
48febbab1988e7904831938281516a306a45db94 | add plugins | TerryHowe/ansible-modules-dcos,TerryHowe/ansible-modules-dcos | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
files = [
"ansible/plugins",
"ansible/module_utils",
"ansible/modules/dcos",
]
long_description = open('README.rst', 'r').read()
setup(
name='ansible-modules-dcos',
version='1.2.1',
description='DCOS Ansible Modules',
long_description=long_description,
url='https://github.com/TerryHowe/ansible-modules-dcos',
author='Kevin Wood,Terry Howe',
author_email='kevin.wood@example.com',
license='MIT',
packages=files,
install_requires = [
'ansible>=2.0.0',
'dcoscli>=0.4.5',
'toml',
],
)
| #!/usr/bin/env python
from setuptools import setup
files = [
"ansible/module_utils",
"ansible/modules/dcos",
]
long_description = open('README.rst', 'r').read()
setup(
name='ansible-modules-dcos',
version='1.2.0',
description='DCOS Ansible Modules',
long_description=long_description,
url='https://github.com/TerryHowe/ansible-modules-dcos',
author='Kevin Wood,Terry Howe',
author_email='kevin.wood@example.com',
license='MIT',
packages=files,
install_requires = [
'ansible>=2.0.0',
'dcoscli>=0.4.5',
'toml',
],
)
| mit | Python |
0286628ee91663ae7cd6ee7a06043bdf68081092 | Bump version to 0.3.1 | severb/graypy,severb/graypy | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='graypy',
version='0.3.1',
description="Python logging handler that sends messages in GELF (Graylog Extended Log Format).",
long_description=open('README.rst').read(),
keywords='logging gelf graylog2 graylog udp amqp',
author='Sever Banesiu',
author_email='banesiu.sever@gmail.com',
url='https://github.com/severb/graypy',
license='BSD License',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
extras_require={'amqp': ['amqplib==1.0.2']},
classifiers=['License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3'],
)
| #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='graypy',
version='0.3',
description="Python logging handler that sends messages in GELF (Graylog Extended Log Format).",
long_description=open('README.rst').read(),
keywords='logging gelf graylog2 graylog udp amqp',
author='Sever Banesiu',
author_email='banesiu.sever@gmail.com',
url='https://github.com/severb/graypy',
license='BSD License',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
extras_require={'amqp': ['amqplib==1.0.2']},
classifiers=['License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3'],
)
| bsd-3-clause | Python |
0dcdefd01930c0e76fc446cd26a7fd04771f763a | Prepare openprocurement.auction 1.0.0.dev45. | openprocurement/openprocurement.auction,openprocurement/openprocurement.auction | setup.py | setup.py | from setuptools import setup, find_packages
import os
version = '1.0.0.dev45'
setup(name='openprocurement.auction',
version=version,
description="",
long_description=open("README.txt").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"Programming Language :: Python",
],
keywords='',
author='',
author_email='',
url='http://svn.plone.org/svn/collective/',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['openprocurement'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'requests',
'APScheduler',
'iso8601',
'python-dateutil',
'Flask',
'WTForms',
'WTForms-JSON',
'Flask-Redis',
'WSGIProxy2',
'gevent',
'sse',
'flask_oauthlib',
'Flask-Assets',
'cssmin',
'jsmin'
],
entry_points={
'console_scripts': [
'auction_worker = openprocurement.auction.auction_worker:main',
'auctions_data_bridge = openprocurement.auction.databridge:main'
],
'paste.app_factory': [
'auctions_server = openprocurement.auction.auctions_server:make_auctions_app'
]
},
)
| from setuptools import setup, find_packages
import os
version = '1.0.0.dev44'
setup(name='openprocurement.auction',
version=version,
description="",
long_description=open("README.txt").read() + "\n" +
open(os.path.join("docs", "HISTORY.txt")).read(),
# Get more strings from
# http://pypi.python.org/pypi?:action=list_classifiers
classifiers=[
"Programming Language :: Python",
],
keywords='',
author='',
author_email='',
url='http://svn.plone.org/svn/collective/',
license='GPL',
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['openprocurement'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
'requests',
'APScheduler',
'iso8601',
'python-dateutil',
'Flask',
'WTForms',
'WTForms-JSON',
'Flask-Redis',
'WSGIProxy2',
'gevent',
'sse',
'flask_oauthlib',
'Flask-Assets',
'cssmin',
'jsmin'
],
entry_points={
'console_scripts': [
'auction_worker = openprocurement.auction.auction_worker:main',
'auctions_data_bridge = openprocurement.auction.databridge:main'
],
'paste.app_factory': [
'auctions_server = openprocurement.auction.auctions_server:make_auctions_app'
]
},
)
| apache-2.0 | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.