Saravanan666/pypi-org huggingface dataset:
Package: prereform2modern
Prereform2modernПреобразует текст из дореформенной орфографии в современную. Работает в Py3.Установкаpipinstallprereform2modernЗапуск из командной строки:Длинный способpython-mprereform2modern.translit_from_string"Онъ стоялъ подлѣ письменнаго стола"Он стоял подле письменного столаКороткий способtranslit"Онъ стоялъ подлѣ письменнаго стола"Флаг-tотображает изменённые слова в старой орфографии.translit-t"Онъ стоялъ подлѣ письменнаго стола"Он{Онъ}стоял{стоялъ}подле{подлѣ}письменного{письменнаго}столаЗапуск из интерпретатора:fromprereform2modernimportProcessororig_text="Онъ стоялъ подлѣ письменнаго стола"text_res,changes,s_json=Processor.process_text(text=orig_text,show=False,delimiters=False,check_brackets=False)Выдачаtext_res: strПреобразованный текст.print(text_res)Он стоял подле письменного столаchanges: strПроизведенные изменения.print(changes)Онъ --> Он
стоялъ --> стоял
подлѣ --> подле
письменнаго --> письменногоstr_json: strСведения о всех словах и символах в формате json.importjsonjson.loads(s_json){'0':{'old_word':'Онъ','type':'word','word':'Он'},'1':{'old_word':'','type':'punct','word':' '},'2':{'old_word':'стоялъ','type':'word','word':'стоял'},'3':{'old_word':'','type':'punct','word':' '},'4':{'old_word':'подлѣ','type':'word','word':'подле'},'5':{'old_word':'','type':'punct','word':' '},'6':{'old_word':'письменнаго','type':'word','word':'письменного'},'7':{'old_word':'','type':'punct','word':' '},'8':{'old_word':'','type':'word','word':'стола'}}ПараметрыmethodProcessor.process_text(text,show,delimiters,check_brackets)text: strОригинальный текст в дореформенной орфографии.show: booleanВключает в результат заменённые слова в дореформенной орфографии. Если параметрcheck_brackets=True, то заменённые слова показываются при любом значении параметра show.delimiters: list из трех элементов типа strИспользуется для обозначения заменённых слов. Первый элемент помещается перед новым словом, а другие два элемента выделяют заменённое слово. Так, можно использовать скобки:delimiters=['','{','}']text="примеръ"пример{примеръ}Или, например, теги XML (про использование тега <choice> см.здесь):delimiters=['<choice><reg>','</reg><orig>','</orig></choice>']<choice><reg>пример</reg><orig>примеръ</orig></choice>check_brackets: booleanПомечает редакторскую правку.text='Пройдя комнату, такъ [называемую], офиціанскую'delimiters=['','{','}']check_brackets=TrueПройдякомнату,так{такъ}<choiceoriginal_editorial_correction='[называемую]'><sic></sic><corr>называемую</corr></choice>,официанскую{офицiанскую}
Package: pre-request
This framework is designed to validate params for Restful api request.We can validate complex struct and field, including Cross Field, Cross StructInstallyou can simply install it by:pip install pre-requestDocumentPre-request manual could be found at:https://pre-request.readthedocs.io/en/master/index.htmlA Simple ExampleThis is very easy to usepre-requestin your projectfromflaskimportFlaskfrompre_requestimportpre,Ruleapp=Flask(__name__)args={"userId":Rule(type=int,required=True)}@app.route("/")@pre.catch(args)defhello_world(params):fromflaskimportgreturnstr(params==g.params)what happened in this code ?Usepre-requestlibrary to import a global objectpreDefine request params rule,userIdmust be type ofintand requiredUse@pre.catch(req_params)to filter input valueUse~flask.gordef hello_world(params)to get formatted input value。Complex ExampleWe use a very complex example to show the powerful of this frameworkfromflaskimportFlaskfrompre_requestimportpre,Ruleargs={"userFirst":{"userId":Rule(type=int,required=False),"socialInfo":{"gender":Rule(type=int,enum=[1,2],default=1),"age":Rule(type=int,gte=18,lt=80),"country":Rule(required=True,deep=False)}},"userSecond":{"userId":Rule(type=int,required=False,neq_key="userFirst.userId"),"socialInfo":{"gender":Rule(type=int,enum=[1,2],default=1,neq_key="userFirst.socialInfo.gender"),"age":Rule(type=int,gte=18,lt=80,required_with="userFirst.socialInfo.age"),"country":Rule(required=True,deep=False)}}}app=Flask(__name__)app.config["TESTING"]=Trueclient=app.test_client()@app.route("/structure",methods=["GET","POST"])@pre.catch(args)defstructure_handler(params):returnstr(params)if__name__=="__main__":resp=app.test_client().post("/structure",json={"userFirst":{"userId":"13","socialInfo":{"age":20,}},"userSecond":{"userId":14,"socialInfo":{"age":21}},"country":"CN","userFirst.socialInfo.gender":1,"userSecond.socialInfo.gender":2,})print(resp.get_data(as_text=True))Use parseWe can use functionpre.parseinstead of decorator@pre.catch()args={"params":Rule(email=True)}@app.errorhandler(ParamsValueError)defparams_value_error(e):returnpre.fmt_resp(e)@app.route("/index")defexample_handler():rst=pre.parse(args)returnstr(rst)ContributingHow to make a contribution to Pre-request, see thecontributing.CoffeePlease give me a cup of coffee, thank you!BTC: 1657DRJUyfMyz41pdJfpeoNpz23ghMLVM3ETH: 0xb098600a9a4572a4894dce31471c46f1f290b087LinksDocumentaion:https://pre-request.readthedocs.io/en/master/index.htmlRelease:https://pypi.org/project/pre-request/Code:https://github.com/Eastwu5788/pre-requestIssue tracker:https://github.com/Eastwu5788/pre-request/issuesTest status:https://coveralls.io/github/Eastwu5788/pre-request
Package: presalytics
Presalytics Python LibraryThis package provides interfaces with the Presalytics.io APIs and middleware for user to interactive with presaltyics.io.For full API documentation and use, please go toDocumentation.  Quickstart templates and examples for this python client can be found at thePython Client Subpage.For more information, visithttps://presalytics.io.OverviewThe Presalytics Python Library streamlines analytic operations across analysts, executives, consultants,
and developers.  These tools enable for a simplified workflow for analysts to rapidly generate
client-ready presentation materials and web content that update in real-time and easily scale across your user-base.Our objective when building this platform is make the analyst experience as simple as possible.Set up time for new user should take less than half an hour, and all features are self-service and self-explanatory.Of course, if you have any questions or need help to get going, you cancontact usor
quickly get the help you need on ourslack channel(Join Here!).To get going quickly, you can browse ourGetting Startedpage and review
someexamples.For more advanced users and developers, you can learn more about the API by reviewing
theservice structureto build a better understanding
of the API and itssecurityfeatures.RequirementsPython 3.5+.  This client uses packages that are not yet compatible with python2.  If python2 compatiliity is needed for legacy applications, we'd love hear about your use case. The api client sub packages are python 2.7+ compatible.InstallationThe Presalytics Python Library is avialabe in python package index, and can be installed via pip:pipinstallpresalyticsYou can also keep up with the latest feature updates by install presalytics with the commandwith the command(potentially unstable):pipinstallgit+https://github.com/presalytics/python-clientContributingPresalytics.io is onGithub.  Bug reports and pull requests are strongly encouraged at
the packagerepository. If you encounter any problems or have any suggestions for
the API endpoints that this libary interacts with athttps://api.presalytics.io, please open an issue in theAPI repository.LicenseThe Presalytics Python Library can be used in any of your applications and is covered by the MIT License.  This library
exchanges infromation with other web APIs that may be proprietary and carry their own licensing restriction.  More more
information on licensing, please contactinquires@presalytics.io.
Package: presalytics-doc-converter
Presalytics API -- Doc ConverterThis Python package is automatically generated by the Presalytics.io CI/CD process.  This respository is here for reference .Please refer to thePresalytics Documentationfor further information.  The endpoints available through this client sub-package are avialable for access via itsparent packagethat can be installed via pip:pipinstallpresalytics
Package: presalytics-ooxml-automation
Presalytics API -- Ooxml AutomationThis Python package is automatically generated by the Presalytics.io CI/CD process.  This respository is here for reference.Please refer to thePresalytics Documentationfor further information.  The endpoints available through this client sub-package are avialable for access via itsparent packagethat can be installed via pip:pipinstallpresalytics
Package: presamples
presamplesPackage to write, load, manage and verify numerical arrays, calledpresamples.Initially written for scenario analysis and for the reuse of sampled data in Monte Carlo Simulations
in theBrightway LCA framework.However, the presamples package is software-generic and built on the datapackage	standard	by
Open	Knowledge	Foundation.Presamples are useful anytime values for named parameters or matrix elements need to be saved and reused.Installation: Viapiporconda(conda install --channel pascallesage presamples).Documentation: We are in the process of writing better documentation.To read our documentation "under construction", go to ourreadthedocspage.If you can't find what you are looking for, you can also try the Jupyter Notebookhere
Package: presc
PRESC: Performance and Robustness Evaluation for Statistical ClassifiersPRESC is a toolkit for the evaluation of machine learning classification
models.
Its goal is to provide insights into model performance which extend beyond
standard scalar accuracy-based measures and into areas which tend to be
underexplored in application, including:Generalizability of the model to unseen data for which the training set may
not be representativeSensitivity to statistical error and methodological choicesPerformance evaluation localized to meaningful subsets of the feature spaceIn-depth analysis of misclassifications and their distribution in the feature
spaceMore details about the specific features we are considering are presented in theproject roadmap.
We believe that these evaluations are essential for developing confidence in
the selection and tuning of machine learning models intended to address user
needs, and are important prerequisites towards buildingtrustworthy AI.It also includes a package to carry out copies of machine learning classifiers.As a tool, PRESC is intended for use by ML engineers to assist in the
development and updating of models.
It is usable in the following ways:As a standalone tool which produces a graphical report evaluating a given
model and datasetAs a Python package/API which can be integrated into an existing pipelineA further goal is to use PRESC:As a step in a Continuous Integration workflow: evaluations run as a part of
CI, for example, on regular model updates, and fail if metrics produce
unacceptable values.For the time being, the following are consideredout of scope:User-facing evaluations, eg. explanationsEvaluations which depend explicitly on domain context or value judgements of
features, eg. protected demographic attributes. A domain expert could use
PRESC to study misclassifications across such protected groups, say, but the
PRESC evaluations themselves should be agnostic to such determinations.Analyses which do not involve the model, eg. class imbalance in the training
dataThere is a considerable body of recent academic research addressing these
topics, as well as a number of open-source projects solving related problems.
Where possible, we plan to offer integration with existing tools which align
with our vision and goals.
Package: prescient
prescientSoftware for PRESCIENT (Potential eneRgy undErlying Single Cell gradIENTs), a generative model for modeling single-cell time-series.Current paper version:https://www.biorxiv.org/content/10.1101/2020.08.26.269332v1For paper pre-processing scripts, training bash scripts, pre-trained models, and visualization notebooks please visithttps://github.com/gifford-lab/prescient-analysis.DocumentationDocumentation is available athttps://cgs.csail.mit.edu/prescient.Requirementspytorch 1.4.0geomloss 0.2.3, pykeops 1.3numpy, scipy, pandas, sklearn, tqdm, annoyscanpy, pyreadr, anndataRecommended: An Nvidia GPU with CUDA support for GPU acceleration (see paper for more details on computational resources)Bugs & SuggestionsPlease report any bugs, problems, suggestions or requests as aGithub issue
Package: prescons
Presentation Console: prescons.pyThis is a “pseudo-interactive” python console for giving presentations that
involve some live coding.  It reads code from an input file and runs it line by
line.  You can move through the code by hitting the space bar.You can also switch to (and from) a normal interactive console by pressing
Ctrl-C.  This allows you to inspect, and even make changes to, the console’s
environment in the middle of a presentation.There is a video of it in action, for my Europython talk on the descriptor
protocol, at youtube.com/watch?v=D3-NZXHO5QI.  The input file can be found at
github.com/inglesp/Discovering-Descriptors/blob/master/descriptors.py.Suggestions, bug reports, patches welcome at github.com/inglesp/prescons.Usage:$ python prescons.py <filename>Alternatively, install the library from PyPI (eg with $ pip install prescons)
and then run:$ python -m prescons <filename>Tested on Posix and Windows, and with pythons 2.7 and 3.2+Thanks to Asim Ihsan (github.com/asimihsan) and Tom Close (github.com/TomClose)
for testing and ideas.
Package: pre-script
Pre ScriptUtil for executing a custom script before running any python application or script without modifying the last one.You may treat it as application pre-start hook.Use casespatching log configs for a legacy application (sometimes it's pretty hard)auto-executingdocker-compose.ymlbefore running the applicationpatching the application module (sometimes usefull for debugging)any case where you need to inject some temporary logic without modifying the application code baseInstallation$pipinstallpre-scriptExample$echoPRE_SCRIPT_ENABLED=1$echo'print("hello from pre-script")'>.pre-script.py$echo'print("hello from app")'>app.py$pythonapp.py$hellofrompre-script$hellofromappIf required, the script name can be changed viaPRE_SCRIPT_FILEenvironment variable.LicenseDistributed under the terms of the [MIT license][license],Pre Scriptis free and open source software.
Package: presearch
PresearchA Python program to syntactically query Python source codeInstalationClone the repository by runninggit clone https://github.com/dignissimus/presearchInstall the requirements usingpip install -r requirements.txtUsageCurrently the program can be run by executingpython -m presearchusage:presearch[-h]--fileFILEdirectory

Syntacticallyquerypythonsourcecode

positionalarguments:directoryThedirectorycontainingthesourcecodetoquery

options:-h,--helpshowthishelpmessageandexit--fileFILE,-fFILEThefilecontainingquerytoexecuteExamplesFinding files that import theastlibraryThe following query matches files that import theastlibraryfrompresearch.queryimportMatchQuery# Matches files that import the `ast` libraryquery=MatchQuery(lambdamodule:module.imports("ast"))Finding classes that explicitly define__init__The following query searches for class definitions, then reports back with the number of those class definitions that explicitly define__init__.frompresearch.treeimportClassDeffrompresearch.queryimportDomain,StatisticalQuery# Calculates the percentage of classes that define `__init__`query=StatisticalQuery(lambdaklass:klass.defines("__init__"),domain=Domain(ClassDef),domain_description="class definitions",match_description="classes that explicitly define __init__",)Finding__init__definitions that directly store all of their non-self arguments as attributesThis query finds all classes that define__init__then reports the number of__init__definitions that assign all of its arguments to attributes (i.e. runself.argument = argumentfor all arguments)frompresearch.queryimportDomain,StatisticalQueryfrompresearch.constraintsimportContainsMethodDefinitionfrompresearch.treeimportClassDef,Selfdefassigns_all_arguments_to_attributes(class_def):init_function=class_def.function("__init__")forargumentininit_function.non_self_arguments:ifnotinit_function.contains(Self.attribute(argument.name).assign(argument)):returnFalsereturnTrue# Calculates the proportion of class `__init__` definitions# that assign all their non-self arguments as attributesquery=StatisticalQuery(assigns_all_arguments_to_attributes,domain=Domain(ClassDef,constraints=[ContainsMethodDefinition("__init__")]),domain_description="classes defining __init__",match_description="classes whose __init__ functions assigned all non-self arguments as attributes",)
Package: present
presentA terminal-based presentation tool with colors and effects.You can also play acodio(pre-recorded code block) on a slide.presentis built onasciimatics, and it works withPython>=3.7.Check out thegalleryto see what everyone is making withpresent! You can add your slides by simplyopening an issue.InstallationYou can simply use pip to installpresent:$pipinstallpresentUsage$presentsample.mdSome controls:Quit:qPrevious slide:b, Left arrow, Page UpNext slide:n, Space bar, Right arrow, Page DownAt the end, you can pressrto restart the presentation.SyntaxSlides followMarkdownsyntax. You can check out thesample slidesfor reference.Note:Some things aren't supported yet:Effects and colors on the same slide.Effects and code on the same slide.SeparatorEach slide can be separated with a---.Slide 1

---

Slide 2HeadersLevel 1 headings become figlets, level 2 headings get underlined with-, and level 3 headings become bold.# Heading 1

## Heading 2

### Heading 3TextThis is normal text

This is **bold text**

This is `inline code`

This is a [link](www.google.com)

As Kanye West said:

> We're living the future so
> the present is our past.ListsOrdered lists become unordered lists automatically.- Item 1
    - Item 1a
    - Item 1b
    - Item 1c
- Item 2
    - Item 2aImagesImage paths are relative to the directory where your slides are kept, and where you invokepresent.![RC](images/recurse.png)Note: You can use high resolution images and tweak the terminal font size to get the best results.Code blocks```
import os

os.getcwd()
```CodiosCodios are pre-recorded playable code blocks which can be useful for live demos. You can find out how to write one in thecodiosection of the documentation.![codio](codio.yml)StyleEach slide can be styled with foreground / background colors and effects. By default, slides are black on white with no effects. You can add style to a slide by adding a comment at the beginning of the slide (after the slide separator):Slide 1

---
<!-- fg=black bg=yellow -->

Slide 2

---
<!-- effect=explosions -->

Slide 3Colors:black,red,green,yellow,blue,magenta,cyan,white.Effects:fireworks,explosions,stars,matrix,plasma. More coming soon!ContributingTheContributor's Guidehas detailed information about contributing issues, documentation, code, and tests.VersioningpresentusesSemantic Versioning. For the available versions, see the tags on the GitHub repository.LicenseThis project is licensed under the Apache License, see theLICENSEfile for details.
Package: presentable
presentableProviding a Prettier Confusion Matrix for your Command LineInstallationpresentableis available on PyPI. Install it withpip install presentable.Usagepresentableis a drop in replacement fromsklearn.metrics.confusion_matrixthat just includes some nice formatting and only ever prints to the terminal, helpful on remote hardware accessible only from the CLI.>>>confusion_matrix(gtr,pred,tabulate_args={"tablefmt":"github","floatfmt":".2f"},sklearn_args={"normalize":"all"})|Truth\Model|cat|dog||---------------|-------|-------||cat|0.17|0.17||dog|0.33|0.33|tabulate_argsandsklearn_argsare optional dictionaries to specify additional configurations arguments fortabulateand sklearn'sconfusion_matrix. Check thetabulatedocumentationandsklearndocumentationfor a list of which args are supported.Online DocumentationClick here to read the documentation
Package: presentation_api_controller
Presentation API Controller forMCTS2.5.ExampleOpen two terminals.1st terminal run controller.//TerminalOne$pythonpresentation_controller/controller.pyINFO:Runserveronaddress:127.0.0.1,port:43378Controllerrunson127.0.0.143378# 1st phaseEnterhost:And 2nd terminal run test presentation server.//TerminalTwo$pythontest/pserver.py# 1st phase[1st]Runserveronaddress:127.0.0.1,port:52608Back to 1st terminal, type pserver’shostandport.//TerminalOne$pythonpresentation_controller/controller.pyINFO:Runserveronaddress:127.0.0.1,port:43378Controllerrunson127.0.0.143378# 1st phaseEnterhost:127.0.0.1Enterport:52608Then they will talk to each other.
Package: presento
PresentoA tool to programmatically build slides.Using the excellent reveal.js library, this script helps you generate slides from Python.You can easily create markdown slides or insert charts as HTML with Plotly.Installpip install presentoor use PDM, Poetry, etc...Exampleimportplotly.expressaspxfrommarkdownimportmarkdownimportpresentop=presento.Presentation(theme="dracula",extra_style=""".reveal h2{color: #afee34;}""",)p.add_md_slide("""# title of the slideThis is a slide added directly to the presentation.It uses markdown so it can have:1. __formatting__2. [links](https://en.wikipedia.org/wiki/Markdown)3. lists""",extra_style="text-align: left;",)# for the next slide we use plotly, but we need a CDNp.add_cdn_js("https://cdn.plot.ly/plotly-latest.min.js")fig=px.scatter(x=range(10),y=range(10))p.add_html_slide(fig.to_html(include_plotlyjs=False,full_html=False))p.add_columns_slide([markdown("This is a column on the left"),fig.to_html(include_plotlyjs=False,full_html=False),# markdown("This is another column, on the right"),])# p.save_folder('my_slides')p.show(port=8090)In this example you can see that in addition to markdown slides you can add verbatim HTML, useful for example to add Plotly charts.For Plotly (and pretty much every other library) you will want to use a CDN to load the JS once and reuse it across slides. This can be done withadd_cdn_js.The functionadd_columns_slideis an helper to generate a grid layout with the provided.Theshow()method will start a server and open the browser for you.Thesave_folder(path)method writes the slides to a folder, that can be statically served.ThemingWhen creating thePresentationobject, you can pass athemeparameter corresponding to the name of one of theReveal themes. To create your own theme you need to follow the instructions on the Reveal.js website and replace it on the generated
Package: presentpy
PresentPyCreate slides from Jupyter NotebooksPresentPyallows you to take your Jupyter Notebooks and turn them into PowerPoint slides that then can be integrated into your presentation decks.InstallationI strongly recommend usingpipxto installPresentPy:pipxinstallpresentpyOtherwise, you can install it usingpipor your favorite package manager – the package is calledpresentpy.UsageTo turn a notebook into slides, simply run:presentpy[OPTIONS]nbNOTEBOOK_PATHIt also works with Python scripts:presentpy[OPTIONS]pySCRIPT_PATHCode configurationYou can configure the code cells to be displayed in the slides by adding a comment on the last line of the cell. The comment should start with#%and then you can add the following options:title: The title of the slidehighlights: A comma separated list of lines to highlight, each highlight could be a number or a range of lines separated by a dash, e.g.1,3-6,6-7For example, take the following code:defcompute_hcf(x,y):ifx>y:smaller=yelse:smaller=xforiinrange(1,smaller+1):if((x%i==0)and(y%i==0)):hcf=ireturnhcf#% title="Find the H.C.F of two numbers" highlights=1,2-3,4-5,9The code above will generate 5 slides showing the same code but highlighting different lines in each slide – see how it looks below:<iframe src="https://docs.google.com/presentation/d/e/2PACX-1vSOMEZNqOr9F3sNAxuqGvZAPMWlaRDqmc94NIOPDEzHTM8jzZ7vEAmeMZoR-o5-ZA/embed?start=false&loop=false&delayms=3000" frameborder="0" width="1280" height="449" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>You can then use these slides in your presentation deck.