Saravanan666/pypi-org huggingface dataset:
Package: tsdst
Tom's Statistics and Data Science Toolkit (tsdst)Introduction and MotivationThis project began as a list of functions for tasks I did repeatedly and hated coding every new instance. Now, it has evolved into a statistical utility tool and a notepad. Some of these functions were created because I wanted to learn and understand the innards of some mathematical concept, and are not optimized in any way. Other functions have been used repeatedly on projects and are hopefully optimized to some extent.Some of the more useful code here extends functionality of sklearn and other libraries. A majority of the functions are either related or similar to popular functions insklearnorstatsmodels. What makes the implementations here different are generally two things:Remove Code AbstractionsFor a majority of the functions, I tried to make it easy for someone (including me) to review and understand what is happening inside a function or set of functions so that the data science or statistical concepts can be clearly read and understood. I tried to avoid writing code that didn't make it clear what was happening mathmatically. This sometimes means that I ignore (purposefully) programming concepts that could make these functions much faster. However, most of the time I simply missed something that could easily be done another way and not affect the readability at all. I am not opposed to this being practically useful to others, so if there are obvious improvements, please let me know.Extend Existing FunctionalityThere are some functions in exisitng data science libraries that I just don't like, or that I wish were done differently. Othertimes, there are methods or functions that just don't exist anywhere else (to my knowledge). And still other times, there are things that I could never figure out myself, but once the groundwork was laid, could extend to other useful situations.InstallationTo Install:pip install tsdstOr:conda install -c tomwerner5 tsdstUsing This PackageAfter installing, simply import to your module withimport tsdst. A detailed description of each module/function/class (with examples) can be found on the documentation page. Documentation can be foundhere:LicensingI am feeling pretty liberal with what can/can't be done with this project, so I have provisioned it with an MIT license. If anyone does end up using this for something cool, I wouldn't mind a name drop :)Final RemarksI have recieved much assistance over the years both in documenting the conceptual aspects of these functions and writing the actual code, so here I offer a general thank-you to those individuals (most of you know who you are).I have tried to attribute what is not my own work when appropriate, as well as acknowledge individuals who have given direct or indirect help. All of these attributions can be found in the documentation page (if I appear to have missed anything/anyone, please let me know). Please reach out if you have any feedback.
Package: tse2sql
SQL converter of the electoral registry published by the Costa Rican Supreme
Electoral Tribunal.Documentationhttps://tse2sql.readthedocs.org/LicenseCopyright (C) 2016 Carolina Aguilar
Copyright (C) 2016 Carlos Jenkins

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 at

    http://www.apache.org/licenses/LICENSE-2.0

Unless 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: tsectc
A simple library to find code to code in tehran stock market.pip install tse_ctcfrom tsectc import tsectcmy=tsectc()
my.check() # print code to code listmy.check() # return  a list include all symbol code to code by detail in current day trades.v: 0.0.2
!pip install tsectc
from tsectc.tsectc import tsectc
my=tsectc()
print(my.check())
Package: tse-dataloader
tse_dataloadertse_dataloader is a python package for extracting stock historical data from Tehran Stock Exchange.Extract data and load them inPandasdata frameCalculate SMA and EMACreate line charts withmatplotlibInstall:pip install tse_dataloaderFunctions:Loading data withget_data(ticker)orgetcode_data(code)>>> from tse_dataloader import download
>>> MELT= download.get_data('ظˆط¨ظ…ظ„طھ')
>>> print(MELT)

                   TICKER    FIRST     HIGH  ...     OPEN     LAST  date_shamsi
