Saravanan666/pypi-org huggingface dataset:
Package: masced-bandits-EGAlberts
MASCed_banditsThis is a library of multi-armed bandit policies.
As of the most recent version the following policies are included:
UCB, UCB-Improved, EXP3, EXP3S, EXP4, EwS, ETC, Discounted UCB, Sliding Window UCB, e-greedy.Examplefrom masced_bandits.bandit_options import initialize_arguments
from masced_bandits.bandits import init_bandit
import numpy as np

initialize_arguments(["Arm1","Arm2"], 0)

ucb_instance = init_bandit(name='UCB')
for i in range(100):
    arms_chosen = []
    reward = np.random.random()
    arms_chosen.append(ucb_instance.get_next_arm(reward))
Package: masci-tools
masci-toolsThis is a collection of tools, common things used by packages of material science.Feel free to contribute.The code is hosted on GitHub athttps://github.com/JuDFTteam/masci-toolsThe documentation is hosted onhttps://masci-tools.readthedocs.io.Most functionality was developed for the use with the DFT codes developed at the Forschungszentrum Jülich (seehttp://judft.de,https://flapw.deandhttps://jukkr.fz-juelich.defor further information on the codes) and in the context of the AiiDA plugins for theFleur codeand theKKR code.Installationpip install masci-toolsDependenciesThese python packages are needed:lxmlh5pydeepdiffhumanfriendlymatplotlibseabornasepymatgenmendeleevclickclick-completionPyYAMLtabulateIt should not depend onaiida-core!Layout ofmasci-toolsioContains methods to write certain filesio.parsers: Contains parsers of certain code output or input filestestingContains utilities/fixtures for testing that can be useful outside the packageutilContains rather low-level utilitytoolsContains rather high-level utility which is rather completevisContains a collection of matplotlib/bokeh methods used for plotting common results from material science simulations, e.g. bandstructures, DOS, ...cmdlineContains a small click command line interface exposing some parts of the libraryLicensemasci-toolsis distributed under the terms and conditions of the MIT license which is specified in theLICENSE.txtfile.
Package: masedb
Mase-DB v1.2.1Легкое использование базы данных монгодб.ДокументацияДокументация:docsУстановка# ЕСЛИ УСТНОВЛЕНpipinstall--upgrademasedb# ЕСЛИ НЕ УСТАНОВЛЕНpython3-mpipinstall--upgrademasedborpipinstallmasedbПрименениеПредпосылкиПрежде чем приступить к работе, вам понадобится несколько вещей:Установить нужные для работы библиотекиТак же установить masedbИ понять как это все работаетИ так поехали!(жабы топ)Примерыfromconfigimporturlfrommasedb.queryimportQueryimportasyncio#--------------------------------------------------------------------------------------------------------------------------------------------------------#client = Query(DatabaseName, CollectionName, url.uri)#await client.find(param={'name': 'mark'})#await client.insert(param={'name': 'mark'})#await client.update(param1={'name': 'mark'}, param2={'$set':{'let': 10}})#await client.delete(param={'cash': 10})#--------------------------------------------------------------------------------------------------------------------------------------------------------#     Название базы данных и колекцииDatabaseName='pondb2'CollectionName='poncoll2'#--------------------------------------------------------------------------------------------------------------------------------------------------------client=Query(DatabaseName,CollectionName,url.uri)asyncdeftest():db=awaitclient.find(param={'name':'mark'})print(db)ifnotdb:print('занесение')returnawaitclient.insert(param={'name':'mark'})try:cash=db['cash']except:cash=Noneawaitclient.delete(param={'cash':10})ifnotcash:print('update data')returnawaitclient.update(param1={'name':'mark'},param2={'$set':{'cash':10}})print(cash)asyncio.run(test())
Package: maser4py
About maser4pymaser4py offers modules to handle data from several space and ground radio observatory.It comes with the following submodules:maser-datafor radio data parsing featuresmaser-plotfor radio data plotting featuresmaser-toolsfor additional support programsRead maser4pymain documentationfor details.maser4py is developed in the framework of theMASER project.InstallationTo install the full package, run the following command:pip install maser4py[all]or use one of the extra options:datato getmaser-datasubmodule featuresplotto getmaser-plotsubmodule featurestoolsto getmaser-toolssubmodule featuresjupyterfor Jupyter notebook supportjupytextfor Jupyter notebook text supportallto install all the submodules aboveFor example if you want to usemaser4pywith maser-data and maser-plot submodules:pipinstallmaser4py[data,plot]UsageExamples of usage can be found in theexamplesfolder.Examples can also be run as Jupyter notebooks on BinderYou can also launch a Binder environment and browse through the notebookexamples.DevelopmentTo contribute to the development of the package, you will need to install a local copy of maser4py:git clone https://gitlab.obspm.fr/maser/maser4py.gitThen, you can install the package locallyRequirementsmaser4pyrequirements are detailed in thepyproject.tomlfilepoetryTo install the package, it is recommended to usepoetry:pip install poetryCDF file formatTo usemaser4pyto read CDF files you have to install theCDF libraryand thespacepy.pycdfpackage.Installing a local copy of maser4pyUse the following command to install the package from a local copy:poetryinstallTestsUsepytest -m "not test_data_required"to skip tests that require test data (and to skip auto download).pip install -e path/to/project/folderBuild the documentationUsesphinx-build docs/source docs/publicto build the documentation.Manually publishmaserand generate a new DOITo publishmaserwithpoetryyou will have to build adistpackage:poetry buildAnd then publish the package on pypi (and/or on Gitlab, seehttps://python-poetry.org/docs/cli/#publish):poetry publishmasercomes with a Python client (see.ci/zenodo.py) to interact with the Zenodo API and generate automatically a DOI for each new version ofmaser.To archivemaseron Zenodo:Create an access tokenIs this the first maser deposit on Zenodo ?Yes it's the first deposit, so you don't need any IDNo, it's a new version ofmaser. Then browse to the first record of maser on Zenodo and check the URL :https://zenodo.org/record/<DEPOSITION_ID>to get themaserdeposition ID.Use the following command to deposit the package on Zenodo:python.ci/zenodo.py-p./-t<ACCESS_TOKEN>-a./dist/maser4py-X.Y.Z.tar.gz-id<DEPOSITION_ID>Browse to themaserrecord on Zenodo, check the metadata/files and publish the package to finally generate the DOI.Notes :the--sandboxkeyword can be used to deposit files on the Zenodo test serverthe--publishkeyword can be used to automatically publish the new record and generate the DOI. Butbe careful, once published, there is no way to modify a record on Zenodo without publishing a new version.
Package: maser-data
About maser-datamaser-data is a submodule ofmaser4py.It offers programs to handle radio data from the following missions:CassiniEcallistoInterballJunoMars Expressnancay decametric array (Jupiter only)Nancay NenuFAR/BSTSolar orbiterVikingWindRead maser4pymain documentationfor details.InstallationTo install the package, run the following command:pip install maser-dataor use one of the extra options:jupyterfor Jupyter notebook supportspacepyfor CDF data format support (note that this requires theCDF library)nenupyfor NenuFAR data products supportallto install all the aboveFor example usemaser-data[jupyter,spacepy]if you want to usemaser-datawith spacepy and jupyter notebooks:pipinstallmaser-data[jupyter,spacepy]UsageTheDataclass is a wrapper around several classes that allow you to read data from many different formats, including CDF, Fits, and some custom binary formats. By default, the class will try to automagically detect the format of the file and use the appropriate class to read the data.frommaser.dataimportDatafilepath="path/to/my/data/file.ext"data=Data(filepath=filepath)You can also launch a Binder environment and browse through the notebookexamples.DevelopmentTo contribute to the development of the package, you will need to install a local copy of maser.datagit clone https://gitlab.obspm.fr/maser/maser4py.gitThen, you can install the package locallyRequirementsmaser-datarequirements are detailed in thesrc/maser_data/pyproject.tomlfilepoetryTo install the package, it is recommended to usepoetry:pip install poetryCDF file formatTo usemaser-datato read CDF files you have to install theCDF libraryand thespacepy.pycdfpackage.Installing a local copy of maser-dataUse the following command fromsrc/maser_datafolder to install the package:poetryinstallor this one if you want to usemaser-datawith spacepy to handle CDF files:poetryinstall--extras"spacepy"TestsUsepytest -m "not test_data_required"to skip tests that require test data (and to skip auto download).Manually publishmaser-dataon pypiTo publishmaser-datawithpoetryyou will have to build adistpackage:poetry buildAnd then publish the package on pypi (and/or on Gitlab, seehttps://python-poetry.org/docs/cli/#publish):poetry publishCommands above must be run fromsrc/maser_datadirectory.
Package: maser-plot
About maser-plotmaser-plot is a submodule ofmaser4py.It can be used withmaser.datato plot radio data from the following missions:RPW/Solar OrbiterInstallationTo install the package, run the following command:pip install maser-plotor use one of the extra options:jupyterfor Jupyter notebook supportspacepyfor CDF data format support (note that this requires theCDF library)nenupyfor NenuFAR data products supportallto install all the aboveFor example usemaser-plot[jupyter,spacepy]if you want to usemaser-plotwith spacepy and jupyter notebooks:pipinstallmaser-plot[jupyter,spacepy]UsageSee inexamplesfolder about illustrations on how to usemaser-plot.Examples can also be run on BinderYou can also launch a Binder environment and browse through the notebookexamples.DevelopmentTo contribute to the development of the package, you will need to install a local copy of maser-plotgit clone https://gitlab.obspm.fr/maser/maser4py.gitThen, you can install the package locallyRequirementsmaser-plotrequirements are detailed in thesrc/maser_plot/pyproject.tomlfilepoetryTo install the package, it is recommended to usepoetry:pip install poetryCDF file formatTo usemaser-plotto read CDF files you have to install theCDF libraryand thespacepy.pycdfpackage.Installing a local copy of maser-plotUse the following command fromsrc/maser_plotfolder to install the package:poetryinstallor this one if you want to usemaser-plotwith spacepy to handle CDF files:poetryinstall--extras"spacepy"TestsUsepytest -m "not test_data_required"to skip tests that require test data (and to skip auto download).Manually publishmaser-ploton pypiTo publishmaser-plotwithpoetryyou will have to build adistpackage:poetry buildAnd then publish the package on pypi (and/or on Gitlab, seehttps://python-poetry.org/docs/cli/#publish):poetry publishCommands above must be run fromsrc/maser_plotdirectory.
Package: mash-client
mash-clientoverviewmash-clientprovides a command line utility to interface with the
MASH server REST API.InstallationTo install the package use the following commands as root:$zypperarhttp://download.opensuse.org/repositories/Cloud:/Tools/<distribution>
$zypperrefresh
$zypperinmash-clientRequirementsClickrequestsPyYamlPyJWTDocsUsageMash user commandsThe mash user account is the authentication mechanism of a user against the mash server. It will store information about cloud framework specific account information. The cloud framework account information stored for a given mash user provides the credentials necessary for mash to access a cloud framework account.mash user createCreate a mash user account.mash user deleteDelete a mash user account.mash user infoList information about your user account.Mash authentication commandsAuthentication command are used after a mash user has been createdmash auth loginLogin to the mash user accountmash auth logoutLog out of the mash user accountmash auth tokenManage the authentication tokenMash cloud account commandsmash account <framework> addAdd cloud framework account information to the mash user account. Supported s are azure, ec2, and gce.mash account <framework> deleteRemove cloud framework account information from the mash user account.mash account <framework> infoRetrieve cloud framework account information from the mash user account.mash account <framework> listList all the framework accounts configured for the mash user.mash account <framework> updateUpdate information for a cloud framework account for the mash user.Mash job commandsmash job <framework> add [PATH_TO_JOB_DOC]Send a job request to the mash server submitting the specified job document.
The job document will be validated and a UUID is returned if the job is accepted.mash job deleteDelete a job from the mash server. If the job is a one time job parts of the job may already be executed and created artifacts are not cleaned up.mash job infoRetrieve information about a given job in the pipeline.mash job listList all the user's job in the mash pipeline.All commands and subcommands support the--helpoption to provide command help. For examplemash account azure add --helpIssues/EnhancementsPlease submit issues and requests toGithub.ContributingContributions tomash-clientare welcome and encouraged. SeeCONTRIBUTINGfor info on getting started.LicenseCopyright (c) 2019 SUSE LLC.Distributed under the terms of GPL-3.0+ license, seeLICENSEfor details.
Package: mashdown
Mashdown will download and split a Youtube mashup video into individual audio files, with documented audio tags.Warning: For Mashdown to work, the video must come with a tracklist listing the start time and track name for each track. The tracklist can either be in the Youtube description or in a local file. Here is aYoutube videothat is a perfect candidate.InstallationTo install Mashdown, you can simply use pip:$pipinstallmashdownExamplesDownloading and splitting the mashup$mashdown\--audioformatogg\--album"The Lord of the Rings Sountrack"\--artist"Howard Shore"\https://www.youtube.com/watch\?v\=upzOSSQWSYUSplitting a local mashupIn this example, the mashup will not be downloaded. The youtube URL is only used to fetch the tracklist information.$mashdown\--audioformatogg\--mashupfilepath/to/mashupfile--album"The Lord of the Rings Sountrack"\--artist"Howard Shore"\https://www.youtube.com/watch\?v\=upzOSSQWSYUUsageusage: mashdown [-h] [-m MASHUPFILE] [–input-audioformat INPUT_AUDIOFORMAT][-f AUDIOFORMAT] [-o OUTPUT_DIR] [-q] [–artist ARTIST]
[–album ALBUM]
urlSplit a Youtube mashup video into a list of tagged audio trackspositional arguments:url                   The youtube link to the mashup.optional arguments:-h,--helpshow this help message and exit-mMASHUPFILE,--mashupfileMASHUPFILEThe local path, relative or absolute, to the mashup
file.--input-audioformatINPUT_AUDIOFORMATThe prefered audio format for the source mashup file.-fAUDIOFORMAT,--audioformatAUDIOFORMATThe export audio format. Examples: ‘mp3’, ‘ogg’,
‘mp4’, ‘flac’, …-oOUTPUT_DIR,--output-dirOUTPUT_DIRThe directory in which the output directory will be
created.By default, the current directory will be
used.-q,--quietRemove non important log messagesmetadata:--artistARTISTThe artist name--albumALBUMThe album nameDependenciesMashdown is depends on the following libraries:pydub(which requiresffmpegoravconvto be installed on the system), to cut the video file and export the audio segmentspafy, to download the Youtube video and get its metadatamutagen, to edit the audiofile metadataReleases0.1.1The track name can be located before or after the track start timeAdded unit tests0.1.0initial release
Package: masheryapi
A sample project that exists as an aid to thePython Packaging User Guide’sTutorial on Packaging and Distributing
Projects.This projects does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.This is the README file for the project.The file should use UTF-8 encoding and be written using ReStructured Text. It
will be used to generate the project webpage on PyPI and will be displayed as
the project homepage on common code-hosting services, and should be written for
that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not
a good idea, although a simple “What’s New” section for the most recent version
may be appropriate.
Package: masheryclient
A simple Python client library for theMashery API.ExampleQuery recently created apps:frommasheryclient.jsonrpcimportMasheryJsonRpcApijson_rpc_api_client=MasheryJsonRpcApi(MASHERY_SITE_ID,MASHERY_SERVICE_KEY,MASHERY_API_KEY,MASHERY_API_SECRET)mashery_query='SELECT * FROM applications ORDER BY created DESC ITEMS 10'r=json_rpc_api_client.query(mashery_query)['items']forappinr:printapp['name']Top API callers within the specified time period:reporting_client=MasheryReportingApi(MASHERY_SITE_ID,MASHERY_SERVICE_KEY,MASHERY_API_KEY,MASHERY_API_SECRET,)r=reporting_client.developer_activity_for_service(start_date_str,end_date_str,limit)app_list=[]forappinr:api_key=app['serviceDevKey']call_count_success=app['callStatusSuccessful']call_count_blocked=app['callStatusBlocked']call_count_other=app['callStatusOther']
Package: mashup-yt
Mashup Module by Chitraksh KumarDescriptionThis module creates a mashup of songs of your favorite singer with a few steps from the command line.
Select the singer, the number of songs and there durations and you will get a mashup of their most popular hits.
The app might take a bit long to run due to downloading of multiple files from the net.Requirementspip install pytube
pip install pydub
pip install requests
pip install flaskInstallDownload the code using pippip install mashup_ytRunning the codeBefore running code make sure to add your smtp google account as well as it's app password.
The password would be a 16 character string.
This step is not needed if you intend to use only the cli interface and not the web app.mashup_yt -p example@gmail.com secret_passwordmashup_yt "Marshmello" 20 20 out.mp3
mashup_yt -wUsing the web appA sendgrid account and api key is necessary to run the webapp as intended.
Navigate to the webapp folder and change email and api according to your needs in app.py.
After that enter the below command on the terminal.set FLASK_APP=app.py  
flask run
mashup_yt -wThe app should run and provide you with a link which can be opened to run the mashup webapp.
Enter the required entries and the given email id should recieve a zip file containing the desired audio file.
Errors most likely might occur due to wrong from email mentioned in app.py or incorrect api key.
Make sure mashup.py is in the same folder as app.pywebpage can be changed by editing the php code in templates named index.htmlThe webapp can be hosted online on a platform like heroku or pythonanywhere.com for free.My WebsiteMashup-yt
Package: mask
MaskA gRpc server just likeFlask.InstallMasksupport pypi packages, you can simply install by:pip install maskDocumentMaskmanual could be found at:https://mask.readthedocs.io/en/latestA Simple ExampleThis is very easy to useMaskin your project.from mask import Mask
from mask.parse import pre, Rule


