semvec/pypi-packages huggingface dataset:
brecup 0.0.5
Simplify the BililiveRecorder → biliup-rs workflow.
Requires Python: >=3.12

# brecup

Simplify my 
[BililiveRecorder](https://github.com/BililiveRecorder/BililiveRecorder) → 
[biliup-rs](https://github.com/biliup/biliup-rs) workflow:

1. Embed danmaku into the video.
2. Clip the video.
3. Upload/append the video.

## Default Configuration

- DanmakuFactory:
    - no msg box
    - no override
    - half the opacity
- ffmpeg:
    - bitrate 8K
    - codec h264_nvenc

## Pre-requirements

- [DanmakuFactory](https://github.com/hihkm/DanmakuFactory)'s binary
    **`danmaku-factory` is in your PATH**.
- BililiveRecorder's binary **`brec` is in your PATH**.

    Also make sure the records' xml **danmaku files are ready to use**.
- biliup-rs's binary **`biliup` is in your PATH**.

    Also make sure the corresponding **`cookies.json` is prepared**.
- **`nvidia-smi`, `ffmpeg`, `ffprobe` are in your PATH**.
- **At lease one NVIDIA GPU is available**.

## Installation

```bash
pip install brecup
```

## Usage

The config file should be named as `*.brecup.y[a]ml` such as `test.brecup.yaml` or `test.brecup.yml`.

A schema file is provided [here](https://gist.githubusercontent.com/AquanJSW/c9002c3577e26b57c85b922ecb8c6bc8/raw/96c3f5262ad57afa3a7753d7c571c7f6112b3bc5/brecup.schema.json).

A sample:

```yaml
records:
- video: /path/to/rec_0.flv
  title: p0
  to: 00:00:30
  enabled: true
- video: /path/to/rec_1.flv
  title: p1
  ss: 00:06:50
  enabled: true
title: 'Test Collection'
output-dir: /path/to/output/Test-Collection/
tid: 172
tag: 直播回放,单机游戏
cookies: /path/to/cookies.json
cover: /path/to/cover.jpg
```

If you have more videos to append, just add more records and disable the previous ones:

```yaml
records:
- video: /path/to/rec_0.flv
  title: p0
  to: 00:00:30
  enabled: false
- video: /path/to/rec_1.flv
  title: p1
  ss: 00:06:50
  enabled: false
- video: /path/to/rec_2.flv
  title: p2
  ss: 00:06:50
  to: 00:07:50
  enabled: true
title: 'Test Collection'
output-dir: /path/to/output/Test-Collection/
tid: 172
tag: 直播回放,单机游戏
cookies: /path/to/cookies.json
cover: /path/to/cover.jpg
```

Then run:

```bash
brecup test.brecup.yaml
```
dict-lookup-mpnn-problem 0.1.1
Add your description here
Requires Python: >=3.11

This project implements a graph generator inspired by the DictionaryLookup Benchmark from
["How Attentive are Graph Neural Networks"](https://github.com/tech-srl/how_attentive_are_gats/tree/main/dictionary_lookup).

![Problem Image](https://github.com/tech-srl/how_attentive_are_gats/raw/main/dictionary_lookup/images/fig2.png)

The problem is described as follows:

1. A bi-partite graph, `G`, is provided, with nodes split into two sets `TOP`, `BOT`.

2. The set `TOP` is a subset of `Keys`.

3. The set `BOT` is a bijection `Keys -> Values` represented as a subset of
   `Keys x Values`.

  - For example if `("A", 1)` is in `BOT` then no other element can have
    `"A"` for a key or `1` as a value.

4. The goal is to map each key in TOP to the approriate value via `BOT(key)`.

The encoding provided by this repo is to take: `Key = 1..n_keys` and `Values = 1..n_vals`
for some integers, `n_vals` and `n_vals`. The primary interface to this code is the
`gen_problems` function which takes these in along with a random seed and provides
an infinite sequence of dictionary lookup problems.

```python
from dict_lookup_mpnn_problem import gen_problems

problems = gen_problems(n_keys=2, n_vals=3, seed=12)
p1 = next(problems)
```

- Here `p1` is a `Problem` object with three relevant attributes:
   1. `adj`: Adjacency matrix (it's block anti-diagonal).
   1. `nodes`: Array of node features (see below).
   1. `answers`: What value the `i`th node should decode to.
- The feature encoding is the 1-hot encoding of the key concatenated with the 1-hot
  encoding of the value. If no value is present, the all zeros vector is used.

An example output for `n_keys=2` and `n_vals=3` is provided below.

```python
Problem(nodes=array([[1., 0., 0., 0., 0.],
                     [0., 1., 0., 0., 0.],
                     [1., 0., 1., 0., 0.],
                     [0., 1., 0., 0., 1.]]),
        adj=array([[0., 0., 1., 1.], 
                   [0., 0., 1., 1.],
                   [1., 1., 0., 0.],
                   [1., 1., 0., 0.]]),
        answers=array([0, 2]),
        n_keys=2)
```