semvec/pypi-packages huggingface dataset:
pistonapi 1.0.1
Unofficial Piston API Wrapper for Python

# Piston API Wrapper for Python

This is a very simple API Wrapper for the [Piston API](https://github.com/engineer-man/piston).  
The Piston API documentation can be found [here](https://github.com/engineer-man/piston#Public-API).


## Installation
```sh
pip install pistonapi
```

or
```sh
python setup.py build
python setup.py install
```


## Usage Example

```python
from pistonapi import PistonAPI

# Create a new Piston API instance
piston = PistonAPI()

# Get all the supported languages
print(piston.languages)
# OR
print(piston.runtimes)

# Execute your own code!
code = 'print("Hello, World!")'
print(piston.execute(language="py", version="3.9", code=code))
```
notion-readonly 0.0.29
Unofficial Python API client for Notion.so
Requires Python: >=3.5

# notion_readonly

Fork of <https://github.com/jamalex/notion-py> with a couple of features
stripped down for better readabilty and less dependencies.

Send an email to <cyber@sysrq.in> if you find any bugs.

## Quickstart

```python
from notion_readonly.client import NotionClient

client = NotionClient()

# Replace this URL with the URL of the page you want to edit
page = client.get_block("https://www.notion.so/myorg/Test-c0d20a71c0944985ae96e661ccc99821")

print(page.title)
for child in page.children:
    print("*", child.title)
```
pylong 0.0.0
use yaml to combination params for pytest collect test cases
Requires Python: >=3.7

# dl_cms

**test framework powered by pytest**  

- `common`文件夹，可放置跨项目的通用型脚本，作为共享目的
- `test`文件夹，每个项目独立一份子文件夹（可嵌套多层），DEMO项目子文件夹的内部结构如下

# basic struct  

- config   
> 全局配置 host 、db、log   

- data   
> 用例数据，如输入参数、参数模板（针对复杂参数使用）、其他数据（image、export、cookies）  
> 每个参数的有效用例和无效用例可分开编写，会按照一定方式组合为param_list  

- test_suits
> 用例编写（1、读取参数列表 2、调用interface对象 3、结果处理 4、断言  ） 
 
- demo.py
> 化所有待测接口为对象  （名称为自己的项目名称）

- run.py
> 按需执行用例计划，生成报告

# write testcase step  

**前提条件**  

- 测试用例（单个接口的详细的入参和出参设计，多个接口的调用依赖流程） 

- data，准备每个接口的测试数据（eg. cookies、input_loads)

![steps](doc/simple_architecture_1.0.jpg)

**步骤**

- config，修改host、db

- demo.py， 修改文件名，封装待测接口

- test_suits/conftest.py （可选）
> 通常，需准备测试环境的脚本（setup、teardown）   
> 特殊地，需二次格式化参数，二次格式化输出，以及复杂断言的脚本  

- test_suits/test_xx.py  
> 调用接口和conftest.py， 编写用例

- suit/run.py （可选） 
> 定义要执行的接口测试，运行即自动产生测试报告  

![allure-report example](http://f.shopee.co.id/file/57650ddf4085344c59d1d77fb0fabb78)

# 对接自动化测试平台

- 在平台上新建项目，输入git地址、项目路径（以tests目录为基准的相对路径， 如DEMO就是demo项目的路径）

- 在平台上导入用例，选择用例执行即可
FieldTracing 0.0.3
A package containing simple algorithms for field tracing.

# FieldTracing

This is a very simple Python module to trace fields (e.g. magnetic fields) when provided with a model.

## Installation

Install using `pip3`:

```bash
pip3 install --user FieldTracing
```

Or by cloning this repo:

```bash
#clone the repo
git clone https://github.com/mattkjames7/FieldTracing
cd FieldTracing

#Either create a wheel and use pip: (X.X.X should be replaced with the current version)
python3 setup.py bdist_wheel
pip3 install --user dists/FieldTracing-X.X.X-py3-none-any.whl

#Or by using setup.py directly
python3 setup.py install --user

```

## Usage

There are two tracing routines in this model: `FieldTracing.Euler.EulerTrace` - this is the most basic tracing routine, which will step in the direction of the field using the Eurler method; `FieldTracing.RK4.RK4Trace` - this uses the 4th order Runge-Kutta method. If you are tracing any non-linear field, the `RK4` method would most likely be the better choice.

For more information about keywords and arguments supplied to each function:

```python
import FieldTracing as ft

ft.RK4.RK4Trace?
ft.Euler.EulerTrace?
```



Below is an example trace using the `KT17` model field module (see https://github.com/mattkjames7/KT17).

```python
import KT17
import FieldTracing as ft
import matplotlib.pyplot as plt

#define a model field function which will accept a vector position and return a field vector
def modelfunc(p):
    #accepts position with chape (3,)
    B = KT17.ModelField(p[0],p[1],p[2])
    #return field with shape (3,)
    return np.array(B).flatten()

#define a function which says whether we are within some acceptable tracing bounds
def boundsfunc(p):
    #check if we are within the planet (note that Mercury has a vertical dipole offset)
    r = np.sqrt(p[0]**2 + p[1]**2 + (p[2]+0.196)**2)
    #we want this to terminate at the surface of the iron core, so we should return True as long as r > 0.83
    return r > 0.83

#call the field tracing function, from some initial position
x0 = [1.2,0.0,0.0]
Tr = ft.RK4.RK4Trace(x0,0.02,modelfunc,bounds=boundsfunc)
Te = ft.Euler.EulerTrace(x0,0.02,modelfunc,bounds=boundsfunc)

#call the built-in KT17 trace
T = KT17.TraceField(*x0,LimType=17)

#plot to compare
a = np.arange(361)*np.pi/180.0
x = np.cos(a)
z = np.sin(a) - 0.196
xc = 0.83*np.cos(a)
zc = 0.83*np.sin(a) - 0.196
plt.figure()
ax = plt.subplot2grid((1,1),(0,0))
ax.plot(x,z,color=[0.0,0.0,0.0,0.7],label='Mercury Surface',lw=4)
ax.plot(xc,zc,color=[0.5,0.5,0.5,0.7],label='Mercury Core',linestyle='--',lw=4)
ax.plot(Tr[:,0],Tr[:,2],color='red',label='FieldTrace (RK4)')
ax.plot(Te[:,0],Te[:,2],color='lime',label='FieldTrace (Euler)')
ax.plot(T.x,T.z,color='blue',label='KT17.TraceField',linestyle=':')
ax.set_xlabel('$x_{MSM}$')
ax.set_ylabel('$z_{MSM}$')
ax.set_aspect(1.0)
ax.legend()
```

Which should produce this:

![](Example.png)