semvec/pypi-packages huggingface dataset:
xinabox-SL19 0.0.8
Infrared object temperature sensor
Requires Python: >=3.6

[![GitHub Issues](https://img.shields.io/github/issues/xinabox/Python-SL19.svg)](https://github.com/xinabox/Python-SL19/issues)
![GitHub Commit](https://img.shields.io/github/last-commit/xinabox/Python-SL19)
![Maintained](https://img.shields.io/maintenance/yes/2020)
![Build status badge](https://github.com/xinabox/Python-SL19/workflows/Python/badge.svg)
![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)

# Python-SL19

The SL19 xChip is equipped to measure temperature as a function of infrared light/radiation (IR) radiating from objects in its field of view. Is is based on the [MLX90614](https://www.melexis.com/en/product/MLX90614/Digital-Plug-Play-Infrared-Thermometer-TO-Can) in which a IR sensitive thermopile detector chip and signal conditioning ASIC are integrated.

The MLX90614 is factory calibrated in wide temperature ranges: -40-125ËšC for the ambient temperature and -70-380ËšC for the object temperature. The measured value is the average temperature of all objects in the Field Of View of the sensor. The MLX90614 offers a standard accuracy of Â±0.5ËšC around room temperatures.

# Usage

## Mu-editor
Download [Mu-editor](https://github.com/xinabox/mu-editor/releases/tag/v1.1.0a2)

### CW01 and CW02
- Use [XinaBoxUploader](https://github.com/xinabox/XinaBoxUploader/releases/latest) and flash MicroPython to the CW01/CW02.
- Download Python packages from the REPL with the following code:
    ```python
    import network
    import upip
    sta_if = network.WLAN(network.STA_IF)
    sta_if.active(True)
    sta_if.connect("ssid", "password")
    upip.install("xinabox-SL19")
    ```

### CC03, CS11 and CW03
- Download the .UF2 file for CC03/CS11/CW03 [CircuitPython](https://circuitpython.org/board/xinabox_cs11/) and flash it to the board.
- TO DO

### MicroBit
- TO DO

## Raspberry Pi

Requires Python 3
```
pip3 install xinabox-SL19
```

# Example
```python
from xCore import xCore
from xSL19 import xSL19

# SL19 instance
SL19 = xSL19()

# configure SL19
SL19.init()

while True:
    tempAmbient = SL19.getAmbientTempC()	# returns ambient temp in degree celcius
    tempObject = SL19.getObjectTempC()		# returns object temp in degree celcius

    # prints on console
    print('Ambient: ',tempAmbient,' C')
    print('Object : ',tempObject,' C')

    xCore.sleep(2000)
```
biva-pytorch 0.1.4
Official PyTorch BIVA implementation (BIVA: A Very Deep Hierarchy of Latent Variables for Generative Modeling)

# BIVA (PyTorch)

Official PyTorch BIVA implementation (BIVA: A Very Deep Hierarchy of Latent Variables forGenerative Modeling) for binarized MNIST and CIFAR. The original Tensorflow implementation can be found [here](https://github.com/larsmaaloee/BIVA).

## run the experiments

```bash
conda create --name biva python=3.7
conda activate biva
pip install -r requirements.txt
CUDA_VISIBLE_DEVICES=0 python run_deepvae.py --dataset binmnist --q_dropout 0.5 --p_dropout 0.5 --device cuda
CUDA_VISIBLE_DEVICES=0 python run_deepvae.py --dataset cifar10 --q_dropout 0.2 --p_dropout 0 --device cuda
```

## Citation

```
@article{maale2019biva,
    title={BIVA: A Very Deep Hierarchy of Latent Variables for Generative Modeling},
    author={Lars Maaløe and Marco Fraccaro and Valentin Liévin and Ole Winther},
    year={2019},
    eprint={1902.02102},
    archivePrefix={arXiv},
    primaryClass={stat.ML}
}
```

## Pip package

### install requirements

* `pytorch 1.3.0`
* `torchvision`
* `matplotlib`
* `tensorboard`
* `booster-pytorch==0.0.2`

### install package

```bash
pip install git+https://github.com/vlievin/biva-pytorch.git
```

### build deep VAEs

```python
import torch
from torch.distributions import Bernoulli

from biva import DenseNormal, ConvNormal
from biva import VAE, LVAE, BIVA

# build a 2 layers VAE for binary images

# define the stochastic layers
z = [
    {'N': 8, 'kernel': 5, 'block': ConvNormal},  # z1
    {'N': 16, 'block': DenseNormal}  # z2
]

# define the intermediate layers
# each stage defines the configuration of the blocks for q_(z_{l} | z_{l-1}) and p_(z_{l-1} | z_{l})
# each stage is defined by a sequence of 3 resnet blocks
# each block is degined by a tuple [filters, kernel, stride]
stages = [
    [[64, 3, 1], [64, 3, 1], [64, 3, 2]],
    [[64, 3, 1], [64, 3, 1], [64, 3, 2]]
]

# build the model
model = VAE(tensor_shp=(-1, 1, 28, 28), stages=stages, latents=z, dropout=0.5)

# forward pass and data-dependent initialization
x = torch.empty((8, 1, 28, 28)).uniform_().bernoulli()
data = model(x)  # data = {'x_' : p(x|z), z \sim q(z|x), 'kl': [kl_z1, kl_z2]}

# sample from prior
data = model.sample_from_prior(N=16)  # data = {'x_' : p(x|z), z \sim p(z)}
samples = Bernoulli(logits=data['x_']).sample()

```
gauss-binomial-mp99 0.1.3
Gaussian and Binomial distributions

# gauss-binomial-mp99 package

The package contains methods for performing computations pertaining to Guassian and Binomial distributions.

# Installation

```
>>> pip install gauss-binomial-mp99
```

# Files

Generaldistribution.py
The parent class, contains `__init__` and `read_data_file` methods.

Import:
```
>>> from gauss_binomial_mp99 import Gaussian, Binomial
>>> gauss = Gaussian()
>>> gauss.read_data_file('sample.txt') 
```

## Gaussiandistribution.py
Gaussian distribution class for calculating and visualizing a Gaussian distribution. Methods to compute Gaussian distribution features include- 

* `calculate_mean()`: Function to calculate the mean of the data set.
* `calculate_stdev()`: Function to calculate the standard deviation of the data set.
* `plot_histogram()`: Function to output a histogram of the instance variable data using matplotlib pyplot library.
* `pdf(x)`: Probability density function calculator for the gaussian distribution.
* `plot_histogram_pdf`: Function to plot the normalized histogram of the data and a plot of the probability density function along the same range

**Default**: *mu*= 0 and *sigma*=1

*Form: guass(mu, sigma)*

Example:
```
>>> gauss.calculate_mean()
78.0909090909091
>>> gauss.calculate_stdev()
92.87459776004906
```


Provides the functionality of adding two Gaussian distribution objects.


## Binomialdistribution.py
Binomial distribution class for calculating and visualizing a Binomial distribution. Methods to compute Gaussian distribution features include-

* `calculate_mean()`: Function to calculate the mean from p= probability and n= size
* `calculate_stdev()`: Function to calculate the standard deviation from p and n.
* `plot_bar()`: Function to output a histogram of the instance variable data using matplotlib pyplot library.
* `pdf(x)`: Probability density function calculator for the gaussian distribution. 
* `plot_bar_pdf`: Function to plot the pdf of the binomial distribution.

**Default**: *p*= 0.5 and *n*=20

*Form: bin(p, n)*

```
>>> bin= Binomial(.45, 78)
>>> bin.pdf(34)
0.08798942891783665
```

Provides the functionality of adding two Binomial distribution objects with the same probablity.
medusa-protocol 0.0.2
Library with the binary and not protocol
Requires Python: >=3.5
Keywords: medusa_protocol

===============
Medusa Protocol
===============

Library with the binary and not protocol

Features
--------

* TODO

Credits
-------

This package was created with cookiecutter and modified by Andrea Mucci <andrea@breda.build>


=======
History
=======

0.0.1 (2020-06-21)
------------------

* First release.