Skip to content

Instantly share code, notes, and snippets.

View ritchiecarroll's full-sized avatar
🤔
Pondering the nature of the universe...

J. Ritchie Carroll ritchiecarroll

🤔
Pondering the nature of the universe...
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 15, 2026 19:27
microgpt
"""
The most atomic way to train and inference 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
@ritchiecarroll
ritchiecarroll / README.md
Last active January 15, 2026 15:33
Manual Windows Partitions Recovery and Restore from Windows Image Backup

Manual Windows Partitions Recovery and Restore from Windows Image Backup

Steps below iterate how to manually recreate the disk partitions required by Windows and restore a Windows installation from a system image backup created with the "Backup and Restore (Windows 7)" feature, especially when the official steps fail.

These steps were tested with Windows 11, but should work with prior versions of Windows as well:

@mikeando
mikeando / Demo.c
Last active September 14, 2025 17:32
Example of using C++ from C.
#include "HMyClass.h"
#include <stdio.h>
void my_eh( const char * error_message, void * unused)
{
printf("my_eh: %s\n", error_message);
}
int main()
{