semvec/pypi-packages huggingface dataset:
file_query_text 0.1.11
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
# Clone the repository
git clone https://github.com/yourusername/file-query.git
cd file-query

# Install with pip
pip install -e .

# Or use UV
uv run python -m src.cli "your query"

# Install as a permanent tool with 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 src.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%'"
```
deepface-anti-spoofing 1.0.0
A Python package for seamless face recognition and anti-spoofing analysis, automatically downloading models for age, gender, and real/fake face detection.
Requires Python: >=3.6

# DeepFace Anti-Spoofing

The **DeepFace Anti-Spoofing API** enables users to analyze images for face recognition and anti-spoofing detection. It provides predictions for age, gender, and whether the face is real or fake, making it ideal for secure authentication and identity verification applications. This API is designed for seamless integration into your Python applications, ensuring reliable and efficient image analysis.

## Features

- **Face Analysis**: Predict age and gender from uploaded images.
- **Anti-Spoofing Detection**: Determine whether a face is real or fake with high accuracy.
- **Simple Integration**: Integrate the API into your Python application effortlessly.

## Installation

To use the DeepFace Anti-Spoofing  in your Python application, install the required package:

```bash
pip install deepface-anti-spoofing
```

## Usage Example

Here is a simple example demonstrating how to upload an image for analysis using the DeepFace Anti-Spoofing :

```python
from deepface_anti_spoofing import DeepFaceAntiSpoofing

file_path = "C:/Users/Admin/Downloads/face_image.jpg"

deepface = DeepFaceAntiSpoofing()

response = deepface.upload_image(file_path)

print(response)
```

```json
{
  "id": 1,
  "age": 30,
  "gender": {
    "Male": 0.85,
    "Female": 0.15
  },
  "dominant_gender": "Male",
  "spoof": {
    "Fake": 0.02,
    "Real": 0.98
  },
  "dominant_spoof": "Real",
  "timestamp": "2025-04-18 12:34:56"
}
```

## Key Points

- Ensure the uploaded image contains a clear face for accurate analysis.
- Follow the documentation for detailed endpoint specifications and advanced features.

## Support

If you encounter any issues or have questions, please contact at [ipsoftechsolutions@gmail.com](mailto:ipsoftechsolutions@gmail.com).

---

Thank you for choosing DeepFace Anti-Spoofing for your face recognition and anti-spoofing needs!
dj-deployer 1.0.3
A simple CLI tool to deploy Django projects via SSH
Requires Python: >=3.7

# Django Deployer

A universal deployment CLI for Django projects via SSH.

## ðŸ”§ Features
- Git pull
- Upload `.env`
- Run `makemigrations`, `migrate`, `collectstatic`
- Restart services
- Track deploy history (count + timestamp)

## ðŸš€ Usage

```bash
pip install django-deployer

# Run it from any Django project with a deploy.yaml
django-deploy
risk-assessment 3.0.0
企业风险评估系统，支持多种风险类型计算、直接相加计算总风险分数、阈值判断和详细计算过程导出
Requires Python: >=3.6

# 风险评估模型库

这是一个用于企业风险评估的Python库，提供了完整的风险评估功能，包括数据加载、风险计算、结果导出和可视化。

## 安装

```bash
pip install risk-assessment
```

## 功能特点

- 支持从Excel文件加载数据
- 计算多种风险类型（战略风险、财务风险、市场风险、法律信用风险、事件风险、信用风险、社会责任风险）
- 完整的A类风险（阈值风险）判断
- 生成详细的风险评估报告和计算过程
- 可视化风险评分结果
- 各类风险分数直接相加进行综合评估，不使用权重

## 使用示例

### 基本用法

