semvec/pypi-packages huggingface dataset:
mdtex2html 1.3.2
library to convert Markdown with included LaTeX-Formulas to HTML with MathML
Requires Python: <4,>=3.7
Keywords: TeX, LaTeX, Markdown, HTML markdown2html, latex2mathml

# mdtex2html
python3-library to convert Markdown with included LaTeX-Formulas to HTML with MathML

## What is mdtex2html

`mdtex2html` is a library to convert (Github-flavored) Markdown-Code with included LaTex-formulas to HTML-Source. The formulas are converted to MathML.

An inline-formula can either start and end with `$` or it can start with `\(` and end with `\)`, according to valid LaTeX-Code. Block-formulas either start and end with `$$` or start with `\[` and end with `\]`.

An example that `mdtex2html` will convert:

```
# Example-Title

TeX-Formula: $\sqrt2=x^2 \Rightarrow x=\sqrt{\sqrt{2}}$

- This
- is
    - a List with `inline-Code`
```

## How to use mdtex2html

install it, i.e. using pip:

`python3 -m pip install mdtex2html`

then in python import in your code with

`import mdtex2html`

and convert your mdTeX with something like

`mdtex2html.convert('- Hello ${\sqrt{World}}^2$!')`

passing any mdTeX-Code to `mdtex2html.convert()`.

### Extra

