Saravanan666/pypi-org huggingface dataset:
Package: tmkpy
SWIG Python Bindings for TMK Video HashingTMK video hashing is designed to identify whether two video files are duplicates (possibly with different formats, etc.).
It measures the similarity of videos in two ways. First a simple cosine distance on vectors of 256 dimensions are used to find possibly close videos.
The documentation and whitepaper suggest a good threshold is 0.7.  Then a temporal match kernel (tmk) is used to compute a more accurate similarity measure.
Please see the original documentation at:https://github.com/facebook/ThreatExchange/This repository provide Python bindings to make it easier to use TMK within Python.Installationtl;drgit clone https://github.com/meedan/tmkpy
cd tmkpy
python setup.py build
python setup.py installLonger versionEnsure swig is installed (sudo apt install swig) and then build this extension.setup.pywill first build the TMK C++ code per the instructions at tmk/cpp/ (namely runmakein that directory). This will build a file calledlibtmk.aIt will then run swig and generatetmkpy.pyandtmkpy_wrap.cpp. It will then compile everything.
To install system wide, runpython setup.py installUsageimport tmkpy

#Hash a video
vid=tmkpy.hashVideo("test/chair-19-sd-bar.mp4","/usr/bin/ffmpeg")

#Write the hash to a file (second argument is a string used in error messages to identify the program and can be anything)
vid.writeToOutputFile("output.tmk","anything_here")

#Get the 256-dimensional vector that is used to compute level-1 scores. Level-1 scores are the cosine similarity of these vectors.
l1features=vid.getPureAverageFeature()

#Compute level-2 scores against other tmk files on disk
import glob
haystack=[f for f in glob.glob("test/*.tmk")]
scores=tmkpy.query(vid,haystack,1)
scores=[(x,y) for x,y in zip(haystack,scores)]
print(scores)tmkpy.query(needle,haystack,threads) expects needle to an actual TMK object or the name of a tmkfile. Haystack is a list of tmk filenames. The function computes all level-2 scores and returns them in a list equal to the length of, and in the same order as, haystack.  It does not compute level-1 scores: it just computes all level-2 scores for the files in haystack. If a file is invalid, the score will be -1. There is no need to filter invalid / missing filenames.Error handlingtmkpy.querygenerally sollows errors quietly if there is a missing or invlaid filename in haystack. The one excpetion is if you are passing in a string for the needle and a file with that string name does not exist. In this case,tmkpy.querywill throw an invalid_argument exception. This is raised in Python as aRuntimeErrorand can be handle in the normal Python way. E.g.,try:
	scores=tmkpy.query("invalid-missing-file.tmk",["hs1","hs2"],1)
except RuntimeError as e:
	print(e)Generatesfopen: No such file or directory
