semvec/pypi-packages huggingface dataset:
ninpy 0.0.1
Template files for Ninnart Fuengfusin.
License: MIT

# Ninpy #

My collection of reuse-able Python scripts and others.

## Install ##

```bash
python setup.py develop
```

## Unittest ##

```
pytest
```

## Directory ##

```bash
ninpy
├── common.py
├── crypto.py
├── data.py
├── dataset.py
├── datasets
│   ├── cinic10.py
│   ├── imagenet.py
│   ├── __init__.py
│   ├── kitti_road.py
│   └── voc2012.py
├── debug.py
├── experiment.py
├── hw.py
├── hyper.py
├── __init__.py
├── int8.py
├── job.py
├── layer_converter.py
├── log.py
├── losses.py
├── models
│   ├── cifar_resnet.py
│   ├── cifar_vgg.py
│   ├── __init__.py
│   └── small_models.py
├── notify.py
├── quant.py
├── README.md
├── requirement.txt
├── resize.py
├── torch_utils.py
└── yaml2.py
```

## TODO ##

[ ] Reorganize torch2.
    [ ] Adding base module with tensorboard tracking.
    [ ] Dataset with tensorboard add_images.
    [ ] Tensorboard with add_scalars with a dict input.
    [ ] Base dataset with mode "RGB" and "BGR".
    [ ] Base dataset with from_txt and folder.
    [ ] Burst read for all base dataset.
mbd-pay 0.1.4
面包多支付SDK - https://mbd.pub/
License: MIT
Requires Python: >=3.7,<4.0

# mbd-pay


[面包多Pay文档](https://doc.mbd.pub/)
- 封装签名、请求参数与返回值，具体结构参考 [types.py](https://github.com/shaoxyz/mbd_pay/blob/dev/mbd_pay/types.py)
- 支持所有[requests](https://docs.python-requests.org/en/master/)库执行请求时支持的参数，比如 `timeout`


## Quickstart

Install using `pip`:

```shell
$ pip install mbd-pay
```
## Example
```python
from mbd_pay import Client

c = Client(app_id="**", app_key="**")

# 生成获取openid的链接
print("openid_redirect_url: \n", c.get_openid_redirect_url(target_url="baidu.com"))

print(
    "wx jsapi: \n",
    c.wx_jsapi(
        openid="123", description="321", amount_total=100, callback_url="baidu.com"，
    ),
)

print("wx h5: \n", c.wx_h5(description="321", amount_total=100))

print("alipay: \n", c.alipay(url="baidu.com", description="321", amount_total=100))

print("refund: \n", c.refund(order_id="123"))

print("search order: \n", c.search_order(out_trade_no="123"))

```

## Reference
```python
def _handle_req(self, req) -> dict:
    """
    `req` Model to dict, and add sign | 过滤空值、签名、构建请求体
    """
    req = req.dict(exclude_none=True)
    req.update(app_id=self.app_id)
    req.update(sign=sign(req, self.app_key))
    return req
        
def _post(self, _url: str, req, **kwargs):
    """
    build request body for POST, split out requests' kwargs
    :param url: url
    :param req: see ***Req in types.py
    :param kwargs: req + `requests.post`'s kwargs, e.g. timeout=5
    :return:
    """
    body = self._handle_req(req)

    # split out requests' kwargs | 抽离出所有面包多Pay以外的参数，并传递给requests执行实际请求
    other_kwargs = {
        i: kwargs[i] for i in kwargs.keys() if i not in req.__fields_set__
    }

    return requests.post(_url, json=body, **other_kwargs).json()
        
def wx_jsapi(self, **kwargs) -> WeChatJSApiRes:
    """
    see：https://doc.mbd.pub/api/wei-xin-zhi-fu
    :param kwargs: WeChatJSApiReq required fields
        and optional `requests.post`'s kwargs, e.g. timeout=5
    :return: WeChatJSApiRes
    """
    req = WeChatJSApiReq(**kwargs)  # 用kwarg实例化一个WeChatJSApiReq对象
    api = f"{self.domain}/release/wx/prepay"
    res = self._post(api, req, **kwargs)

    return WeChatJSApiRes(**res)  # 用返回值实例化一个WeChatJSApiRes对象
```

## Thanks
  - [Requests](https://docs.python-requests.org/en/master/)
  - [Pydantic](https://pydantic-docs.helpmanual.io/)

## Todos

 - WebHooks

License
----

MIT


**Hell Yeah!**
twobodyproblem 2.0.0
a little simulation for the gravitational two body problem
License: MIT
Requires Python: >=3.8
Keywords: simulation,gravitation,vpython

# Two Body Problem

### a small simulation

**Welcome!**

I wrote a small program in Python to simulate the two body problem.
You type in some parameters, like mass, radius, velocity and distance.
The program will show you a visualization of the simulation.

*This program is command line only. If you want a graphical user interface,
visit [this GitHub page](https://github.com/Two-Body-Problem/twobodyproblem-simulation-python-gui).*

## Table of Contents

[Installation Instructions](#installation-instructions)  
- [via PyPi](#via-pypi)  
- [via GitHub](#via-github)  

[Usage](#usage)
  
## Installation Instructions

*(You may need Microsoft Visual C++ to be able to run the program,
so install it from [here](https://visualstudio.microsoft.com/visual-cpp-build-tools) if needed.)*

### via PyPi

*The Python package manager pip will install the last uploaded version
from the Python Package Index [PyPi](https://pypi.org/project/twobodyproblem).
This will not always be the latest version, so if you want to install all the latest features,
install it from GitHub (see [below](#via-github)).*

1. Make sure [Python](https://www.python.org/downloads) and pip are installed correctly.
1. Run these commands from a command line:
   1. `pip3 install --upgrade pip setuptools wheel`
   1. `pip3 install --upgrade twobodyproblem`
1. Now, the program is runnable with `python -m twobodyproblem` or `python3 -m twobodyproblem`.

### via GitHub

1. Make sure [Python](https://www.python.org/downloads) and pip are installed correctly.
1. Make sure [Git SCM](https://git-scm.com/downloads) is installed correctly.
1. Run these commands from a command line:
    1. `mkdir TwoBody` and `cd TwoBody`
    1. `git clone https://github.com/Two-Body-Problem/twobodyproblem-simulation-python.git`
    1. `pip3 install --upgrade pip setuptools wheel`
    1. `pip3 install twobodyproblem-simulation-python`
1. Now, the program is runnable with `python -m twobodyproblem` or `python3 -m twobodyproblem`.

## Usage

*To learn more about how to run the program with different options,
run `python -m twbodyproblem -h` or `python3 -m twbodyproblem -h` respectively.*

Run the program with `python -m twobodyproblem` or `python3 -m twobodyproblem`.

First, you will have to input *options* and *values*.
The options define the particular behavior of the simulation,
the values define the dimensions (i.e. mass, radius, distance, velocity) of the bodies.

The simulation will start automatically after the last input.

During the simulation, you are able to pause, un-pause and stop the simulation
with the accordingly named buttons below the black rectangle.
The restart button restarts the *whole* program, not just the simulation.

The sliders below the buttons can be used to magnify the bodies in the simulation.
This magnification does not affect the physics, it is only a visual help.

***

*Participation in this README is always welcome!*