semvec/pypi-packages huggingface dataset:
reblob 0.0.2
A tool for formatting a response to a page
Requires Python: >=3.4
Keywords: publishing blog webmention publ indieweb

# reblob

Tool for doing a reblog/reply/whatever of an existing webpage.

Given a URL, it will produce a response blog entry with the original content wrapped in a block quote, before using [Pandoc](https://pandoc.org) to convert it to the representation of choice.

Usage:

```bash
pip install reblob
reblob http://example.com/ -f rst
```

It requires Pandoc to be installed; see the [pypandoc](https://github.com/bebraw/pypandoc) manual for some suggestions on how to do this.
scikit_rest 0.1.1
Automatically serve ML model as a REST API

# scikit-rest

![logo](logo.png)
Automatically deploy your ML model as a REST API

Often times, deploying your favorite Scikit-learn / XGBoost / Pytorch / Tensorflow model as a REST API might take a lot of time. There are a lot of boilerplate codes to be written. `scikit-rest` is a package designed to alleviate most of the pain points within this process.
## Prerequisites

This package officially supports Python 3

## Installing
```
pip install scikit_rest
```

## Usage
The main function offered in this package is `serve`, with the following syntax:
```
    serve(
        col_list: List[str],
        col_types: Dict[str, Union[List, type]],
        transform_fn: Callable,
        predict_fn: Union[Callable, sklearn.base.BaseEstimator],
        port: int,
        is_nullable: bool ,
        name: str,
    )
```

### col_list

List of Column names, where the order of the values will dictate the order within the pandas DataFrame
```
col_list = ['class', 'sex', 'age', 'embarked', 'date', 'is_englishman']
```

### col_types

Dictionary of Column Names and the type of the variable, used for input Validation. If the values
of the dictionary is instead a list, We assume that any input for the variable can only be any of
 the ones listed within the list
```
col_types = {
    'class' : int,
    'sex' : str,
    'age' : float,
    'embarked': ['C', 'S', 'Q'],
    'date': datetime.datetime,
    'is_englishman': bool
}
```
 
 
### transform_fn

Function which convert the input dataframe into test dataframe, we can call model.predict upon to get the final result
```
def transform_fn(input_df):
    df = input_df.copy()
    df['sex'] = df['sex'].apply(lambda x : transform_sex(x))
    df['embarked'] = df['embarked'].apply(lambda x : transform_embarked(x))
    df['date'] = df['date'].dt.year
    df = df.fillna(0.)
    return df
```

### predict_fn
Function which convert the test dataframe into result. If a ML model instance is passed in, we will instead try to call model.predict_proba / model.predict to get the result
```
def predict_fn(input_df):
    df = input_df.copy()
    return model.predict(df).item()
```

### port
Port Number where the REST API should be served upon

### is_nullable
Whether input API can be nullable

### name
Name of the program


## Example
Example of Usage can be found at [example](example) folder


## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct,
 and the process for submitting pull requests to us.

## Authors
[Aditya Kelvianto Sidharta][https://adityasidharta.com]


## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
dbtsdk 0.3
DBT API SDK for Python

# dbt-sdk-python
A Python implementation of DBT API SDK (ported from [dbt-sdk-php](https://bitbucket.org/faithcomesbyhearing/dbt-sdk-php))

## Requirements

 - Python 3 (Recommended 3.6+)

## Installation

```bash

sudo python3 -m pip install dbtsdk

```

## Usage

Below are the steps neccessary to get you started with the DBT SDK.

### 1. Sign up for an API Key

Before you can start using the DBT SDK, you will need to sign up for an API Key at [https://www.digitalbibleplatform.com](https://www.digitalbibleplatform.com).  

### 2. (Optional) Add your API key to your environment

It's best not to hard code your API key in your script file. Instead, save it to your environment and let Python read it from there.

#### On Windows:

```batch

setx DBT_API_KEY "<your api key>"

```

#### On Mac and Linux:

```bash

export DBT_API_KEY=<your api key>

```

To make this environment persist between reboots, add this line to your `.bash_profile` file instead.

### 2. Include the SDK file

In your Python script, import the package.

```python

from dbtsdk import Dbt

```

### 3. Create an instance of the object

When creating the object, pass the API key.

```python

import os

api_key = os.environ['DBT_API_KEY']
dbt = Dbt.Dbt(api_key)

```

### 4. Retrieve volume information

For an example of the usual work flows, as well as examples of retrieving and displaying text, audio, and video, download the [sample code](https://github.com/Nilpo/dbt-sdk-python/blob/master/sample.py).

## API Documentation

Documentation for the underlying REST API can be found in the [Digital Bible Platform Developer Documentation](http://digitalbibleplatform.com/docs).

## License

dbt-sdk-python is available under the MIT license. See the LICENSE file for more info.
short-chn-yn 0.0.2
Short Chinses literal YES or NO recognition by logic
Keywords: Chinese,NLP

# short_chn_yn
使用逻辑的短文本中文字面肯定否定识别。

### 1.目的

1. 中文是由字组成的，一般人的语速大概为[200字/分钟](https://dwz.cn/V7nIMYzq)，如果交流时间很短（1~2s），则输出汉字为3~7字;

2. 日常交流中最常见是字面（不需要太复杂语义）肯定和否定

综上，日常交流中最常见的是3~7字的字面肯否定，例如“嗯，是的”，“不是啊”。我们主要解决这个问题。

### 2.建模

完全通过逻辑运算的方式实现：

`Yes-or-No=Not(Xor(yes,no))`

例如，“不是啊“，“不”表示False，“是”表示True，“啊”是无意义词，忽略，则`Not(Xor(True,False))=False=No`，故表示否定。

对于更复杂的情况，“难道不是吗”，进行递归，`Not(Xor(Not(Xor(False, False)), True))=True=Yes`，表示肯定。


### 3.使用

```python
import short-chn-yn as yn
if __name__=="__main__":
    #实例化对象
    y1=yn.yn()
    s = "嗯是"
    #输入
    result = y1.y_n(s)
    print(result)
```

其中的`simple_dict.txt`含有：`pos, neg, others, filter`四个内容，分别表示：肯定、否定、无意义词和特殊处理词(解决问题2)，用户可自行修改。

`yn(dictionary)`，构造函数，可以用符合标准的字典，空缺使用默认字典。

`y_n(s, thre)`，输出判断，其中`s`为输入字符串，`thre`为阈值，因为语速是大部分人都是一定的，所以1~2s 说出的词的个数也是固定的，默认为6。

`y_n()`输出为字符串：

```
    Positive: 肯定

​    Negtive: 否定

​    Nonsense: 无意义

​    Incognizance: 不识别

​    too long: 字符串长度超过thre
```

### 4.问题

1. 有的词有语义性，例如“嗯”，很难说清楚它表示肯定还是语气词。


### 5.协议

MIT