vmware 的 dns 问题 导致 git pull失败:
nslookup github.com
github.com
的 DNS 解析是否正确,确认是否返回 GitHub 的真实 IP(如 20.205.243.166
)。echo "nameserver 8.8.8.8" > /etc/resolv.conf
github.com
指向 127.0.0.1
。ssh-keygen -f "/root/.ssh/known_hosts" -R "github.com"
ssh -T git@github.com
yes
后即可正常认证。更离谱的是,有时候这个文件只是软连接,可以看看这样:
bash展开代码ls -l /etc/resolv.conf
sudo rm /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf
sudo chattr +i /etc/resolv.conf # 锁定文件(防止被覆盖)
sudo systemctl stop systemd-resolved # 禁用 systemd-resolved(可选)
sudo systemctl disable systemd-resolved
在 Ubuntu 服务器上执行以下命令:
bash展开代码# 安装必要的包
sudo apt update
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
# 添加 Caddy 官方 GPG 密钥
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
# 添加 Caddy 仓库
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
# 安装 Caddy
sudo apt update
sudo apt install caddy
/.well-known/acme-challenge/
路径发送HTTP请求验证域名控制权清理无用镜像/容器/卷/网络
使用以下命令一键清理所有未被使用的资源(包含停止的容器、悬空镜像、未使用的网络和卷):
bash展开代码docker system prune -a --volumes
-a
:删除所有未被容器引用的镜像(不仅仅是悬空镜像)。--volumes
:删除未被使用的卷(⚠️ 确保卷中无重要数据!)。单独清理不同资源
停止的容器:
bash展开代码docker container prune
悬空镜像(未被任何容器引用):
bash展开代码docker image prune
未被使用的卷:
bash展开代码docker volume prune
构建缓存(Builder Cache):
bash展开代码docker builder prune
在 VMware 中扩容虚拟磁盘后,Linux 系统并不会自动识别新增的空间,需要手动扩展分区和文件系统。本教程以 GPT 分区表 + ext4/xfs 文件系统为例,详细介绍如何安全扩展 /dev/sda3
分区,使其占用全部可用空间。
sudo
bash展开代码echo "nameserver 8.8.8.8" > /etc/resolv.conf
看是否可以正常解析:
bash展开代码nslookup github.com
确定里面没有乱指:
bash展开代码vim /etc/hosts
一个极其快速的 Python 包和项目管理工具,用 Rust 编写。
我们在日常开发中,经常要用到这些工具:
pip
:安装依赖pipx
:安装命令行工具poetry
或 rye
:管理项目和虚拟环境pyenv
:切换 Python 版本virtualenv
:创建虚拟环境pip-tools
:锁定依赖版本twine
:发布包临时有效:
展开代码export http_proxy="http://127.0.0.1:10828" export https_proxy="http://127.0.0.1:10828" sudo -E apt update # -E 保留环境变量 sudo -E apt upgrade
该文章已加密,点击 阅读全文
并输入密码后方可查看。
12:15:modules/async_worker.py展开代码def apply_outpaint(async_task, inpaint_image, inpaint_mask): if len(async_task.outpaint_selections) > 0: H, W, C = inpaint_image.shape if 'top' in async_task.outpaint_selections: inpaint_image = np.pad(inpaint_image, [[int(H * 0.3), 0], [0, 0], [0, 0]], mode='edge') inpaint_mask = np.pad(inpaint_mask, [[int(H * 0.3), 0], [0, 0]], mode='constant', constant_values=255)
匈牙利算法(Hungarian Algorithm)是一种用来解决**"最佳分配问题"的数学方法。它的核心任务是:"如何用最低成本,把N个任务分配给N个人,让总成本最小?"**(或者反过来,让收益最大)。
的问题:
cpp展开代码// 从 src/openpose/net/netCaffe.cpp:218 可以看到
if (inputData.getNumberDimensions() != 4 || inputData.getSize(1) != 3)
error("The Array inputData must have 4 dimensions: [batch size, 3 (RGB), height, width].");
输入张量形状: [batch_size, 3, height, width]
batch_size
: 批次大小,通常为13
: RGB三通道height, width
: 图像的高度和宽度CDP(Consensus-Driven Propagation)是一种高效的大规模无标签人脸聚类方法。该方法通过投票机制和图传播算法,实现对人脸特征的快速准确聚类。CDP具有线性时间复杂度,能够处理大规模数据集,并在保持高精度的同时提供出色的聚类性能。