Saravanan666/pypi-org huggingface dataset:
Package: mara-storage
Mara StorageMini package for configuring and accessing multiple storages in a single project. Decouples the use of storages and their configuration by using "aliases" for storages.The filemara_storage/storages.pycontains abstract storage configurations for local disk and cloud storages. The storage connections of a project are configured by overwriting thestoragesfunction in mara_storage/config.py:importpathlibimportmara_storage.configimportmara_storage.storages## configure storage connections for different aliasesmara_storage.config.storages=lambda:{'data':mara_storage.storages.LocalStorage(base_path=pathlib.Path('data')),'gcs-bucket-1':mara_storage.storages.GoogleCloudStorage(bucket_name='my_data_lake_bucket_1',project_id='my_awesome_project')}## access individual storage configurations with `storages.storage`:print(mara_storage.storages.storage('data'))# -> <LocalStorage: base_path=data>This packages gives the possibility to configure, manage and access multile storages in mara.Batch processing: Accessing storages with shell commandsThe filemara_storage/shell.pycontains functions that create commands for accessing storage files via their command line clients.For example, theread_file_commandfunction creates a shell command that reads a file from a storage and returns its content to stdout:importmara_storage.shellfile='my_domain.com/logs/2020/11/15/nginx.node-1.error.log'print(mara_storage.shell.read_file_command('data',file_name=file))# -> cat /mara/data/my_domain.com/logs/2020/11/15/nginx.node-1.error.logprint(mara_storage.shell.read_file_command('gcs-bucket-1',file_name=file))# -> gsutil cat gs://my_data_lake_bucket_1/my_domain.com/logs/2020/11/15/nginx.node-1.error.logThe functionwrite_file_commandcreates a shell command that receives a data on stdin and writes it to the storage:importmara_storage.shellcommand='echo "Hello World!"'command+=' | 'command+=mara_storage.shell.write_file_command('data',file_name='hello-world.txt')print(command)# -> echo "Hello World!" | cat - > /mara/data/hello-world.txtFinally,delete_file_commandcreates a shell command that deletes a file from the local storage:importmara_storage.shellprint(mara_storage.shell.delete_file_command('data',file_name='hello-world.txt'))# -> rm -f /mara/data/hello-world.txtThe followingcommand line clientsare used to access the various databases:StorageClient binaryCommentsLocal storageunix shellIncluded in standard distributions.SFTP storagesftp,curlGoogle Cloud StoragegsutilFromhttps://cloud.google.com/storage/docs/gsutil_install.Azure Storageazcopy,curlFromhttps://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10InstallationTo use the library directly, use pip:pipinstallmara-storageorpip install git+https://github.com/mara/mara-storage.gitLinksDocumentation:https://mara-storage.readthedocs.io/Changes:https://mara-storage.readthedocs.io/en/latest/changes.htmlPyPI Releases:https://pypi.org/project/mara-storage/Source Code:https://github.com/mara/mara-storageIssue Tracker:https://github.com/mara/mara-storage/issues
Package: mara-superset
Mara SupersetAutomating the setup and configuration ofApache Supersetinstances from the Mara framework.Syncing of databaseA Makefile for running Apache Superset locallyFeaturesMetadata syncIf you have a data warehouse schema defined inMara Schema, you can automatically sync column descriptions and metric definitions with the update_metadata function inmara_superset/metadata.py.The database is created automatically. Datasets with their columns and metrics are synchronized after the data set table has been added manually via the UI. New columns are only added after executing theSync columns from Sourcefunction via the Superset UI in the data set .LinksDocumentation:https://mara-superset.readthedocs.io/Changes:https://mara-superset.readthedocs.io/en/latest/changes.htmlPyPI Releases:https://pypi.org/project/mara-superset/Source Code:https://github.com/mara/mara-supersetIssue Tracker:https://github.com/mara/mara-superset/issues/
Package: marathon-device-service
Marathon Device Service LibraryThe Marathon Device Service library provides a streamlined approach for managing Marathon Cloud devices exclusively within the Marathon Cloud ecosystem.
For additional details about the Marathon Cloud, please visitMarathonLabs site.InstallationEnsure you have Python 3.6+ installed, then use pip to install:pipinstallmarathon-device-serviceQuick StartTo use the library:frommarathon_device_serviceimportMarathonDeviceService# Initialize the serviceservice=MarathonDeviceService()# Upload a media file to the device's cameraservice.camera.uploadMedia('/path/to/media/file.mp4')Replace the file path with the actual media file you wish to upload.SupportFor issues or feature requests, please contact our support team (em@marathonlabs.io).
Package: mar-azure-blob-utils
mar-azure_blob_utilsDescriptionThis package contains a set of utilities for interacting with Azure Blob Storage.
To use, instantiate the AzureBlobUtils class (usually as 'abu') with the SAS connection string as an argument.The following methods are available:list_blobs_in_containerReturns a list of all blobs in a container.check_blob_existsReturns True if a blob exists, False if it does not.check_for_new_blobsReturns a true if there are blobs in a container (slight misnomer, but it's what I'm using it for).This may be renamed to 'check_for_blobs' in the future.download_blobDownloads a blob to a specified location.upload_blobUploads a blob to a specified location.delete_blobDeletes a blob.copy_blobCopies a blob from one container to another.
Package: marbaloo_dogpile
dogpilesupport for cherrypy.Installationpip install marbaloo_dogpileUsage# app.py
import cherrypy
import marbaloo_dogpile
import os

