Saravanan666/pypi-org huggingface dataset:
Package: ppppocr
ppppocrppppocr 是一款自动识别图片中的文字的工具类，可以自动识别图片中的文字，非常容易调用~本项目使用 PaddleOCR 的模型效果一级棒~使用非常简单pip install ppppocrimportppppocrocr=ppppOcr()# ppppOcr(model="server", lang="cn") 服务端模型 , lang 语言：cn/en/japan/koreanimage_path=r'test_images/det_images/ch_en_num.jpg'dt_boxes,rec_res=ocr.ocr(image_path)result=ocr.toText(rec_res)# 转换为文本
Package: ppprint
Python Pretty PrintA simple and lightweight Python library to use as a replacement of the defaultprint()function.Full documentation available onGithub. Feel free to submit anyfeature requestorbug report!Getting startedDownload and installpipinstallppprintStandard usefromppprintimportppprintJavaScript-like usefromppprintimportconsoleconsole.log("Hello World !")console.warn("Careful ...")console.error("Ooops something went wrong !")console.info("Climate change is real.")console.debug("this code works")
Package: pp-project-hmv
pp-project-hmvpip install pp-project-hmvBut!:import pp_project_hmv.gitignore lives outside the actual package, together with other stuffWe are using a template.toml file is needed for having a nice configuration in pypifor those things that toml does not support you need a setup.py fileThere is no reason for most people to have a setup.py file, or a setup.cfg.toml file is the newest formatVersion will be infered automatically and written to the file.This line: 'pre-commit install' will need to be run by developers to install the package
that allows the automated checks before commiting
Package: pppTest
mygmap======A simple python wrapper for Google Maps API.Use it to get the formatted address or co-ordinates of any location.The code is Python 2, but Python 3 compatible.Installation============Fast install:```pip install mygmap```For a manual install get this package:```wget https://github.com/nikhilkumarsingh/mygmap/archive/master.zipunzip master.ziprm master.zipcd mygmap-master```Install the package:```python setup.py install````Example=======```pythonfrom geo import locator# get formatted address of any locationprint locator.get_address("rohini, delhi")# get co-ordinates of locationprint locator.get_coordinates("delhi")```Here is the output:```Rohini, New Delhi, Delhi, India(28.7040592, 77.10249019999999)```
Package: ppr-handler
PprHandlerurllib.request.BaseHandlerfor URLs with schemeppr,
pointing to Python Package Resource files.UsingURLterminology,
the URL consists ofa scheme:ppran authority: module namea path: package resource file pathfor exampleppr://ppr_handler/py.typed.It also registerspprwithurllib.parseas a scheme that uses netloc and relative URLs.Installationpipinstallppr-handlerUsageimportppr_handlerfromurllib.requestimportbuild_openeropener=build_opener(ppr_handler.PprHandler())# or: opener = ppr_handler.build_opener()withopener.open("ppr://ppr_handler/py.typed")asfile:print(file.read())# b'# Marker file for PEP 561.\n'or, for global use withurllib.request,importppr_handlerfromurllib.requestimportbuild_opener,install_opener,urlopeninstall_opener(build_opener(ppr_handler.PprHandler()))withurlopen("ppr://ppr_handler/py.typed")asfile:print(file.read())# b'# Marker file for PEP 561.\n'
Package: pprint36
Backport of pprint from Python 3.9 to Python 3.6-3.8See thePython documentationfor examples and usage information.The pertinent changes from Python 3.6 to Python 3.9 are:pprintcan now pretty-printtypes.SimpleNamespace.
Contributed by Carl Bordum Hansenin Python 3.9.pprint.pphas been added to pretty-print objects with dictionary
keys being sorted with their insertion order by default. Parametersort_dictshas been added topprint.pprint,pprint.pformatandpprint.PrettyPrinter. Contributed by Rémi Lapeyre in Python 3.8.TestsPyPIActivityQAOtherInstallationpprint36can be installed from PyPI.To install withpip:$python-mpipinstallpprint36
Package: pprintast
pprintastAn AST (abstract syntax tree) pretty printer for Python 🐍.Check out the pprintast docsInstallation$pipinstallpprintastUsageusage: pprintast.py [-h] [-a] [-c cmd] [-m mode] [-t] [-v] [file]

