Saravanan666/pypi-org huggingface dataset:
Package: tf-metric-learning
tf-metric-learningOverviewMinimalisticopen-source library for metric learning written inTensorFlow2, TF-Addons, Numpy, OpenCV(CV2) andAnnoy. This repository contains a TensorFlow2+/tf.keras implementation some of the loss functions and miners. This repository was inspired bypytorch-metric-learning.InstallationPrerequirements:pip install tensorflow
pip install tensorflow-addons
pip install annoy
pip install opencv-contrib-pythonThis library:pip install tf-metric-learningFeaturesAll the loss functions are implemented as tf.keras.layers.LayerCallbacks for Computing Recall, Visualize Embeddings in TensorBoard ProjectorSimple Mining mechanism with AnnoyCombine multiple loss functions/layers in one modelOpen-source reposThis library contains code that has been adapted and modified from the following great open-source repos, without them this will be not possible (THANK YOU):pytorch-metric-learninggeonmnixingyangdaigo0927TODODiscriminative layer optimizer (different learning rates) for Loss with weights (Proxy, SoftTriple, ...)TODOSome Tests 😇Improve and add more minerssExamplesimporttensorflowastfimportnumpyasnpfromtf_metric_learning.layersimportSoftTripleLossfromtf_metric_learning.utils.constantsimportEMBEDDINGS,LABELSnum_class,num_centers,embedding_size=10,2,256inputs=tf.keras.Input(shape=(embedding_size),name=EMBEDDINGS)input_label=tf.keras.layers.Input(shape=(1,),name=LABELS)output_tensor=SoftTripleLoss(num_class,num_centers,embedding_size)({EMBEDDINGS:inputs,LABELS:input_label})model=tf.keras.Model(inputs=[inputs,input_label],outputs=output_tensor)model.compile(optimizer="adam")data={EMBEDDINGS:np.asarray([np.zeros(256)foriinrange(1000)]),LABELS:np.zeros(1000,dtype=np.float32)}model.fit(data,None,epochs=10,batch_size=10)More complex scenarios:Complex example with NPair Loss + Multi Similarity + Classification and MiningSoftTriple Training on CIFAR 10ProxyAnchor Loss using tf.data.DatasetTriplet Training with MiningContrastive TrainingClassification baselineFeaturesLoss functionsMultiSimilarityLoss✅ProxyAnchorLoss✅SoftTripleLoss✅NPairLoss✅TripletLoss✅ContrastiveLoss✅MinersMaximumLossMiner [TODO]TripletAnnoyMiner ✅EvaluatorsAnnoyEvaluator Callback: for evaluation Recall@K, you will need to install Spotifyannoylibrary.importtensorflowastffromtf_metric_learning.utils.recallimportAnnoyEvaluatorCallbackevaluator=AnnoyEvaluatorCallback(base_network,{"images":test_images[:divide],"labels":test_labels[:divide]},# images stored to index{"images":test_images[divide:],"labels":test_labels[divide:]},# images to querynormalize_fn=lambdaimages:images/255.0,normalize_eb=True,eb_size=embedding_size,freq=1,)VisualizationsTensorboard Projector Callbackimporttensorflowastffromtf_metric_learning.utils.projectorimportTBProjectorCallbackdefnormalize_images(images):returnimages/255.0(train_images,train_labels),(test_images,test_labels)=tf.keras.datasets.cifar10.load_data()...projector=TBProjectorCallback(base_model,"tb/projector",test_images,# list of imagesnp.squeeze(test_labels),normalize_eb=True,normalize_fn=normalize_images)
Package: tfmini
TFminiInstallInstall usingpip:pip install -U tfminiUsageReading the sensor returns the range in meters.importtimefromtfminiimportTFmini# create the sensor and give it a port and (optional) operating modetf=TFmini('/dev/tty.usbserial-A506BOT5',mode=TFmini.STD_MODE)try:print('='*25)whileTrue:d=tf.read()ifd:print(f'Distance:{d:5}')else:print('No valid response')time.sleep(0.1)exceptKeyboardInterrupt:tf.close()print('bye!!')TFmini(port, mode=5, retry=2): the constructor takes several inputsport: serial port the sensor is connected toomode: either pixhawk (default) or standard moderetry: how many times the driver should search the serial port for the packet header. This only applies in standard mode.read(): in any mode, returns the distance in metersTFmini.strength: in standard mode, each packet contains the returned IR strength level. In decimal mode, this doesn't exist and is always set to -1.Standard (Packet) ModeIn this mode, a data packet is sent from the sensor:packet = [0x59, 0x59, distL, distH, strL, strH, reserved, integration time, checksum]Where the first two bytes0x59, 0x59are the header and each packet has a
checksum to ensure the packet is valid data.PixHawk (String) ModeIn this mode, the sensor can sometimes returns an incorrect value because the
ASCII string was read wrong across the serial port. There is no error checking
in this mode.Distance:  2.96
Distance:  2.96
Distance:  96.0 <<< Error
Distance:  2.95
Distance:  2.95
Distance:  2.96ReferencesSparkfun product pageManufacturer produce pageMIT LicenseCopyright (c) 2018 Kevin WalchkoPermission 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: tfmiss
tfmissThe missing OPs, layer & etc. for TensorFlowDevelopmentEnvironmentInstall alldependencies including python headers.
Do not usepyenvon MacOS X, otherwise tests mostly likely will fail.Build PIP package manuallyYou can build the pip package with Bazel v0.25.3:# GPU supportexportTF_NEED_CUDA="1"# Set these if the below defaults are different on your systemexportTF_CUDA_VERSION="11.2"exportTF_CUDNN_VERSION="8"exportCUDA_TOOLKIT_PATH="/usr/local/cuda"exportCUDNN_INSTALL_PATH="/usr/lib/x86_64-linux-gnu"./configure.py
bazelclean--expunge
bazeltest--test_output=errors//tfmiss/...
bazelbuildbuild_pip_pkg
bazel-bin/build_pip_pkgwheelsBuild release with Linux docker container# Requires about 4Gb of RAM allocated to DockerDOCKER_BUILDKIT=1dockerbuild-tmiss--outputtype=local,dest=wheels--build-argPY_VERSION=3.8./Install and test PIP packageOnce the pip package has been built, you can install it with:pipinstallwheels/*.whlNow you can test out the pip package:cd/
python-c"import tensorflow as tf;import tfmiss as tfm;print(tfm.text.zero_digits('123').numpy())"You should see the op zeroed out all nonzero digits in string "123":000
Package: tfmock
tf mock is a great tool help run terraform codes without cloud support.Featuresterraform provider requests mockaz cli mockpython modules integrate with tftestFutureInstallpip install tfmockdon't forget trust the certificate if you are in windows or mac, find the certificate inside the tfmock-xx.egg-info bin folderwindowsImport-Certificate -FilePath public.pem -CertStoreLocation "Cert:\CurrentUser\Root"macossudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain public.pem
Package: tfmops
Morphological Operators implemented with TensorFlow.Free software: Apache Software License 2.0Installationpip install mopsYou can also install the in-development version with:pip install https://github.com/tobibias/mops/archive/main.zipDocumentationhttps://mops.readthedocs.io/DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.0 (2022-05-25)First release on PyPI.
Package: tfmpc
tf-mpcQuickstarttfmpcis a Python3.6+ package available in PyPI.$ pip3 install -U tfmpcUsage$tfmpcilqr--help

Usage:tfmpcilqr[OPTIONS]ENVRuniLQRforagivenenvironmentandhorizon.Args:ENV:Pathtotheenvironment'sconfigJSONfile.

Options:--onlineOnlinemodeflag.[default:False]--ignore-final-costIgnorestate-dependentfinalcost.[default:False]-hr,--horizonINTEGERRANGEThenumberoftimesteps.[default:10]--atolFLOATRANGEAbsolutetoleranceforconvergence.[default:0.005]-miter,--max-iterationsINTEGERRANGEMaximumnumberofiterations.[default:100]--logdirPATHDirectoryusedforloggingresults.[default:/tmp/ilqr/]-ns,--num-samplesINTEGERRANGENumberofruns.[default:1]-nw,--num-workersINTEGERRANGENumberofworkerprocesses(min=1,max=12).[default:1]-v,--verboseVerbositylevelflag.--helpShowthismessageandexit.ExamplesLQR$pythonexamples/lqr.py

Trajectory(init=[-0.9436722-5.9413767-9.7090645],final=[-6.8312743.53974370.79844564],total=-34.2876)Steps|States|Actions|Costs=====|==============================|==============================|========0|[-29.6400,12.4868,-6.1247]|[12.0202,6.2650,2.7019]|9.94911|[1.1229,-1.0781,-0.9041]|[24.8006,16.6294,-10.9740]|49.66772|[-8.8750,2.3962,-4.4266]|[3.7858,3.3769,-1.8138]|-1.64553|[-9.3617,3.2755,-3.5806]|[11.8333,7.8142,-3.6503]|-11.43924|[-6.6389,2.0026,-3.2240]|[11.3348,7.6663,-4.2552]|-11.87035|[-7.7849,2.3658,-3.6332]|[9.6319,6.4642,-3.2991]|-12.26326|[-7.5215,2.4822,-3.0080]|[10.1523,6.7136,-3.4948]|-12.72557|[-6.2336,1.5849,-2.9592]|[9.6488,6.2573,-3.1976]|-12.88308|[-8.7144,2.0473,-4.4850]|[10.1518,6.4578,-2.9710]|-11.60119|[-6.8313,3.5397,0.7984]|[8.3644,5.6785,-3.5642]|-12.9032Linear Navigation$pythonexamples/navigation_lqr.pyGoal=[[-17.498825073242188],[-55.275390625]]Trajectory(init=[0.0.],final=[-17.498783-55.275257],total=-32385.3555)Steps|States|Actions|Costs=====|====================|====================|==========0|[-12.8100,-40.4644]|[-12.8100,-40.4644]|900.73201|[-16.2425,-51.3068]|[-3.4324,-10.8424]|-3055.55712|[-17.1622,-54.2120]|[-0.9197,-2.9052]|-3339.60643|[-17.4086,-54.9905]|[-0.2464,-0.7784]|-3360.00024|[-17.4747,-55.1990]|[-0.0660,-0.2086]|-3361.46445|[-17.4924,-55.2549]|[-0.0177,-0.0559]|-3361.56966|[-17.4971,-55.2699]|[-0.0047,-0.0150]|-3361.57747|[-17.4984,-55.2739]|[-0.0013,-0.0040]|-3361.57768|[-17.4987,-55.2750]|[-0.0003,-0.0011]|-3361.57749|[-17.4988,-55.2753]|[-0.0001,-0.0003]|-3361.5776DocumentationPlease refer tohttps://tfmpc.readthedocs.io/for the code documentation.LicenseCopyright (c) 2020- Thiago P. Bueno All Rights Reserved.tfmpc is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.tfmpc is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with tfmpc. If not, seehttp://www.gnu.org/licenses/.
Package: tf-multilabelloss
tf-multilabellossCreate a multilabelloss which can help as when we working on multilabel classification model.
meaning of multilabel classification is that:-develop a single model that will provide binary classification predictions for each of the num_classIn other words it will predict 'positive' or 'negative' for all class.how to use tf-multilabellossfrommulti_label_loss.multilabellossimportMultilabelLosspredictions=Dense(len(num_class),activation="sigmoid")(x)model=Model(inputs=base_model.input,outputs=predictions)model.compile(optimizer='adam',loss=MultilabelLoss(num_class),metrics=['binary_accuracy'])installationpipinstalltf-multilabelloss
Package: tfm-utils
tfm_utilsTranscription Factor Motif UtilsDocsThis package is meant to be an improvement on thepytfmpvalbyJared Andrewswhich is itself
a wrapper for the incredibly usefulTFM-Pvalue C++ program.
It allows users to determine score thresholds for a given transcription factor position frequency matrix
associated with a specific p-value. Naturally, it can also perform the reverse, quickly calculating an accurate
p-value from a score for a given motif matrix.Thepytfmpvalis archived and has several super annoying uncaught
excpetions that cause the whole program to crash every time there is any error so to start this package will focus
on:1. making this package more robust at runtime
2. modernizing the interface a bit
    2.1. This primarily includes adding support for pandas and numpy arrays as opposed to purely white space delimited lists and the likeThis should make everyhting better to use and make it feel like you are writing python code
instead or old school R or something.tfm_utilsallows this functionality to be easily utilized within a Python script, module, or package.See full documentation and use exampleshere.Installationtfm_utils is on PyPI, so you can install viapipeasily:pip install tfm_utilsor locally with:git clone repo_name_here
cd tfm_utils
CC=clang CXX=clang++ python -m pip install e .You need to use the weird install function to get the C++ code to workAcknowledgmentsJared Andrewsdid most of the hard work on this project
I just wanted to fix a few things that were bugging me and his version was archived. It seems
like a pretty open license so I assume this is all chill.ContributeAny and all contributions are welcome. Bug reporting via theIssue Trackeris much appreciated. Here's how to contribute:Fork therepoon github (seeforking help.)Make your changes/fixes/improvements locally.Optional, but much-appreciated: write some tests for your changes. (Don't worry about integrating your tests into the test framework - writing some in your commit comments or providing a test script is fine. I will integrate them later.)Send a pull request (seepull request help).Reference| Efficient and accurate P-value computation for Position Weight Matrices
| H. Touzet and J.S. Varré
|Algorithms for Molecular Biology 2007, 2:15LicenseThis project is licensed under the GPL3 license. You are free to use, modify, and distribute it as you see fit. The program is provided as is, with no guarantees.
Package: tfmv
tfmvSimple tool for moving / renaming resources in one or several terraform configurations.When moving or renaming resources or modules in terraform configurations, objects in the corresponding state
are typically destroyed and recreated byterraform apply.This may be impractical, or impossible for certain resources, and the objects in the state must be moved manually,
one by one, to prevent this.This tool helps to automate this state operation.The operations are:terraform state pullto get local copies of the remote state(s)terraform state listto identify objects matching the given prefixterraform state mvis called to move or rename the resource based on the prefixterraform state pushto push the modified state back to the remotecleanlocal filesUsage:rename:tfmvgoogle_compute_network.old_namegoogle_compute_network.new_name--src/home/vincent/my-projectmove from root to module:tfmvgoogle_compute_network.vpcmodule.my_module.google_compute_network.vpc--src/home/vincent/my-projectrenaming module:tfmvmodule.my_modulemodule.my_module_renamed--src/home/vincent/my-project
Package: tf-nightly
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.
Package: tf-nightly-cpu
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.
Package: tf-nightly-cpu-aws
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.
Package: tf-nightly-gpu
tf-nightly-gpu has been removed. Please install tf-nightly instead.
The tf-nightly package supports GPU accelerated operations via Nvidia CUDA.Removal Informationtf-nightly and tf-nightly-gpu have been the same package since TensorFlow
2.1, released in September 2019. Although the checksums differ due to metadata,
they were built in the same way and both provide GPU support via Nvidia CUDA.
As of January 2023, tf-nightly-gpu has been removed and has been replaced with
this new, empty package that generates an error upon installation.The TensorFlow team has stopped releasing any new tf-nightly-gpu packages, and
tf-nightly-gpu packages may disappear at any time. Please switch to tf-nightly.About this packageThis simple package raises a warning if setup.py is executed as part of a
package installation. This intentionally prevents users from installing
the package.To build and upload this package's source distribution (sdist) to testpypi:$ vim setup.cfg  # update the version number and package name
$ python3 -m pip install --user twine
$ python3 setup.py sdist
$ twine upload --repository testpypi dist/*
$ pip3 install the_name_of_your_test_package -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple
Package: tf-nightly-gpu-tool
Keywords: Full Movie,Watch online,Putlocker
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
Package: tf-nightly-intel
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.
Package: tf-nightly-macos
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.
Package: tf-nightly-tpu
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google's AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains. TensorFlow is licensed underApache
2.0.
Package: tf-nightly-xla-gpu
TensorFlow is an open source software library for high performance numerical
computation. Its flexible architecture allows easy deployment of computation
across a variety of platforms (CPUs, GPUs, TPUs), and from desktops to clusters
of servers to mobile and edge devices.Originally developed by researchers and engineers from the Google Brain team
within Google’s AI organization, it comes with strong support for machine
learning and deep learning and the flexible numerical computation core is used
across many other scientific domains.
Package: tf-notification-callback
TensorFlow Notification CallbackA Tensorflow/Keras callback which sends information about your model training, on various messaging platforms.InstallationUsingpip:pipinstalltf_notification_callbackUsageImport the required module and add it to the list callbacks while training your model.Example:>>>fromtf_notification_callbackimportTelegramCallback>>>telegram_callback=TelegramCallback('<BotToken>','<ChatID>','CNN Model',['loss','val_loss'],['accuracy','val_accuracy'],True)>>>model.fit(x_train,y_train,batch_size=32,epochs=10,validation_data=(x_test,y_test),callbacks=[telegram_callback])TelegramCreate a telegram bot using BotFatherSearch for @BotFather on telegram.Send/helpto get list of all commands.Send/newbotto create a new bot and complete the setup.Copy thebot tokenafter creating the bot.Get thechat IDSearch for the bot you created and send it any random message.Go to this URLhttps://api.telegram.org/bot<BOT_TOKEN>/getUpdates(replace <BOT_TOKEN> with your bot token)Copy thechat idof the user you want to send messages to.Use theTelegramCallback()class.TelegramCallback(bot_token=None,chat_id=None,modelName='model',loss_metrics=['loss'],acc_metrics=[],getSummary=False):Arguments:bot_token: unique token of Telegram bot{str}chat_id: Telegram chat id you want to send message to{str}modelName: name of your model{str}loss_metrics: loss metrics you want in the loss graph{list of strings}acc_metrics: accuracy metrics you want in the accuracy graphs{list of strings}getSummary: Do you want message for each epoch (False) or a single message containing information about all epochs (True).{bool}SlackCreate a Slack workspaceCreate a new channelSearch for theIncoming Webhooksin the Apps and install it.Copy theWebhook URLImport theSlackCallback()class. It takes in the following argumentswebhookURL: unique webhook URL of the app{str}channel:  channel name or username you want to send message to{str}modelName: name of your model{str}loss_metrics: loss metrics you want in the loss graph{list of strings}acc_metrics: accuracy metrics you want in the accuracy graph{list of strings}getSummary: Do you want message for each epoch (False) or a single message containing information about all epochs (True).{bool}Sending images in Slack is not supported currently.ToDoWhatsAppE-MailZulipMessagesMotivationAs the Deep Learning models are getting more and more complex and computationally heavy, they take a very long time to train. During my internship, people used to start the model training and left it overnight. They could only check its progress the next day. So I thought it would be great if there was a simple way to get the training info remotely on their devices.