semvec/pypi-packages huggingface dataset:
file_query_tool 0.1.13
SQL-like interface for querying files in your filesystem
Requires Python: >=3.12

# File Query (fq)

A SQL-like interface for querying files in your filesystem.

## Installation

```bash
# From PyPI
pip install file_query_tool

# Clone the repository
git clone https://github.com/nikdavis/file_query_tool.git
cd file_query_tool

# Install with pip
pip install -e .

# Or use UV
uv tool install .
# This will install the 'fq' command
```

## Usage

### Command Line

The quickest way to run file-query is with UV:

```bash
uv run python -m file_query_tool.cli "your query here"
```

After installation, you can use the shorthand command:

```bash
fq "your query here"
```

#### Basic Usage

```bash
# Find all Python files
fq "extension == 'py'"

# Find all text files and show their content
fq "extension == 'txt'" --show-content
```

#### Advanced Queries

File Query supports full SQL-like syntax:

```bash
# Find all Python files in the src directory
fq "SELECT * FROM 'src' WHERE extension == 'py'"

# Find all files larger than 100KB
fq "SELECT * FROM '.' WHERE size > 102400"

# Complex conditions
fq "SELECT * FROM '.' WHERE (extension == 'pdf' AND size > 1000000) OR (extension == 'txt' AND NOT name == 'README.txt')"
```

## Query Syntax

File Query uses a SQL-like syntax:

```sql
SELECT * FROM 'directory_path' WHERE condition
```

### Available Attributes

- `extension`: File extension (without the dot)
- `name`: Filename with extension
- `size`: File size in bytes
- `path`: Full file path

### Operators

- Comparison: `==`, `!=`, `<`, `<=`, `>`, `>=`
- Logical: `AND`, `OR`, `NOT`

## Examples

```bash
# Find all PDF files
fq "extension == 'pdf'"

# Find all files not named "main.py"
fq "NOT name == 'main.py'"

# Find all large image files
fq "SELECT * FROM '.' WHERE (extension == 'jpg' OR extension == 'png') AND size > 500000"

# Find files with 'config' in their path
fq "path == '.*config.*'"

### Using wildcards with the LIKE operator

Find all Python files with "test" in their name:
```
fq "name LIKE '%test%.py'"
```

Find all files with a specific prefix:
```
fq "name LIKE 'config%'"
```

Find all markdown files in a specific year's folder:
```
fq "path LIKE '%/2023/%' AND extension == 'md'"
```

### Excluding files with NOT LIKE

Find all JavaScript files in src directory except those in lib folders:
```
fq "path LIKE 'src%' AND path NOT LIKE '%lib%' AND extension == 'js'"
```

Find all Python files that don't have "test" in their name:
```
fq "extension == 'py' AND name NOT LIKE '%test%'"
```
YouAndAi 0.0.3
A minimalist AI-powered text adventure game.

# YouAndAi ðŸ§ ðŸŽ®

A minimalist AI-powered text adventure where **you create the story** and Ai drives the world.

## ðŸ“¦ Install

```bash


Setup Your Gemini API Key
Go to https://makersuite.google.com/app/apikey

Copy your key and paste it when you run the game !

open CMD And Type "youandai"
to start the game 


Gameplay Example :

AI: Dark cave. Torch flickers faintly.
You: I swing the sword forward.
AI: Torch falls. Shadows come closer.
adlitteratim 0.0.1
CLI tool to manage and test your LLM prompts ad litteratim.
Requires Python: >=3.8

# adlitteratim

Manage your LLM prompts **ad litteratim** (letter‑by‑letter), with linting, testing,
semantic diffs, and CI integration—all via a simple CLI.

## Install

