semvec/pypi-packages huggingface dataset:
pydantic-model-parser 1.0.1
A simple package to transform/map dictionaries, before parsing it into Pydantic.

# Pydantic Model Parser

A simple package to transform/map dictionaries, before parsing it into Pydantic.

## Requirements

- The models/entities should conform to `Pydantic's` Model specifications and should inherit the `pydantic.BaseModel`.

## Installation

```bash
pip3 install pydantic-model-parser
```

## Usage

Firstly, define your entity using Pydantic's `BaseModel`.

```python
# comment.py
from pydantic import BaseModel

class User(BaseModel):
    id: int
    name: str


class Comment(BaseModel):
    id: int
    comment_str: str
    user: User
```

Next, define the `Mapper`. The mapper can be used to **rearrange** dictionary keys and **perform** transformations on the values.

The tuples definitions are as follows:

- (`old_field_path`: str, `new_field_path`: str, `transform_func`: Optional[Callable])
- `transform_func` of `None` maps the value as per the original value
- `transform_func` of `lambda x: x * 2` maps the value as double of the original value
- `old_field_path`'s value is placed in `new_field_path` in the new dictionary and subsequently parsed into the `BaseModel`
  - The `.` in the path delimits the nested levels in the dictionaries. e.g. `user.id` refers to:

```json
{
    "user": {
        "id": 1
    }
}
```

Defining a Mapper:

```python
# comment.py
from model_parser.custom_types import Mapping
from model_parser.mapper import BaseMapper

class CommentMapper(BaseMapper):
    @staticmethod
    def get_mapping() -> List[Mapping]:
        return [
            ('id', 'id', None),
            ('comment_str', 'comment_str', None),
            ('user_name', 'user.name', None),
            ('user_id', 'user.id', None)
        ]
```

Lastly, to **parse** objects:

```python
# main.py
from comment import Comment, CommentMapper

data = {
        "id": 1,
        "comment_str": "HelloWorld",
        "user_id": 2,
        "user_name": "bob"
    }
data_list = [data, data]
parser = Parser(Comment, CommentMapper)

# parse into a Comment entity
comment = parser.parse(data)

# parse into a list of Comment entities
comments = parser.parse(data_list)
```
yz-core 0.2.1
An ID generator for distributed microservices
Requires Python: >=3.6.8

# readme-template

--------------

## Introduction

yzcore 目的为了开发后端服务时，提供一种代码结构规范参考。
可以通过`startproject`和`startapp`两个命令快速创建工程和内部的接口应用模块。
**安装模块**
```shell
$ pip install yz-core
```
示例：
- 创建工程：
```shell
$ yzcore startproject myproject
```
- 创建工程内部应用：
```shell
$ yzcore startapp myapp ./src/apps/
```

代码结构介绍：
```
.
├── docs		        说明文档、接口文档等文档的存放目录
├── migrations		    数据表迁移文件存放目录
├── src
│   ├── apps 接口应用程序的主目录
│   │   ├── __init__.py
│   │   ├── myapp01
│   │   │   ├── __init__.py
│   │   │   ├── controllers.py  控制层：封装数据交互操作
│   │   │   ├── models.py       模型层：实现数据表与模型的定义
│   │   │   ├── schemas.py      模式层：定义接口数据参数
│   │   │   ├── tests.py        测试文件
│   │   │   └── views.py        视图层：接口定义层
│   │   └── myapp02
│   ├── conf		配置文件的存放目录
│   ├── const		公共常量存放目录
│   ├── tests		测试文件的存放目录
│   ├── main.py		程序的入口文件
│   ├── settings.py	程序的设置文件
│   └── utils		抽离出的公共代码模块存放目录
├── .gitignore
├── requirements.txt
└── README.md
```

## Quick start

Quick Start 部分主要包括两部分内容：简易的安装部署说明(Deployment)和使用案例(Example)。特别是对于一些基础库，必须包括Example模块。


## Documentation

Documentation 部分是核心的文档，对于大型项目可以使用超链接，如使用以下这种形式：

For the full story, head over to the [documentation](https://git.k8s.io/community/contributors/devel#readme).

## 数据库迁移操作
```
# pip install alembic

alembic init migrations                             # 创建迁移环境
alembic revision --autogenerate -m "commit content" # 自动生成迁移文件
alembic upgrade head                                # 升级到最近版本
alembic upgrade <revision_id>                       # 升级到指定版本
alembic downgrade <revision_id>                     # 回退到指定版本
```
Tiny-URL 1.0.1
this is an tiny url Python wrapper
Requires Python: >=3.6

# Tiny-URL-Wrapper
This repository is an API wrapper made in Python for Tiny-URL.

# Usage
```python
from tiny_url import Tiny

url = "https://www.google.com"
t = Tiny.make_url(url)
print(t)
```

`Copyright (c) 2022 minato37103710`
ProjetoNotebook-Analista 0.0.54
Automação do processo de classificação de solicitações de compra de Notebooks à faculdade -Trabalho Acadêmico Hipotético
Keywords: python,pucsp,cdia

Biblioteca que integra as análises iniciais e gráficos feitos sobre o conjunto de dados fornecidos para reconhecimento da natureza destes, com a implementação dos critérios de aprovação escolhidos, ferramentas para a classificação de novos estudantes e criação do perfil do estudante baseado na média ponderada das notas normalizadas atribuídas com possibilidade de pesquisa de novos pesos através de teste por força bruta implementado em API externa.
SparkAutoML 0.0.15
For an easy implementation of spark's machine learning library
Keywords: python,spark,machine learning

# SparkAutoML
<img alt="PyPI" src="https://img.shields.io/pypi/v/SparkAutoML"> <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/SparkAutoML"> <img alt="GitHub" src="https://img.shields.io/github/license/brainalysis/sparkify"> <img alt="GitHub language count" src="https://img.shields.io/github/languages/count/brainalysis/sparkify">[![Downloads](https://pepy.tech/badge/sparkautoml)](https://pepy.tech/project/sparkautoml)

#### ***This is a TRIAL version***

The main idea of the package is to easily build and deploy pyspark's machine learning library

If you want to contribute please reach out to fahadakbar@gmail.com

Thank you !


https://user-images.githubusercontent.com/19522276/163658399-17786b20-0208-44ff-b111-98b74ab34d25.mp4

---

## How to install
PySpark's version 3.2.1 or higher is required

```
pip install SparkAutoML
```
---


## How to use

**|Binary Classifier|** 

1: Import the classifier
```
from SparkAutoML.ml_module.BinaryClassifier_module.classifier_file import BClassifier
```

2: Setup the experimental
```
bcf = BClassifier(
    training_data=train, # spark data frame
    hold_out_data=test,  # spark data frame
    target_feature="target",  # target feature
    numeric_features=["num_1","num_3"], # list of all numeric features
    categorical_features=["cat_4", "cat_2"], # list of all categorical features
)
```

3: Create a model, e.g. random forest classifier
```
bcf.create_model("rfc") 
```
 **OR**

 Compare multiple models

```
bcf.compare_models(sort='auc')
```

4: Make predictions
```
bcf.predict_model(unseen_data # spark data frame)
```

5: Access the entire pipeline
```
bcf.fitted_pipeline