Saravanan666/pypi-org huggingface dataset:
Package: protostrings
The :py:mod:`protostrings` distribution provides string-like objects with functional aspects, integrating well with the standard string type. Each :py:mod:`protostring` simply wraps a function dictating specific behaviours within the overarching constraints of the type. Due to their dynamic nature, features such as length or indexing are not supported. Memoizing variants of each :py:mod:`protostring` type are provided. The :py:mod:`inspect` module is required only for visualing :py:mod:`protostrings` (:py:meth:`~.LazyString.__str__`, :py:meth:`~.LazyString.__repr__`, :py:meth:`~.LazyString.pprint`), and is thus a soft requirement.>>> protostring = "alpha " + ((lazy_str + context_str_right) + context_str_both) + " omega">>> protostring.pprint(False)LazyString                      (...)LazyString                  (...)str                     'alpha 'LazyString              (...)ContextString       (...)LazyString      ()ContextString   (...)ContextString       (...)str                         ' omega'>>> str(protostring)'alpha @@everything else@@ omega'>>> "...alpha " + (context_str_right + context_str_both) + " omega..."'...alpha (everything else) omega...'
Package: protosym
FeaturesTODORequirementsTODOInstallationYou can installProtoSymviapipfromPyPI:$pipinstallprotosymUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theBSD-3-clause license,ProtoSymis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: protosync
ProtosyncProtosync syncs code seamlessly between your local development repo and a remote server.No more repeated git commits or long rsync commands just to test code out on the server.Installpip install protosyncQuick StartIn yourremotedirectory, open anew terminaland enter:protosync destProtosync will then print a command like this:protosync source m0X1a-km0C6mCzWkl56xO0-hUQvYrhL0q5I5lK5qZgU=Run this command in yourlocalsource directory.And that's it!You local code will now be synced to the remote server.Just enter the same command whenever you want to sync again.Note:you'll need to keep the remote terminal running for the sync to work.FactsProtosync uses your.gitignoreto automatically ignore unnecessary files.Protosync ignores files larger than5Mbto prevent syncing of unwanted binaries.Protosync usesend-to-end encryptionwhen syncing your files. The servercannotdecrypt your data.
Package: prototools
prototools__       __            __  
    ___  _______  / /____  / /____  ___  / /__
   / _ \/ __/ _ \/ __/ _ \/ __/ _ \/ _ \/ (_-<
  / .__/_/  \___/\__/\___/\__/\___/\___/_/___/
 /_/prototoolsis a set of tools that considerably reduce the amount of time
spent writing console applications.Installationprototoolsis available onPyPi(MIT license)
and installation can be performed by runningpippython -m pip install prototoolsTo upgrade the package:python -m pip install prototools --upgrade📝 It's recommended to use virtual environment.To delete the package:python -m pip uninstall prototoolsDocumentationYou can read the documentation athereContributionYou can contribute withprototoolsin so many ways (not just coding).
Every idea is welcome! You can suggest new features or report a bug when
you find it. Every contribution that you made it'll be mention in this
project.
Package: proto-topy
A Python package thattakes astrcontaining protobuf messages definitionsreturns atypes.ModuleTypeinstanceIt is useful for programs needing to en/decode protobuf messages for which the definition is provided as a string at runtime.Installationpip install proto-topyPrerequisite:proto-topyneedsprotocto be installed. On macOS, a simplebrew install protobufshall suffice.single proto example: address bookAdaptation of theprotocolbuffersexample:importrequestsfrompathlibimportPathfromproto_topyimportProtoModule# Retrieve protobuf messages definitions as a stringexample_source=requests.get("https://raw.githubusercontent.com/protocolbuffers/protobuf/main/""examples/addressbook.proto").textexample_path=Path("protocolbuffers/protobuf/blob/main/examples/addressbook.proto")# Compile and importmodule=ProtoModule(file_path=example_path,source=example_source).compiled()# Produce a serialized address bookaddress_book=module.py.AddressBook()person=address_book.people.add()person.id=111person.name="A Name"person.email="a.name@mail.com"phone_number=person.phones.add()phone_number.number="+1234567"phone_number.type=module.py.Person.MOBILEwithopen("address_book.data","wb")aso:o.write(address_book.SerializeToString())# Use a serialized address bookaddress_book=module.py.AddressBook()withopen("address_book.data","rb")asi:address_book.ParseFromString(i.read())forpersoninaddress_book.people:print(person.id,person.name,person.email,phone_number.number)multiple protos exampleWhen several.protoneed to be considered, use aProtoCollection:importsysfrompathlibimportPathfromproto_topyimportProtoModule,ProtoCollectionmodule1=ProtoModule(file_path=Path("p1/p2/other2.proto"),source="""syntax = "proto3";import "google/protobuf/timestamp.proto";message OtherThing2 {google.protobuf.Timestamp created = 1;};""")module2=ProtoModule(file_path=Path("p3/p4/test6.proto"),source="""syntax = "proto3";import "p1/p2/other2.proto";message Test6 {OtherThing2 foo = 1;};""")collection=ProtoCollection(module1,module2).compiled()sys.modules.update({proto.name:proto.pyforprotoincollection.modules.values()})print(sys.modules['test6'].Test6,sys.modules['other2'].OtherThing2)Stream of delimited messagesTo decode a stream of contiguous protobuf messages of the same type, useDelimitedMessageFactory. Example:fromioimportBytesIOfrompathlibimportPathfromproto_topyimportProtoModule,DelimitedMessageFactory# Generate Python modulemodule=ProtoModule(file_path=Path("int32_streams.proto"),source="""syntax = "proto3";message TestInt { int32 val = 1; };""").compiled()# Feed a DelimitedMessageFactory with a sequence of TestInt instances for a range of 10 intsintegers=(module.py.TestInt(val=val)forvalinrange(10))factory=DelimitedMessageFactory(BytesIO(),*integers)# Rewind and read the stream of 10 protobuf messagesfactory.rewind()foroffset_valinfactory.message_read(module.py.TestInt):print(f"TestInt message of val set to{offset_val[1]}")
Package: prototorch
ProtoTorch: Prototype Learning in PyTorchTensorflow users, see:ProtoFlowDescriptionThis is a Python toolbox brewed at the Mittweida University of Applied Sciences
in Germany for bleeding-edge research in Prototype-based Machine Learning
methods and other interpretable models. The focus of ProtoTorch is ease-of-use,
extensibility and speed.InstallationProtoTorch can be installed usingpip.pipinstall-UprototorchTo also install the extras, usepipinstall-Uprototorch[all]Note: If you're usingZSH(which is also the default
shell on MacOS now), the square brackets[ ]have to be escaped like so:\[\], making the install commandpip install -U prototorch\[all\].To install the bleeding-edge features and improvements:gitclonehttps://github.com/si-cim/prototorch.gitcdprototorch
gitcheckoutdev
pipinstall-e.[all]DocumentationThe documentation is available athttps://www.prototorch.ml/en/latest/. Should
that link not work tryhttps://prototorch.readthedocs.io/en/latest/.ContributionThis repository contains definition forgit hooks.Pre-commitis automatically installed as development
dependency with prototorch or you can install it manually withpip install pre-commit.Please install the hooks by running:pre-commitinstall
pre-commitinstall--hook-typecommit-msgbefore creating the first commit.The commit will fail if the commit message does not follow the specification
providedhere.BibtexIf you would like to cite the package, please use this:@misc{Ravichandran2020b,author={Ravichandran, J},title={ProtoTorch},year={2020},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/si-cim/prototorch}}}
Package: prototorch-models
ProtoTorch ModelsPre-packaged prototype-based machine learning models using ProtoTorch and
PyTorch-Lightning.InstallationTo install this plugin, simply run the following command:pipinstallprototorch_modelsInstalling the models plugin should automatically install a suitable version
ofProtoTorch. The plugin should then
be available for use in your Python environment asprototorch.models.Available modelsLVQ FamilyLearning Vector Quantization 1 (LVQ1)Generalized Learning Vector Quantization (GLVQ)Generalized Relevance Learning Vector Quantization (GRLVQ)Generalized Matrix Learning Vector Quantization (GMLVQ)Limited-Rank Matrix Learning Vector Quantization (LiRaMLVQ)Localized and Generalized Matrix Learning Vector Quantization (LGMLVQ)Learning Vector Quantization Multi-Layer Network (LVQMLN)Siamese GLVQCross-Entropy Learning Vector Quantization (CELVQ)Soft Learning Vector Quantization (SLVQ)Robust Soft Learning Vector Quantization (RSLVQ)Probabilistic Learning Vector Quantization (PLVQ)Median-LVQOtherk-Nearest Neighbors (KNN)Neural Gas (NG)Growing Neural Gas (GNG)Work in ProgressClassification-By-Components Network (CBC)Learning Vector Quantization 2.1 (LVQ2.1)Self-Organizing-Map (SOM)Planned modelsGeneralized Tangent Learning Vector Quantization (GTLVQ)Self-Incremental Learning Vector Quantization (SILVQ)Development setupIt is recommended that you use a virtual environment for development. If you do
not useconda, the easiest way to work with virtual environments is by usingvirtualenvwrapper. Once
you've installed it withpip install virtualenvwrapper, you can do the
following:exportWORKON_HOME=~/pyenvs
mkdir-p$WORKON_HOMEsource/usr/local/bin/virtualenvwrapper.sh# location may varymkvirtualenvptOnce you have a virtual environment setup, you can start install themodelsplugin with:workonpt
gitclonegit@github.com:si-cim/prototorch_models.gitcdprototorch_models
gitcheckoutdev
pipinstall-e.[all]# \[all\] if you are using zsh or MacOSTo assist in the development process, you may also find it useful to installyapf,isortandautoflake. You can install them easily withpip.Also,
please avoid installing Tensorflow in this environment. It is known to cause
problems with PyTorch-Lightning.ContributionThis repository contains definition forgit hooks.Pre-commitis automatically installed as development
dependency with prototorch or you can install it manually withpip install pre-commit.Please install the hooks by running:pre-commitinstall
pre-commitinstall--hook-typecommit-msgbefore creating the first commit.The commit will fail if the commit message does not follow the specification
providedhere.FAQHow do I update the plugin?If you have already cloned and installedprototorchand theprototorch_modelsplugin with the-eflag viapip, all you have to do is
navigate to those folders from your terminal and dogit pullto update.
Package: prototurk
A simple server and script for rapidly prototyping Mechanical Turk
interfaces.prototurk serverThe ProtoTurk package providesprototurk, aBottle-based
webserver for rapidly prototyping Mechanical Turk interfaces.prototurktakes Mechanical-Turk compatible HTML templates and CSV
files as arguments:prototurk [--host hostname] [--port port_number] html_file csv_fileand starts a webserver that, by default, listens on localhost
port 8080.prototurkre-reads the HTML template and CSV file from
disk with every page refresh.  When a user submits the HTML template’s
form, the form parameters are logged to stdout.prototurkdoes not save any data to database or disk.  If you need
to run a Mechanical Turk-style server in your Local Environment,
please take a look atTurkle.prototurk-populate scriptThe ProtoTurk package also includesprototurk-populate, a simple
script that takes as arguments the path to a Mechanical-Turk
compatible HTML template, the path to a CSV file, and the (1-indexed)
row number for the data to use from the CSV file:prototurk-populate [--output-file OUTPUT_FILE] html_file csv_file csv_row_numberThe script outputs a populated HTML template, where the template
variables have been replaced with values from the row of the CSV file.
By default,prototurk-populatewrites the populated HTML template
to stdout, but the--output-fileflag can alternately be used to
write the populated output directly to a (UTF-8 encoded) file.prototurk-populatemakes it easier to validate Mechanical Turk
template files using HTML and JavaScript validation tools.  Most
popular HTML/JavaScript will generate errors about Mechanical
Turk-style template variables.prototurk-populatemakes it easier
to validate populated templates with real data, particularly as part
of Continuous Integration workflows.InstallationProtoTurk can be installed using:python setup.py installOr from PyPI:pip install prototurk
Package: prototxt-parser
prototxt-parserprototxt-parser allows to parse*.prototxtfiles to python dict objectsUsage:From command line from this repo:$ python3 prototxt_parser_main.py prototxt_fileAlternatively can use pip as well to get the package:pip3 install prototxt-parserTo run, from python:input_string=...# the prototxt string to be parsed e.g., open("some_prototxt_file").read()fromprototxt_parser.prototxtimportparseparsed_dict=parse(input_string)
Package: prototypal
prototypalThis is an experimental module I created to see if I could get Javascript-like prototypes implemented in Python 3. It's
not Pythonic but it works. Feel free to PR if you want to contribute to it.Usagefromprototypal.prototypeimport*# create a new type using @constructor@constructordefPerson(this,first,last):this.firstName=firstthis.lastName=last# initialize an instancebird=Person('Charlie','Parker')print(bird.firstName)# Output: 'Charlie'print(bird.lastName)# Output: 'Parker'# dynamically add attributesbird.instrument='alto sax'print(bird.instrument)# Output: 'alto sax'# unset attributes just return Noneprint(bird.age)# Output: None# add methods to the instancedefsing(this):print('%ssings!!'%this.lastName)bird.sing=sing.__get__(bird)bird.sing()# Output: 'Parker sings!!'# use the prototype chain to add properties and methods to the typedefgetName(this):return'%s%s'%(this.firstName,this.lastName)Person.prototype.name=property(getName)print(bird.name)# Output: 'Charlie Parker'defgreet(this):print('Hello, my name is%s'%this.name)Person.prototype.greet=greet.__get__(bird)bird.greet()# Output: 'Hello, my name is Charlie Parker'monk=Person('Thelonious','Monk')monk.greet=greet.__get__(monk)monk.greet()# Output: 'Hello, my name is Thelonious Monk'# property setterdefsetName(this,name):first,last=name.split(' ')this.firstName=firstthis.lastName=lastPerson.prototype.name=property(getName,setName)bird.name='Dizzy Gillespie'print(bird.firstName)# Output: 'Dizzy'print(bird.lastName)# Output: 'Gillespie'# property deleterdefdeleteName(this):print('Deleting%s.'%this.name)delthis.firstNamedelthis.lastNamePerson.prototype.name=property(getName,setName,deleteName)delbird.name# Output: 'Deleting Dizzy Gillespie.'print(bird.name)# Output: 'None None'# using prototype inheritancefather=Person('Tom','Bard')son=Person('Tommy','Bard')son.__proto__=fatherfather.eyeColor='blue'print(son.eyeColor)# Output: 'blue'# prototype chain relationshipsassertson.__proto__==fatherassertson.constructor==father.constructor==Personassertfather.__proto__==Person.prototypeassertObject.prototype.constructor==ObjectassertPerson.prototype.constructor==PersonassertPerson.prototype.__proto__==Object.prototype# should work with listsfather.children=[son]print(len(father.children))# Output: 1######################################################### Usage of the new features# Creating a prototype with attributesjane=create_prototype(first='Jane',last='Doe')# Chaining prototypesparent_proto=create_prototype(eye_color='blue')child_proto=chain_prototypes(parent_proto)# Cloning a prototypeclone_jane=clone_prototype(jane)# Dynamic attribute settingjane.middle='Ann'# Representation customizationprint(jane)# Output: <Proto object at 0x...>
Package: prototype
The original author is Toby Ho. Seehttp://tobyho.com/Prototype_Inheritence_in_PythonI (Jonathan Gardner) am assuming the code is in the public domain since I
can’t find any license information anywhere.I’ve adapted this by making very tiny changes:
* Adding a setup script
* Modifying the attribute getter to raise an AttributeException if the
attribute is mising, instead of returning None.
* Moving doc.py to the module’s doc string.
Package: prototype-learning
prototype_learningA package for learning interpretable prototypes for prediction tasks.Installation$pipinstallprototype_learningUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licenseprototype_learningwas created by Anton Matsson. It is licensed under the terms of the MIT license.Creditsprototype_learningwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: prototypes
PrototypesSummaryPrototypes allow you to define signatures for your functions and
verify those signatures during both static type checking and runtime.Installation$ pip install prototypesRequirementstyping-extensions>= 3.10 when using Python < 3.10Basic usageTo validate your function against prototype, decorate your function with
theprototypedecorator and pass the prototype function as a parameter.fromprototypesimportprototypedefadd(x:int,y:int)->int:...@prototype(add)defcustom_add(x:int,y:int)->int:returnx+yStatic type checking is fully supported thanks to usage of bothtyping.TypeVar(PEP 484) andtyping.ParamSpec(PEP 612) under the hood.fromprototypesimportprototypedefadd(x:int,y:int)->int:...# This will report type error by static type checkers like `mypy` in the future@prototype(add)defcompute()->None:passAdvanced usagePrototype functions does not have to be empty. They can be regular functions
that already contain specific implementation. The prototype function act
more like a signature template for the function, rather than an empty shell
to be filled with the implementation.fromprototypesimportprototypedefadd(x:int,y:int)->int:returnx+y@prototype(add)defcustom_add(x:int,y:int)->int:...returnadd(x,y)By default, theprototypedecorator verifies the signatures during runtime. Since
decorators are executed during the function definition, this validation is performed
right away, even if function is never called.>>>fromprototypesimportprototype>>>>>>defadd(x:int,y:int)->int:......>>>@prototype(add)...defcompute()->None:...pass...Traceback(mostrecentcalllast):...prototypes.PrototypeError:IncompatiblefunctionimplementationforgivenprototypeFunction:defcompute()->None@computePrototype:defadd(x:int,y:int)->int@addHowever, since closures (inner functions) are defined on function execution,
usingprototypedecorator in the closure will have no effect until the outer
function is called.>>>fromprototypesimportprototype>>>>>>defadd(x:int,y:int)->int:......>>>deffunc()->None:...@prototype(add)...defcompute()->None:.........>>># No exception is raised at that point>>>func()Traceback(mostrecentcalllast):...prototypes.PrototypeError:IncompatiblefunctionimplementationforgivenprototypeFunction:defcompute()->None@func.<locals>.computePrototype:defadd(x:int,y:int)->int@addThe runtime validation can be turned off when static type checking is performed
to increase the code performance during runtime.>>>fromprototypesimportprototype>>>>>>defadd(x:int,y:int)->int:......>>>@prototype(add,runtime=False)...defcompute()->None:...pass...>>># No exception is raised during runtimeBugs/RequestsPlease use theGitHub issue trackerto submit bugs or request features.LicenseCopyright Krzysztof Przybyła, 2021.Distributed under the terms of theMITlicense.
Package: prototyping-inference-engine
Pie : Prototyping Inference EnginePie is aninference enginelibrary that allows to easily builds software prototypes. The goal is to allow to build quickly any software prototype which needs an inference engine.
This library supports existential disjunctive rules (which areDisjunctive Datalogrules with existentially quantified variables in the conclusion),forward chaining,backward chainingand heterogeneous sources of data.** Warning : this library is still in its infancy and big modifications of its interfaces could still be done. **ProgressionAPI: 80% doneDlgp Parser: 75% doneHomomorphism: 50%Backward chaining: 90%Forward chaining: 0%PackagesAPIThe API comprises the essential classes of the library : terms, atoms, atom sets, fact bases, ontologies, queries and so on.AppsThe apps package contains some example applications with some dlgp file examplesBackward chainingThe backward chaining packages contains classes that allow to rewrite queries (more precisely, one can rewrite union of conjunctives queries with disjunctive existential rules)ParserThere is, for now, one parser : the dlgp parser, which supports an extended version of thedlgp 2.1 formatwhere disjunction in the queries and the head of the rules is allowed.
Package: protowhat
protowhatprotowhatis a utility package required byshellwhatandsqlwhatpackages, used for writing Submission Correctness Tests SCTs for interactive Shell and SQL exercises on DataCamp. It contains shared functionality related to SCT syntax, selectors and state manipulation.If you are new to teaching on DataCamp, check outhttps://instructor-support.datacamp.com.If you want to learn what SCTs are and how they work, visitthis articlespecifically.For a deep dive inprotowhat, consulthttps://protowhat.readthedocs.io.Installationpyenv local 3.9.0
pip3.9 install protowhat   # install from pypi
make install            # install from sourceTestingpip3.9 install -e .
pytestLicense
Package: protowire
Write protobuf messages from the command line:pw (field number) [data type] (value) > output.binwheredata typeis one of theprotobuf datatypes(orint=int32=int64). Ifvalueis not given, it is read from STDIN.
The field number can be omitted and defaults to 1.This enables creating protobuf messages for GRPC calls or other purposes without a protobuf compiler.
Thepwtool has no library dependencies (plain Python 2) and does not need the.protofiles or any code generated from them.See theproject Github pagefor full documentation.
Package: prot-view
# Prot-ViewProt-View is a tool to easily visualize and compare distributions of biochemical features for protein datasets (https://github.com/michelle-an/ProtView).## InstallationRun the following to install:
pip install prot-view## Usage# Developing prot-view
To install prot-view, along with the tools you need to develop and run tests, run the following in your virtualenv:
‘’’bash
$ pip install -e .[dev]