A pretty-printing dump function for the ast module. The code was copied from the ast.dump function
and modified slightly to pretty-print.

positional arguments:
  file                   program passed in as file

optional arguments:
  -h, --help             show this help message and exit
  -a, --attributes       include attributes such as line numbers and column offsets
  -c cmd, --command cmd  program passed in as string
  -m mode, --mode mode   compilation mode (choices: exec, eval, single) (default: exec)
  -t, --terse            terse output by disabling field annotations
  -v, --version          show program's version number and exitScriptPretty print AST from afileusing thepprintastCLI.$pprintast"./path/to/script.py"Pretty print AST from astringusing thepprintastCLI.$pprintast-c"lambda a: a**2"ModulePretty print AST from astringusing thepprintastmodule.# 1. import the "pprintast" function.frompprintastimportpprintastasppast# OR: from pprintast import ppast# 2. pretty print AST from a "string".exp="lambda a: a**2"ppast(exp)LicenseMIT ©Travis Clarke
Package: pprintjson
pprintjsonA json pretty printer for Python 🐍.Check out the pprintjson docsInstallationInstall with the standardjsonJSON encoder$pipinstallpprintjsonInstall with the premiersimplejsonJSON encoder$pipinstallpprintjson[simplejson]Usageusage: pprintjson.py [-h] [-i num] [-o file] [-c cmd] [-v] [file]

A pretty-printing function for json.

positional arguments:
  file                    json <file> to pretty-print

optional arguments:
  -h, --help              show this help message and exit
  -i num, --indent num    indent <num> number of spaces at each level (default: 4)
  -o file, --output file  write output to <file> instead of stdout (default: stdout)
  -c cmd, --command cmd   json <cmd> to pretty-print
  -v, --version           show program's version number and exitScriptPretty print JSON from afileusing thepprintjsonCLI.$pprintjson"./path/to/file.json"Pretty print JSON from astdinusing thepprintjsonCLI.$echo'{ "a": 1, "b": "string", "c": true }'|pprintjsonPretty print JSON from astringusing thepprintjsonCLI.$pprintjson-c'{ "a": 1, "b": "string", "c": true }'Pretty print JSON from astringwith anindentof1.$pprintjson-c'{ "a": 1, "b": "string", "c": true }'-i1Pretty print JSON from astringand saveoutputto a fileoutput.json.$pprintjson-c'{ "a": 1, "b": "string", "c": true }'-o./output.jsonModulePretty print JSON from adictusing thepprintjsonmodule.# 1. import the "pprintjson" function.frompprintjsonimportpprintjsonasppjson# 2. pretty print JSON.obj={"a":1,"b":"string","c":True}ppjson(obj)LicenseMIT ©Travis Clarke
