Saravanan666/pypi-org huggingface dataset:
Package: tsne-torch
t-SNE pytorch Implementation with CUDACUDA-accelerated PyTorch implementation of the t-stochastic neighbor embedding algorithm described inVisualizing Data using t-SNE.InstallationRequires Python 3.7Install via Pippip3installtsne-torchInstall from Sourcegitclonehttps://github.com/palle-k/tsne-pytorch.gitcdtsne-pytorch
python3setup.pyinstallUsagefromtsne_torchimportTorchTSNEasTSNEX=...# shape (n_samples, d)X_emb=TSNE(n_components=2,perplexity=30,n_iter=1000,verbose=True).fit_transform(X)# returns shape (n_samples, 2)Command-Line Usagepython3-mtsne_torch--xfile<path>--yfile<path>ExampleThis is our result compare to result of python implementation.PyTorch resultpython resultCreditThis code highly inspired byauthor's python implementation codehere.
Package: tsnkit
tsnkitA simple scheduling toolkit and benchmark for Time-Sensitive Networking in Python.@article{xue2023real,
  title={Real-Time Scheduling for Time-Sensitive Networking: A Systematic Review and Experimental Study},
  author={Xue, Chuanyu and Zhang, Tianyu and Zhou, Yuanbin and Han, Song},
  journal={arXiv preprint arXiv:2305.16772},
  year={2023}
}Paper link:https://arxiv.org/abs/2305.16772Documentation (work-in-progress):https://tsnkit.readthedocs.ioInstallInstall from source (recommended):git clone https://github.com/ChuanyuXue/tsnkit
cd tsnkit
python setup.py installFrom pip:pip install -U tsnkitUsageTesting:python3 -m tsnkit.models.[METHOD] [STREAM PATH] [NETWORK PATH]Reproducing benchmark paper results:Check out tolegacybranch.Downloaddata.gzfrom git-lfs, and unzip it todatafolder. (Or generate it usingdata/input/generate_data.ipynb)Gosrcfoder and runpython main.py --method=ALL --start=0 --end=38400.Bothmainandlegacybranches use the same logic (models & algorithms). However, we have refined the organization in themainbranch by introducing a unified interface and standardized type notation to enhance maintainability and simplify the efforts to add new methods. Thelegacybranch houses the source code record used in the paper.Code structure:src/tsnkit/models: Inplementations of all supported scheduling methods.src/tsnkit/simulation: TSN simulator to validate the scheduling output.src/tsnkit/utils: Data structures and helper functions.src/notebooks: A step-by-step implementation tutorial transitioning from paper to source code.ContributeContributions are welcome! Feel free to add your own scheduling algorithm in this toolkit. And contact me to update your new scheduling method into our benchmark paper!Refer tosrc/tsnkit/models/__init__.pyto implement the required interface and benchmark entrance.
Package: tsnmf
tsnmf-sparseThis repository contains an implementation of Topic-Supervised Non-Negative Matrix Factorization (TS-NMF) [1] with Sparse Matrices in Python, using a Scikit-Learn's compatible API.How it WorksFrom [1]:  Suppose that one supervisesk << ndocuments and identifiesl << ttopics that were contained in a subset of  the  documents. One can supervise theNMFmethod using this information, represented by annÃ—d topic supervisionmatrixL.The elements ofLcontrain the importance weights of matrixWand are of the following form:Then, for a term-document matrixVand supervision matrixL, TS-NMF seeks matricesWandHthat minimizeWhere â—‹ represent the Hadamard (element-wise) product operator.InstallationYou can install TS-NMF via pip:pipinstalltsnmfOr clonning this repository and runningsetup.py:pythonsetup.pyinstallUsageTS-NMF is used in a similar way as the moduledecomposition.NMFfrom Scikit-Learn. The extra thing that you need is alist of listthat contains the labels to build the matrixL.Suppose you want to get 3 topics from 5 documents. The 5 documents should be represented in a matrixV, the most used way is apply a TF-IDF Vectorizer, which reflect how important a word is to a document.Each element of thelist of listof labels correspond to a document. These elements contain a list of topics that contrain the document. For examplelabels=[[],[0,2],# document 1[],[],[1]]# document 4means that the document 1 is contrained to be topic 0 or 2 and document 4 to be topic 1. For the other documents all the topics are permitted.Finally, to run TS-NMF:fromtsnmfimportTSNMFtsnmf=TSNMF(n_components=3,random_state=1)W=tsnmf.fit_transform(V,labels=labels)H=tsnmf.components_CreditsDeveloped mainly by Victor Navarro (@vokturz), under the guidance of Eduardo Graells-Garrido (@carnby), in the context of CONICYT Fondo de Fomento al Desarrollo CientÃ­fico y TecnolÃ³gico (FONDECYT) Proyecto de IniciaciÃ³n 11180913.Based onscikit-learn's NMF codeand the originalws-nmf.ReferencesMacMillan, Kelsey, and James D. Wilson."Topic supervised non-negative matrix factorization."arXiv preprint arXiv:1706.05084(2017).
Package: tsnn
# Time Series Neural Networks[![Build Status](https://travis-ci.org/sofienealouini/tsnn.svg?branch=master)](https://travis-ci.org/sofienealouini/tsnn) [![Coverage Status](https://coveralls.io/repos/github/sofienealouini/tsnn/badge.svg?branch=master&service=github)](https://coveralls.io/github/sofienealouini/tsnn?branch=master)TSNN is a deep learning library for time series forecasting built on Keras/Tensorflow. It implements various RNN-based models from recent research papers.## Getting StartedThe following instructions will get you a copy of the project up and running on your local machine.### PrerequisitesConda will set up a virtual environment with the exact version of Python used for development along with all the dependencies needed to run TSNN.` conda create-ntsnn python=3.6 source activate tsnn `### InstallingOnce you have activated your conda environment, you can easily install the package and all its dependencies from PyPI.` pip install tsnn `A comprehensive tutorial on how to use TSNN is provided PackageTesting.ipynb notebook.## Built With[Keras](http://www.dropwizard.io/1.0.2/docs/) - High level Deep Learning library running on top of Tensorflow / Theano / CNTK[Tensorflow](https://maven.apache.org/) - Library for numerical computation, chosen as  Keras backend in TSNN.## AuthorsSofiene Alouini-Engineering graduate - Machine Learning Enthusiast
Package: tsod
tsod: Anomaly Detection for time series data.Sensors often provide faulty or missing observations. These anomalies must be detected automatically and replaced with more feasible values before feeding the data to numerical simulation engines as boundary conditions or real time decision systems.This package aims to provide examples and algorithms for detecting anomalies in time series data specifically tailored to DHI users and the water domain. It is simple to install and deploy operationally and is accessible to everyone (open-source).✨Active learning web application✨Please try the newly developed prototype web application for active learning (human in the loop). It is possible to test a version currently running in the Streamlit cloud:https://ts-outlier-detection.streamlit.app/The web application is developed usingStreamlit. All requirements needed to run this application can be foundhere.Getting StartedDocumentationNotebookInstallationtsodis a pure Python library and runs on Windows, Linux and Mac.From PyPI:pip install tsodOr development version:pip install https://github.com/DHI/tsod/archive/main.zipVisionA simple and consistent API for anomaly detection of timeseriesThe computational speed will be good for typical timeseries data found in the water domain, to support realtime detectionIt will have a suite of different algorithms ranging from simple rule-based to more advanced based on e.g. neural networksDefinitionsNote that we distinguish betweentwo types of anomaly detectionOutlier detection (unsupervised anomaly detection)
The training data may contain outliers, i.e. observations far from most other observations. Outlier detectors try to concentrate on the observations in the training data that similar and close together, and ignores observations further away.Novelty detection (semi-supervised anomaly detection)
The training data is considered "normal" and is not polluted by outliers. New test data observations can be categorized as an outlier and is in this context called a novelty.Contribute totsodOpen in Visual Studio CodeFollow PEP8 code style. This is automatically checked during Pull Requests.If citing or re-using other code please make sure their license is also consistent with our policy.
Package: tsorb
tsorb - Time Series of Occupants in Residential Buildingstsorbis a python module derived from the first version of the CREST Demand Model [1,2,3]. It was updated with four state occupancy data [4] and validated for Germany [5]. It creates time series of occupancy activity and device load in residential buildings.InstallationDirectly install via pip as follows:pip install tsorbAlternatively, clone a local copy of the repository to your computergit clone https://github.com/FZJ-IEK3-VSA/tsorb.gitThen install tsorb via pip as followcd tsorb
pip install .LicenseCopyright (C) 2008, 2011 Ian Richardson*, Murray Thomson*, Eoghan McKenna*
2016 Nils Becker, 2018 Leander Kotzur**, Kevin Knosala**, Peter Stenzel**, Peter Markewitz**, Martin Robinius**, Detlef Stolten***CREST (Centre for Renewable Energy Systems Technology),
Department of Electronic and Electrical Engineering
Loughborough University, Leicestershire LE11 3TU, UK** Institute of Techno-economic Systems Analysis (IEK-3), Forschungszentrum Jueulich GmbH, Wilhelm-Johnen-Str., 52428 Juelich, GermanyThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program 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 General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, seehttp://www.gnu.org/licenses/.References[1] Richardson, I., Thomson, M., and Infield, D. A high-resolution domestic building occupancy model for energy demand simulations. Energy and Buildings, 40(8):1560–1566, 2008. ISSN 03787788. doi: 10.1016/j.enbuild.2008.02.006.[2] Richardson, I., Thomson, M., Infield, D., and Delahunty, A. Domestic lighting: A high-resolution energy demand model. Energy and Buildings, 41(7):781–789, 2009. ISSN 03787788. doi: 10.1016/j.enbuild.2009.02.010.[3] Richardson, I., Thomson, M., Infield, D., and Clifford, C. Domestic electricity use: A high-resolution energy demand model. Energy and Buildings, 42(10):1878–1887, 2010. ISSN 03787788. doi: 10.1016/j.enbuild.2010.05.023.[4] McKenna, E. and Thomson, M. High-resolution stochastic integrated thermal–electrical domestic demand model. Applied Energy, 165:445–461, 2016.ISSN 03062619. doi: 10.1016/j.apenergy.2015.12.089.[5] Kotzur, L.Future grid load of the residential building sector. Thesis, 2018. isbn: 978-3-95806-370-9,
Package: tsorted
TSortedTSortedlets you sort your data topologically, such as for dependency resolution or task management.UsageBefore sorting your data, transform it into aDirected Acyclic Graph(DAG). Graph dictionary keys are the (hashable)
starting vertices, and their values are sets of destination vertices, defining unidirectional edges.A standard topological sort:fromtsortedimporttsortedgraph={1:{2,3},2:{4},4:{3},}tsorted(graph)# >>> OrderedSet([1, 2, 4, 3])A grouped topological sort:fromtsortedimporttsorted_groupedgraph={1:{2,3},2:{4},3:{4},}tsorted_grouped(graph)# >>> OrderedSet([frozenset({1}), frozenset({2, 3}), frozenset({4})])DevelopmentFirst,fork and clonethe repository, and navigate to its root directory.RequirementsBash (you're all good ifwhich bashoutputs a path in your terminal)InstallationIf you havetoxinstalled on your machine,tox --developwill create the necessary
virtual environments and install all development dependencies.Alternatively, in any existing Python environment, run./bin/build-dev.TestingIn any existing Python environment, run./bin/test.Fixing problems automaticallyIn any existing Python environment, run./bin/fix.Contributions 🥳TSorted is Free and Open Source Software. As such you are welcome toreport bugsorsubmit improvements.Copyright & licenseTSorted is copyrightBart Feenstraand contributors, and released under theMIT License. In short, that meansyou are free to use TSorted, butif you
distribute TSorted yourself, you must do so under the exact same licenseand provide that license.
Package: tsp
TeaspoonSee the full documentation on theReadTheDocs PagesWhat is it?tsp('teaspoon') is a python library designed to make working with permafrost ground temperature time series data more straightforward, efficient, and reproduceable. Some of the features include:Read a variety of common published data formats, datalogger outputs, and model results into a common data structureGEOtop model outputGTN-P database export csvNTGS ground temperature report csvGeoprecision datalogger exportHoboWare datalogger exportExport data in a variety of common formatsnetcdf'GTN-P'-style csv'NTGS'-style csvPerform common data transformationsCalculate daily, monthly, or yearly means, ignoring averaging periods with missing dataSwitch between "long" and "wide" dataframesVisualize and explore your data with commonly used plotsTrumpet curvesTemperature-time graphsColour-contour profilesInstallationUsage ExamplesHow to contributeCitationIf you find this software helpful, please consider using the following citation:Brown, N., (2022). tsp ("Teaspoon"): A library for ground temperature data. Journal of Open Source Software, 7(77), 4704,https://doi.org/10.21105/joss.04704
Package: tsp_2opt
Traveling Salesman Problem (TSP) SolverThis python library gives a solver to efficiently find good sub-optimal solutions to the TSP. It uses the2-opt heuristicand the search part is implemented in rust.InstallTo install the library, run:pip install tsp_2optFor now, the library is working only on MacOS X platforms.UseThe current version relies on the availability of a distance matrix, i.e. matrix giving pair-wise distance between cities in the TSP instance.Here is a small example :fromtsp_2opt.solverimporttsp_solverdistances=[[0,2,3],[2,0,4],[3,4,0]]route,length=tsp_solver(distances)The solution obtained to a TSP instance after performing the 2-opt heuristic depends on the initial solution (starting point of the search), therefore this library runs the heuristicntimes withndifferent starting point in parralel (true parallelism is possible thanks to rust) and the best obtained is returned. You can passnas a parameter totsp_solver()and control the maximum number of workers :tsp_solver(distances,workers,n)
Package: tsp-algorithms
TSP Algorithms developed as C extensions for PythonIntroductionIn a VRP problem, the objective is to find the best route for a fleet of vehicles to visit a set of customers. The best route is the one that minimizes the total distance traveled by the fleet. The problem is NP-hard, and there are many heuristics to solve it.InstallYou can install via pip:pipinstalltsp-algorithmsUsageJust import the package and use one of the methods available:importtsp_algorithmsastsptsp.nn([[0.,1.],[2.,3.]])Available methodsNearest Neighbour(.nn)
Package: tspapi
BMC TRUESIGHT PULSE API FOR PYTHONTrueSight Pulse API for Python provides bindings for the python languageVisithttp://boundary.github.io/pulse-api-pythonfor documentation.[Build Status]© Copyright 2005-2016 BMC Software, Inc. Use of this software signifies
your acceptance of BMC’s Terms of Use, Privacy Policy and Cookie Notice.
BMC, BMC Software, the BMC logos, and other BMC marks are trademarks or
registered trademarks of BMC Software, Inc. in the U.S. and/or certain
other countries.Installing$ pip install tspapiExamplesCreate a Metricimport tspapi
from datetime import datetime# The following assumes the following environment variables are set
# exportTSP_EMAIL=’joe@example.com’
# export TSP_API_TOKEN=<your api token>
api = tspapi.API()api.measurement_create(metric=’MY_METRIC’, source=’MySource’, value=3.14, timestamp=datetime.now())Create a Measurementimport tspapi# The following assumes the following environment variables are set
# exportTSP_EMAIL=’joe@example.com’
# export TSP_API_TOKEN=<your api token>
api = tspapi.API()metric = api.measurement_create(metric=’MY_METRIC’, source=’MySource’, value=3.14)
Package: tspart
TSP ArtTSP Art Module for PythonUsageSeeThe Jupyter notebookto learn how to use the library.To test it out in your browser, head over toGoogle Colab!Full DocumentationGallery'Baboon' Standard Test Image500 PointsOriginalCMYKRGBGrayscaleBliss25000 PointsCMYKBowser The Fearless25000 PointsCMYKSelf Portrait35000 PointsCMYKESO1208A100000 PointsCMYKRGBReferencesArjan Westerdiep's TSP Art Blog PostEvil Mad Scientist's TSP Art WebpageOriginal Stippling CodebyNicolas RougierGoogle OR-Tools TSP GuideConcorde TSP SolverbyWilliam CookNeos Concorde SolverbyHans MittelmannNeos Server API ReferenceNeos Server Job Queue
Package: tsp-c
Package descriptionA wrapper for c++ to solve the Traveling Salesman ProblemInstallationpip install tsp-cAvailable methodsGreedySimulated Annealing (SA)Particle Swarm Optimization (PSO)Ant Colony Optimization (ACO)Two-opt HeuristicAvailable functionssolve_greedy(distance_matrix)
solve_SA(distance_matrix)
set_param_SA(C0, Cmin, L0, alpha)
solve_PSO(distance_matrix)
set_param_ACO(hconst, alpha, beta, evprate, intsty, nAnt, nItr)
solve_ACO(distance_matrix)
solve_two_opt(distance_matrix)
set_param_PSO(w, c1, c2, maxV, muProb, nPar, nItr)ExamplesTo solve the problem with the Greedy method:import tsp_c as tsp

