Saravanan666/pypi-org huggingface dataset:
Package: baladin
Author:Behrouz SafariWebsite:AstroDataScience.NetbaladinPythonic tool to work with Aladin LiteInstallationInstall the latest version fromPyPI:pip install baladinThe only requirement ispandas.For more information, check these links:Build an interactive sky map with Aladin LiteImage surveysREST api exampleExample 1 : add surveys and markersfrombaladinimportAladina=Aladin(target='270.6003707 -23.0224839')buttons=[('P/2MASS/color','bs 2MASS'),('P/GLIMPSE360','bs GLIMPSE 360'),]markers=[(270.332621,-23.078944,'PSR B1758-23','Object type: Pulsar'),(270.63206,-22.905550,'HD 164514','Object type: Star in cluster'),(270.598121,-23.030819,'HD 164492','Object type: Double star'),]a.add_survey_buttons(buttons)a.add_markers(markers)a.create()a.save('index.html')Example 2 : add SIMBAD and VizieR layersfrombaladinimportAladina=Aladin(target='270.6003707 -23.0224839')a.add_simbad()a.add_vizier('I/239/hip_main')a.create()a.save('index.html')You can pass optional argumentstargetandradiusto bothadd_simbadandadd_viziermethods.Example 3 :Southern-Ring-Nebulafrom JWST as overlay layerfrombaladinimportAladina=Aladin(target='151.75735684271, -40.43642515362001',fov=0.1)buttons=[('P/2MASS/color','2MASS'),('P/DSS2/color','DSS'),]a.add_survey_buttons(buttons)hips_id='CDS/P/JWST/Southern-Ring-Nebula/NIRCam'hips_name='Southern-Ring-Nebula'hips_base_url='https://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Southern-Ring-Nebula_NIRCam'hips_max_ord=14a.add_image_overlayer(hips_id,hips_name,hips_base_url,hips_max_ord,slider=True)a.create()a.save('index.html')See more atastrodatascience.net
Package: balanceAct
This is a package that has useful machine vision for use with CarsCHANGE LOGRELEASE 10.0.0.1  (7/27/2021)First Release\RELEASE 20.0.0.2 –> 7/27/2021Just wanted to test some things outreally didn’t don anything\-RELEASE 3
-0.0.0.3–> 7/27/2021
-Just wanted to test some things out
-really didn’t don anything
Package: balanced
# BalancedOnline Marketplace Payments[![Build Status](https://secure.travis-ci.org/balanced/balanced-python.png?branch=master)](http://travis-ci.org/balanced/balanced-python) [![Latest Version](https://pypip.in/version/balanced/badge.svg)](https://pypi.python.org/pypi/balanced/) [![Downloads](https://pypip.in/download/balanced/badge.svg)](https://pypi.python.org/pypi/balanced/) [![Supported Python versions](https://pypip.in/py_versions/balanced/badge.svg)](https://pypi.python.org/pypi/balanced/) [![License](https://pypip.in/license/balanced/badge.svg)](https://pypi.python.org/pypi/balanced/)v1.x requires Balanced API 1.1. Use [v0.x](https://github.com/balanced/balanced-python/tree/rev0) for Balanced API 1.0.## Installationpip install balanced## UsageView Balanced’s online tutorial and documentation athttps://www.balancedpayments.com/docs/overview?language=python## ContributingFork itCreate your feature branch (git checkout -b my-new-feature)Write your codeand unit testsEnsure all tests still pass (nosetests)[PEP8](http://pypi.python.org/pypi/pep8) your codeCommit your changes (git commit -am ‘Add some feature’)Push to the branch (git push origin my-new-feature)Create new pull request## Documentation scenariosEach scenario lives in the scenarios directory and is comprised of the following:definition.mako - Method definitionrequest.mako - Scenario codeexecutable.py - Processed request.mako. Can be executed directly in Python. Generated by render_scenarios.py.python.mako - Documentation template to be consumed by balanced-docs. Generated by - render_scenarios.py.
Package: balanced-ach
Python library forBalanced ACHpayments.To InstallSimply:pip install balanced-achor if you prefer:easy_install balanced-achRequirementsPython>= 2.6, < 3.0wac>=0.11iso8601>=0.1.4,simplejson>=2.3.2Usageimportbalanced_achprint"create a bank account"bank_account=balanced_ach.BankAccount(name='Gottfried Leibniz',account_number='3819372930',routing_number='121042882',type='checking',).save()print"Cool, let's credit that bank account for $1.01 USD"credit=bank_account.credit(101)print"Cool, let's debit that bank account for $4.55 USD"debit=bank_account.debit(455)print"Want to credit that bank account $1.01 USD without creating it? Cool"credit=balanced_ach.Credit(amount=101,bank_account=dict(name='Gottfried Leibniz',account_number='3819372930',routing_number='121042882',type='checking',)).save()print"Want to debit that bank account $4.55 USD without creating it? Cool"debit=balanced_ach.Debit(amount=101,bank_account=dict(name='Gottfried Leibniz',account_number='3819372930',routing_number='121042882',type='checking',)).save()print"and there you have it 8-)"IssuesPlease use appropriately tagged githubissuesto request features or report bugs.ContributingFork itCreate your feature branch (git checkout -b my-new-feature)Write your codeand testsEnsure all tests still pass (nosetests -svx tests)Commit your changes (git commit -am ‘Add some feature’)Push to the branch (git push origin my-new-feature)Create new pull request
Package: balanced-kmeans
Balanced K-Means clustering in PyTorchBalanced K-Means clustering in Pytorch with strong GPU acceleration.Disclaimer:This project is heavily inspired by the projectkmeans_pytorch. Each part of the original implementation is combined with the appropriate attribution.InstallationAs easy as:pip install balanced_kmeansGetting startedFirst things first: Classical kmeans algorithm as easy asfrom balanced_kmeans import kmeans
# experiment constants
N = 10000
batch_size = 10
num_clusters = 100
device = 'cuda'

