Saravanan666/pypi-org huggingface dataset:
Package: tinn
TINNTINN acronym for Tiny Neural Network is a lightweight, neural network library,build over numpy.InstallationYou can download  tinn using pip via pypi.$ pip install tinnGetting StartedCreating a neural networkLets start by creating a 3 layer neural networkFirst start with importing the required modulesfrom tinn.neural import NeuralNet
    from tinn.layer import LayerA neural network is composed of a series of layers of neurons, such that all the neurons in each layer connect to the neurons in the next layer.Lets see how to make a layer using tinn.A layer in tinn requires 2 parametersnum_neurons : No of neurons in that layeractivation : Activation function for that layerLets create a layer with 5 neurons and sigmoid activation functionl1=Layer(5,'sigmoid')Once the layer is created a neural network can be created by combining multiple layers usingtinn.neural.NeuralNetclass.model=NeuralNet()# Creates an empty neural network with 0 layersmodel.add(Layer(3,'sigmoid')# Hidden layer with 3 neuronsmodel.add(Layer(5,'sigmoid')# Hidden layer with 5 neuronsmodel.add(Layer(1,'sigmoid')# Outpput layer with1 neuronAbove code creates a 3 layered neural network with 2 hidden layers and 1 output layer.Training the modeltinn.neural.NeuralNet.train()can be used to train the neural network on a given set of training data using stochastic gradient descent algorithm.Here is the prototype of train method in NeuralNet class.def train(self,inputData,outputData,learning_rate=0.01,epocs=100,suffle=True)inputData      : An array of all inputs of the training set.outputData     : Array of corresponding outputs of the training set.learning_rate  : Could be used to tweak the learning rate parameterepocs          : Default epocs is 100, it denotes the number of traning iterations over the given datasetsuffle         : If set to false, dataset will not be shuffled between epocs.Accuracy of the modeltinn.neural.NeuralNet.validate()is used to compute the accuracy of the model on given testing data. It returns a floating number between [0,1] inclusive where 1 represents 100 percent accuracy.PredictionOnce the model is trainedtinn.neural.NeuralNet.predict()can be used to get the predicted outputs from the trained neural network.Saving the modeltinn.neural.NeuralNet.save()saves the model to a file.NeuralNet.save(self,filepath)Saves the model along with weights and architecture ,in the specified file, uses pickle module of python.Loading the modelTrained model can be loaded from the file usingtinn.neural.NeuralNet.load()model=NeuralNet.load('handWrittenDigit.pkl')Once loaded the model can be use for prediction.
Package: tinned-python
Tinned PythonPython data, in a tinFree software: MIT licenseDocumentation:https://tinned-python.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-03-15)First release on PyPI.
Package: tinode-grpc
Generated Protocol Buffer and gRPC files forTinodeGenerated Python code forgRPCclient and plugins.gRPC clients must implement rpc serviceNode, plugins must implementPlugin.For a sample implementation of a command line client seetn-cli.
For a partial plugin implementation seechatbot.InstallingInstall the package by executingpip install tinode_grpcGenerating filesDon't modify included files directly. If you want to make changes, you have to install protobuffers tool chain and gRPC then generate the Python bindings frompbx/model.proto(your path tomodel.protomay be different):python -m grpc_tools.protoc -I../pbx --python_out=. --grpc_python_out=. ../pbx/model.protoThe generatedmodel_pb2_grpc.pyimportsmodel_pb2.pyas a module instead of a package which is incompatible with python3 packaging system. Use../pbx/py_fix.pyto apply a fix. This is only needed if you want to repackage the generated files.
Package: tinote
No Thought Left Behind.Huh, that's a pretty good idea. I should write that down.[proceeds to lose the paper]Wow, I should write down that task for later in Notepad![proceeds not to save the file before computer restarts that night]Ugh.Tinote is light-weight command-line note-taking tool, designed for quick and easy note management. Keep track of your thoughts, ideas, or reminders directly from the terminal.(made entirely for myself, but feel free to use it and contribute!)InstallationInstall Tinote using pip:pipinstalltinoteUsageCreate a new note (if no category is provided, the last category will be used):tiadd"a note to remember"<optionalcategory><optionalimportance>List all notes (verbose list will include importance and timestamp):tilistIDEAS---------------------------------------------------------------------------[ ] 55 A dating app, but for hamster-owners ONLY[✔] 58 A sushi company that sell BEEF sushi! :OVAN-STUFF-----------------------------------------------------------------------[✔] 55 Fix the latch for the fridge[ ] 58 Install Solar[ ] 60 Install roof-rack, hopefully easy* How hard could it be* Hahaha[ ] 61 Attach panels[ ] 62 Run wiringAs you can see, using * in a message (no newline necessary) will cause that to be indented on the next line down.List notes with filters (category or importance or marked) or higher verbosity:tilist-c<category>-i<importance>-m-u-vAdd a sub-note to a note (can be as recursive as you can dream)tisub<parent_id>"Text of your sub-note"-i<importance>Mark a note as checked/unchecked (-u indicates to unmark):timark<note_id>-uDelete a note (deletes all children notes):tidelete<note_id>Clear all notes or notes within a specified category:ticlear
ticlear-c<category>FeaturesCreate and manage notes with optional categories and importance levelsList notes, with optional filters for categories and importanceEasily mark notes as checked/uncheckedDelete notes using their IDClear all notes or notes within a specified categoryAutomatically saves notes to a local JSON file for persistenceLicenseMIT License
Package: tinsel
Your data IS your schemaThis tiny library helps to overcome excessive complexity in hand-written pyspark
dataframe schemas.How?Shape your data asNamedTupleor dataclasses - they can freely mix:from dataclasses import dataclass
from tinsel import struct, transform
from typing import NamedTuple, Optional, Dict, List

