Saravanan666/pypi-org huggingface dataset:
Package: rpiSht1x
This module reads Humidity and Temperature from a Sensirion SHT1x sensor. It has been tested
both with an SHT11 and an SHT15.It is meant to be used in a Raspberry Pi and depends on this module (http://pypi.python.org/pypi/RPi.GPIO/0.4.1a).The module raspberry-gpio-python requires root privileges, therefore, to run this module you need to run your script as root.This a Python/Raspberry Pi port of this library:https://github.com/practicalarduino/SHT1xExample Usage:from sht1x.Sht1x import Sht1x as SHT1x
dataPin = 11
clkPin = 7
sht1x = SHT1x(dataPin, clkPin, SHT1x.GPIO_BOARD)

temperature = sht1x.read_temperature_C()
humidity = sht1x.read_humidity()
dewPoint = sht1x.calculate_dew_point(temperature, humidity)

print("Temperature: {} Humidity: {} Dew Point: {}".format(temperature, humidity, dewPoint))Release Notesv1.2, 31/12/2012 – Added the possibility to define the GPIO mode (GPIO_BOARD or GPIO_BCM) in the constructor.
This is to make sure that this library plays nicely with other libraries that might rely on a specific mode.
If no mode is provided, the constructor will default to the GPIO_BOARD mode.
Thanks to Daniël van Eeden for suggesting this improvement.v1.1, 26/10/2012 – Added WaitingSht1x, dew point calculation and using v4 constants.
WaitingSht1x makes sure that no more than a query per second is performed on the sensor. This is
in order to prevent the sensor from heating and skewing the temperature readings.v1.0, 7/10/2012 – Initial release.
Package: rpistream
RaspiCameraLivestreamA very simple library built for streaming video from a remote Raspberry Pi server in realtime.How to install:MacOS or linux:Open your terminal and type:sudopython-mpipinstallrpistreamWindows:Open cmd as admin and type:pip install rpistreamExamples:Streaming from a webcamServerfromrpistream.cameraimportCamerafromrpistream.streamserverimportServerdefretrieveImage(cam,imgResize):image=cv2.resize(cam.image,(0,0),fx=imgResize,fy=imgResize)returnimagecam=Camera(mirror=True)scale=0.5server=Server(port=5000)server.serve()# Blocking; waits for a connection before continuingserver.startStream(retrieveImage,[cam,scale])# Calls retrieveImage(*args) every frameClientfromrpistream.streamclientimportClientclient=Client(serverIp="localhost",WriteFile=True)# Connects to the serverclient.startStream()# Starts recieving data and displaying the video
Package: rpi-switch-mqtt
Copyright (c) 2015 David ÜbelackerPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: Raspberry Pi Switch/Relay MQTT=============================Use mqtt to control relays connected to a raspberry.Installation:-------------------pip install rpi-switch-mqttConfiguration:-------------------Needs a json configuration file as follows (don't forget to change ip's and credentials ;-)):.. code:: json{"mqtt_client_id": "power_meter","mqtt_host": "192.168.0.210","mqtt_port": "1883","switches": [{"gpio": "4","topic_status": "halti/stweg/door","topic_set": "halti/stweg/door/set"}]}Start:-------------------rpi-switch-mqtt config.jsonPlatform: UNKNOWN
Package: rpi.tcy
Spring-RPi介绍树莓派cpython对接软件架构软件架构说明安装教程xxxxxxxxxxxx使用说明一些命令需要更新版本的pip，所以首先确保你安装了最新版本：
Linux:   python3 -m pip install --upgrade pip
Windows: py -m pip install --upgrade pip安装最新版本的 PyPA构建
先安装pip包
Linux:   python3 -m ensurepip --default-pip
Windows: py -m ensurepip --default-pip（python -m pip）
再安装编译包工具
Linux:	python3 -m pip install --upgrade build
Windows:py -m pip install --upgrade build编译包
Linux: python3 -m build
Windows:py -m build此命令应输出大量文本，完成后应在dist目录中生成两个文件：
dist/
example_package_YOUR_USERNAME_HERE-0.0.1-py3-none-any.whl
example_package_YOUR_USERNAME_HERE-0.0.1.tar.gz
该tar.gz文件是一个源档案，而该 .whl文件是一个内置的分发。
较新的 pip版本优先安装构建的发行版，但如果需要，将回退到源存档。
您应该始终上传源存档并为您的项目兼容的平台提供构建的存档。
在这种情况下，我们的示例包在任何平台上都与 Python 兼容，
因此只需要一个构建的发行版。上传包到PyPi
安装：twine
Linux：python3 -m pip install --upgrade twine
Windows：py -m pip install --upgrade twine
安装后，运行 Twine 以上传以下所有档案dist：
上传测试服务器：
Linux：python3 -m twine upload --repository testpypi dist/*
Windows：py -m twine upload --repository testpypi dist/*上传正式服务器：
Linux：python3 -m twine upload dist/--repository
Windows：py -m twine upload dist/--repository使用上传的python包
Linux：python3 -m pip install --index-urlhttps://test.pypi.org/simple/--no-deps example-pkg-YOUR-USERNAME-HERE
Windows：py -m pip install --index-urlhttps://test.pypi.org/simple/--no-deps example-pkg-YOUR-USERNAME-HERE参与贡献Fork 本仓库新建 Feat_xxx 分支提交代码新建 Pull Request
Package: rpi-temperature-mqtt
Copyright (c) 2016 David ÜbelackerPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Description: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/x-rst
Package: rpi-tlc59711
tlc59711 12 channel LED PWM driverpython port of the c++ version by adafruithttps://github.com/adafruit/Adafruit_TLC59711ChipDatasheet:http://www.ti.com/lit/ds/symlink/tlc59711.pdfAdafruit prototyping board:https://www.adafruit.com/product/1455One communicates with the chip via the i2c bus by toggling clk (clock) to shift the current state (low/high) of the data pin into the ICs 16bit register.UsageConnect the IC to your pi using any two GPIO pinsNameRPi PinRPi GPIOTLC59711Adafruit TLC59711Data18GPIO24SDTIDIClock16GPIO23SCKICI3v313v33v3VCCGround6GNDGNDGNDimport the library and RPi.GPIOimport RPi.GPIO as GPIO
from tlc59711 import tlc59711

GPIO.setmode(GPIO.BCM)
tlc = tlc59711(23, 24)now you can set each channel like thistlc.SetPWM(0,0xFFFF)this sets channel 0 to maximum brightness. The TLC supports 65536 brightness steps from 0 to 100%:ValueBrightness0xFFFF100%0x7FFF50%0x3FFF25%the datasheet has more information on thisLicensethis package is a port ofhttps://github.com/adafruit/Adafruit_TLC59711their BSD license.txt is included in this repository.
Package: rpi-tm1637
TM1637Raspberry Pi Python 3 TM1637A Python 3 port from MicroPython library for the quad 7-segment LED display modules based on the TM1637 LED driver, implemented on Raspberry Pi.For example, theGrove - 4 Digit Display moduleInstallationThis project is available throughpip. Make sure that you are using Python 3.$ pip3 install raspberrypi-tm1637ExamplesBasic usageimporttm1637tm=tm1637.TM1637(clk=5,dio=4)# all LEDS on "88:88"tm.write([127,255,127,127])# all LEDS offtm.write([0,0,0,0])# show "0123"tm.write([63,6,91,79])# show "COOL"tm.write([0b00111001,0b00111111,0b00111111,0b00111000])# show "HELP"tm.show('help')# display "dEAd", "bEEF"tm.hex(0xdead)tm.hex(0xbeef)# show "12:59"tm.numbers(12,59)# show "-123"tm.number(-123)# show temperature '24*C'tm.temperature(24)For more detailed examples, seedemo.pySeven Segment FontThey are called 7-segment displays as there are 7 LEDs for each digit (segment).
One byte (7 lower bits) for each segment. The 8th bit (MSB) is for the colon and only on the 2nd segment.A
     ---
  F |   | B   *
     -G-      H (on 2nd segment)
  E |   | C   *
     ---
      D

  HGFEDCBA
0b01101101 = 0x6D = 109 = show "5"DisplayBinHexDec00b001111110x3F6310b000001100x06620b010110110x5B9130b010011110x4F7940b011001100x6610250b011011010x6D10960b011111010x7D12570b000001110x07780b011111110x7F12790b011011110x6F111A0b011101110x77119b0b011111000x7C124C0b001110010x3957d0b010111100x5E94E0b011110010x79121F0b011100010x71113G0b001111010x3D61H0b011101100x76118I0b000001100x066J0b000111100x1E30K0b011101100x76118L0b001110000x3856M0b010101010x5585n0b010101000x5484O0b001111110x3F63P0b011100110x73115q0b011001110x67103r0b010100000x5080S0b011011010x6D109t0b011110000x78120U0b001111100x3E62v0b000111000x1C28W0b001010100x2A42X0b011101100x76118y0b011011100x6E110Z0b010110110x5B91blank0b000000000x000-0b010000000x4064*0b011000110x6399MethodsGet or set brightness.brightness(val=None)Write one or more segments at a given offset.write(segments,pos=0)Convert a single hex digit (0x00-0x0f) to a segment.encode_digit(digit)Convert a string to a list of segments.encode_string(string)Convert a single character to a segment.encode_char(char)Display a number in hexadecimal format 0000 through FFFF.hex(val)Display a number -999 through 9999, right aligned.number(num)Display 2 independent numbers on either side of the (optional) colon, with leading zeros.numbers(num1,num2,colon=True)Display a temperature -9 through 99 followed by degrees C.temperature(num)Show a string on the display.
Shorthand forwrite(encode_string()).
Limited to first 4 characters.show(string,colon=False)Display a string on the display, scrolling from the right to left, speed adjustable.
String starts off-screen and scrolls until off-screen at 4 FPS by default.scroll(string,delay=250)PartsGrove 4 Digit Display$5.90 USDGrove Male Jumper Cable$2.90 USDConnectionsRaspberry Pi4 Digit DisplayGPIO5CLKGPIO4DIO3V3 (or 5V)VCCGNDGNDLinksTM1637 datasheetNokia 5110 versionBBC micro:bit versionLicenseLicensed under theMIT License.
Package: rpi_TM1638
# rpi-TM1638=============`rpi-TM1638` is (yet another) Raspberry Pi driver for (chained) TM1638 boards like the 2$ cheap ones you can buy online.![One of these TM1638 board](doc/TM1638.JPG)These boards have onboard eight 7-segment displays, 8 LEDs and 8 switches.With few lines, you can control several TM1638 boards, and uses several LEDs, 7-segment displays and switches with few GPIOs of your Raspberry Pi.Example: suppose you have two TM1638 boards, that share DataIO on GPIO19 and the clock on GPIO13. They have their STB plugged on GPIO 6 and 26.The following program turns on the LEDs #0 (3rd left of the 1st board) and #9 (2nd left of the 2nd board). It displays `12345678` on the first 7-segment display, and `2.3` on the 2nd one.It captures the #2 switch (3rd if tge 1st board)DIO = 19CLK = 13STB = 06, 26TM = TMBoards(DIO, CLK, STB, 0)TM.leds[3] = TrueTM.leds[9] = TrueTM.segments[0] = '12345678'TM.segments[10] = '2.3'a = TM.switches[2]The `rpi-TM1638` proposes a two-level API:- The class `chainedTM1638` proposes low-level function to manipulate the TM chips:- `turnOn(brightness)`,  `turnOff` and `clearDisplay` to turn on/off the displays, clear the displays or set the brightness- `sendCommand` and `sendData` to talk with the TM chip- plus some intern functions (to change the data mode, etc.)- The class `TMboards` (that inherits from `chainedTM1638`) proposes somes methods to manipulate the LEDs, 7-segment displays and switches, with some getter/setter on the properties:- `leds`: for the leds- `segments`: for the 7-segment displays- `switches`: for the switchesTo use the package, you just need to create a `TMboards` object or create a class that inherits from `TMboards` and proposes some high-level properties on top of it.
Package: rpi-torchvision
torchvisionThe torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision.InstallationTorchVision requires PyTorch 1.4 or newer.Anaconda:condainstalltorchvision-cpytorchpip:pipinstalltorchvisionFrom source:pythonsetup.pyinstall# or, for OSX
# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py installBy default, GPU support is built if CUDA is found andtorch.cuda.is_available()is true.
It’s possible to force building GPU support by settingFORCE_CUDA=1environment variable,
which is useful when building a docker image.Image BackendTorchvision currently supports the following image backends:Pillow(default)Pillow-SIMD- amuch fasterdrop-in replacement for Pillow with SIMD. If installed will be used as the default.accimage- if installed can be activated by callingtorchvision.set_image_backend('accimage')C++ APITorchVision also offers a C++ API that contains C++ equivalent of python models.Installation From source:mkdirbuildcdbuild# Add -DWITH_CUDA=on support for the CUDA if neededcmake..makemakeinstallOnce installed, the library can be accessed in cmake (after properly configuringCMAKE_PREFIX_PATH) via theTorchVision::TorchVisiontarget:find_package(TorchVision REQUIRED)target_link_libraries(my-target PUBLIC TorchVision::TorchVision)TheTorchVisionpackage will also automatically look for theTorchpackage and add it as a dependency tomy-target,
so make sure that it is also available to cmake via theCMAKE_PREFIX_PATH.For an example setup, take a look atexamples/cpp/hello_world.DocumentationYou can find the API documentation on the pytorch website:http://pytorch.org/docs/master/torchvision/ContributingWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.Disclaimer on DatasetsThis is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset’s license.If you’re a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thanks for your contribution to the ML community!
Package: rpiup
rpiup - Raspberry Pi OS SetupInstallpipinstallrpiupUsageInitializing an applicationThis is one time setup that you should only need to run once for each application.download the latest Raspberry OS (firstboot)The OS is fromhttps://github.com/nmcclain/raspberian-firstbootThis is a modified RPi OS where the only change is that it lets you run a script on first boot.rpiuposdownloadInitialize your application filesThis creates a directory and copies the default files into it. If./sdis omitted, it will use the current directory (./).The files in this directory will all be copied into the raspberry pi boot directory after it is flashed.rpiupinit./myapp# whats the app name? ...# What should the device username be? ...# What should the device password be? ...# Do you want to set a git username?# Do you want to set a git password?# what's your wifi?: ...# Do you have a set of alternate wifi credentials you would like to add?# any app variables you want to set? (press enter to skip) ...# all set!cdmyapp
ls*# firstboot.sh## resources:# aps.yml docker services setup.sh vars.shInstall Balena EtcherThis is an application that will flash your OS image onto your SD card. You can find ithere.Device Specific SetupRepeat for each device you want to setup.Flash your SD CardInsert your SD cardOpen Etcher and flash the downloaded os image (should be in the directory abovemyapp/)Copy files over and finish device specific configurationrpisdsetup# by default, the hostname will be <APP_NAME>-<ETH0_MAC_ADDR># but you can set a custom hostnamerpisdsetup--hostnamemytestpiAlternativesIf you're doing a large batch of devices, it can make sense to generate the hostnames before and print out a list of labels to put on the devices. To do that:### Run once - generate the hostname list and save it to a tsv file:# pip install randomnamerandomnamesaved--namemyapp-gmyapp,uuid/8-n100--overwrite

randomnamesaved--namemyappexport>hostnames.tsv### Run for each device:# increment the index at the end of the linerpisdsetup--hostname$(randomnamesaved--namemyappget0)# increment from 0 to 1rpisdsetup--hostname$(randomnamesaved--namemyappget1)# and so on...What it can do:set the device hostnameset wifi networksset arbitrary variables that can be accessed from the device.run arbitrary commandsCLISet the hostnamerpiupvarsset--hostnameblah-091091eh901eh# orpipinstallrandomname
rpiupvarsset--hostname$(randomnameget)Setting arbitrary environment variablesrpiupvarsset--some-feature1--myapp_somethingblahSet wifi networksrpiupwifiaddMySSID-2G# enter password:# orrpiupwifiaddMySSID-2Gmypassword
Package: rpi-vidlooper
rpi-vidlooperA video looper for the Raspberry Pi, controlled by GPIO pins. Designed to
run an unattended video display, where users can select the active video
by switch.MIT licensed.FeaturesPlay videos usingOMXplayer, a hardware-
assisted video player for smooth playback.Switch between 2 or more videos using hardware switches wired to the
Raspberry Pi's GPIO pins.Optionally, indicate the active video by LED. This can be used with
arcade-style switches which have built-in LEDs, or separate ones.Callback-based, rather than polling-based. This means that button
presses should always be acted upon.Thread locking, to avoid issues when buttons are pressed rapidly
and the video hasn't finished loading yet.UsageI've published a two part tutorial on myblog:Inpart 1,
I cover the hardware parts list and build instructions, including a
3D-printed caseInpart 2,
I describe thisrpi-vidloopersoftware tool and how to get it set up
and configuredOn the hardware side, you'll need a Raspberry PI with several switches,
one for each video. Each switch should be connected to a GPIO pin, and
to ground. Optionally, you can set up an indicator LED for each video,
connected to a GPIO pin.Install dependencies:sudo apt-get update
sudo apt-get install python3-pip omxplayer fbiInstall rpi-vidlooper:pip3 install rpi-vidlooperThis creates thevidloopercommand. For usage help, see:vidlooper --helpTroubleshootingRuntimeError: No access to /dev/mem. Try running as root!By default, you'll need to runsudo vidlooper, to gain access to the GPIO
pins and the graphics card (GPU) foromxplayer. Generally, this is not
recommended.To avoid this, the user you want to run the vidlooper as will need to be
in thegpiogroup. For example, for thepiuser, you'd need to do this:sudo usermod -a -G gpio piSeefurther information on this issue.No rights to /dev/vchiqSee theOMXplayer troubleshootingto fix
this issue. It's also possible to avoid by runningsudo vidlooper, but
as above, this is not recommended.Further readingRaspberry Pi Video Player Hardware tutorialRaspberry Pi Video Player Software tutorialPython on the Raspberry PiOMXPlayer, a hardware-accelerated video player for Raspberry Pi
Package: rpi-ws281x-hub
RPi WS281x HubControl your raspberry piws281xleds from your network, using a local api / web application.Backend:python/fast-api| Frontend:vuejs/vuetifyApplicationInstallationOn the pi run the following pip commands (as root cause the service will need priviledges to access PWM channels).sudopip3installrpi_ws281x_hubOnce installed make sure that theconfig.jsonfile match your hardware setup, important part beingnum(number of pixels),pin(hardware pin used to control the led) and finallychannel(depending on the pin).Know workingpin|channelpairs are:12|0,18|0or13|1seerpi_ws281xfor more information.Finally fire the thing with:sudorpi-ws281x-hubAnd openhttp://<your-pi-ip>:8000in a web browser.DevelopmentClone this repository:gitclonehttps://github.com/vrince/rpi-ws281x-hub.gitcdrpi-ws281x-hubInstall dependencies and install package in dev mode:sudopython3setup.pydevelopRun locally:# using scriptsudorpi-ws281x-hub# or directly using the api.py mainsudopython3rpi_ws281x_hub/api.py--port8000Web application can be reach athttp://<your-pi-ip>:8000/appAdd a new ledtaskCreditshttps://github.com/jgarff/rpi_ws281xAll images used are fromflaticon.commake sure to visite their site :https://www.flaticon.com/search?author_id=1&style_id=15&type=standard&word=color
Package: rpi-ws281x-mock
rpi-ws281x mockThis package mocks the behavior of therpi_ws281xPython library. This is used for testing a project that usesrpi_ws281xon non-Raspbian systems. Simply replace the pip installation ofrpi_ws281xwithrpi_ws281x_mockin your development environment to start using it.Free software: MIT licenseDocumentation:https://rpi-ws281x-mock.readthedocs.io.FeaturesImplements all methods fromrpi_ws281xwithout calling any of the hardware functionsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2020-05-18)Add ws classUpdate several dependencies0.1.5 (2019-09-21)Bump PyPI development status to beta0.1.4 (2019-09-21)Add codecov integrationImprove docs0.1.3 (2019-09-21)Add test for getPixels()Improve documentation0.1.2 (2019-09-20)Update pypi secretDrop python27 support0.1.1 (2019-09-20)Add proper files0.1.0 (2019-09-20)First release on PyPI.
Package: rpizero-hid
HID python library for emulating mouse and keyboard on PI zero.Setup - Tested onRaspbianlite 5.10Install apt dependenciessudoapt-getupdate
sudoapt-getinstall-ygitpython3-pipinstall usb gadget modulehttps://github.com/Pant3x/rpizero-hid/tree/main/usb_gadgetInstallrpizero-hidwithpippip3installrpizero-hidUsageNote: You should connect the data usb port (left one) to the raspberry, and NOT the power portControl mousefromrpizero_hidimportMousem=Mouse()foriinrange(5):m.move_relative(10,10)Control keyboardfromrpizero_hidimportKeyboardk=Keyboard()k.type('Hello world!')