semvec/pypi-packages huggingface dataset:
xiaobaiapi 0.1.1
xiaobaiapi 让接口测试起来更简单、人性化、更好玩  公众号：小白科技之窗
Requires Python: >=3.6
Keywords: test api autoapi xiaobai xiaobaiapi httpclient

# xiaobaiapi

## 介绍
让接口测试起来更简单、人性化、更好玩  
公众号：小白科技之窗

### 接口测试需要接口的痛点：
- 接口文档的导入：swagger、har、curl
- 接口信息头：支持长字符串
- 接口断言：支持jsonpath与正则断言
- 接口数据：支持jsonpath提取数据

## 软件架构
    python3.* + requests + jmespath + pytest + pytest-HTML

## 安装教程
- 更新下载源
    `pip config set global.index-url https://pypi.douban.com/simple`
    
- 安装xiaobaiapi
    `pip install -U xiaobaiapi`

## 使用说明

```
from xiaobaiapi.xiaobaiapi import RequestClient


# 断言的案例
RequestClient(method='GET', url='http://127.0.0.1:8000', assertExpression='code', assertValue=200)

# 提取器的案例，提取的值存储在r.variable对象中
r = RequestClient(method='GET', url='http://127.0.0.1:8000/api/gettoken', extractorExpression='data.token', extractorVariable='token')
print(r.variable)

```


## 日志
| 版本 | 信息 |
| --- | --- |
| 0.1 | 完成单个接口断言及提取器 |
| 0.1.1 | fix |
gitfunctions 0.0.3
Lib for git functions

# GIT Functions

[PT] Lib para funções do git.<br>
[EN] Lib for git functions.


## Funcionalidades:
* Checar se existem modificações

## Como usar:

### Instalação
```
    pip install gitfunctions
```

### Exemplo
```
    from gitfunctions import gitfunctions

    git = gitfunctions.Git(repo_path='C:\\pasta_projeto')
    git.check_updates()
```

