Saravanan666/pypi-org huggingface dataset:
Package: baymax
Baymax, a simple telegram bot framework on top of Python asyncioWork in progressRequirementsPython 3.7 or higherInstallationpipinstallbaymaxBasic usage examplefrombaymax.botimportBotbot=Bot('token')@bot.on('/start')asyncdefstart_handler(message):awaitbot.reply(message,'Welcome!')bot.run()Middleware example@bot.middlewareasyncdefmessage_logging_middleware(raw_update):bot.logger.info('New update received:%s',raw_update['update_id'])NOTE: All middleware functions should be coroutines for now, even if
they do not have asynchronous actions.Reply keyboard markup examplefrombaymax.markupsimportKeyboardButton,ReplyKeyboardMarkup@bot.on('/rate')asyncdefrate_handler(message):awaitbot.reply(message,'Rate me',reply_markup=ReplyKeyboardMarkup([[KeyboardButton('⭐️'),KeyboardButton('⭐️⭐️'),KeyboardButton('⭐️⭐️⭐️')]],resize_keyboard=True,one_time_keyboard=True))NOTE: Reply markup API / objects will be changing, they are far from
good now.Running testsgitclonegit@github.com:dmrz/baymax.gitpipinstall-e.pipinstall-rrequirements-test.txtpytest
Package: bayne
Bayne - Bayesian Neural NetworksPytorch/Pyro-based Bayesian Neural Networks libraryFeatures:Markov Chain Monte Carlo (MCMC)Fully connected neural network with ReLU, Sigmoid, or Tanh activationConfigurable prior & likelihoodHamiltonian Monte Carlo or NUTS samplerAuthors:Frederik Baymler Mathiesen, PhD student @ TU Delft, Netherlands
Package: bayonetpython
####  Bayonet for Python***A Python SDK for integrating with the Bayonet API v1. Compatible with Python 2.7.#### Installation___Install via `pip`:````pip install bayonet````After installation, to get started, open a Python console:````from bayonet import BayonetClientclient = BayonetClient()client.set_api_key([uuid-key])````#### Obtaining an access token___All requests need to be made with an APIKEY. This key will be provided by Bayonet's team.#### Example___#### Test___
Package: bayoo-docx
Bayoo-docxPython library forked frompython-docx.The main purpose of the fork was to add implementation for comments and footnotes to the libraryInstallationUse the package managerpipto install bayoo-docx.pip install bayoo-docxUsageimport docx

document = docx.Document()

paragraph1 = document.add_paragraph('text') # create new paragraph

comment = paragraph.add_comment('comment',author='Obay Daba',initials= 'od') # add a comment on the entire paragraph

paragraph2 = document.add_paragraph('text') # create another paragraph

run = paragraph2.add_run('texty') add a run to the paragraph

run.add_comment('comment') # add a comment only for the run text

