OKHK 👀
个人数字泔水\(◔‿◔)
✨ Thinking...
✨ Thinking...
-
- #系统设计
#游戏服务端开发
《由「上线」产生的思考 》,作者在完整参与了一款游戏项目之后的总结,小十年前,作者刚出道时写过另外一篇文章《游戏服务端究竟解决了什么问题? 》,也是非常好的游戏服务端开发文档。 -
- 好了全污染了🤡
DNS 污染 + SNI 阻断
有各种技术手段处理😒
再绝绝子点就可以闭关了😐快进到光缆自宫💩
盲猜: 猫捉老鼠纯粹的提高难度,这次再次筛掉一批也重新划定一批,下次再继续缩小😆
https://www.v2ex.com/t/1047853
https://www.v2ex.com/t/1047850 -
5个AI搜索引擎:
1. https://devv.ai
2. https://metaso.cn/
3. https://thinkany.ai
4. https://komo.ai
5. www.perplexity.ai
#AI - #BB “国内”突然把 Docker 镜像全停止🤣,学习墙国!🐷
-
- 上海交通大学软件源镜像服务下架 DockerHub 镜像
上海交通大学软件源镜像服务发布公告称:非常遗憾,接上级通知,即时起我们将中止对 dockerhub 仓库的镜像。docker 相关工具默认会自动处理失效镜像的回退,如果对官方源有访问困难问题,建议尝试使用其他仍在服务的镜像源。
我们对给您带来的不便表示歉意,感谢您的理解与支持。
—— SJTUG 镜像 - https://www.kawabangga.com/posts/6178
经典校园网 TTL 为 1 ,用不了路由器 -
-
-
-
-
- Next.js 页面跳转添加顶部进度条
https://github.com/TheSGJ/nextjs-toploade - 代码,大家可以照着这个自己玩。因为写的比较快,🔒糙极了(又不是不能用)
https://github.com/yihong0618/tg_bot_collectionsfrom telebot import TeleBot from telebot.types import Message from . import * import wave import numpy as np from handlers.ChatTTS import Chat chat = Chat() chat.load_models() is_generating = False def generate_tts_wav(prompt): global is_generating texts = [prompt,] is_generating = True wavs = chat.infer(texts, use_decoder=True) output_filename = 'tts.wav' audio_data = np.array(wavs[0], dtype=np.float32) # Ensure the data type is correct sample_rate = 24000 # Normalize the audio data to 16-bit PCM range audio_data = (audio_data * 32767).astype(np.int16) # Open a .wav file to write into with wave.open(output_filename, 'w') as wf: wf.setnchannels(1) # Mono channel wf.setsampwidth(2) # 2 bytes per sample wf.setframerate(sample_rate) wf.writeframes(audio_data.tobytes()) print(f"Audio has been saved to {output_filename}") is_generating = False def tts_handler(message: Message, bot: TeleBot): """pretty tts: /tts <address>""" global is_generating if is_generating: bot.reply_to(message, "please wait for the previous ChatTTS to finish") return bot.reply_to( message, f"Generating ChatTTS may take some time please left" ) m = message.text.strip() prompt = m.strip() if len(prompt) > 100: bot.reply_to(message, "prompt too long must length < 100") return try: generate_tts_wav(prompt) with open(f"tts.wav", "rb") as audio: bot.send_audio( message.chat.id, audio, reply_to_message_id=message.message_id ) except Exception as e: print(e) bot.reply_to(message, "tts error") is_generating = False def register(bot: TeleBot) -> None: bot.register_message_handler(tts_handler, commands=["tts"], pass_bot=True) bot.register_message_handler(tts_handler, regexp="^tts:", pass_bot=True) -