semvec/pypi-packages huggingface dataset:
hardware-metrics-iti 0.0.2
Decorador que proporciona estadisticas del hardware
Requires Python: >=3.10

# Hardware metrics

Librería desarrollada para la evaluación de consumo de recursos hardware por un método.

Para ello se ha desarrollado un decorador que se coloca sobre la función que ejecuta el código del que queremos obtener las métricas.

## Instalación

- Clonar repositorio
- Ejecutar el siguiente comando
        
        python3 -m pip install --upgrade build
        python3 -m build
        
- Tras ello se habrá creado una carpeta /dist con un fichero con formato .whl, se deberá hacer pip install y la ruta al archivo, esto instalará la librería y todas las dependencias en el environment actual.

## Uso

Para importar la función principal de la librería:

``` python
from hardware_metrics import hardware_metrics
```

Para usar el método, se deberá poner encima de la función el decorador importado:

``` python
@hardware_metrics('path/de/prueba')
def hello_world: #función de ejemplo
    print('hola')
```

También se puede escribir sin path para que se utilice el path por defecto 'hardware_metrics_results':

``` python
@hardware_metrics()
def hello_world: #función de ejemplo
    print('hola')
```
sclblonnx 0.3.0
Python package containing Scailable ONNX tools.
Requires Python: >=3.7

# sclblonnx

[![PyPI Release](https://github.com/scailable/sclblonnx/workflows/PyPI%20Release/badge.svg)](https://pypi.org/project/sclblonnx/)


The `sclblonnx` package provides a high level API to construct and alter ONNX graphs.

The basic usage is as follows:
```python

import sclblonnx as so

g = so.empty_graph()
n1 = so.node('Add', inputs=['x1', 'x2'], outputs=['sum'])
g = so.add_node(g, n1)
# etc.

```
Please see the `examples/` folder in this repo for examples.
mqtttimeserieslogger-tspspi 0.0.5
A very simple NPZ file time series logger for MQTT events
Requires Python: >=3.6

# Simple MQTT time series logger

__Work in progress, not production ready__

This is a very simple (Python) logging daemon that subscribes
to multiple MQTT topics and logs received messages including
timestamps into daily ```npz``` files. The way it currently works
is really crude so it's only useable for low rate measurements
like minutely temperatures or alike. All data is read and written
for each measurement at the moment (this will change in future).

The service is configured by a configuration file (by default
at ```~/.config/mqttserieslogger.cfg```.

## Installation

```
pip install mqtttimeserieslogger-tspspi
```

## Sample configuration

```
{
        "datasources" : [
                {
                        "broker" : {
                                "broker" : "10.4.1.1",
                                "user" : "quasem",
                                "password" : "XXXX",
                                "basetopic" : "quasem/experiment/"
                        },

                        "quantities" : [
                                {
                                        "name": "pt1000pcb",
                                        "topic" : "cryo/temperature/pt1000pcb",
                                        "field" : [ "temperature", "temperature_C" ]
                                }
                        ]
                }
        ]
}
```

## Automatic launching with ```rc.init``` script

```
#!/bin/sh

# PROVIDE: mqtttimeserieslogger
# REQUIRE: NETWORKING SERVERS

# Simple MQTT time series logger
# 
# RC configuration variables:
#  mqtttimeserieslogger_enable:="NO"
#   Enables the logging service

. /etc/rc.subr

name="mqtttimeserieslogger"
rcvar=mqtttimeserieslogger_enable

load_rc_config $name
: ${mqtttimeserieslogger_enable:="NO"}

command=/usr/local/bin/mqtttimeserieslogger

load_rc_config $name
run_rc_command "$1"
```
verify-oidc-token 0.1.0
A tool to verify OIDC tokens
Requires Python: >=3.8

# verify-oidc-token

Python tool for verifying OpenID Connect (OIDC) tokens.

## Installation

Install via PyPI:

```bash
pip install verify-oidc-token
```

Or, install from the source repository:

```bash
git clone https://github.com/ei-grad/verify-oidc-token
cd verify-oidc-token

# Optionally, create a virtual environment:
python3 -m venv venv
source venv/bin/activate  # Linux/MacOS
# venv\Scripts\activate  # Windows

pip install .
```

## CLI Usage

Verify an OIDC token directly from the command line. Example:

```bash
echo "<OIDC_TOKEN>" | verify-oidc-token --issuer https://example-issuer.com --client-id <CLIENT_ID>
```

Or, specify a file with the token:

```bash
verify-oidc-token --token-file /path/to/token.txt --issuer https://example-issuer.com --client-id <CLIENT_ID>
```

### CLI Options:

- `--token-file` : The file containing the OIDC token (can be omitted if passed via stdin).
- `--issuer` : The expected issuer of the token (authorization server).
- `--client-id` : The expected client ID (audience) of the token.
- `--verbose`: Enable verbose logging for debugging purposes.

Example:

```bash
verify-oidc-token --token-file token.txt --issuer https://accounts.google.com --client-id my-client-id
```

### Example Output:

For a valid token:

```json
{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022,
  ...
}
```

For an invalid token:

```json
{
  "error": "Invalid issuer. Expected 'https://example-issuer.com', got 'https://wrong-issuer.com'"
}
```

### Output Format:

- Valid tokens return decoded claims as a JSON object.
- If validation fails, an error message is returned as JSON:

  ```json
  {
    "error": "Description of the validation error"
  }
  ```

## Library Usage

Use this tool as a library in Python code:

```python
from verify_oidc_token import verify_token
import jwt

token = "eyJhbGciOiJSUzI1NiIsInR5..."
issuer = "https://accounts.google.com"
client_id = "my-client-id"

try:
    claims = verify_token(token, issuer, client_id)
    print("Token is valid. Claims:", claims)
except jwt.InvalidTokenError as e:
    print({"error": str(e)})
```

### Library API:

- `verify_token(token: str, issuer: str, client_id: str) -> dict`
   Verifies the token, ensuring it matches the specified issuer and client ID, and returns the claims if valid.

   - **Parameters**:
     - `token` (str): The JWT to verify.
     - `issuer` (str): Expected issuer of the token.
     - `client_id` (str): Expected client ID (audience).
   - **Returns**: Dictionary with the decoded claims.
   - **Raises**: `jwt.InvalidTokenError` if validation fails.

## Testing

Run unit tests to ensure functionality:

```bash
python -m unittest discover tests
```

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Author

Andrew Grigorev (<andrew@ei-grad.ru>)

Reach out with any questions or contribute to the project via the [GitHub repository](https://github.com/ei-grad/verify-oidc-token).