Saravanan666/pypi-org huggingface dataset:
Package: tremolo-session
tremolo-sessionA simple, file-based session middleware forTremolo.See also:tremolo-login.Usage#!/usr/bin/env python3fromtremoloimportTremolofromtremolo_sessionimportSessionapp=Tremolo()# this is a session middleware# that enables you to use context.session or request.context.sessionSession(app,expires=86400)@app.route('/')asyncdefindex(request=None,**server):session=request.context.sessionifsessionisNone:returnb'The session will be created after you reload this page.'if'visits'insession:session['visits']+=1else:session['visits']=0returnb'You have visited this page%dtimes today.'%session['visits']if__name__=='__main__':app.run('0.0.0.0',8000,debug=True,reload=True)Installingpython3 -m pip install --upgrade tremolo_sessionTestingJust runpython3 alltests.py.Or if you also want measurements withcoverage:coverage run alltests.py
coverage combine
coverage report
coverage html # to generate html reportsLicenseMIT
Package: tremulator
Function emulation using Gaussian processestremulatorprovides theEmulatorclass for easy emulation
of expensive functions with user-defined training and acquisition
functions. It is built upongeorgeand allows the trained emulator to be saved to anasdffile. The saved file
can be read by theInterpolatorclass which then requires no more
training.InstallationUsing piptremulatoris available onPyPI, install usingpip install tremulator --upgradeGithubThe package can be installed from Github by running the following
commands in the preferred installation location:git clone https://github.com/StijnDebackere/tremulator
cd tremulator
python3 setup.py installDependenciestremulatorwill automatically install the following packagesnumpyscipyasdfemceegeorgepyDOEtqdm
Package: tren
‘tren’ is a general purpose file and directory renaming tool. Unlike
commands like ‘mv’, ‘tren’ is particularly well suited for renamingbatchesof files and/or directories with a single command line
invocation.  ‘tren’ eliminates the tedium of having to script simpler
tools to provide higher-level renaming capabilities.‘tren’ is also adept at renaming onlypart of an existing file or
directory nameeither based on a literal string or a regular
expression pattern.  You can replace any single, group, or all
instances of a given string in a file or directory name.‘tren’ implements the idea of arenaming token.  These are special
names you can embed in your renaming requests that represent things
like the file’s original name, its length, date of creation, and so
on.  There are even renaming tokens that will substitute the content
of any environment variable or the results of running a program from a
shell back into the new file name.‘tren’ can automatically generatesequencesof file names based on
their dates, lengths, times within a given date, and so on.  In fact,
sequences can be generated on the basis of any of the file’s ‘stat’
information.  Sequence “numbers” can be ascending or descending and
the count can start at any initial value.  Counting can take place in
one of several internally defined counting “alphabets” (decimal, hex,
octal, alpha, etc.) OR you can define your own counting alphabet.
This allows you to create sequences in any base (2 or higher please :)
using any symbol set for the count.‘tren’ is written in pure Python and requires Python version 2.6.x or
later.  It is known to run on various Unix-like variants (FreeBSD,
Linux, MacOS X, cygwin) as well as Windows.  It will also take
advantage of ‘win32all’ Python extensions on a Windows system, if they
are present.
Package: trenalyze-python
trenalyze(PYTHON) V0.0.2Author|DocsLibrary PrerequisitesPython >=3.6WhatsApp account.Active Token - Get a Tokenhere.InstallationUsing PIP:$pipinstalltrenalyze__pythonIn PYTHON:Note:You'll need to Import the Trenalyze Python Library after installation# Load the full build.fromtrenalyze__pythonimportTrenalyzeAPI1. Creating an instance of the Trenalyze class.# Creating an instance of the Trenalyze class.trenalyze=Trenalyze()ParamTypeDescriptiontokenstringUse your Trenalyze Token from yourDashboard.# Setting the API key for the Trenalyze API.trenalyze.setToken(token)Note:Phone number should be in the following format12345678912, without+or any other symbols2. Initialize needed variablesParamTypeDescriptionsenderstringEnter the WhatApp Number that has already been scanned on the TrenalyzeDashboard.receiverstringPhone number should be in the international format2348157002782, without+or any other symbols.msgtextstringEnter the desired text message to send.mediaurlstring(OPTIONAL).BUT MUST BE DECLAREDThis should be a valid media/file link.Learn Morebuttonsarray(OPTIONAL).BUT MUST BE DECLAREDYou can attach quick replies buttons to your message.Learn Moredebugboolean(OPTIONAL). Default is false. But you can set it to be true and the debug message is passed onto the console.# Set the Required Parameters for sending a messagesender='YOUR_WHATSAPP_NUMBER'receiver='RECIPIENT_NUMBER'msgtext='Hello World'mediaurl='https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png'buttons=[['index'=>1,'urlButton'=>['displayText'=>'Visit my website!','url'=>'https://trenalyze.com']],['index'=>2,'callButton'=>['displayText'=>'Call me!','phoneNumber'=>'+1 (234) 5678-9012']],['index'=>3,'quickReplyButton'=>['displayText'=>'This is a reply, just like normal buttons!','id'=>'id-like-buttons-message']]]NOTE:When not usingmediaurlandbuttonsset toNULLmediaurl=''buttons=''3. Send The Required Variablestrenalyze.setSender(sender)trenalyze.setReceiver(receiver)trenalyze.setMsgtext(msgtext)NOTE:You can set Debug to True or False. It's False By defaulttrenalyze.setDebug(True)4. Initialize SendMessage# Initialize the send WhatsApp message functionsres=trenalyze.sendMessage()print(res)5. Sample Response{'status':True,'response':{'message':'Messages sent successfully'}}
Package: trendalation
trendalationAn anomaly detection package for all sorts of trends & time series data. The library leverages algorithms like procrustes analysis to compare and contrast the general shape & trajectory of different trends. Theprocrustses analysistechnique could be leveraged to get the minimum possible mean squared error between 2 distributions (after mathematical transformations). Using the training dataset, an ideal reference trace is determined for comparision along with a classification threshold from the generated error distribution using procrustes against this reference curve.InstallationDependenciestrendalation requires:Python (>= 3.8)NumPy (>= 1.25.0)Scikit-Learn (>=1.3.0)SciPy (>= 1.11.1)Using pipThe easiest way to install trendalation is using pip:pip install trendalationDocumentationUsageTo train a classifier on a collection of traces, a classifier can be trained on the trace distribution. The model sets up the necessary classification criterion by analyzing various population statistics and trends. eg-fromtrendalation.classificationimportProcClassifierclf=ProcClassifier()clf.fit()To futher optimize the process to the classification criterion determination, additional (optional) training parameters can be provided-y:The target values (binary class labels) as integers with 1 representing an anomaly. If provided, classifier is fitted only on "good" samples in an attempt to get higher errors with "bad" samples against the reference curve.threshold:Provide a percentile value to determine the threshold value on the procrustes error distribution.normalize:Option to normalize traces with respect to themselves before fitting. Useful when traces have highly variables ranges. For example, stock prices.ci_width:Confidence interval width parameter. Useful for approximating the location of the divergence or the anomaly on a trace.The procrustes and trace normalizing functionality can be directly imported from the metric module-fromtrendalation.metricsimportprocrustestrace1_transformed,trace2_transformed,disparity=procrustes(trace1,trace2)Help and SupportIn order to report bugfixes and new feature requests, simply create a new issue on the repository.
The issues will be reviewed by the authors on a regular basis & you're welcome to work on any open issues.ContributionThis project is a community effort, and everyone is welcome to contribute.
Feel free to work on any open issues and setup PRs.
Package: trendalert
This module is not intended as advice to trade, it is for use in your trading analyses and algorithms. Use at your own risk.This screener uses Donchian Channels, Average True Range, and other inputs to determine if a stock, future or other financial instrument with timeseries (OHLC) may breakout out of its defined channel.Required data:-Pandas dataframe containing index as datetime and columns (High, Low, Open, Close) as float
-Define the number of breakout periods (default: 55 periods)
-Average True Range (ATR) window (default: 14 periods)
-ATR multiple (default: 1.5)- sensitivy used to determine a level at which the alert will provide a positive signalThe response returned is a tuple of the signal and a plotly chart: (signal, chart) create_chart=False is default. The signal is one of three options: 1, -1, 01 - Possbile breakout to go long
-1 - Possible breakuot to go short
0 - Too far from either price channelDependencies:-pandas
-ta
-plotly
Package: trend-app-protect
Trend Micro Cloud One Application Security for PythonWhat is it?Trend Micro Cloud One - Application Security provides real-time application security as a service for modern applications, APIs, serverless and other computing platforms. When Application Security is deployed, threats to your web applications will be detected and protected against, minimizing your risk.FeaturesApplication Security detects and protects against a wide range of attacks at runtime within your entire application, including:
SQL injections
Remote command execution
Illegal file access
Malicious file uploads
Malicious payloads
URL redirects
And moreInstallationAdd the Trend Micro Application Security package torequirements.txt:trend_app_protectRun pip to install the package:pipinstall-rrequirements.txtImport thetrend_app_protect.startmodule at the top of your WSGI script:importtrend_app_protect.startConfigurationThe agent key and secret can be configured via theTREND_AP_KEYandTREND_AP_SECRETenvironment variables.Optionally, you can provide a configuration in the filetrend_app_protect.iniunder the root of the project or under/etcbut the environment variables will still take precedence:[trend_app_protect]key=my-keysecret=my-secretSupportPython 3.4+Django 1.11, 2.0, 2.1, 2.2Flask 0.11+Pyramid 1.6+FeatureRequired ComponentAll featuresWSGI based web-serverFile AccessN/ARCEN/ASQLimysqldb, psycopg2, pymssql, pymysql, sqlite2, sqlite3RedirectsDjango, FlaskHTTP paramsDjango, WerkzeugInternal dependenciesfunctools_lru_cache @https://github.com/jaraco/backports.functools_lru_cache
Package: trend-classifier
Trend classifierLibrary for automated signal segmentation, trend classification and analysis.InstallationThe package is pip-installable. To install it, run:pip3installtrend-classifierUsagePandas DataFrame Inputusage:importyfinanceasyffromtrend_classifierimportSegmenter# download data from yahoo financedf=yf.download("AAPL",start="2018-09-15",end="2022-09-05",interval="1d",progress=False)x_in=list(range(0,len(df.index.tolist()),1))y_in=df["Adj Close"].tolist()seg=Segmenter(x_in,y_in,n=20)seg.calculate_segments()For graphical output useSegmenter.plot_segments():seg.plot_segments()After calling methodSegmenter.calculate_segments()segments are identified and information is stored inSegmenter.segmentsas list of Segment objects. Each Segment object. Each Segment object has attributes such as 'start', 'stop' - range of indices for the extracted segment, slope and many more attributes that might be helpful for further analysis.Exemplary info on one segment:fromdevtoolsimportdebugdebug(seg.segments[3])and you should see something like this:seg.segments[3]: Segment(
        start=154,
        stop=177,
        slope=-0.37934038908585044,
        offset=109.54630934894907,
        slopes=[
            -0.45173184100846725,
            -0.22564684358754555,
            0.15555037018051593,
            0.34801127785130714,
        ],
        offsets=[
            121.65628807526804,
            83.56079272220015,
            17.32660986821478,
            -17.86417581658647,
        ],
        slopes_std=0.31334199799377654,
        offsets_std=54.60900279722876,
        std=0.933497081795997,
        span=82.0,
        reason_for_new_segment='offset',
    )export results to tabular format (pandas DataFrame):seg.segments.to_dataframe()(NOTE:for clarity reasons, not all columns are shown in the screenshot above)LicenseMIT©Krystian Safjan.
