LLM 之用CRISPE 框架构建输入

CRIPSE 1. CR – Capacity and Role: 能力与角色 希望模型扮演怎样的角色, 以及角色所具备的能力 例如: 你是一个精通算法的经验丰富的 C++ 程序员 2. Insight 洞察力 完成任务所依赖的背景信息 例如: 根据现代 C++ 语言的最佳实践 3. Statement 指令 希望模型做什么, 任务的核心关键词和目标 例如: 编程一个类, 实现 24点游戏, 即输入随机的四个数字, 数字范围在1 和9之间, 求出它们是否能通过加减乘除运算得出最终结果为数字 24, 举例如下 输入: 1, 3, 2, 4 计算: 413*2 结果: 24 4. Personality 个性 希望模型以什么风格或方式输出 例如: 请用 C++ 写一个类, 并有一个 […] →Read more

如何计算 mpegts 文件的长度

Background ts文件为传输流文件, 视频编码主要格式 h264/mpeg4, 音频为 acc/mp3。 ts文件分为三层: 1) ts 层Transport Stream、 ts 层就是在pes层加入数据流的识别和传输必须的信息 ts 流: 由定长的TS包组成 (188字节) , 而TS包是对PES包的一个重新封装 (到这里, ES经过了两层的封装) 。应用于相对有错环境下的传输与存储 (如DVB中) , 其基本单位是TS包, 长度固定188字节。日本的DVB-S广播系统采用192个字节的TS包, 美国采用204个字节的TS包, 多加了16个字节的前向纠错校验码 (FEC) 。 2) pes 层 Packet Elemental Stream、 pes 层是在音视频数据上加了时间戳等对数据帧的说明信息, pes 流: PES流是ES流经过PES打包器处理后形成的数据流, 在这个过程中完成了将ES流分组、打包、加入包头信息等操作 (对ES流的第一次打包) 。PES流的基本单位是PES包。 3) es 层 Elementary Stream. es 层就是音视频数据, es 流: 有三种, 图像数据流, […] →Read more

Alert Manager

The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts. Grouping 分组 Grouping categorizes alerts of similar nature into a single notification. […] →Read more

rust first step

installation curl –proto '=https' –tlsv1.2 -sSf https://sh.rustup.rs | sh Cargo Cargo: the Rust build tool and package manager When you install Rustup you’ll also get the latest stable version of the Rust build tool and package manager, also known as Cargo. Cargo does lots of things: build your project with cargo build run your project […] →Read more

gstreamer new plugin: webrtcsink and webrtcsrc

https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/tree/main/net/webrtc webrtcsink and webrtcsrc All-batteries included GStreamer WebRTC producer and consumer, that try their best to do The Right Thing™. It also provides a flexible and all-purposes WebRTC signalling server (gst-webrtc-signalling-server) and a Javascript API (gstwebrtc-api) to produce and consume compatible WebRTC streams from a web browser. Use case The webrtcbin element in GStreamer is […] →Read more

What’s LLM

生成式 AI 对于内容创作者来说, 既是机遇, 也是挑战。 LLM(Large Langage Model) 大语言模型之火愈演愈㤠。 国外的 ChatGPT, 国内的 Kimi 几乎成了与搜索引擎一样必不可少的工具。 AI 不但能理解我们的问题, 理解大篇幅的文本, 还能长篇累牍的生成大块文章, 还能生成图像, 视频, 音频, 这一天来得好快。 现在我写文章, 每当词穷之际, 就会求助于 LLM, 写程序, 忘了函数用法, 也不再查手册, 而去问 LLM, 但是它们是怎么做到的呢。 通过文本生成 token 想想婴儿是怎么学语言的吧, 词汇是基础 , token 就是 LLM 的词汇, BPE(Byte Paire Encoding) 算法广泛用于 LLM , 从给定的数据集中生成 token 通过 token 进行预测 以这句练打字常用的句子为例 the quick […] →Read more

TDD

Test-Driven Development (TDD) is an iterative development cycle that emphasizes writing automated tests before writing the actual feature or function. Put another way, TDD combines building and testing. This process not only helps ensure correctness of the code — but also helps to indirectly evolve the design and architecture of the project at hand. TDD […] →Read more

把一件很难的事情拆分的足够小

把大象放进冰箱有三个步骤 打开冰箱门 把大象放进冰箱 关上冰箱门 显然, 这个拆分是不合格的, 第一步和第三步没问题, 第二步太粗. 拆分得尽量小, 顺序安排合理, 做起来就更容易 →Read more

成为自己的教练

其实也就一个 PDCA 循环 自己为自己设计课程 自己督促自己学习和训练 自己反省自己的问题 自己采取行动改进自己 →Read more

Schedule mode: push or pull

Overview The scheduling mode of a pad defines how data is retrieved from (source) or given to (sink) pads. GStreamer can operate in two scheduling mode, called push- and pull-mode. GStreamer supports elements with pads in any of the scheduling modes where not all pads need to be operating in the same mode. So far, […] →Read more