semvec/pypi-packages huggingface dataset:
yt-jsc-youtubei 0.0.1
Js Challenge Provider based on youtubei.js
Requires Python: >=3.10
Keywords: yt-dlp, yt-dlp-jsc-provider

# yt-jsc-youtubei

## Description

A `yt-dlp` plugin that uses `youtubei.js` to extract and solve `JsChallenge` for Youtube

## Installation

Clone the repo and perform `pip install .` at the repo top dir.

```sh
git clone https://github.com/alive4ever/yt-jsc-youtubei
cd yt-jsc-youtubei
pip install .
```

Or directly using `pip`

```sh
pip install git+https://github.com/alive4ever/yt-jsc-youtubei
```

Or via pypi (when it is available).

```sh
pip install yt-jsc-youtubei
```

## Usage

The `yt-jsc-youtubei` has priority score of `50`, which means it will be executed last. For comparison, the built-in `deno ejs` has `1000` scores.

The supported js runtimes are `[ 'deno', 'node', 'bun' ]` and will be tried automatically in that order.

In order to use `deno`, `--no-js-runtimes` argument is needed to avoid `ejs` taking over the challenge. For other js runtimes (`node` and `bun`), this plugin will be used automatically. No configuration is needed.

## Acknowledgments

Thanks to `@LuanRT` for `youtubei.js` package and `yt-dlp` teams for the main package.
sssekai 0.7.62
Project SEKAI Asset Utility / PJSK 资源工具
Requires Python: >=3.10

