Saravanan666/pypi-org huggingface dataset:
Package: tmx-to-text
Introductiontmx-to-text allows convert TMX files into plain text and to get information.This tool be used for example to:Extract translations memories into text file for spell checking or post-editingExtract corpuses into text files for traning machine learning similarThe following command will extract the Catalan and Italian texts out of the TMX file:tmx-to-text convert -f ca-it.tmx -s ca -t itRunning the application with-hshows the options avaiable for the info and convert commands.usage: tmx-to-text info [-h] -f TMX_FILE

optional arguments:
  -h, --help   show this help message and exit
  -f TMX_FILE  TMX file to show info


usage: tmx-to-text convert [-h] -f TMX_FILE -s SOURCE_LANG -t TARGET_LANG [-p PREFIX] [-d]

optional arguments:
  -h, --help            show this help message and exit
  -f TMX_FILE           TMX file to convert
  -s SOURCE_LANG, --source_lang SOURCE_LANG
                        Source language to export
  -t TARGET_LANG, --target_lang TARGET_LANG
                        Target language to export
  -p PREFIX, --prefix PREFIX
                        Filename prefix used in the generated text files
  -d, --debug           Debug memory and execution time
 Debug memory and execution time
Package: tn3w-utils
TN3W_UtilsA consolidation of all tools created so far as a Python packageAll functions in this package:# Basic Toolsrandom_string(length,with_numbers,with_letters,with_punctuation)random_font()shorten_text(text,length)list_remove_duplicates(origin_list)reverse_list(origin_list)get_system_architecture()get_console_columns()find_missing_numbers_in_range(range_start,range_end,data)get_password_strength(password)is_password_pwned(password,session)EmptyWith().__enter__()__exit__(exc_type,exc_value,traceback)download_file(url,dict_path,operation_name,file_name,session,return_as_bytes,quite)AtExit().register(func,*args,**kwargs)remove_atexit(atexit_id)# File ToolsJSON.load(file_name,default)dump(data,file_name)Block(block_size,file_name)._get_id(index)_write_data(block_data)add_data(index,new_data)read(file_name,is_bytes,default)write(data,file_name,is_bytes)SecureDelete.list_files_and_directories(directory_path)file(file_path,quite)directory(directory_path,quite)# Cryptographic ToolsFastHashing(salt,without_salt).hash(plain_text,salt_length)compare(plain_text,hashed_value)Hashing(salt,without_salt).hash(plain_text,hash_length)compare(plain_text,hashed_value)SymmetricEncryption(password,salt_length).encrypt(plain_text)decrypt(cipher_text)AsymmetricEncryption(public_key,private_key).generate_keys(key_size)encrypt(plain_text)decrypt(cipher_text)sign(plain_text)verify_sign(signature,plain_text)NoEncryption().encrypt(plain_text)decrypt(cipher_text)derive_password(password,salt)# User-Agent Toolsrandom_ua()# IP-Address Toolsshorten_ipv6(ip_address)ipv4_to_ipv6(ipv4_address)is_valid_ip(ip_address)get_client_ip(request)get_ip_info(ip_address,cache_path,save_securely)# Web Toolsremove_args_from_url(url)WebPage.client_language(request,default)_minimize_tag_content(html,tag)minimize(html)_translate_text(text_to_translate,from_lang,to_lang)translate(html,from_lang,to_lang)render_template(file_path,html,**args)render_template(file_name,request,template_dir,template_language,**args)# Image Toolsshow_image_in_console(image_bytes)random_website_logo(name)convert_image_to_base64(file_path)is_valid_image(image_data)resize_image(image_data,target_size)# Software Toolsmacos_get_installer_and_volume_path()Linux.get_package_manager()install_package(package_name,quite)GnuPG.pathget_download_link(session)Captcha(captcha_secret,data).generate()verify(client_input,crypted_captcha_prove)
Package: tna-frontend-jinja
TNA Frontend JinjaTNA Frontend Jinja templates are aJinjaimplementation of the templates provided as part ofTNA Frontend.Quickstart for Flask projectsUse the Flask application'sjinja_loaderto allow templates included from either your app (in the below example calledapp) and thetna_frontend_jinjapackage.Ensure you application is first on the list. This means you can overwrite the standard templates by creating a template with the same filename in your project.fromflaskimportFlaskfromjinja2importChoiceLoader,PackageLoaderdefcreate_app():app=Flask(__name__)app.jinja_loader=ChoiceLoader([PackageLoader("app"),PackageLoader("tna_frontend_jinja"),])Using the templates{%from"components/button/macro.html"importtnaButton-%}{{tnaButton({'text':'Save and continue'})}}The options available to each component macro can be found in theNational Archives Design System Componentsdocumentation.The included templates are a like-for-like port, the only difference between the Nunjucks examples and their Jinja equivalents is having to quote key names, e.g.'text'instead oftext.We test each component against its publishedcomponent fixturesto ensure complete compatibility.Compatibility with TNA FrontendTNA Frontend JinjaCompatible TNA Frontend versions0.1.14v0.1.400.1.13v0.1.390.1.12v0.1.37,v0.1.380.1.11v0.1.360.1.10v0.1.34,v0.1.350.1.9v0.1.330.1.8v0.1.31,v0.1.320.1.7v0.1.31,v0.1.320.1.6v0.1.29-prerelease,v0.1.300.1.0–0.1.5[latest frommainbranch when published]Test the templatespython-mvenvvenv
pythoninstall-rtest/requirements.txt
flask--apptestrun--debug--port5000nodetest-fixtures.mjs
Package: tnetstring
This is a data serialization library. It’s a lot like JSON but it uses a
new syntax called “typed netstrings” that Zed has proposed for use in the
Mongrel2 webserver.  It’s designed to be simpler and easier to implement
than JSON, with a happy consequence of also being faster in many cases.An ordinary netstring is a blob of data prefixed with its length and postfixed
with a sanity-checking comma.  The string “hello world” encodes like this:11:hello world,Typed netstrings add other datatypes by replacing the comma with a type tag.
Here’s the integer 12345 encoded as a tnetstring:5:12345#And here’s the list [12345,True,0] which mixes integers and bools:19:5:12345#4:true!1:0#]Simple enough?  This module gives you the following functions:dump:dump an object as a tnetstring to a filedumps:dump an object as a tnetstring to a stringload:load a tnetstring-encoded object from a fileloads:load a tnetstring-encoded object from a stringpop:pop a tnetstring-encoded object from the front of a stringNote that since parsing a tnetstring requires reading all the data into memory
at once, there’s no efficiency gain from using the file-based versions of these
functions.  They’re only here so you can use load() to read precisely one
item from a file or socket without consuming any extra data.The tnetstrings specification explicitly states that strings are binary blobs
and forbids the use of unicode at the protocol level.  As a convenience to
python programmers, this library lets you specify an application-level encoding
to translate python’s unicode strings to and from binary blobs:>>> print repr(tnetstring.loads("2:\xce\xb1,"))
'\xce\xb1'
>>>
>>> print repr(tnetstring.loads("2:\xce\xb1,", "utf8"))
u'\u03b1'
Package: tnetstring3
This is a data serialization library. It’s a lot like JSON but it uses a
new syntax called “typed netstrings” that Zed has proposed for use in the
Mongrel2 webserver.  It’s designed to be simpler and easier to implement
than JSON, with a happy consequence of also being faster in many cases.An ordinary netstring is a blob of data prefixed with its length and postfixed
with a sanity-checking comma.  The string “hello world” encodes like this:11:hello world,Typed netstrings add other datatypes by replacing the comma with a type tag.
Here’s the integer 12345 encoded as a tnetstring:5:12345#And here’s the list [12345,True,0] which mixes integers and bools:19:5:12345#4:true!1:0#]Simple enough?  This module gives you the following functions:dump:dump an object as a tnetstring to a filedumps:dump an object as a tnetstring to a stringload:load a tnetstring-encoded object from a fileloads:load a tnetstring-encoded object from a stringpop:pop a tnetstring-encoded object from the front of a stringNote that since parsing a tnetstring requires reading all the data into memory
at once, there’s no efficiency gain from using the file-based versions of these
functions.  They’re only here so you can use load() to read precisely one
item from a file or socket without consuming any extra data.The tnetstrings specification explicitly states that strings are binary blobs
and forbids the use of unicode at the protocol level.  As a convenience to
python programmers, this library lets you specify an application-level encoding
to translate python’s unicode strings to and from binary blobs:>>> print repr(tnetstring.loads("2:\xce\xb1,"))
'\xce\xb1'
>>>
>>> print repr(tnetstring.loads("2:\xce\xb1,", "utf8"))
u'\u03b1'Copyright:2012-2013 by Ryan Kelly <ryan@rfk.id.au>.Copyright:2014 by Carlo Pires <carlopires@gmail.com>.License:MIT, see LICENCE for more details.
Package: tnflux
T-N Wave-Activity FluxPython scripts for caculating theT-N Wave-Activity Fluxderived byTakaya and Nakamura (JAS,2001).IntroductionTakaya and Nakamura generalize the Plumb Wave-Activity Flux(Plumb,1985) so as to be applicable to small-amplitude Quasi-Geostrophic(QG) disturbances, either stationary or migratory, that are superimposed on a zonally varying basic flow, and introduced theT-N Wave-Activity Flux('TN01' for short).TN01 is of great advantage in climate monitoring and diagnosis.TN01 with improved meridional component based on Plumb Wave-Activity Flux is appropriate for analyzing Rossby waves in the zonally asymmetric westerly. And it reflect the evolution of long-waves which the E-P Flux can't.
(Shi Chunhua,2017)FormulationThese Python scripts use the TN01 diagnostic formula in Spherical coordinates, which is the Eq.38 of Takaya's paper published in 2001:The first two terms in Eq.38 are taken into account while computing on the horizontal direction.
And assuming the wave is stationary, so the Cu in Eq.38 would be zero.
So the formula of horizontal T-N Wave-Activity Flux could yield as followed:ProgramingWe modified the GRADS script by Kazuaki Nishii into a Python3 version(http://www.atmos.rcast.u-tokyo.ac.jp/nishii/programs/index.html)Python versionPython 3ComputationnumpyAll computations are based onnumpyarrays, which are very efficient.Partial differential terms in the formula are calculated bynumpy.gradientin the central difference method.HorizontalData & ProcessHorizontal TN01 caltulation require the datas below:Climatology average background of windU_candV_cand geopotentialphi_c.Geopotential in the analysis periodphi.Geopotential anomalies will be used to compute pertubation stream-functionpsi_pin Quasi-Geostrophic(QG) assumption:psi_p= (pi-pi_c) /ffis the Coriolis parameter:f= 2 * omega * sin(lat)Input Data is Geopotential, NOT Geopotential Height!!!The Re-analysis from NCEP/NCAR(NCEP1) is Geopotential Height, Geopotential Height multiplied by gravitygmakes Geopotential.Outputpxfor longitude directionpyfor latitude directionReliabilityThe output figures sample(Datas fromECMWF ERA-Interim)Results are compatible with the Wave-Activity Flux figures(JRA-55) made by JMA-TCC.(http://ds.data.jma.go.jp/tcc/tcc/products/clisys/figures/db_hist_pen_tcc.html)and also the programs by Kazuaki Nishii @ University of Tokyo.(http://www.atmos.rcast.u-tokyo.ac.jp/nishii/programs/index.html)AuthorsLai Sheng:laish12@lzu.edu.cn.
You can also visit his site for more detail:http://500hpa.cn/pyinmet/tnflux/Yongpeng Zhang:zhangyp6603@outlook.com
Package: tnia-python
tnia-pythonA collection of useful python utilities from True North Intelligent AlgorithmsIf you need support for the library please post a question on theImage.sc Forum.This project started as a means for me to test ideas and try out new python libraries.  As the number of experiments grew I started organizing things into packages.  The library is still in the very early stages of development, and is still lacking documentation, however it's at the point where I find it useful for prototyping bio-image processing protocols.For now, the user-base of the library is mostly people I am working with directly, teaching to in a course, or discussing image processing problems with online.  The helper functions make it quick for me to provide examples of image processing issues I am discussing.There are useful helper function toshow max, sum and slice projections of 3D arraysGenerate PSFs with simple API to psfmodels and sdeconvExtract PSFs from a bead imageDraw circles and spheres in images to create phantom imagesApply a forward imaging model (convolution + noise)In the coming months and years I plan to keep iterating on the library and making it more usable.  Please reach out to me if you have any questions.DependenciesWe tend not to install many of the dependencies via setup.py.  The dependencies are complex and not all are needed to run many examples.  Thus we leave it up to the user to install dependencies manually, allowing them to potentially install a minimum set of dependencies for the specific code they are interested in running.Most of the deconvolution related functionality uses clij2-fft.  Some functionality uses clesperanto.  The current recommended steps to create a conda/mamba environment for tnia-python are as followsmamba create --name decon-dl-env python=3.9 devbio-napari pyqt -c conda-forge -c pytorch
mamba install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
pip install cupy-cuda11x
pip install tnia-python
pip install clij2-fft
pip install psfmodels
pip install "tensorflow<2.11"
pip install stardist
pip install raster-geometryMac-users please also install this:conda install -c conda-forge ocl_icd_wrapper_appleLinux users please also install this:conda install -c conda-forge ocl-icd-system
Package: tnkeeh
tnkeeh(تنقيح) is an Arabic preprocessing library for python. It was designed usingrefor creating quick replacement expressions for several examples.Installationpip install tnkeehFeaturesQuick cleaningSegmentationNormalizationData splittingExamplesData Cleaningimporttnkeehastntn.clean_data(file_path='data.txt',save_path='cleaned_data.txt',)Argumentssegmentuses farasa for segmentation.remove_diacriticsremoves all diacritics.remove_special_charsremoves all sepcial chars.remove_englishremoves english alphabets and digits.normalizematch digits that have the same writing but different encodings.remove_tatweeltatweel characterـis used a lot in arabic writing.remove_repeated_charsremove characters that appear three times in sequence.remove_html_elementsremove html elements in the form  with their attirbutes.remove_linksremove links.remove_twitter_metaremove twitter mentions, links and hashtags.remove_long_wordsremove words longer than 15 chars.by_chunkread files by chunks with sizechunk_size.HuggingFace datasetsimporttnkeehastnfromdatasetsimportload_datasetdataset=load_dataset('metrec')cleander=tn.Tnkeeh(remove_diacritics=True)cleaned_dataset=cleander.clean_hf_dataset(dataset,'text')Data SplittingSplits raw data into training and testing using thesplit_ratioimporttnkeehastntn.split_raw_data(data_path,split_ratio=0.8)Splits data and labels into training and testing using thesplit_ratioimporttnkeehastntn.split_classification_data(data_path,lbls_path,split_ratio=0.8)Splits input and target data with rationsplit_ratio. Commonly used for translationtn.split_parallel_data('ar_data.txt','en_data.txt')Data ReadingRead split data, depending if it was raw or classificationimporttnkeehastntrain_data,test_data=tn.read_data(mode=0)Argumentsmode = 0read raw data.mode = 1read labeled data.mode = 2read parallel data.ContributionThis is an open source project where we encourage contributions from the community.LicenseMITlicense.Citation@misc{tnkeeh2020,
  author = {Zaid Alyafeai and Maged Saeed},
  title = {tkseem: A Preprocessing Library for Arabic.},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/ARBML/tnkeeh}}
}
Package: tnmake
PROJECTID:Thumbnail!MAKERContact:git@schepsen.euDESCRIPTIONThumbnail!MAKER creates customisable thumbnails and adds some tech details in the picture's headerDEPENDENCIESAttention: Don't forget to install these additional appsffmpegimagemagickpip install -r requirements.txtUSAGEusage: tnmake -i path [-o path] [-w px] [-c annotation] [--grid layout] [-e {bmp,jpg,png}] [-q x] [-f path] [-s px]Thumbnail!MAKER creates thumbnails with some additional informationoptions:
-h, --helpshow this help message and exit-i path, --input pathset video filepath-o path, --output pathforce a custom output filepath-w px, --width pxset width of the output image--comment annotationappend a thumbnail annotation--grid layoutset layout of the output thumbnail-e {bmp,jpg,png}, --extension {bmp,jpg,png}choose the output extension (default: "jpg")-q x, --quality xset quality, affects lossy image formats only-f path, --font pathselect an available font or pass a path to a desired fontfile-s px, --size pxset desired fontsize (default: 13px)-v, --verboseenable verbose mode-V, --versionshow program's version number and exitEXAMPLEStnmake -i "Blade Runner (1982) Original.mkv" -w 750 -c "This is useful for adding small annotations (such as text labels)"CHANGELOGThumbnail!MAKER 0.2.0, updated @ 2022-11-03pack the project into apippackage (visit)Thumbnail!MAKER 0.1.1, updated @ 2020-01-14add support forembeddedsubtitlesThumbnail!MAKER 0.1.0, updated @ 2020-01-13initial release
Package: tnmk-ensae
ï»¿# READMEPresentation du packageLe package tnmk_ensae est un module graphique de visualisation (animee ou non) utilisant principalement une surcouche du package matplotlib, a savoir cartopy. Il contient deux fonctions qui visualisent l evolution temporelle d une donnee numerique geolocalisee, de deux facons distinctes.
Package: tnng
Toy Neural Network GeneratorInstallation$pipinstalltnngSimple Model Generator#!/usr/bin/env pythonimporttorchimporttorch.nnasnnimporttorchex.nnasexnnfromtnngimportGenerator,MultiHeadLinkedListLayerm=MultiHeadLinkedListLayer()# all layers can be lazy evaluation.m.append([exnn.Linear(64),exnn.Linear(128),exnn.Linear(256)])m.append([nn.ReLU(),nn.ELU()])m.append([exnn.Linear(16),exnn.Linear(32),exnn.Linear(64),])m.append([nn.ReLU(),nn.ELU()])m.append([exnn.Linear(10)])g=Generator(m)x=torch.randn(128,256)classModel(nn.Module):def__init__(self,idx=0):super(Model,self).__init__()self.model=nn.ModuleList([l[0]forling[idx]])defforward(self,x):forminself.model:x=m(x)returnxm=Model(0)o=m(x)'''ModuleList((0): Linear(in_features=256, out_features=64, bias=True)(1): ReLU()(2): Linear(in_features=64, out_features=16, bias=True)(3): ReLU()(4): Linear(in_features=16, out_features=10, bias=True))'''Multimodal Model Generator#!/usr/bin/env pythonimporttorchimporttorch.nnasnnimporttorchex.nnasexnnfromtnngimportGenerator,MultiHeadLinkedListLayerm=MultiHeadLinkedListLayer()m1=MultiHeadLinkedListLayer()# all layers can be lazy evaluation.m.append([exnn.Linear(64),exnn.Linear(128),exnn.Linear(256)])m.append([nn.ReLU(),nn.ELU()])m.append([exnn.Linear(16),exnn.Linear(32),exnn.Linear(64),])m.append([nn.ReLU(),nn.ELU()])m1.append([exnn.Conv2d(16,1),exnn.Conv2d(32,1),exnn.Conv2d(64,1)])m1.append([nn.MaxPool2d(2),nn.AvgPool2d(2)])m1.append([nn.ReLU(),nn.ELU(),nn.Identity()])m1.append([exnn.Conv2d(32,1),exnn.Conv2d(64,1),exnn.Conv2d(128,1)])m1.append([nn.MaxPool2d(2),nn.AvgPool2d(2)])m1.append([exnn.Flatten(),])m=m+m1m.append([exnn.Linear(128)])m.append([nn.ReLU(),nn.ELU(),nn.Identity()])m.append([exnn.Linear(10)])g=Generator(m)classModel(nn.Module):def__init__(self,idx=0):super(Model,self).__init__()self.model=g[idx]forlayersinself.model:forlayerinlayers:self.add_module(f'{layer}',layer)defforward(self,x,img):forminself.model:iflen(m)==2:ifm[0]isnotNone:x=m[0](x)img=m[1](img)eliflen(m)==1andm[0]isNone:x=torch.cat((x,img),1)else:x=m[0](x)returnxx=torch.randn(128,256)img=torch.randn(128,3,28,28)m=Model()o=m(x,img)print(o.shape)
Package: tnnt-discordbot-cogs
Terra Nanotech Discordbot CogsA collection of cogs forAA-DiscordbotTerra Nanotech Discordbot CogsImportant InformationInstallImportant InformationThese Discord bot COGs are specially tailored for the corporation Terra Nanotech.
They COGs of apps we use, so they fit our needs.NoteIf you install this app, you need to be aware that there will be
no support for any kind of issues you might encounter, and you have to figure it out
on your own.Installpipinstalltnnt-discordbot-cogsInlocal.pyright afterINSTALLED_APPS:# Terra Nanotech Discordbot CogsINSTALLED_APPS+=["eveuniverse","tnnt_discordbot_cogs"]Run DB migrations and restart supervisor.
Package: tnnt-templates
Terra Nanotech Auth TemplatesTerra Nanotech Template Overrides for Alliance AuthTerra Nanotech Auth TemplatesImportant InformationInstallSettingsImportant InformationWarningThese template overrides are specially tailored for the corporation Terra Nanotech.
They override templates of apps we use, so it looks like we want it to. This
might entail changes to templates that also change the behaviour in a way we like it
to be changed.If you install these template overrides, you need to be aware that there will be
no support for any kind of issues you might encounter, and you have to figure it out
on your own.Installpipinstalltnnt-templatesInlocal.pyright afterINSTALLED_APPS:Settings# TN-NT Auth Templates - https://github.com/terra-nanotech/tn-nt-auth-templatesINSTALLED_APPS.insert(0,"tnnt_templates")if"tnnt_templates"inINSTALLED_APPS:TEMPLATES[0]["OPTIONS"]["context_processors"].append("tnnt_templates.context_processors.tnnt_settings")TNNT_TEMPLATE_ENTITY_ID=8154711#  replace with your corp/alliance IDTNNT_TEMPLATE_ENTITY_TYPE="corporation"# default: "alliance"TNNT_TEMPLATE_ENTITY_NAME="My Awesome Corp/Alliance"# your corp/alliance name# the URLs are shown in the user menuTNNT_TEMPLATE_URLS_OWN_WEBSITES=[{"name":"Website","url":"https://webseite.com/","new_tab":True,},{"name":"Forums","url":"https://forum.website.com/","new_tab":True,},]TNNT_TEMPLATE_URLS_OTHER_WEBSITES=[{"name":"Website","url":"https://website.com/","new_tab":True,},]ImportantIf you are usingAA-GDPR, the template stuff needs to beaftertheAA_GDPRentry, like this:# GDPR ComplianceINSTALLED_APPS.insert(0,"aagdpr")AVOID_CDN=True# TN-NT Auth TemplatesINSTALLED_APPS.insert(0,"tnnt_templates")