Saravanan666/pypi-org huggingface dataset:
Package: pytextforge
PyTextForgeThis module useJinjain order to generate files from a template, and create one CLI program to can use it in a terminal context getting the data as argument.Installpython-mpipinstall-Upytextforge;How to useThese are some examples about the usage of this module. The idea is to integrate this tool with others in order to generate the document.Simple fileThis example shows how to use a simple data in order to create an output.TemplateThis is a simple example:

- {{ a }}Commandpython-mpytextforge--data"foo=This is a line"--templatetemplate.temp--outputoutput.txt;OutputThis is a simple example:

- This is a lineJSON dataYou can also send more complex inputs to this script using a JSON.TemplateThis is a simple example:

The list of elements is:

{% for element in foo.elements %}- {{ element }}
{% endfor %}Commandpython-mpytextforge--json'foo={"elements":[1,2,3,4,5]}'--templatetemplate.temp--outputoutput.txt;OutputThis is a simple example:

The list of elements is:

- 1
- 2
- 3
- 4
- 5Data from filesYou can get the data from a file, it can be a plain text or a json format data.TemplateIn this example we got the follow files contents:

info.txt
-----
{{ infoplain }}
-----

info.json
-----
{{ infojson.info }}
-----info.txtThis is the info

from the plain fileinfo.json{"info":"This is the info from\nthe json file..."}Commandpython-mpytextforge--data-file'infoplain=info.txt'--json-file'infojson=info.json'--templatetemplate.temp--outputoutput.txt;OutputIn this example we got the follow files contents:

info.txt
-----
This is the info

from the plain file
-----

info.json
-----
This is the info from
the json file...
-----Overwrite dataIf you provide data with the same ID more than once, the argument of the left will be overwrited. If the data is empty, that argument will be ignored. This way, you can control overwrites.TemplateThis is a simple example:

The list of elements is:

{% for element in foo.elements %}- {{ element }}
{% endfor %}Scriptimportjsonimportsysdefmain():argument=int(sys.argv[1])iflen(sys.argv)>1else0ifargument==1:print(json.dumps({'elements':[0,9,8,7,6,5,4,3,2,1]}))else:print()if__name__=='__main__':main()Command 1python-mpytextforge--json'foo={"elements":[1,2,3,4,5]}'--json"foo=$(pythonscript.py)"--templatetemplate.temp--outputoutput.txt;Output 1This is a simple example:

The list of elements is:

- 1
- 2
- 3
- 4
- 5Command 2python-mpytextforge--json'foo={"elements":[1,2,3,4,5]}'--json"foo=$(pythonscript.py1)"--templatetemplate.temp--outputoutput.txtOutput 2This is a simple example:

The list of elements is:

- 0
- 9
- 8
- 7
- 6
- 5
- 4
- 3
- 2
- 1
Package: pyTextMiner
Welcome to the package of pyTextMiner. The current version of pyTextMiner is 1.1.113.
For those who are interested in contributing to the development of pyTextMiner, please contact at min.song.njit@gmail.com.1pyTextMiner was originally designed with the architecture of pipeline.
Each of text representation and processing task is treated as a pipe. Thus, a pipeline consists of a set of text representation/preprocessing tasksThe current version of pyTextMiner supports Korean and English text.
Package: pytextprep
pytextprepThis is a Python package that offers additional text preprocessing functionality specifically designed for tweets. The package bundles functions to help with cleaning and gaining insight into tweet data, providing additional resources for EDA or enabling feature engineering.The main functions of this package are:remove_punct: Removes punctuation from a list of tweetsextract_ngram: Extracts n-grams from a list of tweetsextract_hashtags: Creates a list of hashtags from a list of tweetsgenerate_cloud: Creates a word cloud of the most frequent words from a list of tweetsIn the Python ecosystem the only popular package focused on tweet data istweet-preprocessor. Even though this package is also customized specifically for dealing with Tweeter data its scope is solely oriented to tokenizing and cleaning the tweets. In contrast, our package can be leveraged to extract new features out of tweets.InstallationInstall using pip:$pipinstallpytextprepInstall from source:$gitclonegit@github.com:UBC-MDS/pytextprep.gitcdpytextprep
gitcheckoutmain#latest releasepipinstall.UsageDocumentationPlease follow the steps below:Create a new conda environment namedpytextprep:condacreate--namepytextpreppython=3.9-yActivate the conda environmentpytextprep:condaactivatepytextprepInstall the package:pipinstallpytextprepIf the package fails to install due to thewordcloudpackage, please installwordcloudusing the following command and then installpytextprepagain.condainstall-cconda-forgewordcloud-yOpen Python:pythonYou can now use the package functions as:frompytextprep.extract_ngramimportextract_ngramfrompytextprep.extract_hashtagsimportextract_hashtagsfrompytextprep.remove_punctimportremove_punctfrompytextprep.generate_cloudimportgenerate_cloudimportmatplotlib.pyplotasplttweets_list=["Make America Great Again! @DonalTrump","It's a new day in #America"]extract_ngram(tweets_list,n=3)['Make America Great', 'America Great Again!', 'Great Again! @DonalTrump', "Again! @DonalTrump It's", "@DonalTrump It's a", "It's a new", 'a new day', 'new day in', 'day in #America']extract_hashtags(tweets_list)['America']remove_punct(tweets_list,skip=["'","@","#",'-'])['Make America Great Again @DonalTrump', "It's a new day in #America"]fig,wc=generate_cloud(tweets_list)plt.show()ContributingContributors: Arijeet Chatterjee, Joshua Sia, Melisa Maidana, Philson Chan (DSCI_524_GROUP21).Interested in contributing? Check out thecontributing guidelines.Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensepytextprepwas created by Arijeet Chatterjee, Joshua Sia, Melisa Maidana, Philson Chan (DSCI_524_GROUP21).It is licensed under the terms of the MIT license.Creditspytextprepwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: pytextractor
pytextractorpython ocr using tesseract with EAST opencv text detectorUses theEAST opencv detectorwithpytesseractto extract text(default) or numbers from images.Usage mainusage: text_detector [-h] [--east EAST] [-c CONFIDENCE] [-w WIDTH] [-e HEIGHT] [-d] [-n] [-p PERCENTAGE]
                     [-b MIN_BOXES] [-i MAX_ITERATIONS]
                     images [images ...]

