单线程下载文件: import requestsimport timefrom hashlib import md5def down_load_pic(url): req = requests.get(url) m = md5(url.encode()) with open(m.hexdigest( ...
分类:
编程语言 时间:
2020-06-03 16:01:34
阅读次数:
72
问题1:对接物理机,ironic node在nova的hypervisor中无法显示CPU、RAM等信息,全是0。 注:该ironic node是使用fake driver创建的。 相关概念: 在裸金属场景下,ironic node在nova侧的概念就是hypervisor,用于承载用户实例的一种资 ...
分类:
其他好文 时间:
2020-06-03 15:30:52
阅读次数:
83
常常自己写一个dll组件之后,交付网页使用时,需要提供组件的GUID,然而当打开IDL文件时才发现少则三四个的UUID,不知道哪个才是页面需要的 略作总结发现: 1.据经验总结:一般是 coclass 定义前边最近的一个uuid。 2.这个uuid有时候是control 声明的(vs2019前建的组 ...
分类:
其他好文 时间:
2020-06-02 19:20:17
阅读次数:
88
1.请求端 def home(request): """ 首页 """ # return render(request, 'home_application/index_home.html') bk_time = str(int(time.time())) bk_data = md5((bk_tim ...
分类:
其他好文 时间:
2020-06-02 13:06:05
阅读次数:
144
1 import java.io.UnsupportedEncodingException; 2 import java.security.MessageDigest; 3 import java.security.NoSuchAlgorithmException; 4 import java.ut ...
分类:
系统相关 时间:
2020-06-01 14:08:43
阅读次数:
71
原因16.04升级到18.04 解决方法。 open /etc/initramfs-tools/conf.d/resume replace RESUME=UUID=xxx with RESUME=none issue sudo update-initramfs -u reboot your syst ...
分类:
其他好文 时间:
2020-06-01 13:36:12
阅读次数:
88
hashlib — Secure hashes and message digests — Python 3.8.3 documentation https://docs.python.org/3.8/library/hashlib.html#randomized-hashing BLAKE2 ht ...
分类:
其他好文 时间:
2020-05-29 21:26:06
阅读次数:
81
https://wx2.qq.com/?&lang=zh_CN /** * 启动二维码登录 */ function doQrcodeLogin() { loginFactory.getUUID().then(function (uuid) { utilFactory.log('login',uuid ...
分类:
其他好文 时间:
2020-05-29 13:27:07
阅读次数:
62
# UUID 生成唯一ID # uuid 是Python内置模块,主要有五种算法。 import uuid # uuid1() 基于时间戳 a1 = uuid.uuid1() print('uuid1():', a1) # uuid2() 基于分布式计算环境DCE(Python中没有这个函数方法) ...
分类:
编程语言 时间:
2020-05-29 12:06:40
阅读次数:
100