semvec/pypi-packages huggingface dataset:
RP1210 1.0.1
A Python32 implementation of the RP1210C standard.
License: MIT
Requires Python: >=3.9
Keywords: RP1210, RP1210C, J1939, CAN, UDS

# RP1210 for Python

```
pip install rp1210
```
A Python module for interacting with RP1210 adapter drivers, following the RP1210C standard.
Contributions welcome!

**Note from the author:** I no longer work with RP1210 regularly (or at all) and have no need to work with and no access to RP1210 adapters. As such, I'm not actively updating this package anymore. Contributions and bug reports are still welcome.

**This module is considered 'complete', mostly by dint of me not updating it anymore.**

Some documentation and examples are available in [this repo's wiki](https://github.com/dfieschko/RP1210/wiki) and the Examples folder.

This module was written and tested with Python 3.9 and 3.10, 32-bit. Older (and newer) Python versions have not been tested and may not be supported.   
32-bit Python is required because RP1210 drivers are all 32-bit,
and can thus only be loaded with 32-bit Python. A 64-bit implementation via
[MSL-LoadLib](https://github.com/MSLNZ/msl-loadlib) is possible and may be released as a separate
module sometime in the future.

Not all aspects of the RP1210C standard are fully implemented as independent features. Currently, my focus is on J1939 communication.
Other protocols have significantly less support, but you can still access all the low-level commands via the `RP1210API` class.

While I try to provide adequate documentation, the RP1210C standard is owned by TMC, not me, and is
not reproduced here. For a complete understanding of the RP1210 standard, you must purchase and
read the official RP1210C documentation from TMC.

Official RP1210C documentation can be purchased from TMC at this link ($37.50 at time of writing):
    https://www.atabusinesssolutions.com/Shopping/Product/viewproduct/2675472/TMC-Individual-RP

### Getting Started
```python
from RP1210 import RP1210Client, translateErrorCode

# init client
client = RP1210Client()

# select vendor and device
client.setVendor("NULN2R32") # Nexiq USB-Link 2 in this case
client.setDevice(1) # wired USB-Link 2

# connect to adapter w/ specified protocol
clientID = client.connect(b'J1939:Baud=Auto') # will return clientID or error code
error_msg = translateErrorCode(clientID)
if error_msg != "NO_ERRORS": # failed to connect
   print("Connection failed:", error_msg)

# read all messages (no filter)
client.setAllFiltersToPass()

# send a message
msg = b'message contents'
err_code = client.tx(msg)
print("Tx Result:", translateErrorCode(err_code))

# read messages
while True:
   msg = client.rx()
   if msg: # message was received
      print(msg)
```

[![Coverage Status](https://coveralls.io/repos/github/Sulstice/global-chem/badge.svg?branch=master)](https://coveralls.io/github/Sulstice/global-chem?branch=master)  [![PyPI Downloads](https://static.pepy.tech/personalized-badge/rp1210?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/rp1210)
qegloot 0.1.1
Repositorio central de ativos de automacao e bibliotecas compartilhadas
License: MIT
Requires Python: >=3.9
Keywords: automation, cnpj, cpf, parsers, validators

# loot

Repositório central de ativos de automação e bibliotecas compartilhadas.

Consolida o conhecimento técnico da equipe em um único lugar, evitando retrabalho entre projetos.

## Propósito

Desafios técnicos de automação (Auth, ETL, Integrações) se repetem entre projetos. Este repositório centraliza essas soluções para:

1. Reduzir retrabalho reutilizando código já testado
2. Padronizar implementações recorrentes
3. Centralizar práticas de segurança (credenciais, retries, etc)

## Estrutura
O repositório organiza soluções agnósticas ao cliente/projeto:

* `/auth`: Módulos de autenticação (OAuth2 flows, gestão de tokens, cookies sessions).
* `/parsers`: Tratamento e normalização de dados (PDF, Excel, CSV, Strings regex).
* `/connectors`: Wrappers e clientes para APIs frequentes (Google Workspace, Slack, ERPs).
* `/helpers`: Utilitários de infraestrutura (Loggers, Decorators de retry, Tratamento de exceção).
* `/scaffolds`: Estruturas base para iniciar novos bots ou automações.

## Guia de Contribuição

Contribua com qualquer código reutilizável: funções genéricas, classes utilitárias ou scripts de configuração.

### Requisitos
1. **Sanitização:** Remova credenciais e dados sensíveis. Use variáveis de ambiente (`os.getenv`).
2. **Desacoplamento:** O código deve funcionar fora do contexto original.
3. **Documentação:** Adicione docstring explicando o que faz e suas dependências.
4. **Type Hints:** Adicione type hints em todas as funções.

### Type Hints

O pacote inclui suporte completo a type hints (`py.typed`). Ao adicionar código:

```python
from typing import TypedDict

# Com type hints
def validar_email(email: str) -> bool:
    """Valida formato de email."""
    return "@" in email

# Retorno complexo com TypedDict
class ResultadoValidacao(TypedDict):
    valido: bool
    mensagem: str

def processar_dados(valor: str) -> ResultadoValidacao:
    return {"valido": True, "mensagem": "OK"}

# Evitar: sem type hints
def validar_email(email):
    return "@" in email
```

O arquivo `py.typed` já está configurado. Basta adicionar type hints (`param: tipo` e `-> tipo_retorno`) em funções novas. Use TypedDict para dicts de retorno complexos.

## Instalação

### Via PyPI

```bash
# Com UV
uv add qegloot

# Com pip
pip install qegloot
```

### Via GitHub

```bash
uv pip install git+https://github.com/QualidadeGestaoBRMED/loot.git@v0.1.0
uv pip install git+https://github.com/QualidadeGestaoBRMED/loot.git
```

### Instalação local

```bash
git clone https://github.com/QualidadeGestaoBRMED/loot.git
cd loot
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
```

## Uso

```python
from loot.parsers import process_document, is_cpf_valid

# Processar e validar CPF
result = process_document("123.456.789-09")
print(result)
# {'original_input': '123.456.789-09', 'type': 'CPF',
#  'is_valid': True, 'clean_value': '12345678909',
#  'formatted': '123.456.789-09'}

# Validação direta
if is_cpf_valid("12345678909"):
    print("CPF válido!")
```
sinkvis 1.0.0
KV Cache Visualizer - Attention sink and eviction policy visualization for LLMs
License: MIT
Requires Python: >=3.10
Keywords: attention, transformer, llm, kv-cache, visualization, pytorch

# SinkVis

**KV Cache Visualizer** — A Python library for understanding attention sinks and KV cache eviction policies in large language models.

## Installation

```bash
# Basic installation
pip install .

# With HuggingFace transformers support
pip install ".[transformers]"

# With development dependencies
pip install ".[dev]"

# Everything
pip install ".[all]"
```

### From GitHub

```bash
pip install git+https://github.com/yourusername/SinkVis.git#subdirectory=py-package/sinkvis
```

## Quick Start

```python
from transformers import GPT2LMHeadModel, GPT2Tokenizer
from sinkvis import SinkVis

# Load model
model = GPT2LMHeadModel.from_pretrained("gpt2")
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")

# Capture attention patterns
with SinkVis(model, tokenizer) as sv:
    inputs = tokenizer("Hello world", return_tensors="pt")
    outputs = model(**inputs, output_attentions=True)
    
    # Get attention data (layer -1 = last layer, head 0)
    attention_data = sv.get_attention_data(layer=-1, head=0)
    
    # Simulate eviction policy
    keep_mask = sv.simulate_policy("streaming_llm", budget=20, sink_count=4)
```

## Features

- **Attention Capture**: Hook into any PyTorch transformer model to capture attention patterns
- **Sink Detection**: Automatically identify attention sink tokens
- **Heavy Hitter Detection**: Find semantically important tokens with high attention
- **Eviction Simulation**: Compare policies (LRU, Sliding Window, StreamingLLM, H2O)
- **Memory Profiling**: Track GPU memory usage

## Eviction Policies

| Policy | Description |
|--------|-------------|
| `full` | No eviction (baseline) |
| `lru` | Least Recently Used |
| `sliding_window` | Keep only recent tokens |
| `streaming_llm` | Preserve sinks + sliding window |
| `h2o` | Heavy-Hitter Oracle |

## API Reference

### SinkVis

```python
class SinkVis:
    def __init__(self, model: nn.Module, tokenizer=None): ...
    def get_attention_data(self, layer: int = -1, head: int = 0) -> List[List[float]]: ...
    def simulate_policy(self, policy: str, budget: int, sink_count: int = 4) -> List[bool]: ...
    def get_memory_stats(self) -> dict: ...
    def analyze_attention(self, tokens: List[str] = None) -> AttentionFrame: ...
```

### Simulation Functions

```python
from sinkvis.simulation import (
    simulate_lru,
    simulate_sliding_window,
    simulate_streaming_llm,
    simulate_h2o,
)

# All return a boolean mask indicating which tokens to keep
mask = simulate_streaming_llm(seq_len=100, budget=20, sink_count=4)
```

## License

MIT License
fronius-web-api 0.2.0
Client library for Fronius (Gen24) inverter using the web api
License: MIT
Requires Python: >=3.9
Keywords: fronius, gen24, solar, inverter, battery, api, client

# Fronius Gen24 Client (Python)

A lightweight Python client for Fronius Gen24 solar inverters that can authenticate like a browser (cookies + CSRF) and access endpoints that are not exposed by the public `solar_api`.

This is intended to be used later in a Home Assistant integration or other automations/scripts.

## Features
- Simple, synchronous Python API built on `requests`.
- Browser-like session with cookies, CSRF token discovery, and configurable headers.
- Public API helpers (e.g., power flow) using `/solar_api/...` endpoints.
- Configurable "hidden" endpoints for settings that require login to the web UI.
- Small CLI for quick testing.

## Disclaimer
The Fronius Gen24 web UI and endpoints may vary by firmware. Some settings are intentionally not documented by the vendor, and may change without notice. Use at your own risk. This project aims to provide a flexible client that you can configure to match your device's behavior.

## Installation
- Local develop install:

```bash
pip install -e .
```

- From source:

```bash
pip install .
```

## Quick start
```python
from fronius_gen24 import FroniusGen24Client

client = FroniusGen24Client(
    base_url="http://192.168.1.100",  # Change to your inverter IP or hostname
    verify_ssl=False,                  # Gen24 may use self-signed certs; set True if trusted
)

# Optional: login if you need access to protected settings
client.login(username="customer", password="your-password")

# Public API example
pf = client.get_power_flow()
print(pf)

# Access a protected (UI) endpoint (example, may vary by firmware)
# You should inspect your device (browser devtools) to find the URL and payload.
# client.set_setting("/rest/energy/settings", {"someSetting": 1})
```

## CLI
A minimal CLI is available for smoke testing:

```bash
python -m fronius_gen24 --host 192.168.1.100 --username user --password pass --power-flow
```

## Notes
- This client now uses HTTP Digest authentication exclusively for web UI login.
- By default it will try the endpoint `/api/commands/Login`. You can override the path by passing `login_url` to the client.

## Notes for Home Assistant
- The current client is synchronous. For optimal HA integration, wrap calls with `async_add_executor_job` or create an async wrapper later.
- Expose timeouts and exception handling to avoid blocking the event loop.

## License
MIT