# sssekai
[![Windows Build](https://github.com/mos9527/sssekai/actions/workflows/python-publish.yml/badge.svg)](https://github.com/mos9527/sssekai/blob/main/.github/workflows/python-publish.yml) [![Releases](https://img.shields.io/github/downloads/mos9527/sssekai/total.svg)](https://GitHub.com/mos9527/sssekai/releases/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) 

Command-line tool (w/Python API support) for Project SEKAI (JP: プロジェクトセカイ カラフルステージ！ feat.初音ミク) game assets.

# Installing & Updating
**For Windows Users** : Builds are available [here](https://github.com/mos9527/sssekai/releases)

Python >=3.10 is required to run this tool.

You can install the latest version of `sssekai` from PyPI using pip:
```bash
pip install -U sssekai
```
To use the latest development version, you can install directly from GitHub:
```bash
pip install -U  git+https://github.com/mos9527/sssekai
```
## Using the GUI version
Additionally, you can use the GUI version of `sssekai` by installing the `[gui]` extra, which in turn installs [GooeyEx](https://github.com/mos9527/GooeyEx/).

```bash
pip install -U sssekai[gui]
```
Then you can run the GUI version by:
```bash
sssekai-gui
```
# Documentation
See the [wiki page!](https://github.com/mos9527/sssekai/wiki)

# See Also
https://github.com/mos9527/sssekai_blender_io

# License
MIT

# References
- https://github.com/K0lb3/UnityPy
- https://mos9527.github.io/tags/project-sekai/
cqlib-algorithm 0.1.0
Quantum algorithm package based on Cqlib
Requires Python: >=3.10
Keywords: cqlib, cqlib algorithms, quantum circuit, quantum computing, quantum programming language, quantum, quantum algorithms

# Cqlib Algorithm

本项目是由中电信量子集团开发团队打造的基于 **[Cqlib](https://gitee.com/cq-lib/cqlib)** 的量子算法包，包含新建优化任务，生成哈密顿量，创建量子电路，执行量子电路，测量采样，返回优化结果等功能，目前已实现 QAOA，后续将持续集成 VQE 等量子算法。

---

## 安装说明

使用 pip 下载 cqlib-algorithm 包:

```bash
pip install cqlib-algorithm
```

## 结构说明

- **algorithms**：算法主体模块，内置QAOA算法主体、能量值评估、优化结果。
- **ansatz**：量子线路模块，内置QAOA专用线路生成。
- **execution**：算法执行后端模块，内置`LocalRunner`后端(statevector模拟器)、`TianYanRunner`后端( **[中电信“天衍”量子计算云平台](https://qc.zdxlz.com)** )。
- **mappings**：问题模型转化模块，内置QUBO转化、代价哈密顿量生成。
- **optimizers**：优化器模块，内置 `SPSA` / `COBYLA` / `Nelder-Mead`优化器。
- **problems**：问题定义模块，内置`MaxCut` / `TSP` / `VRP`三类典型优化问题模型。
- **results**：问题解码模块，内置`MaxCut` / `TSP` / `VRP`三类典型问题的优化结果解码过程。
- **visualization**：可视化模块，内置量子线路可视化、迭代历史曲线可视化、概率分布可视化、问题模型可视化。

---

## 应用示例：使用 QAOA 求解 MaxCut 问题。

```python
from cqlib_algorithm.problems.maxcut import MaxCut
from cqlib_algorithm.mappings.convert import maxcut_to_qubo, qubo_to_ising
from cqlib_algorithm.visualization.maxcut_plot import plot_maxcut
from cqlib_algorithm.execution import LocalRunner, TianYanRunner
from cqlib_algorithm.algorithms.qaoa import QAOASolver, QAOAConfig
from cqlib_algorithm.optimizers.options import OptimizerOptions

def main():
    # ---- 定义 Maxcut 问题 ----
    weights = {(0,1):1, (1,2):1, (2,3):1, (3,0):1}
    mc = MaxCut(n=4, weights=weights)

    # ---- 绘制模型图 ----
    plot_maxcut(n=mc.n, weights=mc.weights, partition={}, title="MaxCut Problem")

    # ---- Maxcut -> QUBO ----
    qubo  = maxcut_to_qubo(mc)
    print(qubo)

    # ---- QUBO -> Ising ----
    ising = qubo_to_ising(qubo)
    print(ising)

    # ---- 选择优化器 ----
    # SPSA
    opt_cfg = OptimizerOptions(name="spsa", options={"maxiter": 100, "a": 0.2, "c": 0.2})

    # ---- QAOA求解 ----
    solver = QAOASolver(ising, 
                        runner=LocalRunner(), 
                        qaoa_cfg=QAOAConfig(reps=5, mixer="x"), 
                        opt_cfg=opt_cfg)

    res = solver.run()

    # ---- 优化结果 ----
    # 1) 结果打印
    res.print_result()
    
    # 2) 收敛曲线可视化
    res.plot_history(title="Optimization History")

    # 3) 概率分布可视化
    res.plot_probability(title="QAOA Probability (best θ)", topk=20)

    # 4) 解决方案可视化
    res.plot_maxcut_solution(n=mc.n, weights=mc.weights, title="MaxCut Solution(QAOA)")

if __name__ == "__main__":
    main()
```

---

## License

Apache License 2.0，详见 [LICENSE](LICENSE)。

---

## Contributing

欢迎贡献！如需改进功能或修复缺陷，请提交 Issue 或发起 Pull Request。

---
flask-supercache 1.0.0
A 3-tier caching system for Flask with zero external dependencies
Requires Python: >=3.7
Keywords: flask cache caching redis lru ttl performance

# Flask-SuperCache

3-tier caching for Flask applications. Adds TTL support to Python's LRU cache.

## What it does

- **LRU cache with TTL**: Combines `functools.lru_cache` with time-based expiration
- **3-tier fallback**: Redis → Filesystem → In-memory
- **No external dependencies required**: Works with just Python standard library

Built while working on [wallmarkets](https://wallmarkets.store).

## Installation

```bash
pip install flask-supercache
```

## Usage

### Basic LRU cache with TTL

```python
from flask_supercache import cached_query

@cached_query(maxsize=1000, ttl_seconds=300)
def get_user_by_id(user_id):
    return User.query.get(user_id)

# First call - hits database
user = get_user_by_id(123)

# Second call - from cache
user = get_user_by_id(123)

# After 5 minutes - cache expires, hits database again
```

### Flask-Caching integration

```python
from flask import Flask
from flask_supercache import setup_cache

app = Flask(__name__)
app.config['CACHE_REDIS_URL'] = 'redis://localhost:6379/0'

cache = setup_cache(app)  # Auto-selects Redis or filesystem
```

## How TTL on LRU works

Standard `functools.lru_cache` doesn't support TTL. We add it using time-bucketing:

```python
# Cache key includes current time bucket
time_bucket = int(time.time() // ttl_seconds)
cache_key = (args, kwargs, time_bucket)

# When time_bucket changes, it's a cache miss
# Old entries get evicted by LRU automatically
```

No background threads, no timers. O(1) lookup.

## Cache statistics

```python
info = get_user_by_id.cache_info()
print(f"Hits: {info.hits}, Misses: {info.misses}")
print(f"Hit rate: {info.hits / (info.hits + info.misses) * 100:.1f}%")
```

## Configuration

```python
app.config['CACHE_REDIS_URL'] = 'redis://localhost:6379/0'
app.config['CACHE_DEFAULT_TIMEOUT'] = 300
app.config['CACHE_DIR'] = '/tmp/flask_cache'
```

## License

MIT

## Contributing

Pull requests welcome. Please add tests.

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
flask-i18n-pro 1.0.0
Production-grade i18n for Flask with Cyrillic and Asian language support
Requires Python: >=3.7
Keywords: flask i18n internationalization localization babel cyrillic russian mongolian chinese translation

# Flask-I18N-Pro

Internationalization for Flask with Cyrillic and Asian language support.

## What it does

- **4-tier locale selection**: URL parameter → Session → Accept-Language header → Default
- **Cyrillic-aware formatting**: Russian number formatting (1 234,56 instead of 1,234.56)
- **Proper pluralization**: Handles complex rules (Russian: 1/2-4/5+ forms)
- **Context-aware translations**: Disambiguate homonyms
- **Time-ago utilities**: "2 hours ago" with correct plurals

Built while working on [wallmarkets](https://wallmarkets.store). Tested with English, Russian, Mongolian, Chinese.

## Installation

```bash
pip install flask-i18n-pro
```

## Usage

### Basic setup

```python
from flask import Flask
from flask_i18n_pro import setup_i18n

app = Flask(__name__)
app.config['LANGUAGES'] = ['en', 'ru', 'mn', 'zh']

setup_i18n(app)
# Locale now auto-selected per request
```

### Formatting in templates

```jinja2
{# Date/time #}
{{ order.created_at|format_order_datetime }}
{# en: "Dec 25, 2023, 2:30 PM" #}
{# ru: "25 дек. 2023 г., 14:30" #}

{# Price - Cyrillic formatting #}
{{ product.price|format_price('RUB') }}
{# en: "RUB 15,000.00" #}
{# ru: "15 000,00 ₽" (space separator!) #}

{# Time ago #}
{{ comment.created_at|time_ago }}
{# en: "2 minutes ago" #}
{# ru: "2 минуты назад" #}
```

### Cyrillic number formatting

This is the main difference from Flask-Babel:

```python
from flask_i18n_pro import format_weight

# With Russian locale
format_weight(1234.5)  # → "1 234,5"
# Not "1,234.5" like Flask-Babel does
```

## Locale selection

Automatic 4-tier fallback:

1. `?lang=ru` URL parameter → saves to session
2. `session['lang']` if previously set
3. `Accept-Language` header from browser
4. Default configured language

## Configuration

```python
app.config['LANGUAGES'] = ['en', 'ru', 'mn', 'zh']
app.config['BABEL_DEFAULT_LOCALE'] = 'en'
app.config['BABEL_TRANSLATION_DIRECTORIES'] = 'translations'
```

## License

MIT

## Contributing

Pull requests welcome. Please add tests.