marbaloo_dogpile.Plugin(cherrypy.engine).subscribe()
cherrypy.tools.dogpile = marbaloo_dogpile.Tool()


class Root(object):

    @cherrypy.expose
    def index(self):
        dogpile = cherrypy.request.dogpile
        counter = dogpile.get('counter')
        counter = 0 if isinstance(counter, int) is False else counter
        dogpile.set('counter', counter + 1)
        return str(counter)

root_path = os.path.dirname(__file__)
dogpile_dbm_path = os.path.join(root_path, 'dogpile.dbm')
config = {
    'global': {
        'marbaloo_dogpile': {
            'backend': 'dogpile.cache.dbm',
            'expiration_time': 3600,
            'arguments': {'filename': dogpile_dbm_path},
        }
    },
    '/': {
        'tools.dogpile.on': True
    }
}
cherrypy.quickstart(Root(), '/', config)
Package: marbaloo_mako
Makotemplate support for cherrypy.Installationpip install marbaloo_makoUsage# templates/dir1/index.mak
<h1>Today: ${today}</h1># app.py
import os
import marbaloo_mako
import cherrypy
from datetime import date
cherrypy.tools.mako = marbaloo_mako.Tool()

class Root(object):
    @cherrypy.expose
    @cherrypy.tools.mako(filename='/index.mak')
    def simple(self):
        return  {'today': date.today()}

root_path = os.path.dirname(__file__)
cherrypy.quickstart(Root(), '/', {
                            '/': {
                                'tools.mako.on': True,
                                'tools.mako.directories': [os.path.join(root_path, 'templates/dir1')]
                            }
                        })
Package: marbaloo_recaptcha
Google ReCaptchafor cherrypy.Installationpip install marbaloo_recaptchaUsage# app.py
import cherrypy
import marbaloo_recaptcha
cherrypy.tools.recaptcha = marbaloo_recaptcha.Tool()


class Root(object):

    @cherrypy.expose
    def index(self, **kwargs):
        recaptcha = cherrypy.request.recaptcha
        if 'submit_recaptcha' in kwargs:
            if recaptcha.verify():
                return 'Success'
            else:
                return 'Fail'
        else:
            return '''
            <head>
                %s
            </head>
            <body>
                <form method="post">
                    %s
                    <input type="submit" name="submit_recaptcha"/>
                </form>
            </body>
            ''' % (recaptcha.get_html_head(), recaptcha.get_html_field(enable_no_script=True))

