Saravanan666/pypi-org huggingface dataset:
Package: bails-lambda-utils
Bails Lambda UtilsFor making lambda's easierpip install bails-lambda-utilsUsageDecoratorsThe libarary provides a decoratorlambda_handlerwhich should be attached to the any handler recieiving API calls.
The decorator will automatically map exceptions to appriorate response types:ExceptionResponsepynamodb.exceptions.DoesNotExist404 - Not Foundbails_lambda_utils.errors.PermissionError403 - Forbiddenbails_lambda_utils.errors.RequiredParamException400 - Specifying which param is missingException500 - With reference to aws_request_idExample:from bails_lambda_utils.handler import lambda_handler
from bails_lambda_utils.responses import Response

@lambda_handler
def get(event, context={}):
    #... some logic
    return Response(status_code=200, message="ok").to_dict()Responses + EncodersDocs coming soonMisc UtilsDocs coming soon
Package: baimomcsm-api
BaimoMCSManager API forPython这是一个适用于Python语言的第三方库，让你在Python中更方便地调用MCSM-API管理你的服务器。⚠️注意这个项目仍在开发中，仅支持部分功能。当前进展：面板通用设置 (common.py)应用实例管理 (applications.py)多用户管理 (auth.py)实例文件管理 (files.py)计划任务管理 (plans.py)守护进程管理 (remote_service.py)🔧安装使用pip安装最新版本:pipinstallbaimomcsm_api从旧版本更新到最新版本:pipinstallbaimomcsm_api--upgrade📖使用方法特别注意：导入库时必须使用from baimomcsm_api import *！GitBook文档帮助改进该文档
Package: bai-stats
bai_statsbai_stats is a Python library for statistical analysis.InstallationUse the package managerpipto install bai_stats.pipinstallbai_statsUsageimportbai_statsimportscipy.statsasstatsdata=stats.norm.rvs(size=100)best_fit_distribution_table=bai_stats.best_fit_distributions(data,max_shape_par=0,plot_dist=True)# returns best_fit_distribution_tableContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: bait
BAIT_IterativeBaer picking system.AUTHOR:Matteo Bagagli @ ETH-ZurichVERSION:2.5.9DATE:04/2022The BaIt picking system is a software created around the already famous and widely used Baer-Kradolfer picker (Baer 1987). The proposed seismic picker push forward the already great performance of the Baer-Kradolfer algorithm by adding an iterative picking procedure over the given seismic trace.It relies on standard libraries like numpy, matplotlib and ObsPy. For the installation, see further.InstallationThe file./data/bait_condaenv.ylmcontains all the encessary dependencies to install and run the framework. The lines to be typed in the terminal are$condacreate-nbaitpython=3.6
$condaactivatebait
$pipinstall.
$pytest# to check everything is cool :)Prior of the run of the subsequent code, the user must have installedcondaorminiconda(HOW-TO).ReferencesBaer, M., and U. Kradolfer. "An automatic phase picker for local and teleseismic events." Bulletin of the Seismological Society of America 77.4 (1987): 1437-1445.Funny QuotesAlways code as if the guy who ends up maintaining your code will be a violent psycopath who knows where you live (Jhon Woods)
Package: baiToVoice
baiToVoice Package基于百度语音合成开发的，可以更加简单的使用百度语音合成的，生成你需要的语音mp3文件或者二进制数据功能官网的有限制文本转换的最大值为1024字节，baiToVoice的功能主要是完成了大文本的分割以及合并，所以不用担心文本的大小，使用即可，另外也数据的方式有两种呈现，第一种是保存MP3文件的到本地，另一种就是返回的是二进制数据，可以供网络直接传输使用。还有这里默认提供了作者的appId,appKey及secretKey给那些非开发人员使用的，不用去申请一个开发账号之类的繁琐步骤，快速体验一下百度语音合成的魅力。使用1.安装pip install baiToVoice2.文本转MP3语音文件from baiToVoice import BaiVoice
import os
# 这里使用的是作者自己的appId,appKey及secretKey，建议正式开发不要使用默认的，请调用
# BaiVoice(appId, appKey,secretKey)
bai_voice = BaiVoice()
# 保存MP3文件
bai_voice.translate_output_mp3_file('''
风雨
唐代：李商隐
凄凉宝剑篇，羁泊欲穷年。
黄叶仍风雨，青楼自管弦。
新知遭薄俗，旧好隔良缘。
心断新丰酒，销愁斗几千。
''','fengyu.mp3')
os.system('fengyu.mp3')3.文本返回音频二进制数据# text是文本内容
bai_voice.translate_to_content_bytes(text)4.修改合成语音的声音风格bai_voice.change_voice_style(可选参数):
spd:设置语速，取值范围是0-9。
pit: 设置语调，取值范围是0-9。
vol:设置音量，取值范围是0-15。
per:发音人选择, 0为女声，1为男声，3为情感合成-度逍遥，4为情感合成-度丫丫。5.项目地址baiToVoice
Package: baize
BáiZéPowerful and exquisite WSGI/ASGI framework/toolkit.The minimize implementation of methods required in the Web framework. No redundant implementation means that you can freely customize functions without considering the conflict with baize's own implementation.Under the ASGI/WSGI protocol, the interface of the request object and the response object is almost the same, only need to add or deleteawaitin the appropriate place. In addition, it should be noted that ASGI supports WebSocket but WSGI does not.Type annotations as strict as possible (almost no Any)Support range file response, server-sent event responseSupport WebSocket (only ASGI)WSGI, ASGI routing to combine any application likeDjango(wsgi)/Kuí(wsgi)/Pyramid/Bottle/FlaskorDjango(asgi)/Kuí(asgi)/Starlette/FastAPI/Sanic/QuartInstallpip install -U baizeDocument and other websiteBáiZé DocumentIf you have questions or idea, you can send it toDiscussions.Quick StartA short example for WSGI application, if you don't know what is WSGI, please readPEP3333.importtimefromtypingimportCallablefrombaize.wsgiimport(middleware,request_response,Router,Request,Response,PlainTextResponse,)@middlewaredeftimer(request:Request,next_call:Callable[[Request],Response])->Response:start_time=time.time()response=next_call(request)end_time=time.time()response.headers["x-time"]=str(round((end_time-start_time)*1000))returnresponse@request_response@timerdefsayhi(request:Request)->Response:returnPlainTextResponse("hi, "+request.path_params["name"])@request_response@timerdefecho(request:Request)->Response:returnPlainTextResponse(request.body)application=Router(("/",PlainTextResponse("homepage")),("/echo",echo),("/sayhi/{name}",sayhi),)if__name__=="__main__":importuvicornuvicorn.run(application,interface="wsgi",port=8000)A short example for ASGI application, if you don't know what is ASGI, please readASGI Documention.importtimefromtypingimportAwaitable,Callablefrombaize.asgiimport(middleware,request_response,Router,Request,Response,PlainTextResponse,)@middlewareasyncdeftimer(request:Request,next_call:Callable[[Request],Awaitable[Response]])->Response:start_time=time.time()response=awaitnext_call(request)end_time=time.time()response.headers["x-time"]=str(round((end_time-start_time)*1000))returnresponse@request_response@timerasyncdefsayhi(request:Request)->Response:returnPlainTextResponse("hi, "+request.path_params["name"])@request_response@timerasyncdefecho(request:Request)->Response:returnPlainTextResponse(awaitrequest.body)application=Router(("/",PlainTextResponse("homepage")),("/echo",echo),("/sayhi/{name}",sayhi),)if__name__=="__main__":importuvicornuvicorn.run(application,interface="asgi3",port=8000)LicenseApache-2.0.
Package: bajes
bajes[baɪɛs] is a Python software for Bayesian inference developed at Friedrich-Schiller-Universtät Jena
and specialized in the analysis of gravitational-wave and multi-messenger transients.
The software is designed to be state-of-art, simple-to-use and light-weighted
with minimal dependencies on external libraries.Installationbajesis compatible with Python v3.7 (or higher)
and it is built on modules that can be easily installed viapip.
The mandatory dependencies arenumpy,scipyandastropy.
However, the user might need to download some further packages.
SeeINSTALLfor more information.Modulesbajesprovides an homonymous Python module that includes:bajes.inf: implementation of the statistical objects and Bayesian workflow,bajes.obs: tools and methods for data analysis of multi-messenger signals.
For more details, visitgw_tutorial.InferenceThebajespackage  provides a user-friendly interface capable to easily set up a
Bayesian analysis for an arbitrary model. Providing a prior file and a likelihood function, the commandpython -m bajes -p prior.ini -l like.py -o /path/to/outdir/will run a parameter estimation job, inferring the properties of the input model.
For more details, visitinf_tutorialor typepython -m bajes --help.PipelineThebajesinfrastructure allows the user to set up a pipeline for parameters
estimation of multi-messenger transients.
This can be easily done writing a configuration file,
that contains the information to be passed to the executables.
Subsequently,  the following command,bajes_pipe.py config.iniwill generates the requested output directory, if it does not exists, and
the pipeline will be written into a bash executable (/path/to/outdir/jobname.sub).
For more details, visitconifg_example.The pipeline incorporates an interface with reduced-order-quadratude (ROQ) interpolants.
In particular, the ROQ pipeline relies on the output provided byPyROQ-refactored.Creditsbajesis developed at the Friedrich-Schiller-Universität Jena,
visitCREDITSfor more details.If you findbajesuseful in your research, please include the followingcitationin your publication,@article{Bajes:2021,
         author = "Breschi, Matteo and Gamba, Rossella and Bernuzzi, Sebastiano",
         title = "{Bayesian inference of multimessenger astrophysical data: Methods and applications to gravitational waves}",
         eprint = "2102.00017",
         archivePrefix = "arXiv",
         primaryClass = "gr-qc",
         doi = "10.1103/PhysRevD.104.042001",
         journal = "Phys. Rev. D",
         volume = "104",
         number = "4",
         pages = "042001",
         year = "2021"
        }Acknowledgementbajeshas benefited from open source libraries, including the samplers,cpnestdynestyemceeultranestand the gravitational-wave analysis packages,bilbygwbinninglalsuitepycbcWe also acknowledge the LIGO-Virgo-KAGRA Collaboration for maitaining theGWOSC archive.
