semvec/pypi-packages huggingface dataset:
get-secret-or-env-var 0.0.2
Docker secrets aware alternative to os.getenv and os.environ
License: MIT
Requires Python: >3.5.2

# get_secret_or_env_var

[![CircleCI](https://img.shields.io/circleci/build/gh/greenape/get_secret_or_env_var.svg?logo=CircleCI&style=flat-square)](https://circleci.com/gh/greenape/get_secret_or_env_var) [![codecov](https://img.shields.io/codecov/c/github/greenape/get_secret_or_env_var.svg?logo=Codecov&style=flat-square)](https://codecov.io/gh/greenape/get_secret_or_env_var)  [![License: MIT](https://img.shields.io/github/license/greenape/get_secret_or_env_var.svg?style=flat-square)](https://opensource.org/licenses/MIT) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/python/black)

A docker-secrets aware wrapper for Python's os.getenv and os.environ.

Supplies:

- `getenv`
- `getenvb`
- `environ`
- `environb`

Which behave exactly like their stdlib equivalents, but will look for a file in `/run/secrets` and return the contents in preference to any environment variables.

Setting values on `environ` or `environb` will set the values in their `os.` equivalent.
smppy 0.3.2
Build SMPP server apps in Python3
License: MIT
Requires Python: >=3.7, <4
Keywords: smpp server

# SMPPY
## Simple tool for building SMPP servers

---

## How to install

```bash
pip install smppy
```

## How to build a SMPP server app with `smppy`

Creating a SMPP server app with `smppy` is simple as inheriting from
`smppy.Application` and implementing a few methods. Below is the example
app you can find in [scripts/example_server](scripts/example_server.py) file.

```python
from smppy import Application, SmppClient
from typing import List, Union


class MySmppApp(Application):
    def __init__(self, name: str, logger):
        self.clients: List[SmppClient] = []
        super(MySmppApp, self).__init__(name=name, logger=logger)

    async def handle_bound_client(self, client: SmppClient) -> Union[SmppClient, None]:
        self.clients.append(client)
        self.logger.debug(f'Client {client.system_id} connected.')
        return client

    async def handle_unbound_client(self, client: SmppClient):
        self.clients.remove(client)

    async def handle_sms_received(self, client: SmppClient, source_number: str,
                                  dest_number: str, text: str):
        self.logger.debug(f'Received {text} from {source_number}')
        await client.send_sms(source=dest_number, dest=source_number,
                              text=f'You have sent {text} to me...')
```

## Run

### 1. Run the server app

Source code: [example_server.py](scripts/example_server.py)

In a terminal tab run:

    python -m scripts.example_server

### 2. Run the test client

**smppy** has also a SMPP client which can be manipulated through a command
line:

Source code: [test_client.py](scripts/test_client.py):

In a second terminal tab run:

    python -m scripts.test_client

A SMPP client connects to the server and a Python shell opens.

Available functions:
- `send_message(message: str, sender: str, receiver: str)`

### 3. Watch logs

In a third terminal tab run:

    tail -f client.log

to view all client events.

## Contributing

Feel free to open issues and pull requests.
EntityRelation 1.0.3
A package to extract relations between entities. this maybe helpful and a important link for constructing KG. base on DSNF(Dependency Semantic Normal Forms) for now.
License: MIT
Keywords: nlp EntityRelation entity relation dsnf

# EntityRelation
A package to extract relations between entities. this maybe helpful and a important link for constructing KG. base on DSNF(Dependency Semantic Normal Forms) for now.


# 为什么要封装这个包
在知识图谱的构建过程中很重要的一步是实体关系的提取，看了一些关于知识图谱的项目大都是全过程的(有些可能存在硬编码)，导致想要进行其他领域的实体关系提取（知识图谱构建）时都不会十分顺畅。
所以看到[lemonhu](https://github.com/lemonhu)的开放领域实体关系提取项目（[open-entity-relation-extraction](https://github.com/lemonhu/open-entity-relation-extraction)）觉得很有意义。
但是原项目也有一些硬编码的地方，而且其他项目想要使用可能不是那么方便。
基于以上原因，动手在lemonhu项目的基础上封装了一个python包，便于插拔使用。
目前包的方法并不针对特定领域，一种比较简单的迁移到专有领域的方法是替换resource文件夹的user_dict.txt分词词典。
默认包含的词典只是一个比较基础的版本。


# 使用及效果示例
（第一次使用由于需要去下载ltp模型，所以实例化的时候可能会等待几分钟）
<p align="center"><img src="images/sample.png?raw=true"/></p>

# 安装
可以直接通过pip安装
``` bash
pip install EntityRelation
``` 

或者：
``` bash
git clone https://github.com/LG-1/EntityRelation.git
cd EntityRelation
python setup.py install
``` 



# 其它
还有很多需要优化的地方，非常欢迎大家提供意见建议或者issue。

目前DSNF的效率还可以，但准确率还有待进一步的测试覆盖。

后续还考虑添加其他的关系提取实现，从而使得模型选择参数化。



# Refrence
主要参考了: https://github.com/lemonhu/open-entity-relation-extraction
进行了封装组件化便于使用。

[Jia S, Li M, Xiang Y. Chinese Open Relation Extraction and Knowledge Base Establishment[J]. ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP), 2018, 17(3): 15.](https://www.researchgate.net/profile/Shengbin_Jia2/publication/323198509_Chinese_Open_Relation_Extraction_and_Knowledge_Base_Establishment/links/5ad80644aca272fdaf802ff1/Chinese-Open-Relation-Extraction-and-Knowledge-Base-Establishment.pdf)