Skip to content

Instantly share code, notes, and snippets.

@wnn
wnn / pve_find-next-id.py
Last active January 17, 2022 16:56
find next avaliable proxmox vm id
import argparse
from proxmoxer import ProxmoxAPI
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='find next available vm id')
parser.add_argument('-s', '--server', required=True, help="proxmox host")
parser.add_argument('-u', '--user', required=True, help="proxmox user name")
parser.add_argument('-p', '--password', required=True, help="proxmox user password")
args = parser.parse_args()
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
from scipy import ndimage
from scipy.misc import imsave, imrotate, imresize
import numpy as np
def main():
fname = 'src.jpg'
all_data = pickle.load(open("notMNIST.pickle", "r"))
print('load complte')
def _transfor(dataset):
dataset = dataset.reshape(dataset.shape[0], dataset.shape[1] * dataset.shape[2])
nrows, ncols = dataset.shape
dtype = {
'names': ['f%d' % i for i in range(ncols)],
'formats': ncols * [dataset.dtype]
}
  1. 打开 https://certbot.eff.org/ 选择对应操作系统与 Web 服务器,选完后出现响应的平台说明。由于我的系统运行在 nginx 及 Ubuntu,选完之后出现的说明地址是 https://certbot.eff.org/#ubuntuxenial-nginx

  2. 执行命令,并根据需要修改相应域名参数。

$ sudo apt-get install letsencrypt
$ letsencrypt certonly --standalone -d dev.nuctech.me
  1. 修改nginx

Keybase proof

I hereby claim:

  • I am wnn on github.
  • I am wunannan (https://keybase.io/wunannan) on keybase.
  • I have a public key whose fingerprint is 38EE EA7C 7025 4EBA 36A6 BDC9 1DA6 EDBA 3971 6EB1

To claim this, I am signing this object:

#! /usr/bin/python
# openssl dhparam -out dh2048.pem 2048
# config example, example.ini
# [general]
# host = wnn.io
# offset = 0
# [arbiter]