Package: trendfitter
trendfitterTrendfitter is a latent variable modelling package made for multivariate statistical process control. Some of the methods implemented in this library are already available in other packages, but not with all the tools here available for investigation, exploration and prediction applied to industrial production processes. Additionally, the methods here follow an object-oriented approach similar to scikit-learn so that one can explore combining tools existing in that package without having the need to adapt the code.This first version contains:Principal Component Analysis (PCA)Multi-Block Principal Component Analysis (MB-PCA)Partial Least Squares or Projection to Latent Structures (PLS)Multiblock PLS (MB-PLS)Sequential MBPLS (SMB-PLS)Dynamic PLS (DiPLS)The models have methods implemented for the calculation of scores, loadings, weights, Hotelling's TÂ², Squared Prediction Errors(SPEs), and contributions for both TÂ²s and SPEs. Moreover, dealing with missing data in the matrix is available in multiple approaches, namely: Trimmed Score Regression (TSR), Conditional Mean Replacement (CMR), Trimmed Score Method (TMR), and Projection to Model Plane (PMP). All of these previously unavailable on the open-source python environment.Trendfitter is installable via pip:pip install trendfitterAny information regarding usage of the methods and functions can be found using the help() function. Such as:help(PCA())
Package: trendlines
TrendlinesA simple, lightweight alternative toGraphite.What is Trendlines?Trendlinesis a tool forpassivelycollecting and displaying time-based
or sequential numeric data. Built onFlask,PeeWee, andPlotly, it provides a simple interface for adding and
viewing your metrics.What can I use it for?Anything, really. Well, anything that (a) you can assign a number to and
(b) might change over time.Examples include:Test coverage per projectCode quality metrics per commitHouse temperatureDistance driven per tripDistance per fillup (or per charge for the eco-friendly folk)How many times the dog barksHow often some clicks the Big Red Button on your webpageIt's been designed to handle infrequent, variable interval data. Sometimes
real-world data just doesn't appear at nice, regular intervals.QuickstartInstall and run in a development environment using Docker:dockerrun-p5000:80-ddougthor42/trendlines:latestSend in some data:Note:there are simplier ways to do this. Please see theusage documentationfor details.curl-XPOST--data'{"metric":"my.metric","value":12.234}" \--header "Content-Type:application/json" \http://localhost:5000/api/v1/dataAnd then open up a browser and navigate tohttp://localhost:5000.DocumentationFull documentation is hosted by ReadTheDocs. It can be foundhere.
Package: trend-lines-generator
Trend lines generatorUsage example:#! pip install trend-lines-generatorimportrequestsimportmplfinanceasmpffrompandasimportDataFrame,to_datetimefromtrend_linesimportgenerate_trend_lines,Sidedefmain():columns=[("ts","int"),("volume_quote","float64"),("open","float64"),("high","float64"),("low","float64"),("close","float64"),]url="https://api.gateio.ws/api/v4/spot/candlesticks?currency_pair=MOVR_USDT&interval=1h&limit=100"response=requests.get(url)rows=response.json()df=(DataFrame([r[:len(columns)]forrinrows],columns=[i[0]foriincolumns]).astype(dict(columns)).set_index("ts"))df.index=to_datetime(df.index,unit="s")lines=generate_trend_lines(low_series=df["low"],high_series=df["high"])x1=df.index[0]x2=df.index[-1]mpf.plot(df,type="candle",tight_layout=True,alines={"alines":[((x1,line.get_y(x1)),(x2,line.get_y(x2)))forlineinlines],"colors":["g"ifline.side==Side.LOWelse"r"forlineinlines],},)if__name__=="__main__":main()For each time in the serie:
Package: trendshift
TrendShiftTrendShift is a builder-like library that appends some trend aggregations about
onto a given pandas DataFrame.In the following image the blue line, with the value on the right side, draws
the EUR/USD price along a few hours and the red line, with the value on the
left,
draws the difference between every price movement, the trends.Installpip install trendshiftUsageThe following example implementation builds all the available TrendShift
features for a dataframe in the column "target_column".my_new_df: DataFrame = = TrendShift(input_dataframe, "target_column")\
    .with_sum()\
    .with_numbered_steps()\
    .with_simple_moving_avg()\
    .with_steps_by_trend()\
    .with_difference_by_trend()\
    .with_trend_countdown()\
    .build()The snippet above over an example "input_dataframe.target_column" will output
