$V2EX
Solana
Give SOL to Copy Address
使用 SOL 向 zhailw 打赏,数额会 100% 进入 zhailw 的钱包。
zhailw

zhailw

V2EX member #335447, joined on 2018-07-24 18:44:40 +08:00
Today's activity rank 14413
Per zhailw's settings, the topics list is only visible after you sign in
Deals info, including closed deals, is not hidden
zhailw's recent replies
Mar 23, 2023
Replied to a topic by killva4624 问与答 为什么 π 会比 3.2 大?
测试了 Bard 的回答是对的
Q: Is π greater than 3.2?
A: No, pi is not greater than 3.2. Pi is an irrational number, which means that its decimal representation never ends or repeats. Its approximate value is 3.141592653589793. 3.2 is a rational number, which means that its decimal representation can be written as a fraction.
fail2ban 自己针对日志写配置文件,还是挺方便的
楼主三分法怎么实现的啊?我大概算了一下,230 步左右就可以求出来了啊?这样都满足不了要求么?
而且如果曲线没有其他性质的话,n 分法就是最优解了啊
貌似回复贴不支持代码块,缩进有点问题,但是应该也能看懂吧
@zhailw
```python
import time
import timeit as original_timeit


def timeit(times):
start_time = time.time()
yield from range(int(times))
used_time = time.time() - start_time
print('average used time:' + str(used_time / times))


rounds = int(1e6)

for _ in timeit(rounds):
"-".join(map(str, range(100)))

print('original_timeit: ', original_timeit.timeit('"-".join(map(str, range(100)))', number=rounds) / rounds)

print('done')
```
average used time:8.731926918029785e-06

original_timeit: 8.62705747198197e-06

done

@LeeReamond
有一个小问题啊,不知道楼主有没有想过用 for _ in timeit(1e6): 这种形式啊?不是更简单么?也比 with 多不了几个字符,但是感觉更优雅一点?
Oct 10, 2021
Replied to a topic by wm5d8b Windows Win10 显卡掉线问题
有,可以尝试更新核显驱动
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   960 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 21:15 · PVG 05:15 · LAX 14:15 · JFK 17:15
♥ Do have faith in what you're doing.