Saravanan666/pypi-org huggingface dataset:
Package: postreise
PostREISEPostREISEis part of a Python software ecosystem developed byBreakthrough
Energy Sciencesto carry out power flow study
in the U.S. electrical grid.Main FeaturesHere are a few things thatPostREISEcan do:Perform transmission congestion/utilization analyses of scenariosStudy generation/emission in scenariosPlot results of analysesA detailed tutorial can be found on ourdocs.Where to get itClone or Fork the source code onGitHubGet latest release from PyPi:pip install postreiseDependenciesPostREISErelies on:PowerSimData, another package developed by Breakthrough Energy Sciences and
availablehere. You must havePowerSimDatacloned in a folder
adjacent to your clone ofPostREISEas the installation of packages depends on
files inPowerSimData.Several Python packages all available onPyPiwhose list can be
found in therequirements.txtorPipfilefiles both located at the root of
this package.InstallationScenario data managed byPowerSimDataare used by the analysis and plotting modules
ofPostREISE. Follow the instructions in the README of thePowerSimDatapackage to install our
software ecosystem.LicenseMITDocumentationCode documentationin form of Python docstrings along with an overview of
thepackageare available on ourwebsite.Communication ChannelsSign upto our email list and
our Slack workspace to get in touch with us.ContributingAll contributions (bug report, documentation, feature development, etc.) are welcome. An
overview on how to contribute to this project can be found in ourContribution
Guide.
Package: post-review
This package provides a command line interface for posting code reviews and merge requestsThe post-review package works on Python versions:2.7.x and greater3.3.x and greaterThe post-review package works with these services:GitHub HostedGitLab HostedGitLab CE, EES, EEPInstallationThe easiest way to install post-review is to usepip:$ pip install post-reviewIf you already have post-review installed and want to upgrade to the latest version:$ pip install --upgrade post-reviewGetting Startedpost-review is able to determine your git service automatically. There is a one-time setup
that is required to fetch your git service API keys – but post-review will instruct you at this
step.The quickest way to get started is to just run thepost-reviewcommand:$ post-review --target <target_branch>Assuming you are using GitLab Hosted, this is what you will see for your one time setup:$ post-review --target <target_branch>

(One Time Setup) Please create a Personal Access Token
https://gitlab.com/profile/personal_access_tokens
Scope: API, Expires: Never

Please enter your Personal Access Token: <paste_your_token_here>The above requires you to navigate to the GitLab link to create an access token.
You will need to use the API scope and make sure that it does not expire – or can rotate too.
This allows grants permission for post-review to create a merge request.
Package: posts
Posts is a Python library for send mail easily.InstallationGitHub:https://github.com/importcjj/PostsPyPihttps://pypi.python.org/pypi/postspipinstallpostsExamplesHere is the first one to send a mail intext:frompostsimportPostsmail=Posts('smtp-server','your-username','your-passwd')withmail()asbox:box.text('to_address',subject='Subject',content='Content')Posts does not only support mail intexttype, but also supporthtml:box.html('to_address',subject='Subject',content='Content')Next, we can send a mail withattachments:withmail()asbox:box.attach({'example.jpg':'./example.jpg})box.text('to_address',subject='Subject',content='Content')Finally, we can send the Html mail with image. and
in the example, we also use aaliasfor the sender:withmail(alias='alias')asbox:box.attach({'example.jpg':'./example.jpg'})box.html(recipient='to_address',subject='subject',content='<img src="cid:example.jpg">')Maybe you need to send mail by ssl, don’t worry:withmail(ssl=True)asbox:box.text('to_address',subject='Subject',content='Content')Chain UseageJust try like this:box.attach({'name1':'/path/to/file1','name2':'/path/to/file2'}).\attach({'name3':'/path/to/file3'}).\text('to_address','subject','content').\html(['to_address1','to_address2'],'subject','content')The text mail with attachment 1, 2, 3 will send to address,
and then the html mail with attachment 1, 2, 3 will be sent ot
address1, address2 together.TODOaddaliasfor recipient.addcarbon copy.add usage withoutwith.
Package: postscriptum
WarningWhile the code is considered functional and I used it in my projects,
the API is not complete and may change until we reach 1.0.Postscriptum wrapsatexit.register,sys.excepthookandsignal.signalto lets you do:from postscriptum import PubSub
ps = PubSub() # do this before creating a thread or a process

