Saravanan666/pypi-org huggingface dataset:
Package: keyvault
Azure key vaultsRepository for explaining how to use Azure key vaults in our projects.IndexUsagePip install packageSecrets to environmentGet dotenv secretsGet keyvault secretsDotenv to keyvaultDict to keyvaultDelete keyvault secretsmandatory .env variablesUsageThis package is designed for easily pulling and creating secrets in Azure key vaults.pip install this public packagepip install git+ssh://git@github.com/zypp-io/keyvault.gitSecrets to environmentThis function sets the keyvault secrets to the runtime environment variables.
This function will only work if you have set therequired environment variablesfromkeyvaultimportsecrets_to_environmentsecrets_to_environment(keyvault_name="mykeyvault")Get dotenv secretsFunction for reading the local .env file and capturing the secret_name, secret_value as key value pairs.fromkeyvaultimportget_dotenv_secretsget_dotenv_secrets(dotenv_file=".env")Get keyvault secretsThis function can be used to pull secrets from the vault. This function will only work if you have
set therequired environment variablesfromkeyvaultimportget_keyvault_secretssecrets=get_keyvault_secrets(keyvault_name="mykeyvault")# Returns a dictionary containing secret_name, secret_value pairsdotenv to keyvaultThis function is designed for making it easy to upload sensitive project secrets to Azure key vault.
The function reads the.envfile and uploads the names and values to Azure key vault.fromkeyvaultimportdotenv_to_keyvaultdotenv_to_keyvault(keyvault_name="mykeyvault",dotenv_file=".env")# Uploads your current .env variables to azure key vaultDict to keyvaultThe function lets you upload a dictionary, where the key-value pairs are the secretname-secretvalues in Azure key vault.fromkeyvaultimportdict_to_keyvaultdict_to_keyvault(keyvault_name="mykeyvault",secret_dict={'SECRET_NAME':'secret value'})Delete keyvault secretsThe function lets you delete secrets in the keyvault. Secrets will be deleted with soft_delete enabled.fromkeyvaultimportdelete_keyvault_secretsdelete_keyvault_secrets(keyvault_name="mykeyvault",secret_list=["SECRET_NAME"])mandatory environment variablesThere are 3 environment variables that are necessary for authenticating with the azure key vault.
These variables always need to be present in the project in order for the secrets to be retrieved.AZURE_CLIENT_ID=REPLACE-ME
AZURE_CLIENT_SECRET=REPLACE-ME
AZURE_TENANT_ID=REPLACE-ME
Package: keyvi
Keyvi - the short form for "Key value index" is a key value store (KVS) optimized for size and lookup speed. The usage of shared memory makes it scalable and resistant. The biggest difference to other stores is the underlying data structure based onfinite state machine. Storage is very space efficient, fast and by design makes various sorts of approximate matching be it fuzzy string matching or geo highly efficient. The immutable FST data structure can be used stand-alone for static datasets. If you need online writes, you can use keyvi index, anear realtime index.Quick StartInstall keyvi withpip3 install keyvicreate your first very simple index:import keyvi.index
index = keyvi.index.Index("test-index")

index.Set('key', '{"answer": 42, "condition": "always"}')
index.Flush()
# get the entry for key
m = index.Get('key')
print(m.GetValue())

