摘要: 相关实用命令: 1. 查看进程号(pid)并根据pid查看程序运行目录 ps -ef | grep XXX ll /proc/"pid"/cwd 阅读全文
posted @ 2021-08-31 10:11 公子多情,小姐薄命 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 创建:conda create -n name python=3.7(指定python版本) 切换:conda activate name 退出:conda deactivate 查看环境列表:conda env list 阅读全文
posted @ 2020-11-25 15:55 公子多情,小姐薄命 阅读(114) 评论(0) 推荐(0) 编辑
摘要: shutil.rmtree() 表示递归删除文件夹下所有的子文件夹和文件。 urllib.request.urlretrieve(url, filename=None) 将远程(url地址)数据下载到本地 阅读全文
posted @ 2020-11-02 15:23 公子多情,小姐薄命 阅读(39) 评论(0) 推荐(0) 编辑
摘要: import argparse parser = argparse.ArgumentParser() parser.add_argument('--name', '-n', help="name args", required=True) parser.add_argument('--age', ' 阅读全文
posted @ 2020-09-12 15:23 公子多情,小姐薄命 阅读(131) 评论(0) 推荐(0) 编辑
摘要: """ 存在列表[{"id": "1", "img": "test1"},{"id": "2", "img": "test2"},{"id": "1", "img": "tes3"},{"id": "2", "img": "tes4"}] 使其根据字 阅读全文
posted @ 2020-08-19 18:03 公子多情,小姐薄命 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1、imdecode()与imencode() 图片的解码与编码 """ 图片解码 """ import cv2 import numpy as np import requests image_url = "https://bkimg.cdn.bcebos.com/pic/0823dd54564e 阅读全文
posted @ 2020-08-10 10:32 公子多情,小姐薄命 阅读(145) 评论(0) 推荐(0) 编辑
摘要: import hashlib sign_msg = "password" #可以拼接id,时间和key等信息 sign_svr = hashlib.sha1(sign_msg.encode(encoding='utf-8')).hexdigest() 阅读全文
posted @ 2020-08-07 16:38 公子多情,小姐薄命 阅读(77) 评论(0) 推荐(0) 编辑
摘要: vim ~/.bashrc 添加:LANG="en_US.UTF-8" source ~/.bashrc 搞定! 阅读全文
posted @ 2020-08-01 15:54 公子多情,小姐薄命 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Ansible命令行参数解析 Define and run a single task 'playbook' against a set of hosts positional arguments: pattern host pattern optional arguments: --ask-vau 阅读全文
posted @ 2020-07-02 20:48 公子多情,小姐薄命 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 一、OpenResty安装 官网下载相应版本源码包:http://openresty.org/en/download.html 1 #准备编译环境 2 yum install pcre-devel openssl-devel gcc curl(centos) 3 apt-get install li 阅读全文
posted @ 2020-07-01 18:01 公子多情,小姐薄命 阅读(306) 评论(0) 推荐(0) 编辑