Saravanan666/pypi-org huggingface dataset:
Package: pybacting
pybactingPython wrapper aroundBacting.UsageBased on the example from the Bacting page, you can do:frompybactingimportcdkprint(cdk.fromSMILES("COC"))Or you can use some of the more pythonic functions that wrap the functions
exposed through thepybacting.cdkobject:importpybactingprint(pybacting.from_smiles("COC"))InstallationBefore installing, you'll need to make sure Maven (mvn) is available on your
path. If you're on mac, usebrew install maven.$pipinstallpybactingInstall the latest code from GitHub:$pipinstallgit+https://github.com/cthoyt/pybactingDownload and install from source in development mode:$gitclonehttps://github.com/cthoyt/pybacting
$cdpybacting
$pipinstall--editable.
Package: pybaf
Python Bing API FacilitatorPython Bing API Facilitator is a Python library created to simplify the usage of the bing api for distance between two geographic coordination. The project is on current development and future methods may be implementedInstallationImport the package from PypipipinstallpybafUsageImport the class pybaf from the packagefrompybafimportpybafDefine the bing_api with yourBing keypybaf=pybaf(key='key')You need to define two dataframes that contain latitude and longitude and their IDs to calculate a Distance Matrixdf_origin='Insert the origin dataframe here'df_destination='Insert the origin dataframe here'Thedistance_matrixmethod returns a pd.DataFrame with all cross IDs (origin and destination) with their relative distance(KM) and time(minutes).Note that you will need to pass the destination_id and origin_id to identify the returning pd.DataFramedf_matrix=pybaf.distance_matrix(df_destination='',df_origin='',destination_id='',origin_id='',)Then_smallestmethod returns the n_smallest value between id_origin the id_destinationsn_smallest_df=pybaf.n_smallest(df_final,n=1,origin_id='',destination_id='',value='')# default n=1ContributingPull 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.Authorsdeveloped byjoaovitorncn
Package: pybagit
PyBagIt Version 1.5This module helps with creating an managing BagIt-compliant packages. It has
been created to conform to BagIt v0.96.Documentation is available athttp://ahankinson.github.io/pybagit.
Code hosting is available on GitHub athttp://github.com/ahankinson/pybagit/.RequirementsTested with Python 2.6+ (2.5 or lower will not work.)
No external modules required.
Module has not been tested on Windows.Running TestsThere are a number of unit tests written to verify that this module functions
as expected. To run this, simply typepython setup.py testin the package directory. NOTE: You will need a network connection to verify
the ‘fetch’ tests. If you don’t have a network connection you can skip these
tests by commenting them out in ‘bagtest.py’Setup and InstallTo install this module, simply run:python setup.py installYou can also install it with easy_install:easy_install pybagit(you may need to run these commands as a privileged user, e.g. ‘sudo’)
Package: pybaht
pybahtBaht library for PythonInstallationpip install pybahtUsagefrompybahtimportbahttextbahttext(37)=="สามสิบเจ็ดบาทถ้วน"bahttext(63147.89)=="หกหมื่นสามพันหนึ่งร้อยสี่สิบเจ็ดบาทแปดสิบเก้าสตางค์"bahttext(-0.36)=="ลบสามสิบหกสตางค์"Development# Conda envcondacreate--namepybahtpython=3.10.4
condaactivatepybaht# test case filecurl-L-o./tests/testcases.csvhttps://docs.google.com/spreadsheets/d/e/2PACX-1vTb8PIKzgo07rn9UpcjqE0YrdMAmf4fyDbL2plUieLCyrn_5O3vDvece7UfkaArWQLUSsaw92jVpY_z/pub?gid=0&single=true&output=csv
csvtojson./tests/testcases.csv|jq>./tests/testcases.jsonOther languagesJavaScript:jojoee/bahttextReferenceGoogle Sheets BAHTTEXT function
Package: pybaidu
简介pybaidu是一个通过python爬虫请求百度来获取百度信息的python第三方库。安装使用pip:pipinstallpybaidu使用git:gitclonehttps://gitcode.net/weixin_38805653/pybaiducdpybaidu
pythonsetup.pyinstall终端使用终端查看pybaidu信息。python-mpybaidu使用frompybaiduimport*BaiduImage# 百度图片爬虫核心类BaiduSearch# 百度搜索爬虫核心类BaiduKnew# 百度知道爬虫核心类BaiduKnewSearch# 百度知道搜索爬虫核心类BaiduVideo# 百度视频搜索爬虫核心类BaiduTranslate# 百度翻译爬虫核心类BaiduLibrary# 百度文库爬虫核心类具体文档请见源码中的doc-string。
Package: pybaker
🥧pybaker🥧Pybaker is an easy to use flexible build system, provided as a python library. Born from my frustrations with existing build systems.The library provides a Builder object and also allows you to create your own compiler, linker, dependency scanner and language configuration.
It comes with a few Premade configurations but I would recomend using the clang configuration.Install it from pip.Example build script:# If clang is installed this will just work.frompybakerimport*defbuild():builder=Builder("test",build_type=BuildType.DEBUG,cores=4)# To see how to implement a language configuration check out# the Languages class.builder.add_language(Languages.C())builder.add_path("src")ifbuilder.build():# Do something on failure...passifbuilder.link(["-lUser32.lib","-lGdi32.lib"]):# Do something on failure...passif__name__=="__main__":build()To run it you simply call from your base directorypythonbuild.pyThis will create a new directory where it will dump its private files. A well as the build results.2.0.0 Release Notes:Many classes and functions have been renamed for clarity.The language presets are now functions tha treturn a language rather than static members so they can be safely modified.The dependency scanner API has been simplified.Added gcc as a linker option similar to clang.Added a way to extend existing language configurations without needing to create a new one.The precentage of compilation done is now printed to the teminal along with the building file message. This requires passing an extra paramete to the compile function.Now allows for multithreaded building. You can select the number of cores by setting the cores parameter in the Builder constructor.Added a tcc configuration.Added static library linker options.The MIT License (MIT)Copyright © 2022 oatslaboatsPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: pybalancer
pybalancerpybalanceran simple load balancer for PythonFeaturesEnglisha simple load balancerconsistent Hash Load Balance usinguhashringketama hash functionperiodly health checks, remove failed instance and add when it recoversmanually call remove_instance when it fails.InstallationUsing pip:$ pip install pybalanerBasic usagepybalanceris very simple and efficient to use:frompybalancerimportLoadBalancer# create a consistent hash ring of 3 nodes of weight 1balancer=LoadBalancer(instances=['node1:port1','node2:port2','node3:port3'],interval=5)# get the node name for the remote_addr keytarget_instance=balancer.get_instance(remote_addr="host:port")failed_times=0# call target_instance failsifcall(target_instance):failed_times+=1iffailed_times>max_fails:balancer.remove_instance(target_instance)alive_instances=balancer.get_alive_instances()print(alive_instances)
Package: pybalboa
Python Module to interface with a balboa spaRequires Python 3 with asyncio.To Install:pip install pybalboaTo test:python3 pybalboa <ip-of-spa-wifi> <debug-flag>To UseSee__main__.pyfor usage examples.Minimal example:import asyncio
import pybalboa

