semvec/pypi-packages huggingface dataset:
utf8cleaner 0.0.2
remove non-UTF8 bytes from an input file and write a cleaned up version
Requires Python: >=3.6

# utf8cleaner

Read a file byte-by-byte to and strip any byte sequences that have no UTF8
equivalent and strip them

## Installation
```shell
pip install utf8cleaner
```

Note: requires python 3

## Usage

```shell
utf8cleaner --input FILENAME
```

Will read `FILENAME` and write to `FILENAME.clean`

## Why would I want to do this?
Sometimes when exporting and importing data, there are byte sequences that
prevent data being imported. To fix this you would otherwise have to do one or
more of:

* Manually edit the source data in its native application (eg backspace 
  invisible characters) in JIRA fields
* Edit the file with a hex editor and look for known-bad values (eg copyright 
  symbol)
* Do something smart with perl/vi/sed to find and replace known bad byte
  patterns

This simple utility fixes these problems in one hit.

## Where do these strange characters come from?
Number one culprit: copy and paste from outlook. This often introduces
invisible whitespace errors (spaces that are not spaces...) along with "pretty"
quotes, etc.

Other sources including copying and pasting from files with the _old_ 
[ISO8859](https://en.wikipedia.org/wiki/ISO/IEC_8859) character encodings

## Can I see an example file that demonstrates this issue?

[examples/test.txt](examples/test.txt)

There is a copyright symbol at the end of the file that needs replacing

## What exactly is the problem?
iso8859 represents symbols as a single byte, eg the copyright symbol would be
represented by the single hex byte:

```hex
0xA9
```

[UTF8](https://en.wikipedia.org/wiki/UTF-8) uses two bytes to represent such characters, eg:

```hex
0xC2 0xA9
```

Since UTF-8 is a variable width character encoding scheme, it will use from 1 
to 4 bytes to encode a single symbol. This is how it is able to represent all
kinds of new symbols we take for granted such as 
[emojii](https://en.wikipedia.org/wiki/Emoji) and 
[CJK](https://en.wikipedia.org/wiki/CJK_characters) characters.
xa-cloud-decorators 1.0.1
Decorators commonly used in building XA Cloud functions
Requires Python: >=3.6

# XA Cloud Decorators
Decorators commonly used in building XA Cloud functions

<br/><br/><br/><br/>

## secure_decorator: HTTP Header Authorization decorator.
Checks if `X_AUTHORIZATION_KEY` used is authorized. Returns `Unauthorised HTTP Request invalid credentials` if it fails

<br/><br/>

## search_header_decorator: HTTP Header Search decorator.
Checks search parameter, `X_API_SEARCH_KEY`  is valid. Returns `Unsupported HTTP Request. Invalid header search key.` if it fails

<br/><br/>

## json_decorator: HTTP Content Type JSON decorator.
Checks if `content-type` is `application/json`. Returns `Unsupported HTTP Request. Invalid header content type` if it is not.

<br/><br/>

## post_decorator: HTTP Request Method POST decorator.
Check if method is `POST`. Returns `Unsupported HTTP Request. Invalid request method` if it is not 

<br/><br/>

## elastic_search_query_decorator: Elasticsearch Query decorator.
Builds an ES query with query paramaters for search header == `COORDINATES`

```
"query":{
    "bool": {
        "must": {
            "match_all": {}
        },
        "filter": {
            "geo_shape": {
                "my_polygon": {
                    "shape": {
                        "type": "point",
                        "coordinates" : request_json['coordinates']
                    },
                    "relation": "contains"
                }
            }
        }
    }
}
```

Else  query parameters 

```
'query': {
    'match': {
        request_json['key']: request_json['value']
    }
```

Returns `Unsupported HTTP Request.` if it fails

<br/><br/>
gltfutils 0.0.1
A set of python libraries for reading, manipulating, and saving gltf files.
Requires Python: >=3.6

# gltfutils
This package allows you to load, save and manipulate GLTF 2.0 files in Python 3.x.

## Installation

gltfutils is available on pypi, allowing it to be installed by running `pip install gltfutils`.

### Installing from source

Clone the repository, and from the repository's root directory run `python setup.py install`

### Running the tests

Clone the repository, and from the repository's root directory run `python setup.py test`

## Examples

### Loading a gltf file

```python
from gltfutils import GLTF2

with open(GLTF_FILENAME, 'r') as f:
	gltf = gltfutils.GLTF2.load(f)
```

### Loading a GLB file

```python
from gltfutils import GLB

with open(GLB_FILENAME, 'r') as f:
	gltf = gltfutils.GLB.load(f)
```

### Accessing the Contents of a GLTF 2.0 File

Access is done through dotted notation. Assuming an existing gltf file is loaded with the name `gltf`:

```python
print(gltf.asset

for node in gltf.nodes:
	print(node.mesh)
```

NOTE: Optional attributes are always present and in most cases default to None (in the case of indices, for example), or
an empty list, when the variable is a list (i.e. a node's children).

### Saving gltf JSON

Assuming an existing gltf file is loaded with the name `gltf`:

```python
import json

with f as open(OUTPUT_FILENAME, 'w'):
	json.dump(f, gltfutils.to_json(gltf))
```

## TODO

For 1.0:

- [ ] Test coverage measurement + badge
- [ ] CI badge
- [ ] Buffer Loaing and Accessor implementation
- [ ] Sparse accessors
- [ ] Editor module

For the future:
- [ ] Draco compression
- [ ] Lighting extension
- [ ] LOD Extension
autobatch 0.0.2
auto batch process

This is a simple tool to convert your synchronous call interface to a batch-handled asynchronous call, which is useful if you deploy a deep learning model and provide restful API.

这是一个简单的工具将你的同步调用接口转换为按批次处理的异步调用，这是有用的如果你部署了一个深度学习模型并提供了restful API。
exmail-sdk 1.0.0
Tencent Exmail SDK for Python
Keywords: tencent,exmail,exmail-sdk,SDK

################################
Tencent Exmail SDK for Python
################################


腾讯企业邮第三方 Python SDK。
`【阅读文档】 <https://exmail-sdk.readthedocs.io/zh_CN/latest/>`_。


********
功能特性
********
+ 腾讯企业邮接入api


********
安装
********

目前 exmail-sdk 支持的 Python 环境有 2.7, 3.4, 3.5, 3.6, 3.7, 3.8。


为了简化安装过程，推荐使用 pip 进行安装

.. code-block:: bash

    pip install exmail-sdk

升级 exmail-sdk 到新版本::

    pip install -U exmail-sdk

如果需要安装 GitHub 上最新代码::

    pip install https://github.com/ni-ning/exmail-sdk/archive/master.zip
chem-calc 0.0.3
A package to calculate various stoichometric features of compounds.
Requires Python: >=3.2

# chem_calc
The module chem_calc calculates chemical and physical properties based on the stoichometry of a chemical compound. 

The 20+ available properties (or features) used in this package are elemental properties from the CRC Handbook of Chemistry and Physics as well as the NIST X-ray Mass Attenuation Coefficients Database.


# Available properties

CRC Handbook of Chemistry and Physics

| Property / Feature | Tag |
|-----------------|-----------------------|
| Number of 4f electrons  | '4f'|
| Number of 5d electrons  | '5d'|
| Combined number of 4f and 5d electrons | 'add4f5d'|
| Absolute value of the difference of number of 4f and 5d electrons | 'sub4f5dabs'|
| Number of electrons  | 'allelectrons' |
| Number of valence outer shell electrons  | 'val_e' |
| Atomic number | 'atomicnumber' |
| Atomic weight | 'atomicweight' |
| First ionization energy | 'ionenergy' |
| Pauling electronegativity of most common oxidation state | 'el_neg_chi' |
| van der Waals radius | 'R_vdw_element' |
| Covalent radius | 'R_cov_element' | 
| Atomic number to mass number ratio | 'zaratio' |
| Excitation energy  | 'ex_energy' |
| Period  | 'period' |
| Elemental density | 'density' |


NIST X-ray Mass Attenuation Coefficients Database for features at 662 keV and include the following:

|Property / Feature| Tag|
|----------|----------|
|Coherent scattering coefficient |'co_scatt'|
|Incoherent scattering coefficient |'inco_scatt'|
|Photoelectric absorption |'pe_abs'|
|Coherent attenutation coefficient |'atten_co'|
|Incoherent attenutation coefficient |'atten_inco'|

# Methods
* how_many -- Returns the number of atoms in a given chemical formula.
```{
>>> import chem_calc
>>> chem_calc.chem_calc('H2O').howmany
3.0

```
* total --  Returns the feature total for a given chemical formula.
```{
>>> import chem_calc
>>> chem_calc.chem_calc('H2O',feature='atomicweight').total
18.014710000000001

```

* avg_feature -- Returns the average value of a property for a given chemical formula.
```{
>>> import chem_calc
>>> chem_calc.chem_calc('H2O',feature='atomicweight').avg_feature
6.0049033333333339

```

# Installation

Use 'pip' to install from pypi:

```{
pip install chem_calc

```

or 'pip' to install from github:

```{
pip install git+https://github.com/garne041/chem_calc.git

```
or clone the package using git:

```{
git clone https://github.com/garne041/chem_calc.git

```

# Requirements
Requires numpy, pickle, and pandas

# License
The original code that this project is based on https://repl.it/@Supakri2680/Molecular-Mass-Calculator2. In keeping with this mentality, all code is released under the MIT.
testfilter 0.0.8
unittest 用例执行过滤， 可选择用例执行环境或用例级别进行过滤

# testfilter
unittest 用例执行过滤， 可选择用例级别或用例级别进行过滤

### 如何使用它?

```shell
>>> pip install testfilter
```


```python

import unittest
from testfilter import runIf, Filter

# 设置执行环境 执行级别
Filter.env = 'test'  # test uat prod/production 不区分大小写
Filter.level = 'p2'  # smoke/p1 p2 p3 p4 不区分大小写


class Demo(unittest.TestCase, metaclass=Filter.Meta):
    @runIf.env.NOT_PROD  # 非正式环境下执行
    def test_001(self):
        self.assertEqual(1, 1)

    @runIf.env.TEST  # 仅在测试环境下执行
    def test_002(self):
        self.assertEqual(1, 1)

    @runIf.env.UAT
    @runIf.env.TEST
    @runIf.level_in.P3   # 测试环境和 UAT 环境下，且用例优先级在 P3 以上执行
    def test_003(self):
        self.assertEqual(1, 1)

    @runIf.level_in.SMOKE
    def test_004(self):
        self.assertEqual(1, 1)


if __name__ == '__main__':

    unittest.main()

```
![image](http://mocobk.test.upcdn.net/image/2019-04-14-112321.jpg)

### 用例环境

| Tag |  英文 | 中文 |
|:----|:------|:-----|
|TEST|Testing|测试|
|UAT|User Acceptance Test|用户验收测试|
|PROD|Production|正式/生产|


### 用例级别
**Level:** 

|SMOKE/P0|P1|P2|P3|P4|
|----|----|----|----|-----|

### [用例级别参考](https://www.jianshu.com/p/4903856cd6c5)

P0/SMOKE 冒烟：

    1、挑一些基本的、带有针对性、关键的用例进行测试，不会很细
    2、划分依据：主流程或者必须实现的功能测试
    3、该级别的测试用例在每一轮版本测试前执行

P1/Level1 基本：

    1、该类用例设计系统基本功能，1级用例的数量应受到控制
    2、划分依据：该用例执行的失败会导致多处重要功能无法运行的，如：表单维护中的增加功能、最平常的业务使用等。可以认为是发生概率较高的而经常这样使用的一些功能用例。
    3、该级别的测试用例在每一轮版本测试中都必须执行

P2/Level2 重要：

    1、2级测试用例实际系统的重要功能。2级用例数量较多。
    2、划分依据：主要包括一些功能交互相关、个种应用场景、使用频率较高的正常功能测试用例
    3、在非回归的系统测试版本中基本上都需要进行验证，以保证系统所有的重要功能都能够正常实现。在测试过程中可以根据版本当前的具体情况进行安排是够进行测试。

P3/Level3 一般：

    1、3级测试用例设计系统的一半功能，3级用例数量也较多。
    2、划分依据：使用频率较低于2级用例。例如：数值或数组的便捷情况、特殊字符、字符串超长、与外部件交互消息失败、消息超时、事物完整性测试、可靠性测试等等。
    3、在非回归的系统测试版本中不一定都进行验证，而且在系统测试的中后期并不一定需要每个版本都进行测试
    
P4/Level4 生僻：如果没有可以不适用该级别

    1、该级别用例一半非常少。
    2、划分依据：该用例对应较生僻的预置条件和数据设置。虽然某些测试用例发现过较严重的错误，但是那些用例的处罚条件非常特殊，仍然应该被植入4级用例中。如界面规范化的测试也可归入4级用例。在实际使用中使用频率非常低、对用户可有可无的功能。
    3、在版本测试中有某些正常原因（包括：环境、人力、时间等）经过测试经理同意可以不进行测试。