Date                                         ...                               
2009-02-18  S*Mellat.Bank   1050.0   1050.0  ...   1000.0   1050.0   1387/11/30
2009-02-21  S*Mellat.Bank   1051.0   1076.0  ...   1050.0   1057.0   1387/12/03
2009-02-22  S*Mellat.Bank   1065.0   1074.0  ...   1050.0   1055.0   1387/12/04
2009-02-23  S*Mellat.Bank   1066.0   1067.0  ...   1065.0   1060.0   1387/12/05
2009-02-25  S*Mellat.Bank   1061.0   1064.0  ...   1061.0   1060.0   1387/12/07
...                   ...      ...      ...  ...      ...      ...          ...
2020-07-01  S*Mellat.Bank  27350.0  27370.0  ...  26110.0  26690.0   1399/04/11
2020-07-04  S*Mellat.Bank  26940.0  27000.0  ...  26940.0  25600.0   1399/04/14
2020-07-05  S*Mellat.Bank  24560.0  27040.0  ...  25760.0  25860.0   1399/04/15
2020-07-06  S*Mellat.Bank  26200.0  26950.0  ...  25670.0  26950.0   1399/04/16
2020-07-07  S*Mellat.Bank  27320.0  28200.0  ...  26860.0  26040.0   1399/04/17

[2374 rows x 12 columns]

>>> MELT= download.getcode_data(778253364357513)Plot Close price and Volume line chart withclose_vol()>>> from tse_dataloader import analysis
>>> analysis.close_vol(MELT)

# to create a chart without gaps you can use df.reset_index()
>>> analysis.close_vol(MELT.reset_index())Calculate short and long term Simple Moving Average, Exponential Moving Average, add them to your data frame and plot chart line withsma()andema()>>> from tse_dataloader import analysis
>>> analysis.sma(MELT, 20, 50)
>>> analysis.ema(MELT, 20, 50)For your convenience, I create a list of tickers and attached it to the package to load data faster. In order to update your symbol list, you can usestock_list.update(). it takes a few minutes to update data from tsetmc.>>> import tse_dataloader
>>> stock_list.update()

Database has updated!In some cases, if you couldn't find your specific symbol in the list, you can add it to the list manually with thestock_list.add()function.>>> import tse_dataloader
>>> stock_list.add(2400322364771558, 'ط´ط³طھط§')


Symbol added to the list!You can find every symbol's code at the end of its URL:http://www.tsetmc.com/loader.aspx?ParTree=151311&i=2400322364771558Thanks totehran-stock
Package: tse-index
دریافت دیتای شاخص کل و صنایع بورس تهرانبه راحتی دیتای بروز شاخص ها و سهام بازار بورس و اوراق بهادار تهران را در پایتون دریافت کنید.امکاناتدریافت تاریخچه قیمتی نمادها و شاخص هادریافت لیست نمادهادریافت لیست شاخص‌هاجستجو در نام نمادهاتجمیع خودکار دیتای قدیمی نمادهاتعدیل عملکردی سابقه قیمتی سهامنصبpipinstalltse-indexنصب آخرین نسخه در حال توسعهpython-mpipinstallgit+https://github.com/alised/tse-index.gitنحوه استفادهدریافت سابقه شاخص یا نمادimporttse_indexastseindex=tse.reader()index.history("شاخص کل6",start=1390,end=14000730,adjust_price=False,interval="d")OpenHigh...AdjCloseYesterdayDate...2011-03-2623295.723756.6...23756.32.329490e+042011-03-2723853.524213.2...24199.82.375630e+042011-03-2824226.624287.8...24287.82.419980e+042011-03-2924351.224495.9...24486.62.428780e+042011-03-3024495.524605.0...24486.02.448660e+04...............2021-10-121454820.01454820.0...1418721.15.700514e+102021-10-131417770.01417770.0...1397446.45.615032e+102021-10-161406010.01437440.0...1437445.45.775750e+102021-10-171444280.01445100.0...1436062.05.770277e+102021-10-181435350.01436960.0...1436964.15.756671e+10جهت دریافت تاریخچه شاخص کافیست نام آن را وارد نماییدتاریخ شروع و پایان اختیاری است و می‌تواند شمسی یا میلادی باشد. تاریخ شمسی حتما باید بصورت عددی وارد شود. در صورتی که تنها سال وارد شود یک فروردین آن سال اعمال میشود.اینترول میتواند d، w و یا m باشد که به ترتیب دیتای روزانه، هفتگی و ماهانه نماد مورد نظر را بر می گرداند. اولین روز هفته شنبه در نظر گرفته شده است. اما در مورد دیتای ماهانه مبنا، ماه‌های میلادی می‌باشد.برای دریافت سابقه تعدیل شده کافیست آرگومان adjust_price=True را اضافه کنید. این تعدیل از نوع عملکردی است و افزایش سرمایه و تقسیم سود را شامل می شود.
توجه داشته باشید که در مورد شاخص تعدیل قیمت معنا ندارد و در صورتی که از آرگومان مربوطه استفاده کنید نادیده گرفته می‌شود.جستجو در لیست شاخص‌ها و نمادهاimporttse_indexastseindex=tse.reader()index.search("دارو","index").symbol3243-مواددارویی61039داروفرابورس6در صورتی که نام کامل شاخص یا نمادی را نمی‌دانید کافیست تا آن را جستجو کنید.
برای یافتن نام نمادها بجای 'index' از عبارت 'normal' استفاده کنید.دریافت لیست شاخص‌هاimporttse_indexastseindex=tse.reader()index.indices().symbol001-زراعت6110-ذغالسنگ6213-کانهفلزی6314-سایرمعادن6415-غذا-آشامیدنی6...106چوب6107کانیغیرفلزیفرا6108کانیفلزیفرا6109کلهموزنفرابورس6110کلهموزنپایه6دریافت لیست کامل نمادهاimporttse_indexastseindex=tse.reader()index.instruments().symbol0اعتضادغدیر1کاغذمراغه2(1)کشاورز3(12)نوین4(2)کشاورز...2933گپارس2934گکوثر2935گکیش2936گکیشح2937یاقوتمشارکت در توسعه برنامهاگر مشکلی در برنامه مشاهده می کنید از سربرگ Issues موضوع را با تگ باگ و در صورتی که پیشنهادی دارید با تگ بهبود مطرح نمایید.در صورت تمایل به مشارکت در توسعه پروژهآموزش مشارکترا مطالعه فرمایید.
Package: tsenum
tsenumA timestamp generator.InstallYou can use pip to install from the repositorypip install tsenumor download sources and run pip from this directorygit clone https://github.com/aboehm/tsenum
pip install .Usagetsenumprovides an CLI. For help run:tsenum -hTo count 7 days back from yesterday via CLI, run:tsenum--offset-1--count-7--stepday--pattern"%Y-%m-%d: Hello world!"2016-05-27:Helloworld!2016-05-28:Helloworld!2016-05-29:Helloworld!2016-05-30:Helloworld!2016-05-31:Helloworld!2016-06-01:Helloworld!2016-06-02:Helloworld!To do it programmatically:fromdatetimeimportdatetimeimporttsenumprint(tsenum.enumerate_times(datetime.now().astimezone(),offset=-1,count=-7,step=tsenum.Step.DAY,pattern='%Y-%m-%d'))
Package: tse-option
tse_optionاین پکیج جهت بررسی و قیمت گذاری اوراق اختیار معامله موجود در بورس اوراق بهادار تهران و فرابورس ایران ایجاد شده است. لازم به یادآوری است که در این ماژول از مدل ارائه شده توسط بلک-شولز-مرتون در سال 1973 برای قیمت گذاری اختیار معامله استفاده شد است. سعی بر آن است که در نسخه های بعدی سایر مدل های قیمت گذاری نیز اضافه شوند.برخی از توابع این پروژه،از ماژول هایfinpy_tseوtsemodule5اقتباس شده اند.توجه: کلیه خروجی این ماژول از جمله قیمت گذاری و محاسبه تلاطم ضمنی و ... به جهت تسهیل در تصمیم گیری سرمایه گذاران است و هیچگونه پیشنهادی برای خرید یا فروش آن محسوب نمی شود. لذا تمامی عواقب سرمایه گذاری به عهده شخص سرمایه گذار است و توسعه دهندگان هیچ مسئولیتی در قبال زیان های احتمالی ندارند.تغییرات نسخه جدید(0.1.1.0):1- امکان دانلود تاریخچه قیمت سهام و اوراق اختیار معامله2- رفع برخی مشکلاتتغییرات نسخه جدید(0.1.2.1):1- بروزرسانی لینک های tsetmc2- امکان دریافت تاریخچه قیمت چندین نماد(مانند yfinance)3- بروزرسانی لینک سایت tse.irنصبpipinstalltse-optionفراخوانیimporttse_optionastsoدریافت داده های مربوط به تمام اختیار معامله های موجود روی یک سهم خاصdf=tso.pricing_based_on_stock(stock_name="خودرو",trading_days=100,IV=False,leverage=True,P_BSM=False,sort="Maturity")stock_name:نماد سهم مورد نظرtrading_days:تعداد روزهای معاملاتی مورد نظر که تلاطم تاریخی براساس آن محاسبه می شود.IV:محاسبه تلاطم ضمنی یا Implied Volatilityleverage:نمایش مقدار اهرم اختیار معاملهP_BSM:نمایش نسبت قیمت بازار به قیمت تئوری بلک-شولز-مرتونsort:نحوه مرتب شدن دیتافریم خروجی(می توان از متغیرهایی چون زمان باقی مانده تا سررسید(Maturity)،قیمت اعمال(Strike Price) و موقعیت های باز(Open Interest) برای مرتب سازی استفاده کرد)دریافت داده های مربوط به یک اختیار معامله خاصdf=tso.pricing_based_on_option(option_name="ضسپا1205",trading_days=100,IV=False,leverage=True,P_BSM=False,sort="Maturity")option_name:نماد اختیار معامله مورد نظرIV:محاسبه تلاطم ضمنی یا Implied Volatilityleverage:نمایش مقدار اهرم اختیار معاملهP_BSM:نمایش نسبت قیمت بازار به قیمت تئوری بلک-شولز-مرتوندریافت تاریخچه قیمتdf=tso.download_history("خودرو",j_date=True,start="1402-01-01",end=None,adjust_price=True,drop_unadjusted=False)df=tso.download_history(symbols=["خودرو","فولاد","وبملت"],j_date=False,start="2023-01-01",end=None,adjust_price=False,drop_unadjusted=False)symbols:نماد یا نمادهای مورد نظرj_date:نوع تاریخ ورودیstart:تاریخ شروع (براساس j_date لازم است تعیین شود)end:تاریخ پایان (براساس j_date لازم است تعیین شود)adjust_price:نمایش قیمت های تعدیل شده سهامdrop_unadjusted:حذف ستون های قیمت های تعدیل نشده (حتما باید adjust_price برابر True باشد)برای مشاهده مثال های بیشتراینجاکلیک کنید.در صورت برخورد با هرگونه خطا، ممنون میشم به من اطلاع بدین (sm.sokut@gmail.com)This project on githubtse-option
Package: tse.py
A Python package to access security modules (TSE) of the German
Fiscal Authority.The German Friscal Authority has determined that the transactions
of all cash register systems used on the German market must be recorded
unchangeably. Certified external storage media are used for this purpose.
The storage is accessed via certified libraries or APIs.To interact with the TSEs, the package implements a vendor-independent API.
Currently, TSEs from Epson are supported. Support for other manufacturers
is planned for the future.Documentation:https://ccodein.gitlab.io/tse.pyGitlab Project:https://gitlab.com/ccodein/tse.py
Package: tseries-featurizer
Time-Series FeaturizerThis module helps with the time series featurization, providing many tools and a simple interface for custom tools creation.Time-Domain FeaturizationMeanMin / MaxStandard deviationKurtosisSkewness...Frequency-Domain FeaturizationPeak detectionEnergy...Auto-regressionARARMAARIMAVAR...Wavelet transformHilbert's transform
Package: tservice
T-Service is a tiny Python tool for starting a local static file server
usingTornado.
I use it for previewing sites before pushing them toGitHub Pages.InstallationT-Service is on PyPI, install it with:pip install tservice.UsageT-Service installs a command line utility calledtserve.tservehas one required parameter:
the directory from which to serve files.
For example, to start the server from a directory calledbuildthat’s in your current directory, use this command:tserve buildThe server starts on port 8000 by default, so you can look for your
site athttp://localhost:8000.Specifying a PortIf port 8000 is in use, or you want to use a different port, use the-p/--portflag:tserve --port 7654 buildSpecifying a PrefixIf you need to run the server so that it serves the files from some prefix
use the-f/--prefixflag:tserve --prefix myusername buildThat will cause the files to be served fromhttp://localhost:8000/myusername/.
(You may need to do this so that the local site matches where your
site will be deployed, e.g. GitHub Pages or a university server.)Stopping the ServerTypecontrol-Cat the command line to stop the server.Why Not Use Python’s Server?I’ve found I sometimes need to serve files with a prefix on the URL,
and I don’t know how to do that with Python’sbuiltin server.
Package: tset
time set: all the states of a Pythonsetdata structure over time,
without storing every complete version, and with nice ‘as-of’ (at)
access.Implementation: Currently stores the most recent version completely,
so accessing the most recent version is not too slow. Accessing older
versions is slower because it walks through the history. The whole
thing will eventually slow down when there are tons of versions
because it goes through all the version times fairly naively.Usage> from tset import Tset
> from datetime import datetime

