Tax Planning 筆記 - Federal Income
1. Ordinary income 先算,其他後算 2. tax credit is more powerful than tax deduction in most cases 3. 退休情況,讓 LTCG 用 tax deduction 抵有可能更有利
About Retirement Account in US
### raditional 401K 放錢的時候 pre tax,拿出來的時候 Tax -> 通常公司 match 的就是這部分,這是 free money 能拿就要拿 ### Roth 401K 跟 Traditional 401K 不同的部分是,Ro...
Traditional v.s Roth and 401K v.s. IRA
上一篇 [About Retirement Account in US](https://blog.waynechu.cc/about-retirement-account-in-us/) 講到了常見的 Account Type,間接證明了 IRS (國稅局) 把簡單的東西...
Docker rails development
Follow this post https://blog.saeloun.com/2023/11/29/rails-7-1-introduces-default-docker-files/ haven't success yet though, making not...
Deploy Node + Puppeter using Kamal with Docker
Your app ``` const express = require("express"); const app = express(); const port = 4000; app.get("/", (req, res) => { res.s...
DSPy - save and load the compiled program
You don't need to compile every time, train once, and then save the configuration into json file, next time just load the json file to ge...
How to use DSPy
[https://dspy-docs.vercel.app/docs/building-blocks/solving_your_task](https://dspy-docs.vercel.app/docs/building-blocks/solving_your_task...
DSPY blocks - Module
Module ------ [https://dspy-docs.vercel.app/docs/building-blocks/modules](https://dspy-docs.vercel.app/docs/building-blocks/modules?r...
DSPY blocks - Signature
Signature --------- A signature is a declarative specification of input/output behavior of a DSPy module. Signature class 幫我們定義 in...
DSPy blocks - Data
DSPy 用 `Example` object 來代表每一個 Dataset,例如 `qa_pair = dspy.Example(question="This is a question?", answer="This is an answer.")` `ds...
LLM - RAG - Retrieval-Augmented Generation
RAG 全名是 Retrieval-Augmented Generation RAG 的好處是針對一些新聞時事或是一些在 changing 的 fact 我們沒辦法花 multi millions to retrain the base model,所以就把這些相關知...
LLM and Tokenization
所謂的 Tokenization 就是把文字轉化為數字的方法,你也許在想這不是很簡單嗎?就一個文字對應一個數字就行了,但如果這樣做的話我們需要太多的空間去儲存這些可以無限新增的文字(for example: 人類狂增加 Emoji lol) Andrej 大神在[他的...
LLM training stage
1. Pre-training 搜集海量的網路文本資料訓練出一個 Base Model 1. Fine-tuning 藉由人工介入,輸入各類資料,主要有兩種做法 1) 很多人工餵的 QA 資料讓 LLM 知道 How to answer ques...
Rails Console truncate the attributes
After Ruby 3, rails console will truncate the attributes, it's because `IRB.conf[:ECHO_ON_ASSIGNMENT]` is default to `:truncate`, you can...
Case Study: Bootstrapped SaaS hits $5500 MRR in 3 days of launch.
Lean Startup 老生常談,但很少人能做到,尤其是 Engs. https://www.reddit.com/r/SaaS/comments/1896r7e/bootstrapped_saas_hits_5500_mrr_in_3_days_of/
Deploy Rails with Kamal
[https://nts.strzibny.name/deploying-rails-single-server-kamal/](https://nts.strzibny.name/deploying-rails-single-server-kamal/?ref=blog....
PWA
Service Worker 可以幫忙 install assets, intercept request (so we can fetch cache from local), pre-fetching, and removing old cache. Mozill...
Rails 7 adds AudioAnalyzer to ActiveStorage
AudioAnalyzer 可以幫忙解析 audio 的 metadata [https://blog.saeloun.com/2021/06/30/rails-7-adds-audio-analyzer-to-active-storage/](https://blo...
General Text Embeddings (GTE) model
Supabase open sourced 了一個 embedding 跑分比 text-embedding-ada-002 (open AI)厲害的 model,有興趣的話可以搭配 [Ollama](https://blog.waynechu.cc/docker-like...
VSCode dev container
無意間發現的 VS Code 有個 dev container 的功能,簡單來說就是可以幫你用 Docker 設定好環境,設定都在 `.devcontainer` 的資料夾內,可以參考官方文章: [https://code.visualstudio.com/docs...
Landing Page design - illustration image
這個 [tweet](https://twitter.com/helloitsolly/status/1737055078987464847?ref=blog.waynechu.cc) 裡的人是做 landing page 相關的服務的,所以其實算是廣告文,但他提到了一些還...
A new DB-based queuing backend for Active Job
說是可以取代下列的各個 Gems ``` # Jobs gem "resque", "~> 2.0.0" gem "resque_supervised_fork", bc: "resque_supervised_fork" gem "resque-pool",...
Docker-like LLM setup - ollama
看到這個 [ollama](https://github.com/jmorganca/ollama?ref=blog.waynechu.cc) github repo,挺有趣的,簡化了很多 local setup LLM 的麻煩,並且支援 HTTP interface,這樣...
Rails 7 new error reporting/handling methods
Rails 7 推出了 in house error handler 來取代大家最常使用的 `begin ... rescue` block,官方給的最簡 example looks like this: ``` Rails.error.handle(Somethi...
Add syntax highlight to Ghost CMS
Like I mentioned in my previous post that I recently [migrated my blog from self host to Ghost](https://blog.waynechu.cc/migrate-blog-to-...