semvec/pypi-packages huggingface dataset:
braintumor-model-package 0.2.0
A brain tumor model package
Requires Python: <4.0,>=3.10

# BRAIN TUMOR CLASSIFICATION

A machine learning package that diagnoses brain tumors from MRI (Magnetic Resonance Imaging) scans. It detects if there is a tumor and then classify it in terms of grade, type, and specific location. This program uses a **neural network algorithm** to detect tumors/no tumors with a validation accuray of 92% and a validation recall of 98%.

## Data set and its description  

| Data              | Description                                                                                    |
|-------------------|------------------------------------------------------------------------------------------------|
| Image             | the image object(jpg format)                                                                   |
| Label             | class options of each image (glioma, meningioma, no tumor, and pituitary.)                     |

## Dependencies and packages  

1. numpy>=1.20.0,<1.21.0
2. python = 3.10
3. pandas = 2.2.2
4. scikit-learn = 1.4.2
5. pydantic = 2.7.0
6. strictyaml = 1.7.3
7. tensorflow = 2.16.1
8. scikeras = 0.13.0
9. tensorflow-datasets = 4.9.4
10. pillow = 10.3.0
11. pydantic-settings = 2.2.1
12. fastapi = 0.110.3
13. uvicorn = 0.29.0
14. loguru = 0.7.2
15. python-multipart = 0.0.9

## Source code link  