> beginning = datetime.now()
> t = Tset(range(1,5))
> middle = datetime.now()
> t.value(range(3,8))

> t.value()
# {3, 4, 5, 6, 7}

> t.value(at=middle)
# {1, 2, 3, 4}

> t.value(at=beginning)
# {}TestsRun the tests withnosetestsorpython-mtest.ContextThe idea of preserving data history is not unique. There is a
considerable work onpersistent data structures(which is quite
distinct from the idea of persisting data to disk). Interesting
related (and more comprehensive) implementations includeZODB’sGenerational Sets,dat, andDatomic.
Package: tsetdomocli
DoMo CLIDoMo is a Docker Monitoring Command Line Tool which collects the most important metrics running docker containers.InstallationYou can install domo withpip install domoPrerequisitesDoMo collects metrics by sending a query request to Prometheus Server. To collect docker container metrics(Memory/Disk/CPU usage) and monitor app logs, the following prerequisites should be satisfied:Docker Engine is runningPrometheus server is running inhttp://localhost:9090/cAdvisor and Grok Exporter are integrated in PrometheusHow to usetypedomoto get an overview of all commandsUsedomo list-containersto get id and name of all running containersUsedomo container <container_name>/<container_id>to list container metricsUsedomo logsto show the latestError information in app log file
Package: tsetmc-api
TSETMC-APIThis library is for getting data fromtsetmcwebsite. It is divided into 5 subcomponents:InstallationYou can install this library using the following command:pip install tsetmc-apiExamplesYou can find examples of using each component inexamplesdirectory.ComponentExample FileSymbolsymbol_example.pyMarket Watchmarket_watch_example.pyDay Detailsday_details_example.pyMarket Mapmarket_map_example.pyGroupgroup_example.pyAsyncasync_example.pyUsagesymbol:working with main symbol page and live data (
e.g.this page)market_watch:getting data visible frommarket watch pageday_details:working with details of a symbol in a single day of history (
e.g.this page)market_map:getting data visible inmarket map pagegroup:getting list of available symbol groupsSymbol Component (tsetmc_api.symbol)Market Watch Component (tsetmc_api.market_watch)Day Details Component (tsetmc_api.day_details)Market Map Component (tsetmc_api.market_map)Group Component (tsetmc_api.group)Group component currently only has one function (get_all_groups) which returns all the symbol groups.ErrorsTsetmc sometimes returns 403 and you should retry.Async SupportEach method in the library has an async counterpart with the same name and a_asyncsuffix.
These methods use the sync functions behind the scene in an asyncio pool executor.TODOMigratesymbolcomponent to use new tsetmc.Migratemarket_watchcomponent to use new tsetmc.Migrateday_detailscomponent to use new tsetmc.Migratemarket_mapcomponent to use new tsetmc.Migrategroupcomponent to use new tsetmc.Support asyncio.Support and DonationIf this repository helped you, please support it by giving a star (:star:).For contacting me about this project please use the following email:mahdi74sadeghi+tsetmc_api@gmail.com
Package: tsetmc-webservice
tsetmc-webserviceکتابخانه‌ای برای ارتباط با وب‌سرویس سایت tsetmc. برای استفاده از این سرویس باید یک یوزرنیم و پسورد را از شرکت بورس تهران تهیه کنید.توضیحات بیشتر در مورد توابع در سایت زیر وجود دارد:http://cdn.tsetmc.com/Site.aspx?ParTree=11141111Installationpipinstalltsetmc-webservice
Package: tseuler
tseulerA library for Time Series exploration, analysis & modelling. This includes -As of now, this libray is in pre-alpha phase, i.e there is a lot of work still left before its first stable release.TSMAD - Time Series Mini Analysis DashBoard.Functionalities Include- A mini Dashboard for Time Series Analysis, with multiple variations to each kind of analysis
- Inbuilt Freqency Variation analysis
- Intervention Analysis (In Future)TSSTATS - Time Series Statistical & Modelling FunctionsFunctionalities Include:- Rolling Origin Framework (Currently Supports - statsmodels, sklearn, sklearn) for both multi-variate and uni-variate
- Residual Diagnostics
- Statistical Tests
- Entropy Calculations
- Intervention Analysis (In Future)ExampleInstallationInstallationpipinstalltseulerUsageInstantiating a DashBoardimportpandasaspdimporttseulerastse# Read the Time Series DataFramedataDF=pd.read_csv('Raw Data/stocks_data.csv',index_col=0)tsmadObj=tse.TSMAD(tsdata=dataDF,data_desc='Stocks Data',target_columns=['close'],categorical_columns=['Name'],dt_format='%Y-%m-%d',dt_freq='B',how_aggregate={'open':'first','high':'max','low':'min','close':'last'},force_interactive=True)tsmadObj.get_board()tseulerhas been built upon:-pandasnumpypanelaltairmatplotlibstatsmodelsHistoryv0.0.4dev0 : Development PackageAdded TSMADAdded TSSTATS
Package: tsf
Time Series ForecasterAn automated machine learning toolkit for timeseries forecasting built using python and its libraries.FeaturesTakes an input time series (uni-variate or multi-variate) and performs the following functionalities.Pre-processing, Imputations, Stationarity CheckTransformations (to achieve stationarity, if required)Timeseries modeling to select the best model based on RMSEHolt-Winter Linear,Holt-Winter Trend,ARIMA,SARIMAX,AutoARIMA,Linear Regression,Random ForestReverse Transformations (if required)Returns the forecasts for the user specified periods and the best model RMSERequirementsPython>=3.4Installation$pip3installtsfSimple Usage>>>importpandasaspd
>>>ts_data=pd.read_csv('ts_data.csv')>>>fromtsf.forecasterimportTimeSeriesForecasterastsf
>>>ts_model=tsf()>>>forecasted,training_predicted,rmse=ts_model.forecast(ts_data=ts_data,forecast_feature='Close',forecast_periods=3)Parameters:ts_data: Time Series data frame for which forecast is to be generatedforecast_feature: The feature/endog variable which is to be forecastedforecast_periods: Number of future periods for which to generate forecastAttributes:forecasted: The forecasted time series using the best model for the number of periods mentioned byforecast_periodstraining_predicted: The predictions on the training data used to built the timeseries modelrmse: RMSE on the training data for the best modelConsole OutputTherootmeansquareerrorfortheforecastis0.934
Thenumberofpredictionsrequestedis3andpredictionsareasbelow:36718.05026637771.42160138829.542411Detailed DescriptionThe code takes the timeseries data and follows the steps below to forecast timeseries for the specified future periods.Preprocess Timeseries Data - Missing values are handled using forward fillData is then checked for stationarity using Dickey-Fuller Statistical TestThreshold/Critical Value for the test is set to 1%If the Statistical Value of the test statistic is less than 1% critical value, then the timeseries is considered to be stationaryIf the timeseries is stationary (result of step 2), then modeling is performed on the data using various timeseries modeling techniques (as mentioned in Features section) and best model is selected based on RMSE to output the forecasted value for fuuture periods specified by the user.If the timeseries is not stationary:First log transformation is performed and step 2 is repeated.If found stationary, step 3 is performed else the next transformations are performed in the following order : Moving Average, Exponentially weighted moving average, Differencing, Second Order DifferencingFor all these transformations Step 2 and Step 3 are performedIf no transformation makes the timeseries stationary, then timeseries modeling cannot be performedFor the timeseries which returns the forecast values as a result of step 3, reverse transformations are performed to scale back the data to original scale. For example: If data acheieved stationarity through Log Transformation then reverse log transformation is performed.