@struct
@dataclass
class UserInfo:
    hobby: List[str]
    last_seen: Optional[int]
    pet_ages: Dict[str, int]


@struct
class User(NamedTuple):
    login: str
    age: int
    active: bool
    info: Optional[UserInfo]Transform root node (Userin our case) into schema:schema = transform(User)Create some data, if necessary:data = [
    User(
        login="Ben",
        age=18,
        active=False,
        info=None
    ),
    User(
        login="Tom",
        age=32,
        active=True,
        info=UserInfo(
            hobby=["pets", "flowers"],
            last_seen=16,
            pet_ages={"Jack": 2, "Sunshine": 6}
        )
    )
]And… voilà!:from pyspark.sql import SparkSession

sc = SparkSession.builder.master('local').getOrCreate()

df = sc.createDataFrame(data=data, schema=schema)
df.printSchema()
df.show(truncate=False)This will output:root
 |-- login: string (nullable = false)
 |-- age: integer (nullable = false)
 |-- active: boolean (nullable = false)
 |-- info: struct (nullable = true)
 |    |-- hobby: array (nullable = false)
 |    |    |-- element: string (containsNull = false)
 |    |-- last_seen: integer (nullable = true)
 |    |-- pet_ages: map (nullable = false)
 |    |    |-- key: string
 |    |    |-- value: integer (valueContainsNull = false)


