Python 深度进阶:元类 (Metaclass) 与属性查找机制解析

Python 深度进阶:元类 (Metaclass) 与属性查找机制解析

2025年12月20日 · 5 分钟 · 1001 字 · elliot

Cmake理解

cmake理解

2025年12月19日 · 1 分钟 · 90 字 · elliot

常见三维模型数据结构分析

常见三维模型数据结构分析

2025年12月19日 · 0 分钟 · 0 字 · elliot

DevContainer 实践:VS Code vs JetBrains 深度对比

为什么需要 DevContainer 作为 GIS 后端开发,我经常遇到这些痛点: 环境依赖复杂:Python + C++ 扩展(GDAL、Shapely)编译环境难以统一 团队协作困难:「在我电脑上能跑」成为日常 迁移成本高:换电脑或服务器部署时重新折腾环境 DevContainer 的核心思想很简单:把开发环境装进容器,代码挂载进去,IDE 连进去开发。 我的测试配置 devcontainer.json { "name": "Python Development Container", "dockerComposeFile": "../docker-compose.yml", "service": "app", "workspaceFolder": "/app", "customizations": { "vscode": { "extensions": [ "ms-python.python", "ms-python.vscode-pylance", "ms-python.black-formatter" ], "settings": { "python.defaultInterpreterPath": "/usr/local/bin/python", "editor.formatOnSave": true } } }, "postCreateCommand": "pip install --upgrade pip", "forwardPorts": [5000], "remoteUser": "root" } docker-compose.yml version: '3.8' services: app: image: mpython:latest container_name: python-dev ports: - "5001:5000" volumes: - .:/app - vscode-server:/root/.vscode-server # 持久化 VS Code Server environment: - PYTHONUNBUFFERED=1 working_dir: /app stdin_open: true tty: true command: sleep infinity volumes: vscode-server: name: vscode-server Dockerfile FROM python:3.11-slim WORKDIR /app RUN apt-get update && apt-get install -y \ build-essential git curl vim \ openssh-server openssh-client \ && mkdir -p /run/sshd \ && ssh-keygen -A \ && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \ && echo 'root:yourpassword' | chpasswd \ && rm -rf /var/lib/apt/lists/* ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt EXPOSE 5000 22 CMD ["/usr/sbin/sshd", "-D"] VS Code:原生支持,体验丝滑 VS Code 的 Dev Containers 扩展是官方出品,体验最流畅。 ...

2025年12月14日 · 2 分钟 · 356 字 · elliot

ENU/ECEF/WGS84坐标系理解

ENU/ECEF/WGS84坐标系理解

2025年12月6日 · 2 分钟 · 376 字 · elliot

spring源码理解bean生命周期

spring源码理解bean生命周期

2025年12月6日 · 3 分钟 · 498 字 · elliot