Package: pprint-ordered-sets
PPrint Ordered SetsThe standard librarypprintmodule, but with the feature that
all sets are ordered.Why does this package exist?This package is a backport for the bug-fixbpo-27495.
This package ensures thatsetandfrozensetobjects are always ordered, which
is not true of thepprintmodule.As of writing this, thepull request that fixes this bughas not been merged.Example>>>importpprint_ordered_setsaspprint>>>obj=set("abcdefg")>>>print(obj)# Will be different on different systems.{'d','f','b','g','e','a','c'}>>>pprint.pp(obj)# Will be same on all systems.{'a','b','c','d','e','f','g'}LicenseThis code is licensed under the Python Software Foundation license, as this
is a derivative work. My changes are adding the default ordering ofsetandfrozensetobjects, writing additional tests to cover these features, and renaming
of this module topprint_ordered_sets.TestingThis package requires no dependencies to test, simply run:python-munittesttest_pprint_ordered_sets.py
Package: pprint-star-design-pattern
Star patternThis module specially designed for fun just to print different variations of star pattern.AdvantageEasy to useReady made patternUseful for interviewers to ask pattern questions. And it reduces paper work to drawn and show to candiates.Functions available within modulevertical_single_line(n=10)vertical_left_bar_line(width=5,n=10)vertical_right_bar_line(width=5,n=10,space=50)horizontal_single_line(n=10,row=1)horizontal_upper_bar_line(width=20,row=5)left_angle_triangle(row=8)left_angle_up_side_down_triangle(row=8)right_angle_triangle(row=8)right_angle_up_side_down_triangle(row=8)pyramid(row=8)pyramid_up_side_down(row=8)square(row=5)diamond(row=8)left_angle_triangle_flip_up_down(row=8)right_angle_triangle_flip_up_down(row=8)right_shankarpali(row=8)left_shankarpali(row=8)empty_square(row=8)empty_left_side_triangle(row=8)hourglass(row=8)                                                             |vertical_parallel_bar(width=5,space=10,row=10)                               |add_vertical_empty_space(row=10)How to import pprint_star_design_pattern moduleimport pprint_star_design_patternHow to CALL star pattern functionimport pprint_star_design_pattern
pprint_star_design_pattern.diamond()ORimport pprint_star_design_pattern
pprint_star_design_pattern.diamond(row=10)ORimport pprint_star_design_pattern
pprint_star_design_pattern.diamond(10)Note :You can pass your input as positional parameter / keyword parameter or it will take deafult paramter which is set.Change LogVersion : 0.0.1 (05-MAY-2022)First ReleaseVersion : 0.0.2 (09-MAY-2022)Second Release : 3 more functions added - hourglass, vertical_parallel_bar, add_vertical_empty_spaceLICENSECopyright 2022 Vikas Bhaskar VooradiPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: pprint-tools
Фабрика декоратороввключает два декоратора, один для вывода времени выполнения, второй для вывода аргументов в консольИспользованиесмотритестыКак развернуть:gitclonepoetryshell
poetryinstallЗапустить тест(ы):pytest# монитор тестовptw
Package: pprint-torrent
pprint_torrentPretty-print the contents of torrent files!pprint_torrent can be used to inspect the contents of torrent files. The metainfo dict is pretty-printed
with indendation of sub-levels. The maximum depth can be limited as well. To keep the output compact, the long
binarypieceshash sequence is hidden from the output automatically.pieces roothashes from v2 torrents are
hexlified (both in thefile treeand in thepiece layersdict).UsageCommandline parameters:usage: pprint_torrent.py [-h] [-i INDENT] [-w WIDTH] [-d DEPTH] torrent_file

Pretty-print a given torrent file's metainfo dict to stdout.

positional arguments:
torrent_file          Path to the torrent file

options:
-h, --help            show this help message and exit
-i INDENT, --indent INDENT
                        Indentation width (default: 2)
-w WIDTH, --width WIDTH
                        Maximum width of a line (default: 200)
-d DEPTH, --depth DEPTH
                        Maximum depth to show (default: unlimited)Example command:$ pprint_torrent.py kubuntu-20.04-desktop-amd64.iso.torrent -w 100Output:{ b'announce': b'https://torrent.ubuntu.com/announce',
  b'comment': b'Kubuntu CD cdimage.ubuntu.com',
  b'creation date': 1587648815,
  b'info': { b'length': 2354036736,
             b'name': b'kubuntu-20.04-desktop-amd64.iso',
             b'piece length': 1048576,
             b'pieces': '44900 bytes (hidden in this output)'}}InstallationExecute:pip install pprint_torrent