+-----+---+------+----------------------------------------------+
|login|age|active|info                                          |
+-----+---+------+----------------------------------------------+
|Ben  |18 |false |null                                          |
|Tom  |32 |true  |[[pets, flowers],, [Jack -> 2, Sunshine -> 6]]|
+-----+---+------+----------------------------------------------+Featuresuse native python types; no extra DSL, no cryptic API — just plain Python;small and fast;provide type shims for some types absent in Python, likelongorshort;nullable fields naturally fits into schema definition;CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2018-08-28)Added dataclasses support0.1.0 (2018-08-28)First release on PyPI.
Package: tinted
tintedGive your print output the tint it deserves! Give colors, styles, and more to the console, all with a simple markup language.InstallationpipinstalltintedUsageFrom a Python script:fromtintedimporttintprint(tint('Hello, [bold]world![/]'))From a shell:echo"Hello, [bold]world![/]"|tintedBasic syntaxStrings can be styled easily with an HTML-like syntax.[bold][blue]Tinted[/] is [underline]cool[/]![/][...]denotes a starting tag, where...is a tag name.[/...]indicates a closing tag. Tag names are not necessary, and are ignored if they are included.TagsAll of the available tags are listed below.ColorsblackredgreenyellowbluemagentacyanlightgraydarkgraylightredlightgreenlightyellowlightbluelightmagentalightcyanwhiteBackground colorsPrefix any of the colors above withbg. Eg.bglightred.StylesbolddimitalicunderlineblinkreversehiddenEscaping tagsTo escape a tag, simply include[]somewhere inside.[[]blue]These tags will be shown[[]/]
Package: tintx
TintX (Tint is not TITAN) tracking algorithm for any kind of input dataTintX is an adaptation of the tinttracking algorithm.
Tint and tintX are easy-to-use storm cell tracking packages. While Tint is meant
to be applied to radar data using thepy-ART toolkittintX can
be applied with any data - for example output from numerical weather prediction
models. The original tracking algorithm has been developed by a team of
researchers at Monash UniversityRaut et al. 2020.InstallationThetintXpackage can be installed using theconda-frogeconda channel:conda install -c conda-forge tintxAlternatively the package can be installed with pip:python -m pip install tintxUsageDocumentation can be found on theofficial documentation pageof this
library.If you just want to try the usage and play with tracking data you can followthis linkto launch and familiarise yourself with the tracking by executing one of the
example notebooks.ContributingAny contributions to improve this software in any way are welcome. Below is a
check list that makes sure your contributions can be added as fast as
possible to tintX:Create a fork ofthis repositoryand clone this fork (not the original code)Create a new branch in the forked repositorygit checkout -b my-new-branchAdd your changesMake sure all tests are sill running. To do so run the following commandsmake lintmake testmake docsCreate a new pull request to themainbranch of theoriginal repository.Adding new Jupyter examplesYou can add more examples to thedocs/source documentation folder.
Because notebooks are executed automatically by the unit tests GitHub workflow,
you should make sure that any additional dependencies imported in the notebook
are added to thedocssection in thesetup.py.
All notebooks should be run with a kernel calledtintxto install a new
kernel namedtintxrun the following command in the root directory
of the cloned repository:python -m ipykernel install --name tintx --display-name "tintX kernel"\--env DATA_FIELS $PWD/docs/source/_static/data --userMake also sure to add additional link(s) to thenotebook readme file.AcknowledgementsThis work is the adaptation of tracking code in R created by Bhupendra Raut
who was working at Monash University, Australia in the Australian Research
Council's Centre of Excellence for Climate System Science led by
Christian Jakob. This work was supported by the Department of
Energy, Atmospheric Systems Research (ASR) under Grant DE-SC0014063,
“The vertical structure of convective mass-flux derived from modern radar
systems - Data analysis in support of cumulus parametrization”The development of this software was funded by the Australian Research
Council's Centre of Excellence for Climate Extremes under the funding
number CE170100023.
Package: tinxy
Tinxy PackageUsed for authenticating with tinxy.inUsage# pip install tinxy
# Python 3

import time
import base64
import requests
from tinxy import tinxy
import time

def encrypts(arg1, mqttpass):
    en_arg1 = tinxy.strToLongs(arg1.encode('utf-8').decode())
    en_mqttpass = tinxy.strToLongs(mqttpass.encode('utf-8').decode())
    ed = tinxy.encodes(en_arg1, en_mqttpass)
    ciphertext = tinxy.longsToStr(ed)
    cipherutf2 = ciphertext.encode('latin-1')
    cipherbase64 = base64.b64encode(cipherutf2)
    return base64.b64decode(cipherbase64).hex()

tm = str(int(time.time()))
data = encrypts(tm, "mqtt-password-here")

response = requests.post("http://10.0.28.17/toggle",  json={
    "password": data,
    "action": "1",
    "relayNumber": 2
})