app = Mask(__name__)


rule = {
    "name": Rule(type=str, gte=2, dest="Name")
}


@app.route(method="SayHello", service="Hello")
def say_hello(request, context):
    """ Handler SayHello request
    """
    params = pre.parse(rule=rule, request=request, context=context)
    return HelloResponse(message="Hello Reply: %s" % params["Name"])


if __name__ == "__main__":
    app.run(host="0.0.0.0", port=1020)ServiceMasksupportServiceto organize a group of route which is likely withBlueprintinFlask.# 3p
    from mask import Mask, Service
    from mask.parse import pre, Rule
    # project
    from examples.protos.hello_pb2 import HelloResponse


    app = Mask(__name__)
    app.config["REFLECTION"] = True


    # Bind service to application
    service = Service(name="Hello")
    app.register_service(service)


    rule = {
        "name": Rule(type=str, gte=2, dest="Name")
    }

    # Service route
    @service.route(method="SayHello")
    def say_hello_handler(request, context):
        """ Handler SayHello request
        """
        params = pre.parse(rule=rule, request=request, context=context)
        return HelloResponse(message="Hello Reply: %s" % params["Name"])


    if __name__ == "__main__":
        app.run(host="0.0.0.0", port=1020)MiddlewareMasksupport middleware to hook before request and after request.# 3p
