摘要: python正则表达式模块,拆分字符串,re.split() eg: s = '1, 2, 3, 4' 拆分组成数字list: strs = re.split(', ', s); print(strs); 结果:['1', '2', '3', '4'] 转成int行list: strs = list 阅读全文
posted @ 2018-05-18 19:24 Apollo_zhanghongbo 阅读(3095) 评论(0) 推荐(0) 编辑
摘要: 格式 描述%% 百分号标记 #就是输出一个%%c 字符及其ASCII码%s 字符串%d 有符号整数(十进制)%u 无符号整数(十进制)%o 无符号整数(八进制)%x 无符号整数(十六进制)%X 无符号整数(十六进制大写字符)%e 浮点数字(科学计数法)%E 浮点数字(科学计数法,用E代替e)%f 浮 阅读全文
posted @ 2018-05-18 19:23 Apollo_zhanghongbo 阅读(341) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/gatieme/article/details/51673229 scp remote_user_name@remote_ip:remote_file_path local_path 阅读全文
posted @ 2018-05-18 19:22 Apollo_zhanghongbo 阅读(1002) 评论(0) 推荐(0) 编辑
摘要: from scipy import sparse sparse.save_npz('./filename.npz', csr_matrix_variable) #保存 csr_matrix_variable = sparse.load_npz('path.npz') #读 参考: https://b 阅读全文
posted @ 2018-05-18 19:22 Apollo_zhanghongbo 阅读(4430) 评论(0) 推荐(1) 编辑
摘要: 用pickle保存中间变量: with open('path/file_name.pickle', 'wb') as handle: pickle.dump(variable_name, handle, protocol=2) 用pickle读取中间变量: with open('path/file_ 阅读全文
posted @ 2018-05-18 19:21 Apollo_zhanghongbo 阅读(1364) 评论(0) 推荐(0) 编辑