Saravanan666/pypi-org huggingface dataset:
Package: pyrovision
Pyrovision: wildfire early detectionThe increasing adoption of mobile phones have significantly shortened the time required for firefighting agents to be alerted of a starting wildfire. In less dense areas, limiting and minimizing this duration remains critical to preserve forest areas.Pyrovision aims at providing the means to create a wildfire early detection system with state-of-the-art performances at minimal deployment costs.Quick TourAutomatic wildfire detection in PyTorchYou can use the library like any other python package to detect wildfires as follows:frompyrovision.modelsimportrexnet1_0xfromtorchvisionimporttransformsimporttorchfromPILimportImage# Initnormalize=transforms.Normalize(mean=[0.485,0.456,0.406],std=[0.229,0.224,0.225])tf=transforms.Compose([transforms.Resize(size=(448)),transforms.CenterCrop(size=448),transforms.ToTensor(),normalize])model=rexnet1_0x(pretrained=True).eval()# Predictim=tf(Image.open("path/to/your/image.jpg").convert('RGB'))withtorch.no_grad():pred=model(im.unsqueeze(0))is_wildfire=torch.sigmoid(pred).item()>=0.5SetupPython 3.6 (or higher) andpip/condaare required to install PyroVision.Stable releaseYou can install the last stable release of the package usingpypias follows:pipinstallpyrovisionor usingconda:condainstall-cpyronearpyrovisionDeveloper installationAlternatively, if you wish to use the latest features of the project that haven't made their way to a release yet, you can install the package from source:gitclonehttps://github.com/pyronear/pyro-vision.git
pipinstall-epyro-vision/.What elseDocumentationThe full package documentation is availableherefor detailed specifications.Demo appThe project includes a minimal demo app usingGradioYou can check the live demo, hosted on :hugs:HuggingFace Spaces:hugs: over here :point_down:Docker containerIf you wish to deploy containerized environments, a Dockerfile is provided for you build a docker image:dockerbuild.-t<YOUR_IMAGE_TAG>Minimal API templateLooking for a boilerplate to deploy a model from PyroVision with a REST API? Thanks to the wonderfulFastAPIframework, you can do this easily. Follow the instructions in./apito get your own API running!Reference scriptsIf you wish to train models on your own, we provide training scripts for multiple tasks!
Please refer to the./referencesfolder if that's the case.CitationIf you wish to cite this project, feel free to use thisBibTeXreference:@misc{pyrovision2019,title={Pyrovision: wildfire early detection},author={Pyronear contributors},year={2019},month={October},publisher={GitHub},howpublished={\url{https://github.com/pyronear/pyro-vision}}}ContributingPlease refer toCONTRIBUTINGto help grow this project!LicenseDistributed under the Apache 2 License. SeeLICENSEfor more information.
Package: pyrowire
pyrowireYou need to create an SMS application? F*@k yeah you do.
pyrowire is a framework you can use to quickly create Twilio-based SMS/MMS applications.Licensepyrowire is licensed under the BSD 3-clause license, and can be viewedhere.QuickstartFor the purposes of this quickstart, it is assumed that you have an account with both Heroku and Twilio, and that you have at minimum the following installed:pipvirtualenvIn your virtual environment root directory, execute:$ pip install pyrowire && pyrowire --initThis will installpyrowire, and copy into the root folder the following files:my_app.py(the application file)my_settings.py(the configuration file)Procfile(a Heroku Procfile)requirements.txt(pip requirements file)Usage$ ENV=(DEV|STAGING|PROD) [RUN=(WEB|WORKER)] [TOPIC=] python my_app.pySample ApplicationHere’s what the my_app.py file (created by runningpyrowire-init) looks like:importpyrowireimportmy_settingspyrowire.configure(settings=my_settings)# all app.processor methods need to be annotated with the topic for which they process# and take one kwarg, 'message_data'@pyrowire.handler(topic='my_topic')defmy_processor(message_data=None):pass# all pyro.filter methods need to be annotated with the name of the filter# and take one kwarg, 'message_data'@pyrowire.validator(name='my_validator')defmy_filter(message_data=None):passif__name__=='__main__':pyrowire.run()As you can see, it’s rather straightforward; to start out you are given placeholders for both a handler and a validator.
The handler is where you will write the business logic for your Twilio application, and additional validators can be added
if needed, or removed altogether. See their respective sections for more information.For full documentation and a tutorial, please visit ourdocumentation page.
Package: pyroxene
PyroxeneIntroductionTesting libraries on embedded devices requires always "some code around" to establish a communication between host and embedded device.
This ist often called "MiniOS" or "TestOS".
Usually every team of develops such a small operating system independently.In the end you have a bunch of embedded applications with only one purpose:
Functional verification of a library.What would happens if we could unify all these approaches?
Thinking about what is needed for such a unified test application we realize that we need only 3 "commands" the embedded device must support:Read data from memory locations.Write data to memory locations.Call functions with parameters and return the result.Everything else can be done on a host system!Overview and exampleflowchart LR
    subgraph Device
        direction TB
        pyroxene --> A(Embedded\nlibrary)
    end
    subgraph Host
        direction TB
        Testcode --> device_proxy
        elfbackend --> device_proxy
        device_proxy --> device_commands
        B(Elffile) --> C(pyelftoos)
        C <--> elfbackend
    end
    device_commands <--> pyroxeneExampleLet's consider the following example:
A C library (for embedded devices) implements the following function:unsignedintaddition(unsignedintarg1,unsignedintarg2){returnarg1+arg2;}A tester familiar with Python unittest wants to write the following test code:classTestLibrary(unittest.TestCase):deftest_addition(self)response=lib.addition(39,3)self.assertEqual(response,42)Pyroxene makes this possible!libis apyroxene.device_proxy.LibProxyobject.LibProxy"knows" everything about the library by examining the elf-binary.
So it is able to resolve the address of the exported functionaddition.
(lib.additionis an object of typepyroxene.device_proxy.FuncProxy)Calling that function instructs theFuncProxyto convert all arguments to a list of integers (see #Scope).These list is marshaled indevice_commandsand sent to the (embedded) target device.The answer get's un-marshaled and returned to the caller.ScopePyroxene focuses on libraries written in C.Pyroxene needs debug information in the compiled elf-file.Pyroxene supports reading macros currently only usingfromelf.Pyroxene makes assumptions about the calling convention of the target architecture:
All arguments which are passed to functions must be compatible tounsigned long.
E.g. Auint8_t-value must be passed same as it would be auint32_t.
For ARM Thumb-2 and x86_64 this holds true.
In a nutshell:Everything isulong!Pyroxene CommandsThere are three device commands:memory_read:0x01 [uint16] | cmdlen [uint16] | addr [ulong] | length [ulong]Returns:response [length]memory_write:0x02 [uint16] | cmdlen [uint16] | addr [ulong] | data [datalength]Returns: Nothing.call:0x03 [uint16] | cmdlen [uint16] | addr [ulong] | retlength [ulong] | number_of_args [ulong] | arg1 [ulong] | ... | argn[ulong]Returns:response [retlength].Limitations (as of now)Pyroxene does not support floating point data types.Pyroxene does not support target architectures where the size of the address space does not equal the size ofunsigned long.Pyroxene does not implement error handling on protocol level.
Package: pyroxy
BackgroundSince the beginning of time (the 90s),PyPIhas stood as the pinnacle of centralized Python packaging.  Everytime aneasy_installor apipcommand is run, PyPI is servicing a request, routing
you to the correct version, architecture, etc., of the package you requested.
Its very flexible–even allowing package authors to host packages both to PyPIandtheir personal web sites.…which is all fine and dandy, until these third-party web sites run into
problems.  Infinite loops due to randomly generated URLs names causing DDoS
attacks, slow download speeds, missing files, and downtime, all affect the end
user’s experience.  Whilepipseeks to address some of these issues, the
plain and simple fact of the matter is:PyPI is no longer a reliable
resource.pyroxyis a special kind of proxy that sits between your client andPyPI; with it, you can restrict what packages
are available, as well as what sources to use.  For example, the default
behavior is to choose PyPI hosted packages, direct download links, or generic
URLs (which are then parsed), in that order–if the higher precendence is
available, the more unreliable are omitted.  With the ability to set
whitelisted packages, this means that you can essentially control what your
clients are accessing at any time!DocumentationDocumentation can be viewed through PyPI, or by building the documentation
yourself using:python setup.py develop
python setup.py build_sphinxThe latest (and previously published) versions of the documentationare always
available on RTD.Licensepyroxy is covered by the APL 2.0 license.  See LICENSE for all details.
Package: pyrozza
pyrozzaA Python wrapper for the UK Police APIUsageInstantiate the client:client=pyrozza.Client()Currently, the following methods are available:client.street_level_crimes(lat:float=None,lon:float=None,poly:List[tuple]=None,date:str=None,)client.street_level_outcomes(lat:float=None,lon:float=None,poly:List[tuple]=None,location_id:int=None,date:str=None)client.crime_categories(date:str=None)For the geo-related kwargs, only one of the following must be provided:latANDlonpolylocation_id
Package: pyrp3
pyrp3Python 3 port (using2to3) ofPyRedPitayalibrary in thepyrp3namespace.Note: The following is a copy of the Readme from the original repo and might not work
with this version of the library.OverviewThis package provides a library to access theRed Pitayaregisters.
This library consist of a C library (libmonitor.c) and actypesinterface on the Python side.An object-oriented interface to the different application (scope, generator, PID, AMS, ...) is
provided. This interface is implemented using Python properties (see usage below) and can quickly be
extended to your own application.Arpycserver is used in order to communicate with your computer. The interface is the same on the
computer as the one on the board.InstallationTo install `pyrp3`` on any machine, run the command:pip3installpyrp3UsageYou need to have Python installed on you Red Pitaya.Interactive PythonLogging onto the redpitaya using ssh, one can start the ipython shell and run :frompyrp3.boardimportRedPitayaredpitaya=RedPitaya()print(redpitaya.ams.temp)# Read propertyredpitaya.hk.led=0b10101010# Write propertyRemote accessYou need to install thepyrp3package on your PC as well asrpyc:rpyc_serverOn the computer (replaceREDPITAYA_IPby the string containing the IP address) :fromrpycimportconnectfrompyrp3.pcimportRedPitayaconn=connect(REDPITAYA_IP,port=18861)redpitaya=RedPitaya(conn)print(redpitaya.read(0x40000000))# Direct accessprint(redpitaya.ams.temp)# Read propertyredpitaya.hk.led=0b10101010# Write propertyfromtimeimportsleepfrompylabimport*redpitaya.scope.setup(frequency=100,trigger_source=1)sleep(100E-3)plot(redpitaya.scope.times,redpitaya.scope.data_ch1)show()
Package: pyrpasuite
pyrpasuite - A Comprehensive Robotic Process Automation (RPA) Systempyrpasuiteis a Python-based Robotic Process Automation (RPA) system that allows you to automate repetitive tasks on web and desktop applications. It includes a wrapper for Selenium WebDriver for web automation, and a set of classes for automating tasks on desktop applications.FeaturesWeb Automation: Automate tasks on web applications using Selenium WebDriver.Desktop Automation: Automate tasks on desktop applications.Excel Automation: Automate tasks in Excel files.PDF Automation: Automate tasks involving PDF files.Email Automation: Automate email-related tasks.Network Automation: Automate network-related tasks.System Automation: Automate system-related tasks.PrerequisitesPython 3.6 or higherSelenium WebDriverOther dependencies in therequirements.txtfileInstallingInstall the package using pip:pipinstallpyrpasuiteUsageHere's a basic example of how to use thepyrpasuitesystem for web automation:fromcore.autoWebimportAutoWeb# Create an instance of AutoWebauto_web=AutoWeb()# Open a web pageauto_web.openBrowser("Firefox","https://www.example.com")# ... more code here ...# Close the browserauto_web.closeBrowser()
Package: py-rpautom
Py-RPAutomPy-RPAutom é uma biblioteca que nasceu para facilitar o desenvolvimento de robôs automatizados (RPA), uma vez que precisamos fazer vários códigos repetitivos para determinadas ações. Tem como objetivo facilitar a criação de processos automatizados via código. Criamos uma breve documentação explicando como utilizar recursos para automação web, desktop e recursos do sistema como cópia de arquivos ou criação de pastas. A documentação pode ser conferidaaqui.Ainda, a biblioteca é feita originalmente em português para aumentar a inclusão da população brasileira. Mesmo que o inglês seja o idioma predominantes na área de tecnologia, essa não é a realidade da nossa população. Se o objetivo dessa biblioteca é facilitar o desenvolvimento de aplicações, não faz sentido criar uma barreira idiomática.Tendo origem em 2019, a biblioteca foi desenvolvida de modo separado cada módulo para facilitação no desenvolvimento de projetos pessoais, mas incorporados rapidamenta ao desenvolvimento profissional. Em 2022, foi a consolidação dos três módulos básicos até então (web, desktop e utilitários do sistema), unificando-os e criando assim a sua primeira versão pública.Essa biblioteca usa ferramentas populares para automação e testes como Selenium, pywinauto, openpyxl e pywin32.
Package: pyrpc-discord
pyrpc-discordA fast and simple command line tool to start discord rich presence easily.Key FeaturesEasy and fastAuto start feature. That auto starts rpc with the last used settingsChange specific data of rich presenceEditable using onlypyrpc startInstallingPython 3.5 or higher is requiredTo install the cli you are recomended to use Pypi though you can also use github# Linux/macOSpython3-mpip3installpyrpc-discord# Windowspy-3-mpipinstallpyrpc-discordQuick Example/DocumentationUse all this commands in command prompt only1. Inital Start# For quick startpyrpcautostart# For normal startpyrpcstart2. After Starting RPC# For new settings or new rpcupdate# For stoping rpcendNote:After usingpyrpc startwill ask you few question. Keep the field empty if you don't want the settings (Giving Proper Client ID is important). When you are prompt to ask do you want buttons or not you can only input yes/no (Putting it empty will consider it as no). Also button url must start withhttps://InquiresPlease open a issue to ask any question as I don't have any discord server to share it with you. Also if you are able to fix any issue in my program please open a pull request.
Package: pyrpc-django
Pyrpc is a Django app to handle JSON Remote Procedure Calls
using Django Rest Framework.Installationpip installpyrpc-djangoQuick SetupAddrest_frameworkpyrpcto your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'rest_framework',
    'pyrpc',
]Add thesafe_methoddecorator to methods in your app.from pyrpc.decorators import safe_method

@safe_method
def return_cat_string(*args, **kwargs):
    """
    Returns a concatenated string.
    Extended description of function.

    @param args: List of strings
    @returns: Concatenated string
    """

    result = ''
    for arg in args:
        result = result + arg
    return result


class Library():
    @safe_method
    def sum_two_numbers(self, operand1=0, operand2=0):
        """
        Returns the sum of two numbers.
        Extended description of function.

        @param operand1: Can be any float number.
        @param operand2: Can be any float number.
        @returns: operand1 + operand2.
        """
        return operand1 + operand2

    @safe_method
    def multiply_two_numbers(self, operand1=0, operand2=0):
        """
        Returns the product of two numbers.
        Extended description of function.

        @param operand1: Can be any float number.
        @param operand2: Can be any float number.
        @returns: operand1 * operand2.
        """
        return operand1 * operand2Add pyrpc urls tourls.pyfrom django.urls import path
from django.conf.urls import include
from pyrpc.urls import urls as pyrpc_urls

urlpatterns = [
    path('api/', include(pyrpc_urls)),
]Start the server:python manage.py runserverSending RequestsUsing the above example, POST the folowing JSON to127.0.0.1:8000/api/methods/.{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "sum_two_numbers",
    "params": {
        "args": [],
        "kwargs": {
            "operand1": 5,
            "operand2": 6
        }
    }
}A JSON response should be returned similar to the folowing:{
    "id": 1,
    "jsonrpc": "2.0",
    "result": 11
}Returning a List of MethodsUsing the previous example, send a GET request to127.0.0.1:8000/api/methods.A list of methods and their descriptions shold be returned as follows:[
    {
        "name": "multiply_two_numbers",
        "kwargs": {
            "operand1": "Can be any float number.",
            "operand2": "Can be any float number."
        },
        "description": [
            "Returns the product of two numbers.",
            "Extended description of function."
        ],
        "returns": "operand1 * operand2."
    },
    {
        "name": "sum_two_numbers",
        "kwargs": {
            "operand1": "Can be any float number.",
            "operand2": "Can be any float number."
        },
        "description": [
            "Returns the sum of two numbers.",
            "Extended description of function."
        ],
        "returns": "operand1 + operand2."
    }
]
Package: pyrpd
What's pyrpd?The pyrpd is a simple python project for remote process debug.Quick Startpip install pyrpdHow to Use>>>importpyrpd
>>>frompyrpd.testsimportWeChat
>>>wx=WeChat.new_wechat()>>>wx.pid19284>>>wx.GetModuleHandle("WeChatWin.dll")1677262848>>>wx.GetProcAddress("WeChatWin.dll","StartWechat")1691409392>>>dll_path=r"D:\C++\lwc\Debug\wxapi.dll">>>wx.load(dll_path)True
>>>wx.GetModuleHandle("wxapi.dll")2054291456>>>wx.GetProcAddress("wxapi.dll","_test")2055822152>>>wx.call("wxapi.dll","_test",0)1>>>param={"type":0,"alias":"ljc545w"}>>>importjson
>>>resp=wx.send("wxapi.dll",json.dumps(param))>>>print(resp.decode()){"data":{"desc":"该微信号已被使用","status":-7},"description":"","error_code":10000}>>>wx.unload("wxapi.dll")True
>>>wx.GetModuleHandle("wxapi.dll")0Contact meljc545w@qq.com
Package: pyrpde
pyRPDEA full-python implementation of the Recurrence Period Density Entropy metric.
It's based on the algorithm described in^1, and on Max Little's
R (and C) implementation in^2. It relies on Numba to make the return distance computation
as fast as possible without having to resort to Cython or C/C++ bindings.InstallationThis package needs python >= 3.6, and relies on Numba, Scipy, and Numpy.
It's available on pypi, so a simple:pipinstallpyrpdeshould do the trick.UsageThere pretty much is only one function in this package that you should use,rpde().
Here are its arguments:Arguments:
    ----------
    time_series: np.ndarray
        The input time series. Has to be float32, normalized to [-1,1]
    dim: int
        The dimension of the time series embeddings. 
        Defaults to 4
    tau: int
        The "stride" between each of the embedding points in a time series'
        embedding vector. Should be adjusted depending on the
        sampling rate of your input data.
        Defaults to 35.
    epsilon: float
        The size of the unit ball described in the RPDE algorithm.
        Defaults to 0.12.
    tmax: int, optional
        Maximum return distance (n1-n0), return distances higher than this
        are ignored. If set, can greatly improve the speed of the distance
        histogram computation (especially if your input time series has a lot of points).
        Defaults to None.
    parallel: boolean, optional
        Use the parallelized Numba implementation. The parallelization overhead
        might make this slower in certain situations. 
        Defaults to True.

    Returns
    -------
    rpde: float
        Value of the RPDE
    histogram: np.ndarray
        1-dimensional array corresponding to the histogram of the return
        distancesNOTE: the default values fortau,dimandepsilonare adapted from^1and^2,
to work on 22.5Khz PCM audio. You should probably usetau=25for 16Khz andtau=50for 48KHz audio.Here's an example:frompyrpdeimportrpdefromscipy.io.wavfileimportread# make sure your audio data is in float32. Else, either use librosa or# normalize it to [-1,1] by dividing it by 2 ** 16 if it's 16bit PCMrate,data=read("audio_data.wav")entropy,histogram=rpde(data,tau=30,dim=4,epsilon=0.01,tmax=1500)Citing this packageThis package was implemented as part of the experimental protocol used inRiad et Al.
You can find this implementation of the RPDE being used inthe paper's repository.
If you're willing to make use of this package for your own research, you're welcome to cite our paper:Riad, R, Titeux, H, Lemoine, L., Montillot J. Hamet Bagnou, J. Cao, X., Dupoux, E & Bachoud-Lévi A.-C.
        Vocal markers from sustained phonation in Huntington's Disease.
        In: INTERSPEECH-2020
Package: pyrpds
Python Wrapper for Rust Persistent Data Structurespyrpdsis a library which provides CPython bindings to Rust'srpdslibrary.The project has 2 goals:Allow packages that are built on top ofrpdsto expose Python bindings easily.Provide faster drop-in replacements forpyrsistentdata structures.Python API will be exactly the same aspyrsistent API.Installation InstructionsFor UsersPythonpipinstallpyrpdsRustAdd following lines to Cargo.toml:[dependencies.pyrpds]version="<version>"For ContributorsInstalling DependenciesInstallRustandConda.Installing nightly Rustrustupinstallnightly
rustupoverridesetnightlyInstalling Conda environmentcondaenvcreate-fenvironment.yamlInstalling pyrpdscondaactivatepyrpds
maturindevelopTesting pyrpdscondaactivatepyrpds
pytest
Package: pyrpio
PyRPIOA Python 3 addon which provides high-speed access to the Raspberry Pi GPIO interface, supporting regular GPIO as well as i²c, PWM, SPI, and MDIO.This package is inspired bynode-rpiowhich is a node.js addon.CompatibilityRaspberry Pi Models: A, B (revisions 1.0 and 2.0), A+, B+, 2, 3, 3+, 3 A+, 4, Compute Module 3, Zero.Python 3.7+InstallInstall the latest from PyPi:pip install pyrpioSupported InterfacesGPIOPWMI2CMDIOSPIExamplesfrompyrpio.i2cimportI2Cfrompyrpio.mdioimportMDIOfrompyrpio.i2c_register_deviceimportI2CRegisterDevice### I2C Operations ###i2c_bus=i2c.I2C('/dev/i2c-3')i2c_bus.open()i2c_bus.set_address(0x50)i2c_bus.read_write(data=bytes([0x23]),length=1)i2c_dev=I2CRegisterDevice(bus=i2c_bus,address=0x50,register_size=1,data_size=1)# Read registerval=i2c_dev.read_register(register=0x23)# Read sequential registersvals=i2c_dev.read_register_sequential(register=0x23,length=4)# Close up shopi2c_bus.close()### MDIO Operations #### Create bus using GPIO pins 23 and 24 (bit-bang)mdio_bus=mdio.MDIO(clk_pin=23,data_pin=24,path='/dev/gpiochip0')mdio_bus.open()# Read register 0x10 from device 0x30 (CLAUSE-45)mdio_bus.read_c45_register(0x30,0x00,0x10)# Read register set from device 0x30 (CLAUSE-45)mdio_bus.read_c45_registers(0x30,0x00,[0,1,2,3,4])# Close up shopmdio_bus.close()LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsMaintainersSamtec - ASH