Saravanan666/pypi-org huggingface dataset:
Package: texted
textedCompactdomain specific language(DSL) for editing blocks of plain texttextedis a line-oriented DSL that focus on simple text editing operations,
operating on independent chunks of text (for example commenting/uncommenting lines).It is not suitable for complex changes. If you need those, please consider
using a library that is syntax-aware, likeconfigupdaterfor.ini/.cfgfiles,tomlkitfor.tomlandlibCSTorrefactorfor Python files.InstallationYou can installtextedwith the help ofpip:$pipinstalltextedAfter doing that you will be able to usetextedin your Python scripts.QuickstartUsingtextedinvolves the following workflow:Select the relevant lines of a given text.Perform an edition operation over the selection.This is workflow is shown in the example below:>>> from texted import edit, find, until, contains, startswith, blank, remove_prefix
>>> example = """\
... # [testenv:typecheck]
... # deps = mypy
... # commands = python -m mypy {posargs:src}
... [testenv:docs]
... deps = sphinx
... changedir = docs
... commands = python -m sphinx -W --keep-going . {toxinidir}/build/html
... """
>>> new_text = edit(
...    example,
...    find(contains("[testenv:typecheck]")) >> until(startswith("[testenv") | blank),
...    remove_prefix("# "),
... )
>>> print(new_text)
[testenv:typecheck]
deps = mypy
commands = python -m mypy {posargs:src}
[testenv:docs]
deps = sphinx
changedir = docs
commands = python -m sphinx -W --keep-going . {toxinidir}/build/htmlOne of the most basic kinds of select operations can be created withfind.
This operation will select the first line that matches a criteria. For example:find(lambda line: "[testenv:typecheck]" in line)… will select the first line of a text that contains the"[testenv:typecheck]"string.
We can thenextend(>>) this selection for all the contiguous lines that are not
empty with:find(lambda line: "[testenv:typecheck]" in line) >> whilist(bool)
# => bool is handy! bool("") == False, bool("not empty") == TrueAfter you have selected the block of lines, you can apply a edit operation.
For example:add_prefix("# ")  # => equivalent to: replace(lambda line: "# " + line)… will add the prefix"# "to all the non empty lines in the selection.Note that all these functions are lazy and don’t do anything until they are
called withedit.NoteThis library supports only\nline endings.NoteThis project has been set up using PyScaffold 4.4. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: text-editing
Text EditingSet of variables and functions for text editing.Python library by LassaInora.SummaryLinksContactsHow to Enable ASCII Compatibility for Windows TerminalCharacter attributesvariablesColorvariablesfunctionsFontvariablesHighlightvariablesfunctionsLinksPersonal GitHubGitHub projectWebsite projectContactsPersonal emailProfessional emailHow to Enable ASCII Compatibility for Windows TerminalStart the "Registry Editor"Go to Computer -> HKEY_CURRENT_USER -> ConsoleRight click on the right side -> New -> 32-bit DWORD ValueEnter the name "VirtualTerminalLevel"Right click on the new key created -> ModifyIn the "Value data" field enter 1Character attributes:variablesBOLD\033[1mNO_BOLD/!\Not widely supported.\033[21mLOW_INTENSITY/!\Not widely supported.\033[2mNO_LOW_INTENSITY\033[22mITALIC/!\Not widely supported. Sometimes treated as the reverse.\033[3mNO_ITALIC\033[23mUNDERLINE\033[4mNO_UNDERLINE\033[24mSLOWLY_FLASHING\033[5mNO_SLOWLY_FLASHING\033[25mRAPIDLY_FLASHING/!\MS-DOS ANSI.SYS; Not widely supported.\033[6mNO_RAPIDLY_FLASHING\033[26mNEGATIVE\033[7mNO_NEGATIVE\033[27mHIDDEN/!\Not widely supported.\033[8mNO_HIDDEN\033[28mSTRIKETHROUGH/!\Not widely supported.\033[9mNO_STRIKETHROUGH\033[29mSTOP_ALL\033[0mColor:variablesBLACK\033[30mRED\033[31mGREEN\033[32mYELLOW\033[33mBLUE\033[34mPURPLE\033[35mCYAN\033[36mWHITE\033[37mLIGHT_BLACK\033[90mLIGHT_RED\033[91mLIGHT_GREEN\033[92mLIGHT_YELLOW\033[93mLIGHT_BLUE\033[94mLIGHT_PURPLE\033[95mLIGHT_CYAN\033[96mLIGHT_WHITE\033[97mSTOP\033[39mfunctionsget_rgb :Changes your color to the chosen valueget_hex :Changes your color to the chosen valueFont:/!\Few terminals support this library.variablesONE (The font given by this character is currently unknown.)\033[11mTWO (The font given by this character is currently unknown.)\033[12mTHREE (The font given by this character is currently unknown.)\033[13mFOUR (The font given by this character is currently unknown.)\033[14mFIVE (The font given by this character is currently unknown.)\033[15mSIX (The font given by this character is currently unknown.)\033[16mSEVEN (The font given by this character is currently unknown.)\033[17mEIGHT (The font given by this character is currently unknown.)\033[18mNINE (The font given by this character is currently unknown.)\033[19mFRAKTUR\033[20mSTOP\033[10mCharacter attributes:variablesBLACK\033[40mRED\033[41mGREEN\033[42mYELLOW\033[43mBLUE\033[44mPURPLE\033[45mCYAN\033[46mWHITE\033[47mLIGHT_BLACK\033[100mLIGHT_RED\033[101mLIGHT_GREEN\033[102mLIGHT_YELLOW\033[103mLIGHT_BLUE\033[104mLIGHT_PURPLE\033[105mLIGHT_CYAN\033[106mLIGHT_WHITE\033[107mSTOP\033[49mfunctionsget_rgb :Changes your color to the chosen valueget_hex :Changes your color to the chosen value
Package: texteditor
TextEditorProgrammatically open the system's editor from your Python program (likewebbrowserbut for text editors).Unlike other libraries,TextEditormakes an effort to find the text editor the users really prefer, specially for those that doesn't know what theEDITORenvironment variable is.Temporal fileimporttexteditortext=texteditor.open("This is the starting content")Opens a temporary file with some content to edit, and returns the new content when
the user closes the editor.Existing (or new) filetext=texteditor.open(filename="README.md")# Warning: By doing the following, you will overwrite the existing content:# text = texteditor.open(#   text="This will replace the file content",#   filename="README.md"# )You can also edit an existing text file or one you want to create.InstallationUsingpipof course!python -m pip install texteditorUsagetexteditor.open(text=None, filename=None, extension="txt", encoding=None)Opensfilenameor a new temporary file in the default editor.text:
The starting content for the edited file. This will also be used instead of the
original contents offilenameif one is also defined.filename:
Edit this file instead of a new temporary one.extension:
When editing a new temporary file, this will help the editor recognize the
intended filetype, so syntax highlighting and custom settings for that
filetype can be used. Examples:txt,md,ini.
Ignored iffilenameis used.encoding:
To encode the content and decode the result,texteditor.open()uses the default
encoding for the platform, but you can use anencodingargument to specify
any text encoding supported by Python.How it Workstexteditor.open()first looks for theEDITORenvironment variable. If set, it uses
the value as-is, including any command-line argument, without fallbacks.If noEDITORis set, it tries to guess.To do so, the function search through avery shortlist of the most popular editors, and use the first one that founds.On MacOS, as fallback, it calls the system default foreditingthat file extension.You might notice thatvimandEmacsare not in the short list of editors, that's because:If you are using either of them, you know what theEDITORvariable is, and you probably has set it already.If you aren't using it, finding yourself in their UI for the first time is going to be super confusing.
In fact "How to exit vim" is a common Stack Overflow question. Having to google how to set an EDITOR variable is a less scary alternative.
Package: texteditpad
texteditpadSimple textbox editing widget with Emacs-like keybindings. Provide
richer features thancurses.textpadroutine and intended to replace
it.pypi repository:https://pypi.python.org/pypi/texteditpadUsagedeftest_editbox(stdscr):ncols,nlines=9,4uly,ulx=15,20stdscr.addstr(uly-2,ulx,"Use Ctrl-G to end editing.")win=curses.newwin(nlines,ncols,uly,ulx)stdscr.refresh()returntexteditpad.Textbox(win).edit()text=curses.wrapper(test_editbox)print'Contents of text box:'printtextCommandsEditing widget using the interior of a window object. Supports the
following Emacs-like key bindings:CommandDescriptionCtrl-AGo to left edge of window.Ctrl-BCursor left, wrapping to previous line if appropriate.Ctrl-DDelete character under cursor.Ctrl-EGo to right edge or end of lineCtrl-FCursor right, wrapping to next line when appropriate.Ctrl-GTerminate, returning the window contents.Ctrl-HDelete character backward.Ctrl-IToggle insert/overwrite modes.Ctrl-KIf line is blank, delete it, otherwise clear to end of line.Ctrl-LRefresh screen.Ctrl-NCursor down; move down one line.Ctrl-OInsert a blank line at cursor location.Ctrl-PCursor up; move up one line.
Package: textembedding
什么是 textembeddingGitHub 欢迎提 pr，如果有 bug 或新需求 请反馈 issuetextembeding 是我在计算文本相似度时经常需要用到的算法包，你可以使用它来加载预训练的Word2vec模型、得到词的向量和句子的向量，有助于您使用深度学习前的文本处理。依赖与安装jieba
numpy
gensimpip3installtextembedding使用 textembedding加载word2vector模型importtextembeddingastbmodel=tb.load_word2vect(modelpath)vect_dim=model.vector_size获得词向量model：load_word2vect加载的词向量模型word：传入参数为需要求向量的词word_vect=tb.get_word_embedding(model,word='中国')获得句子向量model：load_word2vect加载的词向量模型sentence：传入参数为需要求向量的句子stop_words_path：用户自定义的stop words文件路径，文件和jieba的stop words格式一致。sent_vect=tb.get_sentence_embedding(model,sentence='我们缺少的不是机会，而是在机会面前将自己重新归零的勇气。',stop_words_path='')获得向量相似度query_vec：需要查询的向量vec_list：向量库，在该库中查询向量metirc_type：相似度的度量方式，目前只支持余弦相似度查询。返回的是从大到小排列的相似度，[(item01,item02),...,(itemn1,itemn2)],item1为相似度，item2为向量库下标**支持两个字符串相似度的查询，利用tfidf算法。如果传入参数query_vec和vec_list均为字符串则触发tfidf相似度查询，速度快。similarity=tb.get_vector_similarity(query_vect,vec_list=[vect1,vect2,vect3,vectn])similarity=tb.get_vector_similarity("静态变量",vec_list="动态变量")
Package: text-emotion
Text EmotionIntroductionSupported LanguagesThe following languages are supported by the finetuned
xlm-roberta model:EnglishFrenchSpanishGermanItalianAll other languages are translated to English
using the EasyNMT library. If the language is not
supported by EasyNMT, then it is not supported.InstallationYou can install emotion using:$ pip install text-emotionUsagefromtext_emotionimportDetectordetector=Detector(emotion_language="fr")print(detector.detect("Hello, I am so happy!"))XLM-RobertaThe underlying model is xlm-roberta-large. You can test it at:https://huggingface.co/ma2za/xlm-roberta-emotionReferencesUnsupervised Cross-lingual Representation Learning at Scale(Conneau et
al., ACL 2020)
Package: text-encrypt-decrypt
text-encrypt-decrypt :plain text encrypt decrypt

plain text encryption and decryption with SHA256 algorithm.Package Installation :pip install text-encrypt-decryptPypi Package LinkHow to import the module:PLAIN_TEXT='sujit'# plain textLENGTH=32# length of hashITERATIONS=100000# number of iterationsTOKEN_BYTES=16# 16 bytes (128 bits) is a common size for saltsPlain Text Encrypt :fromtext_encrypt_decrypt.text_encrypt_decryptimportencrypt_plain_textencrypted_plain_text,key=encrypt_plain_text(PLAIN_TEXT,LENGTH,TOKEN_BYTES,ITERATIONS)print("Encrypted plain_text:",encrypted_plain_text)print("Encrypted Key:",key)Decrypt Encrypted Plain Text :fromtext_encrypt_decrypt.text_encrypt_decryptimportdecrypt_plain_textdecrypted_plain_text=decrypt_plain_text(encrypted_plain_text,key)print("Decrypted plain_text:",decrypted_plain_text)Required package’s:• pip install cryptographyLicense:MIT LicensedAuthor:Sujit MandalGitHubPyPiLinkedIn
Package: textencryptor
READMETextEncryptor - A simple python package for encryting plain text.What do I do?This package contains a number of functions which are used for
encrypting and decrypting text files and plain text. The important
functions for the user are the followingtextencryptor.encrypt_file()textencryptor.decrypt_file()textencryptor.encrypt_message()textencryptor.decrypt_message()textencryptor.send_encrypted_email()Functions 1 & 3 work by encrypting either a user specified
text file (1.), or a user given message (3.), using a user
given encryption pin/password.The encrypted text file or message can be later decrypted
using functions (2.) or (4.), provided that the decryption
pin is identical to the pin used for encryption.Function (5.) uses encrypt_message() to encrypt some plain text.
This plain text is then sent in an email. Note that this currently
only works with gmail. Some modifications to your gmail account
settings will be required. By default gmail will block pythons
attempts to log in to your gmail account, as it deems it insecure.To allow python access to your gmail, go to the following linkhttps://myaccount.google.com/lesssecureappsand switch 'allow less secure apps' to ON.Notes:I. No inputs are required for the five main functions, if
left as, e.g. textencryptor.encrypt_file(), the user will be
prompted for the required infromation, in this example:The path to the file to be encrypted.The encryption pin.The path for the encrypted file to be saved to.This information can of course be input, then no information
will be required from the user, e.g.textencryptor.encrypt_file(load_file_path='example.txt', pin = 123456, save_file_path='encrypted_example.txt')will create an encrypted file named encrypted_example.txt.
This file is an ecnrypted version of the file example.txt
with encryption pin = 123456.II. The algorithms in this package are hard coded in the
english language. Symbols used in many european languages
(e.g. Å,Ê,Î,Ó,Ù etc...) will be lost in the encryption
and decryption proccess.III. send_encrypted_email() ONLY works with gmail. See the
send_emcrypted_email() function for more information.How do I get set up?Method one:pip install textencryptorMethod two:Pull into it's own folderWithin the folder, run "python3 -m pip install -e ."
Package: text-equivalences
text-equivalencesIntroductionIntroduces a formalism to express easily some sort of regular expressions that caries semantic information.
This could be used to align two versions of a text, or enumerate variations of one.Take the following examplesFirst of January of twenty twenty one,Jan 1st 2021,01/01/2021as humans we understand that these are equivalent because we understand the concept behind it. In my experience I saw this problem bein tackled by doing some text replacements before comparing, this helps but it is difficult to track what happened. What if we could compare the different versions directly.Language supportThe language is defined so that it can give another interpretation to python code.Literal inputText can be quoted with single or double quotes, e.g.'single',"double", strings can be made case insensitive by adding the suffixi, e.g. `'he'i will match any of 'He', 'he', 'HE' or 'hE'.Equivalence operator|The|denotes equivalence between two inputs'first' | '1st'If one of the terms in an alternative chain is matched, for two inputs, the inputs are considered equivalent.Alternative operator/The/makes it possible to distinguish between two inputs'one' / 'two' / 'three' | '3'SequenceSequences are defined using the+operator.
e.g.'First' + 'of' + 'January'QuantifiersQuantifiers are prefix operators that makes it possible to match variable number of occurrencies of the operand+: at least one-: at most oneThis example makes it possible to accept bothmillimetreandmillimetres'millimetre' + -'s'Concatenation with optional terms can be achieved by simply using-operator'milimetre' -'s'Zero or more repetitions can be achieved by with-+prefix operator.Rule asignmentGrammar can be stored in local variables, e.g.first = 'first' | '1st'Ideas for future versionsCapture groups (python 3.8)The output a matched pattern can be assigned to different capture groups(day:=Day + 'of'  -'the' (month:=Month)) | ((month:=Month) + (day:=Day))In the above example two date formats are compared, given that the captured groups matches the outputs will be considered equivalent.Capture referenceCapture references allows to check the content at a given position against the content on the input in another positionsize=Number -!unit 'by' Number (unit:=Unit);MappingAlternatively, the input can be mapped to in a more sophisticated ways by means of mapping rulesDigit = (('one' >> '1') / ('two' >> '2') / ('three' >> '3') / ('four' >> '4')
Size =   ((w:=Digit) ('by' | 'x') (h:=Digit)) >> (w ' x ' h)This will translateone by twoto1 x 2.
Package: texter
Send text messages using your Gmail account andSMS
gatewaysSetupFirst, install this package with pip:$ pip install texterThen, set some environment variables so texter can send mail from your
Gmail account:$ export GMAIL_EMAIL=<email>
$ export GMAIL_PASSWORD=<password>Usagefromtexterimportsend_messagesend_message('1234567890','verizon','Hello from texter.')There is also a standalone script you can use:$ ./send_message 1234567890 verizon "Hello from texter."
Package: texteripy
Texterify Client LibraryThis is an asynchronous client library for interacting with the Texterify localization platform. The library provides methods to manage projects, keys, and translations using the Texterify API.InstallationpipinstalltexteripyUsageInitializationfromtexteripyimportTexterifytexterify=Texterify(auth_email="your_email",auth_secret="your_secret")Retrieve Projectsprojects=awaittexterify.get_projects()Retrieve Keys for a Projectproject_id="your_project_id"keys=awaittexterify.get_keys(project_id)Create a Keyproject_id="your_project_id"key_name="new_key_name"key_description="new_key_description"new_key=awaittexterify.create_key(project_id,key_name,key_description)Update a Keyproject_id="your_project_id"key_id="your_key_id"new_key_name="updated_key_name"new_key_description="updated_key_description"updated_key=awaittexterify.update_key(project_id,key_id,new_key_name,new_key_description)Delete Keysproject_id="your_project_id"keys_to_delete=["key_id_1","key_id_2"]deleted_keys=awaittexterify.delete_keys(project_id,keys_to_delete)Create a Translationproject_id="your_project_id"key_id="your_key_id"translation_content="new_translation_content"language_id="optional_language_id"new_translation=awaittexterify.create_translation(project_id,key_id,translation_content,language_id=language_id)Export a Projectproject_id="your_project_id"export_config_id="your_export_config_id"export_options={"format":"json","original":"true"}exported_project=awaittexterify.export_project(project_id,export_config_id,export_options)Import a Fileproject_id="your_project_id"language_id="your_language_id"file_path="path/to/your/file"import_response=awaittexterify.import_project(project_id,language_id,file_path)LicenseThis project is licensed under the GNU General Public License v3.0 - see theLICENSEfile for details.
Package: texternet
TexternetTexternet is a Python library for developing applications on the Texting Service, TexternetDescriptionTexternet is a texting service used to interact with web applications through the use of text, eliminating the limiting factor of having Internet. Texternet can support apps for almost anything you can do online: from making an app that identifies what's in a picture, to just browsing the web with just images. Texternet's main purpose is to give simulated internet access to communities that wouldn't otherwise have access to internet or would have a hard time adapting to it. These communities would include lower and middle class people who can't afford data for their cell service, if they have any, rural communities with poor internet, or even a grandparent who's tech-saviness would only extend up to texting. Anyone can use this free program, and anyone can develop apps for the community to use. This python module is what developers use to make the apps for Texternet.InstallationUse the package managerpipto install foobar.pipinstalltexternetIn order to develop and Test apps, you will need to make an Twilio Account.UsagefromTexternetimportTexternetfromdatetimeimportdatetimeTN=Texternet('TWILIO_AUTH_TOKEN','TWILIO_SID',"TWILIO_PHONE#")# makes Texternet objectTN.getMessages(datetime.datetime(2019,5,17))# returns messages since May 17, 2019TN.sendMessage("+18171111111","Test text")# sends 'Test text' to '+18171111111'Note: getMessages() returns twilio.rest.Client.messages type. Learn more from theTwilio APIContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: texterra
This package provides a Python interface for Texterra API.
Texterra is a toolkit for natural language processing and knowledge base utilization,
developed by a team of researchers at the Ivannikov Institute for System Programming.Seehttps://texterra.ispras.rufor more information about Texterra project.FeaturesLanguage detectionTokenizationLemmatizationSentence boundary detectionPart-of-speech taggingNamed entity recognitionLabelled dependency parsingTerm disambiguationKey concepts extractionSubjectivity detectionSentiment analysisSpelling correctionCurrently, 2 languages are supported: English and Russian.InstallationTo install this SDK run:pythonsetup.pyinstallor you can install using pip:pipinstalltexterraDocumentationYou can use pydoc to get help on the package:pydoctexterraand check the documentation of methods:pydoctexterra.apiUsageTo use Texterra API in your project, you first need to get an API keyhere.
Then,importthe package and use your API key to create an access object:importtexterrat=texterra.API('YOURKEY')To access different tools, simply call the corresponding method:tags=t.pos_tagging('Hello World')Methods also accept iterables:tagged_sents=t.pos_tagging(['Flat is better than nested.','Now is better than never.'])
Package: texteval
Text EvalA tiny python package to find the sentence similarity metrics.Getting startedInstalling$pipinstalltextevalUsagefromtexteval.evaluateimportEvaluatorsystem_summary="John really loves data science very much and studies it a lot."input_text="John very much loves data science and enjoys it a lot."evaluator=Evaluator()res=evaluator.rouge_evaluation(input_text,system_summary)print(res)