欢迎来到我的技术笔记
主要记录:
- 计算机图形学
- 数学
欢迎来到我的技术笔记
主要记录:
Python 深度进阶:元类 (Metaclass) 与属性查找机制解析
cmake理解
常见三维模型数据结构分析
为什么需要 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 扩展是官方出品,体验最流畅。 ...
ENU/ECEF/WGS84坐标系理解
spring源码理解bean生命周期