文章分类 -  Python-b-扩展

摘要:用户 --> 相同的密码 --> 不同的md5 hash()值 -- >加点 salt 例如:库中的数据 {"id": 1000, "password": "5715073b5c60542dd47d0c11966e0621", "salt": "q<h5pL+_", "balance": 99251 阅读全文
posted @ 2018-03-06 22:05 Alice的小屋 阅读(590) 评论(0) 推荐(0) 编辑
摘要:lambda 的高级应用: 1 # CASE 1 2 fs = map(lambda i:(lambda j: i*j), range(6)) 3 print([f(2) for f in fs]) 4 5 # CASE 2 6 fs = [lambda j:i*j for i in range(6 阅读全文
posted @ 2018-03-06 17:38 Alice的小屋 阅读(215) 评论(0) 推荐(0) 编辑
摘要:带参数的装饰器:@wraps() 1 import time 2 from functools import wraps 3 4 def time_fun(type): 5 def outter(func): 6 @wraps(func) #可以得到原始函数add的原始信息 7 def inner( 阅读全文
posted @ 2018-03-06 17:33 Alice的小屋 阅读(180) 评论(0) 推荐(0) 编辑
摘要:import chardet f = open('ss.txt', 'rb') result = chardet.detect(f.read()) print(result){'encoding': 'GB2312', 'confidence': 0.99, 'language': 'Chinese 阅读全文
posted @ 2018-03-05 20:37 Alice的小屋 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Jogn.yaml 1 name: John Smith 2 age: 37 3 spouse: 4 name: Jane Smith 5 age: 25 6 children: 7 - name: Jimmy Smith 8 age: 15 9 - name: Jeny Smith 10 age: 阅读全文
posted @ 2018-03-05 20:11 Alice的小屋 阅读(298) 评论(0) 推荐(0) 编辑
摘要:https://konghq.com/install/pythonhttp://www.devopsedu.com/front/couinfo/79 这里https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3 阅读全文
posted @ 2018-03-05 18:51 Alice的小屋 阅读(1006) 评论(0) 推荐(1) 编辑
摘要:python idle 清屏shell窗口: 1.下载 clearwindow.py (https://bugs.python.org/file14303/ClearWindow.py)2.存放到C:\Users\bj\AppData\Local\Programs\Python\Python36\L 阅读全文
posted @ 2018-02-01 20:31 Alice的小屋 阅读(265) 评论(0) 推荐(0) 编辑
摘要:python开始: 计算机只识别 二进制 0 1 0 1 人类写的英文(编程) 被识别成 二进制 让计算机帮我们干活 机器语言(0 1) 汇编语言(指令 mov edx,len int 0x80) 高级语言(c/c++/java/python/php/go/c#) 高级语言 转换为 二进制 被计算机 阅读全文
posted @ 2018-02-01 15:34 Alice的小屋 阅读(546) 评论(0) 推荐(0) 编辑
摘要:英语+技术 美国的自动化;Tesla的创始人;Martin Eberhard / 马丁.艾伯哈德 波士顿机器人:https://www.bostondynamics.com/atlas Google:Mobile first to AI first程序员终将统治世界!程序员+算法工程师+科学家 编程 阅读全文
posted @ 2018-02-01 15:28 Alice的小屋 阅读(344) 评论(0) 推荐(0) 编辑