@ps.on_finish() # don't forget the parenthesis !
def _(event):
    print("When the program finishes, no matter the reason.")

@ps.on_terminate()
def _(event):  # event contains the signal that lead to termination
    print("When the user terminates the program. E.G: Ctrl + C, kill -9, etc.")

@ps.on_crash()
def _(event): # event contains the exception and traceback
    print("When there is an unhandled exception")

ps.start()All those functions will be called automatically at the proper moment. The handler foron_finishwill be called even if another handler has been called.Installpip install postscriptumCoverage: 100%Tested: Linux, but should work on Windows and MacFully typed hintWhy this lib ?Python has 3 very different API to deal with exiting, and they all have their challenges:atexit: the handler is always called, weither python exited cleanly or not, which can lead do duplicated calls. Except if you get a SIGTERM signal when it’s silently ignored. Even whell called, it doesn’t give any information on the cause of the exit.signal: to capture terminating signals, you need to know which ones to watch for (and they differ depending of the OS). Normal behavior is to exit, but if you set your handler, the program will not exit unless you call sys.exit(). What’s more, you can only have one handler for each signal. Finally, there are gotchas when using I/O inside a handler.sys.excepthoolis called on all exception, but not SystemExit. It also leads to hard to debug errors if you don’t call the previous hook properly. And you can have only one handler.Also, there is no automatic way to react tosys.exit(). And no way to distinguishSystemExitfromsys.exit(), which you need for signals.Postscriptum doesn’t deal with the last goatchas yet:signals are caught by childs and passed to the main threads, but not exceptions.messing up in your handler may cause you to have no error message at all.
Package: post-tonal-theory-helper-mbmasuda
post-tonal-theory-helperby Mari Masudambmasuda.github@gmail.comThis package provides some basic post-tonal music theory
analysis functions for Python 3.Based on the textIntroduction to Post-Tonal Theoryby Joseph N. Straus (ISBN 0-13-686692-1)Installation$pipinstallpost-tonal-theory-helper-mbmasudaUsagefromptth.apiimport*pitches='0t38e'normal=normal_form(pitches)prime=prime_form(pitches)normal_t4=transpose(normal,4)normal_t4i=invert(normal,transpose=4)boolean1=is_transpositionally_related(normal,normal_t4)boolean2=is_inversionally_related(normal,normal_t4i)members=get_set_class_members(normal)forte_name=get_forte_name(pitches)TestsTests can be run with pytest$py.test
Package: post_truth_checker
This program was created in order to help distinguish fake news/clickbait article from reliable one. It is based on:- blacklist sites which have poor reputation- title expressions generally considered as clickbaits- opinion expressions, which is non-neutral and creates a special view on issueIt won't clearly show you forbidden sites, but as a result it returns top websites links with indexes of untrust.Indexes starts at 0 which means that in the article was not found any suspected expressions.The higher returned index is, the more untrusted site it is. You should think twice before you click on them.## How to use1. Run python and then:>>> from post_truth_checker import main>>> main.run('expression')where <expression> is a phrase you want to test out. The phrase have to be in quotation signs.
Package: post-type-discovery
IndieWeb Post Type DiscoveryA library to discover the post type of a web page in accordance with the IndieWeb Post Type Discovery specification.InstallationTo install this package, run the following command:pip install post-type-discoveryYou can import the package using the following line of code:import post_type_discoveryUsageThis library contains aget_post_typefunction that returns the post type of a linked web page.This function uses the following syntax:get_post_type(url, custom_properties=[])Here are the arguments you can use:url: The URL of the web page to discover the post type of.custom_properties: A list of custom properties to use when discovering the post type. This list must contain tuples.The function returns a single string with the post type of the specified web page.See the Post Type Discovery specification for a full list of post types.Custom PropertiesThe structure of the custom properties tuple is:(attribute_to_look_for, value_to_return)An example custom property value is:custom_properties = [
    ("poke-of", "poke")
]This function would look for a poke-of attribute on a web page and return the "poke" value.By default, this function contains all of the attributes in the Post Type Discovery mechanism.Custom properties are added to the end of the post type discovery list, just before the "article" property. All specification property types will be checked before your custom attribute.Here is an example of theget_post_typefunction in use:import indieauth_helpers

