Skip to content

Instantly share code, notes, and snippets.

View PsiACE's full-sized avatar
🎯
Building structure for reliable intelligence

Chojan Shang PsiACE

🎯
Building structure for reliable intelligence
View GitHub Profile
@PsiACE
PsiACE / Friendly-Python.md
Created January 8, 2026 18:53
Friendly Python notes

Friendly Python

本文基于 Frost Ming “friendly python” 标签下的文章,整理出偏向工程实践的开发范式、规范与典型好/坏代码范式示例。重点是“对使用者友好 + 对维护者友好”,并强调在 Python 中利用语言特性与生态扩展点进行合理抽象。

资料来源

import pandas as pd
import numpy as np
import opendal
# A ~300MB file with compression='none'
row_count = 18000000
df = pd.DataFrame({
'A': np.random.randn(row_count), # float64
'B': np.random.randint(0, 100, size=row_count), # int32
import pandas as pd
import numpy as np
# git clone https://github.com/fsspec/s3fs/
# cd s3fs
# pip install -e .
import s3fs
print(s3fs.__file__)
# A ~300MB file with compression='none'
row_count = 18000000