Text/Number extractor from image

positional arguments:
  images                path(s) to input image(s)

options:
  -h, --help            show this help message and exit
  --east EAST           path to input EAST text detector
  -c CONFIDENCE, --confidence CONFIDENCE
                        minimum probability required to inspect a region
  -w WIDTH, --width WIDTH
                        resized image width (should be multiple of 32)
  -e HEIGHT, --height HEIGHT
                        resized image height (should be multiple of 32)
  -d, --display         Display bounding boxes
  -n, --numbers         Detect only numbers
  -p PERCENTAGE, --percentage PERCENTAGE
                        Expand/shrink detected bound box
  -b MIN_BOXES, --min-boxes MIN_BOXES
                        minimum number of detected boxes to return
  -i MAX_ITERATIONS, --max-iterations MAX_ITERATIONSInstallation & usagebrew install tesseract
pipx install pytextractor
text_detectorUsage libfrom pytextractor import pytextractor

extractor = pytextractor.PyTextractor()Running testsbrew install tesseract
python -mvenv .venv --prompt .
. ./.venv/bin/activate
pip install ".[dev]"
pytest -s tests
Package: pytextseg
The pytextseg package provides functions to wrap plain texts:
fill() and wrap() are Unicode-aware alternatives for those of
textwrap standard module; fold() and unfold() are functions mainly focus
on plain text messages such as e-mail.It also provides lower level interfaces for text segmentation: LineBreak
class for line breaking; GCStr class for grapheme cluster segmentation.InstallSeeINSTALL.For Other LanguagePerlUnicode-LineBreak:http://search.cpan.org/dist/Unicode-LineBreak/Licensepytextseg is Copyright (C) 2012, by Hatuka*nezumi - IKEDA Soji.It is free software; you can redistribute it and/or modify it under the
terms of either:the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version,
orthe “Artistic License”.See the COPYING and the ARTISTIC files for more details.AuthorHatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.
Package: pytexttoimage
Text_To_ImageMethod to convert text to image in python using opencv2INSTALLpip install pytexttoimageEXAMPLEfrompytexttoimage.texttoimageimporttext_2_imagefontscale=2filename='sample.png'thickness=2textcolor=(0,0,0)mark='EXAMPLE TEXT'text_2_image(mark,filename,fontscale,thickness,textcolor)
Package: pytexttool
This repository consists of:pytext.data: Generic data loaders, abstractions, and iterators for text (including vocabulary and word vectors)pytext.datasets: Pre-built loaders for common NLP datasetsIt is a fork of torchtext, but use numpy ndarray for dataset instead of torch.Tensor or Variable, so as to make it a more generic toolbox for NLP users.InstallationMake sure you have Python 2.7 or 3.5+ and PyTorch 0.4.0 or newer. You can then install torchtext using pip:pip install pytexttoolOptional requirementsIf you want to use English tokenizer fromSpaCy, you need to install SpaCy and download its English model:pip install spacy
python -m spacy download enAlternatively, you might want to use Moses tokenizer fromNLTK. You have to install NLTK and download the data needed:pip install nltk
python -m nltk.downloader perluniprops nonbreaking_prefixesDataThe data module provides the following:Ability to describe declaratively how to load a custom NLP dataset that’s in a “normal” format:>>>pos=data.TabularDataset(...path='data/pos/pos_wsj_train.tsv',format='tsv',...fields=[('text',data.Field()),...('labels',data.Field())])...>>>sentiment=data.TabularDataset(...path='data/sentiment/train.json',format='json',...fields={'sentence_tokenized':('text',data.Field(sequential=True)),...'sentiment_gold':('labels',data.Field(sequential=False))})Ability to define a preprocessing pipeline:>>>src=data.Field(tokenize=my_custom_tokenizer)>>>trg=data.Field(tokenize=my_custom_tokenizer)>>>mt_train=datasets.TranslationDataset(...path='data/mt/wmt16-ende.train',exts=('.en','.de'),...fields=(src,trg))Batching, padding, and numericalizing (including building a vocabulary object):>>># continuing from above>>>mt_dev=datasets.TranslationDataset(...path='data/mt/newstest2014',exts=('.en','.de'),...fields=(src,trg))>>>src.build_vocab(mt_train,max_size=80000)>>>trg.build_vocab(mt_train,max_size=40000)>>># mt_dev shares the fields, so it shares their vocab objects>>>>>>train_iter=data.BucketIterator(...dataset=mt_train,batch_size=32,...sort_key=lambdax:data.interleave_keys(len(x.src),len(x.trg)))>>># usage>>>next(iter(train_iter))<data.Batch(batch_size=32,src=[LongTensor(32,25)],trg=[LongTensor(32,28)])>Wrapper for dataset splits (train, validation, test):>>>TEXT=data.Field()>>>LABELS=data.Field()>>>>>>train,val,test=data.TabularDataset.splits(...path='/data/pos_wsj/pos_wsj',train='_train.tsv',...validation='_dev.tsv',test='_test.tsv',format='tsv',...fields=[('text',TEXT),('labels',LABELS)])>>>>>>train_iter,val_iter,test_iter=data.BucketIterator.splits(...(train,val,test),batch_sizes=(16,256,256),>>>sort_key=lambdax:len(x.text),device=0)>>>>>>TEXT.build_vocab(train)>>>LABELS.build_vocab(train)DatasetsThe datasets module currently contains:Sentiment analysis: SST and IMDbQuestion classification: TRECEntailment: SNLILanguage modeling: abstract class + WikiText-2Machine translation: abstract class + Multi30k, IWSLT, WMT14Sequence tagging (e.g. POS/NER): abstract class + UDPOSOthers are planned or a work in progress:Question answering: SQuADSee thetestdirectory for examples of dataset usage.
Package: pytfc
pytfcPython HTTP client library for the Terraform Cloud and Terraform Enterprise API.importpytfcclient=pytfc.Client(org='my-tfe-org')client.workspaces.create(name='aws-base-vpc-dev')client.set_ws(name='aws-base-vpc-dev')client.workspace_variables.create(key='AWS_ACCESS_KEY_ID',value='ABCDEFGHIJKLMNOPQRST',category='env',sensitive='true')client.workspace_variables.create(key='AWS_SECRET_ACCESS_KEY',value='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCD',category='env',sensitive='true')UsageAclientobject must be instantiated with certain parameters. The parameters can be specified as environment variables or directly as function arguments. The only parameter required at the time a client is instantiated is the API token. A hostname is also required if you are using TFE, and if a hostname is not specified it is assumed you are using TFC (app.terraform.io). Depending on what level you are working at, mainly Organization-level vs. Workspace-level, you can optionally set some of the other parameters either at the time the client is instantiated or after the fact.Instantiating a ClientWith environment variables:os.environ['TFE_HOSTNAME']='tfe.whatever.com'os.environ['TFE_TOKEN']='abcdefghijklmn.atlasv1.opqrstuvwxyz012345678987654321abcdefghijklmnopqrstuvwxyz01234567890'client=pytfc.Client(org='my-existing-tfe-org')Directly as function arguments:client=pytfc.Client(hostname='tfe.whatever.com',token='abcdefghijklmn.atlasv1.opqrstuvwxyz012345678987654321abcdefghijklmnopqrstuvwxyz01234567890',org='my-existing-tfe-org')Setting the Organization and Workspace when a client is instantiated:client=pytfc.Client(org='my-existing-tfe-org',ws='my-existing-tfe-ws')Assumes the TFE_HOSTNAME and TFE_TOKEN environment variables are set.Setting the Organization and Workspaceaftera client is instantiated:client=pytfc.Client()client.set_org(name='my-existing-tfe-org')client.set_ws(name='my-existing-tfe-ws')Assumes the TFE_HOSTNAME and TFE_TOKEN environment variables are set.See thedocsfor more details and examples on usage.Note: this is repository is not officially supported or maintained by HashiCorp.
Package: pytff
Wrapper arround G. Kovacs & G. Kupi Template Fourier FittingSetupIn all cases you need to download and compileTemplate Fourier Fittingparameters file (tff.par) and  the Template Fourier decompositions file
(template.dat) are not necesary.You can compile (in posix) thetff.fwith the command$gfortrantff.f-otffBasic InstallExecute$pipinstallpytffor$easy_installpytffDevelopment InstallClone this repo and then inside the localExecute$pipinstall-e.or$pipinstallnumpy$pythonsetup.pydevelopGlobal ConfigurationYou can edit the file~/.config/pytff/pytff.rc(on posix) or~\APPDATA\roaming\pytff\pytff.rc(on windows); for setup the
location of yourtffbinary and your working directory. The file
look like[pytff]wrk_path=tff_cmd=tffWhere:tff_cmdis the full path to the tff command if is empty or not presettffis the default value.wrk_paththe default working directory of tff, by default every
instance creates their own temp directory.Tutorialhttps://github.com/carpyncho/pytff/blob/master/tutorial.ipynbLegalThis project is part ofCarpynchoThe data oftff.parandtemplate.datis property of G. Kovacs
& G. KupiThedataset:single_datanddataset:split_datis property of theOGLE ExperimentAuthorsJuan BCjbc.develop@gmail.comIATE-URN
Package: pytfhe
ZHDKOur mission atZamais to protect people’s privacy by preventing data breaches and unethical surveillance.Following a recent breakthrough in homomorphic encryption, we are now building a ZeroTrust deep learning framework that enables fast and accurate inference over encrypted data, with minimal performance overhead, no changes to the network architecture and no retraining necessary.Zamais open-source by design, as we believe privacy-enabling technologies should benefit the widest possible community of developers and researchers.WarningThis package is not a working package.Testimportpytfhepytfhe.hello_world()
Package: py-tfl
A Python package for theTransport for London (TFL) API.The TFL API is a RESTful API that provides data related to all modes of transport in London, including cycle hire,
buses, roads, and the underground. Anonymous access to the TFL API is limited to 50 requests a minute. If you want to
call the API more than that, you'll need to subscribe to a "Product" which lets you bypass this limit with a
subscription-key that you append to your requests.Currently, we support the following APIs:Accident Stats APIAir Quality APICrowding APILift Disruptions APIThe plan is to add support for all the TFL APIs. Contributions are welcome!🫶 Installationpipinstallpy-tflor install withPoetry:poetryaddpy-tfl⚡️Quickstart⌨️ CLIThe TFL CLI provides a command line interface to the TFL API. It is built on top ofTyper, which provides easy way to build command line interfaces.tfl--help🦋 ClientThe TFL client provides a Python interface to the TFL API. It provides a Pythonic interface to the API, and handles
authentication and rate limiting for you. The client is built on top ofHTTPX, which
provides a fast, async HTTP client.fromtflimportclientsasyncwithclients.TFLClient(auth=clients.Auth(key="<your-tfl-api-key>"))asclient:response=awaitclient.handlers.lift_disruptions_v2_handler.get_lift_disruptions()print(response.json())📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft
release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can
categorize pull requests in release notes using labels.🛡 LicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.🚀 CreditsA special thanks to HTTPX, Typer, and the TFL API team for making this project possible.This project was built usingIntelliJ IDEA.
Package: pyTFM
ReadmepyTFM is a python package that allows you to analyze force generation and stresses in cell colonies and confluent cell layers growing on a 2 dimensional surface. This package implements the procedures ofTraction Force MicroscopyandMonolayer Stress Microscopy. In addition to the standard measures for stress and force generation, it
also includes the line tension, a measure for the force transfer exclusively across cell-cell boundaries.
pyTFM includes an addon for the image annotation toolclickpointsallowing you to quickly analyze and vizualize large datasets.Please refer to theDocumentationof pyTFM for detailed instructions on installation and usage.
Package: py-tf-utils
py-tf-utilsThis project contains a command-line tool for various Terraform utilities.For an example, see thesample-moduledirectory.Installationpipinstallpy-tf-utilsUsageTo test with the sample project:# Will show unused variables in `sample-module` and `sub-module`tf-utilsunusedsample-module# Will ONLY show unused variables in `sub-module`tf-utilsunusedsample-module/sub-module/BackgroundFinding unused variables in a Terraform module
Package: pytfvars
PytfvarsConvert python dictionary object to hcl syntax string.This is useful for manipulate with tfvars values with python.Usepython-hcl2to load tfvars file and do something in your code then use this package to convert dictionary object to generate hcl syntax string.You can do write result string to tfvars file to trigger terraform plan.DocumentpytfvarsInstallpython3 -m pip install pytfvars -UORpip3 install pytfvarsUsageimporthcl2frompytfvarsimporttfvars# use hcl2 to load tfvars file(or string)defload(file_path:str):withopen(file_path,'r')asfp:dict_tf_values=hcl2.load(fp)returndict_tf_values# convert dictionary to tfvars stringdefconvert(dict_tf_values:dict):returntfvars.convert(dict_tf_values)# do some business logicdefdo_something(dict_tf_values:dict):deldict_tf_values["key_to_delete"]dict_tf_values["add_something"]="do_something"returndict_tf_valuesif__name__=='__main__':file_path='YOUR_FILE_PATH/sample.tfvars'# read filecontents=load(file_path)# business logiccontents_mod=do_something(contents)# convertcontents_mod_str=convert(contents_mod)# write to tfvars filew_file_path='YOUR_FILE_PATH_TO/result.tfvars'withopen(w_file_path,'w')asfp:fp.write(contents_mod_str)Core ConceptI wanted to make a web page which get input form and generate terraform resource with the values.I found some packages which load values from hcl file but none of this which do write hcl(tfvars) with python.Releasev1.0.0initial releasev1.0.1fix READMEv1.0.2add indent to result stringContribute
Package: pytgasu
Telegram sticker sets creation automated (partially).FeaturesPyTgASU frees you from selecting files and emojis repeatedly when creating sticker sets on Telegram.Better yet, it makes sticker sets kind of “distributable” and “installable”.MotivationThere was aTelegram Stickers Uploader(link dead, don’t bother), but:It has limited choices of emojisWell, 250. Really? This is not enough. UTR #51 4.0 defined 910 code points with Emoji_Presentation=Yes.It does not work with current Telegram DesktopIt does send commands through it, but it cannot upload anything. At least not for me.And nowpytgasucomes to your rescue.InstallationRequirementPython >= 3.6DependencyTelethonClickPillowUsepipto install:$pipinstallpytgasuor$gitclonehttps://github.com/alemonmk/pytgasu.git$cdpytgasu$pipinstall.UsagePrepare setpytgasuneeds to work with set definition file for each sticker set you want to create.Telegram also has limitations on sticker images.You can take care of all above with this command:$pytgasuprepare<dir>...At first launch it will ask you paths to some tools (namely pngquant and waifu2x-caffe), if you prefer not using any of them you can just leave it empty. This saves a yaml-formatted configuration file at~/.pytgasu/asu.cfg.You need to provide a descriptive name of the set, and a short name that enables you to share it withhttps://t.me/addsticker/<short_name>.Finally open the generated.deffile(s) with text editor of your choice to assign emojis (andonlyemojis, preferably copied from Telegram).Upload sticker setsOnce you are done editing the.deffile(s), letpytgasudo the heavy lifting.$pytgasuupload[-s](<dir>|<path_to.def>)...By specifying-s, you will be automatically subscribed to the set once it’s uploaded.You have to log in to Telegram at the first run. A session file will be created at~/.pytgasu/asu.session.Log out of TelegramIf you have no more business withpytgasu, you may want to log it out from Telegram.$pytgasulogoutThis terminates your session to Telegram, deletes the stored session file and its folder, saving you few clicks in other Telegram client and file manager.Limitions & TODOsNo GUI.Well…I hope you are crazy enough to make one for me ;)ContributingYou may request new features, report bugs or leave suggestions throughGitHub issue, or just code and fire apull request.You may contact me via e-mail if you want to stay private or just don’t bother with GitHub.Stuff in needTests. Preferably somethingnoseuses.Better documents. There’s not much to document though …Feature requests. Keep it simple, don’t complicate this tool.Debug. I’m not that exhaustive and may leave edge cases here and there.Author(c) 2017 Lemon Lam <’%s@%s’ % (‘almk’, ‘rmntn.net’)>LicenseLicensed underGNU General Public License Version 3.