url = "https://jamesg.blog/2021/12/06/advent-of-bloggers-6/"

post_type = indieauth_helpers.discover_endpoint(url)

print(post_type)This code returns the following string:articleLicenseThis project is licensed under theMIT license.ContributingThis project welcomes contributions from anyone who wants to improve the library.Feel free to create an issue or pull request on GitHub and your contribution will be reviewed.Contributorscapjamesg
Package: potara
What is this?Potara is amulti-documentsummarization system that relies on Integer
Linear Programming (ILP) and sentence fusion.Its goal is to summarize a set of related documents in a few sentences.
It proceeds byfusing similarsentences in order to create sentences
that are either shorter or more informative than those found in the
documents.
It then uses ILP in order tochoose the best set of sentences, fused
or not, that will compose the resulting summary.It relies on state-of-the-art (as of 2014) approaches introduced by Gillick and
Favre for the ILP strategy, and Filippova for the sentence fusion.It is compatible and tested with Python 3.5 and 3.6.InstallThe easy wayYou should be able to install potara and its dependencies with pippip install potaraYou can also clone this repo and use the requirements.txt file to install dependenciesfurther requirementsYou will also need GLPK, which is used to obtain an optimal summary
(example for Debian-based distro)$ sudo apt-get install glpkFor Ubuntu-based distros you can use:$ sudo apt-get install libglpk40You can check that the install run successfully by cloning the repo and running$ python setup.py testIf you have issues with install, you can check the .travis.yml file of the repo, which corresponds to a working build.How ToBasically, you can use the followingfrompotara.summarizerimportSummarizerfrompotara.documentimportDocuments=Summarizer()# Adding docs, preprocessing them and computing some infos for the summarizers.setDocuments([Document('data/'+str(i)+'.txt')foriinrange(1,10)])# Summarizing, where the actual work is dones.summarize()# You can then print the summaryprint(s.summary)There's some preprocessing involved and a sentence fusion step, but I
made it easily tunable. Preprocessing may take a while (a few minutes)
since there is a lot going on under the hood. Default parameters are
currently set for summarizing ~10 documents. You can summarize a smaller
amount of documents by tweaking the "minbigramcount" parameter of the
summarizer :s = Summarizer(minbigramcount=2)Summarizing less than 4 documents would probably yield a bad
summary.Similarity modelsPotara relies on similarity scores between sentences. These scores
can be shallow using a cosine similarity, or "deep" using gensim
Word2Vec semantic representation of words.
For the second use case, you'll want to train your own model or use
pretrained models. You may contact me if you want to use potara that way,
and I may create a tutorial on the matter for the occasion.
Package: potato
GeneralThis project exposes a way to load classes dynamically and to
make sure that each class that is loaded has and adheres to one
or more verifiable interfaces.Project NameThe project name started as simply “class registry”, but that
seemed really dull and boring.  Totally not entertaining.  So,
my wife and I brainstormed and we came up with the idea of a
plant, which is both something that grows and somthing that
simply produces items according to technical specification
(AKA factory).  Then, I started to consider the types of plants
that we grow which create hearty staples, and potatos came to
mind.  And yes, I could have used “potato plant”, but that
was too long, so now its just “potato”.  My wife wanted to
call it “pytatoe”, but I said that that was too cheesy.MotivationI wanted a system for a plug-in architecture.  I got the idea
for this project from the following stackoverflow.com question:http://stackoverflow.com/questions/5145378/dynamic-module-import-
of-class-list-from-module-given-its-full-pathAs I developed it, it became apparent that a construct and/or
pattern must have been used in the making of such evil software
as Microsoft Windows.UsageSee example/ for a usage example.
Package: potato-cv
Semantic Segmentation and Edge DetectionSetup# install mmcv and pytorch# install other dependenciespipinstall-rrequirements.txt# If you want to install potato globallypythonsetup.pydevelopDatasetspythontools/convert_datasets/preprocess_cityscapes.pyTrainingCUDA_VISIBLE_DEVICES=0,1./tools/dist_train.sh<path/to/config><num_gpus>TestEvaluate and Visualize Segmentatation and EdgesCUDA_VISIBLE_DEVICES=0,1./tools/dist_train.sh<path/to/config><path/to/ckpt><num_gpus>...To evaluate F-boundary scores:# only supports single gpuCUDA_VISIBLE_DEVICES=0,pythontools/test_boundary_fscore.py<path/to/config><path/to/ckpt>...Evaluate Edges# save edgesCUDA_VISIBLE_DEVICES=0,1./tools/dist_train.sh<path/to/config><path/to/ckpt><num_gpus>--save-edge...

