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 ⟶