Skip to content

Instantly share code, notes, and snippets.

View erichocean's full-sized avatar

Erich Ocean erichocean

  • Xy Group Ltd
  • North Carolina
View GitHub Profile
@letFunny
letFunny / Dockerfile
Created June 15, 2026 13:22
TLA models to reproduce SQLite's WAL bug and see whether dqlite is affected
FROM ubuntu:24.04
ENV TLA_HOME=/opt/tla \
PATH=$PATH:/opt/tla
RUN apt-get update && apt-get install -y \
default-jre \
curl \
&& rm -rf /var/lib/apt/lists/*
@karpathy
karpathy / microgpt.py
Last active September 6, 2026 19:12
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active September 1, 2026 04:55
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

Boost Prompt

A prompt to boost your lazy "do this" prompts. Install with one of the buttons below.

Install in VS Code Install in VS Code Insiders

Use

package examples
import (
"github.com/XANi/loremipsum"
"github.com/go-chi/chi/v5"
. "github.com/starfederation/datastar-dev/site/shared"
datastar "github.com/starfederation/datastar/sdk/go"
"math/rand/v2"
"net/http"
"time"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@esshka
esshka / dual_math.clj
Created April 8, 2025 02:18
clojure dual nums impl
(ns dual-math
(:refer-clojure :exclude [+ - * / abs max min sin cos tan asin acos atan exp log pow sqrt])
(:require [clojure.core :as core]))
;; == Part 1: Dual Number Definition and Helpers ==
(defrecord DualNumber [value deriv])
;; Helper to check if something is a dual number
(defn dual? [x] (instance? DualNumber x))
#!/usr/bin/env python3
from flask import Flask, render_template_string
app = Flask(__name__)
@app.route('/')
def dashboard():
return render_template_string(r'''
<!DOCTYPE html>
<html lang="en">
@willccbb
willccbb / grpo_demo.py
Last active September 3, 2026 00:12
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active August 27, 2026 16:18
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference