semvec/pypi-packages huggingface dataset:
xml2pytorch 0.0.10
Using xml to define pytorch neural networks

# xml2pytorch
Using xml to define pytorch neural networks
## What can it Do
With xml2pytorch, you can easily define neural networks in xml, and then declare them in pytorch.

RNN and LSTM are not supported currently.
## Installation
### Environment
OS independent. Python3. (Not tested on Python2, but it should work.)
### Install requirements
torch>=0.4.1
numpy>=1.15.1
### Installing by pip3
pip3 install xml2pytorch
## Quick Start
### How to declare the CNN defined by a xml file
```
import torch
import xml2pytorch as xm

# declare the net defined in .xml
net = xm.convertXML(xml_filename)    

# input a random tensor
x = torch.randn(1, 3, 32, 32)
y = net(x)
print(y)
```
### How to define a simple CNN in xml
```
<graph>
	<net>
		<layer>
			<net_style>Conv2d</net_style>
			<in_channels>3</in_channels>
			<out_channels>6</out_channels>
			<kernel_size>5</kernel_size>
		</layer>	
		<layer>
			<net_style>ELU</net_style>
		</layer>	
		<layer>
			<net_style>MaxPool2d</net_style>
			<kernel_size>2</kernel_size>
			<stride>2</stride>
			<activation>logsigmoid</activation>
		</layer>
		<layer>
			<net_style>Conv2d</net_style>
			<in_channels>6</in_channels>
			<out_channels>16</out_channels>
			<kernel_size>5</kernel_size>
			<activation>relu</activation>
		</layer>	
		<layer>
			<net_style>MaxPool2d</net_style>
			<kernel_size>2</kernel_size>
			<stride>2</stride>
			<activation>relu</activation>
		</layer>
		<layer>
			<net_style>reshape</net_style>
			<dimensions>[-1, 16*5*5]</dimensions>
		</layer>
		<layer>
			<net_style>Linear</net_style>
			<in_features>400</in_features> 
			<out_features>120</out_features>
			<activation>tanh</activation>
		</layer>
		<layer>
			<net_style>Linear</net_style>
			<in_features>120</in_features> 
			<out_features>84</out_features>
			<activation>sigmoid</activation>
		</layer>
		<layer>
			<net_style>Linear</net_style>
			<in_features>84</in_features>
			<out_features>10</out_features>
			<activation>softmax</activation>
		</layer>
	</net>
</graph>
```
py-pay 1.3.0
Python pay library: alipay, wechat, etc.

### py-pay
Python pay library.
```
pip install -U py-pay
```

#### 微信支付
```
from py_pay.wechat import WechatPay
wechat_conf = {
    'app_id': 'appid',
    'mch_id': '商户号',
    'key': '签名key',
    # 需要双向证书的配置下面两行
    # 'cert_file': '/path/to/cert_file',
    # 'cert_key': '/path/to/cert_key',
}
wechat_pay = WechatPay(**wechat_conf)

# 示例
params = {'foo': 'bar'}
wechat_pay.unifiedorder(params)  # 统一下单
wechat_pay.orderquery(params)  # 查询订单
wechat_pay.closeorder(params)  # 关闭订单
wechat_pay.refund(params)  # 申请退款
wechat_pay.refundquery(params)  # 退款查询
wechat_pay.pay_notify(request.body)  # 支付通知
wechat_pay.response(False, '签名失败')  # 支付通知

wechat_pay.promotion_transfers(params)  # 企业付款
```