QiShine 最近的时间轴更新
QiShine

QiShine

V2EX 第 433971 号会员,加入于 2019-08-05 13:15:25 +08:00
普通理工宅
机器学习训练的时候,为啥 CPU 占用率到不了 100%?
Python  •  QiShine  •  89 天前  •  最后回复来自 czfy
6
关于 websockets 异步 IO 的一个菜鸟疑问
Python  •  QiShine  •  98 天前  •  最后回复来自 LinePro
18
感觉 C# 在蚕食 Python 的生态
  •  1   
    Python  •  QiShine  •  103 天前  •  最后回复来自 kaneg
    113
    ChatGPT 生成的 Python 代码比 C# 更好
    OpenAI  •  QiShine  •  2023-03-14 15:12:54 PM  •  最后回复来自 yumizhao888
    2
    Pandas 中的 DataFrame 取个什么中文名比较好?
    Python  •  QiShine  •  2020-07-29 17:40:08 PM  •  最后回复来自 wittyfans
    18
    QiShine 最近回复了
    和网易的 Qanything 比较像
    28.88w
    解决了,只禁用根本不行.
    apt purge cloud-init
    rm -rf /etc/cloud
    apt purge unattended-upgrades
    rm -rf /var/log/unattended-upgrades
    用以上命令解决了
    主要是没有开源的手机竞争者了,有竞争者就不一样了
    85 天前
    回复了 zywscq 创建的主题 Python Python 如何实现单例模式
    OOP 都快成了一种邪教
    @czfy 感谢回复!改成 model = RandomForestRegressor(n_estimators=1000, n_jobs=-1)之后,速度快了两倍。
    ```
    # transform list into array
    train = asarray(train)
    # split into input and output columns
    trainX, trainy = train[:, :-1], train[:, -1]
    # fit model
    model = RandomForestRegressor(n_estimators=1000)
    model.fit(trainX, trainy)
    # make a one-step prediction
    yhat = model.predict([testX])
    return yhat[0]
    ```
    显卡虚拟化估计永远也成熟不了,nvidia 现在如日中天,没有搞虚拟化的动力
    98 天前
    回复了 QiShine 创建的主题 Python 关于 websockets 异步 IO 的一个菜鸟疑问
    @Zhuzhuchenyan 对,就是你说的这种情况。而且如果有 await ws.send('subscribe D'),后续就会有多次响应,就更复杂了,感觉用 await async 表达异步方式的逻辑,还是不自然。
    98 天前
    回复了 QiShine 创建的主题 Python 关于 websockets 异步 IO 的一个菜鸟疑问
    @cloud107202 是不是可以有
    dataA = await recv('A')
    doSomethingWith(dataA)
    dataB = await recv('B')
    doAnotherWith(dataB)
    无论 AB 的响应,谁先来,都可以正常运行?像 erlang 里那样通过模式匹配来过滤消息队列
    如果是
    data = await recv()
    if data.ID == A:
    doSomethingWith(dataA)
    elif data.ID == B:
    doAnotherWith(dataB)
    这样的话,肯定可以工作,但是把 A 和 B 的逻辑搅合在一起了,感觉不舒服。
    没啥真实的需求,只是在熟悉 async 和 await 时的一点疑问。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2864 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 17ms · UTC 13:03 · PVG 21:03 · LAX 06:03 · JFK 09:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.