Kkit

Kylis kit

Some personal tools for python programming.

Wiki

Modules

  • llm_utils: Provide a LLM fine-tuning API and some utilities (in server).
  • child processing: Provide a simple and intuitive interface to control instance in child process.
  • mder: Maltilthreading m3u8 download module. Support download m3u8 file and convert it to mp4. Support resume download.
  • scaling_code: Extract information from recurring patterns in text files, allways used in scaling test.
  • timeout: Run a command with timeout and retry times.
  • color:
    1. Convert color between RGB , HSV and hex.
    2. Convert string to color by extracting dominant color from images related to the string.
  • encryption: Encrypt and decrypt files.
  • str2latex: Convert string to latex format.
  • fundict:
    1. Nonedict: A dictionary that returns None when the key is not found.
    2. AbbrDict: A dictionary that can use key abbreviation to get value.
  • utils: Some useful functions.

More information can be found at the help of each sub-module.

Install and import

pip install git+https://github.com/erwinliyh/kylis_kit@main
import Kkit
# or
from Kkit import <module>

Some modules need extra packages, you can install them by:

pip install git+https://github.com/erwinliyh/kylis_kit@main[module_name]

All modules that need extra requirements:

  1. color : ["haishoku", "colorsys", "numpy", "requests"]
  2. encryption : ["cryptography"]
  3. scaling : ["pandas"]
  4. str2latex : ["numpy"]
  5. llm : ["fastapi", "torch", "torchvision", "torchaudio", "uvicorn", "wanb", "transformers", "datasets", "peft", "python-multipart", "trl[all]"]

Other modules are pure python code with just build-in packages.

 1"""
 2# Kylis kit
 3
 4Some personal tools for python programming.
 5
 6[Wiki](https://erwinliyh.github.io/Kylis_Kit/Kkit.html)
 7
 8## Modules
 9
10- `llm_utils`: Provide a LLM fine-tuning API and some utilities (in server).
11- `child processing`: Provide a simple and intuitive interface to control instance in child process.
12- `mder`: Maltilthreading m3u8 download module. Support download m3u8 file and convert it to mp4. Support resume download.
13- `scaling_code`: Extract information from recurring patterns in text files, allways used in scaling test.
14- `timeout`: Run a command with timeout and retry times.
15- `color`:
16    1. Convert color between RGB , HSV and hex.
17    2. Convert string to color by extracting dominant color from images related to the string.
18- `encryption`: Encrypt and decrypt files.
19- `str2latex`: Convert string to latex format.
20- `fundict`: 
21    1. Nonedict: A dictionary that returns None when the key is not found.
22    2. AbbrDict: A dictionary that can use key abbreviation to get value.
23- `utils`: Some useful functions.
24
25More information can be found at the help of each sub-module.
26
27## Install and import
28
29```bash
30pip install git+https://github.com/erwinliyh/kylis_kit@main
31```
32
33```python
34import Kkit
35# or
36from Kkit import <module>
37```
38
39Some modules need extra packages, you can install them by:
40
41```bash
42pip install git+https://github.com/erwinliyh/kylis_kit@main[module_name]
43```
44
45All modules that need extra requirements:
46
471. `color` : ["haishoku", "colorsys", "numpy", "requests"]
482. `encryption` : ["cryptography"]
493. `scaling` : ["pandas"]
504. `str2latex` : ["numpy"]
515. `llm` : ["fastapi", "torch", "torchvision", "torchaudio", "uvicorn", "wanb",
52            "transformers", "datasets", "peft", "python-multipart", "trl[all]"]
53
54Other modules are pure python code with just build-in packages.
55"""
56from .utils import *