Saravanan666/pypi-org huggingface dataset:
Package: timerr
Timerr Package for PythonThis is a simple timer package for python that countsDownfrom the time set.If you have any suggestions,Emailme with your suggestion orAdd a pull request with your edit of the code and I'll look at itUsageInstallationpip install timerrScripting# Import the timerr moduleimporttimerr# Create a variable named 'timer' and call the class 'Timer'# Arguments are (hours, mins, secs, log)# Default is a 1h timer and not to print the time left# To print the time left, if all args are passsed, use 'log' otherwise copy below# This sets a timer for 3h 45mins and to print the time lefttimer=timerr.Timer(3,45,log='log')# Run the 'timer' function from the variabletimer.timer()Interpreter>>>importtimerr>>>timerr.Timer(3,45,15,'log').timer()License & CopyrightCopyright (c) 2019 ItzAfroBoyThis package is under theMIT License.Under the license, you are able to modify the fileand serve it asclosed-source
Package: timerun
TimeRun-Python library for elapsed time measurement.TimeRun is a simple, yet elegant elapsed time measurement library forPython. It is distributed as a single file module and has no dependencies other than thePython Standard Library.Elapsed Time: Customized time delta which represents elapsed time in nanoseconds.Stopwatch: An elapsed time measurer with the highest available resolution.Timer: Convenient syntax to capture measured elapsed time result and save it.SetupPrerequisitesThe only prerequisite to use TimeRun is runningPython 3.7+.InstallationInstall TimeRun fromPython Package Index:pip install timerunInstall TimeRun fromSource Code:python setup.py installQuickstartMeasure Code Block>>>fromtimerunimportTimer>>>withTimer()astimer:...pass# put your code here>>>print(timer.duration)0:00:00.000000100Measure Function>>>fromtimerunimportTimer>>>timer=Timer()>>>@timer...deffunc():...pass# put your code here>>>func()>>>print(timer.duration)0:00:00.000000100LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: timescale
Python tools for time and astronomical calculationsDependenciesdateutil: powerful extensions to datetimelxml: processing XML and HTML in Pythonnumpy: Scientific Computing Tools For Pythonscipy: Scientific Tools for Pythonsetuptools_scm: manager for python package versions using scm metadataReferencesT. C. Sutterley, T. Markus, T. A. Neumann, M. R. van den Broeke, J. M. van Wessem, and S. R. M. Ligtenberg,
“Antarctic ice shelf thickness change from multimission lidar mapping”,The Cryosphere,
13, 1801-1817, (2019).doi: 10.5194/tc-13-1801-2019DownloadThe program homepage is:https://github.com/tsutterley/timescaleA zip archive of the latest version is available directly at:https://github.com/tsutterley/timescale/archive/main.zipDisclaimerThis package includes software developed at NASA Goddard Space Flight Center (GSFC) and the University of Washington Applied Physics Laboratory (UW-APL).
It is not sponsored or maintained by the Universities Space Research Association (USRA), AVISO or NASA.
The software is provided here for your convenience butwith no guarantees whatsoever.CreditsThis project contains work and contributions from thescientific community.LicenseThe content of this project is licensed under theCreative Commons Attribution 4.0 Attribution licenseand the source code is licensed under theMIT license.
Package: timescale-doctor
Rule-based recommendations about your timeseries database.InstallationYou can installtimescale-doctorusingpip:pip install timescale-doctorRunning the toolJust call it in a similar manner to howpsqlis called:timescale-doctor my_databaseIt understands the usual environment variablesPGUSER,PGHOST,PGDATABASE, etc. Note that it donotunderstand PostgreSQL URLs
yet. SeeSupport PostgreSQL URLs for connection.Writing new rulesInstructions for writing new rules are available in theREADME in the
rules package.LicenseCopyright 2023 Timescale, Inc.Licensed under the Apache License, Version 2.0 (the “License”); you
may not use this file except in compliance with the License.  You may
obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.  See the License for the specific language governing
permissions and limitations under the License.
Package: timescaleutils
Enable Timescale Extension in Postgresenable_timescale()ReturnsTrueif enabled. Else ReturnsErrorCheck Timescale Extension Enabled in Postgrescheck_timescale()ReturnsTrueif Enabled elseFalseCreating Tablecreate_table(tablename,table_data)ParameterTypeDescriptiontablenamestringRequired. Table Nametable_datalistRequired. Column Name and Datatypestable_data=[['id','bigint',0],["names","varchar",200],['t_modified','timestamp',0]]Datatypes{"bigint":"BIGINT","boolean":"BOOLEAN","character":"CHAR","varchar":"VARCHAR","date":"DATE","float":"FLOAT","int":"INTEGER","interval":"Interval","json":"JSON","numeric":"NUMERIC","smallint":"SMALLINT","text":"TEXT","time":"TIME","timestamp":"TIMESTAMP"}Creating Index :create_index(table_name,columns)ParameterTypeDescriptiontable_namestringRequired. Table NamecolumnslistRequired. Column Name where you want to indexcolumns=["c3","date_time"]Creating Hypertable :create_hypertable(table_name,column_name)ParameterTypeDescriptiontable_namestringRequired. Table Namecolumn_namestringRequired. On which Column you want to Create Hypertable. Should be TIMESTAMP column onlySelect Data :selectgroupdata(select_type,group_by, start, end, where, orcondition, order_by,column_name,limit)ParameterTypeDescriptionselect_typestringRequired. Which type need to be selected. Sum / Average /Cols/Allstartstring/datetimeRequired. Start Timeendstring/datetimeRequired. End TimewheredictionaryRequired. Add single or multiple conditions based on column and valuesorconditiondictionaryRequired. Adding OR conditions based on column and valuesorder_bylistRequired. Order By Column Name ASC/DESCgroup_bystringRequired. Group By Column Namecolumn_namelistRequired. Add extra Column NamelimitlistRequired. For adding Limit.[limit,offset]where={"column_1":"value","column_2":"value2"}orcondition={"column_1":"value","column_2":"value2"}order_by=["column_name","desc"]column_name=["column_1","column_2","column_3"]limit=["limit","offset"]Insert Data :insert(dataset)ParameterTypeDescriptiondatasetdictionaryRequired. Set of Data to be inserted. Format is given belowdataset=[{"c3":"site_100$line_4888$equipment_6888$tag_60888","c1":"site_123","c5":"tag_11111","l1":"site_888","l2":"line_4888","l3":"equipment_6888","value":"260","time_stamp":"1669022699000","date_time":"2022-11-21 14:54:57"},{"c3":"site_400$line_4444$equipment_6444$tag_60444","c1":"site_456","c5":"tag_22222","l1":"site_444","l2":"line_4444","l3":"equipment_6888","value":"260","time_stamp":"1669022699000","date_time":"2022-11-21 14:54:57"}]Delete Data :delete(where)ParameterTypeDescriptionwheredictionaryRequired.  Add single or multiple conditions based on column and values. Format given belowwhere={"column_1":"value_1","column_2":"value_2"}
Package: timescope
TimeScopeSimple Python library written in Rust for analyzing and scoping out patterns in time series data. This is a pet project to practice programming in Rust and currently only contains two algorithms:ED-Pelt change point detectionSteady State detection (based on change points)Installpip install timescopeExample UsefromtimescopeimportTimeSeriesData,cpd_ed_pelt,ssd_cpdA=[0,0,0,0,10,10,10,10,10,0,0,0,0]B=list(range(len(A)))cps=cpd_ed_pelt(A,1)print(f"change points:{cps}")# change points: [4, 9]ts=TimeSeriesData(B,A)print(ts)# TimeSeriesData(#   time=[0, 1, ..., 11, 12],#   data=[0, 0, ..., 0, 0],#   granularity=1,#   is_step=false# )resampled_ts=ts.equally_spaced_resampling()print(resampled_ts.slice(3,6))# TimeSeriesData(#   time=[3, 4, 5, 6],#   data=[0, 10, 10, 10],#   granularity=1,#   is_step=false# )ss_map=ssd_cpd(resampled_ts,1,1.0,-1.0)print(f"steady state map:{ss_map.data}")# steady state map: [1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0]For more comprehensive examples, check thenotebooksfolder.
Package: timeself
TimeselfDescriptionTimeself is intended to measure and print, the caller script, execution time.Installationpip install timeselfUsage examplefrom timeself import timeself