You may want to (but don't need to) include this css-snippet on your page to hide error message texts, only showing on mouse-over:

```
.tooltip .tooltiptext {
    display: none;
}
.tooltip:hover .tooltiptext {
    display: inline;
    border-radius: 0.3em;
    background-color: #777;
    position: fixed;
}
```

### Markdown-Extensions

Starting with v1.1 you can use python-markdown-extensions for i.e. tables, definition-lists, html-attributes and much more by passing a list of the extension(s) to be used to the `convert`-command as described in the [python-markdown documentation](https://python-markdown.github.io/extensions/).

For example `mdtex2html.convert('Hello green\n{: style="color:green" }', extensions=['attr_list'])` will make use of the extension `attr_list`.

## Dependencies

This depends on:

- [latex2html](https://github.com/roniemartinez/latex2mathml)
- [Python-Markdown](https://github.com/Python-Markdown/markdown)

The dependencies will be installed when installing using pip.

## Limitations

The Firefox browser will display the result smoothly, as well as Safari (according to user reports).

~~Just be aware that the Chromium-engine (Browsers: Chrome, Edge, ...) still is not able to render MathML properly, but rumors say that in 2020 work has started again to make that happen, so maybe you want to check the status there.~~
In 2023 MathML Core got finally supported by the Blink-Engine of Chrome (and therefore Edge etc.). So this works now in all mainstream-browsers.

## Credits

Special thanks to [Ronie Martinez](https://github.com/roniemartinez) for creating [latex2html](https://github.com/roniemartinez/latex2mathml)!

This library is just a few lines of code added to his work and to [Python-Markdown](https://github.com/Python-Markdown/markdown).
h264indexer 1.0.0
H.264 video indexer for fast seeking
Requires Python: >=3.7

# H.264 Index Generator (MakeIndex)

这是一个用于生成 H.264 视频文件索引 (.idx) 的工具。它通过扫描视频文件中的关键帧 (IDR Frame)，记录每一帧的偏移量和长度，生成的索引文件可用于视频播放器的快速定位和拖动。

## 🚀 项目背景
本项目是对一个早期 11KB 大小的 MFC 工具 (`MakeIndex.exe`) 的**现代 C++ 重构版本**。
原版工具虽然体积小巧，但存在缓冲区过小 (1KB) 导致的丢帧风险，且无法跨平台运行。重构后的版本不仅修复了潜在 Bug，还支持编译为 **Windows/Linux CLI**、**Python 扩展** 以及 **WebAssembly (WASM)**。

## 📂 项目结构
*   `src/H264Indexer.hpp`: 核心算法实现 (Header-only C++17)。
*   `src/main.cpp`: 命令行工具入口。
*   `src/bindings.cpp`: Python 绑定 (pybind11)。
*   `src/wasm_bindings.cpp`: WebAssembly 绑定 (Emscripten)。
*   `CMakeLists.txt`: 构建脚本，支持多种构建目标。

## 🛠️ 核心逻辑与改进

### 算法逻辑
1.  **遍历文件**: 以流式方式读取 `.h264` 文件。
2.  **查找 Start Code**: 寻找 `00 00 01` 或 `00 00 00 01` 序列。
3.  **识别 NAL Unit**: 解析 Start Code 后的 NAL Header，识别 `Type 5 (IDR Slice)`。
4.  **记录索引**: 当发现 IDR 帧时，计算上一帧的长度，并将当前帧的 **Offset (4字节)** 和 **Length (4字节)** 写入输出文件。

### ⚡ 改进点 (对比原版)
*   **缓冲区优化**: 将缓冲区从原版的 **1KB** 提升至 **1MB**，大幅减少 I/O 调用次数。
*   **边界处理**: 增加了跨缓冲区边界处理逻辑 (Boundary Handling)，解决了原版在 Start Code 跨越缓冲区时可能漏掉关键帧的 Bug。
*   **跨平台**: 移除 MFC 依赖，使用标准 C++17 (`std::filesystem` 等)，支持所有主流操作系统。

## 📦 编译与使用

### A. 编译为命令行工具 (CLI)
适用于 Windows, macOS, Linux。

**前置要求**: CMake 3.10+, C++17 编译器 (GCC/Clang/MSVC)

```bash
mkdir build && cd build
cmake ..
cmake --build .

# 使用
./makeindex input.h264 out.idx
```

### B. 编译为 Python 扩展
让 Python 代码直接调用 C++ 核心逻辑。

**前置要求**: Python 3, `pip install pybind11`

方法 1: 使用 CMake (推荐开发用)
取消 `CMakeLists.txt` 中 Python 部分的注释并编译。

方法 2: 使用 `setup.py` (推荐安装用)
创建一个 `setup.py` 文件（如下），然后运行安装。

```python
from setuptools import setup, Extension
import pybind11

ext_modules = [
    Extension(
        "h264indexer",
        ["src/bindings.cpp"],
        include_dirs=[pybind11.get_include()],
        language='c++'
    ),
]

setup(name="h264indexer", ext_modules=ext_modules)
```

```bash
pip install .
```

### C. 编译为 WebAssembly (JS/Web)
适用于浏览器或 Node.js 环境。

**前置要求**: [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html)

```bash
emcmake cmake ..
emmake make
```

这将生成 `makeindex_wasm.js` 和 `makeindex_wasm.wasm`。

**JavaScript 调用示例**:
```javascript
const Module = require('./makeindex_wasm.js');

Module.onRuntimeInitialized = () => {
  const fs = require('fs');
  // 1. 将本地文件写入 WASM 虚拟文件系统
  const data = fs.readFileSync('test.h264');
  Module.FS.writeFile('/input.h264', data);

  // 2. 调用 C++ 函数生成索引
  // int wasm_make_index(const char* in, const char* out)
  const result = Module.ccall(
    'wasm_make_index',     // C++ 函数名
    'number',              // 返回值类型
    ['string', 'string'],  // 参数类型
    ['/input.h264', '/output.idx'] // 参数值
  );

  if (result === 0) {
    // 3. 从虚拟文件系统读取生成的索引
    const idxData = Module.FS.readFile('/output.idx');
    fs.writeFileSync('local_out.idx', idxData);
    console.log('Index generated successfully!');
  }
};
```
pitchtools 1.16.2
Utilities to work with pitches, convert between midinotes, frequency and notenames
Requires Python: >=3.9

==========
Pitchtools
==========

*pitchtools* provides a set of functions to work with musical pitches. 

Features
--------

* convert between frequencies, midinotes and notenames
* microtones are fully supported
* split a pitch into its multiple components (pitch class, octave, microtonal deviation, etc.)
* transpose a pitch taking its spelling into consideration
* create custom pitch converters to work with custom reference frequencies, or modify the
  reference frequency globally



Documentation
=============

https://pitchtools.readthedocs.io/en/latest/


Examples
========

Convert some note names to frequencies

.. code-block:: python

    >>> from pitchtools import *
    >>> eflat_scale = "4Eb 4F 4G 4Ab 4Bb 5C 5D".split()
    >>> for note in eflat_scale:
    ...     # convert notename to frequency using the default reference frequency (442 Hz)
    ...     freq = n2f(note)
    ...     # convert frequency to midi
    ...     midinote = f2m(freq)
    ...     print(f"{note} = {freq:.1f}Hz (midi = {midinote})")
    4Eb = 312.5 Hz (midi = 63.0)
    4F  = 350.8 Hz (midi = 65.0)
    4G  = 393.7 Hz (midi = 67.0)
    4Ab = 417.2 Hz (midi = 68.0)
    4Bb = 468.3 Hz (midi = 70.0)
    5C  = 525.6 Hz (midi = 72.0)
    5D  = 590.0 Hz (midi = 74.0)
    
    
The same but with a different reference frequency


.. code-block:: python


    from pitchtools import *
    ebscale = "4Eb 4F 4G 4Ab 4Bb 5C 5D".split()
    cnv = PitchConverter(a4=435)
    for note in ebscale:
        # Convert to frequency with default a4=442 Hz
        freq = cnv.n2f(note)
        midinote = cnv.[Of2m(freq)
        print(f"{note} = {freq} Hz (midinote = {midinote})")


Microtones
~~~~~~~~~~

Microtones are fully supported, either as fractional midinotes or as notenames.

.. code-block:: python

    >>> from pitchtools import *
    >>> n2m("4C+")
    60.5
    >>> n2m("4Db-10")
    60.9
    >>> m2n(61.2)
    4C#+20


--------------------------------


**Microtonal notation**


+---------+---------+
| Midinote| Notename|
|         |         |
+=========+=========+
| 60.25   | 4C+25 / |
|         | 4C>     |
+---------+---------+
| 60.45   | 4C+45   |
+---------+---------+
| 60.5    | 4C      |
+---------+---------+
| 60.75   | 4Db-25  |
+---------+---------+
| 61.5    | 4D-     |
+---------+---------+
| 61.80   | 4D-20   |
+---------+---------+
| 63      | 4D#     |
+---------+---------+
| 63.5    | 4D#+    |
+---------+---------+
| 63.7    | 4E-30   |
+---------+---------+


-------------

Installation
============

.. code::

	pip install pitchtools
finterion-investing-algorithm-framework 0.23.0
This is the official finterion plugin for the investing algorithm framework open source project.
Requires Python: <4.0,>=3.10

# Finterion Investing Algorithm Framework Plugin

<a href="https://www.finterion.com/" target="_blank">
    <picture style="height: 30px;">
    <source media="(prefers-color-scheme: dark)" srcset="static/sponsors/finterion-dark.png">
    <source media="(prefers-color-scheme: light)" srcset="static/sponsors/finterion-light.png">
    <img src="static/sponsors/finterion-light.png" alt="Finterion Logo" width="200px" height="50px">
    </picture>
</a>

This is the official plugin for the [investing algorithm framework](https://investing-algorithm-framework.com) open source project.

## Installation
You can install the plugin with pip.
```shell
pip install finterion-investing-algorithm-framework
```

## Usage 
In order to use the plugin you must register the following components in your investing algorithm framework application:
- **FinterionOrderExecutor**: This component is responsible for executing orders on the finterion platform.
- **FinterionPortfolioProvider**: This component is responsible for connecting the portfolio and syncing positions.
- **FinterionPingHook**: This component is responsible for pinging the finterion platform.

> **Note:** You must provide the API key of your algorithm in order to use 
> the plugin. You can find your API keys in the developer dashboard of
> your algorithm on the finterion platform.

## Example
```python
import logging.config
from dotenv import load_dotenv

from investing_algorithm_framework import create_app, DEFAULT_LOGGING_CONFIG

from finterion_investing_algorithm_framework import \
    FinterionPortfolioProvider, FinterionOrderExecutor, FinterionPingAction


load_dotenv()
logging.config.dictConfig(DEFAULT_LOGGING_CONFIG)

app = create_app()
app.on_strategy_run(FinterionPingAction)
app.add_order_executor(FinterionOrderExecutor)
app.add_portfolio_provider(FinterionPortfolioProvider)
app.add_market(
    market="Finterion",
    api_key="<FINTERION_API_KEY>", # Or set the environment variable FINTERION_API_KEY
    trading_symbol="EUR",
)
```

## Documentation
You can find the official documentation at our [documentation website](https://docs.finterion.com/)