pythontools/test_edge.py<path/to/config><path/to/predictions>...Evaluating edges will take a very long time (depends on the hardware).
Package: potato-distillery
Potato Distillery 🥔 ➡  🥃The purpose of this package is to make easier for users
to create smaller versions of popular ML models, in order
to fine-tune distilled versions of them.Requirements:Huggingface 🤗Transformers 🤖Pytorch 🔥Current support:BERT (Pytorch)GPT-2 (Pytorch)GPT-Neo (Pytorch)
Package: potatomagical
MagicalA simple magic package.InstallationInstall via pip:pip install potatomagicalUsagefrompotatomagical.magicimportdo_magicprint(do_magic("Potato"))# "Potato is now potatomagical!"PackagingFirst, make sure you have the necessary tools installed.pip install twine wheelThen, create a distribution package.python setup.py sdist bdist_wheelUploading to PyPIFirst, check your package with twine.twine check dist/*If everything is okay, upload your package to PyPI.twine upload dist/*Remember, you'll need to create an account onPyPIif you haven't already.This is a very basic example. Depending on your project, you might need to add more information tosetup.py, add aMANIFEST.infile, etc. Check thePython Packaging User Guidefor more details.
Package: potator
Small code clone detection tool. It implements an algorithm fromSourcererCCwithadaptive prefix filteringoptimizations and displays its results as HTML.It works withJavaScript,Python,Java,Go,C++,PHP,C#,C,Swift,KotlinandHaskell.Supported platformspotatorsupports Linux and macOS. It is possible to usepotatoron Windows under WSLInstallationUsing pippotatorcan be installed using pippipinstallpotatorUsing installation scriptgitclonehttps://github.com/otzhora/potatorcdpotator
./install.shUsageUsingpotatoras a standalone cli applicationpotator[-h][-d{Naive,Filtering}][--depthDEPTH][-tTHRESHOLD][-gGRANULARITY][-oOUT]directoryOptionsYou can choose one of two detectors:NaiveandFiltering.Naive detectorcompares every possible combination of source code fragments and calculatesJaccard similaritybetween them.Filtering detectorimplements algorithm fromSourcererCCpaper with anadaptive prefix filteringoptimizations.depthparameters specify the maximum depth of adaptive prefix.depth=2is recommended. Since it offers the optimal balance between costs of building index and querying it.thresholdis the minimum score that two code fragments should have to be considered clones.granularityspecifies granularity of code blocks. Options arefunctionsandclasses.functionsis recommended.outspecifies the name of the resulting htmldirectoryis the directory with files on which to perform search.You can also doexport DEBUG=1before the search, then profiling information will be printed out.Usingpotatoras python packageYou can import detectors or entities extractor frompotatorand use them to work with source code.>>>frompotator.detectorsimportFilteringDetector>>>detector=FilteringDetector()>>>detector.detect(directory,thershold,granularity)>>>frompotator.extractorsimportEntitiesExtractor>>>EntitiesExtractor.extract_data_from_directory(directory,granularity)
Package: potatotimer
potato-timerA simple Pomodoro-style timer with intuitive CLI, written in Python. Developed and tested
in Pop!_OS Linux and occasionally tested in Windows 10.Downloading the timerEasiest way to get the program is to install viapip:pip install potatotimerand create your own config.yml file. More info on configuration down below.ConfigurationTimers can be configured using YAML. You should create one of those
configuration files listed below, or you may provide an alternativeconfiguration file with the command line option-c 'path/to/config.yml'.Config will be automatically searched from (in this order):config file provided via command line option$XDG_CONFIG_HOME/potatotimer/config.yml~/.config/potatotimer/config.yml~/.potatotimer-config.ymlAn example configuration fileis something worth looking at.More on$XDG_CONFIG_HOME.TimersTimers are configured as a list of type-duration pairs, where type is basically
the name of the timer and duration is given in minutes. Built-in types of timers
arework,short breakandlong break, though you may call your timers whatever
you likei.e. coffee break.A single work timer would be configured as follows:timers:-type:"work"duration:25Decimals are also accepted for duration (i.e.duration: 0.1is a timer lasting 6 seconds).
More thorough example of timer configuration can be found in the
example configuration file further down.Alarm typeAlarm type can be eitherbeeporflash.beeprings the terminal bellflashflashes the terminal window.The default when setting omitted from the file isbeep.Example:alarm_type: "beep"Alarm repeatNumber of times alarm will sound/flash each time alarm triggers.Example:alarm_repeat: 3Use of colorsWhenuse_colorsis se toTruethe program will be beautifully decorated with
meaningful colors for different types of timers:workis redshort breakis greenlong breakis blueAny other type of timer will be yellow.Set thisFalseand the program will be plain black and white. The default isTrue.If you prefer to use the colors from your terminal, setprefer_terminal_colorstoTrue. For both the terminal and built-in color schemes the background will be "transparent",
as in not have any other color than what your terminal has.Example configuration filealarm_type:"beep"alarm_repeat:2use_colors:Trueprefer_terminal_colors:Falsetimers:-type:"work"duration:25-type:"shortbreak"duration:5-type:"work"duration:25-type:"shortbreak"duration:5-type:"work"duration:25-type:"shortbreak"duration:5-type:"work"duration:25-type:"longbreak"duration:35More sample configs in thesample-configs folder.
Package: potato-tool
辅助函数打印 (return void)p(Str)清理屏幕输出 (兼容不同OS) (return void)clear()字体效果红色red(Str)(return str)redP(Str)(return void)绿色green(Str)(return str)greenP(Str)(return void)蓝色blue(Str)(return str)blueP(Str)(return void)黄色yellow(Str)(return str)yellowP(Str)(return void)青色cyan(Str)(return str)cyanP(Str)(return void)紫红magenta(Str)(return str)magentaP(Str)(return void)加粗bold(Str)(return str)boldP(Str)(return void)输出前置符打印紫红[Processing]Processing()(return str)ProcessingP()(return void)青色[Information]Information()(return str)InformationP()(return void)加粗[Detected]Detected()(return str)DetectedP()(return void)绿色[Result]Result()(return str)ResultP()(return void)红色[Error]Error()(return str)ErrorP()(return void)输入前置符打印单行输入 （ Input(startStr='Potato') ）Input()（黄色<Potato>$ ） (return str)Input(Str)（黄色<Str>$ ） (return str)InputP()（黄色<Potato>$ ） (return void)InputP(Str)（黄色<Str>$ ） (return void)多行输入 （ Input_lines(startStr='Potato', showHead=True) ）Input_lines()（黄色<Potato>- ,可传参showHead=True(默)/False控制是否固定头部）Input_lines(Str)（黄色<Str>- ,可传参showHead=True(默)/False控制是否固定头部）格式化输出对字符串宽度(lenMax)、填充字符(placeHolder默认空格)、对齐方式(justify默认居中)进行设置，来格式化输出printF(strData, lenMax, placeHolder=" ", justify="center")(return str)pF(strData, lenMax, placeHolder=" ", justify="center")(return void)表格化输出tableStyle、fontStyle 分别控制字体和表格颜色getStr控制return void/str实时获取数据，实时打印表格printT(dataList,type="body",getStr=False,tableStyle="red",fontStyle="")(return void)pT(dataList,type="body",getStr=False,tableStyle="red",fontStyle="")(return void)举例：printT( [8,13,13,10] ,"top")printT( [["ip",8],["domin",13,"left"],["icp",13,"center"],["id",10]])printT( [8,13,13,10] ,"middle")printT( [["ip",8],["域名",13,"left"],["备案",13],["编号",10]],type="body")printT( [8,13,13,10] ,"bottom")输出：ipdomainicpidip域名备案编号获取数据完毕后，再打印表格listPT(dataList, justify=None, getStr=False, tableStyle="red", fontStyle="")(return void)举例：listPT([["ip","domain","icp","id"],["ip","域名","备案","编号"]])输出：ipdomainicpidip域名备案编号logo输出logo_1(ScriptName="potato",Author="potato", QQemil="2431111111", Type="Penetration", Version="0.2.4")logo_2()