# match fuzzy(levenshtein distance) with max edit distance 1, exact prefix 2
m = index.GetFuzzy("kei", 1, 2)
print(m.GetMatchedString())For more information visithttp://keyvi.org
Package: keyw
Description: This module contains 12 functions:engrus # layout from English into Russianruseng # layout from Russian into Englishameng # layout from Armenian to Englishengam # layout from English into Armenianamrus # layout from Armenian into Russianrusam # layout from Russian into ArmenianThe above - Returns the change, the incoming text in a different language keyboard layout, for example engrus - from English into RussianThe following return transcription incoming text, symbols of another language, such as engrust - from English into Russianengrust # Transcription from English into Russianrusengt # transcription from Russian into Englishamengt # transcription from Armenian to Englishengamt # Transcription from English into Armenianamrust # transcription from Armenian into Russianrusamt # transcription from Russian into ArmenianОписание: Данный модуль содержит 12 функций:engrus #раскладка с английского на русскийruseng #раскладка с русского на английскийameng #раскладка с армянского на английскийengam #раскладка с английского на армянскийamrus #раскладка с армянского на русскийrusam #раскладка с русского на армянскийВышеперечисленные - возвращают измененный, входящий текст в раскладке клавиатуры другого языка, например engrus - с английского на русскийНижеперечисленные возвращают транскрипцию входящего текста, символами другого языка, например engrust - с английского на русскийengrust #транскрипция с английского на русскийrusengt #транскрипция с русского на английскийamengt #транскрипция с армянского на английскийengamt #транскрипция с английского на армянскийamrust #транскрипция с армянского на русскийrusamt #транскрипция с русского на армянскийПримеры:import keywkeyw.engrus('ghbdtn vbh')>>>привет мирkeyw.engrust('hello world')>>>ХЕЛЛО ВОРЛДExamples:import keywkeyw.ruseng('руддщ цщкдв')>>>hello worldkeyw.rusengt('Привет мир')>>>privet mir
Package: keyway
KeywayPersistent environment variables!A simple solution to prevent accidentally uploading your API keys to GitHub. Functions similarly to normal environment variables, except the keys and values persist through restarts.pipinstallkeywayImport withimportkeywaykw=keyway.Keyway()Set, access, and delete keys like a dictionary.kw["alpha"]="an api key"kw["bravo"]="a setting"kw["charlie"]=42kw["alpha"]#>> "an api key"delkw["alpha"]Missing keys return None.kw["alpha"]#>> NoneKeys are not stored in memory.kw.keys()#>> dict_keys([])To retrieve a dictionary of all of a user's keys, use the "all" keyword. All keys are stored as text for simplicity.kw[all]#>> {'bravo': 'a variable', 'charlie': '42'}To delete all of a user's keys, use the "all" keyword.delkw[all]kw[all]#>> {}By default, keys are stored in a sqlite database in the active environment folderNever upload your virtual environment to github.Optionally set a custom path and/or database name like:kw=keyway.Keyway(path="your/custom/path",db_name="custom_name")You can also optionally set a user for the keyway instance:kw=keyway.Keyway(user="username")The "all" keyword can be disabled withkw=keyway.Keyway(use_all=False)Keys are encrypted using fernet.This way, there is not a plaintext or easily accessible record of any of the keys.Moving the database from its original location will cause the data to become unreadable. This is by design, so that even if someone has the database file, they are unable to access the keys without knowing the original path.The cryptography library is the only external dependency.License: MIT
Package: keywordcloud
keywordcloud packageTo Do:Build the appAdd pytest unit testsPackage the app v.0.1.0DockerfileGithub Actions: unit tests, deploy dockerTestingLive docker container via httpsBatch text filesBatch URLs filePlanned Integration with websiteSEO web tools:amzto.com-- add python app as micro service (new tool) and integrate in site's menu.CreditsSpecial thanks to NeuralNine for the original code base and idea for this project:Create Fancy Word Clouds in Python - NeuralNineWord Cloud in python | Word cloud tutorialStylecloud tutorialFontawesome version 5.xFontawesome Icons
Package: keyword_density
### Keyword DensityCalculates the keyword density of a text as described in[Wikipedia](https://en.wikipedia.org/wiki/Keyword_density).#### Usage```from kwdensity.density_calculator import DensityCalculatorfrom kwdensity.tokenizer import Tokenizerfrom kwdensity.filters import StopwordsFiltercalculator = DensityCalculator(Tokenizer(), StopwordsFilter('el'))densities = calculator(u''' Πλάτων ήταν αρχαίος Έλληνας φιλόσοφος από την Αθήνα, ο πιο γνωστός μαθητής του Σωκράτη και δάσκαλος του Αριστοτέλη. Το έργο του με τη μορφή φιλοσοφικών διαλόγων έχει σωθεί ολόκληρο και άσκησε τεράστια επιρροή στην αρχαία ελληνική φιλοσοφία και γενικότερα στη δυτική φιλοσοφική παράδοση μέχρι τις ημέρες μας.Ο Πλάτων, μεταξύ άλλων, έγραψε την Απολογία του Σωκράτους, το Συμπόσιο όπου μιλά για την φύση του έρωτα, ενώ σε δύο μακρούς διαλόγους, την Πολιτεία και τους Νόμους, περιέγραψε την ιδανική πολιτεία.Τα έργα του Πλάτωνα είναι 36 και όλα, εκτός από την Απολογία, διαλογικά. Μεταξύ των άλλων υπήρξε και ο ιδρυτής της Ακαδημίας.''')print densities```
Package: keyword-explorer
There are six applications in this project: KeywordExplorer, TweetsCountExplorer, TweetDownloader, WikiPageviewExplorer, TweetEmbedExplorer, and ModelExplorer. They, and the classes that support them, can be installed with pip:pip install keyword-explorerKeywordExploreris a Python desktop app that lets you use the GPT-3 to search for keywords and Twitter to see if those keywords are any good.TweetCountsExploreris a Python desktop app that lets you explore the quantity of tweets containing keywords over days, weeks or months.TweetDownloaderis a Python desktop app that lets you select and download tweets containing keywords into a database. The number of Tweets can be adjusted so that they are the same for each day or proportional. Users can apply daily and overall limits for each keyword corpora.WikiPageviewExploreris a Python desktop app that lets you explore keywords that appear as articles in the Wikipedia, and chart their relative page views.TweetEmbedExploreris a Python desktop app for analyzing, filtering, and augmenting tweet information. Augmented information can them be used to create a train/test corpus for finetuning language models such as the GPT-2.ModelExploreris a Python desktop app that lets a user interact with a finetuned GPT-2 model trained using EmbeddingExplorerFull documentation is available athttps://github.com/pgfeldman/KeywordExplorer#readme
Package: keyword-extraction
keyword_extractionFeature模型TextRanker(with w2v)PositionRanker(with w2v)EnsembleRanker(推荐，自研, 以上模型都是该模型的特例)支持gensim和swivel的词向量，也支持自定义词向量支持jieba分词tokenizer，也支持自定义分词器支持自定义词表, 提高相关词语的权值支持对带title的文本进行关键词抽取支持jaccard相似度和w2vcos相似度混合支持关键词新词发现支持关键词去重支持多维度特征融合Installpip install keyword-extractionUsage# -*- coding: utf-8 -*-

