semvec/pypi-packages huggingface dataset:
qpg 0.0.4
Postgres queue
Requires Python: >=3.11

# QPG: Queue Postgres

Реализует возможность использования Postgres как брокер сообщений.

## Использование

```python
from qpg import PGQueueBase

# Пример использования:

# Cлушаем сообщения
pg_queue = PGQueueBase(session={__здесь_сессия_бд__})
pg_queue.consume()

# Публикуем сообщения
pg_queue = PGQueueBase(session={__здесь_сессия_бд__})
pg_queue.send_message(source="источник сообщения", queue="название очереди", message=dict(data="Привет!"))
```

## Настройка

1. Убедитесь, что у вас установлен PostgreSQL.
2. Создайте базу данных и таблицы, используя модель из `qpg.QueueModel`.

## Структура проекта

```
qpg/
├── __init__.py         # Главный файл инициализации
├── schemas.py          # Схемы данных
└── db/
    ├── __init__.py     
    ├── models.py       # Модели данных
    └── utils.py        # Вспомогательные функции
```

## Установка

```bash
pip install qpg
```

## Лицензия

```
MIT License
```

## Контакты

Для вопросов и предложений: panarin0290@ya.ru

[Купить мне кофе](https://new.donatepay.ru/@1372454)
mcp-x-server 0.1.5
A mcp x server to post tweets
Requires Python: >=3.11

# MCP X Server
What can you do with MCP X Server? Give it a sentence or a topic, and it will help you write and refine a tweet, then publish it to X.

## Build image
```shell
docker build -t mcp-x-server:latest .
```

## How to run with STDIO

### Local
```json
{
    "mcpServices": {
        "x-mcp": {
            "command": "uv",
            "args": [
                "run",
                "--with",
                "fastmcp",
                "--with",
                "pydantic-ai",
                "--with",
                "pydantic-ai-slim[duckduckgo,openai]",
                "--with",
                "dotenv",
                "--with",
                "python-twitter-v2",
                "fastmcp",
                "run",
                "/Users/wenyanglu/Workspace/ai/mcp_x_server/server.py"
            ],
            "env": {
                "CONSUMER_KEY": "*******************",,
                "CONSUMER_SECRET": "*******************",
                "ACCESS_TOKEN": "*******************",
                "ACCESS_SECRET": "*******************",
                "DEEPSEEK_API_KEY": "*******************"
            }
        }
    }
}
```

### Docker
```shell
docker run -i \
  -e CONSUMER_KEY="your-consumer-key" \
  -e CONSUMER_SECRET="your-consumer-secret" \
  -e ACCESS_TOKEN="your-access-token" \
  -e ACCESS_SECRET="your-access-secret" \
  -e DEEPSEEK_API_KEY="your-deepseek-key" \
  mcp-x-server:latest
```

## Run with SSE
```shell
fastmcp run --transport sse server.py
```
vit-captioner 0.1.2
A package for extracting keyframes from videos and generating captions using ViT-GPT2 model
Requires Python: >=3.6
Keywords: video, captioning, ai, machine learning, ViT, GPT2, transformers

# ViT Captioner

[![PyPI version](https://badge.fury.io/py/vit-captioner.svg)](https://badge.fury.io/py/vit-captioner)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python package for extracting keyframes from videos and generating captions using the ViT-GPT2 model.

## Features

- Extract keyframes from videos using Katna or uniform sampling
- Generate captions for images using the ViT-GPT2 model
- Match keyframes with timestamps in a video
- Convert videos to SRT subtitle files with captions
- Visualize keyframes and timeline data
- Performance optimized with smart resource management
- Thread-safe image processing and visualization

## Installation

```bash
pip install vit-captioner
```

## Command Line Usage

### Extract keyframes from a video:
```bash
vit-captioner extract -V /path/to/video.mp4 -N 10 -v
```

### Generate caption for an image:
```bash
vit-captioner caption-image -I /path/to/image.jpg
```

### Convert video to captions:
```bash
vit-captioner caption-video -V /path/to/video.mp4 -N 10 -v
```
The `-v` flag enables verbose output with progress bars.

### Find matching timestamps for keyframes:
```bash
vit-captioner find-timestamps -V /path/to/video.mp4 -K /path/to/keyframes_folder -v
```

## Python API Usage

```python
from vit_captioner.keyframes.extractor import KeyFrameExtractor
from vit_captioner.captioning.image import ImageCaptioner
from vit_captioner.captioning.video import VideoToCaption

# Extract keyframes
extractor = KeyFrameExtractor("/path/to/video.mp4")
extractor.extract_key_frames("/path/to/video.mp4", 10)

# Generate caption for an image
captioner = ImageCaptioner()
caption = captioner.predict_caption("/path/to/image.jpg")

# Convert video to captions
# Note: verbose flag enables progress bars
converter = VideoToCaption("/path/to/video.mp4", num_frames=10, verbose=True)
converter.convert()
```

## Performance Optimizations

- Smart resource management with proper cleanup
- Single model loading for multiple frames (improved memory usage)
- Thread-safe image processing with error fallbacks
- Progress bars for tracking long-running operations
- Limited number of concurrent workers to prevent memory issues

## Requirements

- Python 3.6+
- OpenCV
- PyTorch
- Transformers
- Katna
- Matplotlib
- tqdm

## Source Code

Source code is available on GitHub: [https://github.com/lachlanchen/VideoCaptionerWithVit](https://github.com/lachlanchen/VideoCaptionerWithVit)

## License

MIT