Saravanan666/pypi-org huggingface dataset:
Package: topgen
Time-based One-time Password Generator (topgen)This is a simple time-based one-time password generator. It is compatible withGoogle Autheticatorand keys can imported fromotpauth-migration://offline?data=...urls generated by Google Autheticator.Installationtopgen is tested with python 3.10 but it should work all python 3 versions. Requirement packages can be installed in two ways:pip install topgenUsageIt is needed to first add or import some keys.New keys can be added with--addparameter:python -m topgen --addTo import keys from Google Authenticator app--urlparameter can be used. It is done by the URLs that Google Authenticator creates. The URLs can be easily be created by exporting keys from the settings menu of Google Authenticator. Google Autheticator creates QR codes which contain the URLs. The URLs start withotpauth-migration://offline?data=.... These URLs can then be imported using the following command:python -m topgen --url <URL>top-g saves all keys in a binary file using Google'sprotobuf. The default file is./payload.db. It can be changed by providing--dbparameter.To print all of the keys with their information--printparameter can be used.python -m topgen --listNOTE: The database file is not encrypted. Take your own risk.ThanksI want to thank you toDimitri Sokolyukfor hisGoogle Authenticator migration decoderandPatrice FerletandTom Jaskowskifor their answers underthisstackoverflow page.ReferencesTOTP: Time-Based One-Time Password Algorithm:https://www.rfc-editor.org/rfc/rfc6238HOTP: An HMAC-Based One-Time Password Algorithm:https://www.rfc-editor.org/rfc/rfc4226
Package: topggpy
A simple API wrapper forTop.ggwritten in Python, supporting discord.py.InstallationInstall via pip (recommended)pip3installtopggpyInstall from sourcepip3installgit+https://github.com/top-gg/python-sdk/DocumentationDocumentation can be foundhereFeaturesPOST server countGET bot info, server count, upvote infoGET all botsGET user infoGET widgets (large and small) including custom ones. Seedocs.top.ggfor more info.GET weekend statusBuilt-in webhook to handle Top.gg votesAutomated server count postingSearching for bots via the APIAdditional informationBefore using the webhook provided by this library, make sure that you have specified port open.Optimal values for port are between 1024 and 49151.If you happen to need help implementing topggpy in your bot, feel free to ask in the#developmentor#apichannels in ourDiscord server.ExamplesPosting server count manually every 30 minutes:fromdiscord.extimporttasksimporttopgg# This example uses tasks provided by discord.ext to create a task that posts guild count to Top.gg every 30 minutes.dbl_token='Top.gg token'# set this to your bot's Top.gg tokenbot.topggpy=topgg.DBLClient(bot,dbl_token)@tasks.loop(minutes=30)asyncdefupdate_stats():"""This function runs every 30 minutes to automatically update your server count."""try:awaitbot.topggpy.post_guild_count()print(f'Posted server count ({bot.topggpy.guild_count})')exceptExceptionase:print('Failed to post server count\n{}:{}'.format(type(e).__name__,e))update_stats.start()Using webhook:importtopgg# This example uses topggpy's webhook system.# The port must be a number between 1024 and 49151.bot.topgg_webhook=topgg.WebhookManager(bot).dbl_webhook("/dblwebhook","password")bot.topgg_webhook.run(5000)# this method can be awaited as well@bot.eventasyncdefon_dbl_vote(data):"""An event that is called whenever someone votes for the bot on Top.gg."""ifdata["type"]=="test":# this is roughly equivalent to# return await on_dbl_test(data) in this casereturnbot.dispatch('dbl_test',data)print(f"Received a vote:\n{data}")@bot.eventasyncdefon_dbl_test(data):"""An event that is called whenever someone tests the webhook system for your bot on Top.gg."""print(f"Received a test vote:\n{data}")With autopost:importtopgg# This example uses topggpy's autopost feature to post guild count to Top.gg every 30 minutes# as well as the shard count if applicable.dbl_token='Top.gg token'# set this to your bot's Top.gg tokenbot.topggpy=topgg.DBLClient(bot,dbl_token,autopost=True,post_shard_count=True)@bot.eventasyncdefon_autopost_success():print(f'Posted server count ({bot.topggpy.guild_count}), shard count ({bot.shard_count})')
Package: topggpy-disnake
A simple API wrapper forTop.ggwritten in Python, supporting discord.py.InstallationInstall via pip (recommended)pip3installtopggpyInstall from sourcepip3installgit+https://github.com/top-gg/python-sdk/DocumentationDocumentation can be foundhereFeaturesPOST server countGET bot info, server count, upvote infoGET all botsGET user infoGET widgets (large and small) including custom ones. Seedocs.top.ggfor more info.GET weekend statusBuilt-in webhook to handle Top.gg votesAutomated server count postingSearching for bots via the APIAdditional informationBefore using the webhook provided by this library, make sure that you have specified port open.Optimal values for port are between 1024 and 49151.If you happen to need help implementing topggpy in your bot, feel free to ask in the#developmentor#apichannels in ourDiscord server.ExamplesFor examples, follow the linkhere
Package: topgrade
IntroductionNoteThis is a fork oftopgrade by r-darwishto keep it maintained.Keeping your system up to date usually involves invoking multiple package managers.
This results in big, non-portable shell one-liners saved in your shell.
To remedy this,Topgradedetects which tools you use and runs the appropriate commands to update them.InstallationArch Linux:AURNixOS:NixpkgsVoid Linux:XBPSmacOS:HomebreworMacPortsWindows:ScoopPyPi:pipOther systems users can either usecargo installor the compiled binaries from the release page.
The compiled binaries contain a self-upgrading feature.Currently, Topgrade requires Rust 1.65 or above. In general, Topgrade tracks
the latest stable toolchain.UsageJust runtopgrade.ConfigurationSeeconfig.example.tomlfor an example configuration file.Migration and Breaking ChangesWhenever there is abreaking change, the major version number will be bumped,
and we will document these changes in the release note, please take a look at
it when updated to a major release.Got a question? Feel free to open an issue or discussion!Configuration PathCONFIG_DIRon each platformWindows:%APPDATA%macOSandother Unix systems:${XDG_CONFIG_HOME:-~/.config}topgradewill look for the configuration file in the following places, in order of priority:CONFIG_DIR/topgrade.tomlCONFIG_DIR/topgrade/topgrade.tomlIf the file with higher priority is present, no matter it is valid or not, the other configuration files will be ignored.On the first run(no configuration file exists),topgradewill create a configuration file atCONFIG_DIR/topgrade.tomlfor you.Custom CommandsCustom commands can be defined in the config file which can be run before, during, or after the inbuilt commands, as required.
By default, the custom commands are run using a new shell according to the$SHELLenvironment variable on unix (falls back tosh) orpwshon windows (falls back topowershell).On unix, if you want to run your command using an interactive shell, for example to source your shell's rc files, you can add-iat the start of your custom command.
But note that this requires the command to exit the shell correctly or else the shell will hang indefinitely.Remote ExecutionYou can specify a key calledremote_topgradesin the configuration file.
This key should contain a list of hostnames that have Topgrade installed on them.
Topgrade will usesshto runtopgradeon remote hosts before acting locally.
To limit the execution only to specific hosts use the--remote-host-limitparameter.ContributionProblems or missing features?Open a new issue describing your problem and if possible provide a solution.Missing a feature or found an unsupported tool/distro?Just let us now what you are missing by opening an issue.
For tools, please open an issue describing the tool, which platforms it supports and if possible, give us an example of its usage.Want to contribute to the code?Just fork the repository and start coding.Contribution GuidelinesSeeCONTRIBUTING.mdRoadmapAdd a proper testing framework to the code base.Add unit tests for package managers.Split up code into more maintainable parts, eg. putting every linux package manager in a own submodule of linux.rs.
Package: tophack
Top HackGet top links from HNFree software: MIT licenseUsage guideInstall with pippip install tophackorpip install –user tophackThen runtophackfrom the terminal.Select the number of the entry you like.You will be asked foro/c/q.omeans open the url in your web browser.cmeans open the HN comments.qmeans quit and choose another submission.You can customise using CLI arguments. Typetophack -hto view all options.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-01-12)First release on PyPI.
Package: top-hat
TophatTophat is a factorization-based recommendation engine built usingTensorFlow.InstallationInstalling from PyPi:pipinstalltop-hatInstalling the master branch from github in development mode, run:gitclonegit@github.com:gilt/tophat.gitcdtophat
pipinstall-e.Note that by default, installation assumes you already have TensorFlow installed.
However, if you need, you can include the installation of TensorFlow in the setup extras as following:
(choose the one that's right for you)# CPU pypipipinstalltop-hat[tf]# GPU pypipipinstalltop-hat[tf_gpu]# CPU local devpipinstall-e.[tf]# GPU local devpipinstall-e.[tf_gpu]Docker ImagesThere are two provided Dockerfiles:DockerfileandDockerfile.gpu. The latter gpu variant requiresnvidia-docker.TestsThere are some minimal tests intests/which can all be run usingpytestorpython setup.py test.Related ProjectsThe initial motivation behind tophat was to port overLightFMandSpotlightinto TensorFlow.There also are many otheramazing recommender systems out there-- so choose the one that is right for your case.
Package: topicaxis-opengraph
Topicaxis-opengraph is a fork ofhttps://github.com/erikriver/opengraphthat adds support for Python 3.OpenGraph is a module of python for parsing the Open Graph Protocol, you can read more about the specification athttp://ogp.me/Installation$pipinstalltopicaxis-opengraphFeaturesUse it as a python dictInput and parsing from a specific urlInput and parsung from html previous extractedHTML outputJSON outputUsageFrom an URL>>>importopengraph>>>video=opengraph.OpenGraph(url="http://www.youtube.com/watch?v=q3ixBmDzylQ")>>>video.is_valid()True>>>forx,yinvideo.items():...print"%-15s=>%s"%(x,y)...site_name       => YouTube
description     => Eric Clapton and Paul McCartney perform George Harrison's "While My Guitar Gently Weeps" at the...
title           => While My Guitar Gently Weeps
url             => http://www.youtube.com/watch?v=q3ixBmDzylQ
image           => http://i2.ytimg.com/vi/q3ixBmDzylQ/default.jpg
video:type      => application/x-shockwave-flash
video:height    => 224
video           => http://www.youtube.com/v/q3ixBmDzylQ?version=3&autohide=1
video:width     => 398
type            => videoFrom HTML>>>HTML="""...<html xmlns:og="http://ogp.me/ns#">...<head>...<title>The Rock (1996)</title>...<meta property="og:title" content="The Rock" />...<meta property="og:type" content="movie" />...<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />...<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />...</head>...</html>...""">>>movie=opengraph.OpenGraph()# or you can instantiate as follows: opengraph.OpenGraph(html=HTML)>>>movie.parser(HTML)>>>video.is_valid()TrueGenerate JSON or HTML>>>ogp=opengraph.OpenGraph("http://ogp.me/")>>>printogp.to_json(){"image:type": "image/png", "title": "Open Graph protocol", "url": "http://ogp.me/", "image": "http://ogp.me/logo.png", "scrape": false, "_url": "http://ogp.me/", "image:height": "300", "type": "website", "image:width": "300", "description": "The Open Graph protocol enables any web page to become a rich object in a social graph."}>>>printogp.to_html()<meta property="og:image:type" content="image/png" />
<meta property="og:title" content="Open Graph protocol" />
<meta property="og:url" content="http://ogp.me/" />
<meta property="og:image" content="http://ogp.me/logo.png" />
<meta property="og:scrape" content="False" />
<meta property="og:_url" content="http://ogp.me/" />
<meta property="og:image:height" content="300" />
<meta property="og:type" content="website" />
<meta property="og:image:width" content="300" />
<meta property="og:description" content="The Open Graph protocol enables any web page to become a rich object in a social graph." />
Package: topicblob
TopicBlob: Simplified Topic ModelingTopicBlobis a Python 3 library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks around topic modeling such as finding similar documents and provide a list of topics given input text.Here is a live demo of TopicBlob working on wikipedia pageshttps://share.streamlit.io/banjtheman/topicblob/main/topicblob_st.pyTopicBlob leveragesNLTK,pandas, andgensim, for the heavy liftingFeaturesTopic ExtractionSimilarity SearchBM25 search ( word ranking search)Topic SearchGet it now$ pip install topicblobRequirementsPython  >= 3.5Docker SetupEnsure you have (docker)[https://www.docker.com/] installed locally.Build local Docker Imagedocker build -t topicblob:local .Run App (Simply runs theexample.pymodule)docker run topicblob:local
Package: topic-cohesion
Topic CohesionThe Topic-Detection field deals mainly with providing names to given divisions of documents and lacks a quality measurement that provides a rating for the division, that represent a human-subjective score.Given a division topic_cohesion will calculate the human-subjective score, and the related topic name to each label in a division.The POC to this attitude can be found in thecolab-notebook, or in the"Topic Cohesion Project- Full report"The useage example can be also found in thecolab-notebook-usage-exampleInstallationpipinstalltopic-cohesionUsage ExampleThe input to the topic cohesion process must be a csv, txt, tsv file with a tab ['\t'] seperator and must have 'label' and 'text' columns.
The 'text' is a list of strings which represents all the corpus senteces while the 'label' is a list of integers that represents the corpus divison.
In the next example, senteces 1-3 are belong to group 1 and senteces 4 and 5 belongs to group 2.importpandasaspdfromcohesionimporttopic_cohesiondata={'text':["we like to play football","I'm playing football better than neymar and cristano ronaldo","I like Fifa more than I like football, My Fav team is #RealMadrid Hala Madrid","Hamburger or Pizza? what would i choose? I will eat both of them, it so tasty!","banana pancakes with syrup maple, thats my favorite meal"],'label':[1,1,1,2,2]}df=pd.DataFrame(data)score,topic_names=topic_cohesion.run_df(df)print("Cohesion Final score is: ",score)print("Cohesion Topics are: ",topic_names)Expected outputCohesion Final score is: 0.99
Cohesion Topics are: ['like football play ronaldo playing', 'tasty pizza hamburger eat choose']
Package: topic-db
TopicDB by Brett KromkampTopicDB is a topic map-based graph library (usingSQLitefor persistence). Topic maps provide a way to describe complex relationships between abstract concepts and real-world (information) resources.For a more in-depth introduction to topic maps, I recommend reading the introductory article on topic maps over at MSDN:An Introduction to Topic Maps. With that being said, although TopicDB is inspired by the topic maps paradigm, it is not (and never will be) an implementation of theISO/IEC 13250 Topic Mapsdata model standard.TopicDB is intended to be used by other Python applications and does not provide its own user interface to the API.Contextualise, currently in active development, will provide a complete web-based user interface for TopicDB.Why?I build (story) worlds and knowledge management systems. TopicDB plays a crucial role in both those endeavours.Feature SupportPendingInstallationTopicDB officially supports Python 3.7–3.10. To install TopicDB, simply:$ pip install --upgrade topic-dbInstall the Development VersionIf you haveGitinstalled on your system, it is possible to install the development version of TopicDB.Before installing the development version, you may need to uninstall the standard version of TopicDB usingpip:$ pip uninstall topic-dbThen do:$ git clone https://github.com/brettkromkamp/topic-db
$ cd topic-db
$ pip install -e .Thepip install -e .command allows you to follow the development branch as it changes by creating links in the right places and installing the command line scripts to the appropriate locations.Then, if you want to update TopicDB at any time, in the same directory do:$ git pullHow to ContributeCheck for open issues or open a fresh issue to start a discussion around a feature idea or a bug.Forkthe repositoryon GitHub to start making your changes to themasterbranch (or branch off of it).Write a test which shows that the bug was fixed or that the feature works as expected.Send a pull request and bug the maintainer until it gets merged and published :)
Package: topicextractor
"topicextractor" extracts topic keywords from documents based on 'TF-IDF' algorithm.Usageimport topicextractor as tesample_docs = [["doc1_str"], ["doc2_str"], ["doc3_str"] ....]#extract noun counts from 'sample_docs'
count_container = te.extract_noun_counts(sample_docs)print(count_container)
[{"a": 3, "b": 2}, {"c": 5, "d":3}, {"e": 7, "f": 12} ....]#extract keywords for 'count_container[0]'(=the first docmunet in 'sample_docs')
keywords = te.tfidf(count_container[0], count_container)print(keywords)
[("keyword1", 2.1104),("keyword2" 2.0012),("keyword3", 1.8892) ....]Thanks, and please contact the author via e-mail for any comment.
Package: topic-modeling-toolkit
This library aims to automate Topic Modeling research-related activities.Data preprocessing and dataset computingModel training (with parameter grid-search), evaluating and comparingGraph buildingComputing KL-divergence between p(c|t) distributionsDatasets/models/kl-distances reportingtestspackageOverviewThis library serves as a higher level API around theBigARTM(artm python interface) library and exposes it conviniently through the command line.Key features of the Library:Flexible preprocessing pipelinesOptimization of classification scheme with an evolutionary algorithmFast model inference with parallel/multicore executionPersisting of models and experimental resultsVisualizationInstallationThe Topic Modeling Toolkit depends on the BigARTM C++ library. Therefore first you should first build and install iteither by following the instructionshereor by usingthe ‘build_artm.sh’ script provided. For example, for python3 you can use the following$ git clone https://github.com/boromir674/topic-modeling-toolkit.git
$ chmod +x topic-modeling-toolkit/build_artm.sh
$ # build and install BigARTM library in /usr/local and create python3 wheel
$ topic-modeling-toolkit/build_artm.sh
$ ls bigartm/build/python/bigartm*.whlNow you should have the ‘bigartm’ executable in PATH and you can find a built python wheel in ‘bigartm/build/python/’You should install the wheel in your environment, for example with commandpython -m pip install bigartm/build/python/path-python-wheelYou can install the package with the following commandWhen the package gets hosted on PyPI, it should be installed$ cd topic-modeling-toolkit
$ pip install .If the above fails try again including manual installation of dependencies$ cd topic-modeling-toolkit
$ pip install -r requirements.txt
$ pip install .UsageA sample example is below.$ current_dir=$(echo $PWD)
$ export COLLECTIONS_DIR=$current_dir/datasets-dir
$ mkdir $COLLECTIONS_DIR

