08 2021 档案
摘要:平时我们直接使用pip安装库的时候,会下载的特别慢 所以我们会使用 -i参数来指定安装源,但是每次都敲就显得很呆,所以在此奉上永久设置 pip config set global.index-url https://pypi.douban.com/simple pip config set inst
阅读全文
摘要:# 替换各个源 $ git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git $ git -C "$(brew --repo homebrew/core)" remote set-url or
阅读全文
摘要:下载源码包 wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz 依赖安装 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
阅读全文
摘要:首次安装 Homebrew / Linuxbrew 首先,需要确保系统中安装了 bash、git 和 curl,对于 macOS 用户需额外要求安装 Command Line Tools (CLT) for Xcode。 对于 macOS 用户,系统自带 bash、git 和 curl,在命令行输入
阅读全文
摘要:Python3 有一个很好用的第三方库叫 line_profiler 可以分析每行代码的运行时间及占比 安装 pip install line_profiler 使用 # @Coding: utf-8 # @Time: 2021/8/5 3:54 下午 from line_profiler impo
阅读全文
摘要:Socket TCP原语 用Socket进行网络开发需了解服务器和客户端的Socket原语,每个原语在不同的高级语言中都有相应的实现方式. TCP的Socket原语,如图所示.所有基于TCP的Socket通信都遵循如图所示的流程,下面解释每个原语的含义. socket(): 建立Socket对象.
阅读全文
摘要:def resize_image(file_path, max_size): img = cv2.imread(file_path) file_up_path, file_ext = os.path.splitext(file_path) height, width, _ = img.shape n
阅读全文
浙公网安备 33010602011771号