config = {
    'global': {
        "server.socket_host": "0.0.0.0",
        "server.socket_port": 9095,
    },
    '/': {
        'tools.recaptcha.on': True,
        'tools.recaptcha.remoteip': '',
        # For production level, uncomment this lines
        # 'tools.recaptcha.secret_key': 'MY_SECRET_KEY',
        # 'tools.recaptcha.site_key': 'MY_SITE_KEY',
    }
}
cherrypy.quickstart(Root(), '/', config)Advanced Usage:import cherrypy
import marbaloo_recaptcha
cherrypy.tools.recaptcha = marbaloo_recaptcha.Tool()


class Root(object):

    @cherrypy.expose
    def index(self, **kwargs):
        recaptcha = cherrypy.request.recaptcha
        if 'submit_recaptcha' in kwargs:
            if recaptcha.verify():
                return 'Success'
            else:
                return 'Fail'
        else:
            return '''
            <head>
                %s
            </head>
            <body>
                <form method="post">
                    %s
                    <input type="submit" name="submit_recaptcha"/>
                </form>
            </body>
            ''' % (recaptcha.get_html_head(defer=True,
                                           async=True,
                                           render='onload',
                                           onload='my_onload_javascript',
                                           hl='fa'),
                   recaptcha.get_html_field(data_attributes={
                                                                'data-theme': 'dark',
                                                                'data-size': 'compact',
                                                                'data-type': 'image'
                                                            },
                                            enable_no_script=True))

config = {
    'global': {
        "server.socket_host": "0.0.0.0",
        "server.socket_port": 9095,
    },
    '/': {
        'tools.recaptcha.on': True,
        'tools.recaptcha.remoteip': '',
        # For production level, uncomment this lines
        # 'tools.recaptcha.secret_key': 'MY_SECRET_KEY',
        # 'tools.recaptcha.site_key': 'MY_SITE_KEY',
    }
}
cherrypy.quickstart(Root(), '/', config)
Package: marbaloo_schedule
Schedulesupport for cherrypy.Installationpip install marbaloo_scheduleUsage# app.py
import cherrypy
import marbaloo_schedule

schedule_plugin = marbaloo_schedule.Plugin(cherrypy.engine)
schedule_plugin.subscribe()
cherrypy.tools.schedule = marbaloo_schedule.Tool()


class Root(object):
    job_started = False

    def do_jobs(self):
        import schedule
        # request level jobs
        # e.g: send emails
        # if my_job_completed:
        #     schedule.CancelJob
        pass

    @cherrypy.expose
    def index(self):
        schedule = cherrypy.request.schedule
        if self.job_started is False:
            schedule.every(5).seconds.do(self.do_jobs)
            return 'jobs started :)'
        else:
            return 'jobs already started!'

config = {
    '/': {
        'tools.schedule.on': True
    }
}
cherrypy.quickstart(Root(), '/', config)And for server level jobs something like this:import cherrypy
import marbaloo_schedule

schedule_plugin = marbaloo_schedule.Plugin(cherrypy.engine)
schedule_plugin.subscribe()


class Root:
    pass

cherrypy.tree.mount(Root(), '/', {})
cherrypy.engine.signals.subscribe()
cherrypy.engine.start()


def do_server_jobs():
    # server level jobs
    print('Job is Done')
schedule_plugin.schedule.every(5).seconds.do(do_server_jobs)

cherrypy.engine.block()P.S: For stop jobs anywhere, useschedule tags.
Package: marbaloo_sqlalchemy
sqlalchemysupport for cherrypy.Installationpip install marbaloo_sqlalchemyUsage# app.py
import marbaloo_sqlalchemy
import cherrypy
import os
from your_models import messages_model
marbaloo_sqlalchemy.Plugin(cherrypy.engine).subscribe()
cherrypy.tools.db = marbaloo_sqlalchemy.Tool()


class Root(object):

    @cherrypy.expose
    def index(self):
        db_session1 = cherrypy.request.db['db1']
        db_session2 = cherrypy.request.db['db2']

        query = messages_model.insert().values(message='TESTMessage')
        db_session1.get_bind().execute(query)
        db_session1.commit()

        query = messages_model.insert().values(message='TESTMessage')
        db_session2.get_bind().execute(query)
        db_session2.commit()

config = {
    'global': {
        'marbaloo_sqlalchemy_db': {
            'db1': {
                'engine': {
                    'name_or_url': 'sqlite:///test1.db',
                    'echo': True,
                },
                'session': {
                    'expire_on_commit': True,
                    'autoflush': True,
                    'autocommit': False
                }
            },
            'db2': {
                'engine': {
                    'name_or_url': 'sqlite:///test2.db',
                    'echo': True,
                },
                'session': {
                    'expire_on_commit': True,
                    'autoflush': True,
                    'autocommit': False
                }
            },
        }
    },
    '/': {
        'tools.db.on': True
    }
}
cherrypy.quickstart(Root(), '/', config)
Package: marbaloo_telegram
python-telegram-botsupport for cherrypy.Installationpip install marbaloo_telegramUsageFor the simple way you can just send anything supported bypython-telegram-bot,# app.py
import marbaloo_telegram
import cherrypy

marbaloo_telegram.Plugin(cherrypy.engine, 'TOKEN').subscribe()
cherrypy.tools.telegram = marbaloo_telegram.Tool()


class Root(object):
    @cherrypy.expose
    def index(self):
        bot = cherrypy.request.telegram_dp.bot
        message = bot.sendMessage(text='TestMessage!', chat_id='38855883')
        return  message.text

root_path = os.path.dirname(__file__)
cherrypy.quickstart(Root(), '/', {
                            '/': {
                                'tools.telegram.on': True,
                            }
                        })But if you want to use more interactive interface,
you can get bot dispatcher from plugin and define your telegram controller aftercherrypy.engine.start,
Package: marbaloo_validators
validatorslibrary support for cherrypy.Installationpip install marbaloo_validatorsUsage# app.py
import cherrypy
import marbaloo_validators
import os

marbaloo_validators.Plugin(cherrypy.engine).subscribe()
cherrypy.tools.validators = marbaloo_validators.Tool()


class Root(object):

    @cherrypy.expose
    def index(self):
        validators = cherrypy.request.validators
        if validators.email('example@site.com'):
            return 'TRUE'
        else:
            return 'FALSE'

