Saravanan666/pypi-org huggingface dataset:
Package: pretty-talib
pretty_talibDescriptionPrettified interface forTA-LibInstallInstall TA-Lib dependencyFor Mac it's easy as thatbrewinstallta-libFor other platforms, or troubleshooting please check the installation guide forTA-LibInstall pretty_talibpipinstallpretty_talib# orpip3installpretty_talibImportant NoteTHE TYPE OF 'data' AND THE VALUES OF 'use_builtin_types' AND 'use_objects' HIGHLY AFFECTS EFFICIENCY.SEE BENCHMARK BELOW (Ran 250 times)--------------------------------------------------------------------------------------------------
| rank |                                setup                               |  duration  |  perc |
--------------------------------------------------------------------------------------------------
|    1 | data: Dict,             use_builtin_types=False, use_objects=False | 0.00626893 |       |
|    2 | data: Dict,             use_builtin_types=True,  use_objects=False | 0.02440002 | 3.89x | -> ~5.4x slower
|    3 | data: Dict,             use_builtin_types=True,  use_objects=True  | 0.03171391 | 5.05x | -> ~5.9x slower
|    4 | data: pandas.DataFrame, use_builtin_types=False, use_objects=False | 0.03171391 | 5.05x | -> ~6.1x slower
--------------------------------------------------------------------------------------------------Usage# Systemimportjson# Pipimportnumpy# Localfrompretty_talibimportget_stats,ALL,FunctionNamel=50timeperiod=5data={'open':numpy.random.random(l),'high':numpy.random.random(l),'low':numpy.random.random(l),'close':numpy.random.random(l),'volume':numpy.random.random(l)}stats=get_stats(data,timeperiod=timeperiod,use_builtin_types=False)withopen('stats.json','w')asfile:json.dump(stats,file,indent=4)# BENCHMARKS# from funcmeasure import measure# def use_objects_false_use_builtin_types_false():#     get_stats(data, types=ALL, timeperiod=timeperiod)# def use_objects_false_builtin_types_true():#     get_stats(data, types=ALL, timeperiod=timeperiod, use_builtin_types=True)# def use_objects_true_use_builtin_types_true():#     get_stats(data, types=ALL, timeperiod=timeperiod, use_objects=True)# measure(#     [#         use_objects_false_use_builtin_types_false,#         use_objects_false_builtin_types_true,#         use_objects_true_use_builtin_types_true#     ],#     times=100# )CreditsTA-Libbymrjbq7
Package: prettytimer
PrettyTimerPrettyTimer is a simple yet useful tool for you to collect the running time of the code blocks.If you want to evaluate the running time of your code blocks, for example, in a machine learning project, the program has several stages: data load, model forward, gradient backward, etc. Even you will statistic running time more than ten code blocks. The general way is to implement it like this:importtimestart_time_load_data=time.time()time.sleep(3)end_time_load_data=time.time()print(end_time_load_data-start_time_load_data)start_time_forward=time.time()time.sleep(3)end_time_forward=time.time()print(end_time_forward-start_time_forward)start_time_backward=time.time()time.sleep(3)end_time_backward=time.time()print(end_time_backward-start_time_backward)start_time_clloct=time.time()time.sleep(3)end_time_clloct=time.time()print(end_time_clloct-start_time_clloct)PrettyTimer will reproduce it efficiently and elegantly as follows:import time
from prettytimer import PrettyTimer

timer = PrettyTimer()

timer.start('load_data')
time.sleep(3)
timer.end('load_data')

timer.start('forward')
time.sleep(3)
timer.end('forward')

timer.start('backward')
time.sleep(3)
timer.end('backward')

timer.start('collect')
time.sleep(3)
timer.end('collect')