Package: pprinty
pprintypprintyis a Python package for beautiful printing of objects.Installationpip install pprintyUsage>>>frompprintyimportpprint>>>>>>pprint({"a":{"d":"e"},"b":"f","c":["I read the letter.","Stood up.","Sat down.","Pondered for a minute."]}){'a':{'d':'e'},'b':'f','c':['I read the letter.','Stood up.','Sat down.','Pondered for a minute.']}
Package: p-privacy-metadata
IntroductionThis project implements the privacy metadata proposed in the paperPrivacy-Preserving Data Publishing in Process Mining.Python packageThe implementation has been published as a standard Python package. Use the following command to install the corresponding Python package:pipinstallp-privacy-metadataUsagefromp_privacy_metadata.privacyExtensionimportprivacyExtensionfromp_privacy_metadata.ELAimportELAfrompm4py.objects.log.importer.xesimportfactoryasxes_importer_factoryfrompm4py.objects.log.exporter.xesimportfactoryasxes_exporterimportpandasaspdevent_log="paper_sample.xes"log=xes_importer_factory.apply(event_log)# privacyExtension Partprefix='privacy:'uri='paper_version_uri/privacy.xesext'privacy=privacyExtension(log,prefix,uri)privacy.set_anonymizer(operation='suppression',level='event',target='org:resource')statistics={}statistics['no_modified_traces']=15statistics['no_modified_events']=20desired_analyses={}desired_analyses['1']='process discovery'desired_analyses['2']='social network discovery'message=privacy.set_optional_anonymizer(layer=1,statistics=statistics,desired_analyses=desired_analyses,test='test')print(message)layer=privacy.get_anonymizer(layer=1)anon=privacy.get_anonymizations()xes_exporter.export_log(log,'ext_paper_sample.xes')# ELA Parttry:log_name=log.attributes['concept:name']exceptExceptionase:log_name="No mame is given for the event log!"ela=ELA()ela_desired_analyses=['analysis 1','analysis 2']data={'Name':['Tom','nick','krish','jack'],'Age':[20,21,19,18]}df=pd.DataFrame(data)ela.set_values(origin=log_name,method='method 1',desired_analyses=ela_desired_analyses,data=df.copy())ela.create_xml('ela_paper_sample.xml')print(ela.get_values()['data'])ela=ela.read_xml("ela_paper_sample.xml")print(ela)
Package: pprodigal
PProdigal: Parallelized gene prediction based on Prodigal.This is just a small wrapper around the prodigal gene prediction program
that splits input into chunks and processes them im parallel, since prodigal
does not support multithreading by itself. The wrapper supports all command
line parameters accepted by prodigal itself, with two additional parameters
that control the parallelization:-TTASKS,--tasksTASKSnumber of prodigal processes to start in parallel (default: 20)-CCHUNKSIZE,--chunksizeCHUNKSIZEnumber of input sequences to process within a chunk (default: 2000)Due to prodigal’s self-training phase, chunks should be chosen sufficiently
large in order to avoid suboptimal results.
Package: pprof
InstallingpipinstallpproforpoetryaddpprofA Simple ExamplefromtimeimportsleepfromtypingimportListfrompprofimportcpucpu.auto_report()deffoo():sleep(1.01)return3@cpudefrun(arr:List)->float:tmp=[]cnt=foo()# comment action #1forrowinarr:# comment action #2 row 1# comment action #2 row 2ifrow%cnt==0:tmp.append(row)result=(sum(tmp*200)+len(arr))/len(tmp)# comment action #3returnresultrun(list(range(250000)))(venv)pythonrun.pyLinksline_profiler(https://github.com/pyutils/line_profiler)
Package: pprofiler
pprofilerSimple Python Decorator to Profiling Function or MethodInstallationUse the package managerpipto install pprofiler.pipinstallpprofilerUsagePython 3.8.10 (default, Jun 23 2021, 11:56:21)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.24.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from pprofiler import pprof

In [2]: @pprof(sort_by=["cumulative", "ncalls"])
   ...: def test():
   ...:     arr = []
   ...:     for i in range(0, 100_000):
   ...:         arr.append(i)
   ...:

In [3]: test()
         100002 function calls in 0.018 seconds

   Ordered by: cumulative time, call count

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.012    0.012    0.018    0.018 <ipython-input-4-87325251511f>:1(test)
   100000    0.005    0.000    0.005    0.000 {method 'append' of 'list' objects}
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}pprofiler 0.1.2 Release NotesJanuary 12, 2022ChangelogAddline_to_printparameter - to reduce output for large profiler outputAddstrip_dirsparameter - to reduce output for large profiler outputsort_byparameter now accepttupleorlistLicenseMIT
Package: pprog
pprogA library for Python programmingInstallationpip install --upgrade pprogAPIsFunctionsidentity(value, *args, **kwargs)returns the first valuevalue.perm(values, /, *, cycle)permutates a list according to a cycle notation.attrgetter(attr, ..., /, *, default)instantiates a callable object that fetches the given attribute(s) from its operand, with default value for missing attributes.itemgetter(item, ..., /, *, default)instantiates a callable object that fetches the given item(s) from its operand, with muti-level keys and default value for missing items.ClassesConstantCreator(value, /, *, copy=False)instantiates a callable object that returns the same constant when it is called.PermArgsExecutor(fun, /, *, perm=None)instantiates a callable object that swaps positional arguments according to a cyclc notation. By default, it permutates the first two arguments.Usage Examples>>>frompprogimportidentity>>>identity("value","other_input",key="other_keyword_input")'value'>>>frompprogimportperm>>>perm(["a","b","c","d","e","f","g"],[1,2,4])['a','c','e','d','b','f','g']>>>frompprogimportAttrCaller>>>caller=AttrCaller("upper")>>>caller("test")'TEST'>>>frompprogimportConstantCreator>>>creator=ConstantCreator("value")>>>creator()'value'>>>frompprogimportPermArgsExecutor>>>executor=PermArgsExecutor(range)>>>executor(4,2)range(2,4)
Package: pp-role-mining
IntroductionThis project implements the decomposition method proposed in the paperMining Roles From Event Logs While Preserving Privacy.Python packageThe implementation has been published as a standard Python package. Use the following command to install the corresponding Python package:pipinstallpp-role-miningUsagefrompp_role_mining.privacyPreservingimportprivacyPreserving#for fixed_value techniqueNoSubstitutions=2#for selective techniqueMinMax=[True,True]#if you want to perturb both lower and upper bound#for frequency_based techniqueFixedValue=0#to combine the fixed_value techniue with the frequency_based technique (FixedValue=0 is only frequency_based without any fixed value added to the number of substitutions)show_final_result=Falseevent_log="running_example.xes"# event_log = "pp_running_example.xes"technique='fixed_value'# fixed_value, selective, frequency_basedresource_aware=True#true if we want to consider resources while allocating activity substitutions. Otherwise it is FalsehashedActivities=True#if you want to produce hash of activitiesexportPrivacyAwareLog=True#if you want to export the log with the perturbed activitiesprivacy_aware_log_path="pp_"+event_log#pp=privacyPreserving(event_log)pp.apply_privacyPreserving(technique,resource_aware,exportPrivacyAwareLog,show_final_result,hashedActivities,NoSubstitutions=NoSubstitutions,MinMax=MinMax,FixedValue=FixedValue,privacy_aware_log_path=privacy_aware_log_path,event_attribute2remove=["Activity","Resource","Costs"],case_attribute2remove=["creator"])
Package: ppromptor
Prompt-Promptor: An Autonomous Agent Framework for Prompt EngineeringPrompt-Promptor(or shorten for ppromptor) is a Python library designed to automatically generate and improve prompts for LLMs. It draws inspiration from autonomous agents like AutoGPT and consists of three agents: Proposer, Evaluator, and Analyzer. These agents work together with human experts to continuously improve the generated prompts.🚀 Features:🤖 The use of LLMs to prompt themself by giving few samples.💪 Guidance for OSS LLMs(eg, LLaMA) by more powerful LLMs(eg, GPT4)📈 Continuously improvement.👨‍👨‍👧‍👦 Collaboration with human experts.💼 Experiment management for prompt engineering.🖼 Web GUI interface.🏳️‍🌈 Open Source.WarningThis project is currently in its earily stage, and it is anticipated that there will be major design changes in the future.The main function utilizes an infinite loop to enhance the generation of prompts. If you opt for OpenAI's ChatGPT as Target/Analysis LLMs, kindly ensure that you set a usage limit.ConceptA more detailed class diagram could be found indocInstallationsFrom GithubInstall Packagepip install ppromptor --upgradeClone Repository from Githubgit clone https://github.com/pikho/ppromptor.gitStart Web UIcd ppromptor
streamlit run ui/app.pyRunning Local Model(WizardLM)Install Required Packagespip install requirements_local_model.txtTest if WizardLM can run correctlycd <path_to_ppromptor>/ppromptor/llms
python wizardlm.pyUsageStart the Web Appcd <path_to_ppromptor>
streamlit run ui/app.pyLoad the Demo Project
Loadexamples/antonyms.db(default) for demo purposes. This demonstrates how to use ChatGPT to guide WizardLM to generate antonyms for given inputs.Configuration
In the Configuration tab, setTarget LLMaswizardlmif you can infer this model locally. Or choose bothTarget LLMandAnalysis LLMaschatgpt. If chatgpt is used, please provide the OpenAI API Key.Load the dataset
The demo project has already loaded 5 records. You can add your own dataset.(Optional)Start the Workload
Press theStartbutton to activate the workflow.Prompt Candidates
Generated prompts can be found in thePrompt Candidatestab. Users can modify generated prompts by selecting only 1 Candidate, then modifying the prompt, thenCreate Prompt. This new prompt will be evaluated by Evaluator agent and then keep improving by Analyzer agent. By selecting 2 prompts, we can compare these prompts side by side.ContributionWe welcome all kinds of contributions, including new feature requests, bug fixes, new feature implementation, examples, and documentation updates. If you have a specific request, please use the "Issues" section. For other contributions, simply create a pull request (PR). Your participation is highly valued in improving our project. Thank you!
Package: pprp
OverviewThis package was a remedy to there being no PyPI-published, pure-Python
Rijndael (AES) implementations, and that nothing available, in general, was
compatible with both Python2andPython3. The same is true of the PBKDF2
key-expansion algorithm.The encryptor takes a source generator (which yields individual blocks). There
are source-generators provided for both data from a variable and data from a
file. It is trivial if you'd like to write your own. The encryptor and
decryptor functions are written as generators. Decrypted data has PKCS7
padding. A utility function is provided to trim this (trim_pkcs7_padding).The implementation includes Python2 and Python3 implementations of both
Rijndael and PBKDF2, and chooses the version when loaded.The default block-size is 128-bits in order to be compatible with AES.This project is also referred to aspprp, which stands for "Pure Python
Rijndael and PBKDF2".InstallationInstall viapip:$ sudo pip install pprpExampleEncrypt and decrypt the data, and compare the results. This was copied directly
from the unit-test.passphrase='password'.encode('ASCII')salt='salt'.encode('ASCII')key_size=32data="this is a test"*100data_bytes=data.encode('ASCII')key=pprp.pbkdf2(passphrase,salt,key_size)# Create a source from available data.sg=pprp.data_source_gen(data_bytes)# Feed the source into the encryptor.eg=pprp.rijndael_encrypt_gen(key,sg)# Feed the encryptor into the decryptor.dg=pprp.rijndael_decrypt_gen(key,eg)# Sink the output into an IO-stream.decrypted=pprp.decrypt_sink(dg)# self.assertEquals(data_bytes, decrypted)NotesThe generators can take a block-size in the event that you don't want the
default. The default block-size can also be changed via the PPRP_BLOCK_SIZE
environment variable.