Saravanan666/pypi-org huggingface dataset:
Package: rfxcom
A Python library for working with yourRFXTrxfor automation projects.This library is designed to work with Python 3.3+[1]andasyncio(but
other transports can be implemented). Currently it is primarily used by thehomeproject, a dashboard for managing and visualising your home automation
devices.This library is relatively new and thus the number of devices are limited to
those that @d0ugal owns. This means, that the current list of fully supported
protocols are:Status Packetsfrom theRFXTrxitself.Energy usage sensors(such as the Owl CM119/160 and Owl CM180)Temperature and humidity sensors(such as the Oregon THGN132)Lighting and power controldevices from LightwaveRFIf you want to use a device and you don’t think its supported or you are unsure
then pleaseopen an issue.InstallationIt is recommended that you get the latest version from PyPI with pip:pip install rfxcomHowever, if you want to grab the latest development version you can download
the repository directly from github and runpython setup.py installin the
root of the repository.DocumentationView the documentation on Read The Docs.Quick ExampleThe following example shows some basic usage of this library, it sets up the
asyncio event loop, points the library to the serial device path and attaches
a simple handler function which prints out information about all the packets it
receives. For example, see what it willoutput for energy usage sensors.:from asyncio import get_event_loop
from rfxcom.transport import AsyncioTransport

dev_name = '/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1WYT9NA-if00-port0'
loop = get_event_loop()

def handler(packet):
    # Print out the packet - the string representation will show us the type.
    print(packet)

    # Each packet will have a dictionary which contains parsed data.
    print(packet.data)

    # You can access the raw bytes from the packet too.
    print(packet.raw)

try:
    rfxcom = AsyncioTransport(dev_name, loop, callback=handler)
    loop.run_forever()
finally:
    loop.close()You can also use a coroutine as callback for AsyncioTransport:from asyncio import get_event_loop, coroutine
from rfxcom.transport import AsyncioTransport

dev_name = '/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1WYT9NA-if00-port0'
loop = get_event_loop()

@coroutine
def handler(packet):
    print(packet)
    yield from some_io(packet)

try:
    rfxcom = AsyncioTransport(dev_name, loop, callback=handler)
    loop.run_forever()
finally:
    loop.close()ContributingIf you would like to contribute to python-rfxcom, you will need to usetoxto run the tests. This will test against Python 3.3, Python 3.4, pyflakes for
code linting and build the documentation. To do this, you simply need to
install tox and then call tox from the root of the python-rfxcom git
repository.pip install tox
toxDon’t worry if you can’t test against Python 3.3 and Python 3.4 locally, many
people will only have one installed. We use the brilliantTravis CIto
verify all pull requests.[1]However, given enough interest previous versions can be supported:https://github.com/d0ugal/python-rfxcom/pull/1
Package: rgain
A set of Python modules and utility programmes to deal with Replay Gain
information – calculate it (with GStreamer), read and write it (with Mutagen).
It has support for Ogg Vorbis (or probably anything stored in an Ogg
container), Flac, WavPack, MP4 (aka AAC) and MP3 (in different incarnations).
There‘s also a command-line programme,replaygain, that works very similar
to its like-named cousins, most prominentlyvorbisgainandmp3gain–
only that itworks for all those supported formats alike.collectiongainon the other hand is a kind of fire-and-forget tool for big amounts of music
files.NOTE: rgain is currently not being developed; for more information or if you’d
like to help remedying this situation, see:https://bitbucket.org/fk/rgain/issues/26/wanted-new-maintainer
Package: rgain3
A set of Python modules and utility programmes to deal with Replay Gain
information – calculate it (with GStreamer), read and write it (with Mutagen).
It has support for Ogg Vorbis (or probably anything stored in an Ogg
container), Flac, WavPack, MP4 (aka AAC) and MP3 (in different incarnations).
There‘s also a command-line programme,replaygain, that works very similar
to its like-named cousins, most prominentlyvorbisgainandmp3gain–
only that itworks for all those supported formats alike.collectiongainon the other hand is a kind of fire-and-forget tool for big amounts of music
files.
Package: rgb
rgbGrab your palette!pipinstallrgbHow To UseIf you want to color your text in terminal:fromrgbimportrgbprintrgbprint("Hello World","#c0ffee")If you want to simply get a color scheme ("palette"):fromrgbimportPALETTESprint(PALETTES[42])Giving CreditThe palettes from this package come from websites that curate palettes. When appropriate, please check the metadata of your palette and credit the curator!
Package: rgb2ansi
Color strings for terminal ouput (ANSI 256 colors) using CSS-stylergbnotation.Installationpip install rgb2ansiUsagefromrgb2ansiimportcolorprint(color("Hello",fg='4444ff'),color("world!",bg='ff4400'))You can pass a foreground (text) color, a background color, or both. The
following inputs are accepted as color parameters:Hex strings, e.g.ff4400.Byte strings, e.g.b'\xff\x44\x00'Sequences of integers, e.g.(255, 68, 0)Note thatcolor()is lossy: it simply rounds the color to the closest
8-bit color available.LicenseBSD 3-clause.
Package: rgb2gray
rgb2grayInstallpip install rgb2grayHow to useAn example withrgb2grayfromPILimportImageimportmatplotlib.pyplotaspltresult=rgb2gray(Image.new('RGB',(10,10),color=(255,255,0)))resultarray([[226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226],
       [226, 226, 226, 226, 226, 226, 226, 226, 226, 226]], dtype=uint8)plt.imshow(result,cmap='gray')plt.show();img=Image.open('images/ds.jpg')fig,axes=plt.subplots(nrows=1,ncols=2,figsize=(15,10))axes[0].imshow(img)axes[1].imshow(rgb2gray(img),cmap='gray')plt.show();