```bash
pip install adlitteratim

CLI tool to manage and test LLM prompts ad litteratim
pdor 0.2.0
PDF OCR识别工具，用于自动文档提取和分析
Requires Python: >=3.10

# pdf-drawing-ocr-recognition: Pdor  

定制项目,一个Python库,实现将PDF输入的指定模式的表格进行结构化读取(调用LLM OCR).  

## 使用前准备  

### 环境  

- Windows  
- Python 3.10+  

## 依赖库  

使用`pip`安装以下依赖库:  

- simpsave
- PyPDF2
- pdf2image
- numpy
- opencv-python (cv2)
- pandas
- toml
- pyyaml
- requests

## 快速指南

### 安装  

项目已经发布在PyPi上,使用`pip`进行安装:  

```cmd
pip install pdor
```

库的名称简写为`pdor`.  

然后,在你的项目中导入pdor:  
```python
import pdor
```

### 环境检查

提供了一个`check_env()`方法检测`pdor`是否可用.  

***示例***:  
```python
import pdor

status, msg = pdor.check_env()
if not status: # 如果检查不通过
    for info in msg: # 逐项打印错误
        print(info)
```

- `status`将是一个布尔值.如果为真,则环境可用.  
- `msg`是一个字符串列表,包括错误信息.  

### 配置  

Pdor的运行包含以下配置项:  

- `max_try`: LLM的最大重试次数  
- `api_url`: LLM的API地址  
- `api_key`: LLM的API KEY  
- `llm_model`: 使用的LLM视觉模型  

对于每个配置项, 提供`getter`和`setter`进行配置.  

> 仅当通过自检时可修改配置  

### Pdor模式  

Pdor模式定义要识别的表格结构.每个模式都是一个`PdorPattern`实例.   

#### 读取模式  

使用`pattern.load`方法读取预设的模式.接受一个参数,即待读取的模式名称.  
目前预设了三种模式:  
- `700501-8615-72-12 750kV 第四串测控柜A+1端子排图左`  
- `700501-8615-73-04 第四串W4Q1断路器LCP柜接线图二`  
- `duanzipai`  

***示例:***  
```python
import pdor
pattern = pdor.pattern.load('700501-8615-73-04 第四串W4Q1断路器LCP柜接线图二')
```

> 可以打印Pdor模式  

#### 自行构建和保存模式  

可以自行实例`PdorPattern`创建模式.需要以下参数:  
- `name`: `str` 模式的名称
- `prompt`: `str` 发送大模型的Prompt  
- `dpi`: `int` PDF转换为图片时的DPI
- `sub_imgs`: `list[list[float, float, float, float]]` 子图列表.每个子图应该是一个表格.列表每一项都是一个由四个浮点数构成的子列表,分别对应子表位于原图的上,下,左,右百分比位置.如果子图列表为空,会自动生成一个包含整张图片的默认列表.  

使用`save`方法进行存储.接受一个参数,即要写入的`PdorPattern`,名称和模式名称保持一致.  

> Pdor模式是只读的  

### Pdor单元  

创建`Pdor`单元的实例以进行OCR解析.  
实例化`Pdor`需要两个参数:  

- 构造的PDF文件路径  
- 构造的Pdor模式  

可以打印Pdor单元格式化显示信息.Pdor单元是只读的.  
调用`parse()`方法执行Pdor单元解析.可以通过开关`print_repr`关键字参数控制回显.  
调用`is_parsed()`方法,可以判断是否已经解析.  
在成功解析后,访问`result`属性即可获取结果.  
其它可访问的属性包括:  

- `file`: 构造的PDF文件路径  
- `pattern`: 构造的Pdor模式  
- `time_cost`: 解析的用时  

***示例***:  

```python
import pdor
from pdor import Pdor

# 构造单元
unit = Pdor("示例PDF.pdf", pdor.pattern.load("示例模式"))

# 打印单元信息
print(unit)

# 执行解析
unit.parse()