def is_five_divisible(num):
	if num % 5 == 0:
		return True
	else:
		return False


print(is_five_divisible(20))
timeself()  # Must be the last line on the script.

# Output

Execution time: 2.2221007384359837e-05
Package: timeseries
A collection of utilities for time series modelling and analysisTrendsMoving averagesDecomposition (STL)Forecasting (ETS / ARIMA)Plotting (matplotlib)See the [wiki](https://github.com/chriso/timeseries/wiki/Time-Series) for more information.### Installation`bash $ pip install timeseries `### TestsRun the test suite with`bash $ make check `### LicenseMIT
Package: time-series
Time SeriesA simple python implementation of a sliding window.Installationpipinstalltime-seriesExamplesimporttimeseries# max 10 data pointsfixed_window=timeseries.Fixed(10)# removes added data points after 10 secondstimer_window=timeseries.Timer(10)# deletes data points after 10 iterationsforiinrange(100):current_window=fixed_window.slide(i)# deletes data points after 10 seconds have elapsed.foriinrange(100):current_window=timer_window.slide(i)# prints 89...99foriinfixed_window:print(i)# will most likely print 0...99foriintimer_window:print(i)iffixed_window.is_full:print("fixed window is full")# shrinks the number of elements to 2 (threadsafe)fixed_window.maxsize=2# print current number of itemsprint(timer_window.size,len(timer_window))
Package: time-series-binder
Time Series BinderTime Series Binder is a Python library for time series analysis and forecasting. It provides a comprehensive set of tools and models to manipulate, visualize, and predict time series data. This library is designed to assist researchers and analysts in performing various time series tasks with ease and efficiency.FeaturesIntegration with Pandas for seamless data manipulation and preprocessing.Statistical methods for analyzing time series data, including trend analysis, seasonality decomposition, and outlier detection.Neural network models powered by Keras for advanced time series forecasting.Integration with the NeuralProphet library for additional forecasting capabilities.Visualization tools for creating insightful plots and visual representations of time series data.Integration with scikit-learn for additional machine learning functionality.Change Log1.0.4 (30/05/2023)Modified DocumentationModified classes to adapt ANN model.Createdmodel_utilspackage.
Package: timeseriescv
This package implements two cross-validation algorithms suitable to evaluate machine learning models based on time series
datasets where each sample is tagged with a prediction time and an evaluation time.RessourcesA Medium postproviding some motivation and explaining the cross-validation algorithms implemented here in more detail.Advances in financial machine learningby Marcos Lopez de Prado. An excellent book that inspired this package.Github repositoryInstallationtimeseriescv can be installed using pip:>>> pip install timeseriescvContentFor now the package contains two main classes handling cross-validation:PurgedWalkForwardCV: Walk-forward cross-validation with purging.CombPurgedKFoldCV: Combinatorial cross-validation with purging and embargoing.Remarks concerning the APIThe API is as similar to the scikit-learn API as possible. Like the scikit-learn cross-validation classes, thesplitmethod is a generator that yields a pair of numpy arrays containing the positional indices of the samples in the train
and validation set, respectively. The main differences with the scikit-learn API are:Thesplitmethod takes as arguments not only the predictor valuesX, but also the prediction timespred_timesand the evaluation timeseval_timesof each sample.To stay as close to the scikit-learn API as possible, this data is passed as separate parameters. But in order to ensure that they are properly aligned,X,pred_timesandeval_timesare required to be pandas DataFrames/Series sharing the same index.Check the docstrings of the cross-validation classes for more information.
Package: time-series-gen
greendeck-timeseriesCreated for internalGreendeckuse only. Can be used for non-commercial purposes.How to build your pip packageopen an account herehttps://pypi.org/In the parent directorypython setup.py sdist bdist_wheeltwine upload dist/*referenceshttps://medium.com/small-things-about-python/lets-talk-about-python-packaging-6d84b81f1bb5Thank You
Package: time-series-generator
Time Series GeneratorDescriptionEmulates Teras Tensorflow TimeSeriesGenerator functionality presenting a candidate solution for the direct multi-step outputs limitation in Keras' version.Instalationpip install time-series-generatorUsageimportnumpyasnpfromtime_series_generatorimportTimeseriesGeneratordata=np.array([[i]foriinrange(50)])targets=np.array([[i]foriinrange(50)])data_gen=TimeseriesGenerator(data,targets,length=10,sampling_rate=2,batch_size=2)assertlen(data_gen)==20batch_0=data_gen[0]x,y=batch_0assertnp.array_equal(x,np.array([[[0],[2],[4],[6],[8]],[[1],[3],[5],[7],[9]]]))assertnp.array_equal(y,np.array([[10],[11]]))TestInstall requirementsWindows:.\scripts\init-env.ps1MacOS / Linux./scripts/init-env.shRun testRun in the terminal at project root folder:pytest -sKeras' version limitationA limitation of the Keras TimeseriesGenerator is that it does not directly support multi-step outputs. Specifically, it will not create the multiple steps that may be required in the target sequence.Nevertheless, if you prepare your target sequence to have multiple steps, it will honor and use them as the output portion of each sample. This means the onus is on you to prepare the expected output for each time step.Brownlee, JasonCandidate Improvement proposedAddition of the keyworded argumentlength_output.# define datasetseries=np.array([1,2,3,4,5,6,7,8,9,10])target=np.array([1,2,3,4,5,6,7,8,9,10])# define generatorn_input=2n_output=2generator=TimeseriesGenerator(series,target,length=n_input,length_output=n_output,batch_size=1)# print each sampleforiinrange(len(generator)):x,y=generator[i]print('%s=>%s'%(x,y))Output[[1 2]] => [[3 4]]
[[2 3]] => [[4 5]]
[[3 4]] => [[5 6]]
[[4 5]] => [[6 7]]
[[5 6]] => [[7 8]]
[[6 7]] => [[8 9]]
[[7 8]] => [[9 10]]ReferencesBrownlee, Jason. How to Use the TimeseriesGenerator for Time Series Forecasting in Keras
Package: time-series-metadata
time-series-metadataA metrologically enabled time-series metadata schemetime-series-metadatais a Python implementation of a metadata scheme for
time-series with measurement uncertainties. It is developed jointly by software
developers and researchers fromPhysikalisch-Technische Bundesanstalt(Germany) andInstitute for Manufacturing(UK) as part of the
joint European Research ProjectEMPIR 17IND12 Met4FoFand the
German research projectFAMOUS.time-series-metadatais written in Python 3 and strives to run withall Python versions with upstream support.
Currently it is tested to work with Python 3.5 to 3.8.SchemeThe following image illustrates an abstract representation of a time series:The scheme contains all metadata to interpret the actual time and quantity values.It is comprised of a dictionary containing the following keys with (default) values of
the specified type:metadata={"device_id":string(default:""),"time_name":string(default:"time"),"time_unit":string(default:"om:second"),"quantity_names":stringorlistofstrings(default:""),"quantity_units":stringorlistofstrings(default:""),"misc":optional,anyotherdatayouwanttoprovide(default:None),}Example useWe illustrate the use of the scheme assuming you already have a project set up.InstallationFirst you need to install the scheme with the usual command into your project's
Python virtual environment:pipinstalltime-series-metadataImport schemeInside your project's code import the scheme at the top of your module.fromtime_series_metadata.schemeimportMetaDataAssign initial valuesAfter importing the package you can make use of it and assign initial values.vs_description=MetaData(device_id="my_virtual_sensor",time_name="time",time_unit="s",quantity_names=("pressure_1","pressure_2"),quantity_units=("Pa","mPa"),misc="additional information")Read out metadataYou can access the metadata as a whole or time and quantity metadata separately.
Quantity metadata can be either accessed for all quantities at once or individually via index
or name. If you do not specify name or index, the first's quantity metadata is returned.
This might be especially convenient, if there is only one quantity.>>>vs_description.metadata{"device_id":"my_virtual_sensor","time_name":"time","time_unit":"s","quantity_names":["pressure_1","pressure_2"],"quantity_units":["Pa","mPa"],"misc":None}>>>vs_description.time{'time_name':'time','time_unit':'s'}>>>vs_description.quantities{'quantity_names':('pressure_1','pressure_2'),'quantity_units':('Pa','mPa')}>>>vs_description.get_quantity(1){'quantity_names':'pressure_2','quantity_units':'mPa'}>>>vs_description.get_quantity(name="pressure_1"){'quantity_names':'pressure_1','quantity_units':'Pa'}>>>vs_description.get_quantity(){'quantity_names':'pressure_1','quantity_units':'Pa'}MaintainersThe package is developed and maintained at the "Physikalisch-Technische Bundesanstalt"
byMaximilian GruberandBjörn Ludwig.
Package: time-series-model-basics
Forecasting BasicsDocumentation and Code is hosted on GithubGenerate and Plot Forecasts for Time Series DataIncludes:SMA, WMA and Single and Double Exponential SmoothingInstallpipinstalltime-series-model-basicsSimple Moving AveragePlot a Simulated Time Series with two or  any number of Simple Moving Averages as follows:fromtime_series_model_basics.moving_averageimportSMAdf,fig=SMA(1,4)fig.write_image("images/sma.png")When running on a notebook you may alternatively usefig.show()Forecast with dataframe as follows:importpandasaspddf=pd.read_csv('../data/Electric_Production.csv',index_col='DATE',parse_dates=['DATE'],)ts_col='Electric Production'df.columns=[ts_col]_,fig=SMA(4,df=df,ts_col=ts_col,)fig.update_layout(autosize=False,width=1100,height=450,)fig.update_traces(line=dict(width=0.8))fig.write_image("images/elec_prod_sma.png",)Weighted Moving AverageFor the case of  Weighted Moving Averages, pass the weights as lists:fromtime_series_model_basics.moving_averageimportWMAdf,fig=WMA([1,1,2],[3,2])fig.write_image("images/wma.png")Simple SmoothingPlot a Simulated Time Series with two or  any number of simple exponential smoothing as follows:fromtime_series_model_basics.smoothingimportSINGLEdf,fig=SINGLE(.15,.5)fig.write_image("images/single.png",)Double Smoothingfromtime_series_model_basics.smoothingimportDOUBLEdf,fig=DOUBLE([.25,.3],[.5,.6],)fig.write_image("images/double.png")AuthorEnrique Jimenez
Package: time-series-models
Time series modelsDescriptionTime series neural network models forTime series predictorInstallationpip install time-series-modelsUsage examplefromtime_series_modelsimportBenchmarkLSTMfromskorch.callbacksimportEarlyStoppingfromskorch.datasetimportCVSplitfromtorch.optimimportAdamfromflights_time_series_datasetimportFlightSeriesDatasetfromtime_series_predictorimportTimeSeriesPredictortsp=TimeSeriesPredictor(BenchmarkLSTM(),lr=1e-3,lambda1=1e-8,optimizer__weight_decay=1e-8,iterator_train__shuffle=True,early_stopping=EarlyStopping(patience=50),max_epochs=250,train_split=CVSplit(10),optimizer=Adam)past_pattern_length=24future_pattern_length=12pattern_length=past_pattern_length+future_pattern_lengthfsd=FlightSeriesDataset(pattern_length,past_pattern_length,pattern_length,stride=1)tsp.fit(fsd)mean_r2_score=tsp.score(tsp.dataset)print(f"Achieved R2 score:{mean_r2_score}")assertmean_r2_score>-20Oze dataset history
Package: time-series-nmf
time-series-nmftime-series-nmfis a Python package implementing non-negative matrix factorization for time series data. Currently, it supports a version with Tikhonov regularization and sparse constraints as proposed byFabregat R.. et. al.and implemented in Matlab inhttps://github.com/raimon-fa/palm-nmf. It uses aPALMoptimization scheme. We plan to add other models and optimization algorithms.This work is under continuous development.Installation:# from github (latest)pipinstallgit+https://github.com/valentina-s/time-series-nmf# from pypi (stable)pipinstalltime-series-nmfGetting started:importtsnmf# generate some datafromnumpy.randomimportranddata=rand(100,1000)# fit time series nmf to datamodel=tsnmf.smoothNMF(n_components=5)model.fit(data)# outputsmodel.Wmodel.HAcknowledgementsThis work has been supported by NSF award #1849930 and the Gordon and Betty Moore and Alfred P. Sloan Foundations Data Science Environments grant (MSDSE).
Package: time-series-predictor
Time Series PredictorUsagePlease refer to the following examples:example_flights_dataset.ipynbexample_oze_challenge.ipynbPre requisistes installationWindows.\scrips\init-env.ps1Linux or MacOS./scripts/init-env.shDevelopmentpip install -e .[dev]Testpip install -e .[test]
pytest -sBuild docsWindows RequirementsMakeIn an elevated powershell prompt install it by:chocoinstallcmakeTexLiveDownload and install TexLive fromctan.orgPerl requirementIn an elevated powershell prompt install it by:chocoinstallactiveperlCPANM requirementIn an elevated powershell prompt install it by:curl-Lhttps://cpanmin.us|perl-App::cpanminusLatex indent requirementgitclonehttps://github.com/cmhughes/latexindent.pl.gitcdlatexindent.pl/helper-scriptsperllatexindent-module-installer.plImageMagick requirementIn an elevated powershell prompt install it by:chocoinstallimagemagickBuild processpipinstall-e.[docs]# cd docs.\makehtml.\makelatex# sphinx-build docs/source docs/build.\build\latex\make
Package: timeseriesprocessing
# Precessing timeseries problems using Regression
This is a simple framework to process multi-variable timeseries dataset using regression.<br>Most time series analysis methods focus on single variable data. It’s simple to understand<br>
and work with such data. But sometimes our time series dataset may containe multi-varibles.<br>
For example, in marketing analysis, profit of a day may not only be decided by the number<br>
of customers, but also depend on campaign, CM and so on.<br>
It is harder to model such problems and often many of the classical methods do not perform<br>
well.<br>Since regression methods are good at processing multivarible, we can simply turn our timeseries<br>
dataset into training dataset for regression by exluding time columns.<br>## Restrictions
In general when using regression methods, timeseries data for your independent variables must be<br>
avaliable to make predicitons.<br>## How to use
See example.ipynb