distance_matrix = [
	[0.0, 290.7, 254.9, 172.9],
	[263.6, 0.0, 508.3, 185.0],
	[258.2, 497.1, 0.0, 405.6],
	[136.8, 190.7, 394.8, 0.0]
]

sol, distance = tsp.solve_greedy(distance_matrix)
print("\nSolution from Greedy:")
print(distance, " ", sol)The solution will be(1, 3, 0, 2)with total distance 1073.8000000000002.To solve the problem with the Simulated Annealing method, change the code to:sol, distance = tsp.solve_SA(distance_matrix)To set the parameters of the Simulated Annealing method, use:tsp.set_param_SA(C0, Cmin, L0, alpha)whereC0 = Initial temperature (default = 20.0)Cmin = Final temperature (default = 0.1)L0 = Number of iterations in each temperature (default = 10000)alpha = cooling rate (default = 0.9)For example:tsp.set_param_SA(10.0, 0.01, 10000, 0.95)To set the parameters of the ACO method, use:tsp.set_param_ACO(hconst, alpha, beta, evprate, intsty, nAnt, nItr)wherehconst = Heuristic Constant (default = 50.0)alpha = Pheromone influence (default = 3, min = 0.0001, max = 10.0)beta = Heuristic influence (default = 5, min = 0.0001, max = 10.0)evprate = Evaporation Rate (default = 0.05)intsty = Pheromone intensity (default = 0.1)nAnt = Number of ants (default = 50)nItr = Number of iterations (default = 100)For example:tsp.set_param_ACO(100.0, 5, 4, 0.1, 0.15, 200, 200)To set the parameters of the PSO method, use:tsp.set_param_PSO(w, c1, c2, maxV, muProb, nPar, nItr)wherew = Inertia weight of the particle (default = 1.0)c1 = acceleration coefficient for the local best position (default = 2.0)c2 = acceleration coefficient for the global best position (default = 2.0)maxV = Maximum velocity of the particles (default = 2.0)muProb = mutation probability that change the position of a particle (default = 0.05)nPar = Number of particles (default = 100)nItr = Number of iterations (default = 5000)For example:tsp.set_param_PSO(0.8, 1.5, 1.5, 5, 0.1, 200, 1000)Requirementpython >=3.6Operating SystemLinuxReferencesJanjarassuk, Udom. (2011). A comparison of heuristic approaches to the travelling salesman problem. ICIC Express Letters. 5. 279-283.
Package: tsp-client
tsp-client is an implementation of theRFC 3161TSP protocol in Python.TSP is used for point-in-time attestation and non-repudiation as part of various electronic signature and code signing
schemes, includingeIDASXAdES(tsp-client is used bySignXMLto implement XAdES).Installationpip install tsp-clientSynopsisfromtsp_clientimportTSPSigner,TSPVerifier# Sign a message online by transmitting its digest to the timestamp authoritymessage=b"abc"signer=TSPSigner()signed=signer.sign(message)# Returns raw bytes of the verified timestamp token.# Verify a presented timestamp token offline using the original messageverified=TSPVerifier().verify(signed,message=message)# Or verify using the message digest (digest algorithm may vary)importhashlibdigest=hashlib.sha512(message).digest()verified=TSPVerifier().verify(signed,message_digest=digest)print(verified.tst_info)# Parsed TSTInfo (CMS SignedData) structureprint(verified.signed_attrs)# Parsed CMS SignedAttributes structureSpecifying a custom TSATo provide a timestamped signature with non-repudiation verifiable via a chain of trust, TSP requires the use of a TSA
(time-stamp authority) server when generating timestamp tokens. TSA servers can be thought of as digital notaries.
Verification of tokens can be done offline using your system’s certificate authority (CA) trust store.By default, tsp-client uses theDigiCert TSA serverwhen signing tokens. To use a different TSA, set theSigningSettings.tsp_serverattribute as follows:fromtsp_clientimportTSPSigner,TSPVerifier,SigningSettingssigning_settings=SigningSettings(tsp_server="http://timestamp.identrust.com")signer=TSPSigner()signed=signer.sign(message,signing_settings=signing_settings)There is currently no credible public TSA that offers HTTPS transport security and does not apply throttling. DigiCert
provides a relatively high throughput public TSA endpoint, but your message digests and tokens will be transmitted
unencrypted over the network. As an alternative, Sectigo offers an HTTPS TSA (https://timestamp.sectigo.com) but
applies throttling so is only suitable for low throughput applications.The European Union maintains a list of trusted TSAs as part of theeIDAS dashboard, however this list only serves as a root of trust and does not link
directly to the TSA endpoints of listed providers.AuthorsAndrey KislyukLinksProject home page (GitHub)DocumentationPackage distribution (PyPI)Change logIETF RFC 3161: Time-Stamp Protocol (TSP)BugsPlease report bugs, issues, feature requests, etc. onGitHub.LicenseCopyright 2022-2023, Andrey Kislyuk and tsp-client contributors. Licensed under the terms of theApache License, Version 2.0. Distribution of the LICENSE and NOTICE
files with source copies of this package and derivative works isREQUIREDas specified by the Apache License.
Package: tsperf
Data GeneratorThe Data Generator has its own in-depthdocumentation.
For the purpose of capacity testing it simulates the generation of timeseries
data, without the need to set up an ingestion chain (which could be Azure IoTHub, RabbitMQ, etc.)Maximizing PerformanceTo maximize performance multiple instances of the Data Generator must be run in parallel. One way to achieve this is using kubernetes how to do this is documentedhere.Setup sandboxpython3-mvenv.venvsource.venv/bin/activate
pipinstall--editable=.[testing]pytest-vvvtests