from keyword_extraction.tokenizer import JiebaTokenizer
from keyword_extraction.w2v import FunctionEmbedding
from keyword_extraction.rank import EnsembleRanker, TextRanker, TextRankerW2V, PositionRanker, PositionRankerW2V

if __name__ == '__main__':
    # 初始化分词器，也可以自己实现集成Tokenizer
    tokenizer = JiebaTokenizer()
    # 设置词表
    tokenizer.set_userdict('res/user.dict')
    # 设置停用词表
    tokenizer.set_stopwords('res/stopwords.txt')
    # 初始化词向量
    w2v = FunctionEmbedding('res/embedding/vec.txt', tokenizer= tokenizer)
    # 初始化EnsembleRanker
    eranker = EnsembleRanker(tokenizer=tokenizer,
                             w2v=w2v,
                             keyword_path='res/keyword.dict')
    text = '工作描述：投资分析与建议：根据投资机构与高净值客户需求，研究上市公司、投资项目等所处行业、业务模式、成长性及风险性分析，提供投资建议；方案执行：对量化私募证券与股权投资基金客户进行尽职调查、可行性分析、撰写项目投资分析报告；客户关系维护：对客户进行跟踪维护，及时进行投后管理和持续督导，对投资者举办投资沙龙、策略会等；业务研究：研究超过20家上市公司融资情况与资本运作，评估和发掘公司潜在业务机会；媒体运营：公众号日常运营与维护，连续两个月提高点击量20%以上工作描述：协助研究部门跟踪及定时进行行业及公司基本面研究，包括财务数据收集与整理，财务报表分析，建立盈利预测模型和估值模型包括DCF、相对估值法等；负责撰写及推送英文周报（中国A股、港股、部分大宗商品）共40余篇，熟悉股票及二级市场的运行规律以及掌握宏观经济基本研究方法；定期对在香港股市新发行的IPO招股书进行及时性评论，给客户提供打新建议工作描述：作为项目管理团队成员，参与5个客户项目（保险、奢侈品、商业地产、通讯等行业）的全生命周期包括需求分析、公司内部数据库结构分析及描绘数据模型，设计仪表盘和分析报告，上线测试与用户培训等过程；常驻客户项目并与项目经理、技术团队合作沟通敲定项目需求与实施方法，确保对最终用户的需求给出解决方案；从零开始创建应用项目包括数据分析报告及KPI仪表盘等，在对公司数据库结构的全面了解下处理大容量数据源，通过实施ETL过程搭建数据模型'
    topic = '投资经理金融分析师咨询顾问'
    keywords = eranker.keyword_rank(text,
                                    num_keyphrase=40,
                                    beta_matrix=0.75,
                                    beta_vector=0.75,
                                    matrix_weights=[0.1, 0.9],
                                    vector_weights=[0, 0.2, 0.2, 0.6],
                                    topic=topic,
                                    is_expand=True,
                                    pos_filter=('n', 'vn', 'v', 'l', 'eng'),
                                    with_weights=True)
    print(keywords)结果如下:[['项目投资分析', 0.012887602399103474], ['估值模型', 0.012176652545880764], ['股权投资基金', 0.011910187610926229], ['投资项目', 0.011766760469749765], ['财务报表分析', 0.011750161967943665], ['需求分析', 0.011674730369881698], ['数据模型', 0.011367384490566831], ['数据>
分析', 0.011313966421106653], ['香港股市', 0.01125084883916266], ['项目经理', 0.011141080159173743]]APIExampleOther
Package: keyword-extract-links
pip install keyword_extract_linkshttpx,fake_useragent must be installed to test before use,but the keyword_extract_Links library is not dependentfrom keyword_extract_links import extract_links
import httpx
from fake_useragent import UserAgent
ua = UserAgent()


def get_html(url_address):
    headers = {'user-agent': ua.random}
    r = httpx.get(url_address, headers=headers)
    return r.text


url_list = [
              "https://tieba.baidu.com/f/search/res?ie=utf-8&qw=%E6%98%93%E6%AC%A1%E5%85%83",
              "https://s.weibo.com/weibo?q=%E6%98%93%E6%AC%A1%E5%85%83&Refer=STopic_history"
           ]
for url in url_list:
    html = get_html(url)
    extract = extract_links.Extract(url, html, "易次元")
    url_list = extract.get_url_list()
    print(url_list)

# ['https://tieba.baidu.com/home/main?un=%E6%98%93%E6%AC%A1%E5%85%83&from=tieba']
# ['https://weibo.com/6509857538?refer_flag=1001030103_', 'https://app.weibo.com/t/feed/2nxWC7', 'https://k.sina.cn/article_5790946818_1592ad6020010112vs.html?from=animation&wm=3049_0032', 'https://c.m.163.com/news/a/EQ35KNJQ00318PFH.html?spss=newsapp']
Package: keywordextractor
[]Key Word ExtractorThis Library allows Developers to get Keywords from Text
The input Text must be String and output would be list of KeywordsI have did Webscrappping on a website that was providing this Feature and
i brought has a package or module so you can use itInstallationpipinstallkeywordextractorUsageimportsysfromkeywordextractor.keywordextractorimportKeyWordExtractortext="""Hello! I’m Soumil Nitin Shah, a Software and Hardware Developer basedin New York City. I have completed by Bachelor in Electronic Engineering andmy Double master’s in Computer and Electrical Engineering. I Develop Python Based CrossPlatform Desktop Application , Webpages , Software, REST API, Database and much more Ihave more than 2 Years of Experience in Python"""d=KeyWordExtractor(text=text)data=d.getprint(data)AuthorsSoumil Nitin ShahSoumil Nitin ShahBachelor in Electronic Engineering |
Masters in Electrical Engineering |
Master in Computer Engineering |Website :https://soumilshah.herokuapp.comGithub:https://github.com/soumilshah1995Linkedin:https://www.linkedin.com/in/shah-soumil/Blog:https://soumilshah1995.blogspot.com/Youtube :https://www.youtube.com/channel/UC_eOodxvwS_H7x2uLQa-svw?view_as=subscriberFacebook Page :https://www.facebook.com/soumilshah1995/Email :shahsoumil519@gmail.comprojects :https://soumilshah.herokuapp.com/projectHello! I’m Soumil Nitin Shah, a Software and Hardware Developer based in New York City. I have completed by Bachelor in Electronic Engineering and my Double master’s in Computer and Electrical Engineering. I Develop Python Based Cross Platform Desktop Application , Webpages , Software, REST API, Database and much more I have more than 2 Years of Experience in PythonLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: keyword-search
Keyword SearchA keyword search package for CSV/Excel/Pandas using boolean expressions.It works by processing a query string with field indicator for Pandas Dataframe
columns.Currently, only.str.containsqueries are performed.Boolean operations (and,or,and not) are mantained during compilation, following Pandas sintax.All further work is done by the PandasDataFrame.querymethod.Searched field should not contain spaces or:.Examples:((title:leptospira) and (abstract:vaccine))Installation$ pip install keyword-searchUsing as a Python packagefromkeyword_search.queryimportkeyword_searchdf_results=keyword_search(df,"(title:Leptospirosis)")print(df_results)Using as a CLI application$ keyword-query papers.csv "(title:leptospira) or (abstract:leptospira)" --delimiter ";" --output results.csv
Package: keyword-spacy
🔑 Keyword spaCyKeyword spaCy is a spaCy pipeline component for extracting keywords from text using cosine similarity. The basis for this comes fromKeyBERT: A Minimal Method for Keyphrase Extraction using BERT, a transformer-based approach to keyword extraction. The methods employed by Keyword spaCy follow this methodology closely. It allows users to specify the range of n-grams to consider and can operate in a strict mode, which limits results to the specified n-gram range.InstallationBefore using Keyword spaCy, make sure you have spaCy installed:pip install keyword-spacyThen, download theen_core_web_mdmodel:python -m spacy download en_core_web_mdUsageTo use the Keyword Extractor, first, create a spaCynlpobject:importspacynlp=spacy.load("en_core_web_md")Then, add theKeywordExtractorto the pipeline:nlp.add_pipe("keyword_extractor",last=True,config={"top_n":10,"min_ngram":3,"max_ngram":3,"strict":True})Now you can process text and extract keywords:text="Natural language processing is a fascinating domain of artificial intelligence. It allows computers to understand and generate human language."doc=nlp(text)print("Top Keywords:",doc._.keywords)Output:Top Keywords: ['generate human language', 'Natural language processing']Each token that is not a punctuation also receives a special attribute._.keyword_value, this is the value of a given word's similarity to thedoc.vector. This may be helpful for other downstream tasks.ConfigurationTheKeywordExtractorcan be configured using the following parameters:top_n: The number of top keywords to extract.min_ngram: The minimum size for n-grams.max_ngram: The maximum size for n-grams.strict: If set toTrue, only n-grams within themin_ngramtomax_ngramrange are considered. IfFalse, individual tokens and the specified range of n-grams are considered.MethodologyThe methodology employed by Keyword spaCy is inspired byKeyBERT. It utilizes cosine similarity between tokens (and n-grams) and the entire document to determine the relevance of terms. The most similar terms are then considered as keywords.ReferencesKeyBERT: A Minimal Method for Keyphrase Extraction using BERT
Package: keywordtree
KeywordTreeA Python data structure that maps arbitrary text to values by using a decision-tree-like algorithm based on counting keyword occurrences.How it worksEach node contains a list of keywords and a value if it's a leaf.A query is given as a string and is broken into tokens by a tokenizer.Starting from the root, the query follows the child with the most keywords present in the query token list.When a leaf is reached, its value is returned.If there are multiple nodes with the most keywords in the token list, the query follows all of them and the results are merged at the end into a list.ExampleSuppose we have the above tree and the query "My pug is so young it can barely woof".The default tokenizer converts the query to lowercase and splits at whitespaces, so the tokens will be['my', 'pug', 'is', 'so', 'young', 'it', 'can', 'barely','woof'].The query will follow the left child of the root, since it has one match for'woof'and will then match the child with'pug'in its keywords. Since it's a leaf, its value will be in the final result:['Pug'].UsageKeywordTreeinstances are constructed from tuples of the form (list of keywords, list of children described as tuples, value).Non-leaf nodes must have value equal toNone.fromkeywordtreeimportKeywordTreekt=KeywordTree([],[(['dog','woof'],[(['bulldog'],[],'Bulldog'),(['pug'],[],'Pug'),(['boxer'],[],'Boxer'),],None),(['cat','meow'],[(['persian'],[],'Persian'),(['bengal'],[],'Bengal'),(['siamese'],[],'Siamese'),],None),],None)kt.query('My pug is so young it can barely woof')# ['Pug']Other tokenizers can be used as well:fromkeywordtreeimportKeywordTreefromnltk.tokenize.stanfordimportStanfordTokenizerstftk=StanfordTokenizer()deftokenizer(s):returnstftk.tokenize(s)kt=KeywordTree([],[# list of children],None,tokenizer=tokenizer)LicenseCopyright 2019 Theodoros Diamantidis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: keywrapper
MotivationI usually use Redis for small projects with a dynamic storage component. Most of the times I just need a very simple key-value storage and Redis does a terrific job with that. However not all the applications need a high performance storage but just being very easy to start using them.The idea of this wrapper is to start using JSON based storage at the beginning and in the future, if necessary, move the storate of an application to Redis or any other supported driver without changing a single line of code.Basic usageJSON store:import keywrapperstore = keywrapper.new_store(‘json’)store.set_value(‘foo’, ‘bar’, ‘42’)store.get_value(‘foo’, ‘bar’)Redis store:import keywrapperstore = keywrapper.new_store(‘redis’)store.set_value(‘foo’, ‘bar’, ‘42’)store.get_value(‘foo’, ‘bar’)Migrate from JSON store to Redis store:import keywrapperjson_store = keywrapper.new_store(‘json’)redis_store = keywrapper.new_store(‘redis’)redis_store.restore(json_store.dump())Current statusThese are the current implemented features:JSON and Redis driversHash style data type (key, attribute, value)set_value and get_value functionsdump function implemented only in JSON driverrestore function implemented in both JSON and Redis drivers