cluster_size = N // num_clusters
X = torch.rand(batch_size, N, dim, device=device)
choices, centers = kmeans(X, num_clusters=num_clusters)Now, if you want balanced kmeans you can run:from balanced_kmeans import kmeans_equal
N = 10000
batch_size = 10
num_clusters = 100
device = 'cuda'

cluster_size = N // num_clusters
X = torch.rand(batch_size, N, dim, device=device)
choices, centers = kmeans_equal(X, num_clusters=num_clusters)By default, forge initialization scheme is used for initial cluster centers.
However, you may change the initial cluster centers by providing the keyword
argumentinitial_stateto eitherkmeansorkmeans_equal.ContributingThis is a pet project, so feel free to contribute if you want to add any extra
feature. For any bugs, please open a detailed issue.CreditsThis implementation extends the packagekmeans_pytorchwhich contains the
implementation of the original Lloyd's K-means algorithm in Pytorch. You can check (and star!)
the original packagehere.For licensing of this project, please refer to this repo as well as thekmeans_pytorchrepo.
Package: balanced-loss
Easy-to-use, class-balanced, cross-entropy and focal loss implementation for Pytorch.TheoryWhen training dataset labels are imbalanced, one thing to do is to balance the loss across sample classes.First, the effective number of samples are calculated for all classes as:Then the class balanced loss function is defined as:Installationpipinstallbalanced-lossUsageStandard losses:importtorchfrombalanced_lossimportLoss# outputs and labelslogits=torch.tensor([[0.78,0.1,0.05]])# 1 batch, 3 classlabels=torch.tensor([0])# 1 batch# focal lossfocal_loss=Loss(loss_type="focal_loss")loss=focal_loss(logits,labels)# cross-entropy lossce_loss=Loss(loss_type="cross_entropy")loss=ce_loss(logits,labels)# binary cross-entropy lossbce_loss=Loss(loss_type="binary_cross_entropy")loss=bce_loss(logits,labels)Class-balanced losses:importtorchfrombalanced_lossimportLoss# outputs and labelslogits=torch.tensor([[0.78,0.1,0.05]])# 1 batch, 3 classlabels=torch.tensor([0])# 1 batch# number of samples per class in the training datasetsamples_per_class=[30,100,25]# 30, 100, 25 samples for labels 0, 1 and 2, respectively# class-balanced focal lossfocal_loss=Loss(loss_type="focal_loss",samples_per_class=samples_per_class,class_balanced=True)loss=focal_loss(logits,labels)# class-balanced cross-entropy lossce_loss=Loss(loss_type="cross_entropy",samples_per_class=samples_per_class,class_balanced=True)loss=ce_loss(logits,labels)# class-balanced binary cross-entropy lossbce_loss=Loss(loss_type="binary_cross_entropy",samples_per_class=samples_per_class,class_balanced=True)loss=bce_loss(logits,labels)Customize parameters:importtorchfrombalanced_lossimportLoss# outputs and labelslogits=torch.tensor([[0.78,0.1,0.05]])# 1 batch, 3 classlabels=torch.tensor([0])# number of samples per class in the training datasetsamples_per_class=[30,100,25]# 30, 100, 25 samples for labels 0, 1 and 2, respectively# class-balanced focal lossfocal_loss=Loss(loss_type="focal_loss",beta=0.999,# class-balanced loss betafl_gamma=2,# focal loss gammasamples_per_class=samples_per_class,class_balanced=True)loss=focal_loss(logits,labels)ImprovementsWhat is the difference between this repo and vandit15's?This repo is a pypi installable packageThis repo implements loss functions astorch.nn.ModuleIn addition to class balanced losses, this repo also supports the standard versions of the cross entropy/focal loss etc. over the same APIAll typos and errors in vandit15's source are fixedReferenceshttps://arxiv.org/abs/1901.05555https://github.com/richardaecn/class-balanced-losshttps://github.com/vandit15/Class-balanced-loss-pytorch
Package: balanced-splits
balanced-splitsA utility library for splitting datasets in a balanced manner, with regards to several features.Installationpip install balanced-splitsUsageimportnumpyasnpimportpandasaspdfrombalanced_splits.splitimportoptimized_splitsample_size=100df=pd.DataFrame({'age':np.random.normal(loc=45,scale=7.,size=sample_size),'skill':1-np.random.power(4,size=sample_size),'type':np.random.choice(['T1','T2','T3'],size=sample_size)})A,B=optimized_split(df)print('Partition 1\n===========\n')print(A.describe())print(A['type'].value_counts())print('\n\n')print('Partition 2\n===========\n')print(B.describe())print(B['type'].value_counts())Check out the "examples" section for more examples.
Package: balancedtime
balancedtimeUsing balancedtimebalancedtime has two methods, one to get the current or specified time in a given location, and one to output a handy clock conversion for today in a given location.convert_time_to_balanced_time(time=None, zipcode=10010, pretty_print=False)
the ‘time’ argument can be a datetime.datetime object.
‘zipcode’ can be a contiguous US ZIP codepretty_print will output a datetime.datetime object if False, and a text representation of the time (in a 12 hour format with AM/PM) if True.Notezipcode currently excludes leading 0 ZIPs (mostly in the Northeast.) and all ZIP codes not part of the contiguous United States. This is expected to be fixed in subsequent releases.ExamplesThe following examples demonstrate the functionality available in the moduleconvert_time_to_balanced_time>>> import balancedtime
>>> balanced_time.convert_time_to_balanced_time(time=datetime.datetime(2018,5,3,6,30),zipcode=10010,pretty_print=True) #time in NYC on May 3, 2018, at 6:30 AM
'06:32:06 AM'
>>> balanced_time.convert_time_to_balanced_time(time=datetime.datetime(2018,5,3,6,30),zipcode=10010,pretty_print=False) #same, but return a datetime.datetime object
datetime.datetime(2018, 5, 3, 6, 32, 6, 185567)clock_conversion>>> clock_conversion(zipcode=10010)

