MoreRSS

site iconjdhao修改

在德国的机器学习工程师。在 NumPy、OpenCV 和 PIL 等工具以及 Matplotlib 等数据可视化工具方面经验丰富。
请复制 RSS 到你的阅读器,或快速订阅到 :

Inoreader Feedly Follow Feedbin Local Reader

jdhao的 RSS 预览

Return Different Values for Each Call of A Mock

2026-04-01 01:10:40

When unit-testing a function that make multiple external calls/requests, we want to mock the actual call and return the mock results. For each call, we might want to return different results.

Migrate Python Project from Pip to Uv

2026-03-28 02:12:27

Previously, our projects are still using the old Python 3.10, which will be deprecated soon this year. We are also using the good old pip and venv for the project/package management. This is already posing some issues for us:

  • venv is a pure virtual env tool without the ability to manage python versions (it just picks your local python), so it is hard to enforce the local env of each developer
  • pip’s requirements.txt is not a lockfile and thus does not ensure a fully reproducible python environment
  • pip as a package management tool is not performant enough in resolving and installing packages

In order to solve these problems, I took the effort to migrate our project management to uv. Here are some of the things that I learned in the process as a first-time uv user.

德语常用不规则动词

2026-02-15 23:06:55

葱油鸡腿制作

2026-02-08 05:21:02

Check Trailing White Spaces in Your Project

2025-12-20 01:19:30

When I am working on a Python project, I am using black to format the code, so that we have a unified format across the code base.

One pain point, however, is the super annoying trailing white spaces:

  1. black can remove trailing spaces for doc string, code and comment, but it will not touch trailing spaces in, e.g., multi-line strings.

菜谱:茄子肉丁

2025-11-20 05:06:06