Skip to content

Instantly share code, notes, and snippets.

View shunkakinoki's full-sized avatar
🍅
(๑✧∀✧๑)

Shun Kakinoki shunkakinoki

🍅
(๑✧∀✧๑)
View GitHub Profile
"""
Simple RL training script for teaching a model to add.
Demonstrates REINFORCE and GRPO algorithms in a minimal implementation.
If you want to run this script, put it inside of nanochat/scripts/ and run it with:
python -m scripts.simple_rl
First add "matplotlib>=3.9.0" to pyproject.toml and run 'uv sync'
I wrote a separate script to download the weights for the model:
@7shi
7shi / evals.md
Last active October 31, 2025 20:36
Benchmark suite for evaluating Ollama LLM performance
  • Machine: EVO-X2
  • CPU: AMD Ryzen AI Max+ 395
  • OS: Windows 11 Pro 24H2
  • RAM: 64GB
  • VRAM 64GB
  • Ollama: 0.12.6
Model Parameters Size (GB) Prompt Eval
hf.co/unsloth/gpt-oss-120b-GGUF:latest 117B 60.88 279.10 33.09
@ben-vargas
ben-vargas / 1-opencode_openai_oauth.md
Last active October 13, 2025 02:38
Config for opencode plugin: opencode-openai-codex-auth

Config for opencode plugin: opencode-openai-codex-auth

For those who might be having edge case behavior, or oddity with start/restart of opencode not retaining last used model properly, or "changing to a different model name" it's likely because of incorrect recommended setup in the opencode.json config file documented in the plugin repo.

You might try the config below, where model id is the key in the models object rather than user-friendly name.

This solved the odd behavior for me with launching opencode and /models slash command - it also provides shorter model names and easier search for all models with "oauth".

image
@DannyAziz
DannyAziz / notify.mdc
Created February 11, 2025 02:14
Cursor Composer notify rule on macos
---
description: At the end of any task
globs: *
---
At the end of any task run the command `osascript -e display notification "{message}" with title "{title}"`. Fill in message and title based on the task you just completed

Run dev network:

# set to an L1 node RPC
eth_rpc=""

# run 7702-enabled local forked network
anvil --fork-url "$eth_rpc" --auto-impersonate --odyssey
@adibhanna
adibhanna / config
Last active October 17, 2025 19:30
Ghostty config
font-family = BerkeleyMono Nerd Font
#font-family = Iosevka Nerd Font
# font-family = SFMono Nerd Font
font-size = 20
theme = GruvboxDarkHard
shell-integration-features = no-cursor,sudo,no-title
cursor-style = block
adjust-cell-height = 35%
# background-opacity = 0.96
@back-2-95
back-2-95 / migrate.load
Created March 16, 2024 09:43
Pgloader load file for migrating from PlanetScale MySQL to Neon PostgreSQL
LOAD DATABASE
FROM mysql://MY_PLANETSCALE_USERNAME:[email protected]/MY_DATABASE?sslmode=require
INTO postgres://MY_NEON_USERNAME:endpoint=ep-MY_ENDPOINT_ID;MY_NEON_PASSWORD@ep-MY_ENDPOINT_ID.eu-central-1.aws.neon.tech/MY_DATABASE?sslmode=require
WITH include drop, create tables, quote identifiers
ALTER schema 'MY_DATABASE' rename to 'public'
;

niacin

The basics.

Zero-configuration deployment + upgradable Ethereum smart contracts. Some people call this chainops (like devops).

# Deploy a contract TakeMarket.sol.
niacin deploy TakeMarket

Specs

CPU

  • AMD Ryzen 9 5950X AM4, 4.9 GHz, 16-Core

RAM

  • Crucial Ballistix 4 x 16GB 3600 MHz (DDR4)

Nvme

  • WD Black SN850X 4 TB M.2 2280
static async calcPreVerificationGas(
userOp: UserOperationType,
chainId: number,
entryPointContract: ethers.Contract,
overheads?: Partial<DefaultGasOverheadType>,
) {
const { defaultGasOverheads } = config;
const ov = { ...defaultGasOverheads, ...(overheads ?? {}) };
const p: UserOperationType = {
...userOp,