Skip to content

Instantly share code, notes, and snippets.

"""
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
@emschwartz
emschwartz / README.md
Last active March 2, 2026 01:44
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

# ~/.aerospace.toml
config-version = 2
# Sensible defaults
start-at-login = true
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
after-startup-command = [
@omerfsen
omerfsen / nvidia-smi-cheat-sheet.md
Created November 6, 2025 11:58
nvidia-smi cheat sheet

NVIDIA-SMI Comprehensive Cheat Sheet

Overview

nvidia-smi (NVIDIA System Management Interface) is a command-line tool that provides monitoring, management, and diagnostic information for NVIDIA GPU devices.

It communicates directly with the NVIDIA driver and GPU, and can:

  • Monitor GPU performance, temperature, and utilization
  • Manage power, clock speeds, and ECC
  • Control persistence mode and compute modes
@ivanfioravanti
ivanfioravanti / mlx_memory.sh
Created January 4, 2025 16:42
Script to set MLX memory limits
#!/usr/bin/env bash
# Default values for percentages
DEFAULT_WIRED_LIMIT_PERCENT=85
DEFAULT_WIRED_LWM_PERCENT=75
# Read input parameters or use default values
WIRED_LIMIT_PERCENT=${1:-$DEFAULT_WIRED_LIMIT_PERCENT}
WIRED_LWM_PERCENT=${2:-$DEFAULT_WIRED_LWM_PERCENT}
@ravarcheon
ravarcheon / theHorse.txt
Last active March 2, 2026 01:39
the horse that blocks your screen after a 2 minutes
// ==UserScript==
// @name the horse that stands in your way
// @namespace http://tampermonkey.net/
// @version 2026-03-01
// @description no more than 2 minutes of twitter. the first minute is a clear view, the second minute is where the horse slowly fades in. third minute and beyond there is nothing to see except horse
// @author You
// @match http*://*.x.com/*
// @match http*://*.instagram.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=x.com
// @grant none
@Mr-Precise
Mr-Precise / vs_buildtools_dl_list.md
Created February 28, 2024 05:33
MSVC / VS / Buildtools download link collection list
@ArtBIT
ArtBIT / GRUB_INIT_TUNE.md
Last active March 2, 2026 01:34
A collection of GRUB init tunes
@IdoBar
IdoBar / install_shiny_server.bash
Last active March 2, 2026 01:31
A script to install R, Rstudio and Shiny-server on an Ubuntu server
#! /bin/bash
# Ask user for sudo password (to be used when needed)
read -s -p "Enter Password for sudo: " sudoPW
# update CRAN repository below if needed
REPO="'https://cran.rstudio.com/'"
# Based on the instructions on Dean Attali's website:
# https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/#user-libraries