Saravanan666/pypi-org huggingface dataset:
Package: tb-rest-client3
# ThingsBoard Python REST API clientThe ThingsBoard REST API Client helps you interact with [ThingsBoard REST API](https://thingsboard.io/docs/reference/rest-api/) from your Python script.
With [Python Rest Client](https://thingsboard.io/docs/reference/python-rest-client/) you can programmatically create assets, devices, customers, users and other entities and their relations in ThingsBoard.The recommended method for installing the Rest Client is a pip.The Python version of the REST API client is under developing. If you have discovered any bug, please write us using email or by opening the issue.##### InstallationIn order to install the ThingsBoard REST client, you should use the following command:`bash pip3 installtb-rest-client`##### ExamplesYou can find the examples of the usage in the “examples” folder or on the [our website](https://thingsboard.io/docs/reference/python-rest-client/).Note:There are 2 REST clients for ThingsBoard, they are depend on version of the ThingsBoard, you use.If you use the ThingsBoard Community Edition (ThingsBoard CE) - please use the following command to import the REST client into your script:from tb_rest_client.rest_client_ce import *The REST client class has name “RestClientCE”.If you use the ThingsBoard Professional Edition (ThingsBoard PE) - please use the following command to import the REST client into your script:from tb_rest_client.rest_client_pe import *The REST client class has name “RestClientPE”.If you use the wrong version of the REST client, it could work unexpectedly.## Support[Community chat](https://gitter.im/thingsboard/chat)[Q&A forum](https://groups.google.com/forum/#!forum/thingsboard)[Stackoverflow](http://stackoverflow.com/questions/tagged/thingsboard)Don’t forget to star the repository to show your ❤️ and support.## LicensesThis project is released under [Apache 2.0 License](./LICENSE).
Package: tb-rest-client32
# ThingsBoard Python REST API clientThe ThingsBoard REST API Client helps you interact with [ThingsBoard REST API](https://thingsboard.io/docs/reference/rest-api/) from your Python script.
With [Python Rest Client](https://thingsboard.io/docs/reference/python-rest-client/) you can programmatically create assets, devices, customers, users and other entities and their relations in ThingsBoard.The recommended method for installing the Rest Client is a pip.The Python version of the REST API client is under developing. If you have discovered any bug, please write us using email or by opening the issue.##### InstallationIn order to install the ThingsBoard REST client, you should use the following command:`bash pip3 installtb-rest-client`##### ExamplesYou can find the examples of the usage in the “examples” folder or on the [our website](https://thingsboard.io/docs/reference/python-rest-client/).Note:There are 2 REST clients for ThingsBoard, they are depend on version of the ThingsBoard, you use.If you use the ThingsBoard Community Edition (ThingsBoard CE) - please use the following command to import the REST client into your script:from tb_rest_client32.rest_client_ce import *The REST client class has name “RestClientCE”.If you use the ThingsBoard Professional Edition (ThingsBoard PE) - please use the following command to import the REST client into your script:from tb_rest_client32.rest_client_pe import *The REST client class has name “RestClientPE”.If you use the wrong version of the REST client, it could work unexpectedly.## Support[Community chat](https://gitter.im/thingsboard/chat)[Q&A forum](https://groups.google.com/forum/#!forum/thingsboard)[Stackoverflow](http://stackoverflow.com/questions/tagged/thingsboard)Don’t forget to star the repository to show your ❤️ and support.## LicensesThis project is released under [Apache 2.0 License](./LICENSE).
Package: tbscm
*** ATTENTION ***Don't immidiately runpip install tbscm. See SectionInstallation.Tree-based Synthetic Control Methods (tbscm)This package implements the Tree-based Synthetic Control Methods (tbscm) from Mühlbach & Nielsen (2021), seehttps://arxiv.org/abs/1909.03968.The method is essentially a nonparametric extension of the classic synthetical control group estimator proposed by Alberto Abadie and co-authors.Please contact the authors below if you find any bugs or have any suggestions for improvement. Thank you!Author: Nicolaj Søndergaard Mühlbach (n.muhlbach at gmail dot com, muhlbach at mit dot edu)Code dependenciesThis code has the following dependencies:Python >=3.6numpy >=1.19pandas >=1.3mlregression >=0.1.6Note thatmlregressionin turn depends onscikit-learn >=1scikit-learn-intelex >= 2021.3daal >= 2021.3daal4py >= 2021.3tbb >= 2021.4xgboost >=1.3lightgbm >=3.2InstallationBefore callingpip install tbscm, we recommend installingmlregression. For installation ofmlregressionand dependensies, please visit:https://pypi.org/project/mlregression/.UsageWe demonstrate the use ofmlregressionbelow, using random forests, xgboost, and lightGBM as underlying regressors.#------------------------------------------------------------------------------# Libraries#------------------------------------------------------------------------------# Standardimporttime,randomimportnumpyasnp# Userfromtbscm.utilsimportdatafromtbscm.synthetic_controlsimportSyntheticControlasSCfromtbscm.synthetic_controlsimportTreeBasedSyntheticControlasTBSCfromtbscm.synthetic_controlsimportElasticNetSyntheticControlasENSC#------------------------------------------------------------------------------# Settings#------------------------------------------------------------------------------# Number of covariatesp=2ar_lags=3# Number of max models to runmax_n_models=5# Data settingsdata_settings={# General"T0":500,"T1":500,"ate":1,# Errors"eps_mean":0,"eps_std":1,"eps_cov_xx":0,# How the X's covary with each other"eps_cov_yy":0.1,# How the X's covary with y# X"X_type":"AR","X_dist":"normal","X_dim":p,"mu":0,"sigma":1,"covariance":0,"AR_lags":ar_lags,"AR_coefs":1/np.exp(np.arange(1,ar_lags+1)),# Y=f*"f":data.generate_linear_data,# generate_linear_data, generate_friedman_data_1, generate_friedman_data_2,}# Start timert0=time.time()# Set seedrandom.seed(1991)#------------------------------------------------------------------------------# Simple example#------------------------------------------------------------------------------# Generate datadf=data.simulate_data(**data_settings)# True ateate=data_settings["ate"]# Extract dataY=df["Y"]W=df["W"]X=df[[colforcolindf.columnsif"X"incol]]# Instantiate SC-objectssc=SC()tbsc=TBSC(max_n_models=max_n_models)ensc=ENSC(max_n_models=max_n_models)# Fitsc.fit(Y=Y,W=W,X=X)print(f"Estimated ATE using SC:{np.around(sc.average_treatment_effet_,2)}")tbsc.fit(Y=Y,W=W,X=X)print(f"Estimated ATE using TB-SC:{np.around(tbsc.average_treatment_effet_,2)}")ensc.fit(Y=Y,W=W,X=X)print(f"Estimated ATE using EN-SC:{np.around(ensc.average_treatment_effet_,2)}")# Bootstrapbootstrapped_results=tbsc.bootstrap_ate()
Package: tbs-fusion-py
tbs-fusion-pyOverviewtbs-fusion-py is a Python package to control theTBS Fusionanalog video receiver module. The package uses the "TBS Fusion Serial Protocol" to control one or multiple
TBS Fusion devices over a single wire or RS-485 serial connection. The protocol document on the page
linked above contains detailed information on how to connect and configure the TBS Fusion so that
it can be used with this package.FunctionalityThe following Functionality is currently supported:Setting the operating frequency.Getting the current operating frequency and RSSI (Received Signal Strength Indicator) of each receiver.Acquiring the RSSI for a frequency range.Acquiring the RSSI for a list of frequencies.ExamplesExamples can be found in theexamples directory.InstallationYou can use pip to install this package from PyPi:pip install tbs-fusion-py
Package: tbtamr
tbtAMRtbtAMRimplements TB-profiler and custom logic developed at MDU to identify mutations linked to AMR mechanisms inM. tuberculosisand generate reports suitable for public health in Victoria. It may also be suitable for use in research settings.tbtAMRis now accredited to ISO15189 standard by NATA for use in Victoria Australia.tbtAMR installationIn order to installtbtAMRconda is strongly recommended - installation instructions can be foundhere.git clone git@github.com:kristyhoran/tbtamr.git
cd tbtamr
conda env create -f environment.yml
conda activate tbtamr
pip3 install .
tbtamr setup
tbtamr checktbtAMR DBtbtAMRcomes with a modified mutational database, defined by validation at MDU for the purposes of reporting mutations in a public health and clinical setting in Victoria.This database was created usingtb-profiler create_db(from MDU fork of pathogen-profiler)The following files are required in order to generate a custom databasegenome.fastathe reference for mutations in the databasegenome.fasta.faigenome.gffbarcode.bedacsvfileheaderGene,Mutation,Drug,Confers,InteractionCreation can be done by navigating to a storage directory and runningconda activate tb-profile-env
tb-profiler create_db -p <db_prefix> -c <path_to_csv> --custom --db_name <name_of_db> --db_commit <some_unique_string> --db_author <name_of_author> --db_date <date_created>
Package: tbtc
tBTC.pyA python client to interact with thetbtcprotocol.tBTC Protocol version:1.1.0Setup:Create & activate virtulenv (python 3.6+)Install the library using pypi.pip install tbtcUsage:Initialize the tbtc system>>> from tbtc.session import init_web3
>>> node_url = os.getenv("ROPSTEN_URL")
>>> private_key = os.getenv("TBTC_PRIVATE_KEY")
>>> w3 = init_web3(node_url)
>>> version = "1.1.0"
>>> t = TBTC(version, w3, 'testnet', private_key)Get lot sizes>>> lot_sizes = t.get_available_lot_sizes()Create a deposit contract>>> logs = t.create_deposit(lot_sizes[0])Exampletxncreated the depositcontractGet the bitcoin address for depositing BTC>>> d = Deposit(
... t, 
... logs[0]['args']['_depositContractAddress'],
... logs[0]['args']['_keepAddress']
... )
>>> address = d.get_signer_public_key()Exampletxnretrieved the address: tb1q38yzl97hg0vnn4wf7srguwjnmlgfa30uq3nrwtDevelopment:Clone & enter the repo.git clone https://github.com/ankitchiplunkar/tbtc.py.gitInstall required libraries.pip install -r requirements.txtTesting:Run the tests locallypytest -vv tests/
Package: tbtool
DNA AUDIT TOOLDNA Audit tool helps you to check whether the application built on AWS is following the AWS Well-Architected framework by validating it against
various AWS services security requirements and the best practices. Generates report to validate the security requirements and security best practices.AWS Hardening Standards & Best Practiceshttps://codaglobal.atlassian.net/l/cp/UP1BxJTrAWS Tagging Standardshttps://codaglobal.atlassian.net/l/cp/oj0NgsdbAWS Naming Standardshttps://codaglobal.atlassian.net/l/cp/s99nYLECAudit tool setupThe project basically uses boto client to connect to the aws services.Update the session credentials in the terminal.Specify the region name if you need to perform the audit for services in a specific region by mentioning the region name as argument while running the program.If no region is specified us-east-1 is taken as default region and audit checks are performed for the services in us-east-1.If you need to check tags. Update the Config.Json file by mentioning the tags in the account tags provided.Audit Tool ExecutionCreating Virtual Environmentpython3 -m venv venvActivating the virtual environmentsource venv/bin/activateInstalling the dependencies in the virtual environmentpip install -r requirements.txtRun the following commandpython3 src/main.py --region {region_name}Test Cases ExecutionnosetestsFinal ReportThe overall report is provided as a HTML document.sample report
Package: tbtool1
DNA AUDIT TOOLDNA Audit tool helps you to check whether the application built on AWS is following the AWS Well-Architected framework by validating it against
various AWS services security requirements and the best practices. Generates report to validate the security requirements and security best practices.AWS Hardening Standards & Best Practiceshttps://codaglobal.atlassian.net/l/cp/UP1BxJTrAWS Tagging Standardshttps://codaglobal.atlassian.net/l/cp/oj0NgsdbAWS Naming Standardshttps://codaglobal.atlassian.net/l/cp/s99nYLECAudit tool setupThe project basically uses boto client to connect to the aws services.Update the session credentials in the terminal.Specify the region name if you need to perform the audit for services in a specific region by mentioning the region name as argument while running the program.If no region is specified us-east-1 is taken as default region and audit checks are performed for the services in us-east-1.If you need to check tags. Update the Config.Json file by mentioning the tags in the account tags provided.Audit Tool ExecutionCreating Virtual Environmentpython3 -m venv venvActivating the virtual environmentsource venv/bin/activateInstalling the dependencies in the virtual environmentpip install -r requirements.txtRun the following commandpython3 src/main.py --region {region_name}Test Cases ExecutionnosetestsFinal ReportThe overall report is provided as a HTML document.sample report
Package: tbtool2
DNA AUDIT TOOLDNA Audit tool helps you to check whether the application built on AWS is following the AWS Well-Architected framework by validating it against
various AWS services security requirements and the best practices. Generates report to validate the security requirements and security best practices.AWS Hardening Standards & Best Practiceshttps://codaglobal.atlassian.net/l/cp/UP1BxJTrAWS Tagging Standardshttps://codaglobal.atlassian.net/l/cp/oj0NgsdbAWS Naming Standardshttps://codaglobal.atlassian.net/l/cp/s99nYLECAudit tool setupThe project basically uses boto client to connect to the aws services.Update the session credentials in the terminal.Specify the region name if you need to perform the audit for services in a specific region by mentioning the region name as argument while running the program.If no region is specified us-east-1 is taken as default region and audit checks are performed for the services in us-east-1.If you need to check tags. Update the Config.Json file by mentioning the tags in the account tags provided.Audit Tool ExecutionCreating Virtual Environmentpython3 -m venv venvActivating the virtual environmentsource venv/bin/activateInstalling the dependencies in the virtual environmentpip install -r requirements.txtRun the following commandpython3 src/main.py --region {region_name}Test Cases ExecutionnosetestsFinal ReportThe overall report is provided as a HTML document.sample report
Package: tbtrim
tbtrimtbtrimis a utility to trim Python traceback information. By assigning user-refinedsys.excepthook, one can easily customize the behavior after an exception is raise and uncaught, and just before the interpreter prints out the given traceback and exception tosys.stderr.In a more human-readable way,tbtrimis to let you handle the last words of a program when it exits because of an exception.InstallationSimply run the following to install the current version from PyPI:$pipinstalltbtrimOr install the latest version from the git repository:gitclonehttps://github.com/gousaiyang/tbtrim.gitcdtbtrim
pipinstall-e.# and to update at any timegitpullUsageset_trim_rule(predicate,target=BaseException,exclude=None,strict=False,exception=None)Set the rule for trimming traceback (will setsys.excepthookandthreading.excepthookif available).You can determine whether to start trimming traceback items based on the filename (usingpredicate), and can choose to trim traceback only for some certain exceptions (usingtargetandexclude).Args:predicate(function): a function which takes onestrparameter (the filename of a traceback item) and returnsbool(returningTrueindicates that this traceback item and the following items should be trimmed)target(class_or_tuple): an exception or a tuple of exceptions may be given to trim traceback only for those exceptionsexclude(class_or_tuple): an exception or a tuple of exceptions may be given to exclude them from traceback trimmingstrict(bool): indicate whether to check an exception againsttargetandexcludein a strict mode (settingTrueusesisto check,Falseusesissubclassto check)exception(class_or_tuple): this is a deprecated alias ofexclude, retained for backward compatibilityclear_trim_rule()Clear the rule for trimming traceback (restore the excepthooks).
Package: tbvaccine
TBVaccine is a utility that pretty-prints Python tracebacks. It automatically
highlights lines you care about and deemphasizes lines you don’t, and colorizes
the various elements in a traceback to make it easier to parse.Here are some screenshots. This is the before:And this is the after:If you add the hook or call TBVaccine in your code, it can also print all
variables in each stack frame. That is, it turns this:into this:InstallationTo install, usepip:pip install tbvaccineYou are done!Global usageYou can have TBVaccine insert itself all up in your system and stick its tentacles in
all your libraries, like a cute, useful Cthulhu. That way, every single Python
traceback in your system will be pretty. Just set theTBVACCINEenvironment
variable to 1, and you’re done.E.g. for bash:export TBVACCINE=1Or fish:set -x TBVACCINE=1Usage as a command-line utilityTBVaccine can be used from the command line several ways.:python -m tbvaccine myscript.pyOr just pipe STDERR into it from the program you want to watch:./myscript.py 2>&1 | tbvaccineAnd all the tracebacks will now be pretty!Usage as a Python libraryThere are various ways to use TBVaccine as a Python library.Initialize it like so:from tbvaccine import TBVaccine
tbv = TBVaccine(
    code_dir="/my/code/dir",
    isolate=True
)code_dirmarks the directory we code about. Files under that directory that
appear in the traceback will be highlighted. If not passed, the current
directory, as returned byos.getcwd()will be used.IfisolateisFalse, all lines are colorized, andcode_diris
ignored.Ifshow_varsisFalse, variables will not be printed in each stack
frame.To use it in anexceptblock:from tbvaccine import TBVaccine
try:
    some_stuff()
except:
    print(TBVaccine().format_exc())To make it the default way of printing tracebacks, useadd_hook()(which
also accepts any argument theTBVaccineclass does):import tbvaccine
tbvaccine.add_hook(isolate=False)

1 / 0Bam! Instant pretty tracebacks.Logging integrationYou can integrate TBVaccine with logging like so:class TbVaccineFormatter(logging.Formatter):
    def  formatException(self, exc_info):
        return TBVaccine(isolate=True).format_exc()

sh = logging.StreamHandler()
sh.setFormatter(TbVaccineFormatter('[%(levelname)s] %(asctime)s : %(message)s', '%Y-%m-%d %H:%M:%S'))
logger.addHandler(sh)EpilogueThis library is still pretty new, please contribute patches if something doesn’t
work as intended, and also please tell your friends about it! Hopefully one day
it will be implemented in the Python interpreters themselves.– Stavros
Package: tbvcfreport
tbvcfreportA tool to generate an interactive HTML-based report from SnpEff annotated VCF file(s) with links to the Combat-TB-Explorer.UsagePrerequisites:python-pipSnpEffannotatedM.tuberculosisVCF file(s).ACombat-TB-NeoDBinstance,tbvcfreportdefaults toneodb.sanbi.ac.za.Seecombat-tb-neodbif you want a local installation andexport DATABASE_URI=localhostfortbvcfreportto use your local instance.InstallationUsingpip$pipinstall-ihttps://test.pypi.org/simple/tbvcfreport
...From source$gitclonehttps://github.com/COMBAT-TB/tbvcfreport.git
...
$cdtbvcfreport
$virtualenvenvname
$sourceenvname/bin/activate
$pipinstall-rrequirements.txt
$pipinstall-e.Runtbvcfreport$tbvcfreport--help
Usage:tbvcfreport[OPTIONS]COMMAND[ARGS]...GenerateanHTML-basedVCFreportfromSnpEffannotatedVCFfile(s).

Options:--helpShowthismessageandexit.

Commands:generateGenerateaninteractiveHTML-basedVCFreport.$tbvcfreportgenerate--help
Usage:tbvcfreportgenerate[OPTIONS]VCF_DIRGenerateaninteractiveHTML-basedVCFreport.

Options:-t,--tbprofiler-reportFILENAMETBProfilerjsonreport.-f,--filter-udi/-nf,--no-filter-udiFilterupstream,downstreamandintergenicvariants.[default:True]--helpShowthismessageandexit.$tbvcfreportgenerateVCF_DIR/
Processing...This will generate a{vcf-file-name}.htmlfile in the current working directory (pwd).In Galaxy:construction:We have also addedtbvcfreportto theGalaxyTest Tool Shed.Kindly seethis repositoryfor the latest revision.
Package: tbw
TBWA wrapper to facilitate Tensorboard logging.OverviewDocumentationCheckout thedocumentationof TBW to learn more details about how to use our codebase.Installationpipinstalltbw# with pip from PyPIpipinstallgit+'https://github.com/ramyamounir/TBW'# with GitHubUsageNote: More examples available in the documentationsimporttorchfromtbwimportTBWrapperwrapper=TBWrapper('logs')# path to logging directoryloss_writer=wrapper('scalar','loss')for_inrange(10):loss_writer(torch.randn(1))delwrapper
Package: tbwk-opener
tbwk-openerA python package to open and read tbwk files generated from the NanoDrop 2000 software.Testing:FeaturesThis library has so far only been tested with Nucleic Acid worksheets.Can import tbwk files to read measurements contained within the fileSuccessfully reads y- and x-values of a recorded spectrumAlso reports on tabled data contained in the worksheet (such as A260 for nucleic acids,
or direct nucleic concentration as chosen by the method)A protein worksheet (no example provided) showed similar behaviour and should work without any issues.InstallationMake sure you've installed numpy and scipy before attempting to install tbwk-opener from pip, then use:pipinstalltbwk-openerUsageGet all measurements from a worksheet and report on concentration using the absorption at 260 nm:fromtbwkimportWorksheetworksheet=Worksheet.import_worksheet("examples/nanodrop-dna-measurements-01.twbk")factor=(2.05+2.30)/2# Î¼M per absorption unitformeasurementinworksheet:print(f"{measurement.title:20}{measurement.get_absorption_at(260)*factor:.2f}Î¼M")wash                0.18 Î¼M
blank               0.02 Î¼M
BSD01               61.47 Î¼M
BSD01               61.11 Î¼M
BSD01 cntl A1       37.87 Î¼M
wash                0.57 Î¼M
BSD01 cntl A2       33.94 Î¼M
wash                0.27 Î¼M
BSD01 cntl A3       44.39 Î¼M
BSD01 cntl A3       0.35 Î¼M
BSD01 cntl A4       40.00 Î¼M
wash                0.05 Î¼M
wash                0.02 Î¼M
Package: tb-wrapper
Tb_wrapperDescriptionThis wrapper allows us to use the Python API client of Thingsboard.InstallationTB wrapper requirementstb_rest_clientThingsboardThingsboardpipinstalltb_wrapperFeaturesManage Entities such as Devices and AssetsAccess to thingsboard account using credentials stored into filesCreate AlarmsBuildRequirementstwineRequirementspythonRequirementssetuptoolsStepsFirst of all, change the version of the release to the latest version at the pyproject.toml file[project]
name = "<my project name>"
version = "<my-version"Create the dist directory used to upload the package into Pypipython3-mbuildUpload the new version of the package using twinetwineuploaddist/*and use Username and Password based on API Token