Package: bajson
bajsonlibrary for converting to/from jsonUsageJSON to CSVthe root of the input json should be in list formatInvalid"data":[{"data":"value","data1":"value1"},{"data":"value2","data1":"value3"},]Valid[{"data":"value","data1":"value1"},{"data":"value2","data1":"value3"},]Converting nested json objects[{"data":{"firstkey":"firstvalue","secondvalue":"secondvalue",},"data1":"value1"},{"data":{"firstkey":"firstvalue1","secondvalue":"secondvalue1",},"data1":"value2"},]data.firstkeydata.secondkeydata1firstvaluesecondvaluevalue1firstvalue1secondvalue1value2Converting arrays in json objects[{"data":["firstvalue","secondvalue",],"data1":"value1"},{"data":["firstvalue1",],"data1":"value2"},]data.0data.1data1firstvaluesecondvaluevalue1firstvalue1value2Code Examplefrombajson.libcsvimportjson_to_csvjson_to_csv("input.json","output.csv")CSV to JSONbajson can conver csv file to json format vice versa. Formats above are valid for this operation too. However there is one exception about array conversion,If csv headers are as followsdata.0data.1data1firstvaluesecondvaluevalue1firstvalue1value2This will be converted to object form instead of array form[{"data":{"0":"firstvalue","1":"secondvalue",},"data1":"value1"},{"data":{"0":"firstvalue1",},"data1":"value2"},]Code Examplefrombajson.libcsvimportcsv_to_jsoncsv_to_json("input.csv","output.json")Future featuresSupport string input/output parametersJSON <==> XML
Package: bak
bakusage: bak [-h] [-a APPEND] [-d] [-f] [-u] Source

