V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  zzl22100048  ›  全部回复第 4 页 / 共 17 页
回复总数  327
1  2  3  4  5  6  7  8  9  10 ... 17  
2023 年 9 月 8 日
回复了 chaleaochexist 创建的主题 程序员 正则表达式如何匹配转义字符 \x1b
import re
msg=b"login: Fri Sep 8 15:48:31 2023 from 127.0.0.1\r\r\n\x1b[?2004h\x1b[1;38m[v12.22.9]\x1b[0m\x1b[1;38mchaleaoch@wsl$:\x1b["
print_msg=msg.decode('utf-8')
print(print_msg)
for item in re.findall(rb'\x1b\[[0-9;]*[mK]', msg):
>>print(item.decode('utf-8')+'abc')


没问题啊,终端输出 bytes ,直接用 rb 匹配
2023 年 9 月 8 日
回复了 wizardyhnr 创建的主题 Python 摸脚店(Mojo)本地开业了
用 mojo 还不如用 erg
https://github.com/erg-lang/erg
2023 年 9 月 3 日
回复了 stonesirsir 创建的主题 问与答 大家家里办的多大的宽带套餐,使用率怎么样?
千兆,下载比 500M 快多了
2023 年 8 月 22 日
回复了 siluplsy 创建的主题 Python 捕获不到网络异常导至程序意外终止
你确定是在同一个线程里面执行的代码吗?
多线程有自己的上下文和堆栈
2023 年 8 月 17 日
回复了 lhyyds6 创建的主题 职场话题 给个建议吧
继续躺平,然后自己学习,这么好的坑位都不要么
2023 年 8 月 14 日
回复了 BeautifulSoap 创建的主题 程序员 我的 k8s 集群又双叒叕挂了😅
我这节点挂了就直接删掉重建。。。
用 autok3s 管理的
2023 年 7 月 28 日
回复了 ohayoo 创建的主题 Python 请大佬帮忙瞄一眼我这个丑陋的异步协程代码
2023 年 7 月 27 日
回复了 guoguobaba 创建的主题 Linux minio 一个坑爹的设计
你需要的是 minio gateway 吧
2023 年 7 月 25 日
回复了 jacketsmith10 创建的主题 程序员 蛋疼的 idea, maven 依赖爆红却能正常运行
@jacketsmith10 #3 删掉 .idea 就能解决,这个目录跨版本是不兼容的
2023 年 7 月 25 日
回复了 jacketsmith10 创建的主题 程序员 蛋疼的 idea, maven 依赖爆红却能正常运行
把 .idea 删了?
2023 年 6 月 30 日
回复了 bigtang 创建的主题 分享创造 tanglib: 像搜索本地代码一样搜索 github 代码
真快,能说说原理吗
2023 年 6 月 27 日
回复了 WOSHILIDAYE 创建的主题 问与答 有没有这样的小型远程日志系统?
@zzl22100048 #10 看错了,RECONCILE_WAIT 应该是 kubernetes operator 的监控延迟,数据的延迟要另外看了
2023 年 6 月 27 日
回复了 WOSHILIDAYE 创建的主题 问与答 有没有这样的小型远程日志系统?
@WOSHILIDAYE #7 默认的 有个参数可以控制 Reconciliation delay

RECONCILE_WAIT 默认是 10s
2023 年 6 月 22 日
回复了 WOSHILIDAYE 创建的主题 问与答 有没有这样的小型远程日志系统?
是不是要类似这种效果?
让租户动态的导入依赖库

https://odh-highlander.github.io/
https://github.com/guimou/odh-highlander
2023 年 6 月 7 日
回复了 hikarugo 创建的主题 生活 好家伙,为啥山姆会员吃的这么贵,真的物有所值吗?
@zhongjun96 山姆 59.8 16 个 1.2kg 应该比这个单价便宜吧
创建一个
sem = asyncio.Semaphore(k)

async def task():
async with sem:
....

async def main():
await asyncio.gather(*[ task() for _ in range(n) ])

asyncio.run(main())



如果更喜欢 pipeline 语法,可以用 aiostream
from aiostream import pipe, stream
async def main():
await (
stream.iterate(range(n))
| pipe.map(task,task_limit=k)
)
2023 年 5 月 11 日
回复了 kingwrcy 创建的主题 分享创造 造了个轮子,Micro Blog,个人微博
点开后端代码,是 java ,用不起,springboot 更用不起了

java 可以用 jib 构建镜像,没必要自己写 Dockerfile
2023 年 5 月 10 日
回复了 coderMonkey 创建的主题 程序员 有 v 友用 vscode 写 springcloud 的吗,求教使用方式
把所有支持的插件装完之后 资源占的比 idea 还多
1  2  3  4  5  6  7  8  9  10 ... 17  
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3972 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms · UTC 00:54 · PVG 08:54 · LAX 17:54 · JFK 20:54
♥ Do have faith in what you're doing.