print(response)
Package: tiny-2d-engine
tiny_2d_engineA Tk.Canevas widget augmented to allow 2D acquisitions:load an imageAdd a calibration for the image to set up your own world coordinatesAdd Points or Lines on the imageSave your project. You will find the word coordinates of all your objects in the projects, ready for an other usage.It can be used as a standaone application with:>tiny_2d_engineguiOr as a Tkinter widget like here:fromtkinterimportttkfromtiny_2d_engine.mainimportAcquisition2Ddefadd_viewer_2d(otroot):"""Injection of a viewer 2D to opentea"""title="2D dialog"view2d_fr=ttk.Frame(otroot.notebook,name=title)otroot.notebook.add(view2d_fr,text=title)viewer=Viewer2D(view2d_fr,otroot,)returnviewerclassViewer2D(Acquisition2D):def__init__(self,master,otroot):super().__init__(master,standalone=True)self.pack(side="top")self.otroot=otrootdefget(self):print("get data")returnself.acq_canvas.as_dict()defset(self,data:dict):print("set data")self.acq_canvas.load_dict(data)DisclaimerThis package is very young and uncomplete.Known issues are:A spurious contextual menu pops up sometimesChanging image can failMoving the calibration around is quickly perturbating the acquisitions (You are not supposed to do that!)But it works somehow.
Package: tinyalign
tinyalignA small Python module providing edit distance (aka Levenshtein distance, that
is, counting insertions, deletions and substitutions) and Hamming distance
computation.Its main purpose is to speed up computation of edit distance by
allowing to specify a maximum number of differencesmaxdiff(banding). If
that parameter is provided, the returned edit distance is anly accurate up tomaxdiff. That is, if the actual edit distance is higher thanmaxdiff, a
value larger thanmaxdiffis returned, but not necessarily the actual edit
distance.For computing regular edit distances or if yourmaxdiffis less than 4, you
should preferhttps://github.com/fujimotos/polyleven, as that is
faster in that case. Whenmaxdiffis 4 or more, but not too close to the
length of the shortest string, this module is faster.>>> from tinyalign import edit_distance, hamming_distance
>>> edit_distance("banana", "ananas")
2
>>> hamming_distance("hello", "yello")
1
>>> edit_distance("hello", "world", maxdiff=2)
3Changesv0.2.2Added type hints
Package: tinyantigate
tinyantigate============Tinest (as I can imagine) antigate/anti-captcha api wrapper. It's just a **subset** of antigate api. It can only:* send captcha* check captcha status* check balance* abuse## Reasons* [Antigate](https://github.com/gotlium/antigate) wrapper uses [grablib](http://grablib.org/), so it comes with a bit more dependences (like pycurl, lxml, etc.).* [requests](docs.python-requests.org) is just awesome!* [Antigate](https://github.com/gotlium/antigate) wants filename of captcha, but in most cases you need to pass 'this' bytes (from requests response, for example), and you defenitly don't want to create files.* uniform calls## Requirements* Python 3* requests## UsageAll methods, can return errors:* 'ERROR_*', None (from [antigate list](https://anti-captcha.com/apidoc))* 'ERROR_HTTP', status_code (requests errors)### Automatic (most common usage)#####antigate function```pythonfrom tinyantigate import antigatestatus, text = antigate(your_key_from_antigate,bytes_of_your_captcha,timeout=5,                  # \count=6,                    #  ) default values (can be omitted)host="anti-captcha.com",    # /)```This function is just wrapper around creation Antigate object and calling 'run' function.### Manual usage##### Creating:```pythonimport tinyantigatea = tinyantigate.Antigate(your_key_from_antigate, host="anti-captcha.com")```##### Sending captcha:```pythonstatus, captcha_id = a.send(bytes_of_your_captcha)```Return values:* 'OK', captcha_id##### Getting status:```pythonstatus, text = a.status(captcha_id)```Return values:* 'OK', captcha_text* 'CAPCHA_NOT_READY', None (yeah, CA**PC**HA_NOT_READY, it's antigate funny mistake)##### Abuse:```pythonstatus, data = a.abuse(captcha_id)```Return values:* "", None##### Balance:```pythonbalance, data = a.balance()```Return values:* balance, None`balance` as string##### Run:```pythonstatus, text = a.run(bytes_of_your_captcha, timeout=5, count=6)```Mix of 'send' and 'status' functions. Timeout is the delay between checks of captcha status. Count is number of checks.Return values:Same as for 'send' and 'status' functions.
Package: tiny-api
Tiny-apiTiny-api is a python web framework for creating Restful APIs written for learning purpose out of curiosity.It is written with the help ofWebob, a library which providesobjects for HTTP requests and responses.InstallationInstall using pip.$pip3installtiny-apiGetting StartedIt’s really easy to get started with tiny-api.fromtiny_apiimportTinyapifromtiny_api.ResponsesimportJsonResponsefromtiny_api.StatusimportHTTP_200_OKapp=Tinyapi()@app.route('/home')defhome(request):returnJsonResponse({'data':'hello world'},HTTP_200_OK)Important LinksDocumentation :-https://kaushal-dhungel.github.io/tiny-api-docsDocumentation(github) :-https://github.com/Kaushal-Dhungel/tiny-api-docsPypi :-https://pypi.org/project/tiny-api/CreditsThanks to Jahongir Rahmonov’s awesome blog that helped me get started
with this project.Visit his blog
Package: tiny-api-client
Tiny API Client 🐝Write JSON API Clients in Python without the fluff, pumped full of
syntactic sugarfromtiny_api_clientimportapi_client,get,post,delete@api_client('https://example.org/api/public/v{version}')classMyAPIClient:@get('/users/{user_id}')deffind_user(self,response):returnresponse@post('/notes')defcreate_note(self,response):returnresponse@delete('/notes/{note_id}/attachment/{attachment_id}',version=3)defdelete_note_attachment(self,response):returnresponse>>>client=MyClient()>>>client.find_user(user_id='PeterParker'){'name':'Peter','surname':'Parker',...}>>>client.create_note(data={'title':'New Note','content':'Hello World!'}){'id':...}>>>client.delete_note_attachment(node_id=...)FeaturesInstance-scopedrequests.Session()with connection pooling and
cookie preservationJSON is king, but XML and raw responses are fine tooEndpoints can use GET, POST, PUT, PATCH, DELETERoute parameters are optionalEasy integration with your custom API classesDeclare endpoints under different API versionsCan define the API URL at runtime if not available beforeCan set a custom CookieJar to pass with all requestsPass along any parameters you would usually pass to requestsCustom JSON status error handlingInstallablepytest pluginfor easy testingExcellent support for type checking thanks to a built-in mypy pluginInstallationpipinstalltiny-api-clientDocumentationYou can find the documentation athttps://tiny-api-client.readthedocs.ioLicenseThis software is distributed under theLesser General Public License v2.1,
more information available at theFree Software Foundation.
Package: tinyarray
Tinyarrays are similar to NumPy arrays, but optimized for small sizes.
Common operations on very small arrays are to 3-7 times faster than with
NumPy (with NumPy 1.6 it used to be up to 35 times), and 3 times less
memory is used to store them.  Tinyarrays are useful if you need many
small arrays of numbers, and cannot combine them into a few large ones.
(The resulting code is still much slower than C, but it may now be fast
enough.)Unlike Python’s built-in tuples, Tinyarrays support mathematical
operations like element-wise addition and matrix multiplication.  Unlike
Numpy arrays, Tinyarrays can be used as dictionary keys because they are
hashable and immutable.  What is more, tinyarrays are equivalent to
tuples with regard to hashing and comparisons: a dictionary or set with
tinyarray keys may by transparently indexed by tuples.The module’s interface is a subset of that of NumPy and thus should be
familiar to many.  Whenever an operation is missing from Tinyarray,
NumPy functions can be used directly with Tinyarrays.
Package: tinybench
TinybenchTinybench is a lightweight package to time, compare, and visualize various functions.  This package was inspired by the R packagemicrobenchmarkInstallationpipinstalltinybenchUsagefromtinybenchimportbenchmark,benchmark_env# create two functions example functions to testdeffoo(a):test=[]foriinrange(a):test.append(i)returntestdefbar(a,b):returna+b# example input variablec=10000iterations=100warmup=10# env should be globals(), or use benchmark_env(functions_list)# functions_list should at least contain all the functions to benchmarkenv=benchmark_env([foo,bar])# instead, using globals() is recommendedenv=globals()b=benchmark(['Foo_Label:foo(c)','bar(10, 15)'],iterations,warmup,env)print(b)b.plot()# alternatively, we can benchmark using the process time instead of real time:b_process=benchmark(['Foo_Label:foo(c)','bar(10, 15)'],iterations,warmup,env,process_time=True)SupportFor any help or questions, please open an issue on GitHub.LicenseMIT
Package: tinybin
TinybinTinybin is a small text sharing service similar to Pastebin.Installationpip install tinybinpip install uvicorn- optional, if you want to run it with uvicorn (you'll need a different ASGI-compatible server)Usagefromtinybinimportapiimportuvicornuvicorn.run(api,port=8000,host="127.0.0.1",)Beware that it will create a "texts" directory at its location of startup. It will store shared texts there.