$ transform posts pipeline.cfg my-dataset
$ train my-dataset train.cfg plsa-model --save
$ make-graphs --model-labels "plsa-model" --allmetrics --no-legend
$ xdg-open $COLLECTIONS_DIR/plsa-model/graphs/plsa*prpl*CitationVorontsov, K. and Potapenko, A. (2015).Additive regularization of topic models. Machine Learning, 101(1):303–323.
Package: topicmodeltuner
TopicTuner — Tune BERTopic HDBSCAN ModelsTo install from PyPi :pip install topicmodeltunerThe ProblemOut of the box,BERTopicrelies uponHDBSCANto cluster topics. Two of the most important HDBSCAN parameters,min_cluster_sizeandsample_sizewill almost always have a dramatic effect on cluster formation. They dictate the number of clusters created including the -1oruncategorizedcluster. While with some datasets a large number of uncategorized documents may be therightclustering, in practice BERTopic will essentially discard a large percentage of"good"documents and not use them for cluster formation and topic formation.HDBSCAN is quite sensitive to the values of these two parameters relative to the text being clustered. This means that when using the BERTopic default value ofmin_topic_size=10(which is assigned to HDBSCAN'smin_cluster_size) the default parameters will more often than not result in an unmanageable number of topics; as well as a sub-optimal number of uncategorized documents. Additionally, documents assigned to the -1 category will not be used to determine topic vocabularly results.The SolutionTopicTuner provides a TopicModelTuner class — a convenience wrapper for BERTopic Models that efficiently manages the process of discovering optimized min_cluster_size and sample_size parameters, providing:Random and grid search functionality to quickly discover optimized parameters for a given BERTopic model.An internal datastore that records all searches for a given model, making parameter selection fast and easy.Visualizations to assist in parameter tuning and selection.Two way Import/Export functionality so that you can start from scratch, or with an existing BERTopic model and export a BERTopic model with optimized parameters at the end of your session.Save and Load for persistance.To get you started this release includes both ademo notebookandAPI documentation
Package: topicnetwork
Topic Network - topic modeling with text networksThis package introduces a novel method for topic modeling using community detection in complex networks. The algorithms included in the package first create a network of collocated terms, filter out unimportant words based on centrality measures, and then use community detection to reveal the topic groups in the network.The methods used are language-agnostic, meaning that you can perform the topic modeling on any text in any language.It is an early version, hence there might be performance issues when modeling big corpora. These are to be resolved in upcoming updates.InstallationTo install the current version of the package, use:pipinstalltopicnetworkUseTo find the topics, simply use:importtopicnetworktopics=topicnetwork.find_topics(list_of_strings)For best results, use a text without punctuation and stopwords, and words converted to lowercase. You can perform the cleaning on your English texts with:text=topicnetwork.clean(list_of_strings)NotesPackage written and maintained by Michal Pikusa (pikusa.michal@gmail.com)
Package: topicpy
topicpyPython package for topic modelling pre and post processingInstallThis is available troughpippip install topicpyModulesThis package consists of multiple modules:converter: handels gene name conversionsgeneontology: uses GSEA to perform gene ontologiesgtex: handle GTEx datahsbmpy: handle ouput of hierarchical stochastic block modelhypergeom: perform hypergeometric testslda: Run sklearn LatenDirichletAllocation with some more parameterstableanalyser: study distributions of a RNA-Seq dataTCGA_files: handle TCGA metadataDocumentationhttps://topicpy.readthedocs.io/en/latest/TestRun unittest withpythontest/test.pyLicenseSeeLICENSE