写代码一时爽, 数据管理火葬场. 我是仓鼠, 我时常会陷入一种 “数据焦虑”: 我的代码、我的数据集、我的实验结果… 它们还安全吗? 🤯 万一哪天硬盘暴毙, 服务器被黑, 我会不会一夜回到解放前?
为了睡个好觉, 我折腾了一些数据存储和备份方案. 它不一定是最优解, 但目前还凑合.
Warning
本文充斥着我的直觉, 主观臆断和偏执, 请谨慎食用! 如有雷同, 那说明我很棒了.
——「」
写代码一时爽, 数据管理火葬场. 我是仓鼠, 我时常会陷入一种 “数据焦虑”: 我的代码、我的数据集、我的实验结果… 它们还安全吗? 🤯 万一哪天硬盘暴毙, 服务器被黑, 我会不会一夜回到解放前?
为了睡个好觉, 我折腾了一些数据存储和备份方案. 它不一定是最优解, 但目前还凑合.
Warning
本文充斥着我的直觉, 主观臆断和偏执, 请谨慎食用! 如有雷同, 那说明我很棒了.
| Operation (Relative) | Class() |
obj.x |
obj.x = 42 |
obj.method |
|---|---|---|---|---|
attrs |
1.00x | 1.00x | 1.00x | 1.00x |
dataclass |
1.25x | 1.73x | 2.08x | 1.07x |
eqx.Module |
132.90x | 25.06x | - | 1121.94x |
Dynamic dispatch, or choosing which function implementation to call based on argument types at runtime, is a powerful feature in programming. Python, with its dynamic typing, offers several ways to achieve this. In this post, I’ll share some micro-benchmark results from an experiment comparing three dispatch mechanisms: the standard library’s functools.singledispatch, the third-party library plum, and a simple custom conditional dispatcher.
Warning
This content was generated by AI.
AI can make mistakes. Check important info.
gemini-2.5-pro-preview-06-05)When working with JAX, especially when using jax.jit for performance, you might encounter some surprising behaviors if you’re not careful about how JAX “sees” and handles your objects. One such area is the interaction between jax.jit and Python’s @functools.cached_property. You might find that your property isn’t as “cached” as you expect within JIT-compiled functions.
[!QUESTION]
若码长为 100 的 0, 1 符号串, 信道是二元对称, 差错的概率为 0.001, 求满足下列条件的概率:
(1) 无差错;
(2) 恰好一个错;
(3) 恰好两个错;
(4) 多于两个错.
每个比特的传输是独立的, 因此错误比特数 服从二项分布 , 其中 , , 成功概率 (无差错) 为 . 二项分布的概率质量函数为:
本次大作业的目标是开发一个带有图形用户界面的普通三阶魔方模拟程序. 具体要求如下:
[!QUESTION]
利用图解求下列问题的解.
(1)(2)
(3)
(4)
Images generated by: [Linear programming grapher (two variables)](https: <//www.zweigmedia.com/utilities/lpg/index.html>)
请编写带有图形界面的普通三阶魔方模拟程序.
要求: