semvec/pypi-packages huggingface dataset:
sp110e 1.4.2
Control SP110E BLE RGB LED device from computer
License: MIT
Requires Python: >=3.7,<4.0
Keywords: SP110E,RGB,LED

# SP110E Python Library

Control SP110E BLE RGB LED device from computer

## Install

```bash
pip install sp110e
```

## Tools

- Controller: High-level SP110E asynchronous controller. Use it only in asynchronous environment (with `asyncio`)
- ControllerSync: Synchronous adapter for high-level SP110E asynchronous controller. Handy tool to use from Python shell or synchronous (normal) environment
- Driver: Low-level SP110E asynchronous BLE driver based on bleak library. Use it only if you know why

## Documentation

[Full API Reference](./docs)

## Examples

Quick start:

```python
from sp110e.controller_sync import ControllerSync

device = ControllerSync('AF:00:10:01:C8:AF')
device.switch_on()
device.set_color([255, 0, 0])
device.set_brightness(255)
```

[More examples](examples)

## Development

### Create new release

Push changes to 'main' branch following [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).

### Update documentation

`docs` folder is being updated automatically by GitHub Actions when source files are changed.

## Integrations

- [SP110E Home Assistant Integration](https://github.com/roslovets/SP110E-HASS)

## Useful links

- [SP110E API Reference](https://gist.github.com/mbullington/37957501a07ad065b67d4e8d39bfe012)
- [Vox](https://github.com/nguyenthuongvo/Vox)
- [bleak library](https://github.com/hbldh/bleak)
- [Reverse engineering simple BLE](http://nilhcem.com/iot/reverse-engineering-simple-bluetooth-devices)
pichromecast 0.6
Library for MicroPython to communicate with the Google Chromecast.
License: MIT

[![Python](https://img.shields.io/pypi/pyversions/pichromecast.svg)](https://badge.fury.io/py/pichromecast)
[![PyPI](https://badge.fury.io/py/pichromecast.svg)](https://badge.fury.io/py/pichromecast)
# PiChromecast
Library for MicroPython to communicate with the Google Chromecast.

## Install
`Tools` > `Manage packages...`

![image](https://user-images.githubusercontent.com/12811398/188298181-916f6997-2c25-4d4e-8a7f-a9152ce1c1e9.png)

or copy and paste code

https://github.com/GitHub30/pichromecast/blob/main/pichromecast.py

## Usage

```python
from pichromecast import play_url

play_url('https://nyanpass.com/nyanpass.mp3', '192.168.10.101')
```

Text to Speech

```python
from pichromecast import play_url, create_url

play_url(create_url('hello world', 'en'), '192.168.10.101')
```

```python
# https://gist.github.com/SpotlightKid/eca9b00239104e8c599b86635f62ab73#file-urlencode-py
from urlencode import urlencode
from pichromecast import play_url

url = 'https://translate.google.com/translate_tts?client=tw-ob&' + urlencode({'q': 'Hello, 世界', 'tl': 'ja'})
play_url(url, '192.168.10.101')
```

### Connect wifi and play
```python
import network
import time

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("aterm-SSID-g", "YOUR_PASSWORD")
while not wlan.isconnected() and wlan.status() >= 0:
    print("Waiting to connect:")
    time.sleep(1)


from pichromecast import play_url

play_url('https://nyanpass.com/nyanpass.mp3', '192.168.10.101')
```

![image](https://user-images.githubusercontent.com/12811398/188296486-296ed2e6-84c1-493a-9125-202f22bd04cd.png)


### Lookup host IP

```python
#pip install pychromecast
import pychromecast

services, browser = pychromecast.discovery.discover_chromecasts()
pychromecast.discovery.stop_discovery(browser)
print(services)
[CastInfo(services={ServiceInfo(type='mdns', data='Google-Home-Mini-3b0a32dc5803130351919f8a286e406f._googlecast._tcp.local.')}, uuid=UUID('3b0a32dc-5803-1303-5191-9f8a286e406f'), model_name='Google Home Mini', friendly_name='書斎', host='192.168.10.101', port=8009, cast_type='audio', manufacturer='Google Inc.')]
```

or use [MicroPython MDNS](https://pypi.org/project/micropython-mdns/)

## Demo

[![Watch the video](https://img.youtube.com/vi/bA8fouVAPho/maxresdefault.jpg)](https://youtu.be/bA8fouVAPho)
losshub 0.0.6
Classification Loss Function Library
License: MIT
Requires Python: >=3.7
Keywords: machine-learning,deep-learning,ml,pytorch,vision,loss,image-classification,video-classification

<p align="center">
<img src="doc/logo.png" width="450">
</p>
<p align="center"> LossHub: Loss Functions Library for Image Classification and Detection</p>
<div align="center">
    <a href="https://badge.fury.io/for/py/losshub"><img src="https://badge.fury.io/py/losshub.svg" alt="pypi version"></a>
    <a href="[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/kadirnar)"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue.svg" alt="hugging face spaces"></a>
    <a href="[![Medium](https://img.shields.io/badge/Medium-Blog-red)](https://medium.com/@kadir.nar)"><img src="https://img.shields.io/badge/%20Medium%20-Blog-blue.svg" alt="medium"></a>

</div>

## Loss Functions for Image Classification

Rmse: It is a frequently used measure of the differences between values (sample or population values) predicted by a model or an estimator and the values observed. 
### $$\text{rmse}(x,y) = \sqrt{\frac{1}{n}\sum_{i=1}^n (x_i - y_i)^2}$$
Mse: In statistics, the mean squared error or mean squared deviation of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the errors—that is, the average squared difference between the estimated values and the actual value. 
### $$\text{mse}(x,y) = \frac{1}{n} \sum_{i=1}^n (x_i - y_i)^2$$


## Installation
```bash
pip install losshub
```

## Usage
```python
from losshub.losses import mse, rmse
# outputs and labels
y_true = [1, 2, 3, 4, 5]
y_pred = [1, 2, 3, 4, 5]
# mse
mse(y_true, y_pred)
# rmse
rmse(y_true, y_pred)
```

## References
- [Balanced-Loss](https://github.com/fcakyon/balanced-loss/)
- [Rmse](https://en.wikipedia.org/wiki/Root_mean_squared_error)
- [Mse](https://en.wikipedia.org/wiki/Mean_squared_error)