the following data set. "target_column" values are the original ones.target_columntrends_sumstep_numbersimple_moving_avgtrend_differencetrend_stepstrend_countdownremaining010.020.011615.01.015.020.02.02.05.022120.02.010.01.00.03210.00.00.00.00.04210.00.00.00.00.05210.00.00.00.0-11.0620-1.01.0-1.0-11.03.03.0-10.0717-4.02.0-2.02.0-7.0810-11.03.0-3.66666666666666651.0More information within the main
interfacesrc/trendshift/trendshift.pyConceptsTrendATrendis a pattern found in incremental or at least continuous series
datasets, like for example time series, that describes whether the data is
moving upward or downward.ShiftAShiftis a group of states within the input series dataset in one only
direction, upward or downward. When the trend of the next value is different
from the current one, the currentShiftends and the nextShiftstarts in
the following value.StepAStepis a state in the dataset series during an upward or downwardShift.
A step of the input dataframe is a row within aShift.FeaturesTrendShift applies some cumulative calculations over the target column. It
appends a column for every calculation as a result to the original DataFrame.SumCumulative sum of everyStepin aShift.Numbered StepCumulativeStepcount of everyShift.SMASimple Moving Average is the average of the difference between allStepin
aShift.Trend DifferenceTotal difference between the firstStepand the last one in aShift. This
value is placed in the firstSteponly.Trend StepsTotal number ofStepin aShift. This value is placed in the firstSteponly.Trend CountdownReversed upside down cumulativeStepcount in aShift.Remaining Trend DifferenceDifference between any trend step and the step at the end of the trend.TestTests are an important part in this project. My developing methodology is BDD
and I developed this whole project fromtests/features.There you can find the most specific documentation about any service or entity
of this project.If you are not only a user of this library but a developer who wants to adapt or
maintain this code, you should follow the same way, BDD.The packagehttps://behave.readthedocs.io/is a development dependency you
must install.pip install behaveExecute the tests by the following command:behave tests/featuresAuthorJaume Mila Beajaume@westial.com
Package: trendy
# IntroductionA python library for interacting with the Trend Deep Security Management API.# UsageThe `Connection` class is the main entry point.  It is designed to be used as a context manager to ensure that theconnection is closed cleanly and consistently.Example:```with Connection(wsdl, user, pass) as trend:for profile in  trend.security_profiles.all():profile.rules = trend.firewall_rules.by_ids(profile.firewallRules.item)```See the Trend API documention for more details on the objects and methods available.# ContributingMake a fork, fix and send a Pull Request.# HackingCreate a new virtual environment and install the required packages```virtualenv venvsource ./venv/bin/activatepython setup.py install```Run the unit tests```python -m unittest discover```or```python setup.py test```
Package: trendyol-api
trendyol-api-python-sdkUnofficial Trendyol API Python SDKInstallationpip3install-rrequirements.txtUsagefromtrendyol_sdk.apiimportTrendyolApi
fromtrendyol_sdk.servicesimportProductIntegrationServiceapi=TrendyolApi(api_key="<TRENDYOL_API_KEY>",api_secret="<TRENDYOL_API_SECRET>",supplier_id="<TRENDYOL_SELLER_ID>")service=ProductIntegrationService(api)products=service.get_products()Services Completion StatusProduct Integration (Urun Entegrasyonu)Order Integration (Siparis Entegrasyonu)Common Label Integration (Ortak Etiken Entegrasyonu)Returned Orders Integration (Iade Entegrasyonu)Accounting And Finance Integration (Muhasebe ve Finans Entegrasyonu)Question And Answer Integration (Soru Cevap Entegrasyonu)
Package: trendyol-api-python-sdk
trendyol-api-python-sdkUnofficial Trendyol API Python SDKInstallationpip3installtrendyol-api-python-sdkUsagefromtrendyol_sdk.apiimportTrendyolApiClient
fromtrendyol_sdk.servicesimportProductIntegrationServiceapi=TrendyolApiClient(api_key="<TRENDYOL_API_KEY>",api_secret="<TRENDYOL_API_SECRET>",supplier_id="<TRENDYOL_SELLER_ID>")service=ProductIntegrationService(api)products=service.get_products()Services Completion StatusProduct Integration (Urun Entegrasyonu)Order Integration (Siparis Entegrasyonu)Common Label Integration (Ortak Etiken Entegrasyonu)Returned Orders Integration (Iade Entegrasyonu)Accounting And Finance Integration (Muhasebe ve Finans Entegrasyonu)Question And Answer Integration (Soru Cevap Entegrasyonu)
Package: trendypy
TrendyPyTrendyPy is a small Python package for sequence clustering. It is initially developed to create time series clusters by calculating trend similarity distance withDynamic Time Warping.InstallationYou can install TrendyPy with pip.pip install trendypyTrendyPy depends on Pandas, Numpy and fastdtw and works in Python 3.7+.QuickstartTrendy has scikit-learn like api to allow easy integration to existing programs. Below is a quick example to show how it clusters increasing and decreasing trends.>>>fromtrendypy.trendyimportTrendy>>>a=[1,2,3,4,5]# increasing trend>>>b=[1,2.1,2.9,4.4,5.1]# increasing trend>>>c=[6.2,5,4,3,2]# decreasing trend>>>d=[7,6,5,4,3,2,1]# decreasing trend>>>trendy=Trendy(n_clusters=2)>>>trendy.fit([a,b,c,d])>>>print(trendy.labels_)[0,0,1,1]>>>trendy.predict([[0.9,2,3.1,4]])# another increasing trend[0]It can also be utilized to cluster strings by using string similarity metrics.>>>fromtrendypy.trendyimportTrendy>>>fromtrendypy.algosimportlevenshtein_distance>>>company_names=[...'apple inc',...'Apple Inc.',...'Microsoft Corporation',...'Microsft Corp.']>>>trendy=Trendy(n_clusters=2,algorithm=levenshtein_distance)>>>trendy.fit(company_names)>>>print(trendy.labels_)[0,0,1,1]>>>trendy.predict(['Apple'])[0]Refer toextensive demoto see it in clusteringstock trends,imagesor to see how todefine your own metricor just checkAPI Referencefor details.PostThe idea is originated from the postTrend Clustering.