Package: rgb2mqtt
RGB2MQTTThis is a Python script that will act as a brige between anOpenRGBserver and an MQTT broker (like Mosquitto).
Useful for if you want to control your PC RGB lights viaHome Assistantfor example.This script is inspired by the original script fromghomasHudsonand the fork frombuttercheetah.
This script is licensed under the MIT license, so feel free to try or change it yourself!InstallationUsepip install rgb2mqttto install the package.
If you are running an older Python version (<3.11) you also need to install tomli:pip install tomliConfigurationConfiguration is stored in aconfig.tomlfile, see theconfig.toml.examplefile.To generate a configuration file run thergb2mqtt-configscript after installing. To find the location of the saved config file seeLogs and config locationBe aware that in the device map section, you need to list the name of the OpenRGB device exactly as key.
To figure out which devices are supported by OpenRGB, see thenotebooks/tryout_openrgb_sdk.ipynbfile.Logs and config locationThe log file and config file will be written to a folder under:Users\username\AppData\Roaming\rgb2mqtt\when using Windows/home/username/rgb2mqtt/when using LinuxUsageThe run the script, usepython src/rgb2mqtt/rgb2mqtt.py, or usergb2mqtt-runafter installing.
All logging will be written to the log file, unless you use the verbose option (rgb2mqtt-run -v) in which case the logging is written to stdout.If you want this script to autostart when your PC turns on (on Windows), use thergb2mqtt-autostartcommand.
Package: rgb-control
RGB control for A4Tech Bloody keyboard for LinuxThis script allows you to set the RGB backlight color on A4Tech Bloody keyboards.How to use:On the keyboard pressFn+1.Make sure you are a sudo user.Run the script.Optional arguments:-c-colorinhexformat.Example:00ff00#green-id_v-vendoridinhexformat,default:0x09DA-id_p-productidinhexformat,default:0xFA10
Package: rgbconv
NAMErgbconv - Fast RGB image pixel format conversion module written in CDESCRIPTIONThis manual page documentsrgbconvmodule, a Python module for rapidly
converting image pixel format from BGRA (Blue, Green, Red, and Alpha) to RGBA
(Red, Green, Blue, and Alpha).Different aplications/modules use different pixel formats for represenging
pixels in images and photos.  One of the most popular formats are 24-bit RGB
(8 bits each for red, green, and blue) and 32-bit RGBA (8 bits each for red,
green, blue, alpha).  Other formats include 32-bit BGRA (8 bits for blue,
green, red, and alpha) and 32-bit RGBX (8bits for red, gree, blue, and
unused).rgbconvprovidesbgra2rgba, which rapidly converts from the BGRA format
to the RGBA format.rgbconvis implemented in C language for achieving
the almost optimal performance.EXAMPLESimport rgbconv

