Fine-Tune Whisper For Multilingual ASR with 🤗 Transformers

tags: AI, Fine-Tune, Whisper source: “Fine-Tune Whisper For Multilingual ASR with 🤗 Transformers.” Accessed August 22, 2024. https://huggingface.co/blog/fine-tune-whisper.

August 22, 2024 · 1 min · Gray King

Finetune

August 22, 2024 · 0 min · Gray King

Finetune Whisper

August 22, 2024 · 0 min · Gray King

FFmpeg

tags: Tools

August 19, 2024 · 1 min · Gray King

Ubuntu FFmpeg4 PPA

tags: Linux, FFmpeg source: https://askubuntu.com/a/1360862 sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update sudo apt-get install ffmpeg

August 19, 2024 · 1 min · Gray King

FreeBSD Flushing Network Cache Solved Samba Writing Issue

tags: FreeBSD source: https://forums.freebsd.org/threads/samba-share-permission-privilege-changed-since-update.90685/post-626157 I’m running a Samba4 on the FreeBSD 14 system. I couldn’t write content to that share filesystem after a system rebooting. After running the below command, the write permission is back: service samba_server stop net cache flush # -> tdb(/var/db/samba4/gencache.tdb): tdb_rec_read bad magic 0x10878 at offset=67584 service samba_server start

July 11, 2024 · 1 min · Gray King

Rust std::borrow::Cow

