Saravanan666/pypi-org huggingface dataset:
Package: p1exporter
P1 Reader and Prometheus ExporterA simple reader and Prometheus exporter to expose metric from Belgian/Dutch digital smart meters over the P1 port.Usage$ pip install p1exporter
$ p1exporter
ts=2022-03-08T19:08:26 level=INFO caller=__main__ msg=Got telegram with 22 keys
ts=2022-03-08T19:08:27 level=INFO caller=__main__ msg=Got telegram with 22 keys
...

$ curl localhost:8080
...
# HELP p1_electricity_power_in_kw Instantaneous electricity power delivered to client (+P) in kW
# TYPE p1_electricity_power_in_kw gauge
p1_electricity_power_in_kw 0.511
# HELP p1_electricity_power_out_kw Instantaneous electricity power delivered by client (-P) in kW
# TYPE p1_electricity_power_out_kw gauge
p1_electricity_power_out_kw 0.0
...>>> from p1exporter import P1Reader
>>> with P1Reader() as p1_reader:
...   p1_reader.read()
...
{'0-0:96.1.4': '50216', '0-0:96.1.1': '3153414731313030323932303039', '0-0:1.0.0': '220308191245W', '1-0:1.8.1': '000877.698', '1-0:1.8.2': '000841.449', '1-0:2.8.1': '000000.000', '1-0:2.8.2': '000000.021', '0-0:96.14.0': '0001', '1-0:1.7.0': '00.492', '1-0:2.7.0': '00.000', '1-0:21.7.0': '00.492', '1-0:22.7.0': '00.000', '1-0:32.7.0': '240.4', '1-0:31.7.0': '002.85', '0-0:96.3.10': '1', '0-0:17.0.0': '999.9', '1-0:31.4.0': '999', '0-0:96.13.0': '', '0-1:24.1.0': '003', '0-1:96.1.1': '37464C4F32313231303236323333', '0-1:24.4.0': '1', '0-1:24.2.3': '01225.316'}TodoRun tests in CIConfigurable serial deviceConfigurable listen address:portReferences:https://www.netbeheernederland.nl/_upload/Files/Slimme_meter_15_a727fce1f1.pdfhttps://maakjemeterslim.be/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBclFDIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6287e20f84bfe127b2c7687ff4e82e3f32394293/e-MUCS%20-%20P1%20v%201.4.pdf?disposition=attachmenthttps://jensd.be/1183/linux/read-data-from-the-belgian-digital-meter-through-the-p1-port
Package: p1-gpstime
GPS-aware datetime moduleThis package provides GPS time conversion utilities, including a
gpstime subclass of the built-in datetime class with the addition of
GPS time parsing and conversion methods.Leap second data, necessary for GPS time conversion, is expected to be
provided by the core libc Time Zone Database tzdata (on linux).  If
for some reason the tzdata leapsecond file is not available, a local
cache of the IETF leap second record will be maintained:https://www.ietf.org/timezones/data/leap-seconds.listThe package can be executed as a command-line GPS conversion utility.
that uses the gpstime module is also included.  It is a rough
work-alike to LIGO "tconvert" utility.
Package: p1-helpers
p1_helpersPackage with common helper functions we use all the time.
We use it to reduce code repeating and unify common processes.$treep1_helpers/
p1_helpers/
├──dbg.py
├──io_.py
├──parser.py
├──printing.py
├──s3.py
└──system_interaction.pyPackage contentsdbg.py- debugging wrappers, logging, assertion wrappersio_.py- input output, files/folders managementparser.py- Argparse extendsprinting.py- printing helperss3.py- AWS S3 interactionsystem_interaction.py- CLI wrappersBuild packageBuild$python-mbuild--no-isolationWill createdist/folder with package.Test your package with local installationUpload package to pypi.orgTest uploadBefore upload on pypy.org try to upload using test.pypi.org server,
more info herehttps://packaging.python.org/guides/using-testpypi/.Register separate account herehttps://test.pypi.org/Create token.Update your~/.pypirc[testpypi]username=__token__password=Your_token_from_test_pypi_org_hereCheck your upload$python-mtwineupload--repositorytestpypidist/*Production uploadGenerate tokenhttps://pypi.org/manage/account/token/Edit or create a~/.pypircfile with following structure:[pypi]username=__token__password=Your_token_hereUpload package using twine.$python-mtwineupload--repositorypypidist/*
Package: p1ufcg
p1ufcgp1ufcgé um pacote com ferramentas para o apoio às disciplinas de
Programação 1 da Computação@UFCG.Como instalarpip3 install p1ufcgInclui...A ideia é que op1ufcginclua de uma única vez vários pacotes e
módulos que são úteis no contexto da disciplina, facilitando sua
instalação por parte do estudante. Abaixo uma lista do que é
instalado com a atual versão.comandosp1Estes comandos permitem interagir com o site de atividades da
disciplina, através do shell, em interface de linha de comando.p1 login: para fazer login no sitep1 logout: para fazer logoutp1 checkout: para baixar o diretório e arquivos de atividadesp1 commit: para registrar respostas de atividadespackagesPacotes com ferramentas para testes que são instalados:tstpytestepytest-tstmódulosArray
Package: p2
%p2'make'*.plimstatic/*.scssPlayerTwoiswatchingabout6files:(' base.plim content.plim index.plim oldcontent.plim oldindex.plim ''static/index.scss')FIGHT!makepython-mscss<static/index.scss>static/index.cssplimc-H-oindex.htmlindex.plimCONTINUE?content.plimchangedFIGHT!makepython-mscss<static/index.scss>static/index.cssplimc-H-oindex.htmlindex.plimCONTINUE?^CGAMEOVERInstallationpip install p2
Package: p2api
TheESOPhase 2Application Programming Interface (API) uses the lightweightJSONstandard as data format to exchange information between your application and the Phase 2 server at ESO. In order to program more conveniently against the API, it is helpful to create small,language-specific bindingsto the API. We provide a simple example binding for Python, i.e. p2api.As of version 1.0.3: support for <url>,<access_token> constructor.As of version 0.97.2: support for La Silla.Please see theESO-USD p2apipage for more details.
Package: p2esm
P2 Execution Sequence MergerThis tool allows to merge the execution sequence of two (or more) ESO instruments (e.g., HARPS and NIRPS)
and to visualize the observability of the targets over the night.
It also keeps track of already observed targets.InstallationThe p2esm package can be installed using pip with the following command:pip install p2esmSettingsYou first need to create ap2esm.tomlconfig file.
Thep2esmapplication looks for this file either in the current folder or in the~/.configfolder.
A samplep2esm.tomlis providedhere.
Default parameters are set for observing with HARPS and NIRPS at La Silla.
The user and password should be the same as the ones used to login on the ESO P2 website.UsageLaunchp2esmand login on P2 with your navigator.Add OBs in the execution sequences (in the navigator). You should see them appear inp2esm's plot.Right click on the plot to set the observations starting time.Once the observations have started,p2esmkeeps track of the currently running OB and the starting time should be updated automatically.Left click on an OB to switch instruments just after this OB.Black vertical lines highlight instrument changes.The red vertical line shows the current time.Already exectuted OBs are shown with pale colors. It may happen from time to time that an executed OB disappears (ticket open at ESO Helpdesk), it does not mean that the OB failed.Scheduled OBs that do not fulfill the airmass or moon separation constraints or cross the zenith are highlighted with dotted lines.p2esmis only a visualization tool. It does not affect the execution sequences in any way and it does not warn the TO of the instrument changes you schedule.You can closep2esm, reopoen it at any time. The execution sequences will be reloaded, but you will lose the scheduled instrument changes.ContributeEveryone is welcome to open issues and/or contribute code via pull-requests.
A SWITCH edu-ID account is necessary to sign in tohttps://gitlab.unige.ch.
If you don't have an account, you can easily create one athttps://eduid.ch.
Then you can sign in tohttps://gitlab.unige.chby selecting "SWITCH edu-ID" as your organisation.
Package: p2-overload
Overload python functions to behave diffrently depending on number and types of arguments.Installpip install p2-overloadUsagefrom overload import *

# types and number or agrs:
@overload(int)
def quantify(n):
    return 'quantify' * n

@overload(str)
def quantify(s):
    return s * 2

@overload(str, int)
def quantify(s, n):
    return s * n

assert quantify(2) == 'quantifyquantify'
assert quantify('bye') == 'byebye'
assert quantify('xy', 3) == 'xyxyxy'

# predicates on args
@overload(int, int)
def step(start, step):
    return start + step

@overload(int, callable)
def step(start, succ):
    return succ(start)

# use tuple of types
@overload((list, tuple))
def twice(coll):
    return coll + coll

# use custom predicates
from whatever import _

@overload(_ < 2) # same as lambda x: x < 2
def fib(n):
    return n

@overload(int)
def fib(n):
    return fib(n-1) + fib(n-2)TODOsupport named and optional argumentsellipsis
Package: p2p0mq
p2p0mqp2p0mq is anopen source,
MIT licensed,0mq-basedlibrary for creating peer-to-peer networks.Installpip install p2p0mqYou can also download/clone the source, in which case you have to:git clone https://github.com/pyl1b/p2p0mq.git
python setup.py installTo contribute a patch clone the repo, create a new branch, install in
develop mode:python setup.py develop
Package: p2p-arcade
p2p-arcadeThis is a demonstration package illustrating the use of python_banyan in creating
a peer-to-peer game using arcade.InstallWindows:pip install p2p-arcadeLinux/macOSsudo pip3 install p2p-arcadeusage: p2p_arcade.py [-h] [-b BACK_PLANE_IP_ADDRESS] [-n PROCESS_NAME]
                     [-p PLAYER]

optional arguments:
  -h, --help            show this help message and exit
  -b BACK_PLANE_IP_ADDRESS
                        None or Common Backplane IP address
  -n PROCESS_NAME       Banyan Process Name Header Entry
  -p PLAYER             Select player 0 or 1After installation,  to run the demo on a single computer, start player 0 (the coins) by opening a terminal and typing:p2paNext open a second terminal and type:p2pa-p1This will open player 1's window (the human sprite). Move the mouse into this window, click the left mouse button
to start the coins moving. Now click the right mouse button and start to collect the coins.If you wish to run this as a distributed application, after opening up player 0's window, note the IP address being
used by the backplane.************************************************************
Arcadep2pplayer0usingBackPlaneIPaddress:192.168.2.192
SubscriberPort=43125PublisherPort=43124LoopTime=0.0001seconds
************************************************************192.168.2.192 is the address that the backplane selected.Now to start a second copy of p2pa on the second computer, specifying both
player 1 with the -p 1 option and the backplane address with the -b option.
Use the IP address noted when opening the first window:p2pa -p 1 -b 192.168.2.192
Package: p2pcam
P2PCamClass to retrieve camera images from cameras using the p2p protocolFirst of all i just wrote it to work as a class, the original connection and retrieval process has been made byJheymanin hisvideosurveillance script.
I rewrote it to run as a class instead of an application.So i had thischinese cameralaying around, it had this feature that you could access it from outside your home without the need for port forwarding. However after a couple of years this brand dissappeared and with it their services so i couldn't connect to it outside of my own network usingthis app.Which made owning this camera quite useless. But i had since gotten into Home Asssistant and got the idea to get it working in there since my instance ran locally so it should be able to access the camera.Usageimport p2pcam
import cv2
import numpy as np

def saveFile(cam, jpeg):
    RGBImage = cv2.imdecode(np.fromstring(jpeg, dtype=np.uint8), cv2.IMREAD_COLOR)
    cv2.imwrite('image.jpg', RGBImage)

camera = p2pcam.P2PCam(<own ip>, <camera ip>)
saveFile(camera, camera.retrieveImage())Methods and VariablesMethodsAny methods that may be useful.camera.initialize()Set some variables and attempt to connect to the camera for the first time.camera.retrieveImage()Retrieve a jpeg string from the camera.camera.start()Start a while true loop staying connected, this will not do anything ifonJpegReceivedisn't set.camera.loop()Start a while loop doingretrieveImage()until a socket error occurs.VariablesSome variables you may want to set.camera.horizontal_flipFlip camera horizontally. (if true requires numpy and cv2)camera.vertical_flipFlip camera vertically. (if true requires numpy and cv2)camera.addTimeStampAdd a timestamp to the image. (if true requires numpy and cv2)camera.debugIf true prints out some debugging information.The port information will have to be set before initialisation.camera.UDP_PORT_HOSTHost udp port default: 5123camera.UDP_PORT_TARGETTarget udp port default: 5000camera.SOCKET_TIMEOUTSets the socket timeout in seconds.camera.NB_FRAGMENTS_TO_ACCUMULATEHow many packets to get a full image. If you put this number high you will get a higher quality image but it will take longer to retrieve. Default: 80camera.onJpegReceivedCallback that will be executed if a jpeg image is retrieved. first argument will be the camera class, the second argument will be the jpeg image string.
Package: p2pclient
py-libp2p-daemon-bindingsThelibp2p daemonbindings for PythonProvides a client library to interact with the official libp2p daemons.
Supports theGoandJavaScriptdaemons.Features:TheClientclass enables communication with a P2P daemon using its protobuf control protocol.TheDaemonclass allows to spawn a P2P daemon from Python code. This is especially useful for testing.Tested with the Go daemon v0.2.0 and the JS daemon v0.10.2.Supported features (Go daemon)IdentifyConnectStreamOpenStreamHandler- RegisterStreamHandler- Inbound streamDHT opsConn manager opsPubSub opsSupported features (JS daemon)IdentifyConnectStreamOpenStreamHandler- RegisterStreamHandler- Inbound streamDHT ops / most functionalities are bugged and some are not implementedConn manager opsPubSub opsPeerStore
Package: p2p-crypto
Welcome to Python Crypto P2P package 👋🏠HomepageInstallpip3installp2p-cryptoRun testsmaketestsAuthor👤exsplash.itTwitter:@exsplashitGithub:@exsplashitLinkedIn:@zhashkovs🤝 ContributingContributions, issues and feature requests are welcome!Feel free to checkissues page.TODOAdd support Bybit cryptoexchangeAdd support Huobi cryptoexchangePrettify image with PIL and user's template
Package: p2pd
P2PD[Coverage >= 82%] [Python >= 3.6] [Mac, Win, Nix, BSD, Android]P2PDis a new async networking library for Python. It's based on solving some of the problems with Python's existing APIs and supports P2P networking among other features.InstallationOn non-windows systems make sure you have gcc and python3-devel installed.python3 -m pip install p2pdDocumentationhttps://p2pd.readthedocs.io/FeaturesP2PDis a new project aiming to make peer-to-peer networkingsimple and ubiquitous. P2PD can be used either as a library or as a service.As a library P2PD is written in Python 3 using asyncio for everything.As a service P2PD provides a REST API onhttp://127.0.0.1:12333/.The REST API is provided for non-Python languages.P2PD offers engineers the following features:Multiple strategies for establishing peer-to-peer direct connections.Direct connect= Connect to a reachable node.Reverse connect= Tell a node to connect to you.TCP hole punching= Simultaneous TCP connections.TURN= Use a proxy server as a last resort.Advanced NAT detection.P2PD can detect 7 different types of NATs and5 different sub-types for a combined total of **35 unique NATconfigurations.** The result is better NAT bypass.Smart TCP hole punching.The TCP hole punching algorithm has beendesigned to require minimal communication between peers to increasethe chances of success. The algorithm supports a diverse number ofNAT configurations for the best results possible.Port forwarding (IPv4) and pin hole (IPv6.)Automaticallyhandles opening ports on the router to increase reachability.IPv6 ready from day 1.Supports IPv4 and IPv6. Introduces a newformat for addresses that offers insight into a peer'sNIC cards, internal network, and NAT devices.A new way to do network programming.Focuses on NICs as thestarting point for building services. Introduces 'routes' as away to provide visibility into external addresses. You can buildservices that support IPv4, IPv6, TCP, and UDP without writingdifferent code for each of them.Language-agnostic REST API.You can call/p2p/open/name/addrthen/p2p/pipe/nameto turn any HTTP connection into a two-way relaybetween a peer-to-peer connection.Minimal dependencies.Most of the code in P2PD uses the Pythonstandard library to improve portability and reduce packaging issues.Built on open protocols.P2PD usesIRCas a name system,STUNfor address lookups,MQTTfor signaling messages, andTURNfor last resort message relaying.All of these protocols have public infrastructure.
Package: p2pfl
P2PFL - Federated Learning over P2P networksP2PFL is a general-purpose open-source library for the execution (simulated and in real environments) of Decentralized Federated Learning systems, specifically making use of P2P networks and the Gossisp protocol.✅ FeaturesEasy to use and extendFault tolerantDecentralized and ScalableSimulated (to-do, changed in 0.2.0) and real environmentsPrivacy-preservingFramework agnostic📥 InstallationNoteWe recommend using Python 3.9 or lower. We have found some compatibility issues with Python 3.10 and PyTorch.👨🏼‍💻 For usersTo install the library, you can simply run:pipinstallp2pflOr you can install it from source:gitclonehttps://github.com/pguijas/p2pfl.gitcdp2pfl
pipinstall-e.👨🏼‍🔧 For developersTo install the library for development we recommend using a virtual environment. For example, withpipenv:pipenvinstall--requirementsrequirements.txt📚 DocumentationDocumentation.Report of the end-of-degree project.Report for the award for the best open source end-of-degree project.🚀 TO DONoteDon't be shy, share your ideas with us!Agnostic installation with variants for different frameworks (include TensorFlow)Add secure channels and node authenticationImproved simulation environmentControl paneladd FEMNIST exampleadd typingNew aggregation methodsHot node inclusionSecure aggregationNon trainable nodes (gossip nodes) to increase the efficiency of the network👫 ContributingContributions are always welcome!SeeCONTRIBUTING.mdfor ways to get started.Please adhere to this project's code of conduct specified inCODE_OF_CONDUCT.md.💬 Google GroupIf you have any questions, or you to be notified of any updates, you can join the Google Grouphere.📜 LicenseGNU General Public License, Version 3.0
Package: p2pp
p2ppA light weight library that can help you to convert a word from present tense to present participle tense.Installpipinstallp2ppExamplefromp2ppimportp2ppwords=['go','give','be','lie','hit']forwordinwords:print(p2pp(word))Output:going
giving
being
lying
hittingRequirementsSupport both Python2 and Python3.LicenseMIT.
Package: p2p-python
p2p-pythonI seek a library that can make a simple P2P network.This library enables you create P2P application.SpecificationAsynchronous IOPure Python codeTCP and UDP connectionAutomatic network buildPython3.6+How to installwarning:Destructive change from 3.0.0pip3 install --user p2p-python>=3.0.0How to usebasic usage with debug toolaiomonitor.install bypip3 install --user aiomonitor.fromp2p_python.utilsimportsetup_p2p_params,setup_loggerfromp2p_python.serverimportPeer2Peer,Peer2PeerCmdimportloggingimportasyncioimportaiomonitorimporttimeloop=asyncio.get_event_loop()log=logging.getLogger(__name__)setup_logger(logging.INFO)# setup Peer2Peersetup_p2p_params(network_ver=11111,# (int) identify other networkp2p_port=2000,# (int) P2P listen portp2p_accept=True,# (bool) switch on TCP serverp2p_udp_accept=True,# (bool) switch on UDP server)p2p=Peer2Peer(listen=100)# allow 100 connectionp2p.setup()# close method exampledefclose():p2p.close()loop.call_later(1.0,loop.stop)# You can setup DirectDmd methodclassDirectCmd(object):@staticmethodasyncdefwhat_is_your_name(user,data):print("what_is_your_name",user,data)return{"you return":time.time()}@staticmethodasyncdefget_time_now(user,data):print("get_time_now",user,data)return{"get time now":time.time()}# register methods for DirectCmdp2p.event.setup_events_from_class(DirectCmd)# throw cmd by `await p2p.send_direct_cmd(DirectCmd.what_is_your_name, 'kelly')`# or `await p2p.send_direct_cmd('what_is_your_name', 'kelly')`# You can setup broadcast policy (default disabled)# WARNING: You must set strict policy or will be broken by usersasyncdefbroadcast_check_normal(user,data):returnTrue# overwrite methodp2p.broadcast_check=broadcast_check_normal# setup netcat monitorlocal=locals().copy()local.update({k:vfork,vinglobals().items()ifnotk.startswith('__')})log.info('local',list(local.keys()))aiomonitor.start_monitor(loop,port=3000,locals=local)log.info(f"you can connect by `nc 127.0.0.1 3000`")# start event loop# close by `close()` on netcat consoletry:loop.run_forever()exceptKeyboardInterrupt:log.info("closing")loop.close()Documentsabout inner commandsfor debughow to work p2p-python? (OLD and JP)Author@namuyan_mineLicenceMIT
Package: p2pshare
p2pshareA peer to peer file sharing network. Useful for sharing files among users connected on a network.
Run the peer by the following command on peer.usagep2pshare ip port#ip = IP address to run the peer on.
#port = Port to run the peer onExample:p2pshare ‘127.0.0.1’ ‘8214’LicenseRead LICENSE.txtAuthorsShantanu Srivastavashantanu1002@gmail.com
Package: p2psimpy
p2psimpyA simple simulator for peer-to-peer protocols based onSimPy.The library provides means to simulate distributed or decentralized system run over a network.
The simulation runs as a multi-agent system each running  services and exchanging messages.InstallationIf you have pip installed, just type:$pipinstallp2psimpySimulation exampleFor each simulation you should specify what each agent should run, the latency for the messages and the physical attributes on an agent.Here is an example in which peers are connected in a random network, and each peer runs a connection manager. The connection manager periodically pings the connected peers and disconnects them if they are unresponsive.The simulation looks like this:importnetworkxasnxfromp2psimpy.configimportConfig,Dist,PeerTypefromp2psimpy.constsimportMBitfromp2psimpy.simulationimportSimulationfromp2psimpy.services.connection_managerimportBaseConnectionManager# Locations and latency matrix between the locationsclassLocations(Config):locations=['LocA','LocB']latencies={'LocB':{'LocB':Dist('gamma',(1,1,1))},'LocA':{'LocB':Dist('norm',(12,2)),'LocA':Dist('norm',(2,0.5))},}N=10# Generate network topologyG=nx.erdos_renyi_graph(N,0.5)nx.set_node_attributes(G,{k:'basic'forkinG.nodes()},'type')# Physical properties of a peer. Peer will randomly get an attribute from a given distribution.classPeerConfig(Config):location=Dist('sample',Locations.locations)bandwidth_ul=Dist('norm',(50*MBit,10*MBit))bandwidth_dl=Dist('norm',(50*MBit,10*MBit))# Each basic peer runs a ConnectionManager: that will periodically ping neighbours and check if they are onlineservices=(BaseConnectionManager,)peer_types={'basic':PeerType(PeerConfig,services)}sim=Simulation(Locations,G,peer_types)# run the simulation for 1_000 millisecondssim.run(1_000)
Package: p2psip
39 Peers: Opensource peer-to-peer Internet telephony (P2P-SIP) software in Python
by Kundan Singh <mailto:kundan10@gmail.com>
Visithttp://39peers.netorhttp://code.google.com/p/p2p-sipfor the project details.
See LICENSING for copyright and licensing details.–For Eclipse and Pydev based development, the .project and .pydevproject files are
also supplied. You can use this to open an existing project in Eclipse with
Pydev extension installed.–Packaged by Tim Behrsin <tim@behrsin.com>To install from PyPI: pip install p2psip
Package: p3270
A Python library that provides an interface to communicate with IBM hosts: send commands and text, receive output (screens). The library provides the means to do what a human can do using a 3270 emulator.The library is highly customizable and is built with simplicity in mind.
It is written in Python 3, runs on Linux and Unix-like Operating Systems, and relies on thes3270utility. So it is required to have thes3270installed on your system and available on your PATH.The library allows you to open a telnet connection to an IBM host, and execute a set of instructions as you specified them in your python program.