semvec/pypi-packages huggingface dataset:
easy-id 1.0.3
An easy to use suite of configurable id generators

# EasyID
___

## Installation

`
pip install easy_id
`

---

## Basic Usage

```python
from easy_id import *

if __name__ == "__main__":
    generator = EasyID(EasyIdType.NANOID)
    print(generator.generate())

```

---

## Advanced Usage

```python
from easy_id import *

config = {
    "epoch": 1543392060,
    "machine_id": 0,
}

if __name__ == "__main__":
    generator = EasyID(EasyIdType.SNOWFLAKE, config)
    print(generator.generate())
```
integ-db 0.1.1
This package Integrated Database library
Requires Python: >=3.6
Keywords: mysql, mssql, mariadb, python db, python database, integrate database, sqlalchemy

# integdb
### This package Integrated Database library, based on PyMySQL, pymssql, mariadb, SQLAlchemy.

#### Requirements
- MySQL
- MSSQL(SQL Server)
- MariaDB

#### Controller Object
- MySQL
- MariaDB
- MSSQL
- SQLAlchemy

#### Object that provides a pool
- MySQL
- MariaDB

## Special Feature
- The SQLAlchemy sql_export(to_sql) function support duplicate keys

## Install
#### From PIP
```
pip install integ-db
```
## Example
```
from integdb import Controller

host = "localhost"
user = "usrname"
password = "password"
port = 3306
schema = "database_name"
controller = Controller(
                    host=host,
                    user=user,
                    password=password,
                    port=port,
                    schema=schema,
                    connection_pool=False)
try:
    controller.MySQL.connect()
    sql_context = "SELECT * FROM TEST_DB"
    rows = controller.MySQL.sql_executer(sql_context)
    print (rows)
except Exception as e:
    print (e)
finally:
    controller.MySQL.close()
```

---
## Reference
1. duplicate SQLAlchemy 
Github : https://gist.github.com/tombohub/0c666583c48c1686c736ae2eb76cb2ea
modelwhaleutils 0.5.2.6
Used in modelwhale
Requires Python: >=3.6

## Introduction

**mwutils** is a package developed to be used in the [ModelWhale](https://modelwhale.com/) platform for machine learning experiments tracking. It is now under active development.

At the moment, mwutils supports *keras* and *PyTorch*
mwutils has experimental support for *Tensorflow*


## Usage


class Run:
methods:
- __init__(self, name="lab_run", user_id="user1", lab_id="lab1", org_id="",
                 flush_interval_seconds=5,
                 sys_stat_sample_size=5, sys_stat_sample_interval=5, local_path='', write_logs_to_local=False,
                 remote_path='', buffer_all_logs=False):
  - name: name for current experiment
  - user_id, lab_id, org_id: user shall get these information from the **notebook tools** panel in ModelWhale Notebook interface.
  - flush_interval_seconds: time interval to flush buffered logs, default is **5**
  - sys_stat_sample_size: maximum data size for system metrics, default is **5**
  - sys_stat_sample_interval: sampling rate for system metrics, default is **5**
  - write_logs_to_local: if logs should be stored locally
  - local_path: local path to store logs
  - remote_path: kesci api
  - buffer_all_logs: if all logs should be buffered in RAM (use with caution)

- init_ml():

- start_ml():

- log_ml(step=None, epoch=None, batch=None, loss=None, acc=None, phase="train"):
  - step, epoch, batch: starting from **1**;
  - loss: numpy.float32 woulde be converted to **float** type;
  - acc: numpy.float32 woulde be converted to **float** type;
  - phase: default is **train**, **test**, **val**, **system**


- conclude(show_memoize=True):
  call function after training end
  - show_memoize:

- add_memoize_funcs_to_logger:
  testing;

### Keras:

provide MWCustomCallback method

**example**

```
from mwutils.keras import MWCustomCallback
from mwutils.run import Run

r = Run(name=RUN_NAME,
        user_id = $user_id,
        lab_id = $lab_id,
        org_id = $org_id,
        flush_interval_seconds=30,
        sys_stat_sample_size=5,
        sys_stat_sample_interval=5,
        local_path='',
        write_logs_to_local=False,
        remote_path= $remote_path,
        buffer_all_logs=True)
callBack = MWCustomCallback()
callBack.set_run(r)        
history = model.fit(X_train, y_train,
                    epochs = 40,
                    batch_size = 32,
                    validation_data=(X_test,y_test),
                    shuffle=True,
                    callbacks=[callBack])
r.conclude()
```

### PyTorch:
provide ```LoggerHook``` method

**example**

```
from mwutils.torch_utils import LoggerHook
from mwutils.run import Run

r = Run(name=RUN_NAME,
        user_id = $user_id,
        lab_id = $lab_id,
        org_id = $org_id,
        flush_interval_seconds=30,
        sys_stat_sample_size=5,
        sys_stat_sample_interval=5,
        local_path='',
        write_logs_to_local=False,
        remote_path= $remote_path,
        buffer_all_logs=True)
loggerHook = LoggerHook()
loggerHook.set_run(r)
criterion.register_forward_hook(loggerHook.torch_loss_hook)

r.conclude()
```