timer.collect()The collected information is a Markdown table style which can be copied and pasted to your Markdown document.Moreover, Prettytimer provides an ETA (Estimated Time of Arrival) method:timer.eta(NAME,ITER,TOTAL)Where NANE is a unique identifier to a timer, ITER is the current iteration and TOTAL is the total iteration of your training schedule.That's all! Pretty concise, right?Maybe there is a more graceful way to implement this, if yes, please tell me.InstallationInstall via pip:pip install -U prettytimerInstall latest development version:pip install -U git+git@github.com:kinredon/prettytimer.git
Package: prettytype
This package helps describe complex, nested Python data structures. Use theprettytypefunction to print the structure and quickly understand what type of
object you have.Install with:pip install prettytypeFor example, let’s examine a complex JSON object from the internet:importrequestsimportjsonr=requests.get('https://openlibrary.org/api/books?bibkeys=ISBN:0385472579,LCCN:62019420&format=json')data=json.loads(r.text)print'Data:',dataprintfromprettytypeimportprettytypeprint'Type:',prettytype(data)===>Data:{u'ISBN:0385472579':{u'bib_key':u'ISBN:0385472579',......Type:{str:{str:str}}prettytype shows that the API returns nested dictionaries with string keys.
Package: pretty-upper
Pretty upperRemoves accents from vowels when a Greek word/sentence is all capitalsFree software: MIT licenseDocumentation:https://pretty-upper.readthedocs.io.FeaturesIn Greek language (and in others too) there are some vowels that when are accented they have a special treatment during pronouncing the word.The Greek language has 7 vowels:α,ε,η,ι,ο,υandωand all of them may be accented.The problem comes when an accented vowel gets capitalized. The accent is not removed making the all-capital word look ugly with unnecessary accents.In Greek grammar, when a word is all-capital, all accents from vowels should be removed. Thus, making it look prettier.The all-capital word is a common scenario in web pages, such as the navigation menu, call to action (CTA) buttons, some headings etc.For example compare the wordΜΕΝΟΎwithΜΕΝΟΥ(both meansmenubut former has accent on Υ and latter has not). Which is prettier for the web?This package tries to solve this issue and remove the accent from vowels when are capitalized.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-03-10)First release on PyPI.
Package: pretty-verbose
Pretty VerbosePackage for beautiful verbose printing in python.InstallationThe package is available in thePython Package Index (PyPi).python3-mpipinstallpretty_verboseExamplesTo use the verbose output, create aVerboseMessagesobject.frompretty_verboseimportVerboseMessagesmessages=VerboseMessages(level=3,scope="main",filename="messages.log")The level indicates which messages will be printed.-1: Just Debug.0: Debug and Errors.1: Debug, Errors and Warnings.2: Debug, Errors Warnings and Success.3: Debug, Errors Warnings, Success and Info.The scope works to use the VerboseMessages in several instance and
differentiate where the message is coming from. Finally the filename will store
all the messages printed in the terminal.The following messages can be printed.importtimemessages.debug("This is a debug message.")messages.error("This is an error message.")messages.warning("This is a warning message.")messages.success("This is a success message.")messages.info("This is an info message.")foriinrange(100):ifi%10==0:messages.for_message("This is an info message inside a for loop.")messages.progress("This is a progress message.",(i+1))time.sleep(0.1)The result will be the following.[28/08/2022 14:12:09] DEBUG [main]: This is an debug message.
[28/08/2022 14:12:09] ERROR [main]: This is an error message.
[28/08/2022 14:12:09] WARNING [main]: This is a warning message.
[28/08/2022 14:12:09] SUCCESS [main]: This is a success message.
[28/08/2022 14:14:06] SUCCESS [main]: This is a success message.
[28/08/2022 14:12:10] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:11] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:13] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:14] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:15] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:16] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:17] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:18] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:19] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:12:20] INFO [main] -- This is an info message inside a for loop.
[28/08/2022 14:14:19] INFO [main] -- This is a progress message.: [100.00%]
Package: pretty-yarrrml2rml
Pretty-yarrrml2rmlThe tool translates mapping rules from YARRRML in a pretty turtle-based serialization of RML. The translation is based
onRMLandYARRRMLspecifications.Limitations:We are working on inlcuding the following features which are not yet implemented:Translation toR2RMLNamed graphsfrom R2RMLFunctions included using theFnOOntologyExecutionIn order to execute the code run you can download de PyPi module:python3-mpipinstallpretty-yarrrml2rml
python3-mpretty_yarrrml2rml-ipath_to_input_yarrrml.yml-opath_to_output_rml.rmlIf you want to include the module in your implementation:importpretty_yarrrml2rmlimportyamlrml_content=pretty_yarrrml2rml.translate(yaml.safe_load(open("path-to-yarrrml")))AuthorsOntology Engineering Group - Data Integration:David Chaves-FragaLuis López Piñero (Final bachelor thesis - v0.1)
Package: pretwita
PreTwITAPreTwITAis an open sourcePreprocessor forTweets in theITAlian language written in Python. The purpose of such library is to provide the user with language-specific tools for text cleaning (i.e. the process of preparing raw text for Natural Language Processing).Included featurescorrection of most common italian abbreviations (e.g.xkreplaced withperché)remove urlsremove emojisremove emoticonsremove mentionsremove hashtagsremove twitter reserved words (i.e. 'rt' and 'fav')remove stopwordsan option to define additional stopwordsremove punctuationremove numbersan option to avoid removing dates inyyyyformatremove multiple spacestokenizationUsageFor usage and tips, please refer to thedemo.ipynbfile
Package: preusx-django-admin-extensions
Django admin extensionsUtilities and extensions for django administration panel.Docs here:https://preusx.gitlab.io/django-admin-extensionsChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.[Unreleased][0.1.5]FixedMany to many admin changelist injector issue fix.[0.1.4]AddedMany to many admin changelist editable fields.[0.1.1]Initial version.
Package: prevail
<body><header><address>prevail</address><p>for those that are still in motion</p></header><article><h4>license<h4><p>You may pretend that this,and the license reflexively,was written over 7e3728 bangs ago,and that the writers or writermay have been forcesof nature, devoid of anyrecognizable consiousness.Furthermore, you may dreamthat this is a gift bestowedsolely upon you, the reader.Thusly, to let anyone elseclaim possession of this, wouldbe an act of charity upon you.Moreover, you may accuratelyconclude, that the existenceof this, is entirely due toa thought you had last night.Whereby, as of now, in the mindsof everyone, with the exceptionof you of course, is the memorythat you were in fact, the writer.</p></article><code>pip install prevail</code><code>import prevailprevail.abundantly ({"build": [{"kind": "header","fields": {"name": "candidate"}},{"kind": "company","fields": {"name": "company 4","descriptions": [],"statuses": [{"names": [ "status 2" ],"places": [ "place 1", "place 2" ],"dates": [ "Year Month Day of Month", "Year Month Day of Month" ],"feats": ["feat 1","feat 2","feat 3"]},{"names": [ "status 1" ],"places": [],"dates": [],"feats": []}]}},{"kind": "company","fields": {"name": "company 4","descriptions": [],"statuses": [{"names": [ "status 2" ],"places": [ "place 1", "place 2" ],"dates": [ "Year Month Day of Month", "Year Month Day of Month" ],"feats": ["feat 1","feat 2","feat 3"]}]}},{"kind": "academics","fields": {"name": "academics 1",}}]})</code></body>
Package: prevalidate
PrevalidateInstallation# install poetry if not done before (ie. pip install poetry)
git clone https://github.com/d3vzer0/prevalidate.git
cd prevalidate
poetry installCommandsExampleprevalidate sentinel unittest ../path_to_usecases ../path_to_schemaHelpUsage: python -m prevalidate.main sentinel [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  sync      Sync Log Analytics workspace tables/fields
  unittest
Package: prevedere-api
prevedere-apiprevedere-api is a simple API for making HTTP requests to the Prevedere application. Requires an API key.
For full documentation, go to thePrevedere Swagger API GUI.Installationpip install prevedere-apiUseAuthenticationThere is a file calledprevedere_api.ini.examplethat can be used to store your API key. To use it, make a copy of the file, remove.examplefrom the filename, and replace the API key in the file with your own. If you cannot find the file, initializingprevedere.Api()will produce the expected location of the .ini file.
Once completed, you will no longer have to enter in your API key when creating a connection to the Prevedere API.from prevedere import Api
p = Api()Endpointsindicator: returns basic information about an indicator.indicator_series: returns the data for an indicator.correlation: calculates Pearson's r and other statistics at different offsets between an endogenous and exogenous indicator.raw_model: returns all information about a forecast model.forecast: returns historical fit and forecasted values of a forecast model.workbench: returns the indicators used in a workbench.Exampleimport prevedere

api_key = "xyz123"
provider = "provider_a"
provider_id = "a123"

p = prevedere.Api(api_key)
p.indicator_series(provider, provider_id)TODO:Example dataset to play with, especially for uploading dataAdd documentation for each function
Package: prevent-submodule-regression
prevent-submodule-regressionPre-commit hook to prevent accidental submodule regressionsDescriptionDo you find yourself (or your collaborators) constantly rolling back submodule
SHAs because someone forgot togit submodule updatebefore runninggit add .orgit commit -a …?This pre-commit plugin will prevent those nasty surprises from making their
way into your repositories.InstallationAs a git hookThe simplest way to use this package is as a plugin topre-commit.A sample configuration:repos:# […]-repo:https://github.com/erikogan/prevent-submodule-regressionrev:v0.1.3hooks:-id:prevent-submodule-regression# By default hooks only operate on plain files, which do not include# submodules. This setting has been added to the hook configuration,# and should only be necessary if you are running a version older than# 0.1.3. Keeping it here for posterity, it can safely be skipped.types:[directory]Example failure output:As a standalone scriptpip install prevent-submodule-regression [path…]If you run the script with no arguments, it will automatically find all the
configured submodules. You can also pass it a list of files to check.It will currently ignore any path that is not staged to be commit. A future
version of the script will have an argument to override that behavior.TODOIn no particular order:Actual testsWays to override the error and allow you to commit a regression.Command-lineEnvironment variablesWays to override (or disable) colorization codesCommand-lineEnvironment variablesUsage information via--helpActual command-line flag parsing
Package: prevert
Prevert iteratorTo use the prevert parser, copy the fileprevert.pyin your directory.Use# import librariesfromprevertimportdatasetimportpandasaspdIf you are using the MaCoCu corpora in the XML format, the method dataset() needs only the path of the file as the argument:# Open the dataset with the prevert parserdset=dataset("/data/monolingual/mk.xml")dsetconsists of docs where you can access the metadata bydoc.meta['attribute_name']. Docs consist of paragraphs where you can access the metadata bypar.meta['attribute_name'].Basic use:fordocindset:# iterating through documents of a datasetprint(doc.meta)# all attributesprint(eval(doc.meta['lang_distr'])[0][0])# most prominent language in the documentprint(str(doc))# whole document textforparindoc:# iterating through paragraphs of a documentprint(par.meta['id'])# specific attributeprint(str(par))# whole paragraph textprint(doc.to_prevert())# obtaining the original format
Package: prev-gen
Create a palette preview image by using a simple config fileUsage:pip install prev_genOpen upthe wikito see how everything worksCreate a file based on instructions (or just edit thepython,yaml,json, ortomlexamples)# in a python filepalette=[...]fromprev_genimportPreviewPreview(palette)or use the cli toolprev_genfor conversions with no codeExample:Inspired by the greatGruvboxtheme, where even the preview is impressiveAnd so, below is the Gruvbox palette preview recreated with this app (click for selectable text)
Package: prevhlib
PrevhThis package implements the Prevh classification algorithm.The algorithm is based in the followresearchPages 71-76.Package Documentation.User GuideThis package can be installed with the following command:pip install prevhlibDatasetThe file must be a CSV file and the header must be included.The columns must be in the following order:The features columns;The label column;The relevance column (Optional).feature1,feature2,feature3,label,relevance
10,10,10,Blue,1.0
15,15,15,Blue,1.0
20,20,20,Blue,1.0
45,45,45,Green,1.0
50,50,50,Green,1.0
55,55,55,Green,1.0
80,80,80,Red,1.0
85,85,85,Red,1.0
90,90,90,Red,1.0Python example:importprevhasphimportpandasaspd# Creates the classifierprevhClass=PrevhClassifier(pd.read_csv("irisDataCSV.csv",","))# Label recurrence in the dataset (Important to use KNR method)print(prevhClass.labelCount)# Rows count in the dataset (Important to use KNN method)print(prevhClass.rowsCount)# Calculate the dataset score using the TrainTestSplit and KFold Cross-Validation methodsTrainTestSplitScore=prevhclass.calculateScore("TrainTestSplit",algorithm="KNN",k=4,train_size=0.8,seed=42)KfoldScore=prevhclass.calculateScore("KFold",algorithm="KNR",k=35,n_splits=15,seed=42)print("TrainTestSplitScore:",TrainTestSplitScore)print("KFoldScore:",KfoldScore)Change Log0.0.9 (26/03/2022)MAJOR CHANGESAdded simple predict funtionalityAdded KNR and KNN space delimitation methodsAdded TestTrainSplit and KFold-CrossValidation score methods to evalueate databases
Package: preview-card
You can create preview card(social card) very simple and easily. With Django? Fantastic!# preview-cardAnyone can obtain data(url, image, title, description, etc) easily from plain text for showing preview card like Twitter, Facebook newsfeed.# Installing
~~~
pip install preview-card
~~~# Quick Start
~~~
from preview_card import cardview, MediaSourceTyperesult = cardview.get_data(plain_Text)
~~~# Example## CASE 1 -if article url includedCODE:~~~
from preview_card import cardview, MediaSourceType# Any Text you want including URL
plain_text = “Hi, I read some article below. How do you think?https://www.nytimes.com/2019/09/17/technology/personaltech/iphone-11-review.htmlIs it cool or not?”result = cardview.get_data(plain_Text)
~~~RESULT:~~~
ms_type     MediaSourceType.ARTICLE
urlhttps://www.nytimes.com/2019/09/17/technology/personaltech/iphone-11-review.htmlimage_urlhttps://static01.nyt.com/images/2019/09/17/business/17techfix2/17techfix2-facebookJumbo.jpgtitle       IPhone 11 and 11 Pro Review: Thinking Differently in the Golden Age of Smartphones
desc        This is not your typical gadget review. That’s because it is time to rethink when to upgrade your iPhone.
error
~~~—## CASE 2 -if youtube url includedCODE~~~
from preview_card import cardview, MediaSourceType# Any Text you want including URL
plain_text = “Hi, I watch some video below. How do you think?https://www.youtube.com/watch?v=Jzz4AEIddzYIs it cool or not?”result = cardview.get_data(plain_Text)
~~~RESULT~~~
ms_type     MediaSourceType.YOUTUBE
urlhttps://www.youtube.com/embed/Jzz4AEIddzYimage_url
title
desc
error
~~~
Package: previewer
PreviewerCommand line tool to generate montages (image previews) from video clips or folders containing images.InstallInstallffmpegif you want to generate previews for video clips.$sudoaptupdate
$sudoaptinstallffmpegInstall the latest release ofpreviewerfromPyPI$pip3installpreviewer
$previewer--helpOr installpreviewerfrom the sources$pip3installpoetry
$pip3installgit+https://github.com/essembeh/previewer
$previewer--helpUsageYou can customize the generated image:change geometry (width, height, crop, fit or fill) of the thumbnailschange the background colorshow or hide the a titleadjust the space between thumbnailsadd a border, a shadow to thumbnailsExample: generate a preview from a video clipWe can build a preview image of a video using:$previewer--crop256--shadow--title--backgroundlightblue"samples/Rick Astley - Never Gonna Give You Up.mp4"🎬Generatemontagefromvideosamples/RickAstley-NeverGonnaGiveYouUp.mp4using36thumbnails
🍺Montagegenerated./RickAstley-NeverGonnaGiveYouUp.jpgExample: generate a preview from a folder containing imagesWe can build a preview folder containing images like this:$previewer--columns5--polaroid--backgroundb2967d"samples/Rick Astley - Never Gonna Give You Up"📷Generatemontagefromfoldersamples/RickAstley-NeverGonnaGiveYouUp/containing20images
🍺Montagegenerated./RickAstley-NeverGonnaGiveYouUp.jpg
Package: previewgen
PreviewGenPreviewGen is a tool for generating previews from photo galleries at source location. Previews are created in target location where the source structure is copied but images are replaced with compressed and resized copy. Basic idea is to provide a preview of a full size gallery with a reasonable size and quality.InstalationPreviewGen is deployed to pypi and can be therefore easily installed using pip.$pipinstallpreviewgenUsageAfter installation preview-gen command should be available from command line.$preview-gen
usage:preview-gen[-h]config_fileConfig file# example config file conf.yamlscanner:source_dir:/Users/mfilippi/pg-test/sdestination_dir:/Users/mfilippi/pg-test/dpreviewer:max_width:1000max_height:1000quality:80# optional logger configlogger:# posible levels can be found at https://docs.python.org/3/library/logging.html#levelslevel:DEBUGIn the same directory the tool can be executed using$ preview-gen conf.yaml.
Package: previewlink
Preview LinkYou may have seen a preview of a link with a title, image, domain, and description when you share a link on social media.
This preview has a significant impact on the user's decision to click on or not click on that link.previewlink will help you to get the preview of a link.How it works?previewlink looks for the following tags in the page sourceOpen graph protocolTwitter cardsHTML tags (title, p, img, h1, h2)InstallationRun the following to installpipinstallpreviewlinkUsage>>>frompreviewlinkimportpreview_link>>># Generate link preview>>>preview_link("https://github.com/sreehari1997"){'title':'sreehari1997 - Overview','description':'Developer. sreehari1997 has 69 repositories available. Follow their code on GitHub.','domain':'github.com','image':'https://avatars.githubusercontent.com/u/22663556?v=4?s=400'}Developing previewlinkTo install previewlink, along with the tools you need to develop and run tests,
run the following in your virtual env$pipinstall-e.[dev]