semvec/pypi-packages huggingface dataset:
llm4lint 0.1.0
A Linter that uses LLM to analyze code
Requires Python: >=3.10

# LLM4LINT
A Static Analysis Tool built by finetuning Qwen2.5 Coder using unsloth.

## Features:
- Linting of Python source code in traditional linting format and an interactive mode.
- You can also provide your own data to create a different model (use train.py script):
    - Specify your own examples in a csv file with input and output columns.
    output should be `<lineno> - <type>: <issue>`. With just 1 example multiple datapoints are created using augmentation.
    - Augmentation of inputs: 
        - Variable names are replaced with different names to make sure model does not memorize the code.
        - Additional code is added before and after your input example. (outputs are also adjusted to account for lineno changes).
- Dataset created using this script: https://huggingface.co/datasets/ahmedhus22/python-static-analysis-linting

## Usage:
llm4lint [-h] [-i] filename

- positional arguments:
  filename             Python Source File to lint

- options:
  - -h, --help           show this help message and exit
  - -i, --interactive    starts chat interface for interacting with model

## Installation (For Inference Only)
```
pip install llm4lint
```
- Download the fine-tuned model from [Hugging Face](https://huggingface.co/ahmedhus22/llm4lint-7B-Qwen2.5Coder/tree/main) .gguf and Modelfile

- Create ollama Model
```
`ollama create llm4lint7b -f <Modelfile-Path>`
```
Now, You can access the linter anywhere in terminal using
```
llm4lint <filename> [options]
```
sphinx-easy 0.1.0
简易 Sphinx 文档生成工具
Requires Python: <4.0,>=3.11

# sphinx-easy

简易 Sphinx 文档生成工具

## 项目介绍

sphinx-easy 是一个简化 Sphinx 文档生成过程的命令行工具，旨在让用户能够快速创建和管理文档项目。

## 安装指南

1. 确保已安装 Python 3.11 或更高版本
2. 使用 Poetry 安装依赖：

```bash
poetry install
```

## 使用说明

1. 初始化 Sphinx 项目：

```bash
sphinx-easy init
```

2. 构建文档：

```bash
sphinx-easy build
```

## 许可证

本项目采用 MIT 许可证，详情请参阅 LICENSE 文件。
filewarmer 0.0.17
Library to read file blocks as fast as possible
Requires Python: >=3.6

### filewarmer - File Warm Up Helper

This library will do nothing but try to read file blocks as fast as possible.

It's useful to initialize/pre-warm volumes.

### Installation

```bash
pip install filewarmer
```

### Usage

```python
from filewarmer import FWUP

fwup = FWUP()
fwup.warmup(
    ["/var/lib/mysql/abc_demo/tab@020Sales@020Invoice.ibd", "/var/lib/mysql/abc_demo/tab@020Sales@020Invoice.ibd"]
    method="io_uring",
    small_file_size_threshold=1024 * 1024,
    block_size_for_small_files=256 * 1024,
    block_size_for_large_files=256 * 1024,
    small_files_worker_count=1,
    large_files_worker_count=1,
)
```

**Notes -**

- Block size's unit is bytes.
- For io_uring, it's recommended to use Linux Kernel 5.1 or higher.
- For io_uring, use a single thread to submit the requests.

### Build + Publish

```bash
TWINE_PASSWORD=xxxxxx VERSION=0.0.10 ./build.sh
```

> In the `TWINE_PASSWORD` put the API key of the PyPi account.

### Why this library?

Once you create a new RBS volume from a snapshot, you will not get performance as expected. It's because AWS keep the Snapshot in S3 and when you try to access certain blocks of the volume, it will download the blocks from S3 to the EBS volume. This process is called "Lazy Loading".

But for our database physical restoration process, we need to pre-warm selected files for validation and copying to target directory. To make next process faster, we need to pre-warm the files beforehand.

The [AWS documentation](https://docs.aws.amazon.com/ebs/latest/userguide/ebs-initialize.html) suggests to use `dd` or `fio` to pre-warm the files. But both of them are not optimized for this purpose and we can get at max 25~40MB/s speed on a 3000IOPS 600MB/s disk. But with this library, we can get almost 90% of speed.

In the library, we also do batching of small files. In case of database, we have lot of small files and reading them and waiting for the io completion will take more time. So, we read them in batches.

In **io_uring**, we can submit multiple requests and wait for the completion of all of them.

Assume, small files are those <= 1MB.

In io_uring we are submitting 64 requests at a time.

1MB = 256KB \* 4

So, we can submit (64/4) = 16 small 1MB files i/o requests at a time.

This will reduce the overhead of submitting the requests and waiting for the io completion.

So, in case of io_uring, we should run only two threads to submit the requests.

- One for small files
- Another for large files

**Note** > We have also support for `psync` which is default in most of the io operation due to support in every Linux Kernel. For Linux Kernel 5.1 or higher, we should use `io_uring` which is faster than `psync`.

### License

Apache 2.0
colab-jupyter-server 0.8.3
Colab/Kaggle as Jupyter a server and kernel
Requires Python: >=3.10

# Colab Jupyter Server
I created this library because I want to use Colab/Kaggle as a remote Jupyter server, which I can connect to as a kernel for my local Jupyter notebook in VS Code.

## How to Run
First, install the library:
```
pip install -U colab-jupyter-server
```
Then, run this command:
```
colab_jupyter_server \
--ngrok_authtoken=<YOUR_NGROK_AUTHTOKEN> \
--domain=<YOUR_DOMAIN> \
--password=<JUPYTER_SERVER_PASSWORD>
```

### Expected Last Output
```
Waiting for Jupyter server URL... (10s)
Jupyter server URL: 
<YOUR_DOMAIN>?token=<JUPYTER_SERVER_PASSWORD>
```
Or, if `domain` is not set:
```
Waiting for Jupyter server URL... (10s)
Jupyter server URL: 
https://xy12-34-567-890-123.ngrok-free.app?token=<JUPYTER_SERVER_PASSWORD>
```

### Command Parameters
- `ngrok_authtoken`: Your ngrok authtoken. You can get it here: https://dashboard.ngrok.com/get-started/your-authtoken

- `ngrok_down_url`: The default download URL is for ngrok on Linux (x86-64) (https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz). Find other download URLs here: https://ngrok.com/download

- `domain`: Your custom domain URL, which will be used as the Jupyter server URL. If not set, ngrok will generate a random URL each time the server starts. To keep the server URL consistent at a low cost, you can create and use a free domain from ngrok here: https://dashboard.ngrok.com/domains

- `password`: The Jupyter server password.

<!-- - `jupyter_password`: The Jupyter server password. You will be asked for a password if not set. -->

- `port`: The default port is 8889. **Avoid using port 8888**, as it is already in use by the notebook you open in Colab/Kaggle.

- `wait_time`: The duration time to wait for the Jupyter server URL to be retrieved. The default is 10s. **A shorter wait time may result in failure to retrieve the Jupyter server token, returning an empty token.**

<!--
## To Do
- [ ] Handle the error when ngrok agent can't run due to limitation of 1 active tunnel for free users.
-->
indent-print 1.2.2
library can print better readable code
Requires Python: >=3.6

# IPrint (indent print)
you can use easy like print but this print has indent and color
that create better readable for you

## where use IPrint?
**Debugging** **learning** and, in general, visually inspecting values accurately and easily is very useful.

## why use IPrint?
For better display and **readability** of result of code for humans.

## how to install
    pip install indent-print

## how to use
`iprint()` for indent print

`cprint()` for indent and colorize print

`status_print()` for print all data about instance of class(variable, method, ...)

    >>> from iprint import iprint, cprint, status_print

    >>> iprint(any_data)
    >>> cprint(any_data)
    >>> status_print(any_instance)

# Example:
    class AnotherData:
        """document of test class"""
        class_variable = "class_variable_value"
    
        def __init__(self, data):
            self.instance_variable = data
    
        def instance_method(self):
            pass
    
        @classmethod
        def class_method(cls):
            pass
    
        @staticmethod
        def static_method():
            pass
    
        @property
        def property_variable(self):
            return "property_variable_value"

    string_data = "my name is matin"
    int_data = 20
    another_data = AnotherData()
    dict_data = {"auther": "matin ahmadi", "github": "https://github.com/matinprogrammer"}
    set_data = {1, 2, 3}
    list_data = [string_data, int_data, another_data, dict_data, set_data, [[["test list"]]]]

`>>> iprint(list_data)`

![Screenshot of example code of iprint](media/example_of_iprint.png)


`>>> cprint(list_data)`

![Screenshot of example code of iprint](media/example_of_cprint.png)

`>>> status_print(another_data, show_dunder_attr=True, colorize=True)`

![Screenshot of example code of iprint](media/example_of_status_print.png)

## Features:
+ indent data you use
+ colorize your data
+ write data with indent in file so easy
+ print all data about instance of class

## customize
### custom indent length
default indent is 4(its mean 4 white space)

    >>> iprint([1], indent=8)
    [
            1
    ]

### write in file
NOTE: cprint hasn't got file parameter(cant write colorize text in file)

    >>> with open(test.txt, "w") as test_file:
            iprint(mydata, file=test_file)
### change seperator of input data
default seperator is " "(white space)

    >>> iprint(1, 2, 3, sep="-")
    1-2-3

### change end character
default seperator is "\n"(new line)

    >>> iprint(1, 2, 3, end="*")
    1 2 3*