balanced calendar for New York, NY, 2018/11/18
  old   :  balanced
12:00 AM = 12:15:50 AM
1:00 AM  = 01:06:44 AM
2:00 AM  = 01:57:38 AM
3:00 AM  = 02:48:32 AM
4:00 AM  = 03:39:26 AM
5:00 AM  = 04:30:20 AM
6:00 AM  = 05:21:14 AM
7:00 AM  = 06:17:27 AM
8:00 AM  = 07:30:36 AM
9:00 AM  = 08:43:46 AM
10:00 AM = 09:56:55 AM
11:00 AM = 11:10:04 AM
12:00 PM = 12:23:14 PM
1:00 PM  = 01:36:23 PM
2:00 PM  = 02:49:32 PM
3:00 PM  = 04:02:42 PM
4:00 PM  = 05:15:51 PM
5:00 PM  = 06:20:08 PM
6:00 PM  = 07:10:55 PM
7:00 PM  = 08:01:42 PM
8:00 PM  = 08:52:29 PM
9:00 PM  = 09:43:17 PM
10:00 PM = 10:34:04 PM
11:00 PM = 11:24:51 PMInstallationInstall balanced_time by running:pip install balancedtimeContributeIssue Tracker:https://github.com/Lolologist/balancedtime/issuesSource Code:https://github.com/Lolologist/balancedtimeVersion HistoryVersionDescription0.1bFirst release
Package: balancerv2cad
OverviewThe BalancerV2 model is a python implementation of the balancerv2 protocol funded by Balancer and the Token Engineering community. In collaboration with Ocean Protocol and PowerPool.
We hope to build a resiliant, easy, and simple to use access to balancer pools for simulations, and build a brighter tomorrow for Token Engineers. Feel free to play and use this model for your own simulations and grow token engineering everywhere.Copy BalancerV2 Pools from on chain, being able to pull weights from chain based on the symbols provided, this will reduce friction for new users.Ease access into BalancerV2 pools for anyone wanting to make a trade and see the ending result of the poolProvide an interface for easy swapping, adding liquidity, and removing it. This can be done with ipython or JupyterDevelop rigorous testing for math functions to assure decimals are flowing exactly as EVMModel ecosystem with agents using these balancer pools as an interactive objects.All research is open source and transparent. For more information please visit theBalancerV2 Simulations Documentation.Balancer V2 ModelInstallationpip install balancerv2cadSample Usagefrom balancerv2cad.WeightedPool import WeightedPool
wp = WeightedPool()
# amounts of tokens to join pool, weights of tokens
wp.join_pool({'WETH':19609,'DAI':30776582},{'WETH':0.6,'DAI':0.4})
wp.swap('WETH','DAI',2)
Package: balast
Framework for client-side load-balancing for inter-process
communication between cloud services.It is inspired in large part by Netflix’sRibbonfor java.How to UseIn its most basic form, you can create abalast.Servicewith a static list of servers:>>>importbalast>>>my_service=balast.Service(['127.0.0.1','127.0.0.2'])Now, just use it as you would use therequestspackage:>>>response=my_service.get('/v1/path/to/resource')<Response[200]>NOTE:at this point in time, only the basic api features from therequestspackage are supported.
Package: balautil
#### Packageinfo
- This package contains common util functions & classessfor the following sections
1. Http Util
2. WebScraping utils for selenium, bs4
3. Matplotlib utils
4. Pillow, numpy utils
5. Pandas utilFor more info, please checkout the repo to see examples
[balautil](http://github.com/balaprasanna/balautil)## How to setup your own package
pip install –user –upgrade setuptools wheelpython setup.py sdist bdist_wheel
pip install –user –upgrade twinetwine upload dist/* –verbose
Package: balba
balbaAutomatically generate a website showcasing Kicad projects. The website makes it easy to review multiple aspects
of a project from any device without the need to download any files or install KiCad.Project named afterBidens alba.Getting startedThis program assumes the following:All your KiCad projects are stored in a single directory, each one in its own subdirectory.There exists abalba.yamlat the root.Each project has aREADME.mdat its root.SaidREADME.mdhas the appropriate front matter.The structure should look something like:├── balba.yaml
├── cocoro
│ ├── cocoro.kicad_pcb
│ ├── cocoro.kicad_prl
│ ├── cocoro.kicad_pro
│ ├── cocoro.kicad_sch
│ ├── ledc.kicad_sch
│ └── README.md
├── other_project
| ├── ...Once that's done, all you have to do iscdinto the root directory and runbalba. By default, the output will
be stored on./balba-build.
Package: balcony
balconybalcony is a modern CLI tool that with some killer features:Auto-fill the required parameters for AWS API callsRead the JSON data of any AWS resource in your accountGenerateTerraform Import BlocksGenerate actual.tfTerraform Resource codebalcony usesread-onlyoperations, it does not take any action on the used AWS account.Visit the Documentation WebsiteInstallationpip3installbalconyVisitInstallation & QuickStart Pageto get started usingbalcony# see optionsbalcony# list available resources of ec2balconyawsec2# read a resourcebalconyawss3Buckets# show documentationbalconyawsiamPolicy--list# generate terraform import blocks for a resourcebalconyterraform-imports3BucketsFeaturesRead any AWS Resourcebalcony aws <service> <resource-name> --paginatecommand reads all resources of a given type in your AWS account.Related Docs:QuickStartGenerate Terraform Import BlocksTerraform v1.5 introducedimport blocksthat allows users to define their imports as code.balcony terraform-import <service> <resource-name>command generates these import blocks for you.balcony terraform-import --listto see the list of supported resources.Related Docs:Generate Terraform Import BlocksRelated Docs:Balcony Terraform Import Support MatrixGenerate actual Terraform Resource CodeIf you have:initialized terraform projectimport_blocks.tffile that's generated withbalcony terraform-importcommandyou can runterraform plan -generate-config-out=generated.tfto generate actual.tfresource code.This feature is achieved with thebalcony-terraform-import Docker Image.Related Docs:Generate Terraform Code with Docker ImageInteractive Wizard to create balcony import configurationsBalcony doesn't know how to create terraformimport blocksfor all of the AWS resources.It can be taught how to do it by creatingimport-configurationsyaml files, but it's a manual process. This is where the interactive wizard comes in.Interactive Wizards asks you required questions to automatically create theimport-configurationsyaml files.Related Docs:Terraform Import Configuration Wizard
Package: balderhub-rfb
BalderHub Packagebalderhub-rfbThis is a BalderHub package for theBaldertest framework. It allows
you to test RFB/VNC clients, without the need of writing own tests. If you are new to Balder check out theofficial documentationfirst.InstallationYou can install the latest release with pip:python -m pip install balderhub-rfbImport scenariosYou can activate scenarios by importing them into your project:# file `scenario_balderhub_rfb.pyfrombalderhub.rfb.scenarios.client.handshakingimportScenarioRfbHandshakingIllegalProt,\ScenarioRfbHandshakingNoSecType,ScenarioRfbHandshakingSecHandshakeFailed,ScenarioRfbHandshakingSecTypeNone,\ScenarioRfbHandshakingSecTypeVncIf you add a file that imports the scenario classes, Balder will automatically collect them (if they are in a file
that starts with file starting withscenario_*.py).Create a setupCheckoutthe example section of the documentationfor more details.Check out the documentationIf you need more information,checkout thebalderhub-rfbdocumentation.LicenseThis BalderHub package is free and Open-SourceCopyright (c) 2023 Max Stahlschmidt and othersDistributed under the terms of the MIT license
Package: balderhub-snmpagent
BalderHub Packagebalderhub-snmpagentThis is a simple BalderHub package, that allows to test snmp agents.Balder is a python test system that allows you to reuse a once written testcode for different but similar platforms/devices/applications. Check it out here.InstallationYou can install the latest release with pip:python -m pip install balderhub-snmpagentLicenseThis balderhub package is free and Open-SourceCopyright (c) 2022 Max Stahlschmidt and othersDistributed under the terms of the MIT license
Package: balderich
balderich-pyNSSCTF平台API Python包，你可以使用此库来和Balderich后端进行快速交互。编写属于你的自动化bot。安装你可以直接使用pip来进行安装本包pipinstallbalderich请注意：你需要使用Python3.8及以上版本来安装本包。使用你可以通过以下方式来快速的创建一个客户端importbalderich# 直接传入字符串client=balderich.NSSClient(key='xxx',secret='xxxx')# 传入配置文件路径client=balderich.NSSClient(balderich.AuthConfig('config.json'))# 传入配置文件IO流client=balderich.NSSClient(balderich.AuthConfig(open('config.json','rb')))然后你便可以开始使用客户端下各模块API来进行交互，例如查询用户信息data=client.user.get_user_info(1)print(data)
Package: balderplugin-junit
BalderPluginbalderplugin-junitThis is a simple BalderPlugin, that allows to generate JUnit test reports from a balder test session run.Balder is a python test system that allows you to reuse a once written testcode for different but similar
platforms/devices/applications. Check it outhere.InstallationYou can install the latest release with pip:python -m pip install balderplugin-junitRun BalderAfter you've installed it, you can run Balder inside a Balder environment and provide the--junit-fileargument to
specify the filepath for your new junit report:balder --junit-file result.xmlLicenseThis plugin is free and Open-SourceCopyright (c) 2022 Max Stahlschmidt and othersDistributed under the terms of the MIT license
Package: baldrick
Baldrick: A cunning plan for GitHub botsThis is a (GitHub) bot framework which is designed to have a pluggable and
configurable setup for responding to webhooks.Baldrick grew out ofastropy-botbut refactored to be generic and easy to configure.UsageBaldrick is designed to be imported and used to construct a Flask app. An
example repository which could be deployed onDokkuorHerokucan be found in thetemplatedirectory.LicenceThis project is licensed under the MIT licence.
Package: baleen
Baleen is a tool for ingesting formal natural language data from the discourse of professional and amateur writers: e.g. bloggers and news outlets. Rather than performing web scraping, Baleen focuses on data ingestion through the use of RSS feeds. It performs as much raw data collection as it can, saving data into a Mongo document store.For more, please see the full documentation at:http://baleen-ingest.readthedocs.org/en/latest/
Package: balena-sdk
Balena SDKThe officialbalenaSDK for python.RoleThe intention of this module is to provide developers a nice API to integrate their python applications with balena.InstallationInstall the balena SDK:From Source:https://github.com/balena-io/balena-sdk-pythonFrom git:pip install git+https://github.com/balena-io/balena-sdk-python.gitExample of installing on a Debian container:FROM balenalib/amd64-debian:stretch

# Install python 3 and balena SDK dependencies.
RUN install_packages build-essential python3 python3-pip python3-setuptools \
    python3-dev libffi-dev libssl-dev

# Install balena python SDK in python 3.
RUN pip3 install balena-sdkExample of installing on a Alpine Linux container:FROM balenalib/amd64-alpine:3.9

# Install python 3 and balena SDK dependencies.
RUN install_packages build-base python3 py3-setuptools python3-dev libffi-dev openssl-dev

# Install balena python SDK in python 3.
RUN pip3 install balena-sdkPlatformsWe also supportNodeJS SDK.Basic Usage>>>frombalenaimportBalena>>>balena=Balena()>>>credentials={'username':<youremail>,'password':<yourpassword>}>>>balena.auth.login(**credentials)...DocumentationWe generate markdown documentation inDOCUMENTATION.md.To generate the documentation run:pythondocs_generator.py>DOCUMENTATION.mdDeprecation policyThe balena SDK for Python usessemver versioning, with the concepts of major, minor and patch version releases.The latest release of the previous major version of the balena SDK will remain compatible with the balenaCloud backend services for one year from the date when the next major version is released.
For example, balena SDK v8.1.1, as the latest v8 release, would remain compatible with the balenaCloud backend for one year from the date when v9.0.0 is released.At the end of this period, the older major version is considered deprecated and some of the functionality that depends on balenaCloud services may stop working at any time.
Users are encouraged to regularly update the balena SDK to the latest version.Developing locallyThis project usespoetryfor dependency management. In order to install all the needed dependencies please runpoetry install.Linting and FormattingThis project usesblackfor code formatting andflake8for linting.To format this project please usepoetry run black . -l 120To verify linting you can runpoetry run flake8 --max-line-length=120TestsTo run the tests, first create a.envfile with your test user configuration, e.g.:[Credentials]
email=my_test_user@balena.io
user_id=my_test_user
password=123456my_passwordYou can optionally change the target API endpoint too, e.g.api_endpoint=https://api.balena-cloud.com.Then runpython -m unittest discover tests -v.SupportIf you're having any problem, pleaseraise an issueon GitHub and the balena team will be happy to help.ContributeIssue Tracker:github.com/balena-io/balena-sdk-python/issuesSource Code:github.com/balena-io/balena-sdk-pythonLicenseThe project is licensed under the MIT license.