def main(): swarm = Swarm(config.ALPHA, config.ABSORPTION) update_brightness(swarm.fireflies) swarm.update_attractiveness() utils.description(swarm.fireflies) swarm.__str__() t = 0 while t < config.MAX_GENERATION: for i, firefly in enumerate(swarm.fireflies): other_firefly = swarm.most_attractive[i] if other_firefly is not firefly and other_firefly.attractiveness > firefly.attractiveness: swarm.move(firefly, other_firefly) elif other_firefly.attractiveness == firefly.attractiveness: swarm.move_randomly(other_firefly) update_brightness(swarm.fireflies) swarm.update_attractiveness() t += 1 print() swarm.__str__()
def main(): setup( name = 'veusz_plugins', version = get_version('veusz_plugins/__init__.py'), description = 'A collection of miscellaneous plugins for the veusz graphing application', long_description = description('README.rst'), author = 'Dave Hughes', author_email = '*****@*****.**', url = 'https://github.com/waveform80/veusz_plugins', packages = find_packages(exclude=['distribute_setup', 'utils']), install_requires = ['xlrd'], platforms = 'ALL', zip_safe = False, classifiers = classifiers )
def main(): setup( name='samplesdb', version=get_version(os.path.join(HERE, 'samplesdb/__init__.py')), description='samplesdb', long_description=description(os.path.join(HERE, 'README.rst')), classifiers=CLASSIFIERS, author='Dave Hughes', author_email='*****@*****.**', url='https://github.com/waveform80/samplesdb', keywords='science samples database', packages=find_packages(exclude=['distribute_setup', 'utils']), include_package_data=True, platforms='ALL', install_requires=REQUIRES, extras_require={}, zip_safe=False, test_suite='nose.collector', entry_points=ENTRY_POINTS, )
def main(): setup( name = NAME, version = get_version(os.path.join(HERE, NAME, '__init__.py')), description = DESCRIPTION, long_description = description(os.path.join(HERE, 'README.rst')), classifiers = CLASSIFIERS, author = AUTHOR, author_email = AUTHOR_EMAIL, url = URL, keywords = ' '.join(KEYWORDS), packages = PACKAGES, package_data = PACKAGE_DATA, platforms = 'ALL', install_requires = REQUIRES, extras_require = EXTRA_REQUIRES, zip_safe = True, test_suite = NAME, entry_points = ENTRY_POINTS, )
def main(): setup( name = 'samplesdb', version = get_version(os.path.join(HERE, 'samplesdb/__init__.py')), description = 'samplesdb', long_description = description(os.path.join(HERE, 'README.rst')), classifiers = CLASSIFIERS, author = 'Dave Hughes', author_email = '*****@*****.**', url = 'https://github.com/waveform80/samplesdb', keywords = 'science samples database', packages = find_packages(exclude=['distribute_setup', 'utils']), include_package_data = True, platforms = 'ALL', install_requires = REQUIRES, extras_require = {}, zip_safe = False, test_suite = 'nose.collector', entry_points = ENTRY_POINTS, )
def main(): setup( name = 'dbsuite', version = get_version(os.path.join(HERE, 'dbsuite/__init__.py')), description = 'A suite of tools for maintenance of information warehouses', long_description = description(os.path.join(HERE, 'README.rst')), classifiers = CLASSIFIERS, author = 'Dave Hughes', author_email = '*****@*****.**', url = 'http://www.waveform.org.uk/trac/dbsuite/', keywords = 'database documentation', packages = find_packages(exclude=['distribute_setup', 'utils']), include_package_data = True, platforms = 'ALL', install_requires = REQUIRES, extras_require = EXTRA_REQUIRES, zip_safe = False, test_suite = 'dbsuite', entry_points = ENTRY_POINTS, )
def main(): setup( name='dbsuite', version=get_version(os.path.join(HERE, 'dbsuite/__init__.py')), description= 'A suite of tools for maintenance of information warehouses', long_description=description(os.path.join(HERE, 'README.rst')), classifiers=CLASSIFIERS, author='Dave Hughes', author_email='*****@*****.**', url='http://www.waveform.org.uk/trac/dbsuite/', keywords='database documentation', packages=find_packages(exclude=['distribute_setup', 'utils']), include_package_data=True, platforms='ALL', install_requires=REQUIRES, extras_require=EXTRA_REQUIRES, zip_safe=False, test_suite='dbsuite', entry_points=ENTRY_POINTS, )
'Topic :: Education', 'Topic :: Scientific/Engineering :: Atmospheric Science', ] ENTRY_POINTS = """\ [paste.app_factory] main = weather:main """ HERE = os.path.abspath(os.path.dirname(__file__)) setup( name = 'weather', version = get_version(os.path.join(HERE, 'weather', '__init__.py')), description = 'A web-based weather related education suite', long_description = description(os.path.join(HERE, 'README.rst')), classifiers = CLASSIFIERS, author = 'Dave Hughes', author_email = '*****@*****.**', url = 'http://www.waveform.org.uk/trac/weather/', keywords = 'weather climate web pyramid pylons', packages = find_packages(exclude=['distribute_setup', 'utils']), include_package_data = True, zip_safe = False, install_requires = REQUIRES, tests_require = REQUIRES, test_suite = 'weather', entry_points = ENTRY_POINTS, )
"Programming Language :: Python :: 2.7", "Topic :: Education", "Topic :: Scientific/Engineering :: Atmospheric Science", ] ENTRY_POINTS = """\ [paste.app_factory] main = weather:main """ HERE = os.path.abspath(os.path.dirname(__file__)) setup( name="weather", version=get_version(os.path.join(HERE, "weather", "__init__.py")), description="A web-based weather related education suite", long_description=description(os.path.join(HERE, "README.rst")), classifiers=CLASSIFIERS, author="Dave Hughes", author_email="*****@*****.**", url="http://www.waveform.org.uk/trac/weather/", keywords="weather climate web pyramid pylons", packages=find_packages(exclude=["distribute_setup", "utils"]), include_package_data=True, zip_safe=False, install_requires=REQUIRES, tests_require=REQUIRES, test_suite="weather", entry_points=ENTRY_POINTS, )
save_path = args.save_path batch_size = 64 num_steps = 15000 epsilon = 0.5 M = 0.1 num_test_steps = 5000 valid_steps = 100 datasets = dataloader.load_datasets(data_path, { args.source: 1, args.target: 1 }) # datasets = dataloader.normalize_dataset(datasets) sources = {args.source: 1} targets = {args.target: 1} description = utils.description(sources, targets) source_train, source_valid, source_test, target_train, target_valid, target_test = dataloader.source_target( datasets, sources, targets, unify_source=True) options = {} options['sample_shape'] = (28, 28, 3) options['num_domains'] = 2 options['num_targets'] = 1 options['num_labels'] = 10 options['batch_size'] = batch_size options['G_iter'] = 1 options['D_iter'] = 1 options['ef_dim'] = 32 options['latent_dim'] = 128 options['t_idx'] = np.argmax(target_test['domains'][0]) options['source_num'] = batch_size