semvec/pypi-packages huggingface dataset:
pyhuelights 0.8.2
Library to remote control Philips Hue Lights
License: MIT

#### This README is a work in progress.

# Highlight [![Build Status](https://travis-ci.org/supersaiyanmode/PyHueLights.svg?branch=master)](https://travis-ci.org/supersaiyanmode/PyHueLights)[![Coverage Status](https://coveralls.io/repos/github/supersaiyanmode/PyHueLights/badge.svg)](https://coveralls.io/github/supersaiyanmode/PyHueLights)
(Yet another) Philips Hue SDK (Python).


## Sample Code

    from pyhuelights.discovery import DefaultDiscovery
    from pyhuelights.core import *
    from pyhuelights.manager import *
    from pyhuelights.animations import *
    from pyhuelights.registration import *
    
    store = {}
    conn = DefaultDiscovery().discover()
    conn = register(conn, HueApp("test", ""), store)   # Remember to push the button on the hub within
                                                       # the last 30 sec of executing this line.
    
    lm = LightsManager(conn)
    lights = lm.get_all_lights()
    lm.run_effect(lights['1'], ColorLoopEffect())
aesthema 0.1.1
Modern & visually appealing colormaps for Matplotlib
License: MIT
Requires Python: >=3.8

# Aesthema

Aesthema provides modern &amp; visually appealing colormaps for Matplotlib.

Matplotlib is a great package for visualizations, but we've all been there when you start creating your own colormaps because the default ones look not really appealing or you need to stick to your already existing theme.
This is where this small package comes into play. Instead of creating your own colormaps all the time, you can use the provided colormaps or you can also easily create your own colormaps either by using the provided colors or any RGB color.

Currently available colors:

![Available colors](https://github.com/jspieler/aesthema/blob/main/docs/colors.svg?raw=True)

Currently available colormaps:

![Available colormaps](https://github.com/jspieler/aesthema/blob/main/docs/colormaps.svg?raw=True)

## Quickstart

You can install the package using `pip`:

```
pip install aesthema
```

Let's take a look at some examples:

```python
import numpy as np
import matplotlib.pyplot as plt

from aesthema import use_colormap


use_colormap()

x = np.linspace(0, 2 * np.pi, 100)

plt.figure()

plt.plot(x, np.sin(x))
plt.plot(x, np.cos(x))
plt.plot(x, np.sin(x + np.pi / 4))
plt.plot(x, np.cos(x + np.pi / 4))
plt.plot(x, np.sin(2 * x))
plt.plot(x, np.cos(2 * x))

plt.title("Sine and Cosine")
plt.xlabel("x")
plt.ylabel("Amplitude")
plt.show()
```

![Line plot example](./docs/lineplot.svg)

In this example, we use the default colormap. If you want to use a different colormap, just specify it when calling `use_colormap`, e.g.:

```python
from aesthema import use_colormap, Colormaps


use_colormap(Colormaps.PASTEL)
```

You can also create your own custom colormap using either the colors provided in this package or any RGB color:

```python
from aesthema import create_colormap, use_colormap, Colors


my_colormap = create_colormap([Colors.RED, Colors.ORANGE, Colors.LEMON, (141, 215, 127), Colors.LIGHT_OCEAN, (47, 72, 88)])
use_colormap(my_colormap)
```

## Contributing

You created a nice colormap that you want to share with others? Awesome! Create a pull request and we will add it.
mpu-servocontrol 0.1.2
beta version
License: MIT

# MPU6050 Servocontrol (Raspberry Pi)
A small library to control a servomotor via an mpu6050 accelerometer . 
This library is based on the i2c connection and it is necessary to install the smbus module first. 
In fact, it is made only for raspberry pi systems .  



### Installation
First get smbus
```
pip install smbus
```

Then install mpu-servocontrol
```
pip install mpu-servocontrol
```

### ServoControl class

```
ServoControl(servo_pin , i2c_port)
```
i2c_port=1 or 0 (depends of raspberry pi model)
and for servo_pin pick a pin that have pwm


Initialize mpu sensor
```
ServoControl.setup_mpu()
```

Pick an axis (x/y/z)
This method returns data that has been read
```
ServoControl.read_data_x() / .read_data_y() / .read_data_z()
```

Start servocontrol 
As argument put the data read from an axis
```
ServoControl.start_control(data)
```

Stop servocontrol 
```
ServoControl.stop_control()
```


### Get started
This is an exemple

```Python
import RPi.GPIO as g
from mpu_servocontrol.mainclass import ServoControl    #Import
import time
import sys


g.setwarnings(False)
g.setmode(g.BCM)

sc = ServoControl(servo_pin=12 , i2c_port=1)        #Make an instance of ServoControl class
sc.setup_mpu()                                      #Initialize mpu6050 accelerometer

try:
    while True:                                     #Main loop
        data = sc.read_data_y()                     #Read data from y axis
        sc.start_control(data=data)                 #Start
        time.sleep(0.08)                            #Add a little delay
except KeyboardInterrupt:
    sc.stop_control()
    g.cleanup()
    sys.exit(0)                                     #Press ctrl+c to stop
```