from mask import Mask
# project
from examples.protos.hello_pb2 import HelloResponse


app = Mask(__name__)
app.config["REFLECTION"] = True


def before_request(request, context):
    print(request.name)


def after_request(response):
    print(response.message)


app.before_request(before_request)
app.after_request(after_request)


@app.route(method="SayHello", service="Hello")
def say_hello_handler(request, context):
    """ Handler SayHello request
    """
    return HelloResponse(message="Hello Reply: %s" % request.name)


if __name__ == "__main__":
    app.run(host="0.0.0.0", port=1020)CoffeePlease give me a cup of coffee, thank you!BTC: 1657DRJUyfMyz41pdJfpeoNpz23ghMLVM3ETH: 0xb098600a9a4572a4894dce31471c46f1f290b087LinksDocumentaion:https://mask.readthedocs.io/en/latestRelease:https://github.com/Eastwu5788/Mask/releasesCode:https://github.com/Eastwu5788/MaskIssue tracker:https://github.com/Eastwu5788/Mask/issuesTest status:https://coveralls.io/github/Eastwu5788/Mask
Package: maskcovid
maskcovidmaskcovid is a PyPI tool that predicts the number of people infected by day and up to one month from the date Japan began its liberal mask-wearing policy in the current Covid-19 epidemic.The goal of maskcovid is to determine if policies such as the liberalization of mask wearing are correct based on the increase or decrease in the number of infected people.Japan's policy of liberalizing the wearing of masks began on March 13, 2023.It is difficult to judge now (as of April 3, 2023) because only a little time has passed since the policy was initiated, but an increase in the number of infected people in the future could show that the policy was wrong.maskcovid scrapes the latest data from the following site over the Internet :https://covid19.mhlw.go.jp/public/opendata/newly_confirmed_cases_daily.csvHow to install maskcovid$ pip install maskcovidHow to run maskcovid$ maskcovidWritten by Izuru Inose-At the Takefuji Lab-
Package: masked-convolution
Masked ConvolutionA PyTorch implementation of a thin wrapper for masked convolutions.What are masked convolutions?Similarly topartial convolutions, masked convolutions mask a part of the kernel, essentially ignoring data at specific locations. For an example, considera=[1,2,3,4,5]assuming we have a convolution kernelkernel=[1,1,1]convolving overawould give usa_conv=[6,9,12]However, if we were to mask the convolution kernel with a maskmask=[1,0,1]masked convolvingoverawould returna_masked_conv=[4,6,8]One use of masked convolutions is emulating skip-grams.InstallationFirst, make sure you have PyTorch installed. This was tested onPython 3.8andPyTorch 1.7.1. Further testing is needed to determine whether it works on a different setup - chances are it does. The recommended way to install this is through PyPi by running:pipinstallmasked-convolutionOther than that, you can clone this repository, and in its root directory (wheresetup.pyis located) runpipinstall.BenchmarksEvery build, automatic benchmarks are run in order to determine how much overhead the implementation brings. The ordinary convolutions are used as a baseline, while the the performance of masked convolutions is described as a percentage of throughput of their respective baselines.Keep in mind that these benchmarks are in no way professional, they only serve to give users a general idea. Their results greatly differ, so they should be taken with a grain of salt.Masked Convolution 1D:85.29 %Convolution 1D throughputMasked Convolution 2D:85.64 %Convolution 2D throughputMasked Convolution 3D:97.79 %Convolution 3D throughput