paragraph.add_footnote('footnote text') # add a footnoteLicenseMIT#Release History BayooG/bayoo-docx forked from (python-openxmm/python-docx)0.2.8 (2020-05-02)add comments implementation on a run levelfix issue with comments date (comments dates are set to current date)0.2.4 (2019-9-4)loop over all the document chieldern (Paragraphs, Tables, Sections) with the right orderdocument.elementsaddons to Paragraph Object (delete, heading_level, merge_paragraph )Add low-level implementation for comments partAdd oxml element for <w:comments> element and sub-elementsAdd add_comment() method for docx.text.ParagraphAdd low-level implementation for footnotes partAdd oxml element for <w:footnotes> element and sub-elementsAdd add_footnote() method for docx.text.Paragraph
Package: baypy
Bayesian Monte Carlo Markov Chain Regressionbaypyis a python package for solving bayesian regression models
through a Monte Carlo Markov chain sampling.ReferencesSource codeIssue trackerDocumentationInstallationUsage ExamplesPyPIGNU General Public License v3.0ContributingThe baypy project welcomes your expertise and enthusiasm!All contributions, bug reports, bug fixes, documentation improvements,
enhancements and ideas are welcome.Writing code isn't the only way to contribute to baypy. You can also:develop tutorials, presentations and other educational materialsmaintain and improve the documentationhelp with outreach and onboard new contributorsHave a look at thecontributing guide
Package: baysalt-christmas
This Package is a collection of Christmas related packages.Authors : ChristmasMaintainer : ChristmasTo install this package, run:pip install baysalt_christmasorpip3 install baysalt_christmasPackagesbaysalt_christmascommonCode.pyddt = converToTime(str)fromchristmas.commonCodeimportconvertToTimeddt=convertToTime('20230330')ddt=convertToTime('2023033001')ddt=convertToTime('202303300101')ddt=convertToTime('20230330010101')ddt=convertToTime('2022-11-09_01:00:00')filename = new_filename(_pre,lon, _lat, _lat, _date, _res)fromchristmas.commonCodeimportnew_filenameimportnumpyasnp_lon=np.linspace(100,120)_lat=np.linspace(10,20)filename=new_filename('wave',_lon,_lat,_date,10)date = get_date()fromchristmas.commonCodeimportget_datedate=get_date()make_dir(path)fromchristmas.commonCodeimportmake_dirmake_dir('/home/ocean/zcy/1/2/3/4')class: FTPUploadTracker (deprecated)path = split_path(_path)fromchristmas.commonCodeimportsplit_pathpath=split_path('/home/ocean/zcy/1/2/3/4/')osprint(_str)fromchristmas.commonCodeimportosprintx='123'osprint(f'{x}SSS')osprints(_str)fromchristmas.commonCodeimportosprintsx='123'osprints('INFO',f'{x}SSS')timer(func)processBar.pyclass: SftpProcessbarfromchristmas.processBarimportSftpProcessbarimportparamikossh=paramiko.SSHClient()ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())ssh.connect(hostname='47.105.220.136',port=22,username='wave',password='wave',timeout=100)sftp=paramiko.SFTPClient.from_transport(ssh.get_transport())sftp_obj=SftpProcessbar()Sprocess_bar=sftp_obj.process_barsftp.put('/home/ocean/x.zip','x.zip',callback=Sprocess_bar)translate_byte(B)class: FtpProcessBarfromchristmas.processBarimportFtpProcessbarimportos,ftplibbuf_size=1024ftp=ftplib.FTP()ftp.encoding='utf-8'ftp.set_debuglevel(0)ftp.connect(host='47.105.220.136',port=22)ftp.login('wave','wave')Ftp_obj=FtpProcessbar(os.path.getsize('/home/ocean/x.zip'))Fprocess_bar=Ftp_obj.process_bar()withopen('/home/ocean/x.zip','rb')asfp:ftp.storbinary(f'STOR x.zip',fp,buf_size,Fprocess_bar)read_conf.pyConf = read_conf(_conf_file, ele=None)fromchristmas.read_confimportread_confConf=read_conf('Post_fvcom.conf')key, value = char_fill_dic(_key,_str)TF = is_number(_str)fromchristmas.read_confimportis_numberTF=is_number('12')TF=is_number('-12')TF=is_number('1e10')TF=is_number('.5')flattened_lst = flatten_list(_lst, flattened_lst)S_dateTime.pyNearby_date = build_date(_date)fromchristmas.S_DateTimeimportbuild_dateNearby_date=build_date('20230324')server_info.pypid = grep_from_top(_exe)fromchristmas.server_infoimportgrep_from_toppid=grep_from_top('python3 forecast.py')mpi_num = grep_from_top_mpi(_exe)fromchristmas.server_infoimportgrep_from_top_mpipid=grep_from_top_mpi('wrf.exe')cpu_num, free_cpu_num = get_free_core()fromchristmas.server_infoimportget_free_corecpu_num,free_cpu_num=get_free_core()user, hostname, ip = get_server_info()fromchristmas.server_infoimportget_serve_infouser,hostname,ip=get_serve_info()mncPyclass: MncPyfromchristmas.mncPy.compressimportmnc_Pymnc=mnc_Py('/home/ocean/wave_without_compress.nc',o_path=True,d_rm=True)mnc.compress_files()
Package: bayscrape
bayscrapebayscrape is a simple CLI-based application that allows you to safely browse legal torrents from the comfort of your command-line. Just typebayscrapeinto the command line and go.InstallationpipinstallbayscrapeUsage>bayscrapeThis will begin the bayscrape user interface.The interface is simple and popup free.Read into torrent descriptions and also user comments.Choosingdownloadwill open the default torrent application via the magnet link.ContributingI could use some guidance if you'd like to contribute. I'm new at this. Thank you in advanced.Thank youBeautifulSoupBeautifulTableLicenseGNU GPL3.0
Package: baysparpy
An Open Source Python package for TEX86 calibration.This package is based on the original BAYSPAR (BAYesian SPAtially-varying Regression) for MATLAB (https://github.com/jesstierney/BAYSPAR).Quick exampleFirst, load key packages and an example dataset:importnumpyasnpimportbaysparasbsrexample_file=bsr.get_example_data('castaneda2010.csv')d=np.genfromtxt(example_file,delimiter=',',names=True)This dataset (fromCastañeda et al. 2010)
has two columns giving sediment age (calendar years BP) and TEX86.We can make a “standard” prediction of sea-surface temperature (SST) withpredict_seatemp():prediction=bsr.predict_seatemp(d['tex86'],lon=34.0733,lat=31.6517,prior_std=6,temptype='sst')To see actual numbers from the prediction, directly parseprediction.ensembleor useprediction.percentile()to get the 5%, 50% and 95% percentiles.You can also plot your prediction withbsr.predictplot()orbsr.densityplot().For further details, examples, and additional prediction functions, see the online documentation (https://baysparpy.readthedocs.io).InstallationTo installbaysparpywith pip, run:$pipinstallgit+git://github.com/brews/baysparpy.git@stableUnfortunately,baysparpyis not compatible with Python 2.Support and developmentDocumentation is available online (https://baysparpy.readthedocs.io).Please feel free to report bugs and issues or view the source code on GitHub (https://github.com/brews/baysparpy).Licensebaysparpyis available under the Open Source GPLv3 (https://www.gnu.org/licenses).
Package: baysplinepy
An open source Python package foralkenone UK’37calibration.baysplinepyis based on the original BAYSPLINE software for MATLAB (https://github.com/jesstierney/BAYSPLINE). BAYSPLINE is a Bayesian calibration for the alkenone paleothermometer, as published inTierney & Tingley (2018).NOTE that this package is under active development. Code and documentation may not be complete and may change in the near future.ExampleFirst, load packages and an example dataset:import numpy as np
import bayspline as bsl

example_file = bsl.get_example_data('tierney2016-p178-15p.csv')
d = np.genfromtxt(example_file, delimiter=',', names=True)This dataset (fromTierney et al. 2015)
has three columns giving core depth (cm), sediment age (calendar years BP), and UK’37.We can predict sea-surface temperatures (SST) from UK’37 withbsl.predict_sst():prediction = bsl.predict_sst(d['uk37'], prior_std=10)To see actual numbers from the prediction, directly parseprediction.ensembleor useprediction.percentile()to get the 5%, 50% and 95% percentiles.You can also plot your prediction withbsl.predictplot()orbsl.densityplot().Alternatively, we can make inferences about UK’37 from SST withbsl.predict_uk():sst = np.arange(1, 25)
prediction = bsl.predict_uk(sst)InstallationInstallbaysplinepyincondawith:$ conda install baysplinepy -c sbmalevTo install withpip, run:$ pip install baysplinepyUnfortunately,baysplinepyis not compatible with Python 2.Support and developmentPlease feel free to report bugs and issues or view the source code on GitHub (https://github.com/brews/baysplinepy).Licensebaysplinepyis available under the Open Source GPLv3 (https://www.gnu.org/licenses).
Package: bayte
OverviewThis package is a lightweight implementation of bayesian target encoding. This implementation is taken
fromSlakey et al., with ensemble methodology fromLarionov.The encoding proceeds as follows:User observes and chooses a likelihood for the target variable (e.g. Bernoulli for a binary classification problem),UsingFink's Compendium of Priors, derive the conjugate prior for the likelihood (e.g. Beta),Use the training data to initialize the hyperparameters for the prior distributionNOTE: This process is generally reliant on common interpretations of hyperparameters.Using Fink's Compendium, derive the methodology for generating the posterior distribution,For each level in the categorical variable,Generate the posterior distribution using the observed target values for the categorical level,Set the encoding value to a sample from the posterior distributionIf a new level has appeared in the dataset, the encoding will be sampled from the prior distribution.
To disable this behaviour, initialize the encoder withhandle_unknown="error".Then, we repeat step 5.2 a total ofn_estimatorstimes, generating a total ofn_estimatorstraining datasets
with unique encodings. The end model is a vote from each sampled dataset.For reproducibility, you can set the encoding value to the mean of the posterior distribution instead.InstallationInstall from PyPI:python-mpipinstallbayteUsageEncodingLet's create a binary classification dataset.importnumpyasnpimportpandasaspdfromsklearn.datasetsimportmake_classificationX,y=make_classification(n_samples=1000,n_features=5,n_informative=2)X=pd.DataFrame(X)# Categorical dataX[5]=np.random.choice(["red","green","blue"],size=1000)Import and fit the encoder:importbayteasbtencoder=bt.BayesianTargetEncoder(dist="bernoulli")encoder.fit(X[[5]],y)To encode your categorical data,X[5]=encoder.transform(X[[5]])EnsembleIf you want to utilize the ensemble methodology described above, construct the same datasetimportnumpyasnpimportpandasaspdfromsklearn.datasetsimportmake_classificationX,y=make_classification(n_samples=1000,n_features=5,n_informative=2)X=pd.DataFrame(X)# Categorical dataX[5]=np.random.choice(["red","green","blue"],size=1000)and import a classifier to supply to the ensemble classfromsklearn.svmimportSVCimportbayteasbtensemble=bt.BayesianTargetClassifier(base_estimator=SVC(kernel="linear"),encoder=bt.BayesianTargetEncoder(dist="bernoulli"))Fit the ensemble.NOTE: either supply an explicit list of categorical features tocategorical_feature, or
use a DataFrame with categorical data types.ensemble.fit(X,y,categorical_feature=[5])When you callpredicton a novel dataset, note that the encoder will transform your data at runtime and it
will encode based on themean of the posterior distribution:ensemble.predict(X)
Package: baytorch
BayTorch - Bayesian layers in PyTorchBayesian layers are probabilistic layers where weights are stochastic and sampled from the posterior distribution
or an approximation.So far, this module includes diagonal Gaussian linear and convolutional layers with mean and standard deviation
of every weight as learnable parameters, as well as an implementation of the variational free energy loss for
stochastic gradient VI according to the Bayes-by-Backprop algorithm [1].[1] Blundell et al., Weight Uncertainty in Neural Networks, 2015.InstallationInstall from PyPIpip install baytorchor clone the repository, build and install from sourcegit clone https://jugit.fz-juelich.de/ias-8/baytorch.git && cd baytorch
python -m build
pip install dist/baytorch*whl
Package: bay-watch
baywatchbaywatchis a TUI for The Pirate Bay built usingTextual. It usespeerflixto stream torrents andTransmissionto download torrents.InstallOptionally install peerflix:npminstall-gpeerflixOptionally install Transmission:https://transmissionbt.com/download/Install baywatch via pip:pipinstallbay-watchDemoUsageLaunch baywatchbaywatchTo open the configuration editor:baywatch-cTo output the app log:baywatch-lout.logStreaming MediaBy defaultplayusesmpvto handle peerflix streams and open a file selection dialog when multiple files are present in the torrent. To change this, open the config editor usingbaywatch -cand changePlayandPlay Multifile.For instance, to set peerflix to use VLC and to play all files in a multifile torrent (e.g., like an album):Play:peerflix'{}'--vlcPlay Multifile:peerflix'{}'--vlc-aSeepeerflix documentationfor more details.TransmissionOndownload, baywatch attempts to connect to Transmission or transmission-daemon. baywatch will try to opentransmission-gtkif it is unable to find an running Transmission instance. This can be turned off or changed to another transmission interface by setting theCommand (Transmission)orTry Open (Transmission)configuration variables.Disclaimerbaywatch is made for educational purposes for downloading legal torrents.
Package: baz
BazA wrapper for bazel with a GUI for configuring arguments. Runningbaz -qopens a configuration gui where you can set persistent bazel settings by choosing from detected.bazelrcconfigs, and other bazel flags.Baz stores persistent information in~/.config/baz/. A unique config for each directory is generated and separate settings can be configured for multiple repositories. You can delete your configuration and start over at any time withbaz -d.Add baz to your path and use baz as you would use bazel.InstallationPypipython3 -m pip install baz --userIf you haven't already, make sure scripts from your user site are accesible from PATH.import site
site.USER_BASE # Prints something like `/home/username/.local/`Take this path, and add to your~/.bashrcas:export PATH='$PATH:/home/username/.local/bin/Usagebaz --helpusage: baz.py [-h] [-e] [-p] [-q] [-d]

optional arguments:
  -h, --help            show this help message and exit
  -e, --emit-build-script
                        Emit a shell script to containing the raw Bazel build command, rather than executing it. This is useful for exporting vanilla Bazel build commands to people who do not have baz.
  -p, --print-build-settings
                        Prints the build settings configured for Baz.
  -q, --configure       Run the Baz configuration TUI.
  -d, --delete-configuration
                        Permenently delete the persistent configuration file.TestingUnit tests can be run withnosetests.
Package: bazaarpy
bazaar.pyA Python Wrapper for the Hypixel Skyblock BazaarInstallationpip install bazaarpyUsageThis code will import the library, setup the Bazaar class and refresh the data from the API.from bazaarpy import bazaar as bz
baz = bz.Bazaar()
baz.updateValues()When querying an item, you must use its Product ID or similar name, as defined in items.jsonAvailable Functions:updateValues() Fetches new data from the Hypixel API. Do not spam this function or Hypixel may blacklist your IP address.buyOrders(item) Gets the current Buy Orders for an itemsellOrders(item) Gets the current Sell Orders for an itemprice(item) Gets the Buy and Sell price for an itemvolume(item) Gets the Buy and Sell volume for an itemorderCount(item) Gets the number of Buy and Sell orders currently open for an itemExamplesFetch the Buy Price of a red gift and print it to the screen.from bazaarpy import bazaar as bz
baz = bz.Bazaar()
baz.updateValues()    
buyPrice = baz.price("red gift")['buyPrice']   
print(str(buyPrice))
Package: bazaarrecipe
A buildout recipe which can be used to branch a Bazaar repository.This makes it possible to automatically create branches for relevantcode.Usage=====If you have a buildout config you can add a section like:[sources]recipe = bazaarurls =http://bazaar-vcs.org/bzr/bzr.dev bzr.devhttp://bazaar.launchpad.net/~bialix/heads/trunk headsThis will create a `sources` folder in you buildout root with twosubfolders in it (bzr.dev and heads).Changes to you buildout configuration might trigger removal of thesources dir. However, before this happens the recipe makes sure thereare no modifications left. If it sees any it will abort beforeanything is deleted. This means you can safely use it for development.Running buildout again after you have done a succesful build beforewill do a bzr pull on each of the resources.
Package: bazaarrecipeinfrae
This is a fork of the original bazaarrecipe to get it working likeinfrae.subversion. all credits to the original authorA buildout recipe which can be used to branch a Bazaar repository.This makes it possible to automatically create branches for relevantcode.Usage=====If you have a buildout config you can add a section like:[sources]recipe = bazaarrecipeinfraeurls =http://bazaar-vcs.org/bzr/bzr.dev bzr.devhttp://bazaar.launchpad.net/~bialix/heads/trunk headsThis will create a `sources` folder in you buildout root with twosubfolders in it (bzr.dev and heads).Changes to you buildout configuration might trigger removal of thesources dir. However, before this happens the recipe makes sure thereare no modifications left. If it sees any it will abort beforeanything is deleted. This means you can safely use it for development.Running buildout again after you have done a succesful build beforewill do a bzr pull on each of the resources.
Package: bazeler
Bazel helperRepositories are defined by therequired.jsonandprovides.jsonsentinel
files in each repository. For example, incommon/Sophus:{
  "dependencies": [
    "eigen"
  ]
}This requires theeigendependency, which means either:A repository exists in the parent directory that contains aprovides.jsonfile, or:A buildfile exists for the given architecture (for natively installed
libraries)This is designed to be used in conjunction with Google's git-repo:git-repo
Package: bazel-runfiles
bazel-runfiles libraryThis is a Bazel Runfiles lookup library for Bazel-built Python binaries and tests.Learn about runfiles: readRunfiles guideor watchFabian's BazelCon talk.ImportingThe Runfiles API is available from two sources, a direct Bazel target, and apypipackage.Pure Bazel importsDepend on this runfiles library from your build rule, like you would other third-party libraries:py_binary(name="my_binary",# ...deps=["@rules_python//python/runfiles"],)Import the runfiles library:frompython.runfilesimportRunfilesPypi importsAdd the 'bazel-runfiles' dependency along with other third-party dependencies, for example in yourrequirements.txtfile.Depend on this runfiles library from your build rule, like you would other third-party libraries:load("@pip_deps//:requirements.bzl","requirement")py_binary(name="my_binary",...deps=[requirement("bazel-runfiles")],)Import the runfiles library:fromrunfilesimportRunfilesTypical UsageCreate aRunfilesobject and useRlocationto look up runfile paths:r=Runfiles.Create()# ...withopen(r.Rlocation("my_workspace/path/to/my/data.txt"),"r")asf:contents=f.readlines()# ...The code above creates a manifest- or directory-based implementation based on the environment variables inos.environ. SeeRunfiles.Create()for more info.If you want to explicitly create a manifest- or directory-based
implementation, you can do so as follows:r1=Runfiles.CreateManifestBased("path/to/foo.runfiles_manifest")r2=Runfiles.CreateDirectoryBased("path/to/foo.runfiles/")If you want to start subprocesses, and the subprocess can't automatically
find the correct runfiles directory, you can explicitly set the right
environment variables for them:importsubprocessfrompython.runfilesimportRunfilesr=Runfiles.Create()env={}# ...env.update(r.EnvVars())p=subprocess.run([r.Rlocation("path/to/binary")],env=env,# ...)