Saravanan666/pypi-org huggingface dataset:
Package: peerdomclient
PeerdomClientPeerdomClient is a Python client for interacting with the Peerdom API, which allows organizations to manage their data within Peerdom. This client provides a convenient way to access and perform CRUD operations on peers, roles, and circles through a simple interface.InstallationYou can install the PeerdomClient using pip:pipinstallpeerdomclientUsageTo use the PeerdomClient, you need to obtain an API key from Peerdom. Once you have the API key, you can instantiate the client and start making API calls.Here's an example of how to use the PeerdomClient:frompeerdomclientimportPeerdomClient# Initialize the clientapi_key="your-api-key"client=PeerdomClient(api_key)# Get a list of peerspeers=client.get_peers(limit=10)forpeerinpeers:print(peer)# Get details of a specific peerpeer_id="123"#replace with a peer idpeer=client.get_peer(peer_id)print(peer)# Create a new peernew_peer=client.create_peer(first_name="John",last_name="Doe",birthdate="1990-01-01")print(new_peer)# Update an existing peerpeer_id=new_peer["id"]updated_peer=client.update_peer(peer_id=peer_id,first_name="Jane",last_name="Doe",birthdate="1990-01-01")print(updated_peer)# Delete a peerclient.delete_peer(peer_id)print("Peer deleted.")Replace"your-api-key"with your actual API key and"peer-id"with the ID of the peer you want to retrieve, update, or delete.DocumentationFor more details on the available methods and parameters, please refer to theAPI documentation.ContributingContributions to the PeerdomClient are welcome! If you find a bug, have a suggestion, or want to contribute code improvements, please open an issue or submit a pull request on theGitHub repository.LicenseThis project is licensed under theMIT License.
Package: peerfeedback
Peer Feedbackpeerfeedbackis a tool that creates pairings for people that give each other feedback. It makes sure that a person is not receiving feedback from a recipient of their own feedback to reduce the likelyhood of biased feedback.RequirementsPersons to match are identified by their email addressEvery email address is mapped to two other addresses, twice (once for receiving and once more for providing feedback)Email addresses shall not be matched mutually (if personAgives feedback to personsBandC, then personsBandCare not allowd to provide feedback toA)Input is done via a MS Office Excel sheetOutput is done via a separate MS Office Excel sheetOutput format (each row in sheet):(student)(reciver1)(reciver2)(giver1)(giver2)Automatically sent emailsAlgorithm UsedGiven personsA,B,C,D,E, the following pairing will be created. The person that provides feedback is listed on the lefthand side and the feedback targets on the righthand side.`A` → `B`, `C`
`B` → `C`, `D`
`C` → `D`, `E`
`D` → `E`, `A`
`E` → `A`, `B`Which can be expressed by this general formula:n(0)..n(max-2) → n+1, n+2
n(max-1)       → n(max), n(0)
n(max)         → n(0), n(1)LicenseThis program was written by Alexander Graulmail@agraul.deand is licensed under the GNU General Public License version, either version 3 or (at your option) any later version.
Package: peerless
Peerless OptimizerDeveloped by Eve Utilswww.eveutils.comPeerless is a software that implements an optimization algorithm to solve
the following type of problemsmin f(x);
subject to g(x) >= 0,
h(x) >= 0,
lb <= x <= ubwhere:x is an element in R^n where some x_i in N (some or all can be integers)lb, ub in R^n with lb_i <= ub_i forall i in 1,...,ng : R^n -> R^m is a function that can be nonlinear, non-differentiable
or discontinuoush : R^n -> R^p is a function that can also be nonlinear, non-differentiable
or discontinuousDocumentationThe documentation can be found athttps://docs.eveutils.com/peerless/index.html.Main featuresNonlinear, non-differentiable, discontinuous.
The functions f, g and h can be of any type as long as they return similar
values when evaluated are the same point different times (more about this
later).Discrete.
Some or all the variables can be restricted to take integer values.Global.
Problems can have many local and global optima.Stochastic.
Function evaluations can be the result of a process using one or many
probability distributions.Scenarios.
A Stochastic problem can be specified by scenariosParallel and distributed.
Peerless can be executed in parallel or distributed mode
Package: peernet
pnetContinuation of previous p2p network projectsPacket Format{network id}|{packet type (any of [adv, msg, rsp, err])}|{message content}|{public key}|ENDNode TypesBasic NodeNode(
    :name Unique name within network - Should not use | or @
    :network_id ID of network to listen to - Should not use |
    :onmessage Callback to run when a message is recieved. Takes one argument
    :crypt Crypt object or None. If None, auto-generates object.
    :network_key Fernet encryption key of network. Leaving as None will disable network-level encryption
    :server_port Port to listen on
    :advertise_port Port to advertise on. Should be shared across a network
    :broadcast_interval Time between UDP advertisements
    :bind_ip IP to bind to
)Methods:.serve()- Starts server in another thread.shutdown()- Stops server.send(target: name of target peer, data: arbitrary data)- Send data to nodeNotes:Probably don't use this, it's extremely rawMake sure you use encryptiononmessageshould be a function that takes 1 argumentAdvanced NodeNode(
    :name Unique name within network - Should not use | or @
    :network_id ID of network to listen to - Should not use |
    :crypt Crypt object or None. If None, auto-generates object.
    :network_key Fernet encryption key of network. Leaving as None will disable network-level encryption
    :server_port Port to listen on
    :advertise_port Port to advertise on. Should be shared across a network
    :broadcast_interval Time between UDP advertisements
    :bind_ip IP to bind to
    :chunk_size Size of chunks in transmissions. Default 16KB should be fine
    :functions Dictionary of function name: function
)Methods:@.register(function_name: name of function)- Decorate functions with this to register them in the node. They should take 3 arguments:Node instanceOriginator node nameA readable streamThe function should then return a readable stream..send()- ReplacesNode.send.send(
    target: either a target peer name, "*" for all known peers, or a list of peer names)
    command: command name
    data: An open file object, readable stream, or bytesAll otherNodemethodsCommandNodeNode(
    :name Unique name within network - Should not use | or @
    :network_id ID of network to listen to - Should not use |
    :crypt Crypt object or None. If None, auto-generates object.
    :network_key Fernet encryption key of network. Leaving as None will disable network-level encryption
    :server_port Port to listen on
    :advertise_port Port to advertise on. Should be shared across a network
    :broadcast_interval Time between UDP advertisements
    :bind_ip IP to bind to
    :chunk_size Size of chunks in transmissions. Default 16KB should be fine
    :functions Dictionary of function name: function
)Methods:@.register(function_name: name of function)- Decorate functions with this to register them in the node. They should be of the following form:function(node: CommandNode, originator: str, *args, **kwargs) -> Any JSON EncodableSending commands:node.target("target or * or [targets]").<functionname>(*args,**kwargs)Notes:Nodes implementget_funcsandget_peerscalls automatically. Good for determining network topology.
Package: peerplays
Python Library for PeerPlaysThis is a communications library which allows interface with the Peerplays blockchain directly and without the need for a cli_wallet. It provides a wallet interface and can construct any kind of transactions and properly sign them for broadcast.When installed with pip3, also provides a command-line interface invocable at the command line aspeerplays.InstallationThe python-peerplays library has following dependencies
python3-dev
build-essential
libssl-dev
libffi-dev
libxml2-dev
libxslt1-dev
zlib1g-devMake sure that the above dependencies are installed, if not install with:$ sudo apt-get install <dependency name>Install withpip3:$ pip3 install peerplays
Package: peerprint
PeerPrintPeerPrint is a framework for sharing 3D printing tasks across a peer-to-peer network of 3D printers.MissionPeerPrint's mission is to facilitate coordination of a diverse network of 3D printers to enable efficient, reliable, and scalable 3D printing.According to the US EPA, industry and transportation contributeover 50% of all greenhouse gas emissions.While 3D printing (particularly filament) is not emissions-free, networked printing through peerprint can provide:better efficiency (fewer printers that are idle less often)eco-friendlymaterial choices, rather than new plasticwhich is recycled less than 10% of the time.lower transportation costs (transporting 1kg of filament uses way fewer boxes, packaging, and transportation volume than tens - or hundreds - of small parts)More 3D printers coordinating on the same work also means more parallelism in printing, and less disruption when one or more printers develops a problem and stops printing.IntegrationPeerPrint is not intended to be used directly, although it can be for development and monitoring purposes. Instead, it's imported as a dependency of other 3D printing software.Integration in Octoprint via the Continuous Print plugin is trackedhere. There is not currently a guide for integration, but one will emerge as part of that effort.DevelopmentInstallationInstallation for development requiresDockeranddocker-compose. Install these first, then get the repository withgit clone https://github.com/smartin015/peerprintUsageStart the test servers:docker-composebuild&&docker-composerunIn a new console, run this to start a debug shell into one of the servers:docker-compose run cli --volume=./peerprint/networking/testdata/server1/Typehelpto see a list of all commands, or see how they're implemented inpeerprint/peerprint/server.pyin theShellclass.TestingSee.travis.ymlfor CI testing configurationAll tests can also be run manually viadocker-compose run testDeployingpip3 install build twine
cd peerprint && ./build_multiarch.sh
cd .. && python3 -m build
python3 -m twine upload --repository testpypi dist/*
Package: peerpy
peerpy 1.0.0Discover and connect every device running python on a local network via TCP!This module provides a high-level API for discovering and connecting multiple devices on a local network, without the headache of implementing python's built-in socket module!Installationpip install peerpyQuick tourConnecting two devices running python is as easy, reliable and painless as 8 lines of code!Start by importing thePeerclass, which automatically detects your device's local IP and run a socket server, listening on a given port:frompeerpyimportPeerStart a peer object on the listening device:withPeer(port=54865)aspeer:# let the program run until CTRL+CwhileTrue:time.sleep(1.)Connect your second device to your listening device:withPeer(port=12152)aspeer:connection=peer.connect("192.168.0.2:54865")ifconnection:connection.send(f"Hello world from{peer.address_name}!")You can even add handlers which are executed on a separate thread on specific events, such as:defset_connection_handler(connection):connection.set_handler("data",lambdadata:print(data))withPeer(handlers={# called when socket server is listening"listen":lambdapeer:print(peer.address_name),# called when socket has established a connection"connection":set_connection_handler,# called when socket server has stopped"stop":lambdapeer:print("Peer stopped!")})aspeer:For more details on handlers and connections, please consider readingthe documentation.ExamplesTo begin with this module, please consider readingthe examplesgiven on this repository.DocumentationFor further documentation, pleaseRead The Docs!
Package: peerreach
peerreachis a python library to access the api fromhttp://peerreach.comFor more infor about the api go tohttp://peerreach.com/api/overviewThe last source code ant hte bugtracking is athttp://bitbucket.org/ferranp/peerreachInstallInstall usingpip:pip install peerreachor usingeasy_install:easy_install peerreachUsageBy now the api does not requre authentiation, so to use is:import peerreach

api = peerreach.Api()

# lookup one user by screen name
userdata = api.lookup_user(screen_name="user")

# lookup one user by user_id
userdata = api.lookup_user(user_id=12345)

# lookup various users by screen name
usersdata = api.lookup_user(screen_names=("user1", "user2"))

# lookup various users by user_ids
usersdata = api.lookup_user(user_ids=(12345, 54321))The data returned is a dictionary containing the data returned by the api.
You can change the deserializer to get the raw api response or the response as an
object:import peerreach

# with raw data
api = peerreach.Api(parser=peerreach.RawPArser())
rawdata = api.lookup_user(screen_name="user")

# with object
api = peerreach.Api(parser=peerreach.ObjectPArser())
objectdata = api.lookup_user(screen_name="user")Command LineThe package also includes a command line tool to test the api:$ peerreach --help
Usage: peerreach [options] screen_name [screen_name...]

Options:
  --version   show program's version number and exit
  -h, --help  show this help message and exit
  -i, --ids   Use twitter ids instead of screen name
  -r, --raw   Show raw peerreach api output
Package: peertube-uploader
PeerTube UploaderA script to make uploading to peertube instances easier.For documentation on the API used seehttps://docs.joinpeertube.org/api-rest-reference.htmlInstallationpip install peertube-uploaderDevelopmentpip install -r requirements.txtUsageOne installed you can run theptucommand.usage: main.py [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
               [-e ENDPOINT]

A script to make uploading to peertube instances easier. For documentation on
the API used see https://docs.joinpeertube.org/api-rest-reference.html

optional arguments:
  --version             show program's version number and exit
  -v, --verbose         Increase verbosity of output. Can be repeated.
  -q, --quiet           Suppress output except warnings and errors.
  --log-file LOG_FILE   Specify a file to log output. Disabled by default.
  -h, --help            Show help message and exit.
  --debug               Show tracebacks on errors.
  -e ENDPOINT, --endpoint ENDPOINT
                        MANDATORY! URL to a server e.g
                        https://peertube.cpy.re/ (alternatively use
                        PEERTUBE_ENDPOINT env var)

Commands:
  complete       print bash completion command (cliff)
  get-access-token  Requests an access-token from the server. (peertube-uploader)
  help           print detailed help for another command (cliff)
  import         Trigger an import of a URI (peertube-uploader)
  upload-video   Upload videos from the file-system (peertube-uploader)ThanksThanks to all thecontributors.
Package: peewee2click
peewee2click is an easy to useClickhelper to create command-line CRUDL interfaces
for yourpeeweemodels.What are command-line CRUDL interfaces?Interfaces that let youCreate,Read,Update,DeleteorListyour models via command-line.InstallationJust runpip install peewee2click.Example of useLet supose you have the followingpeeweeclass:importpeeweeclassMyClass(peewee.Model):my_char_field=peewee.CharField(max_length=8,help_text="Field to store char.")my_int_field=peewee.IntegerField(default=5,help_text="Field to store int.")To create a very basic command-line CRUDL you only need the following code:frompeewee2clickimportCRUDLimportclick@click.command(help="Creates a new myclass")@CRUDL.click_options_from_model_fields(MyClass)defcreate(**fields):CRUDL.create(MyClass,**fields)@click.command(help="Shows myclass information")@click.argument("primary_key",type=int)defshow(primary_key):CRUDL.show(MyClass,primary_key)@click.command(help="Updates myclass information")@click.argument("primary_key")@CRUDL.click_options_from_model_fields(MyClass)defupdate(primary_key,**changed_fields):CRUDL.update(MyClass,primary_key,**changed_fields)@click.command(help="Deletes an existing myclass")@click.argument("primary_key")defdelete(primary_key):CRUDL.delete(MyClass,primary_key)@click.command("list",help="Enumerate myclasses")@click.option("fields","--add-field",multiple=True,help="Shows a custom field in the result")deflist_(fields):base_fields=('id','my_char_field','my_int_field')CRUDL.list(MyClass,base_fields,extra_fields=fields)As you can see,CRUDL.click_options_from_model_fieldsgathers all the
Model fields for you, creating automatically the parameters options
“--my-char-field=<new_value>” and “-my-int-field=<new_value>” for thecreateandupdatecommands.Other commandsBesides theCRUDLmethods seen in the example above,peewee2clickalso
provides two helper functions:one_and_only_oneandmax_one. Both
provide a way of checking that arguments are passed in a proper way.Check the docstrings of the functions for further information.Running the testsInstall the develop dependencies:pip install-erequirements/develop.txt. Then runtox.You will needsqlitesupport in your Python client to run the tests.
Package: peewee-aio
Peewee-AIOAsync support forPeewee ORMFeaturesMakePeewee ORMto work asyncSupports PostgresQL, MySQL, SQLiteSupportsasyncioandtrioContains types as wellDrivers supported:aiosqliteaiomysqlaiopgasyncpgtriopgtrio_mysqlRequirementspython >= 3.8Installationpeewee-aioshould be installed using pip:$pipinstallpeewee-aioYou can install optional database drivers with:$pipinstallpeewee-aio[aiosqlite]# for SQLite (asyncio)$pipinstallpeewee-aio[aiomysql]# for MySQL (asyncio)$pipinstallpeewee-aio[aiopg]# for Postgresql (asyncio)$pipinstallpeewee-aio[asyncpg]# for Postgresql (asyncio)$pipinstallpeewee-aio[trio_mysql]# for MySQL (trio)$pipinstallpeewee-aio[triopg]# for PostgresQL (trio)Quickstartimportpeeweefrompeewee_aioimportManager,AIOModel,fieldsmanager=Manager('aiosqlite:///:memory:')@manager.registerclassRole(AIOModel):# Pay attention that we are using fields from Peewee-AIO for better typing supportid=fields.AutoField()name=fields.CharField()@manager.registerclassUser(AIOModel):# Pay attention that we are using fields from Peewee-AIO for better typing supportid=fields.AutoField()name=fields.CharField()role=fields.ForeignKeyField(Role)asyncdefhandler():# Initialize the database's pool (optional)asyncwithmanager:# Acquire a connectionasyncwithmanager.connection():# Create the tables in databaseawaitRole.create_table()awaitUser.create_table()# Create a recordrole=awaitRole.create(name='user')assertroleassertrole.id# role.id contains correct string typeuser=awaitUser.create(name="Andrey",role=role)assertuserassertuser.idrole=awaituser.role# Load role from DB using the foreign keyassertrole# role has a correct Role Type# Iterate through recordsasyncforuserinUser.select(User,Role).join(Role):assertuser# user has a corrent User Typeassertuser.idrole=awaituser.role# No DB query here, because the fk is preloaded# Change recordsuser.name="Dmitry"awaituser.save()# Update recordsawaitUser.update({"name":"Anonimous"}).where(User.id==user.id)# Delete recordsawaitUser.delete().where(User.id==user.id)# Drop the tables in databaseawaitUser.drop_table()awaitRole.drop_table()# Run the handler with your async libraryimportasyncioasyncio.run(handler())UsageTODOSync usageThe library still supports sync mode (usemanager.allow_sync):classTest(peewee.Model):data=peewee.CharField()withmanager.allow_sync():Test.create_table()Test.create(data='test')assertTest.select().count()Test.update(data='new-test').execute()Get prefetched relationsTODO# We prefetched roles hereasyncforuserinUser.select(User,Role).join(Role):role=user.fetch(User.role)# get role from user relations cacheBug trackerIf you have any suggestions, bug reports or annoyances please report them to
the issue tracker athttps://github.com/klen/peewee-aio/issuesContributingDevelopment of the project happens at:https://github.com/klen/peewee-aioLicenseLicensed under aMIT License
Package: peewee-async
peewee-asyncAsynchronous interface forpeeweeORM powered byasyncio.OverviewRequires Python 3.8+Has support for PostgreSQL viaaiopgHas support for MySQL viaaiomysqlSingle point for high-level async APIDrop-in replacement for sync code, sync will remain syncBasic operations are supportedTransactions support is present, yet not heavily testedThe complete documentation:http://peewee-async-lib.readthedocs.ioInstallInstall withpipfor PostgreSQL:pipinstallpeewee-async[postgresql]or for MySQL:pipinstallpeewee-async[mysql]QuickstartCreate 'test' PostgreSQL database for running this snippet:createdb -E utf-8 testimportasyncioimportpeeweeimportpeewee_async# Nothing special, just define model and database:database=peewee_async.PostgresqlDatabase(database='db_name',user='user',host='127.0.0.1',port='5432',password='password',)classTestModel(peewee.Model):text=peewee.CharField()classMeta:database=database# Look, sync code is working!TestModel.create_table(True)TestModel.create(text="Yo, I can do it sync!")database.close()# Create async models manager:objects=peewee_async.Manager(database)# No need for sync anymore!database.set_allow_sync(False)asyncdefhandler():awaitobjects.create(TestModel,text="Not bad. Watch this, I'm async!")all_objects=awaitobjects.execute(TestModel.select())forobjinall_objects:print(obj.text)loop=asyncio.get_event_loop()loop.run_until_complete(handler())loop.close()# Clean up, can do it sync again:withobjects.allow_sync():TestModel.drop_table(True)# Expected output:# Yo, I can do it sync!# Not bad. Watch this, I'm async!Documentationhttp://peewee-async-lib.readthedocs.iohttp://peewee-async.readthedocs.io-DEPRECATEDDevelopingInstall dependencies using pip:pipinstall-e.[develop]Or usingpoetry:poetryinstall-EdevelopRun databases:docker-composeup-dRun tests:pytesttests-v-sDiscussYou are welcome to add discussion topics or bug reports to tracker on GitHub:https://github.com/05bit/peewee-async/issuesLicenseCopyright (c) 2014, Alexey Kinevrudy@05bit.comLicensed under The MIT License (MIT),
see LICENSE file for more details.
Package: peewee-db-evolve
Diffs your models against your database, and outputs SQL to
(non-destructively) update your schema.Think of it asdb.create_tables()on steriods (which doesn’t drop
your database).You can also think of it as schema migrations, without having to
actually write the migrations.Quick StartRun:sudo pip installpeewee-db-evolveAddimport peeweedbevolveanywhere before your models are
defined.Rundb.evolve()where you would have normally rundb.create_tables(), and enjoy!ExampleSee ourHello
Worldexample.imageSupported DatabasesPostgreSQLMySQLFrequently Asked QuestionsDoes this work with existing projects, or only with new projects?This works very well with existing projects. If your API only works with
new projects, you’re probably doing it wrong.Don’t you give up control by not writing your own migrations?Managing your schema by writing your own migrations is kind of like
managing your source code by writing your ownpatchfiles in
addition to writing your actual code. A well vetteddifftool is
going to be better and faster at it than you.How old / well vetted is this tool?This project has been in production use since August 2016. (We switched
to Peewee as an ORM.) But it’s a style of schema management I’ve been
using for ~10 years now.How can I prevent ``peewee-db-evolve`` from evolving a specific table
or class?In the class’Metaclass, addevolve = Falseandpeewee-db-evolvewill ignore it. If you don’t have a class for a
specific table, just make a do-nothing dummy class for it.TestsHow to run:$python3test.py..................................................................................................----------------------------------------------------------------------Ran98testsin39.860sOK