ref: Rust, Rust Borrow and Lifetimes 发现一个 Cow 用处,可以让变量支持同时赋值引用类型和值类型,场景就是我们可能接收到一个引用,同时可能需要把它变成值类型做一些处理,我们可以通过 clone 或 to_owned 统一变成值类型: fn maybe_need_to_change(s: &str) { let s = if s.starts_with("xxx") { manipulate(s) } else { s.to_owned() // 存在额外的开销 }; take_reference(&s); // s.into_owned() 可以得到 String 类型的值 } fn manipulate(s: &str) -> String { s.to_owned() } fn take_reference(s: &str) { } 另外一种方式就是通过 Cow 避免不必要的 clone 开销: fn maybe_need_to_change(s: &str) { let s = if s.starts_with("xxx") { Cow::from(manipulate(s)) } else { Cow::from(s) // 没有额外的开销 }; take_reference(&s); } fn manipulate(s: &str) -> String { s.to_owned() } fn take_reference(s: &str) { }

May 6, 2024 · 1 min · Gray King

我现在的笔记记录方式

ref: 收集和整理笔记:临时笔记、阅读笔记和正式笔记, How to Take Smart Notes, 书写比键盘输入更有利于记忆 收集:阅读笔记写到纸质的笔记本上; 整理:通过 org-roam 整理成正式笔记。

May 4, 2024 · 1 min · Gray King

收集和整理笔记:临时笔记、阅读笔记和正式笔记

ref: Introduction: The slip-box and Overarching workflow, GTD 对记笔记的启示, How to Take Smart Notes 要想长久的掌握学到的内容:写下来;要想真正的理解所学内容:转换成自己的语言。所以笔记不仅仅是学习的方式,还是以下工作的结果: 思考 阅读 理解和产生想法 收集笔记 通过以下两种方式可以收集笔记: 临时笔记(fleeting notes):捕捉脑海中的每一个想法,放到收件箱里稍后处理(丢弃或转换成正式笔记(permanent notes)) 阅读笔记(literature notes):用自己的语言记录下阅读中想要记住的内容,并保持笔记内容简单、精悍。 然后在一到两天内(忘记之前)整理笔记: 整理临时笔记,: a. 要么整理成正式笔记; b. 要么丢弃 阅读笔记:添加连接,索引内容。 如何连接正式笔记 从收集变成整理:开发想法、主题和讨论,确保之后可以通过索引或者相关的笔记找到现在撰写的这篇笔记。 是否和现有的论述存在冲突或能够支持现有的笔记? 是否可以结合现有的笔记产生新的想法? 引发了什么新的问题? 如何写正式笔记 撰写完整的句子 引用信息来源 尽量精准、清晰和间接 如何利用正式笔记 通过自下而上的系统开发主题、问题和课题:查漏补缺,跟随自己的兴趣读更多、记更多,或转移或深入,产生问题回答问题。 通过积攒足够笔记的笔记去创作:根据连接找到主题创作所需的一些,查重补漏。通过笔记适当的调整顺序产生操作,并完善草稿完成创作。

May 4, 2024 · 1 min · Gray King

Luhmann's slip-box

ref: Introduction: The slip-box and Overarching workflow, slip-box 小片的笔记通过上下文进行关联,放在两个木头盒子里面(装满了索引卡): 两个木头盒子分别的作用: 索引(bibliographical):存放对所读的书目的引用(正面)和简单的笔记(反面)。 主要(main):收集对所读内容产生的想法。 当读到一些内容,其主要工作流程: 一张索引卡,正面:数目信息,反面:简短的内容笔记,放到索引盒子里之后就不再添加。 检查相关的想法和写作:不直接照抄所读,而是用自己的语言在一片纸上写上一个想法或者笔记,放到「主盒子」里; a. 有新的想法再写在另外一张纸上进行扩展,通过编号进行连接。 b. 多个笔记形成链式,一个笔记可以关联到多个上下文中。 卡片之间连接的方式:

May 4, 2024 · 1 min · Gray King

GTD 对记笔记的启示

ref: How to Take Smart Notes, Introduction: The slip-box and Overarching workflow tags: GTD 传统计划 vs. GTD 计划:往自身施加了一层禁锢,消耗意志力、让自身丧失灵活性,难以应对开放式的任务;比如写作。 GTD:通过收集、整理、决策、行动这一套可信的系统,让大脑意识到所有的事情都已经被妥善处理,从而大脑才会让我们能够专心的处理眼前的事项,大大增加了自身的灵活性. 一种好的笔记记录方式类似 GTD 帮我们开启一种新的工作流: 收集笔记:记录、跟踪读到的内容; 整理笔记:头脑风暴开发想法; 连接笔记:激发新的想法; 创作:通过笔记进行快速创作。

May 4, 2024 · 1 min · Gray King

为什么要记笔记

tags: Introduction: The slip-box and Overarching workflgow ref: How to Take Smart Notes 通过记笔记可以: 辅助记忆和理解我们读到的内容; 开发新的想法、主题和创意; 引用已有的研究成果; 整理我们的想法。 记笔记作为「写作工作」的主要工作,而不仅仅是准备阶段的学习,一个好的笔记结构可以让你: 在交付阶段面临大量已经基本可用的素材,而不是空白的纸面或屏幕; 不消耗额外的意志力,让你可以随时切换到其它感兴趣的主题然后再随时切回到现在的研究课题; 可以启动心流

May 4, 2024 · 1 min · Gray King

在纸上写下怒意扔掉可以缓解情绪

ref: 为什么我们需要纸和笔 source: https://china.kyodonews.net/news/2024/04/4db93f4c3bf3.html 如果写在纸上不扔掉则没有效果。

May 4, 2024 · 1 min · Gray King

电子屏幕阅读效果低于纸质书

ref: 为什么我们需要纸和笔 source: https://www.solidot.org/story?sid=77170 通过检测脑电波,阅读纸质书的模式更贴近注意力集中的模式。 https://news.slashdot.org/story/24/01/18/0225255/a-groundbreaking-study-shows-kids-learn-better-on-paper-not-screens-now-what?utm_source=rss1.0mainlinkanon

May 4, 2024 · 1 min · Gray King

为什么我们需要纸和笔

May 4, 2024 · 0 min · Gray King

书写比键盘输入更有利于记忆

ref: How to Take Smart Notes, 为什么我们需要纸和笔 source: https://www.solidot.org/story?sid=77257 《心理学前沿》上发表的的一篇研究表明用纸笔写下来比用键盘打出来更有利于记忆:通过观察 36 名 24 多岁的学生分别通过纸笔写下来和键盘打出来的脑信号,纸笔写下来时大脑中央部分和大脑外部顶叶间的连接增加。 https://news.sciencenet.cn/htmlnews/2024/1/516879.shtm https://www.frontiersin.org/articles/10.3389/fpsyg.2023.1219945/full

May 4, 2024 · 1 min · Gray King

Sui Dynamic Objects

tags: Sui POST https://api.shinami.com/node/v1/sui_mainnet_bb70bc6a7d6d04694c4c719f0b6f27aa Content-Type: application/json Origin: https://app.turbos.finance Referer: https://app.turbos.finance/ { "id": 1, "jsonrpc": "2.0", "method": "suix_getDynamicFieldObject", "params": [ "0xd836ea2a159743a568fe29e8f42672a1b88414ab21be5411f8f6331e66b218d3", { "type": "0x91bfbc386a41afcfd9b2533058d7e915a1d3829089cc268ff4333d54d6339ca1::i32::I32", "value": 4294899946 } ] }

April 29, 2024 · 1 min · Gray King

systemd by example

tags: Linux, Systemd source: “Systemd by Example - Part 1: Minimization - Sebastian Jambor’s Blog.” Accessed February 18, 2024. https://seb.jambor.dev/posts/systemd-by-example-part-1-minimization/. systemd unit types There are 11 different unit types, the most common 3 of them: targets: activated by different system state, it’s useful as a dependency, e.g. sleep.target:do something when system is going to sleep. Of course, we can use systemctl to list the units that dependant on a specific unit. systemctl list-dependencies graphical.target services Processes that are controlled by systemd. ...

February 18, 2024 · 1 min · Gray King

Use Podman to Run Systemd in a Container

tags: Linux,Systemd source: Walsh, Daniel. “How to Run Systemd in a Container.” Red Hat Developer, April 24, 2019. https://developers.redhat.com/blog/2019/04/24/how-to-run-systemd-in-a-container. Podmand is a container engine which is published by Red Hat, has the same command-line interface(CLI) as Docker.

February 18, 2024 · 1 min · Gray King

Windows

tags: Operating system

December 9, 2023 · 1 min · Gray King

Logrotate

tags: Linux,Tools

November 1, 2023 · 1 min · Gray King

Supervisor

tags: Tools

November 1, 2023 · 1 min · Gray King

Systemd

tags: Linux

November 1, 2023 · 1 min · Gray King

BPF

tags: High Performance, Linux

October 31, 2023 · 1 min · Gray King

Porting OpenBSD pledge() to Linux

tags: Linux, Tools, BPF source: “Porting OpenBSD Pledge() to Linux.” Accessed October 31, 2023. https://justine.lol/pledge/. $ ./pledge.com 'stdio rpath' ls # read only list files

October 31, 2023 · 1 min · Gray King

Speeding up Cython with SIMD

tags: Python, SIMD, High Performance source: Turner-Trauring, Itamar. “Speeding up Cython with SIMD.” Python⇒Speed, October 18, 2023. https://pythonspeed.com/articles/faster-cython-simd/.

October 31, 2023 · 1 min · Gray King

FreeBSD LiveCD Import ZFS

tags: ZFS, FreeBSD $ mkdir /tmp/zroot $ zpool import -fR /tmp/zroot zroot $ zfs mount zroot/ROOT/default

October 20, 2023 · 1 min · Gray King

Making Hard Things Easy

source: Evans, Julia. “New Talk: Making Hard Things Easy.” Julia Evans, October 6, 2023. https://jvns.ca/blog/2023/10/06/new-talk--making-hard-things-easy/. How to: Reusable tools: shellcheck Find Good Documentation in that field, for example, HTTP: MDN RFC(rfc9110) Big list to small list, focus on the core: Only learn a few arguments about grep Only know a few fields about the output of dig Understand how computer executed chronologically: SQL Understand the hidden parts: DNS (resolve, library, servers) Communication with each other

October 8, 2023 · 1 min · Gray King

YubiKey-Guide

tags: GPG, Yubikey source: https://github.com/drduh/YubiKey-Guide

October 5, 2023 · 1 min · Gray King

A Visual Explanation of GPG Subkeys

tags: GPG, Yubikey source: “A Visual Explanation of GPG Subkeys - Richard Goulter’s Blog.” Accessed October 5, 2023. https://rgoulter.com/blog/posts/programming/2022-06-10-a-visual-explanation-of-gpg-subkeys.html. What does the [SC] or [E] mean in the output of gpt --list-keys: E = encrypt/descript S = sign C = certify(sign another key, establishing a trust relation) A = authentication(log in to SSH with a PG key)

October 5, 2023 · 1 min · Gray King

sui_getTransactionBlock

tags: Sui POST https://fullnode.mainnet.sui.io Content-Type: application/json { "jsonrpc": "2.0", "id": 1, "method": "sui_getTransactionBlock", "params": [ "6wthaE4QzjWM7HnAzm6Pd4ymkNtadbHnqQkTXY7Ne1L3", { "showInput": true, "showRawInput": false, "showEffects": true, "showEvents": true, "showObjectChanges": true, "showBalanceChanges": true } ] }

September 26, 2023 · 1 min · Gray King

FreeBSD 13.2 NFS

Tags: FreeBSD First, configure to start service during the bootstrap: sysrc nfs_server_enable="YES" sysrc nfs_server_flags="-u -t -n 4" sysrc rpcbind_enable="YES" sysrc rpc_statd_enable="YES" sysrc rpc_lockd_enable="YES" sysrc mountd_flags="-r" sysrc mountd_enable="YES" Second, export volume to the network in /etc/exports: /data/warehouse -mapall=root -network 192.168.1.0/24 NOTE: you shouldn’t export the pool root while you are using ZFS, as it can’t show the children in a datasets of it. And then we can start the services: service nfsd start service statd start service lockd start You need to stop extra services when you want to restart: ...

September 15, 2023 · 1 min · Gray King

ZFS

September 11, 2023 · 0 min · Gray King

ZFS 入门指北:规划与创建存储池

tags: FreeBSD, ZFS source: Shen Leo. “ZFS 入门指北:规划与创建存储池.” Leo’s Field, March 21, 2022. https://szclsya.me/zh-cn/posts/storage/zfs-setup/.

September 11, 2023 · 1 min · Gray King

FreeBSD

September 11, 2023 · 0 min · Gray King

Building a FreeBSD backup server

TAGS: FreeBSD, NAS Source: “Building a FreeBSD Backup Server.” Accessed September 11, 2023. https://ogris.de/howtos/freebsd-backup-server.html. $ zfs create -quota=1T data/timemachine [global] workgroup = WORKGROUP security = user netbios name = backup server string = backup.your-local-domain.invalid hostname lookups = yes load printers = no show add printer wizard = no time server = yes map to guest = Bad User use mmap = yes dos charset = 850 unix charset = UTF-8 mangled names = no log level = 0 vfs objects = fruit streams_xattr zfsacl fruit:model = MacPro fruit:resource = file fruit:metadata = netatalk ; time machines [macbook] path = /data/timemachine read only = no use sendfile = yes browseable = no hosts allow = macbook.your-local-domain.invalid fe80::/10 fruit:time machine = yes fruit:time machine max size = 500G valid users = tm Then we can set our Macbook Pro to use the timemachine: ...

September 11, 2023 · 1 min · Gray King

Sui

TAGS: Blockchain

September 11, 2023 · 1 min · Gray King

Sui Move Call

TAGS: Sui POST http://127.0.0.1:9000 Content-Type: application/json { "jsonrpc": "2.0", "method": "sui_moveCall", "params": [ "0x1", "0xc8", "obc_dao", "voting_delay", " ] }

September 11, 2023 · 1 min · Gray King

Uniswap V3 Event Log

tags: Uniswap V3, Ethereum POST https://rpc.ankr.com/eth Content-Type: application/json { "jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionReceipt", "params": ["0xeedf302cc12f4b7194742694aabec075c1c229f7b9d8e57a53c44c992bc6690c"] }

July 31, 2023 · 1 min · Gray King

The Best Way To Launch Your Startup

tags: Microstartup source: The Best Way To Launch Your Startup | Startup School, 2023. https://www.youtube.com/watch?v=u36A-YTxiOw. Emphasis Launch it ASAP, and launch it again and again. How to Write a Pitch 1-line description to introduce your bussiness: Tell WHAT, not WHY(maybe later). What problem it it solving, and for who. X for Y may not the best sentence. Ways: Launch in Different Channels Silent Launch Launch to Friends and family Launch to Strangers Online Community Lanuch: HN Waitlist Launch: Domain/Landing Page/Email list.

July 26, 2023 · 1 min · Gray King

Should I read papers

tags: Papers source: “Mrb: Should I Read Papers?” Accessed February 20, 2023. https://michaelrbernste.in/2014/10/21/should-i-read-papers.html. Yes, but reading a paper isn’t the same as reading a blogpost or a novel. A paper could be an idea captured by someone, or the result of a life’s work, or anything in between. You might need to read it bit by bit, again and again.

July 19, 2023 · 1 min · Gray King

Software Engineers Should Read Academic Papers

tags: Papers source: Al-Ansari, Khaled. “Software Engineers Should Read Academic Papers.” Medium (blog), July 15, 2023. https://medium.com/@KhaledElAnsari/software-engineers-should-read-academic-papers-9a6ee6ebc40d. There are some benefits of reading academic papers: Structured content can enhance your technical writing, you can learn structured writing. (Reading - Writing - Reviewing) cycle making you a better reader and reviewer. Reading to gain information. Structured writing make review easier. Better deading and writing make you a better reviewer. Bridge the industry and the academic field. ...

July 17, 2023 · 1 min · Gray King

Solana Off-Chain Message Signing

tags: Solana source: https://github.com/solana-labs/solana/blob/eabe1070667e87f447b9cb892e2d916ca5b68e34/sdk/src/offchain_message.rs#L237-L240 /// Serialize the off-chain message to bytes including full header pub fn serialize(&self) -> Result<Vec<u8>, SanitizeError> { // serialize signing domain let mut data = Self::SIGNING_DOMAIN.to_vec(); // serialize version and call version specific serializer match self { Self::V0(msg) => { data.push(0); msg.serialize(&mut data)?; } } Ok(data) }

June 15, 2023 · 1 min · Gray King

Ethereum Execution Layer

tags: Ethereum Networking Layer

June 14, 2023 · 1 min · Gray King

Ethereum Sub-protocols

tags: Ethereum Networking, Ethereum Execution Layer

June 14, 2023 · 1 min · Gray King

Ethereum Wire Protocol

tags: Ethereum Sub-protocols, Ethereum Simulator Node Started when a RLPx session had initiated. Three main tasks before switch to PoS: Chain synchronization Block propagation Transaction exchange: exchange pending transaction between nodes. Only transaction exchange remit after switch to PoS.

June 14, 2023 · 1 min · Gray King

Ethereum DevP2P

tags: Ethereum Networking, Ethereum Execution Layer Basic stack for p2p networking. Initiating RLPx Session. RLPX Session Communicate messages that encoded in RLP between peers.

June 14, 2023 · 1 min · Gray King

Ethereum Networking Layer

tags: Ethereum source: https://ethereum.org/en/developers/docs/networking-layer/

June 14, 2023 · 1 min · Gray King

Ethereum Discovery Nodes

tags: Ethereum Networking, Ethereum Simulator Node Boot nodes Using a small set that hardcoded bootnodes to bootstrap. Protocol Kademlia a modified form of Distributed Hash Table. Steps to join the network start client –> connect to bootnode –> bond to bootnode –> find neighbours –> bond to neighbours

June 14, 2023 · 1 min · Gray King

How is a Transaction Broadcasted

tags: Ethereum Simulator Node, Ethereum Execution Layer Node Side: Receive pending transactions If we want to broadcast our transactions to the network in Ethereum, two RPC calls are involved: https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction So let’s follow those two calls to track how a transaction is broadcasted. Those two corresponding implementations are defined at internal/ethapi/api.go: SendTransaction SendRawTransaction And both of them are pointing to SubmitTransaction, which calls SendTx to put transaction into the txpool by calling: func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error { return b.eth.txPool.AddLocal(signedTx) } Miner Side: Execute pending transactions Miner start here at cmd/geth/main.go, which is calling: ...

June 12, 2023 · 2 min · Gray King