async with pybalboa.SpaClient(spa_host) as spa:
  # read/run spa commands
returnRelatedhttps://github.com/ccutrer/balboa_worldwide_app/wiki- invaluable wiki for Balboa module protocol
Package: py-balcalc
py-balcalcdesktop gui for py-ballisticcalc libraryInstallationClone from GitHubgitclonehttps://github.com/o-murphy/py-balcalccdpy-balcalc
python-mvenvvenv
venv/bin/activate
pipinstall-rrequirements# runpython-mpy_balcalc.mainOr use pippipinstallpy-balcalc# runpy_balcalcTodo
Package: pyBallMapper
pyBallMapperPython version of the BallMapper algorithm described inarXiv:1901.07410.Install the package 📦pip install pyballmapperBasic usagefrom pyballmapper import BallMapper
bm = BallMapper(X = my_pointcloud,    # the pointcloud, as a array-like of shape (n_samples, n_features)
                eps = 4.669)          # the radius of the covering ballsFor more info check out theexample notebooksor thedocumentation.
Package: pybalonor
pybalonorThis Python package helps to perform a Bayesian analysis of log-normally
distributed data
(PYthon package for Bayesian Analysis of the LOg-NORmal distribution).
Performing a Bayesian analysis of log-normally distributed data requires
care in the prior choice to yield posterior predictive distributions with
finite moments (e.g. Fabrizi & Trivisano,2012).This package uses a simple uniform prior for the log-location and log-variance
parameter. The problem of normalizing the posterior of the mean is solved by
imposing a finite upper bound on the log-variance parameter.PrefaceIf you are looking forananalysis of the log-normal distribution, you might
likely want to check out the R packageBayesLNby
Gardini, Fabrizi, and Trivisano. Their conjugate prior is more sophisticated
than the flat prior of pybalonor, and, from limited analysis, seems to lead to
tighter posterior bounds.If instead you are looking for an analysis based on a flat prior, looking for a
Python solution, or working with a large data set, go ahead!Installation and RequirementsThe following software is required to install pybalonor:A modern C++ compilerBoost Math (v1.80.0 or later recommended for numerical stability)The Meson build systemCythonNumPyMebuexThe Python package can be built from the repository's root directory using
the setuptools build system. For instance, you may call the following command
from the repository's root directory:pipinstall--user.UsageCurrently, pybalonor provides one class,CyLogNormalPosterior:classCyLogNormalPosterior:def__init__(self,X,l0_min,l0_max,l1_min,l1_max):passdeflog_posterior(self,l0,l1):passdeflog_posterior_predictive(self,x):passdefposterior_predictive(self,x):passdefposterior_predictive_cdf(self,x):passdeflog_mean_posterior(self,mu):passThe parameters are as follows:ParameterTypePurposeXdbuf1The data set.xdbuf1Where to evaluate the posterior predictive (same dimension asX).mudbuf1Log-Normal distribution mean (evaluated as density over the posterior)l0dbuf1Log-location parameter $l_0$ at which to evaluate the posterior.l1dbuf1Log-variance parameter $l_1$ (likel0)l0_minfloatMinimum of log-location parameter for prior.l0_maxfloatMaximum of log-location parameter.l1_minfloatMinimum of log-variance parameter for prior.l1_maxfloatMaximum of log-variance parameter.Note: dbuf1 refers to a C-contiguous buffer of doubles (e.g. a one-dimensional NumPy array).For more information, visit thepybalonor documentation.LicenseThis software is licensed under the European Public License (EUPL) version 1.2
or later (EUPL-1.2). See the LICENSE file in this directory.ChangelogThe format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.[1.0.0] - 2023-05-04AddedInitial release.
Package: pybamboo
Python client for thebamboowebservice.Installationvia pip$ pip install pybambooVersionsStarting with version 0.5.7.8, pybamboo version matches bamboo.io API version.
0.5.8.x means that it works with bamboo version 0.5.8.
x epresenting the internal pybamboo updates.Testingclone repository$ git clone git://github.com/modilabs/pybamboo.git
$ cd pybambooinstall requirements$ pip install -r requirements.pip
$ pip install -r requirements-test.piprun tests$ cd pybamboo
$ nosetests --with-cov --cov-report term-missingAboutBamboo is an open source project. The project features, in chronological order,
the combined efforts ofRenaud GaudinPeter Lubell-DoughtieMark Johnstonand other developers.
Package: pybambu
Bambu Labs API ClientAboutThis package subscribes to the MQTT Server on the Bambu Labs X1C 3D Printer.Note:  It is currently not up-to-date.  It's currently being worked on directly in aHA Custom Component, until it is more stableInstallationpip install pybambuAvailable MethodsConnect to the printerconnect()Listen for events from the printersubscribe(callback=method)Disconnect from the printerdisconnect()
Package: pybamcmap
Examples / GalleryViridis colormap using BAM colorsJet colormap using BAM colorsGrayscale colormap using BAM colorsRed tones colormap using BAM colorsBlue tones colormap using BAM colorsBAM main colors colormapColormaps using the BAM logo colorsYellow tones colormap using BAM colorsGreen tones colormap using BAM colors
Package: pybancodobrasil
pybancodobrasilAcesse seus extratos do Banco do Brasil pelo Python utilizando selenium-wire.InstalaçãoDisponível via pippip install pybancodobrasilAquisitando dadosVocê ainda precisa ter o Warsaw instalado visto que este é um web crawlerimportBrazilBankfrompybancodobrasil# baixando o driver automaticamente do chromebanco_do_brasil=BrazilBank()# or BrazilBank(driver_name='chrome')# baixando o driver automaticamente do firefox com a janela escondidabanco_do_brasil=BrazilBank(driver_name='firefox',headless=True)# utilizando um outro driverbanco_do_brasil=BrazilBank(driver=MeuDriver())# fazendo loginbanco_do_brasil.login(agencia,conta,senha)# aquisitando transaçõesdeftransacoes_callback(transacao):print(transacao)transacoes=banco_do_brasil.get_transactions(mes,ano,transacoes_callback)# aquisitando dados do cartao de creditodefcc_transacoes_callback(transacao):print(transacao)cc_transacoes=banco_do_brasil.get_cardscc_transacoes_callback)ContribuindoEnvie sua PR para melhorar esse projeto ! 😋
Package: pyband
PyBandBandChain Python LibraryPyband is a library that is used to interact with BandChain through thegRPCprotocol. Querying data and sending
transaction can be done here!⭐️ FeaturesThis helper library allows users to interact with BandChain.PyBand supports the following features:Getting the information of a specific oracle script, data source, and request ID.Getting the account information of specific address.Getting the latest request for a specific oracle script with its matching calldata and validator ask_count and
min_count.Querying all the reporters associated with a specific validator.Seeing what client_id you are using and getting BandChain's latest block data.Able to send transaction in 3 modes: block mode, async mode, and sync mode.📦 InstallationThis library is available onPyPIpipinstallpyband💎 Example UsageThe example below shows how this library can be used to get the result of the latest request for the price of any
cryptocurrency. In this example, we will get the latest price of BTC on BandChain's testnet.The specified parameters are:oracleScriptID: 111calldata: The hex string representing theOBI-encoded value of{'symbols': ['BTC'], 'multiplier': 100000000}minCount: 10askCount: 16importasynciofrompybandimportClient,PyObiasyncdefmain():grpc_url="laozi-testnet6.bandchain.org"c=Client.from_endpoint(grpc_url,443)oid=111calldata="00000001000000034254430000000005f5e100"min_count=10ask_count=16req_info=awaitc.get_latest_request(oid,calldata,min_count,ask_count)oracle_script=awaitc.get_oracle_script(oid)obi=PyObi(oracle_script.schema)# Converts the calldata into a readable syntaxprint(obi.decode_input(bytes.fromhex(calldata)))# Prints the resultprint(obi.decode_output(req_info.request.result.result))if__name__=="__main__":asyncio.run(main())Below is the results of the example above.{'symbols': ['BTC'], 'multiplier': 100000000}
{'rates': [1936488410000]}This example shows how to send a transaction on BandChain using block mode.importasyncioimportosfrompybandimportClient,Transaction,Walletfrompyband.messages.cosmos.bank.v1beta1importMsgSendfrompyband.proto.cosmos.base.v1beta1importCoinasyncdefmain():# Create a GRPC connectiongrpc_url="laozi-testnet6.bandchain.org"c=Client.from_endpoint(grpc_url,443)# Convert a mnemonic to a walletwallet=Wallet.from_mnemonic(os.getenv("MNEMONIC"))sender=wallet.get_address().to_acc_bech32()# Prepare a transaction's propertiesmsg_send=MsgSend(from_address=sender,to_address="band19ajhdg6maw0ja0a7qd9sq7nm4ym9f4wjg8r96w",amount=[Coin(amount="1000000",denom="uband")],)account=awaitc.get_account(sender)account_num=account.account_numbersequence=account.sequencefee=[Coin(amount="50000",denom="uband")]chain_id=awaitc.get_chain_id()# Step 4 Construct a transactiontxn=(Transaction().with_messages(msg_send).with_sequence(sequence).with_account_num(account_num).with_chain_id(chain_id).with_gas(2000000).with_fee(fee).with_memo(""))# Sign and broadcast a transactiontx_block=awaitc.send_tx_block_mode(wallet.sign_and_build(txn))# Converting to JSON for readabilityprint(tx_block.to_json(indent=4))if__name__=="__main__":asyncio.run(main())🧀 NotesFor more examples, please go toexamples.
Package: pyband2
PyBandBandChain Python Library⭐️ FeaturesThis helper library allows users to request the latest request result that match scertain input parameters. The parameters that can be specified are:TheoracleScriptIDtheaskCountandminCountthecalldata(request parameters) associated with the requestFor more information on each these, please refer to ourwiki.📦 InstallationThe library is available onPyPIpipinstallpyband💎 Example UsageThe example code below shows how the library can be used to get the result of the latest request for the price of Bitcoin. The specified parameters areoracleScriptID: 1calldata: The hex string representingOBI-encoded value of{symbol:BTC,multiplier:1000000}minCount: 4askCount: 4frompybandimportClient,PyObidefmain():c=Client("http://guanyu-devnet.bandchain.org/rest")req_info=c.get_latest_request(1,bytes.fromhex("0000000342544300000000000f4240"),4,4)oracle_script=c.get_oracle_script(1)obi=PyObi(oracle_script.schema)print(obi.decode_output(req_info.result.ResponsePacketData.result))if__name__=="__main__":main()
Package: pybandits
PyBanditsPyBanditsis aPythonlibrary for Multi-Armed Bandit. It provides an implementation of stochastic Multi-Armed Bandit (sMAB) and contextual Multi-Armed Bandit (cMAB) based on Thompson Sampling.For the sMAB, we implemented a Bernoulli multi-armed bandit based on Thompson Sampling algorithmAgrawal and Goyal, 2012. If context information is available we provide a generalisation of Thompson Sampling for cMABAgrawal and Goyal, 2014implemented withPyMC3, an open source probabilistic programming framework  for automatic Bayesian inference on user-defined probabilistic models.InstallationThis library is distributed onPyPIand can be installed withpip.
The latest release is version0.0.2.pybanditsrequires a Python version>= 3.8.$ pip install pybanditsThe command above will automatically install all the dependencies listed inrequirements.txt. Please visit theinstallationpage for more details.Getting startedA short example, illustrating it use. Use the sMAB model to predict actions and update the model based on rewards from the environment.import numpy as np
import random
from pybandits.core.smab import Smab