```python
from risk_assessment_package.main import RiskModel

# 创建模型实例
risk_model = RiskModel()  # 使用默认配置，不再需要外部配置文件

try:
    # 加载数据（假设Excel文件格式为：第一列是指标名称，后续列为各月份数据）
    risk_model.load_data('test.xlsx', sheet_name='Sheet3')
    
    # 计算所有月份的风险
    results = risk_model.calculate_total_risk()
    
    # 输出结果
    print("\n=== 风险评估结果 ===")
    for result in results:
        print(f"\n期间: {result['period']}月")
        print(f"总风险评分: {result['total_score']:.2f}")
        print(f"风险等级: {result['risk_level']}")
        # 只输出触发A类风险的原因
        if result.get('risk_basis') == 'threshold':
            print("【A类风险】触发原因：")
            for reason in result['risk_reasons']:
                print(f"  - {reason}")
    
    # 导出详细计算过程到Excel
    risk_model.export_calculation_details(results, 'risk_calculation_details.xlsx')
    
    # 绘制并保存风险评分柱状图
    risk_model.plot_risk_scores(results, save_path='risk_assessment_chart.png')
    
except Exception as e:
    print(f"错误: {e}")
```

### 详细计算过程导出

模型提供了导出详细计算过程的功能，包含所有中间计算步骤：

```python
# 导出详细计算过程
model.export_calculation_details(results, 'calculation_details.xlsx')
```

导出的Excel文件包含以下工作表：
- 原始数据：所有输入指标的原始值
- 战略风险：战略风险的计算指标和过程
- 财务风险：财务风险相关的所有指标和计算过程
- 市场风险：市场风险的计算指标和过程
- 法律信用风险：法律和信用风险的计算指标和结果
- 事件风险：事件风险的评估指标和计算过程
- 信用与社会责任风险：额外的信用风险和社会责任风险计算
- 阈值风险：触发高风险阈值的指标和判断标准
- 总风险：所有风险指标和最终评分结果（直接相加计算）

## 数据格式要求

输入Excel文件需要满足以下要求：

1. 数据格式：
   - 第一列必须是指标名称
   - 后续列是各月份的数据
   - 第一行是列名（月份或其他时间标识）

2. 工作表选择：
   - 默认读取第一个工作表
   - 可以通过 `sheet_name` 参数指定工作表
   - 支持工作表名称或索引号

3. 必需的指标（部分列表）：
   - 主营业务收入、营业总收入、主营业务利润总额、利润总额
   - 主营业务毛利润、研发投入本年累计数和上年同期数
   - 主营业务成本、主营业务相关费用、资产总额、负债总额
   - 带息负债总额、经营净现金流、货币资金、投资收益
   - 财务费用中的利息费用、资本化利息支出
   - 预付账款、预收账款、应收账款、应付账款
   - 净资产、坏账准备金额、存货、毛利润
   - 各类行业平均值和中等值指标
   - 司法诉讼案件数量、执行金额、被执行金额
   - 已销号事件数、新增事件数、年初事件数等事件相关指标
   - 各类事故次数和环境事件次数指标

## 风险计算说明

### 总风险计算

总风险分数采用直接相加方式计算，不使用权重：
```
总风险分数 = 战略风险分数 + 财务风险分数 + 市场风险分数 + 法律信用风险分数 + 事件风险分数 + 信用风险分数 + 社会责任风险分数
```

各风险类型内部仍使用权重来计算各自的分数，但在汇总时直接相加。

### 阈值风险（A类风险）判断

模型会对以下指标进行阈值判断，如果触发任何一项条件则判定为高风险：

1. 主业亏损金额 > 20000
2. 资产负债率 > 0.9
3. 带息负债率 > 行业较差值
4. 高危企业发生特别重大生产安全事故次数 > 0
5. 非高危企业发生特别重大生产安全事故次数 > 0
6. 企业发生重大及以上生态环境事件次数 > 0
7. 经营净现金流占货币资金的比重 < -0.3

## 输出结果

风险评估结果包含：

1. 总体风险评分（各分项直接相加的结果）
2. 各项风险评分
3. 风险等级
4. 风险判断依据
5. 详细的计算过程

## 故障排除

如果遇到问题，可以检查：
- Excel文件格式是否正确
- 必要的依赖是否都已安装（pandas, numpy, matplotlib, openpyxl）
- 指标数据是否完整

程序默认会在控制台输出日志信息，可以查看更多执行细节。

## 许可证

MIT License

## 贡献

欢迎提交问题和改进建议！