Backup a file or directory, defaults to same path with suffix .bak

positional arguments:
  Source                file to backup

optional arguments:
  -h, --help            show this help message and exit
  -a APPEND, --append APPEND
                        characters to append to source file instead of .bak
  -d, --date            add the date .YYYYMMDD to the end of the file
  -f, --force           overwrite backup if exists
  -u, --unbak           Unbak a file to its original location, force overwrite
                        (if your filesystem supports extended file attributes)unbakusage: unbak [-h] Source

Restore a file created by bak, this is the same as bak -u

positional arguments:
  Source      bak file to restore

optional arguments:
  -h, --help  show this help message and exitInstallInstall using piphttps://pypi.org/project/bak/# See if pip is install
python3 -m pip --version
# Try and install it
python3 -m ensurepip --default-pip
# Install bak
python3 -m pip install bakunbak, bak -ubak -u allows you to restore a file backed up using bak.By default bak creates metadata on the .bak filehttps://en.wikipedia.org/wiki/Extended_file_attributesbak would then try to restore to the path stored in the metadata, if the metadata is removed, this wont work.NotesIt is really easy to lose the metadata, and you need to take active measures to preserve metadata if moving/copying the backup file.http://www.lesbonscomptes.com/pages/extattrs.htmlmv preserves xattrs
cp will only preserve xattrs if given the option --preserve=xattr
rsync 3.0.9 with option -X or --xattrs will preserve attributesIf copying to a filesystem that does not support metadata (tmpfs for example) metadata will be lost
Package: baka-armor
baka_armor for baka framework or pyramid------------------------------------------Management assets and templates for baka framework and Pyramid using`webassets <http://webassets.readthedocs.org>`_.Basic usage```````````.. code:: yamlpackage: {your_root_package_or_egg}armor:config: configs # config folderassets: assets # assets folderbundles: assets.yaml # filename assets configurl: staticdebug: Falsemanifest: filecache: Falseauto_build: Truein assets.yaml.. code::css-vendor:filters: scss,cssmindepends: '**/*.scss'output: {your_root_package_or_egg}:public/vendor.%(version)s.csscontents: styles/app.scssjs-vendor:config:UGLIFYJS_BIN: ./node_modules/.bin/uglifyjsfilters: uglifyjsoutput: {your_root_package_or_egg}:public/vendor.%(version)s.jscontents:- javascripts/pace.js- javascripts/moment-with-locales.js- javascripts/jquery.js- javascripts/handlebars.js- javascripts/handlers-jquery.js- javascripts/cookies.js- javascripts/lodash.js- javascripts/materialize.jssetup to config```````````````in python code.. code:: pythonconfig.include('baka-armor')in development.ini.. code::pyramid.includes =pyramid_debugtoolbarbaka_armorUsage in mako template```````````````````````.. code::% for url in request.web_env['js-vendor'].urls():<script src="${request.static_url(url)}" />% endfor.. code:: pythonjs = Bundle('js/main.js', filters='uglifyjs', output='bundle.js',depends='js/**/*.js')
Package: baka-assets
baka_assets for baka framework or pyramid------------------------------------------Management assets for baka framework and Pyramid using`webassets <http://webassets.readthedocs.org>`_.Basic usage```````````.. code:: pythonbaka_assets.config = {your_root_package_or_egg}:configsbaka_assets.assets = {your_root_package_or_egg}:assetsbaka_assets.bundles = assets.yamlbaka_assets.url = staticbaka_assets.debug = Falsebaka_assets.manifest = filebaka_assets.cache = Falsebaka_assets.auto_build = Truein assets.yaml.. code::css-vendor:filters: scss,cssmindepends: '**/*.scss'output: {your_root_package_or_egg}:public/vendor.%(version)s.csscontents: styles/app.scssjs-vendor:config:UGLIFYJS_BIN: ./node_modules/.bin/uglifyjsfilters: uglifyjsoutput: {your_root_package_or_egg}:public/vendor.%(version)s.jscontents:- javascripts/pace.js- javascripts/moment-with-locales.js- javascripts/jquery.js- javascripts/handlebars.js- javascripts/handlers-jquery.js- javascripts/cookies.js- javascripts/lodash.js- javascripts/materialize.jssetup to config```````````````in python code.. code:: pythonconfig.include('baka_assets')in development.ini.. code::pyramid.includes =pyramid_debugtoolbarbaka_assetsUsage in mako template```````````````````````.. code::% for url in request.web_env['js-vendor'].urls():<script src="${request.static_url(url)}" />% endfor.. code:: pythonjs = Bundle('js/main.js', filters='uglifyjs', output='bundle.js',depends='js/**/*.js')
Package: bakabakabaka
baka admin konfiguration assistantThis is mostly just a wrapper for some git and rsync commands I made to help with managing my home serverIf you're looking for something similar but not stupid, seeetckeeperor otheralternativesOtherwise, you can install fromPyPIwithpip install bakabakabakausage: baka [--dry-run] <argument>