# 访问结果和解析耗时
print(f'结果: {unit.result}, 耗时: {unit.time_cost}')
```

### 结果  

Pdor的结果存储在Pdor实例的`result`属性中.  
仅当解析完毕后才可访问该属性.  

#### 输出结果  

Pdor封装了常用的输出方式在`Out`类中.  

支持的输出类型包括:  

- PLAIN_TEXT  
- MARKDOWN  
- SIMPSAVE  
- JSON  
- YAML  
- XML  
- TOML
- PYTHON  

> 默认输出为`SIMPSAVE`  

`Out`是一个静态类,其中的静态方法`out()`自行输出.输出在构造单元的PDF同路径同名文件下.接受三个参数:  

- `pdor`: 待输出的Pdor单元  
- `out_type`: 输出的类型.封装在`Out.TYPE`枚举中  
- `print_repr`: 开关回显(关键字参数, 缺省值为`True`)  

***示例***
```python
import pdor

... # 假设我们前面获得了一个Pdor单元unit

Pdor.Out.out(unit, Pdor.Out.TYPE.SIMPSAVE) # 输出至simpsave ini
Pdor.Out.out(unit, Pdor.Out.TYPE.HTML, print_repr=False) # 输出至网页,并关闭回显  
```
clouseau 0.2
A library independent forward pass inspector for neural nets
Requires Python: <4.0,>=3.10
Keywords: python

# Clouseau: the forward pass inspector

[![Release](https://img.shields.io/github/v/release/adonath/clouseau)](https://img.shields.io/github/v/release/adonath/clouseau)
[![Build status](https://img.shields.io/github/actions/workflow/status/adonath/clouseau/main.yml?branch=main)](https://github.com/adonath/clouseau/actions/workflows/main.yml?query=branch%3Amain)
[![codecov](https://codecov.io/gh/adonath/clouseau/branch/main/graph/badge.svg)](https://codecov.io/gh/adonath/clouseau)
[![Commit activity](https://img.shields.io/github/commit-activity/m/adonath/clouseau)](https://img.shields.io/github/commit-activity/m/adonath/clouseau)
[![License](https://img.shields.io/github/license/adonath/clouseau)](https://img.shields.io/github/license/adonath/clouseau)

<p align="center">
<img width="61.8%" src="https://raw.githubusercontent.com/adonath/clouseau/main/docs/_static/clouseau-banner.jpg" alt="Clouseau Banner"/>
</p>

A library independent forward pass inspector for neural nets. The tool is designed to be used with [PyTorch](https://pytorch.org/) and [Jax](https://docs.jax.dev/) (others libraries might come later...).
It allows you to register hooks for the forward pass of a model, and write the forward pass activations
to a file for later inspection. It is useful for debugging models or transitioning models from one framework to another and checking their equivalence at any stage.

## Installation

```bash
pip install clouseau
```

## Usage

### Jax / Equinox Example

You can use the inspector as a context manager to record the forward pass of a model. The following example shows how to use the inspector with a model from the [Equinox](https://docs.kidger.site/equinox/) library:

```python
import jax
import equinox as eqx
from clouseau import inspector

keys = jax.random.split(jax.random.PRNGKey(918832), 3)

model = eqx.nn.Sequential([
    eqx.nn.Linear(764, 100, keys[0]),
    jax.nn.relu,
    eqx.nn.Linear(100, 50, keys[0]),
    jax.nn.relu,
    eqx.nn.Linear(50, 10, keys[0]),
    jax.nn.sigmoid,
])
x = jax.random.normal(jax.random.PRNGKey(0), (764,))

with inspector.tail(model, path="activations.safetensors") as m:
    m(x)
```

Then in an interactive session inspect the recorded activations:

```python
from clouseau import inspector

inspector.magnify("activations.safetensors")
```

Which will open the file and generate a hierachical [treescope](https://treescope.readthedocs.io/en/stable/) view of the activations.

### PyTorch Example

```python
from torch import nn
from clouseau import inspector

model = nn.Sequential({
    "dense1": nn.Linear(764, 100),
    "act1": nn.ReLU(),
    "dense2": nn.Linear(100, 50),
    "act2": nn.ReLU(),
    "output": nn.Linear(50, 10),
    "outact": nn.Sigmoid(),
})

x = torch.randn((764,))

with inspector.tail(model) as m:
    m(x)
```

For more advanced usage including filtering layer types, please refer to the [documentation](https://adonath.github.io/clouseau/).