# init stochastic Multi-Armed Bandit model
smab = Smab(action_ids=['Action A', 'Action B', 'Action C'])

# predict actions
pred_actions, _ = smab.predict(n_samples=100)

n_successes, n_failures = {}, {}
for a in set(pred_actions):

    # simulate rewards from environment
    n_successes[a] = random.randint(0, pred_actions.count(a))
    n_failures[a] = pred_actions.count(a) - n_successes[a]

    # update model
    smab.update(action_id=a, n_successes=n_successes[a], n_failures=n_failures[a])DocumentationFor more information please read the fulldocumentationandtutorials.Info for developersPyBandits is supported by theAI for gaming and entertainment appscommunity.The source code of the project is available onGitHub.$ git clone https://github.com/playtikaresearch/pybandits.gitYou can install the library and the dependencies with one of the following commands:$ pip install .                        # install library + dependencies
$ pip install .[develop]               # install library + dependencies + developer-dependencies
$ pip install -r requirements.txt      # install dependencies
$ pip install -r requirements-dev.txt  # install developer-dependenciesAs suggested by the authors ofpymc3andpandoc, we highly recommend to install these dependencies withconda:$ conda install -c conda-forge pandoc
$ conda install -c conda-forge pymc3To create the filepybandits.whlfor the installation withpiprun the following command:$ python setup.py sdist bdist_wheelTo create the HTML documentation run the following commands:$ cd docs
$ make htmlRun testsTests can be executed withpytestrunning the following commands. Make sure to have the library installed before to
run any tests.$ cd tests
$ pytest -vv                                      # run all tests
$ pytest -vv test_testmodule.py                   # run all tests within a module
$ pytest -vv test_testmodule.py -k test_testname  # run only 1 test
$ pytest -vv -k 'not time'                        # run all tests but not exec timeLicenseMIT License
Package: pybandstructure
Pybandstructure (version 2.0)Band structure calculator for simple models.
Allows easy implementation of simple periodic Hamiltonians including tight binding or plane waves models.
Results can be analyzed to extract thermodynamical properties, density of states, and optical conductivity.
A submodule is devoted to the implementation of superlattice hamiltonians.InstallationThe package can be installed from the Python Package Index aspip install pybandstructureor downloaded from therepository.DocumentationDocumentation is hosted byRead the Docs.ExamplesPlease refer to therepositoryfor example notebooks illustrating the main features.New in version 2.0Automatic generation of Brillouin zone samples for arbitrary geometries.Calculation of self-consistent energy bands.Calculation of non-local polarization function.LicenseThe package is distributed under the GNU Lesser General Public License v3 (LGPLv3).Cite asIf you use Pybandstructure for your research please citeP. Novelli, I. Torre, F.H.L. Koppens, F. Taddei, and M. Polini"Optical and plasmonic properties of twisted bilayer graphene:
Impact of interlayer tunneling asymmetry and ground-state charge inhomogeneity"Phys. Rev. B102, 125403 (2020).
Package: pybandwidth-v2
Bandwidth Python APIClient library for theBandwidth App PlatformFull Referencedev.bandwidth.com/python-bandwidthRequirementsBandwidth AccountAt least Python 3.6Installationpip install pybandwidth_v2UsageClient Initializationfrompybandwidth_v2.bandwidth_clientimportBandwidthAccountAPI,BandwidthMessagingAPImessaging_api=BandwidthMessagingAPI('acc-account_id','t-token','s-secret','a-application_id')account_api=BandwidthAccountAPI('acc-account_id','u-username','p-password')Each of these code sample assumes that you have already initialized a clientSearch phone numbernumbers=account_api.search_available_numbers(area_code='910',quantity=3)print(numbers[0]['number'])## +19104440230Send Text Messagemessage_id=messaging_api.send_message('+1234567980',['+1234567981'],'SMS message')print(message_id)# m-messageIdRelease History0.0.2 (2019-09-12)Initial release of SDKDeveloper InfoRunning testspip3installnosenosetestspybandwidth_v2