the stupid configuration tracker using the stupid content tracker

optional arguments:
  -h, --help     show this help message and exit
  --version      show program's version number and exit
  --init         open config, init git repo, add files then commit
  --commit msg   git add and commit your changes to tracked files
  --push         git push (caution, ensure remote is private)
  --untrack ...  untrack path(s) from git
  --install ...  install package(s) and commit changes
  --remove ...   remove package(s) and commit changes
  --upgrade      upgrade packages on system and commit changes
  --docker ...   usage: --docker <up|down|pull> <all|names...>
  --job name     run commands for job with name
  --list         show list of jobs
  --sysck        run commands for system checks and commit output
  --scan         run commands for scanning system, prints and commits output
  --diff         show git diff --color-words
  --log          show pretty git log
  --show         show most recent commit
  -i             force job to run in interactive mode
  -n, --dry-run  print commands instead of executing them
Package: baka-i18n
baka_i18n for baka framework or pyramid------------------------------------------Management locale 118n for baka framework and PyramidBasic usage```````````.. code:: yamlpackage: {your_root_package_or_egg}armor:config: configs # config folderassets: assets # assets folderbundles: assets.yaml # filename assets configurl: staticdebug: Falsemanifest: filecache: Falseauto_build: Truein assets.yaml.. code::css-vendor:filters: scss,cssmindepends: '**/*.scss'output: {your_root_package_or_egg}:public/vendor.%(version)s.csscontents: styles/app.scssjs-vendor:config:UGLIFYJS_BIN: ./node_modules/.bin/uglifyjsfilters: uglifyjsoutput: {your_root_package_or_egg}:public/vendor.%(version)s.jscontents:- javascripts/pace.js- javascripts/moment-with-locales.js- javascripts/jquery.js- javascripts/handlebars.js- javascripts/handlers-jquery.js- javascripts/cookies.js- javascripts/lodash.js- javascripts/materialize.jssetup to config```````````````in python code.. code:: pythonconfig.include('baka_armor')in development.ini.. code::pyramid.includes =pyramid_debugtoolbarbaka_armorUsage in mako template```````````````````````.. code::% for url in request.web_env['js-vendor'].urls():<script src="${request.static_url(url)}" />% endfor.. code:: pythonjs = Bundle('js/main.js', filters='uglifyjs', output='bundle.js',depends='js/**/*.js')
Package: bakalari-token
Token generator for Bakalari APIJednoduchý Python script pro vygenerování tokenu pro Bakaláři API.Doporučuji:xmlcurlNávodSkript vyžaduje tři argumenty - adresu serveru Bakalářů, uživatelské jméno, heslo.Pokud použijete argument-k/--keep-url, adresa by měla vypadat zhruba takto:https://subdomena.skola.cz/bakalari/login.aspxTedy včetně protokolu (https://) a/login.aspx, ale bez/next/(pokud vaše škola
používá tuto verzi rozhraní) a bez query stringu (?neco=neco...).Pokud-kpoužijete, skript se pokusí adresu upravit. Nejkratší formát, který
vygeneruje stejnou adresu jako výše, jesubdomena.skola.cz/bakalari.Vygenerovaný token je platný vždy pouze k danému datuPython 2Not supported anymore, if you're really thatboomer, checkout commitc555ec1.Python 3Z příkazového řádkupoužití: bakalari_token.py [-h] [-k] url username [pwd]

poziční argumenty:
  url             URL Bakalářů (např. subdomena.skola.cz/bakalari)
  username        Uživatelské jméno
  pwd             Heslo (volitelné, pokud nezadáno, bude vyžádáno schovaným vstupem)

volitelné argumenty:
  -h, --help      Zobrazí tuto nápovědu a ukončí program
  -k, --keep-url  Nepokoušet se upravit URL. URL by tedy už mělo být něco jako https://subdomena.skola.cz/bakalari/login.aspxPoužití skriptu přímogitclonehttps://github.com/bakalari-api/python-token-generator.gitcdpython-token-generator
./bakalari_token.py<argumenty>Instalacepython3-mpipinstallbakalari-token
bakalari-token<argumenty>Použití jako modulimportbakalari_tokenifnotis_full_url:url=bakalari_token.process_url(url)token=bakalari_token.generate_token(url,"jannovak","honzovosilnyheslo")
Package: baka_logger
Baka Loggerbaka_loggerturns your boring log messages into fun interactions with anime characters.frombaka_loggerimportlogger_setuplogger_setup()1/0Hmph, what a useless error. I can't believe someone as great as me has to deal with such trivial matters.
Apparently, some fool tried to divide by zero, causing this <class 'ZeroDivisionError'>. Can't they see
that's impossible? I mean, the traceback says it all. It happened in '/home/qferbs/code/baka_logger/example.py',
line 5. How shameful. Next time, they should think before they try something so stupid.It also integrates with Python's standardlogginglibrary:frombaka_loggerimportlogger_setupimportlogginglogger_setup(character="Asuka",fmt="%(asctime)s-%(levelname)s-%(message)s",file="log.out",logger=True)logging.warning("The program has crashed")2023-03-12 21:06:40,841 - INFO - Ugh, finally that baka logger is up and running. At least it won't be
as useless as Shinji.
2023-03-12 21:06:47,172 - WARNING - Ugh, what did you do now? Did you break it again? I swear, it's like
you have no idea what you're doing! This program has totally crashed, just like your love life. Get it
together, or else you'll be as useful as Rei on a bad day.# log.out
2023-03-12 21:06:40,841 - INFO - Ugh, finally that baka logger is up and running. At least it won't be
as useless as Shinji.
2023-03-12 21:06:47,172 - WARNING - Ugh, what did you do now? Did you break it again? I swear, it's like
you have no idea what you're doing! This program has totally crashed, just like your love life. Get it
together, or else you'll be as useful as Rei on a bad day.You can even override the defaultprint()statement to give you much more descriptive outputs:frombaka_loggerimportlogger_setup,printlogger_setup(character="Bocchi the Rock having a breakdown")print("baka_logger is my favorite Python package!")*Uncontrollable sobbing* Ahh! Why can't I be everyone's favorite Python package? *sniffles* It's not fair,
Bocchi the Rock just can't compete with baka_logger. *more crying* Why do I even try? *sobs*InstallationInstallation is as simple as:pip install baka_loggerbaka_loggerrequires an OpenAI API key to function. Seehttps://openai.com/blog/openai-apiif you don't have one.
By default the API key be will read out of a.envfile  like so:# .env
OPENAI_API_KEY=<your-api-key>You can also assign the key yourself by setting:importopenaiopenai.api_key="<your-api-key>"before callingbaka_logger.logger_setup().
Package: baka_model
Baka model add-ons==================`Baka_model <https://github.com/suryakencana/baka_model>`_. is add-ons baka framework built top of pyramid that provides an SQLAlchemydeclarative ``Base`` alias model.Model and a add method on ``request.db``.Usage-----You can use these as base classes for declarative model definitions, e.g... code:: pythonfrom base_model.model import Modelclass MyModel(Model):"""Example model class."""__tablename__ = 'base.mymodel'@classmethoddef do_first(cls, session):instance = session.query(cls).first()Register Model--------------using baka_model, you can apply dependency injection method for model that has been created... code:: pythondef includeme(config):config.register_model('base.MyModel')# in view handler request@route('/my.model', renderer='json')def view_mymodel(request):MyModel = request.find_model('base.mymodel')mymodel = MyModel()mymodel.name = 'user model'mymodel.address = 'user address'mymodel.phone = '0089800-998'request.db.add(mymodel)return {'success': True}Install-------Install with ``.ini`` file.. code:: bashpyramid.includes =baka_modelpyramid_debugtoolbarpyramid_mailerInstall with code.. code:: pythondef includeme(config):config.include('baka_model')