semvec/pypi-packages huggingface dataset:
tianchi 0.0.1
tianchi competition utils package
License: MIT

# AI_HUB
AI utils for developer.
such as notice、send massage when model training is over.Bind WeChat Official Account（AI_HUB）
插入在代码里的小工具，可以在模型训练结束时通过公众号及时发送微信消息给自己，提高科研效率。
inferServer: server your ai model as a API and match the tianchi eval
简单的操作把你训练好的模型变为服务API，并且支持天池大赛的流评测。

## INSTALL
```
pip install ai-hub
```

## SAMPLE
### NOTICE
```Python
from ai_hub import notice
#到AGIHub微信公众号获取个人openid如（oM8pVuBWl8Rw_vFz7rZNgeO4T8H8）,需替换为自己的openid
nc = notice("oM8pVuBWl8Rw_vFz7rZNgeO4T8H8")
#借助AGIHub公众号发送消息给自己
nc.sendmsg("hi,AI_HUB.I am su")
```

### inferServer
```Python
'''
依赖：pip install ai-hub #(version>=0.1.7) 
测试用例：
model为y=2*x
请求数据为json:{"img":3}
-----------
post请求：
curl localhost:8080/tccapi -X POST -d '{"img":3}'
返回结果 6
'''
from ai_hub import inferServer
import json

class myInfer(inferServer):
    def __init__(self, model):
       	super().__init__(model)
        print("init_myInfer")
    
    #数据前处理
    def pre_process(self, data):
        print("my_pre_process")
        #json process
        json_data = json.loads(data.decode('utf-8'))
        img = json_data.get("img")
        print("processed data: ", img)
        return img
    
    #数据后处理
    def post_process(self, data):
        print("post_process")
        processed_data = data
        return processed_data
    
    #模型预测：默认执行self.model(preprocess_data)，一般不用重写
    #如需自定义，可覆盖重写
    #def pridect(self, data)：
    #    ret = self.model(data)
    #    return ret

if __name__ == "__main__":
    mymodel = lambda x: x * 2
    my_infer = myInfer(mymodel)
    my_infer.run(debuge=True) #默认为("127.0.0.1", 80)，可自定义端口，如用于天池大赛请默认即可，指定debuge=True可获得更多报错信息
    
```


## 获取OPENID
1.扫描关注公众号AGIHub

![avatar](docs/qrcode.jpg)

2.发送“openid”给公众号 即可获得openid
custom-python-mecab-ko 1.0.1
A python binding for mecab-ko with custom dictionary
License: MIT
Requires Python: >=3
Keywords: mecab mecab-ko

# CAUTION
This is just add custom dict update feature from [`python-mecab-ko`](https://github.com/jonghwanhyeon/python-mecab-ko) package.

I highly recommend to use the original package.

# custom-python-mecab-ko
A python binding for mecab-ko with userdic feature


## Prerequisites
- python3-dev

## Installation
```
pip install git+https://github.com/DataLama/custom-python-mecab-ko.git
```

## Usage
```python
import mecab
mecab = mecab.MeCab()

mecab.morphs('영등포구청역에 있는 맛집 좀 알려주세요.')
# ['영등포구청역', '에', '있', '는', '맛집', '좀', '알려', '주', '세요', '.']

mecab.nouns('우리나라에는 무릎 치료를 잘하는 정형외과가 없는가!')
# ['우리', '나라', '무릎', '치료', '정형외과']

mecab.pos('자연주의 쇼핑몰은 어떤 곳인가?')
# [('자연주의', 'NNG'), ('쇼핑몰', 'NNG'), ('은', 'JX'), ('어떤', 'MM'), ('곳', 'NNG'), ('인가', 'VCP+EF'), ('?', 'SF')]

mecab.parse('즐거운 하루 보내세요!')
# [
#     ('즐거운', Feature(
#         pos='VA+ETM', semantic=None, has_jongseong=True, reading='즐거운',
#         type='Inflect', start_pos='VA', end_pos='ETM',
#         expression='즐겁/VA/*+ᆫ/ETM/*')),
#     ('하루', Feature(
#         pos='NNG', semantic=None, has_jongseong=False, reading='하루',
#         type=None, start_pos=None, end_pos=None,
#         expression=None)),
#     ('보내', Feature(
#         pos='VV', semantic=None, has_jongseong=False, reading='보내',
#         type=None, start_pos=None, end_pos=None,
#         expression=None)),
#     ('세요', Feature(
#         pos='EP+EF', semantic=None, has_jongseong=False, reading='세요',
#         type='Inflect', start_pos='EP', end_pos='EF',
#         expression='시/EP/*+어요/EF/*')),
#     ('!', Feature(
#         pos='SF', semantic=None, has_jongseong=None, reading=None,
#         type=None, start_pos=None, end_pos=None,
#         expression=None))
# ]
```

## Add custom dict

### naive mecab
```python
from mecab import MeCab
tokenizer = MeCab()

tokenizer.pos('티존부위에 여드름이 많이 나요ㅠ')
# [('티', 'NNG'), ('존부', 'NNG'), ('위', 'NNG'), ('에', 'JKB'), ('여드름', 'NNG'), ('이', 'JKS'), ('많이', 'MAG'), ('나', 'NP'), ('요', 'JX'), ('ㅠ', 'UNKNOWN')]
```

### update custom-dict
- update custom-dict
```python
from mecab import update_custom_dictionary

update_custom_dictionary('custom_dict.csv')

# custom_dict.csv
# https://bitbucket.org/eunjeon/mecab-ko-dic/src/df15a487444d88565ea18f8250330276497cc9b9/final/user-dic/README.md
```
- pos-tagging

```python
tokenizer.pos('티존부위에 여드름이 많이 나요ㅠ')
# [('티존', 'NNG'), ('부위', 'NNG'), ('에', 'JKB'), ('여드름', 'NNG'), ('이', 'JKS'), ('많이', 'MAG'), ('나', 'NP'), ('요', 'JX'), ('ㅠ', 'UNKNOWN')]
```
MelonTop100 0.1
This is a simple package that brings up the Top 100 list of Melon, a music site in Korea.
License: MIT

# MelonTop100

This is a simple package that brings up the Top 100 list of Melon, a music site in Korea.

If you use the `get_songs()` function, you can check Melon's Top 100 songs in the form of a list, and the items in the list are provided as a dictionary containing information such as song name and singer.

## Use

```python
from melon_top100 import get_songs

top100 = get_songs()
```
VirusPrank 1.1.0
Harmless virus prank
License: MIT

# harmless-virus
Unless your computer has 1 GB RAM...

## Importing
`from virus.functions import Virus`

## Tutorial (some what)
The module is quite basic, it has only one class called `Virus` and has one callable function called `open_website()`

`Virus.open_website()`

*Parameters*
```
duration
  Type: float
```

## Example usage
```py
import virus
from virus.functions import Virus

starter = Virus()
starter.open_website(1) #Now random websites will be opened for the next 1 minute
```


The default duration is 10 minutes and the duration is to be entered in **minutes**. The virus will open a website every second until the time is over

Now you must be thinking, running a python script in your friend's computed cannot be considered a *'virus'*. You can convert it into an executable file using [pyinstaller](https://pypi.org/project/pyinstaller/)

## License
(c) 2021 Dev Shah

This repository is licensed under the MIT license. See LICENSE for details