Source code link:
[Github link](https://github.com/chibuikeeugene/brain_tumor_classification_cnn_model.git)

Python index package:
[Pypi link](https://pypi.org/project/braintumor-model-package/)
utils-zihang 0.0.7
工具方法
Requires Python: >=3

### 项目用法说明

# utils_zihang

`utils_zihang` 是一个工具库，提供一系列常用的工具方法，包括日志记录功能。

## 安装

通过 `pip` 安装：

```bash
pip install utils_zihang
```

## 使用示例

### 日志工具

#### 手动指定日志目录

可以手动指定日志目录：

```python
import os
from utils_zihang.log import setup_logger

# 手动指定日志目录
custom_log_dir = "/path/to/your/custom/log/dir"
log = setup_logger(app_name="my_app", env="DEV", log_dir=custom_log_dir)
log.info("这是一条信息日志")

import uuid

trace_id = str(uuid.uuid4())
log.bind(trace=trace_id).info("这是一条带有trace的信息日志")
log.bind(trace=trace_id, analysis=True).info("这是一条带有trace和analysis的信息日志")
log.bind(analysis=True).info("这是一条带有analysis的信息日志")
```

#### 根据环境变量设置日志目录

可以根据环境变量 `ENV` 设置日志目录，环境变量支持 `DEV`, `TEST`, `UAT`, `PROD`：

```python
import os
from utils_zihang.log import setup_logger

# 根据环境变量设置日志路径
env = os.getenv('ENV', 'DEV').upper()
log_dir = os.path.join('logs', env.lower())
os.makedirs(log_dir, exist_ok=True)

log = setup_logger(app_name="my_app", env=env, log_dir=log_dir)
log.info("这是一条信息日志")

import uuid

trace_id = str(uuid.uuid4())
log.bind(trace=trace_id).info("这是一条带有trace的信息日志")
log.bind(trace=trace_id, analysis=True).info("这是一条带有trace和analysis的信息日志")
log.bind(analysis=True).info("这是一条带有analysis的信息日志")
```

#### 默认日志目录

在服务器上，默认的日志目录为 `/data/log`，如果不指定日志目录，则日志将保存在该目录下：

```python
import os
from utils_zihang.log import setup_logger

# 不指定日志目录，默认保存在 /data/log
log = setup_logger(app_name="my_app", env="PROD")
log.info("这是一条信息日志")

import uuid

trace_id = str(uuid.uuid4())
log.bind(trace=trace_id).info("这是一条带有trace的信息日志")
log.bind(trace=trace_id, analysis=True).info("这是一条带有trace和analysis的信息日志")
log.bind(analysis=True).info("这是一条带有analysis的信息日志")
```

### 完整示例代码

在 `main.py` 中使用 `setup_logger` 函数来配置日志：

```python
import os
from utils_zihang.log import setup_logger

# 根据环境变量设置日志路径
env = os.getenv('ENV', 'DEV').upper()
log_dir = os.path.join('logs', env.lower())
os.makedirs(log_dir, exist_ok=True)

log = setup_logger(app_name="my_app", env=env, log_dir=log_dir)
log.info("这是一条信息日志")

import uuid

trace_id = str(uuid.uuid4())
log.bind(trace=trace_id).info("这是一条带有trace的信息日志")
log.bind(trace=trace_id, analysis=True).info("这是一条带有trace和analysis的信息日志")
log.bind(analysis=True).info("这是一条带有analysis的信息日志")
```

## 其他工具

此空间预留用于将来添加其他工具的说明。

## `setup_logger` 函数说明

`setup_logger` 函数用于配置日志记录器，支持以下参数：

- `app_name`：应用名称，用于生成日志文件名。
- `env`：环境名称，如 `DEV`, `TEST`, `UAT`, `PROD`。
- `log_dir`：日志目录路径，默认根据环境变量设置。

日志文件：

- 普通日志：`<app_name>.log`
- 错误日志：`<app_name>-error.log`
- 分析日志：`<app_name>-analysis.log`
django-advanced-password-validators 0.1
A Django package for custom password validation.

# Django Password Validator

A Django package for custom password validation. Extends Django password validation options to include minimum uppercase, minimum lowercase, minimum numerical, and minimum special characters. This was created in an attempt to keep up with industry standards for strong user passwords.

This package works for python 3.6+.

## Prerequisites

Requires Django 2.2 or later.
You can install the latest version of Django via pip:

```bash
pip install django
```

Alternatively, you can install a specific version of Django via pip:

```bash
pip install django=3.2
```

> **_NOTE:_**  See the [django-project](https://docs.djangoproject.com) documentation for information on non-deprecated Django versions.


## Installation

```bash
pip install django_advanced_password_validators
```

### Development installation

```bash
git clone https://github.com/shanathvemula/django_advanced_password_validators
cd django-advanced_password_validation
pip install --editable .
```

## Usage

<br/>
Add the custom validators to your AUTH_PASSWORD_VALIDATORS setting in your Django project's settings file:

<br/>


```shell
# settings.py
AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django_advanced_password_validators.validators.password_validators.PasswordValidators',
        'OPTIONS': {
            "min_length": 8,
            "max_length": 128,
            "min_length_digit": 1,
            "min_length_alpha": 1,
            "min_length_special": 1,
            "min_length_lower": 1,
            "min_length_upper": 1,
            "special_characters": "~!@#$%^&*()_+{}\":;'[]"
        }
    }
]

```
popsink-transformer 2.3.3
Popsink transformer
Requires Python: <4.0,>=3.10

# Transformer Library

This library provides a set of tools to transform Avro schemas into various formats such as JSON schema, SQL for Apache Flink, and PostgreSQL SQL. Additionally, it can transform data from these formats back into Avro schemas. Whether you're working with Avro schemas in your data pipeline or database schema, this library aims to simplify the conversion process for you.

## Features

- Convert Avro schema to JSON schema.
- Generate SQL statements for Apache Flink based on Avro schema.
- Generate PostgreSQL SQL statements based on Avro schema.
- Generate SQLSERVER SQL statements based on Avro schema.
- Generate CLICKHOUSE SQL statements based on Avro schema.
- Convert a single avro type to SQL type.

## Usage

Here's a quick guide on how to use the library:

### 1. Convert an Avro Schema to JSON schema

```python
from popsink_transformer.transformer import Transformer

transformer = Transformer(from_source=avro_schema)
json_schema = transformer.avro_to_json.convert()
print(json_schema)
```

### 2. Generate SQL for Apache Flink from an Avro schema

```python
from popsink_transformer.transformer import Transformer
from popsink_transformer.avro_to_sql.utils.type_converter import SqlEngine

transformer = Transformer(
    from_source=avro_schema,
    sql_engine=SqlEngine.FLINK,
)
flink_sql = transformer.avro_to_sql.convert()
print(flink_sql)
```

### 3. Generate PostgreSQL SQL from an Avro schema

```python
from popsink_transformer.transformer import Transformer
from popsink_transformer.avro_to_sql.utils.type_converter import SqlEngine

transformer = Transformer(
    from_source=avro_schema,
    sql_engine=SqlEngine.POSTGRES,
)
postgres_sql = transformer.avro_to_sql.convert()
print(postgres_sql)
```

### 4. Convert an Avro type to SQL type

```python
from popsink_transformer.avro_to_sql.utils.type_converter import (
    SqlEngine,
    convert_avro_type_to_sql_type,
)

postgres_sql_type = convert_avro_type_to_sql_type(
    avro_field_type="float",
    sql_engine=SqlEngine.POSTGRES
)
print(postgres_sql_type)
output: 'REAL'
```

### 5. Generate SQLSERVER SQL from an Avro schema

```python
from popsink_transformer.transformer import Transformer
from popsink_transformer.avro_to_sql.utils.type_converter import SqlEngine

transformer = Transformer(
    from_source=avro_schema,
    sql_engine=SqlEngine.SQLSERVER,
)
sqlserver_sql = transformer.avro_to_sql.convert()
print(sqlserver_sql)
```