### Links:
[![Badge](https://img.shields.io/static/v1?label=Acesse&message=o%20site&color=yellowgreen)](https://github.com/strapbooll/git_functions)
pysirix 0.5.3
The SirixDB Python SDK
Requires Python: >=3.7

# sirix-python-client

### The home of the SirixDB python client

This package is currently in alpha stage.

The python client supports both sync and async programs.

The api docs can be found [here](https://pysirix.readthedocs.io/).
The api docs can also be built locally with the following:
```bash
cd docs
make html
```


Some example code:
```python
from pysirix import sirix_sync, DBType, Insert
from httpx import Client

client = Client(base_url="http://localhost:9443")
sirix = sirix_sync("admin", "admin", client)

db = sirix.database("json-diff", DBType.JSON)
db.create()

resource = db.resource("json-resource")
resource.create(
    {
        "foo": ["bar", None, 2.33],
        "bar": {"hello": "world", "helloo": True},
        "baz": "hello",
        "tada": [{"foo": "bar"}, {"baz": False}, "boo", {}, []],
    }
)

resource.update(4, {"new": "stuff"}, insert=Insert.RIGHT)
```

Or with Async Support:
```python
from pysirix import sirix_async, DBType, Insert
from httpx import AsyncClient
import asyncio


async def main():
    client = AsyncClient(base_url="http://localhost:9443")
    sirix = await sirix_async("admin", "admin", client)
    
    db = sirix.database("json-diff", DBType.JSON)
    await db.create()
    
    resource = db.resource("json-resource")
    await resource.create(
        {
            "foo": ["bar", None, 2.33],
            "bar": {"hello": "world", "helloo": True},
            "baz": "hello",
            "tada": [{"foo": "bar"}, {"baz": False}, "boo", {}, []],
        }
    )
    
    await resource.update(4, {"new": "stuff"}, insert=Insert.RIGHT)

loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.run(main()))
```

# pysirix-shell

## Installing

If you are not installing pysirix as part of a project, the
preferred install method is to use [pipx](https://github.com/pipxproject/pipx/):

```sh
pipx install pysirix
```

## Configuring

In your home directory, create a folder named `pysirix-shell`, and create a file named `config.json` in this folder. This file will hold the configuration for the shell. It should have the following form:

```json
{
    "localhost": {
        "url": "http://localhost:9443",
        "username": "admin",
        "timeout": 4
    },
    "cloud": {
        "url": "https://sirix-demo.com:9443",
        "username": "administrator"
    }
}
```

The timeout field is optional, and defaults to 5 (seconds).
pyndustry 0.1.2
description
Requires Python: >=3.6
Keywords: mindustry

Hey, this is lib can like this:

```python
from pyndustry.pyndustry import *

storage = CommandsStorage()
Mprint('Hello world!', 'message1')
storage.convert()
```

Output:
```mindustry
printflush message1
print "Hello world!"
```



and like this:
```python
from pyndustry.pyndustry import *
from pyndustry.memory import *

storage = CommandsStorage()
mem = MemoryStorage('cell1')
Mif(mem[0] > 10,
	Function(lambda :
		Mprint('Wow', 'message1'))) \
.apply()
End()
storage.convert()
```

Output:
```mindustry
read memoryStorageResult__cell1 cell1 0
jump 3 greaterThan memoryStorageResult__cell1 10
jump 5 always x false
printflush message1
print "Wow"
end
```


and 
```python
from pyndustry.pyndustry import *
from pyndustry.graphics import *

storage = CommandsStorage()
display = Display('display1')
display.bind()
display.drawGameSprite(0.5, 0.5, sprites.blocks.router, 16, byCoefficient=True)
storage.convert()
```

Output:
```mindustry
drawflush display1
draw image 40.0 40.0 @router 16 0 0
```
p-stable-lsh-python 0.0.3
A 1&2-stable Locality-Sensitive Hashing implementation in Python
Requires Python: >=3.6

# P-stable-LSH

The package is one implementation of paper Locality-Sensitive Hashing Scheme Based on p-Stable Distributions in SCG’2014. P-stable-lsh a novel Locality-Sensitive Hashing scheme for the Approximate Nearest Neighbor Problem under $L_p$ norm, based on p-stable distributions.

Note: This code is used as the practice of the paper, and there are few optimizations. Sharing is for communication and learning. If it is a high-performance scenario, please optimize as appropriate.

## Installation

```bash
pip install p-stable-lsh-python
```

## Usage

### Example

The following example shows all features of the package, If you want to know the details, please refer to the source code and comments.

```python
import numpy as np
import p_stable_lsh.pstable as psl

dim = 100 # vector dimension
data = [np.random.random(dim) for _ in range(2)] # generate two vectors

r = 50.0 # the parameter $r$ in paper

m1 = psl.pstable(r, dim, metric_dim=1)
m1.lsh(data[0])
m2 = psl.pstable(r, dim, metric_dim=1)
m2.lsh(data[1])
print(m1.md(m2)) # estimate value
print(m1.p(np.average(sum(np.abs(data[0]-data[1]))))) # theoretical(true) value

m1 = psl.pstable(r, dim, metric_dim=2)
m1.lsh(data[0])
m2 = psl.pstable(r, dim, metric_dim=2)
m2.lsh(data[1])
print(m1.md(m2)) # estimate value
print(m1.p(np.sqrt(sum([i**2 for i in data[0]-data[1]])))) # theoretical(true) value
```

### Use case

Define the parameter $r$ and vector dimension for preparing the test data:

```python
import numpy as np
import p_stable_lsh.pstable as psl
r = 50.0 # the parameter $r$ in paper
dim = 100 # vector dimension
data = [np.random.random(dim) for _ in range(3)] # generate two vectors
```

Instantiate `pstable` object with specific dimension space. ($L_1$ for example)

```python
m1 = psl.pstable(r, dim, metric_dim=1)
m2 = psl.pstable(r, dim, metric_dim=1)
```

Hash vectors with p-stable LSH function.

```python
m1.lsh(data[0])
m2.lsh(data[1])
```

Estimate distance between two object.

```python
m1.md(m2) # estimate value
```

Show the ground truth distance probability using integration shown in paper.

```python
l1_distance = np.average(sum(np.abs(data[0]-data[1])))
m1.p(l1_distance)
```

Another way to instantiate `pstable` object with hash values.

```python
m3 = psl.pstable(r, dim, metric_dim=1, hashvalues=m1.hashvalues)
m3.md(m2)
```

Update object hash values with different vector.

```python
m2.lsh(data[2])
m3.md(m2)
```

### Parameters

The parameter $r$ in paper determines the relationship between the distance (in metric space) between vectors and the probability of collision (the `.md` method). The following shows different probability results varied by $r$.

#### L1 metric space

Data points code

```python
import p_stable_lsh.pstable as psl
r_list = [10, 30, 50, 100, 300, ]
result = []
for r in r_list:
    tmp = []
    m = psl.pstable(r, dim, metric_dim=1)
    for i in range(1, 800):
        tmp.append(m.p(i))
    result.append(tmp)
```

![benchmark in L1 distance](./benchmark/l1.png)

#### L2 metric space

![benchmark in L2 distance](./benchmark/l2.png)