semvec/pypi-packages huggingface dataset:
collection-views 0.0.2
Mutable and immutable views over standard collections with proper type annotations.
Requires Python: >=3.8,<4.0

# Python collection views
Mutable and immutable views over standard collections with proper type annotations.

## Install
```
pip install collection-views
```

## Sample
```python
from collection_views import ImmutableViewList

mylist = ["Hello", "collection", "views"]
myview = ImmutableViewList(mylist)

print(myview[1]) # prints "collection"
print(myview[1:]) # prints "['collection', 'views']"
myview[0] = "Bye" # Does not support item assignment!
```

## Python support
New releases will support all actively maintained Python versions.
The latest release targets python 3.8 through 3.12.

## Features
* `ImmutableViewList`, an immutable view over a list.
aiearth-predict 0.0.2
AIEarth Spatio-temporal data and AI development kit
Requires Python: >=3.8.13

AI Earth Predict 是时空数据和AI模型相结合的开发套件，用于进行大规模遥感数据模型推理的统一计算库，并可以用来并行处理遥感数据，支持本地模式运行，以及将模型部署到 AI Earth地球科学云平台

[AI Earth Predict Github](https://github.com/aiearth-damo/predict)
envirohat 1.1
Enviro+ sensor in one place
Requires Python: >=3.6

# Envirohat

*Enviro+ sensors in one place*

## Installation

Before installing the package, the `pyaudio` package needs to be installed with `apt`:
```
sudo apt install python3-pyaudio
```

Then the Envirohat package can be installed using `pip`:
```
pip intall envirohat
```

## Reference

`get_temperature()` - get current temperature

`get_humidity()` - get current humidity

`get_pressure()` - get current pressure

`get_altitude(qnh=1013.25)` - get altitude

`get_lux(passive=False)` - get ambient light in lux

`get_proximity(passive=False)` - get raw proximity value, closer object produce larger value

`gas_read_all()` - get gas resistance for oxidising, reducing and NH3

`gas_read_oxidising()` - get gas resistance for oxidising (calls `read_all`)

`gas_read_reducing()` - get gas resistance for reducing (calls `read_all`)

`gas_read_nh3()` - get gas resistance for NH3 (calls `read_all`)

`get_amplitudes_at_frequency_ranges(ranges)` - get the mean amplitude of frequencies in the given ranges
 - `ranges`: List of ranges including a start and end range

`get_amplitude_at_frequency_range(start, stop)` - get the mean amplitude of frequencies in the specified range
 - `start`: Start frequency (in Hz)
 - `end`: End frequency (in Hz)

`get_noise_profile(noise_floor=100,
                          low=0.12,
                          mid=0.36,
                          high=None)` - get a noise characteristic profile
 - `noise_floor`: "High-pass" frequency, exclude frequencies below this value
 - `low`: Percentage of frequency ranges to count in the low bin (as a float, 0.5 = 50%)
 - `mid`: Percentage of frequency ranges to count in the mid bin (as a float, 0.5 = 50%)
 - `high`: Optional percentage for high bin, effectively creates a "Low-pass" if total percentage is less than 100%

`bme` - the BME280 sensor

`ltr` - the LTR559 sensor

`noise` - the noise sensor

All functions support reading a time averaged value. For example
`get_temperature(num=5, delay=0.3)` returns average of 5 temperature readings, `delay` is time between each reading in seconds.
The default values are: `num=1` and `delay=0`.

## Example

``` Python
from envirohat import EnviroHAT
    
hat = EnviroHAT()
    
print("Tepmerature:", hat.get_temperature(), "°C")
print("Humidity:", hat.get_humidity(num=5, delay=0.3), "%")
print("Raw ALS:", hat.ltr.get_raw_als())
```
opentelemetry-exception-ext 0.0.4
OpenTelemetry extension for exception
Requires Python: >=3.7

# OpenTelemetry extension for exception
[![PyPI version](https://badge.fury.io/py/opentelemetry-exception-ext.svg)](https://badge.fury.io/py/opentelemetry-exception-ext)

This repository contains a set of utilities for OpenTelemetry's exception for Python.

# Installation

```bash
pip install opentelemetry-exception-ext
```

# Usage

## Add local variables to attributes of exception's event

```python
from opentelemetry.exception.ext import enable_local_variables_recording

enable_local_variables_recording()
```

When exception is raised, OpenTelemetry automatically creates an event for exception.  
`enable_local_variables_recording()` adds local variables and its function information to the event's attributes automatically by decorating `Span.record_exception()`.  
This helps you find the situation where exception happened.

Attributes will be added like below.

```js
{
    "name": "example for enable_local_variables_recording",
    ...,
    "status": {
        "status_code": "ERROR",
        "description": "Exception: exception: hello, 1234, True"
    },
    "events": [
        {
            "name": "exception",
            "attributes": {
                "exception.type": "Exception",
                "exception.message": "exception: hello, 1234, True",
                "exception.stacktrace": "Traceback (most recent call last) ...",
                "exception.escaped": "False",
                "local.var.text_arg": "hello",  // <= Added value for `text_arg`
                "local.var.int_arg": 1234,  // <= Added value for `int_arg`
                "local.var.bool_var": true,  // <= Added value for `bool_var`
                "local.function.filename": "/path/to/enable_local_variables_recording/sample.py",  // <= Added value for filename
                "local.function.name": "raise_exception",  // <= Added value for function name
                "local.function.lineno": 16  // <= Added value for line number of the file
            }
        }
    ]
}
```

You can see example [here](example/enable_local_variables_recording).

:warning: When using pre-fork server like Gunicorn, you should call `enable_local_variables_recording()` before fork to not run same thing multiple times.