Skip to content

Instantly share code, notes, and snippets.

View tamnd's full-sized avatar

Tam Nguyen Duc tamnd

  • Ho Chi Minh City, Vietnam
View GitHub Profile

A segment tree is a data structure that helps answer questions about a range of numbers very quickly, while also allowing updates to the numbers.

Think of it like a smart filing system for an array.

Suppose you have this array:

Index: 0 1 2 3 4 5 6 7
Value: 2 1 5 3 4 7 6 8
@tamnd
tamnd / 2026_model_catalog.md
Created June 23, 2026 11:56
The 2026 model catalog

17: The 2026 model catalog refresh, with draft pairings for speculative decoding

This document refreshes the curated catalog in 05 against what actually exists and is downloadable on 2026-06-23, and it folds in the speculative-decoding angle that docs 15 and 16 made load-bearing. Doc 05 is still the canonical catalog for column semantics, the master table, and the gateway wiring; this doc is the dated overlay that corrects the model names, re-sizes the picks against the same ~22 GB usable budget, and adds one new column to every large pick: the draft model or built-in MTP head it speculates against.

Two things changed since 05 and 01 were written. First, the model landscape moved: several names the early landscape doc guessed at (Qwen3.6/3.5, DeepSeek-V4, Gemma 4, Llama 4, GLM-5.2, Kimi K2.7, Phi-5) resolved to real releases that look nothing like the guesses, and some of thos

@tamnd
tamnd / programmer.md
Created May 7, 2026 19:18
The Programmer After AI

The Programmer After AI

Programming used to leave fingerprints.

A person who wrote a piece of code had usually spent enough time inside it to know something about it. Not everything, and often less than they claimed, but enough to carry some memory of the choices. They had named the variables, moved the data around, found the missing branch, stared at the error, and returned to the same file often enough that the program had passed through them.

That link has weakened. A programmer can now produce a large diff without having lived with the decisions inside it. The code can arrive with good names, reasonable structure, plausible tests, and a calm explanation of the tradeoffs. It can look considered before anyone has really considered it.

This changes the job.

// matmul.cpp
#include <vector>
#include <eigen/Dense>
#include "matmul.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/cc/ops/standard_ops.h"
using namespace tensorflow;
func plusOne(digits []int) []int {
n := len(digits)
i := n - 1
for i >= 0 {
if digits[i] == 9 {
digits[i] = 0
i--
} else {
digits[i]++
return digits

2017-04-07

TODO

  • Learn Webpack
  • Front-end
    • Setup front-end project with Vue.js and webpack
    • List all pages and components
    • List all APIs
  • Design
    • Language page
  • Navbar
@tamnd
tamnd / 1.1. ipynb
Last active August 29, 2015 14:21
1.1 Polynomial Curve Fitting.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{