root_path = os.path.dirname(__file__)
config = {
    '/': {
        'tools.validators.on': True
    }
}
cherrypy.quickstart(Root(), '/', config)
Package: marbl
marblis an asyncio microservices framework.FeaturesGet It Now$pipinstallmarblUsageMore athttps://getmarbl.readthedocs.ioProject LinksDocs:https://getmarbl.readthedocs.io/Changelog:https://getmarbl.readthedocs.io/en/latest/changelog.htmlPyPI:https://pypi.python.org/pypi/marblIssues:https://github.com/jeremyarr/marbl/issuesLicenseMIT licensed. See the bundledLICENSEfile for more details.
~Changelog0.1.0 (2017-07-21)Under development
Package: marble
# Marble[![Build Status](https://travis-ci.org/scities/marble.svg)](https://travis-ci.org/scities/marble)[![Coverage Status](https://coveralls.io/repos/scities/marble/badge.svg)](https://coveralls.io/r/scities/marble)Study residential segregation, explore its different dimensions.* Measure the attraction/repulsion of the different categories* Determine the emergent classes* Define neighbourhoods* Study the spatial pattern of segregation### Website and documentationhttp://scities.github.io/marble### Questions*About the code?* Start an [issue](https://github.com/scities/marble/issues/new).*About science?* Send an [email](remi.louf@sciti.es).*Anything else?* Don't hesitate to send an [email](remi.louf@sciti.es)!### CitationIf you find this code useful in your research, please let me know!If you use marble in a publication, please cite```@article{louf:2015,title={Patterns of residential segregation},author={Louf, R\'emi and Barthelemy, Marc},journal={},volume={},pages={},year={2015},publisher={}}```and link to the [repository](http://github.com/scities/marble). Please send me a reference to the paper, I will advertise it on the [website](http://scities.github.io/marble).### License and authorThe code is distributed with a BSD license, see LICENSE.txt for more details.```Copyright (c) ScitiesRémi Louf <remi.louf@sciti.es>```
Package: marbles
marblesRead better test failures.Free software: MIT licenseDocumentation:https://marbles.readthedocs.ioOverviewmarblesis a Pythonunittestextension that allows test authors to write
richer tests that expose more information on test failure to help you debug
failing tests faster.Treat test failures as documentationContextualize failures without digging through test code
and dropping debugging statements everywhereWrite clearer, more explicit testsFeaturesDrop-inunittestreplacementInformation-rich failure messagesThe full statement that failed (instead of just the last line)Local variables in scope at the time the test failedOptional annotation provided by the test author with details about the testAbility to toggle tracebackSemantically-rich assertion methodsAssertion loggingDemoYou can run the example tests provided to see what amarblesfailure message
looks likeYou can also run your existingunittesttests withmarblespython-mmarblestest_module.pyMarbles also creates a setuptools command so if you are used to runningpython setup.py test, you can now run:pythonsetup.pymarblesYou can go one step further and alias the command test to run marbles
by adding the following tosetup.cfg:[aliases]test=marblesInstallingpipinstallmarbles
Package: marbles.core
marblesRead better test failures.Free software: MIT licenseDocumentation:https://marbles.readthedocs.ioOverviewmarblesis a Pythonunittestextension that allows test authors to write
richer tests that expose more information on test failure to help you debug
failing tests faster.Treat test failures as documentationContextualize failures without digging through test code
and dropping debugging statements everywhereWrite clearer, more explicit testsFeaturesDrop-inunittestreplacementInformation-rich failure messagesThe full statement that failed (instead of just the last line)Local variables in scope at the time the test failedOptional annotation provided by the test author with details about the testAbility to toggle tracebackSemantically-rich assertion methodsAssertion loggingDemoYou can run the example tests provided to see what amarblesfailure message
looks likeYou can also run your existingunittesttests withmarblespython-mmarblestest_module.pyMarbles also creates a setuptools command so if you are used to runningpython setup.py test, you can now run:pythonsetup.pymarblesYou can go one step further and alias the command test to run marbles
by adding the following tosetup.cfg:[aliases]test=marblesInstallingpipinstallmarbles
Package: marbles.mixins
marblesRead better test failures.Free software: MIT licenseDocumentation:https://marbles.readthedocs.ioOverviewmarblesis a Pythonunittestextension that allows test authors to write
richer tests that expose more information on test failure to help you debug
failing tests faster.Treat test failures as documentationContextualize failures without digging through test code
and dropping debugging statements everywhereWrite clearer, more explicit testsFeaturesDrop-inunittestreplacementInformation-rich failure messagesThe full statement that failed (instead of just the last line)Local variables in scope at the time the test failedOptional annotation provided by the test author with details about the testAbility to toggle tracebackSemantically-rich assertion methodsAssertion loggingDemoYou can run the example tests provided to see what amarblesfailure message
looks likeYou can also run your existingunittesttests withmarblespython-mmarblestest_module.pyMarbles also creates a setuptools command so if you are used to runningpython setup.py test, you can now run:pythonsetup.pymarblesYou can go one step further and alias the command test to run marbles
by adding the following tosetup.cfg:[aliases]test=marblesInstallingpipinstallmarbles
Package: marblex.py
marblex.pyAn Asynchronous Marblex API Wrapper for PythonInstallationWindows:$ pip install -U marblex.pyLinux/MacOS:$ python3 -m pip install -U marblex.pyAsynchronous Example:importasynciofrommarbleximportMarblexmbx=Marblex()asyncdefmain():asyncwithmbx:nkt=awaitmbx.get_territe_token()nka=awaitmbx.get_asterite_token()print(f"NKT :{nkt.USD}$, Percent:{nkt.percent}")print(f"NKA :{nka.USD}$, Percent:{nka.percent}")loop=asyncio.get_event_loop()loop.run_until_complete(main())Synchronous Example:frommarbleximportMarblexSyncmbx=MarblexSync()nkt=mbx.get_territe_token()nka=mbx.get_asterite_token()itu=mbx.get_inetrium_token()print(f"NKT :{nkt.USD}$, Percent:{nkt.percent}")print(f"NKA :{nka.USD}$, Percent:{nka.percent}")print(f"ITU :{itu.USD}$, Percent:{itu.percent}")>>>NKT:1.47$,Percent:-4.22%>>>NKA:3.56$,Percent:+1.61%>>>ITU:0.13$,Percent:-0.59%LicenseMITinspired bymarblexbysyntaxp
Package: marblingpy
marblingpyPython command-line application to generate a randomized mathematical marbling image.Usagemarblingpy[-h][--initINIT][--saveFILE]-mM[-WW][-HH][--seedSEED][--countC]-h,--helpshowthishelpmessageandexit--versionshowprogram\'sversionnumberandexit--initINITifgiven,thedistortionwillstartbasedfromtheimage(png)file--saveFILEwritegeneratingimagetoFILE-mM,--methodMthetoolfunctionthatappliestotheimage;I=ink-drop,T=tine-line.-WW,--widthWthewidthinintegerofgeneratingimagefile(gif)-HH,--heightHtheheightinintegerofgeneratingimagefile(gif)--seedSEEDinputofanunsignedinteger0or2^32-1tothealgorithmthatgeneratespseudo-randomnumbersthroughouttheprogram.thesameseedproducesthesameresult.--interpolationINTERPOLATIONpixelfillinginterpolationtype--countCthetotalnumberoftimesthattoolfunctionsshallbeappliedtorenderanimage-v,--verboseshowverbosemessageExampleTo operate "ink-drop" method 10 times.$ marblingpy --save output.png --method I --width 256 --height 256 --count 10 --verbose
Current seed: 1602334135
drop circle (0/10) : (x, y, r) = (194, 224, 52)
drop circle (1/10) : (x, y, r) = (147, 165, 86)
drop circle (2/10) : (x, y, r) = (184, 9, 42)
drop circle (3/10) : (x, y, r) = (98, 245, 58)
drop circle (4/10) : (x, y, r) = (155, 26, 30)
drop circle (5/10) : (x, y, r) = (195, 95, 10)
drop circle (6/10) : (x, y, r) = (185, 37, 87)
drop circle (7/10) : (x, y, r) = (82, 215, 70)
drop circle (8/10) : (x, y, r) = (233, 123, 29)
drop circle (9/10) : (x, y, r) = (51, 186, 41)To set initial image, and use "tine-line" method 3 times.$ marblingpy --init output.png --save output.png --method T --width 256 --height 256 --count 3 --verbose
Current seed: 1602334273
tine line (0/3) : (x1, y1), (x2, y2), shift, sharpness = (202, 44), (62, 177), 54, 27
tine line (1/3) : (x1, y1), (x2, y2), shift, sharpness = (23, 245), (76, 234), 146, 28
tine line (2/3) : (x1, y1), (x2, y2), shift, sharpness = (25, 23), (12, 127), 66, 7System environmentPython >=3.7pip 20.2.3opencv-python 4.4.0.44Installationfrom pypipipinstallmarblingpyfrom githubpipinstallgit+https://github.com/taktpixel/marblingpyfor developmentClone this repository.git clone git@github.com:taktpixel/marblingpy.gitFor real time updating to pip command,pip install -e .To run python command.python marblingpy/gen_marbling.py -hNoteAuthorsShinobu Yokoyamacohomolg@gmail.comTeppei TamakiLicensingmarblingpy is dual-licensed; You may use this software under either LGPLv3 or our commercial (proprietary) license. See the LICENSE files for details.CommercialNon-commercial LGPLv3ReferencesLu, Shufang, Aubrey Jaffer, Xiaogang Jin, Hanli Zhao, and Xiaoyang Mao. "Mathematical marbling." IEEE computer graphics and applications 32, no. 6 (2011): 26-35.