semvec/pypi-packages huggingface dataset:
mobi-reader 0.2.1
A simple way to read and convert your mobi files.
Requires Python: >=3.4

# Mobi reader

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/MrLucio/mobi-reader/CI)
![PyPI - License](https://img.shields.io/pypi/l/mobi-reader)

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mobi-reader)
![PyPI](https://img.shields.io/pypi/v/mobi-reader)

## Installation
```
  pip install mobi-reader
```

## Usage
This example is taken from [tests/test_reader.py](tests/test_reader.py)
```python
  from mobi import Mobi

  reader = Mobi('./alice_in_wonderland.mobi')
  output = reader.read()  # bytearray containing the decoded mobi file

  reader.close()
```
vistec-ser 0.4.6a3
Speech Emotion Recognition models and training using PyTorch
Requires Python: >=3.6

# Vistec-AIS Speech Emotion Recognition
![python-badge](https://img.shields.io/badge/python-%3E%3D3.6-blue?logo=python)
![pytorch-badge](https://img.shields.io/badge/pytorch-%3E%3D1.8.0-red?logo=pytorch)
![license](	https://img.shields.io/github/license/vistec-AI/vistec-ser)

[comment]: <> (![Upload Python Package]&#40;https://github.com/tann9949/vistec-ser/workflows/Upload%20Python%20Package/badge.svg&#41;)

[comment]: <> (![Training]&#40;https://github.com/tann9949/vistec-ser/workflows/Training/badge.svg&#41;)

![Code Grade](https://www.code-inspector.com/project/17426/status/svg)
![Code Quality Score](https://www.code-inspector.com/project/17426/score/svg)

Speech Emotion Recognition Model and Inferencing using Pytorch

## Installation
### From Pypi
```shell
pip install vistec-ser
```

### From source
```shell
git clone https://github.com/tann9949/vistec-ser.git
cd vistec-ser
python setup.py install
```

## Usage
### Training with THAI SER Dataset
We provide Google Colaboratory example for training the [THAI SER dataset](https://github.com/vistec-AI/dataset-releases/releases/tag/v1) using our repository.

[![colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1kF5xBYe7d48JRaz3KfIK65A4N5dZMqWQ?usp=sharing)

### Training using provided scripts
Note that currently, this workflow only supports pre-loaded features. So it might comsume an additional overhead of ~2 Gb or RAM. To 
run the experiment. Run the following command

Since there are 80 studios recording and 20 zoom recording. We split the dataset into 10-fold, 10 studios each. Then evaluate using
k-fold cross validation method. We provide 2 k-fold experiments: including and excluding zoom recording. This can be configured 
in config file (see `examples/aisser.yaml`)

```shell
python examples/train_fold_aisser.py --config-path <path-to-config> --n-iter <number-of-iterations>  
```

### Inferencing
We also implement a FastAPI backend server as an example of deploying a SER model. To run the server, run
```shell
cd examples
uvicorn server:app --reload
```
You can customize the server by modifying `example/thaiser.yaml` in `inference` field.

Once the server spawn, you can do HTTP POST request in `form-data` format. and JSON will return as the following format:
```json
[
  {
    "name": <request-file-name>,
    "prob": {
      "neutral": <p(neu)>,
      "anger": <p(ang)>,
      "happiness": <p(hap)>,
      "sadness": <p(sad)>
    }
  }, ...
]
```
See an example below:

![server-demo](figures/server.gif)

## Author & Sponsor
<a href="https://airesearch.in.th/" style="margin-right:50px">
<img src="https://airesearch.in.th/assets/img/logo/airesearch-logo.svg" alt="airesearch" width="200"/>
</a>
<a href="https://www.ais.co.th/">
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/3/3b/Advanced_Info_Service_logo.svg/1200px-Advanced_Info_Service_logo.svg.png" alt="ais" width="200"/>
</a>

Chompakorn Chaksangchaichot

Email: [chompakornc_pro@vistec.ac.th](`chompakornc_pro@vistec.ac.th)
Redj-LogServer 0.2.6
Redj Log Server
Requires Python: >=3.6

# Redj Log Server

## Getting Started

> in `setting.py`:

```
DEBUG = False
```

> add code to project(for example add to `url.py`):

```
import redjlog

redjlog.init(
    debug=True,
    response_type='json',
    api_key='YOUR_API_KEY',
    server_url='YOUR_SERVER_URL',
    project_key='YOUR_PROJECT_ID',
)
```

> `response_type` is `json` or `url` , if set `url` you must set `response_url` like `response_url='/error_page'`

## Save response:

```
redjlog.init(
    ...
    save_response = True, #=> save all response
    save_response_exception = True, #=> save exception response
)
```

## Change Exception response:

```
redjlog.init(
    ...
    status_key = "your_status_key",
    message_key = "your_message_key"
)
```

## Usage

### 1- Log Request

> in file `settings.py` :

```
MIDDLEWARE = [
    ...
    'redjlog.middleware.RequestLog.Base'
]
```

### 2- Log Exception

> in file `settings.py` :

```
MIDDLEWARE = [
    'redjlog.exception.ExceptionHandler.Base',
    ...
]
```

> in `url.py`:

```
from django.conf.urls import handler400, handler403, handler404, handler500

handler400 = 'redjlog.exception.HttpException.handler400'
handler403 = 'redjlog.exception.HttpException.handler403'
handler404 = 'redjlog.exception.HttpException.handler404'
handler500 = 'redjlog.exception.HttpException.handler500'
```

> in try/except:

```
import redjlog

try:
    int('test')
except Exception as ex:
    redjlog.catch(ex)
```

### 3- Log Exception Knox

> if install django-rest-knox

> in file `settings.py` :

```
REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': [
        'redjlog.exception.KnoxException.Authentication',
    ]
}
```

## Exception Handling

> Redj Logserver uses exceptions for flow control. Meaning, instead of writing too many conditionals, we prefer raising exceptions and then handle them to return an appropriate response. For example:

```
import redjlog

if not request.user.is_authenticated:
    raise redjlog.AuthException()
```

OR

```
import redjlog

if(!serializer.is_valid()):
    raise redjlog.ValidatorException()
```

List of Exception

```
PayException
DateException
AuthException
OtherException
UploadException
BlockIpException
NotFoundException
ValidatorException
DuplicateException
PermissionException
```

for send custom massage user `OtherException`:

```
raise OtherException('custom massage for send')
```

You can change the exception message

exceptionMessage input is optional

```
import redjlog

redjlog.exceptionMessage(
    auth_massage='Your Massage',
    date_massage='Your Massage',
    block_massage='Your Massage',
    other_massage='Your Massage',
    upload_massage='Your Massage',
    duplicate_massage='Your Massage',
    validator_massage='Your Massage',
    not_found_massage='Your Massage',
    permission_massage='Your Massage'
)
```
cpdt 0.0.14
AI数据转换工具箱

<div align="center">
  <img src="resources/LOGO.png" width="450"/>
  <center>

  [![PyPI](https://img.shields.io/badge/pypi-v1.0.0-blue)](https://pypi.org/project/cpdt/)
  [![license](https://img.shields.io/badge/license-GNU%20General%20Public%20License%20v3-green)](https://github.com/540717421/chipeak_data_tool)

  </center>
</div>


## 简介

 简体中文| [English](README_EN.md)

chipeak_data_tool是一个基于各种人工智能标注工具生成的数据集，跟深度学习图像标注工具Labelme生成的数据集相互转换的开源工具箱。

主分支代码目前支持 coco数据集与labelme数据集互转。


### 主要特性
1. 集成多种计算机视觉标注格式相互转换
2. 支持各类数据集的筛选,分配与切割
3. 集成多种文件、图像、视频处理功能
4. 模块可拓展,用户可自定义数据格式
5. 提供python模块包,命令行等便捷方式

### 相关标注工具
labelme:https://github.com/wkentaro/labelme
### 命令行功能实现
#### 数据支持集格式：
- [x] labelme格式数据集 https://github.com/wkentaro/labelme
- [x] COCO格式数据集
#### 数据处理功能：
- [x] 数据集标注文件相互转换
- [x] 截取目标保存为图像(目前支持:矩形框,)
#### 图像(文件)处理：
- [x] 按比例或者文件数目划分数据(如:文件分配或者训练测试集划分)
#### 视频处理：
- [x] 视频切片成图像
- [x] 图像合成为视频
### python模块功能实现
#### 数据支持集格式：
- [x] labelme格式数据集
- [x] COCO格式数据集
#### 数据处理功能：
- [x] 数据集标注文件相互转换
- [x] 截取目标保存为图像(目前支持:矩形框,)
#### 图像(文件)处理：
- [x] 按比例或者文件数目划分数据(用于文件分配或者训练测试集划分)
#### 视频处理：
- [x] 视频切片成图像
- [x] 图像合成为视频

## 开源许可证

该项目采用 [GNU General Public License v3.0 开源许可证](LICENSE)。

## 更新日志

最新的月度版本 v1.0 在 2021.11.08 发布。



已支持的数据集：

- [x] COCO数据集
- [x] Via标注数据集
- [x] Labelme标注数据集


已支持的功能：

- [x] labelme数据集抠图
- [x] coco数据集转labelme数据集
- [x] labelme数据集转coco数据集
- [x] 根据标签类别筛选labelme数据集




## 安装

pip install cpdt

## 快速入门
请参考[快速入门文档](docs/get_started.md)学习 chipeak_data_tool 的基本使用。

## 贡献指南

无

## 致谢

无

## 引用

```
@misc{cpdt2016,
  author =       {詹勇，朱文海},
  title =        {{labelme: Image Polygonal Annotation with Python}},
  howpublished = {url{https://github.com/540717421/chipeak_data_tool}},
  year =         {2021}
}
```
## ChiPeak的其它项目

- [cpdt](https://github.com/540717421/chipeak_data_tool): chipeak_data_tool AI数据处理工具箱


## 欢迎加入 ChiPeak 社区

扫描下方的二维码可关注 芯峰科技团队的 [官方网站](http://http://www.chipeak.com/)，加入芯峰科技 团队的 [官方交流](http://www.chipeak.com/account/login)
<div align="center">
<img src="/resources/xf_rq_code.png" height="200" />
</div>
我们会在 ChiPeak 社区为大家

- 📢 分享 AI 框架的前沿核心技术
- 💻 解读 cpdt 常用模块源码
- 📰 发布 ChiPeak 的相关新闻
- 🚀 介绍 ChiPeakDetection 开发的前沿算法
- 🏃 获取更高效的问题答疑和意见反馈
- 🔥 提供与各行各业开发者充分交流的平台

干货满满 📘，等你来撩 💗，ChiPeak 社区期待您的加入 👬
Easy-QLearning 1.1.0
Simplify the creation of QLearning

# EQL

Simplify the creation of QLearning


## Installation

Run the following to install:
```python
pip install Easy-QLearning
```


## Usage
```python
import EQL
####Initialise QTable####
#Mission: go to the house without run over the human
#Game grid
Grid = [#1 = House, -1 = Human
    [0,0,1],
    [0,-1,0],
    [0,0,0]
]

#First car position coordinates
x = 0
y = 2
#Current state
state = 7
#Action list and travel coordinate
actions = [
    [-1, 0], # Up
    [1, 0], #Down
    [0, -1], # Left
    [0, 1] # Right
]

#Make QTable
Qtable = EQL.QLearning(nbAction=4,nbState=10)

####Train the QTable####
#100 games
for _ in range(100):
    #Reset the car position
    x = 0
    y = 2
    #Default state
    state = 7
    #While the car are not in the house
    while x != 2 or y != 0:
        #Display the grid
        print("---------------------")
        yTemp = 0
        for line in Grid:
            xTemp = 0
            for pt in line:
                print("%s\t" % (pt if yTemp != y or xTemp != x else "X"), end="")
                xTemp += 1
            yTemp += 1
            print("")
        #Choose an action
        action = Qtable.takeAction(state,epsilon=0.4)
        #Move the car
        y = max(0, min(y + actions[action][0],2))
        x = max(0, min(x + actions[action][1],2))
        #Calcul the position in the grid (state)
        newState = (y*3+x+1)
        #Get the reward of the position
        reward = Grid[y][x]
        print("state : ", newState)
        print("reward : ", reward)
        #Update Q function
        Qtable.updateQFunction(newState,state,reward)
        #Next state
        state = newState
#Display the QTable
for s in range(0, 9):
    print(s, Qtable.QTable[s])

#Save my QTable in myTable.npz
Qtable.saveQTable("myTable")

#Load my QTable from myTable.npz
Qtable.loadQTable("myTable")
```


```bash
$ pip install -e .[dev]
```