semvec/pypi-packages huggingface dataset:
fileslib 0.1.0
Creating, Reading, Editing, and Executing files.

# FilesLib
## What is fileslib?
Fileslib is a module to create, read, edit, and execute files (see LICENSE for usage terms).
## Installation
To Install type into your terminal the following command  
~~~Bash
pip install fileslib
~~~
## Examples
### Example 1 (Windows):
~~~Python
import fileslib  
fileslib.file(r"C:\Users\Public\Downloads\hello_world.txt", msg="Hello World!")  
# This creates a file in the Public user and writes "Hello World!" in it.
~~~
### Example 2 (MacOS):
~~~Python
import fileslib  
fileslib.file("/Users/Joe/Documents/schedule.txt", msg="1:30 -> Work starts, 9:30 -> Work ends", execute=True)  
# This creates a file in Joe's documents that has his work schedule in it, and then it runs it after
~~~
### Example 3 (Linux):
~~~Python
import fileslib
fileslib.file("/home/Joe/Documents/how_fun_new_year_was.txt", "It was really fun")  
# This creates a file in Joe's documents explaining how fun new year was.
pluau 0.1.2
Pluau: Python bindings for the Lua(u) programming language
Requires Python: >=3.8
Keywords: lua, luau, scripting, bindings, ffi, lupa

# pluau

Pluau provides high level Python bindings to Luau using PyO3/Maturin.

Asides from Buffer support, all Luau features should be broadly supported by pluau.

## Examples

### Creating a Lua VM and running a script

```py
import pluau
lua = pluau.Lua()
lua.set_memory_limit(1 * 1024 * 1024) # Optional: Set memory limit of the created Lua VM to 1MB
func = lua.load_chunk("return 2 + 2", name="example") # You can optionally set env as well to give the chunk its own custom global environment table (_G)
result = func()
print(result)  # [4]
```

### Tables

```py
tab = lua.create_table()
tab.push(123)
tab.set("key1", 456)

# Prints 1 123 followed by key1 456
for k, v in tab: 
    print("key", k, v)
print(len(tab)) # 1 (Lua/Luau only considers array part for length operator)

# Set a metatable
my_metatable = lua.create_table()
tab.set_metatable(my_metatable)

# Set the readonly property on the table (Luau-specific security feature) Luau s
tab.readonly = True

# The below will error now since the table is readonly
tab.set("key2", 789) # errors with "runtime error: attempt to modify a readonly table"
tab.readonly = False # make it writable again
tab.set("key2", 789) # works now
```

### Setting execution time limits

Luau offers interrupts which is a callback function that is called periodically during execution of Luau code. This can be used to implement execution time limits.

```py
import pluau
import time
start_time = time.time()
def interrupt(_: pluau.Lua):
    if time.time() - start_time > 1.0: # 1 second limit
        return pluau.VmState.Yield
    return pluau.VmState.Continue

lua = pluau.Lua()
lua.set_interrupt(interrupt)
func = lua.load_chunk("while true do end", name="infinite_loop")

# When using interrupts, the function should be made into a thread and then resumed. Otherwise, the yield will lead to a runtime error.
thread = lua.create_thread(func)
result = thread.resume() # Resume the thread with no arguments
print(result, thread.status) # Prints [] ThreadState.Resumable after 1 second
```
ai4one 0.3.2
A small machine learning package
Requires Python: >=3.10
Keywords: ai, machine-learning, deep-learning, plot-tools, cli


# AI4One 🤖

A small, modular package for machine learning.

---

## Installation


```bash
pip install ai4one
````

This package requires **Python 3.8** or newer.

-----

## Usage

### ai4one.config

`3.9>=Python 版本>=3.7`, 请使用`pip isntall ai4one~=0.2`安装 `ai4one=0.2` 版本。 

The primary feature of this package is a powerful configuration system. For a comprehensive guide and examples, please see the **[Configuration System Guide](docs/config.md)**.

```python
from ai4one.config import BaseConfig, field
from typing import List

class TrainConfig(BaseConfig):
    learning_rate: float = 0.001
    epochs: int = 10
    optimizer: str = "Adam"
    layers: List[int] = [3, 3]

if __name__ == "__main__":
    config = TrainConfig.argument_parser()
    print(f"Using optimizer: {config.optimizer}")
```

You can also run the self-contained example to see it in action:

```bash
examples/example_config.py
```

-----


### ai4one.cli

```bash
ai4one gpu
```

Outputs:
```
--- CUDA Version ---
12.7 

--- PyTorch Version ---
2.1.0+cu121

--- Python Version ---
Python 3.10.12

--- Python Executable Path ---
/usr/bin/python
```

### ai4one.tools

#### ai4one.tools.plt

> 该模块提供了一些用于绘图的工具函数。

1. `setup_fonts` 函数用于设置 matplotlib 字体，以支持中文字符。

    主要用途是跨平台支持中文字符的显示。
    - 默认配置为 `New Times Roman` 、`SimSun` 和 `SimHei` 两种字体。
    - 使用详情查看 [tools.plt](docs/plt_tool.md)

```python
from ai4one.tools.plt import setup_fonts
setup_fonts(["New Times Roman", "SimSun", "SimHei"])
```

## Development

Interested in contributing? Set up your local development environment with `uv`.

1.  **Clone the repository:**

    ```bash
    git clone https://github.com/bestenevoy/ai4one.git
    cd ai4one
    ```

2.  **Create a virtual environment and install dependencies:**
    This command installs all core, optional, and development dependencies.

    ```bash
    uv pip install -e ".[dev]"
    ```

    To keep your environment in sync with the lock file, you can run `uv sync`.

3.  **Run tests:**

    ```bash
    uv run pytest
    ```

-----

## Build and Publish

These commands are for package maintainers.

**Build the package:**

```bash
uv build
```

**Publish to PyPI:**

```bash
uv run twine upload dist/*
```