Better Python Project Maintenance

This article introduces two major pain points in Python project maintenance and their solutions: 1) Passwordless publishing using PyPI’s Trusted Publishers with GitHub Actions, and 2) Ultra-fast dependency locking with the uv tool. It also discusses version management when depending on machine learning frameworks like PyTorch, providing specific configuration examples.

 · 4 min · 676 words · ringsaturn

What Does the Python Version Number x.y Actually Mean?

At work, we use uv to manage Python projects, which allows us to quickly install dependencies and lock sub-dependency versions. After returning from a period of leave, I routinely updated the packages on my computer and noticed that uv had a new version, so I updated it. However, after updating the uv.lock file in a project, I found that many wheels for dependencies had disappeared from the lock file. For example, here’s the configuration of the pyproject.toml file: ...

 · 3 min · 441 words · ringsaturn

Better work status

I want to share 2 storirs about me on handling work status: Short term remote work Get more focus time in the morning Life in Suzhou Back in the summer of 2021, my house rental was canceled by the owner, and I had to move to another place. By then, the renting prices in Beijing were too high for me to rent a house. Fortunately, I was lucky enough to book a house one month after my current house was canceled. So, I needed to find a place to live for one month. My friend decided to move to Suzhou, a city near Shanghai, which is much more affordable than Beijing. For a month, I sat in a coffee shop and worked remotely. ...

 · 3 min · 509 words · ringsaturn

Publish crates documentation to GitHub Pages

 · 1 min · 127 words

Building a High-Performance Elevation API

This article is reposted from Building a High-Performance Elevation API At ColorfulClouds Technology(彩云科技, “cai yun” in Pinyin for 彩云), we are committed to providing users with meteorological data at higher temporal and spatial resolutions. Over the years, we have consistently faced a challenge: due to limitations in elevation data resolution, outdoor activity enthusiasts, particularly those involved in hiking and cross-country activities, often experience noticeable discrepancies between ColorfulClouds’ data and their actual experiences. This issue is especially prominent in mountainous and plateau regions with dramatic elevation changes. ...

 · 3 min · 1040 words · ringsaturn

Creating Elevation RGB Tiles Around Mount Fuji

TLDR A few days ago, while searching for information, I discovered MapTiler’s elevation profile visualization page, which works excellently: This is really well done, and it’s entirely implemented in the browser https://t.co/R1vQMbdYAo pic.twitter.com/IyTYy5Fxo1 — ringsaturn.me (@ringsaturn_me) January 10, 2024 On their official blog, I found a 2019 post mentioning that the technique encodes elevation data into the RGB channels of an image and then decodes it in the browser. This allows elevation visualization directly in the browser—especially for continuous profile data—by downloading a few images to plot a continuous elevation curve. ...

 · 5 min · 871 words · ringsaturn

Python you let me down

Personally, I’m very disappointed about the some Python community people/projects. It’s been years that PEP 3000(the year was 2006) came up, but we need to wait years until Python 3.11(the year was 2022) to get real performance improvements? Why people keep using Python and spending lots of time to add typing which doesn’t have run time check instead of rewriting codes in Go to get huge speed up while enjoying static language’s safe static type? ...

 · 2 min · 236 words · ringsaturn

Thought on Python's DataFrame

Note ...

 · 2 min · 254 words · ringsaturn

History of package tzf

Introduces the evolution of tzf, from the initial implementation in Go, to the later Python extension, and finally to the current Rust implementation with a PyO3 wrapper.

 · 4 min · 1875 words · ringsaturn

How to look up GPS location belongs to which administration?

This is English version of 《彩云天气地理查询优化(2): 行政区划查询》. With some minor changes. In ColorfulClouds App and ColorfulClouds Weather API, we could get current GPS location’s weather alert information, such as “Gale Blue Alert”. Different countries and regions have different rules for issuing alerts. In China, it is issued according to the administrative division level, and the smallest is the county-level administrative division. Therefore, in the implementation, it is necessary to convert the GPS location into the administrative division level information, and then find the relevant alert information. ...

 · 3 min · 1310 words · ringsaturn