semvec/pypi-packages huggingface dataset:
whl-com 0.0.3
config tool for serial devices
Requires Python: >3.8

# whl-com

## Installation

```bash
pip install whl-com
```

## Usage

### options

```text
Usage: whl_com.py [OPTIONS] [COMMANDS]...

  whl-com

Options:
  -D, --device TEXT       serial device  [required]
  -b, --baudrate INTEGER  baudrate
  -t, --timeout FLOAT     timeout in seconds
  -f, --input_file TEXT   commands file
  --dry_run               do not send commands, just print them
  --no_output_filter      do not filter output, print everything
  --filter TEXT           filter output by regex pattern
  --quiet                 do not print output, only send commands
  -i, --interactive       enter interactive mode after sending commands
  --help                  Show this message and exit.
```

### send single command

> send `log com1 gpgga ontime 1` to device

```bash
python3 whl_com.py --device /dev/ttyUSB0 --baudrate 460800 log com1 gpgga ontime 1
```

### send multiple commands

> create a file `commands.txt` with the following content:

```text
log com1 gpgga ontime 1
log com1 gpchcx ontime 0.01
saveconfig
```

> specify the file with `--input_file` option:

```bash
python3 whl_com.py --device /dev/ttyUSB0 --baudrate 460800 --input_file commands.txt
```
project-mcp-tools 0.1.2
Collection of FastMCP tools for software project management and development
Requires Python: >=3.11

# Project MCP Tools

[![PyPI](https://img.shields.io/pypi/v/project-mcp-tools.svg)](https://pypi.org/project/project-mcp-tools/)

MCP tools for software project development.

## Installation & Usage

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "project-mcp-tools": {
      "command": "uvx",
      "args": ["project-mcp-tools"]
    }
  }
}
```

## Available Tools

### File Operations
- `edit_file` - String replacements in files
- `multi_edit_file` - Multiple edits to a single file in one operation
- `read_file` - Read files with line numbers
- `write_file` - Write content to files
- `list_files` - List files and directories

### Search Tools
- `search_glob` - File pattern matching with glob patterns
- `grep` - Content search with regular expressions
l3ac 1.0
L3AC: A nerual audio codec with one quantizer
Requires Python: >=3.11
Keywords: artificial intelligence, audio codec, deep learning, pytorch

# L3AC

This repository contains the implementation of L3AC, a lightweight audio codec based on a single quantizer,
introduced in the paper titled "L3AC: Towards a Lightweight and Lossless Audio Codec".

[Paper](https://arxiv.org/abs/2504.04949)

[Model Weights](https://huggingface.co/zhai-lw/L3AC)


<figure class="image">
  <img src="./bubble_chart.svg" alt="Comparison of various audio codec">
  <figcaption>Comparison of various audio codec</figcaption>
</figure>

## install

```
pip install l3ac
```

### demo

Firstly, make sure you have installed the librosa package to load the example audio file. You can install it using pip:

```
pip install librosa
```

Then, you can use the following code to load a sample audio file, encode it using the L3AC model, and decode it back
to audio. The code also calculates the mean squared error (MSE) between the original and generated audio.

```python
import librosa
import torch
import l3ac

all_models = l3ac.list_models()
print(f"Available models: {all_models}")

MODEL_USED = '1kbps'
codec = l3ac.get_model(MODEL_USED)
print(f"loaded codec({MODEL_USED}) and codec sample rate: {codec.config.sample_rate}")

sample_audio, sample_rate = librosa.load(librosa.example("libri1"))
sample_audio = sample_audio[None, :]
print(f"loaded sample audio and audio sample_rate :{sample_rate}")

sample_audio = librosa.resample(sample_audio, orig_sr=sample_rate, target_sr=codec.config.sample_rate)

codec.network.cuda()
codec.network.eval()
with torch.inference_mode():
    audio_in = torch.tensor(sample_audio, dtype=torch.float32, device='cuda')
    _, audio_length = audio_in.shape
    print(f"{audio_in.shape=}")
    q_feature, indices = codec.encode_audio(audio_in)
    audio_out = codec.decode_audio(q_feature)  # or
    # audio_out = codec.decode_audio(indices=indices['indices'])
    generated_audio = audio_out[:, :audio_length].detach().cpu().numpy()

mse = ((sample_audio - generated_audio) ** 2).mean().item()
print(f"codec({MODEL_USED}) mse: {mse}")
```

### available models

| config_name | Sample rate(Hz) | tokens/s | Codebook size | Bitrate(bps) |
|-------------|-----------------|----------|---------------|--------------|
| 0k75bps     | 16,000          | 44.44    | 117,649       | 748.6        |
| 1kbps       | 16,000          | 59.26    | 117,649       | 998.2        |
| 1k5bps      | 16,000          | 88.89    | 117,649       | 1497.3       |
| 3kbps       | 16,000          | 166.67   | 250,047       | 2988.6       |