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.…
Read more ⟶

Publish crates documentation to GitHub Pages


Read more ⟶

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?…
Read more ⟶

Thought on Python's DataFrame


Note This article is a bit longer version of my tweet. One great thing about Python is API standardization: know scikit? Well the API is everywhere so you’re good to go. This is why I detest polars and heartily hope the project fails: is pandas perfect? No. But its API is the standard and we should keep it this way. https://t.co/fyJ2aj3zfI — Paul Rietschka (@paul_rietschka) August 17, 2023 I have to say author of the tweet couldn’t see the whole world.…
Read more ⟶

History of package tzf


The basic development work of tzf and related projects has basically stabilized. In the previous article, there are sporadic information about the development and design process: 2022-05-29, 在 Go 中将经纬度转时区 2022-08-01, Python 中经纬度转时区新的选择 2022-08-27, 用 Go 编写 Python 扩展 2022-09-10, tzf 预览图制作 2022-11-24, tzfpy Rust 重写…
Read more ⟶

Deploy Hugo pages via GitHub Actions


Read more ⟶

Geographic aggregation using the map tile index


When dealing with large amounts of scattered data, sometimes we need to provide a read-only query API to visualize on a map. When the amount of data is too large, say millions, it is not appropriate to return it all to the front end for processing on the browser. Some aggregation should be completed within the back-end service to return the aggregated search to the front end. Here’s how to do this with the MongoDB + tile index in Go.…
Read more ⟶

Computing AQI in Go


I write a package named aqi. Install: go install github.com/ringsaturn/aqi For China’s HJ633-2012 standar: package main import ( "fmt" "github.com/ringsaturn/aqi" "github.com/ringsaturn/aqi/mep" ) func main() { algo := &mep.Algo{} inputs := []*aqi.Var{ { P: aqi.Pollutant_PM2_5_1H, Value: 16, }, { P: aqi.Pollutant_PM10_1H, Value: 88, }, { P: aqi.Pollutant_CO_1H, Value: 0.2, }, { P: aqi.Pollutant_SO2_1H, Value: 3, }, { P: aqi.Pollutant_NO2_1H, Value: 11, }, { P: aqi.Pollutant_O3_1H, Value: 75, }, } aqi, primaryPollutant,…
Read more ⟶

Add Mathjax to Hugo


Code copy&paste from Ataias Pereira Reis’s PR adityatelange/hugo-PaperMod#140 with some modifed on toggle option. Creat two files under layouts/partials/. Create math.html: <script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" > MathJax.Hub.Config({ tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']], displayMath: [['$$', '$$']], processEscapes: true, processEnvironments: true, skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'], TeX: { equationNumbers: { autoNumber: "AMS" }, extensions: ["AMSmath.js", "AMSsymbols.js"] } } }); MathJax.Hub.Queue(function () { // Fix <code> tags after MathJax finishes running.…
Read more ⟶