tmkpy: could not open "invalid-missing-file.tmk" for read.
tmkpy: failed to read needle "invalid-missing-file.tmk".
Failed to read needle from supplied filenameThe first three lines are written to standard error in C++. The last line is the result ofprint(e)in Python
Package: tmktprocess
TMKTProcessHow to install itpipinstalltmktprocessHow to import itfromtmktprocessimportProcessHow to use itdefmy_func(*args,**kwargs):# do some stuffpassTo start your process you have to do this:process=Process(my_func)process.start(my_args,my_kwargs)result=process.join()The .start() will call your function and pass the args and kwargs, then the result will be return with the .join() methodUse with EventYou can also pass an Event fromthreadingpackage ininitcall.fromthreadingimportEventmy_event=Event()process=Process(my_func,my_event)When the method will end, the event will be setYou can use it for everything you want
Package: tmktthreader
TMKTThreaderHow to install itpipinstalltmktthreaderHow to import itfromtmktthreaderimportThreaderHow to use it@Threaderdefmy_func(*args,**kwargs):# do some stuffpassmy_func(myargs,mykwargs="")your function going to be a threadthe function call return a Thread fromthreading. So you can .join() itt=my_func(*args,**kwargs)t.join()
Package: tmlab_common
Common code used by Team Mayes and Blue ProjectsCommon code used by Team Mayes and Blue ProjectsFree software: MIT licenseDocumentation:https://tmlab-common.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-01-28)First release on PyPI.
Package: tml-jinja2
[![Build Status](https://travis-ci.org/translationexchange/tml-jinja2.png?branch=master)](https://travis-ci.org/translationexchange/tml-jinja2)
[![Coverage Status](https://coveralls.io/repos/translationexchange/tml-jinja2/badge.png?branch=master)](https://coveralls.io/r/translationexchange/tml-jinja2?branch=master)The idea of this extension is to integrate web frameworks, that uses Jinja2 as template engine, with TML in easy and extendable fashion.The best way to start using this extension is to run a “toy” demo on Bottle that comes bundled with this extension.### Before Running the Sample Application
Make sure you have a Translation Exchange account, and have created a project in your dashboard.https://github.com/translationexchange/tml-jinja2`bash $ git clonehttps://github.com/translationexchange/tml-jinja2.git$ cdtml-jinja2/demo$ virtualenv--no-site-packagestml_env $ . ./tml_env/bin/activate $ pip install-rrequires.txt `Now you can start the application by running:`bash $ python app.py `This will start the Toy demo port 8000. Open your browser and point to: [http://localhost:8000](http://localhost:8000)
Package: tml-mnajibi
tml - Text to HTML ConverterOverviewtmlis a simple command-line tool that converts.txtand.mdfiles into.htmlformat. The tool automatically wraps paragraphs from the input.txtor.mdfile in<p>...</p>orh1, h2, h3tags respectively in the resulting.htmlfile.UsageBy default, if no output directory is specified, the.htmlfiles will be saved inside thetml/examplesdirectory.Txt to HTMLTo convert a.txtfile to.html:./main.py <path-to-txt-file>To specify a different output directory:./main.py <path-to-txt-file> --output <path-to-output-directory>md to HTMLTo convert a.mdfile to.html:./main.py <path-to-md-file>To specify a different output directory:./main.py <path-to-md-file> --output <path-to-output-directory>Command Options:OptionsDescription--versionor-vDisplay the tool's version.pathSpecify the path to a.txtor.mdfile or a directory containing multiple .txt files. If a directory is provided,tmlwill recursively process all.txtor.mdfiles within.--outputor-oSpecify a custom output directory. The tool will create the directory if it does not exist.--configor-cSpecify a customTOMLbased config file where all the above flags and their values can be passed instead of passing them through command line input which are ignored if passed along with this flag.Features📄 Converts single or multiple.txtand.mdfiles to.html.🖋 Automatic paragraph wrapping in<p>...</p>tags.🖋 Automatic heading wrapping in h1, h2 ,h3 based on number of # specified in the.mdfile.📁 Can output to a custom directory or default totml/examples.🔄 Overwrites existing output directory content to ensure it contains only the most recent outputs.🎉 Extracts title from the text file if present. The title is identified as the first line followed by two blank lines.🔗NEW!Validates and processes links for both TXT and MD formats, marking broken links distinctly.ContributingFor information on contributing to tml, such as setting up the environment and development practices, please readCONTRIBUTING.md.LicenseMIT
Package: tmlpy
tmlpy - Python implementation of Terminal Markup LanguageA Python module to implementtml, which make the output of coloured/formatted text in the terminal easier and more readable.Usage in PythonFirst, install tmlpy:pipinstalltmlpyThe output of coloured/formatted text is easy using the following syntax:fromtmlpyimporttmltml.print("<red>this text is <bold>red</bold></red> ","and the following is <green>%s</green>"%"not red",sep='')FormatEach tag is enclosed in angle brackets, much like HTML.You can nest tags as deeply as you like.It's not required to close tags you've opened, though it can make for easier reading.Available TagsForeground Colours<red><green><yellow><blue><magenta><cyan><lightgrey><darkgrey><black><white><lightred><lightgreen><lightyellow><lightblue><lightmagenta><lightcyan>Background Colours<bg-red><bg-green><bg-yellow><bg-blue><bg-magenta><bg-cyan><bg-lightgrey><bg-darkgrey><bg-black><bg-white><bg-lightred><bg-lightgreen><bg-lightyellow><bg-lightblue><bg-lightmagenta><bg-lightcyan>Attributes<bold><dim><underline><blink><reverse><hidden>Relatedhttps://github.com/liamg/tml
Package: tmlt-analytics
||Tumult AnalyticsTumult Analytics is a library that allows users to execute differentially private operations on
data without having to worry about the privacy implementation, which is handled
automatically by the API. It is built atop theTumult Core library.Demo videoWant to see Tumult Analytics in action? Check out this video introducing the
interface fundamentals:A selection of more advanced features is shown on the second part of this demo,
in aseparate video.InstallationSee theinstallation instructions in the documentationfor information about setting up prerequisites such as Spark.Once the prerequisites are installed, you can install Tumult Analytics usingpip.pipinstalltmlt.analyticsDocumentationThe full documentation is located athttps://docs.tmlt.dev/analytics/latest/.SupportIf you have any questions, feedback, or feature requests, please reach out to us onSlack.ContributingWe do not yet have a process in place to accept external contributions, but we are open to collaboration opportunities.
If you are interested in contributing, please let us knowvia Slack.SeeCONTRIBUTING.mdfor information about installing our development dependencies and running tests.Citing Tumult AnalyticsIf you use Tumult Analytics for a scientific publication, we would appreciate citations to the published software or/and its whitepaper. Both citations can be found below; for the software citation, please replace the version with the version you are using.@software{tumultanalyticssoftware,
    author = {Tumult Labs},
    title = {Tumult {{Analytics}}},
    month = dec,
    year = 2022,
    version = {latest},
    url = {https://tmlt.dev}
}@article{tumultanalyticswhitepaper,
  title={Tumult {{Analytics}}: a robust, easy-to-use, scalable, and expressive framework for differential privacy},
  author={Berghel, Skye and Bohannon, Philip and Desfontaines, Damien and Estes, Charles and Haney, Sam and Hartman, Luke and Hay, Michael and Machanavajjhala, Ashwin and Magerlein, Tom and Miklau, Gerome and Pai, Amritha and Sexton, William and Shrestha, Ruchit},
  journal={arXiv preprint arXiv:2212.04133},
  month = dec,
  year={2022}
}LicenseCopyright Tumult Labs 2023Tumult Analytics' source code is licensed under the Apache License, version 2.0 (Apache-2.0).
Tumult Analytics' documentation is licensed under
Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA-4.0).
Package: tmlt-core
Tumult CoreTumult Core is a programming framework for implementingdifferentially privatealgorithms.The design of Tumult Core is based on the design proposed in theOpenDP White Paper, and can automatically verify the privacy properties of algorithms constructed from Tumult Core components. Tumult Core is scalable, includes a wide variety of components, and supports multiple privacy definitions.InstallationSee theinstallation instructions in the documentationfor information about setting up prerequisites such as Spark and Java.Once the prerequisites are installed, you can install Tumult Core usingpip.pipinstalltmlt.coreDocumentationThe full documentation is located athttps://docs.tmlt.dev/core/latest.SupportIf you have any questions/concerns, pleasecreate an issueor reach out to us onSlack.ContributingWe are not yet accepting external contributions, but please let us know if you are interested in contributing viaSlack.SeeCONTRIBUTING.mdfor information about installing our development dependencies and running tests.LicenseCopyright Tumult Labs 2023The Tumult Platform source code is licensed under the Apache License, version 2.0 (Apache-2.0).
The Tumult Platform documentation is licensed under
Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA-4.0).
Package: tmm
Author homepage:http://sjbyrnes.comPackage home at PyPI:http://pypi.python.org/pypi/tmmPackage home at Github:https://github.com/sbyrnes321/tmmThis is a group of programs written in Python / NumPy for simulating light propagation in planar multilayer thin films, including the effects of multiple internal reflections and interference, using the “Transfer Matrix Method”. It can also simulate combinations of thin and thick films (e.g. a thick piece of glass with a multi-layer antireflection coating on one side and a mirror on the other side), or purely thick films.In addition to calculating how much light is transmitted and reflected, the program can calculate, at any given point in the structure, how much light is being absorbed there. This is a very important feature for solar-cell modeling, for example.It can also calculate the parameters measured in ellipsometry. It can also calculate the RGB or xyY color of a multilayer thin film (this requires colorpy,https://pypi.python.org/pypi/colorpy).For more information, seemanual.pdf. For the list of all functions and how to call them, browse the source code or go tohttps://pythonhosted.org/tmm/Tested in Python 3. It probably works in Python 2, or maybe not, I haven’t checked in a while. If you want to do color calculations in Python 3, you need to use the Python-3-compatible version of colorpyhere.
Package: tmmpy
The tmmpy library provides an object-oriented implementation of the Transfer Matrix Method (TMM) for all standard cases, i.e. s- and p-polarization, oblique incidence, absorbing and non-absorbing materials. In addition, a number of extensions to deal with partial as well as complete incoherence are implemented. Functionality is also provided to do parallel evaluations, e.g. for multiple wavelengths, on Linux. Furthermore, evaluation of properties across the stack, e.g. the energy flux, the absorption or the electric field, is supported.https://doi.org/10.5281/zenodo.1344878
Package: tmobile-call-log
tmobile_call_logCreates bar charts and pie charts from call logs. Processes CSV files
downloaded directly from T-Mobile's website (customer interface). Works as of
2017.InstallationTo install tmobile_call_log, use pip (or similar):pip install tmobile-call-logDocumentationCreate log object to compile all datadata_diris the directory where all the call logs (downloaded csv files)
are located.ignore_numberis any other number that is also yours and appears in the
log (e.g., Google voice number).log=CallActivity(data_dir='./data/',ignore_number='(123) 555-1234')Plot bar chartsPlots bar charts for call time and call quantity using the topnmost frequent phone numbers.log.plot_bar(n=15)Plot pie chartsPlots pie charts for call time and call quantity using the topnmost frequent phone numbers.log.plot_pie(n=9)
Package: tmod
A tool to work with tModLoader .tmod files.Free software: ISC licenseInstallationpip install tmodDocumentationhttps://python-tmod-tools.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.0 (2017-09-29)First release on PyPI.
Package: tmomentum
t-momentumA Stochastic Gradient momentum based on a Student-t distribution Exponential Moving AverageOfficial repository for the t-momentum algorithm.Journal Paper(Accepted for publication in the IEEE Transactions on Neural Networks and Learning Systems journal):Robust Stochastic Gradient Descent With Student-t Distribution Based First-Order MomentumArxiv Preprint(early version. Focuses only on the integration of the t-momentum to Adam. Corresponding repositoryhere):TAdam: A Robust Stochastic Gradient OptimizerHow to use:Installinstall with pip:pip install tmomentumor clone and install:git clone https://github.com/Mahoumaru/t-momentum.git
cd t-momentum
pip install -e .Import and use each optimizer just like you would use an official pytorch optimizer (adjust hyperparameters such as learning rate, k_dof, betas, weight_decay, amsgrad, etc.)fromtmomentum.optimizersimportTAdamfromtmomentum.optimizersimportTYogioptimizer1=TAdam(net1.parameters())optimizer2=TYogi(net2.parameters())How to cite:If you employ the t-momentum based optimizers in your Machine Learning application, please cite us using the following:Plain TextW. E. L. Ilboudo, T. Kobayashi and K. Sugimoto,
"Robust Stochastic Gradient Descent With Student-t Distribution Based First-Order Momentum,"
in IEEE Transactions on Neural Networks and Learning Systems, doi: 10.1109/TNNLS.2020.3041755.Bibtex@ARTICLE{9296551,
  author={W. E. L. {Ilboudo} and T. {Kobayashi} and K. {Sugimoto}},
  journal={IEEE Transactions on Neural Networks and Learning Systems},
  title={Robust Stochastic Gradient Descent With Student-t Distribution Based First-Order Momentum},
  year={2020},
  volume={},
  number={},
  pages={1-14},
  doi={10.1109/TNNLS.2020.3041755}}NoteThis repository is implemented in pytorch.
A tensorflow implementation of the t-momentum integrated to various optimizers would be really appreciated. Don't hesitate to PR.
Package: t-money
Money dataclassAdvanced Python 3.10 Dataclass for handling monetary values, keeping amount and currency togetherThisMoneyclass provides a simple and efficient way to manage amounts of money and perform arithmetic operations and comparisons on them. It supports different currencies and ensures that the operations are only performed on matching currencies to avoid inconsistencies.FeaturesInitialize aMoneyobject with a specific amount and currency.Perform arithmetic operations betweenMoneyobjects with the same currency.Compare and sortMoneyobjects.Convert aMoneyobject to another currency.Round aMoneyobject to a specified number of decimal places.Serialize and deserializeMoneyobjects to/from JSON.Usagefrom t_money import MoneyCreating a Money objectusd=Money(Decimal("10.50"),"USD")Create a Money object from stringusd_from_str=Money.from_str("USD 5.25")Arithmetic operationsusd1=Money(Decimal("10.50"),"USD")usd2=Money(Decimal("5.50"),"USD")usd_sum=usd1+usd2usd_difference=usd1-usd2usd_product=usd1*Decimal("2")Comparisonsprint(usd1==usd2)print(usd1<usd2)Roundingrounded_usd=usd1.round_to(1)Currency conversioneur=usd.convert("EUR",Decimal("0.85"))Money is hashablemoney_set={usd1,usd2}Serialization and deserializationimportjson# Serialize data containing Money objectdata={'money':usd}json_str=json.dumps(data,default=money_serializer)# Deserialize JSON data to Money objectloaded_data=json.loads(json_str,object_hook=money_deserializer)Error HandlingWhen performing operations onMoneyobjects with different currencies, aDifferentCurrencyErrorwill be raised. Make sure to handle this error if necessary when dealing with multiple currencies.
Package: tmorse
TMorseRun this code to blink your ThinkPad LED with a hidden mysterious Morse code! ;)Compatible with python3.9+. No third-party library is required, implemented in pure python.Make sure that you have required permissions to write to led acpi file descriptor.Take a lookInstallationInstallation of tmorse is a little complicated due to need of superuser access.Recommended way is usingpipx.
First, install pipx:sudoaptinstallpipxThen install tmorse by using command below:sudo-Eenv"PATH=$PATH"pipxinstall--pythonpython3.9tmorseP.S: TMorse is supported by python3.9+.Usagesudotmorse→ Insert input manually, and it will blink your LED, which its location is defined by default to be/proc/acpi/ibm/led.echo"This is a test"|sudotmorse--stdin→ Read the data from standard input.sudotmorse-ccustom_codes.json→  Encode characters to Morse based on your custom codes, although you should follow the protocol. (e.g. {"م": "--"})sudotmorse--on-command2--off-command0-l"/proc/acpi/ibm/kbdlight"-m0.7--default-led-statusOFF→ Show the Morse code by keyboard's backlit blinking.checksudo tmorse --helpfor more info.ContributingWritten by: Mahyar Mahdavi <Mahyar@Mahyar24.com>.
License: GNU GPLv3.
Source Code: <https://github.com/mahyar24/TMorse>.
PyPI: <https://pypi.org/project/TMorse/>.
Reporting Bugs and PRs are welcomed. :)Inspired byThis Project is based and inspired by "Ritvars Timermanis" thinkmorse.
Take a look at:thinkmorse.LicenseGPLv3
Package: tmp
Because sometimes you just want a temp dir.Install$ pip install tmpUseMake a temp dir e.g.:$ tmp
/var/folders/1k/fmmlqcfn5jsbcqrqsw3q_slm0000gn/T/tmpVA4NvsLog0.0.2 (2013/12/07)Bug fix0.0.1 (2013/12/07)A tmp dir is born
Package: tm_parser
tm_parserMichael Perkins, 2023Installationpip install tm-parserInstructions:In troopmaster, under reports -> advancement -> individual historyselect all the scouts you want to reportselect all the ranks you want to reportDo not select "Omit details on completed ranks"Other than that, any other options can be included or excluded (I only tested a few configurations. if it doesn't work, select everything)generate the report and save it to a PDF. -- we will use "export.pdf" as the output file nameby default, the output is to the console in YAML formatThen run:tmparse -o output.yaml export.pdfOptions:-t --output-type  [yaml], json or toml

-o --outfile output filenameThis produces output of the desired type.YAML can be read in python with:import yaml

with open('output.yaml') as f:

    scouts = yaml.safe_load(f)Using TmParser in code:from tm_parser import Parser

#initializing the parser automatically parses the file and stores
#the information in TmParser().scouts
parser = TmParser(infile='filename.pdf')


# Iterating on the parser yields scouts
for scout in parser:
    print('----------------------------------------------')
    print(f"{scout['Data']['Name']:26}Date       Eagle Req")
    print('----------------------------------------------')
    ## do something with scout
    if "Merit Badges" in scout:

        #sort merit badges by date ascending
        for badge, data in sorted(scout['Merit Badges'].items(), 
                                    key=lambda x: x[1]['date']):
            print(f"{badge:26}{data['date']} {data['eagle_required']}")Yields:----------------------------------------------
Smith, John               Date       Eagle Req
----------------------------------------------
Climbing                  2017-03-11 False
Mammal Study              2017-06-29 False
Leatherwork               2017-06-30 False
Swimming                  2017-06-30 True
Kayaking                  2018-06-29 False
Wilderness Survival       2018-06-29 False
Rifle Shooting            2018-06-29 False
First Aid                 2018-09-29 TrueBy default the information is a dictionary, with the scout names as keys, and each scout is a dictionary with the following keys:Activity TotalsData - contains biographical dataLeadershipMerit BadgesOrder of the ArrowPartial Merit BadgesRank AdvancementTraining CoursesAll dates have been parsed into datetime.date objects, in YYYY-MM-DD format, and are null if not assigned in the incoming data.
Package: tmpbrowse
tmpbrowse - Spawn browser sessions for testingThis tool helps you spawn temporary browser sessions in a sandboxed user dir to securely test your web app without worrying about
clearing cache, extensions …InstallationUsing pypi repository:$> pip install tmpbrowseForking this repo:$> python setup.py installUsageTODOBetter browser abstractionCHANGELOG0.0.3we can use a custom browser binary with –browser-bin argument