img = b'01234567890abcdef'
rgbconv.bgra2rgba(img)
print(img)WARNINGrgbconvdirectly modifies a byte-like object in Python for the maximal
performance even if the object is immutable, which may cause problems.  Usergbconvmodule with caution.INSTALLATIONpip3installrgbconvAVAILABILITYThe latest version ofrgbconvmodule is available at PyPI
(https://pypi.org/project/rgbconv) .SEE ALSOAUTHORHiroyuki Ohsaki <ohsaki[atmark]lsnl.jp>
Package: rgb-display
IntroductionGeneralization of display drivers fromhttps://github.com/adafruit/adafruit-circuitpython-rgb-displayto remove platform dependencies.This driver currently supports displays that use the following display-driver chips: HX8353, HX8357, ILI9341, S6D02A1, ST7789, SSD1331, SSD1351, and ST7735 (including variants ST7735R and ST7735S).DependenciesThis driver has no particular dependencies.  It accepts pins and SPI devices compatible with MicroPythonmachine.Pinandmachine.SPI, includinggpiozero.OutputDevicepins.  Objects can be adapted to fit, for example withspidevthe SPI object can be givenspi.send = spi.xfer3, ordigitaliopins can havepin.on = lambda s: s.value = 1to create apin.on()member.For improved performance consider installing NumPy.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installrgb-displayTo install system-wide (this may be required in some cases):sudopip3installrgb-displayTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installrgb-displayUsage Exampleseeexamplesfor usage examples.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationFor information on building library documentation, please check outthis guide.
Package: rgb-gradient
rgb-gradientA Python package to create gradients.Installationpipinstallrgb-gradientUsagefromrgb_gradientimportget_linear_gradientintermediate_colors=[(255,0,0),'#c86496',(160,150,80),'#14f0b4','#0000ff']# colors format rgb or hexgradient=get_linear_gradient(colors=intermediate_colors,nb_colors=10,return_format='hex')print(gradient)Output:['#ff0000', '#dc4161', '#c86496', '#b1816e', '#a09650', '#65bc7a', '#14f0b4', '#13e7b7', '#0a74db', '#0000ff']SpecificationParametersType/FormatcolorsAlistcontaining:•tuples(3intelements from0to255)or/and•string(representing the hexadecimal color value under the format'#rrggbb'e.g. red ='#ff0000').Requirements:len(colors) <= nb_colors and len(colors) >= 2nb_colorsAnintindicating how many colors will compose the gradient (including the colors already given).Requirements:nb_colors >= 3 and nb_colors >= len(colors)return_formatAstringto indicate in which format the colors composing the gradient are returned.It can take the value'rgb'(decimal format) or'hex'(hexadecimal format).Default value:'rgb'Requirements:return_format == 'rgb' or return_format == 'hex'How it worksThe RGB color model is composed of 3 values (red, green, blue) from 0 to 255. With that in mind, we can easily represent a color as a point on a 3D plan.With the input of the previous example, it looks like that:Theget_linear_gradientfunction first determine the global distance from the first point to the last one, passing through the other colors given (if any).See on the image above, the global distance is all black lines added together.With that distance, we can figure out how far from the starting point to place each missing point (simply place a point everyglobal_distance/(nb_points_to_add+1)).Here's the colors we got by calling the functionget_linear_gradientwith the arguments of the previous example:We can see a total of 10 colors, including 5 colors given and 5 new colors.TipsOk, that doesn't look like a real gradient for now. Let's callget_linear_gradientagain with a total of 1000 colors (nb_colors=1000).Yeah, this is better ;) Of course, the more you ask for colors, the better your gradient will be.SupportIf you need help or found a bug, consider opening an issue on the project.LicenseThe source code for this project is licensed under the GPLv3 license, which you can find in theLICENSEfile.
Package: rgb-lib
RGB Lib Python bindingsThis project builds a Python library,rgb-lib, for thergb-libRust library, which is included as a git submodule. The bindings are created by
thergb-lib-ffiproject, which is located inside the rgb-lib submodule.Install from PyPIInstall thelatest releaseby running:pipinstallrgb-libDemoThedemo/directory contains a demonstration of the most common operations in
the form of a Jupyter notebook. See the includedREADME.mdfile for more
details.Install locallyRequirementscargopoetry1.4+In order to install the project locally, run:# Update the submodulegitsubmoduleupdate--init# Generate the bindings./generate.sh# Build the source and wheels archivespoetrybuild# Install the wheel (replacing <version> with built version)pipinstall./dist/rgb_lib-<version>-py3-none-any.whl# or install the sdist (replacing <version> with built version)pipinstall./dist/rgb_lib-<version>.tar.gzBuild in DockerIn order to build the project in a Docker container, run:# Update the submodulegitsubmoduleupdate--init# run the build script./build_in_docker.shThebuild_in_docker.shscript will build the docker image and use it to first
generate the bindings, then build the source and wheel archives. Once the build
completes, archives will be available in thedist/directory as if they were
built locally.PublishPublishing to PyPI is handled with Poetry.To configure the access token, which only needs to be done once, run:poetryconfigpypi-token.pypi<token>To publish a new release run:poetrypublish
Package: rgbmaker
rgbmakerA python package which communicates to different astronomical services and fetches fits and numerical data.DOI:https://doi.org/10.1017/S1743921323000674DevelopementRGB-maker web-tool was initially ajupyter notebook, work started byAvinash Ckand later through this repo we helped continue the work making an elaborateproject(with aweb tool) involving Avinash Kumar with Avinash Ck's and Ninisha's help for RAD@home Astronomy Colloboratory India for citizen science research(PI :  DrAnanda Hota).see also :Humans$pipinstall-e.[dev]Installation:$pipinstallrgbmakerUsage$rgbmaker-h
usage:rgbmaker[-h][-pPOSITION][-rRADIUS][-iIMAGESOPT][-nNAME][-aARCHIVES][-kKIND][-sSPIDX_FILE][-pxPIXELS][-AANNOT][-SFLUX_LIST][-S_eFLUX_ERROR][-freqFREQ_LIST]__||||______||___________||________|'__/ _` | '_\|'_ ` _ \ / _` | |/ / _ \ '__||||(_|||_)||||||(_||<__/||_|\__,|_.__/|_||_||_|\__,_|_|\_\___|_|__/||___/Apythonpackagewhichcommunicatestodifferentastronomicalservicesandfetchesfitsandnumericaldataoptionalarguments:-h,--helpshowthishelpmessageandexit-pPOSITION,--positionPOSITION(Required)TheobjectnameorthecoordinatesoftheobjectintheFK5(J2000)system.Ex:"14 09 48.86 -03 0232.6",M87,NGC1243,withoutquotes.-rRADIUS,--radiusRADIUS(Required)(default=0.12)(float)Thesizeoftheimageindegrees,thissizewillbeusedforthefieldofviewintheresultantimage.Forreference,inthenightsky,themoonisabout0.52degreesacross.-iIMAGESOPT,--imagesoptIMAGESOPT(default=2)(string)(values=1,2,3)IOUROROptical(option=1)CompositeContoursonDSS2R(option=2)-nNAME,--nameNAME(Optional)(default=Anonymous)(string)Yournamewillbedisplayedontheimageenablingmentors,professors,fellowstudentstobeabletorecognizeyourwork.Creditisimportant!-aARCHIVES,--archivesARCHIVES(default=1)(string)ThisoptioncurrentlyoffersaccesstotheNVASimagearchive.Selectingthisoptionwillreturnthetop5resultsfromNVAS(ifexists).Thesecanbedownloadedas.imfitsfiles-kKIND,--kindKIND(default='base64')choosefrombase64,plot,png,jpgtoshowbase64ofresultantimage,plotonoutput,savepng/jpgfiles-sSPIDX_FILE,--spidx_fileSPIDX_FILE(Default=None)enterpathtospidx.fitsfilethatcontainsspectralindexdata.-pxPIXELS,--pixelsPIXELS(default=480)changepixelvalueforthefinalresulatantimage.-AANNOT,--annotANNOT(default=True)removeanyannotationbysettingthistoFalse.-SFLUX_LIST,--flux_listFLUX_LIST(Optional)(list)(Default=None)Takesinputaslistforspectralindexcalculation.-S_eFLUX_ERROR,--flux_errorFLUX_ERROR(Optional)(list)(Default=[0,0])Takesinputaslistforspectralindexcalculation.-freqFREQ_LIST,--freq_listFREQ_LIST(Optional)(Default=None)Takesinputaslistforspectralindexcalculation.$python3.8>fromrgbmaker.fetchimportquery>result=query(name='Avi',position='3C 33.1',radius=0.12,kind='jpg')>print(result)Demo
Package: rgbmatrix5x5
https://shop.pimoroni.com/products/5x5-rgb-matrix-breakoutAn adorably tiny 5x5 pixel Breakout Garden compatible LED matrix
breakout for adding status displays or fancy lighting to your project.InstallingFull install (recommended):We’ve created an easy installation script that will install all
pre-requisites and get your LED Matrix up and running with minimal
efforts. To run it, fire up Terminal which you’ll find in Menu ->
Accessories -> Terminal on your Raspberry Pi desktop, as illustrated
below:In the new terminal window type the command exactly as it appears below
(check for typos) and follow the on-screen instructions:curlhttps://get.pimoroni.com/rgbmatrix5x5|bashManual install:Library install for Python 3:on Raspbian:sudoapt-getinstallpython3-rgbmatrix5x5other environments:sudopip3installrgbmatrix5x5Library install for Python 2:on Raspbian:sudoapt-getinstallpython-rgbmatrix5x5other environments:sudopip2installrgbmatrix5x5Development:If you want to contribute, or like living on the edge of your seat by
having the latest code, you should clone this repository,cdto the
library directory, and run:sudopython3setup.pyinstall(orsudo python setup.py installwhichever your primary Python
environment may be)In all cases you will have to enable the i2c bus.Documentation & SupportGuides and tutorials -https://learn.pimoroni.com/5x5-rgb-matrix-breakoutFunction reference -http://docs.pimoroni.com/rgbmatrix5x5/Get help -http://forums.pimoroni.com/c/support0.0.3Fixedset_multiple_pixelsagainDefaulted internal buffer to list of tuples0.0.2Fixedset_allmethodFixedset_multiple_pixelsmethod0.0.1Initial release
Package: rgbmon
RGBmonRGBmon is a system monitoring tool that lights up your components to indicate system status.Note:Only use modes on devices that can handle frequent color updates. If the device supports such updates they are often refered to asdirectmode.InstallationInstall and set upOpenRGBpip install --user rgbmonUsageStart the OpenRGB SDK serverRun RGBmonrgbmon-cli --config=path/to/config.jsonRGBmon always needs a path to a valid configuration in the json format.
The project provides sample configurations in theexamples/directory which you can try.
If you want to create your own configuration file please have a look at thedocumentation.DependenciesPython >=3.7OpenRGBopenrgb-python
Package: rgbnotes
# RGB Notes Python Library[![CircleCI](https://circleci.com/gh/rgbnotes/rgb-api-python.svg?style=svg)](https://circleci.com/gh/rgbnotes/rgb-api-python)The RGB Notes Python library provides convenient access to the RGB Notes API fromapplications written in the Python language. It includes a pre-defined set ofclasses for API resources.## DocumentationSee the [API docs](https://rgbnotes.com/help?section=api).## InstallationYou don't need this source code unless you want to modify the package. If you justwant to use the package, just run:``` {.sourceCode .bash}pip install --upgrade rgbnotes```Install from source with:``` {.sourceCode .bash}python setup.py install```### Requirements* Python 2.6+ or Python 3.3+ (PyPy supported)* Requests Module (PyPy supported)## UsageThe library needs to be configured with your account's secret key which isavailable in your [RGB Notes Settings](https://rgbnotes.com/login.php?r=/settings.php).# For Developers## API v1``` {.sourceCode .python}import rgbnotesrgbnotes.client_key = "your client key"rgbnotes.client_id = "your client id"# request a client or project token. Refer to the API# documentation to see the difference in scopergbnotes.Token.client()rgbnotes.Token.project(project_id=2, client_id=7)```## API MethodsAll methods are encapsulated in it's own class.The method names used on classes are:``` {.sourceCode .python}CLS.create()CLS.list()CLS.retrieve(id)CLS.modify(id, **data)CLS.delete(id)```## Projects Request``` {.sourceCode .python}rgbnotes.Project.create(title="New Project")rgbnotes.Project.list()rgbnotes.Project.modify(2, title="New Project Title")rgbnotes.Project.delete(2)```## Assets Request``` {.sourceCode .python}# requires a project Token or project_id parameterrgbnotes.Asset.list()rgbnotes.Asset.create(title="New Asset")rgbnotes.Asset.version(asset_id=422)```## Notes Request``` {.sourceCode .python}# requires a project Token or project_id parameterrgbnotes.Note.list()```## Users Request``` {.sourceCode .python}rgbnotes.User.create(name="John Doe", email="john@doe.com")rgbnotes.User.list()```## File Request``` {.sourceCode .python}fp = open("/path/to/file", "rb")rgbnotes.File.create(file=fp)rgbnotes.File.list()```## Snapshot Request``` {.sourceCode .python}rgbnotes.Snapshot.retrieve(id)```## Account Request``` {.sourceCode .python}rgbnotes.Account.retrieve()```## Alias Request``` {.sourceCode .python}rgbnotes.Alias.list()rgbnotes.Alias.create(entity_type='projects',entity_id=4,alias=123)rgbnotes.Alias.modify(id, alias_id)rgbnotes.Alias.delete(id)```## Webhook Request``` {.sourceCode .python}rgbnotes.Webhook.modify(url="http://myurl.com/webhook", secret_header_field="", secret_header_value="")rgbnotes.Webhook.list()rgbnotes.Webhook.delete(id)```
Package: rgbpy
RGBpyRGBpy it is python text-style ✅ not python textile! 🤔 it actually print your text on terminal in different kind of colors, including logging.Simple use of rgbpyFirst we recommend creating a virtual environmentpython -m venv venvand then activate itsource venv/bin/activateOnce that finish now install the library usingpipinstallrgbpyWait for the installation to finish, basically the library was uploaded usingsdist(Source Distribution) andbdist_wheel(Built Distribution).To print text with color using python print, instead of usingprintfunction, use any of the following functions (purple, blue, cyan, green, yellow, red, normal, bold, underline, log_style)>>>fromrgbpyimport(purple,blue,cyan,green,yellow,red,normal,bold,underline)>>>purple('I am purple in color')>>>blue('I am blue in color')>>>cyan('I am cyan in color')>>>green('I am green in color')>>>yellow('I am yellow in color')>>>red('I am red in color')>>>normal('I am a normal text')>>>bold('I make text bold')>>>underline('I underline text')To print logging text with color:>>>importlogging>>>fromrgbpyimportlog_style>>>FORMATTER='[+] [%(asctime)s] [%(levelname)s]%(message)s'>>>logging.basicConfig(format=FORMATTER)>>>LOGGER=logging.getLogger(__name__)>>>LOGGER.setLevel(logging.DEBUG)>>>log_style('I am info logger')>>>log_style('I am yellow logger',col='yellow')>>>log_style('I am error logger',log='error')See more documentationshere!Useful linksDocumentation:https://rgbpy.readthedocs.ioRepository:https://github.com/usmanmusa1920/rgbpyPYPI Release:https://pypi.org/project/rgbpyPull requests are welcomeChange Log0.0.1 (04/november/2023)0.0.1 ReleaseThis is the first release!