Saravanan666/pypi-org huggingface dataset:
Package: tfinance
This is just an Alpha release, So If you find it interesting or you encounter any bugs, I would appreciate if you let me know!OverviewCurrently there is no active well-documented API for TSE capital market out there. And this is a big obstacle to development of projects and studies based on this data.tfinanceaimes to solve this problem by developing an OSINT tool to provide a reliable, threaded, and Pythonic way to access TSE’s historical data.>>importtfinanceastfin>>market=tfin.Market()# Initializes your local database - The first run on your system may take a few minutes(~It will download ~90MB of data.)>>market.tickers.head()idname...sub_marketticker_code037661500521100963توليدنيرويبرقآبادان...فهرستاوليهIRO1NBAB0001155254206302462116آسانپرداختپرشين...فهرستاوليهIRO1APPE0001251106317433079213بيمهآسيا...تابلواصليIRO1ASIA0001314079693677610396انتقالدادههايآسياتك...فهرستاوليهIRO1ASTC0001444834847569322522كنتورسازي‌ايران‌...تابلوفرعيIRO1CONT0001>>foolad=tfin.Ticker(ticker="فولاد")>>foolad.name'فولاد مباركه اصفهان'>>foolad.sector'فلزات اساسي'>>foolad.history.head()<TICKER><DTYYYYMMDD><FIRST>...<PER><OPEN><LAST>0S*Mobarakeh.Steel2020-10-0617700.0...D17860.018240.01S*Mobarakeh.Steel2020-10-0517610.0...D18210.017700.02S*Mobarakeh.Steel2020-10-0418760.0...D18710.018090.03S*Mobarakeh.Steel2020-10-0318290.0...D17920.018810.04S*Mobarakeh.Steel2020-09-3018170.0...D17500.018290.0[5rowsx12columns]InstallationThe easiest way to installtfinanceis from thePython Package Indexusingpiporeasy_install:$pipinstalltfinanceLicense
Package: tf-init-booster
terraform-init-boosterA Pre-terraform routine that speedups terraform modules download for bulky blueprints.Problem statementTerraform v0.12.x and older downloads module from git source for every usage (https://github.com/hashicorp/terraform/issues/11435). For bulky blueprints with hundreds of similar modules that make the process ofterraform initslow.Installationpip install tf-init-boosterQuickstart(blueprint folder)>tf-init-booster
(blueprint folder)>terraform initSettings with environment variablesLOGLEVEL=INFOGIT_PATH=/usr/bin/gitIndications for useGit as module sourceMany modules with the same sourcePerformanceBased on a blueprint with 580 modules, 10 of them unique.Pureterraform init- 3m08sBoosted +terraform init- 39s (2.7s + 36.5s)CompatibilityDesigned for terraform v0.12 and v0.11RequrementsPython 3.6+(optional) gitpython * module* otherwise, system git will be used
Package: tfinputfn
This is a package for making input functions for tensorflow when using Linear Regression.This package requires tensorflow v2 to work.The input parameters are data_df, label_df, num_epochs=10, shuffle=True, batch_size=32,shufflefac=1000.Change Log2.0.0 (14/7/2022)Library issue fixed on mac1.0.0 (14/7/2022)First Release
Package: tfjeeves
tfjeevespoetry run python train.py --config=configs/cifar10.py --data=/home/soumendra/data-zoo/classification/cifar10https://flynn.gg/blog/software-best-practices-python-2019/poetryrunpythontrain.py--config=configs/cifar10.py--data=~/data-zoo/classification/cifar10Getting triplet list (df)DATABASE_URL=postgresql://vista_api_live:4jzjS3USGnjLvXZrHrR4cyNh@vista-postgres.coaffiez9jim.ap-southeast-1.rds.amazonaws.com:5432/vista_api_live
ETL_DATABASE_URL=postgresql://etl_user:eCwTqY6h9DJeFwFyuyX4LcSF@etl-server-postgres.coaffiez9jim.ap-southeast-1.rds.amazonaws.com:5432/etldbpsql -h etl-server-postgres.coaffiez9jim.ap-southeast-1.rds.amazonaws.com -p 5432 -U etl_user -d etldb

\copy (SELECT tot.catalog_id, tot.product_id, tot.master_name, tot.subcategory_name, tot.category_name, tot.image_id, sync.s3_path, sync.is_sizechart, sync.is_discarded  FROM (SELECT fc.catalog_id, fc.product_id, fc.master_name, fc.subcategory_name, fc.category_name, fvi.image_id FROM (SELECT catalog_id, UNNEST(product_ids) as product_id, master_name, subcategory_name, category_name FROM fact_catalogs AS fc WHERE catalog_product_count > 3) AS fc JOIN fact_visible_images AS fvi ON fvi.product_id = fc.product_id) AS tot JOIN synced_images AS sync ON sync.image_id = tot.image_id ORDER BY tot.catalog_id) to 'temp.csv' delimiter ',' csv header;
Package: tf-jieba
Jieba Op for TensorflowIntroThis is a tensorflow wrapper for the cpp version of the famous Chinese
word segmentation tool,cppjieba.I made some changes from the original cppjieba. This ismy fork of cppjieba.Most code of this repo are from Didi's deep learning language platform:DeltaInstallpipinstalltf-jiebaUsageClone the cppjieba repository for resource files like model and dict
files.gitclonehttps://github.com/applenob/cppjieba.gitDownload or copy the test python scriptcustom_test.pyto the same
project. You should havecppjiebaandcustom_test.pyunder your
test directory now.python3 custom_test.pyDemo output:Support Platformpython == 3.6tensorflow >= 1.14.0OS: MacOS / LinuxPlease refer tomy Chinese blog postfor more detail.
Package: tfjsa
AboutThis repo can be a good starting point for building your own tfjs (tensorflow-js)-based web applicaitons.The original project is developed for ASP.Net MVC (http://zhangys.org.cn/DeepLearning). Now I rewrite it as a Flask web app.We provide 5 apps:General image classification based on a pre-trained mobilenet model on imagenet.Object detection trained on COCOStyle transfer. Provided by Reiichiro Nakano (https://github.com/reiinakano/arbitrary-image-stylization-tfjs)A binary classifier for judging fundus image quality.A plant disease classifier trained on PlantVillage dataset (doi: 10.17632/tywbtsjrjv)Installpip install tfjsaRun and open in web browserpython -m tfjsa.runorpython -m tfjsa.run silentGo tohttp://localhost:5007When 'silent' is passed, tfjsa will not open browser automaticallyRun as a desktop applicationpython -m tfjsa.guiGuide on re-development or extended developmentIf you want to re-develop on this repo or deploy to other framework. You might want to revise the following points.This repo use Jinja2 template language to write "layout.html". You may need to change to other server-side template languages, e.g., php, C# Razor, etc.To follow Flask practice, we have moved all static stuff (images, models, scripts, etc.) to the static folder. You may want to relocate these stuff if you deploy to other frameworks. As follows.For the Image Classification app, you may need to revise static stuff path`const MOBILENET_MODEL_PATH = 'static/Mobilenet/shards/model.json';`

`<img style="display: none" id="cat" src="static/Mobilenet/cat.jpg" width=224 height=224 />`For the Object Detection app,`<script src="static/SSD/coco-ssd.js" type="text/javascript"></script>`
`img.src = "static/Mobilenet/cat.jpg";`
coco-ssd.js: "static/SSD/shards/model.json"For Style Transfer app,Modify the bundle.js. Change "saved_model_xxx" to "static/styletransfer/saved_model_xxx"
  `element.src = 'static/styletransfer/images/' + selectedValue + '.jpg';`For Fundus Image Qualifier app,`const MOBILENET_MODEL_PATH =
    '/Assets/DNNs/Mobilenet_F2/model.json';`
`<td><a target="_blank" href="static/Mobilenet_F2/model.json">model.json</a></td>`
`src="static/Mobilenet_F2/fundus.png"`For Leaf app,`<td><a target="_blank" href="static/Mobilenet_leaf/model.json">model.json</a></td>`

`src="static/Mobilenet_Leaf/tomato_leaf.jpg"`Run directly from sourcegit clonehttps://github.com/zhangys11/tfjs-app.gitcd tfjs-app/tfjsapython run.pyGo tohttp://localhost:5007/
Package: tf_kaldi_io
A python package: provide a custom tensorflow dataset for kaldi ioPython is its wrapper, C++ is its backend implemention. It depends on two things:Through [kaldi-io lib](https://github.com/open-speech/kaldi-io.git), it is able to:- direct read from kaldi rspecifier(scp, ark, in text or binary, just as [kaldi](https://github.com/kaldi-asr/kaldi))- support multiple feature transforms:- delta- cmvn- splice- sampling- compute fast: kaldi Matrix|Vector with blas math lib is usedThrough [tensorflow dataset](https://www.tensorflow.org/guide/datasets), it is able to:- shuffling- batching at frame or utt level- bucketing with input sequence lengths- and all other tensorflow native dataset manipulations and features (parellel, prefetch, ..)
Package: tfkbnufft
TF KB-NUFFTGitHub|Simple installation from pypi:pip install tfkbnufftAboutThis package is a verly early-stage and modest adaptation to TensorFlow of thetorchkbnufftpackage written by Matthew Muckley for PyTorch.
Please cite his work appropriately if you use this package.Computation speedThe computation speeds are given in seconds, for a 256x256 image with a spokelength of 512 and 405 spokes.
These numbers are not to be directly compared to those oftorchkbnufft, since the computation is not the same.
They are just to give a sense of the time required for computation.OperationCPUGPUForward NUFFT0.16760.0626Adjoint NUFFT0.70050.0635To obtain these numbers for your machine, run the following commands, after installing this package:pip install scikit-image Pillow
python profile_tfkbnufft.pyThese numbers were obtained with a Quadro P5000.Gradientsw.r.t trajectoryThis is experimental currently and is WIP. Please be cautious.
Currently this is tested in CI against results from NDFT, but clear mathematical backing to some
aspects are still being understood for applying the chain rule.ReferencesFessler, J. A., & Sutton, B. P. (2003). Nonuniform fast Fourier transforms using min-max interpolation.IEEE transactions on signal processing, 51(2), 560-574.Beatty, P. J., Nishimura, D. G., & Pauly, J. M. (2005). Rapid gridding reconstruction with a minimal oversampling ratio.IEEE transactions on medical imaging, 24(6), 799-808.Feichtinger, H. G., Gr, K., & Strohmer, T. (1995). Efficient numerical methods in non-uniform sampling theory. Numerische Mathematik, 69(4), 423-440.CitationIf you want to cite the package, you can use any of the following:@conference{muckley:20:tah,author={M. J. Muckley and R. Stern and T. Murrell and F. Knoll},title={{TorchKbNufft}: A High-Level, Hardware-Agnostic Non-Uniform Fast Fourier Transform},booktitle={ISMRM Workshop on Data Sampling \& Image Reconstruction},year=2020}@misc{Muckley2019,author={Muckley, M.J. et al.},title={Torch KB-NUFFT},year={2019},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/mmuckley/torchkbnufft}}}
Package: tfkit
What is itTFKit is a tool kit mainly for language generation.It leverages the use of transformers on many tasks with different models in this all-in-one framework.All you need is a little change of config.Task SupportedWith transformer models - BERT/ALBERT/T5/BART......Text Generation:memo: seq2seq language modelText Generation:pen: causal language modelText Generation:printer: once generation model / once generation model with ctc lossText Generation:pencil: onebyone generation modelGetting StartedLearn more from thedocument.How To UseStep 0: InstallSimple installation from PyPIpipinstallgit+https://github.com/voidful/TFkit.git@refactor-datasetStep 1: Prepare dataset in csv formatTask formatinput, targetStep 2: Train modeltfkit-train\--taskclas\--configxlm-roberta-base\--traintraining_data.csv\--testtesting_data.csv\--lr4e-5\--maxlen384\--epoch10\--savedirroberta_sentiment_classificerStep 3: Evaluatetfkit-eval\--taskroberta_sentiment_classificer/1.pt\--metricclas\--validtesting_data.csvAdvanced featuresMulti-task trainingtfkit-train\--taskclasclas\--configxlm-roberta-base\--traintraining_data_taskA.csvtraining_data_taskB.csv\--testtesting_data_taskA.csvtesting_data_taskB.csv\--lr4e-5\--maxlen384\--epoch10\--savedirroberta_sentiment_classificer_multi_taskNot maintained taskDue to time constraints, the following tasks are temporarily not supportedClassification:label: multi-class and multi-label classificationQuestion Answering:page_with_curl: extractive qaQuestion Answering:radio_button: multiple-choice qaTagging:eye_speech_bubble: sequence level tagging / sequence level with crfSelf-supervise Learning:diving_mask: mask language modelSupplementtransformers models list: you can find any pretrained models herenlprep: download and preprocessing data in one linenlp2go: create demo api as quickly as possible.ContributingThanks for your interest.There are many ways to contribute to this project. Get startedhere.LicenseLicenseIcons referenceIcons modify fromFreepikfromwww.flaticon.comIcons modify fromNikita Golubevfromwww.flaticon.com
Package: tf-lambda
Lambda NetworksThis is a TensorFlow 2 implementation of a Lambda Layer from:LambdaNetworks: Modeling Long-Range Interactions Without Attention. LambdaNetworks achieve SOTA on ImageNet. For now, this library provides a basic UNTESTED version of the Lambda Layer based off of thisrepository.UsageLambda LayerGlobal Contextimporttensorflowastffromtf_lambda.layers.lambda_layerimportLambdaLayerlayer=LambdaLayer(dim_out=32,# channels outn=64*64,# number of input pixels (64 x 64 image)dim_k=16,# key dimensionheads=4,# number of heads, for multi-querydim_u=1# 'intra-depth' dimension)x=tf.random.normal(shape=(1,64,64,32))layer(x)Localized Contextlayer=LambdaLayer(dim_out=32,r=23,# the receptive field for relative positional encoding (23 x 23)dim_k=16,heads=4,dim_u=4)x=tf.random.normal(shape=(1,64,64,32))layer(x)Lambda ConvJust a wrapper around the Lambda Layer. Builds it specifically for image data. The only thing you need to specify is the number of channels to output.fromtf_lambda.layers.lambda_convimportLambdaConvlayer=LambdaConv(32)x=tf.random.normal(shape=(1,64,64,32))layer(x)
Package: tf-lambda-resnet
LambdaResNet - TensorFlowAll credit goes tolucidrainsfor sharing the initial pytorch implementation. This repo takes majority of contents from his original repohere.Implementation of λ-ResNet.Yannic Kilcher's paper reviewInstall$pipinstalltf-lambda-resnetUsageLambdaResNet uses localized context as explained in the video.importtensorflowastffromtf_lambda_resnetimportLambdaResnet18model=LambdaResnet18()out=model(tf.ones([10,224,224,3]))print(out)CreditsAll the code is taken from the below resources. I have assembled them in a proper manner to make it work for TF2.2tfkeras.pybyshinel94TensorFlow2.0 ResNetbycalmisentialReferencesThanks toPistonYfor sharing a gist here -lambda_net.pyCitations@inproceedings{anonymous2021lambdanetworks,title={LambdaNetworks: Modeling long-range Interactions without Attention},author={Anonymous},booktitle={Submitted to International Conference on Learning Representations},year={2021},url={https://openreview.net/forum?id=xTJEN-ggl1b},note={under review}}
Package: tflash
TFlashA quick way to practice object detection on images and videos for common classes using TensorFlow. Fully operational by any user without Machine Learning experience.Requirementsimageioimageio-ffmpeg(for videos)tensorflowtqdmInstallationpip install tflashNote: due to the incompatibility of numpy versions, in some cases tensorflow needs to be (re-)installed after installing imageioUsageimport tflashflash = tflash.Detector()result = flash.detect("a_pic.jpg", print_output="a_result.jpg")# can be set toFalseresult = flash.detect("mypic.jpg", min_score=0.75)# default: 0.5my_pics = ["pic001.jpg", "pic002.jpg", "pic004.jpg"]result = flash.detect_multiple(my_pics)Output:Dict of detection resultsLabeled image(s)detections = result["detections"]# formatted as dictprint("Saved to {}".format(result["output"])# output filenameFontAlter font (default is Roboto size 20):flash.set_font("arial.ttf")flash.set_font_size(12)flash.set_font("dosis.ttf", size=15)Own Model FileSome good ones are provided at Tensorflow model zoo:https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.mdDownload a file with output "Boxes" from the link above, extract and use only the one with *.pb extension, e.g., frozen_inference_graph.pbLoad in TFlash using the command:flash.load_model("frozen_inference_graph.pb")orflash = tflash.Detector("any_other_model_file.pb")
Package: tf-latino
# TextFlows Latino Module #A [TextFlows](https://github.com/xflows/textflows/) package which contains text mining widgets (UI components) based on [Latino](https://github.com/LatinoLib/LATINO). The package can also be used with [ClowdFlows](https://github.com/xflows/clowdflows/) 2.0.[![Documentation Status](https://readthedocs.org/projects/rdm/badge/?version=latest)](http://docs.textflows.org/)Currently, the project contains several components for text preprocessing: tokenization, stop word removal, lemmatization, part-of-speech tagging, etc.## Installation, documentation ##Please find installation instructions, examples and API reference on [Read the Docs](http://docs.textflows.org/).## Note ##Please note that this is a research project and that drastic changes can be (and are) made pretty regularly. Changes are documented in the [CHANGELOG](CHANGELOG.md).Pull requests and issues are welcome.## Contributors to the tf_latino package code ##Matic Perovšek (@mperice), Matjaž Juršič (@mjursic), Miha Grčar (@mgrcar)[Knowldge Technologies Department](http://kt.ijs.si), Jožef Stefan Institute, Ljubljana
Package: tf-lazy-loader
tf-lazy-loaderInstallationpipinstalltf-lazy-loaderUsagefromtf_lazy_loaderimportdynamic_import# Lazily import the "os" moduleos=dynamic_import("os")# Trigger the actual import by referencing a name in the "os" module:print(os.environ)Conditionally switching between lazy and eager importsYou can set thelazyarg of thedynamic_importfunction toFalseto eagerly import the given module. This can be useful if you only want to perform lazy imports based on a flag.For example, if you have a Django project and you only want to enable lazy imports when in DEBUG mode, and do imports eagerly in production, you would do something like this:fromdjango.confimportsettingsDEBUG=settings.DEBUGos=dynamic_import("os",lazy=DEBUG)
Package: tfl-bus-monitor
tfl_bus_monitorDownload Transport For London bus arrival time information.Install it from PyPIpipinstalltfl_bus_monitorUsagefromtfl_bus_monitorimportget_stops,get_config_path%busstop-h
usage:busstop[-h][-t|-j]GetbusstopdatafromTFL

options:-h,--helpshowthishelpmessageandexit-t,--textprintformattedtext-j,--jsonprettyprintjson(default)
Package: tflex
An edge inference library on embedded device that contains Edge EPU coprocessor. It’s ideal for prototyping new projects that demand fast on-device inferencing for machine learning models. tflex library provides three command line tools: tflexconverter is provided to convert .pb/.h5 model to .tflex model directly supported on EPU, tflexviewer is supplied to display the network architecture(.pb and .tflex file are both supported) more intuitively based on advanced tensorboard, and tflexverify is used to validate whether the model was converted successfully. That is, when a pre-trained or custom model are prepared, then you can use tflexconverter command to convert the model to EPU format, and deploy the model in your device for inference.
Package: tflibrosa
tflibrosare-implementation of torch librosa for tensorflow. It is usefull if you want to compute Spectrogram on GPU for faster inference instead of using librosa.Installationpip install tflibrosaExampleTo do some inference on single sample, you can use python script in examples/ folder or use as follows:import numpy as np 
from tflibrosa import STFT, Spectrogram, LogmelFilterBank
import librosa
import tensorflow as tf 
audio = np.random.uniform(0,1 ,(32000 * 5))
print(audio.shape)

sample_rate = 32000
n_fft = 2048
hop_size = 512
window = 'hann'
pad_mode = 'reflect'
mel_bins = 64
ref = 1.0
amin = 1e-10
fmin = 20
fmax = 16000 
top_db = 80.0
center = True 
dtype=None

spectrogram_extractor = Spectrogram(n_fft=n_fft, hop_length=hop_size, 
                win_length=n_fft, window=window, center=center, pad_mode=pad_mode, 
                freeze_parameters=True, dtype="float32")

# Logmel feature extractor
logmel_extractor = LogmelFilterBank(sr=sample_rate, n_fft=n_fft, is_log=True, 
    n_mels=mel_bins, fmin=fmin, fmax=fmax, ref=ref, amin=amin, top_db=top_db, 
    freeze_parameters=True, dtype="float32")


spectrogram = spectrogram_extractor(audio[None, :])

mel_spectrogram = logmel_extractor(spectrogram)

print(mel_spectrogram) # (batch size, num_channels, timestamps)Acknowledgementlibrosa :https://librosa.org/doc/latest/index.htmltorchlibrosa :https://github.com/qiuqiangkong/torchlibrosa
Package: tflite
Easily Parse TFLite Models with PythonThistflitepackageparses TensorFlow Lite (TFLite) models (*.tflite), which are built byTFLite converter. For background, please refer toIntroducing TFLite Parser Python Package.UsageInstall the package and use it like what you build from the TensorFlow codebase.
It's recommended to install the version that same as the TensorFlow that generates the TFLite model.pipinstalltensorflow==2.3.0
pipinstalltflite==2.3.0The raw API oftflitecan be found inthis documentation.
TheMobileNet testcan serve as a usage example of parsing models.EnhancementsThe generated python package is not friendly to use sometimes.
We have introduced several enhancements:Easy import: A singleimport tflite(example) to replace importing every classes and funtions intflite(example).Builtin opcode helper: The opcode isencodedas digits which is hard to parse for human. Two APIs added to make it easy to use.tflite.opcode2name(): get the type name of given opcode.tflite.BUILTIN_OPCODE2NAME: a dict that maps the opcode to name of all the builtin operators.Compatibility HandlingTensorFlow sometimes leaves compability hanlding of the TFLite model to the users.
As these are API breaking change that can be easily fixed, we do this in thetflitepackage.tflite.OperatorCode.BuiltinCode(): maintains API compability in2.4.0, seethis issue.Contributing UpdatesAs the operator definition may change across different TensorFlow versions, this package needs to be updated accordingly. If you notice that the package is out of date, please feel free to contribute new versions. This is pretty simple, instructions as below.Fork the repository, and download it.Install additional depdendency viapip install -r requirements.txt. And installflatbuffer compiler(you may need tomanually build it).Generate the code for update. Tools have been prepared, there are prompt for actions.Downloadschema.fbsfor a new version.Updatethe builtin operator mapping.Updatethe classes and functions import of submodules.Updatethe API document.Update the versioning in__init__.py.Buildandtest(simplypytest) around. Don't forget to re-install the newly builttflitepackage before testing it.Push your change and openPull Request.The maintainer will take the responsibility to upload change to PyPI when merged.ResourcesPyPI page.GitHub page.Module list.TensorFlow Lite converter.LicenseApache License Version 2.0 as TensorFlow's.DisclaimerTheschema.fbsis obtained from TensorFlow directly. Maintainer of this package had tried tocontactTensorFlow maintainers for licensing issues, but received no reply. Ownership or maintainship is open to transfer or close if there were any issue.