Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / min-char-rnn.py
Last active July 21, 2026 18:39
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ef4
ef4 / examples.md
Last active January 29, 2026 09:20
Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.

So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.

List of polyfill packages that were used in webpack 4

For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback.

@wararyo
wararyo / .M5PaperS3 Authenticator (TOTP).md
Last active January 18, 2026 18:13
M5PaperS3 Authenticator (TOTP)

M5PaperS3 Authenticator

M5PaperS3で、TOTPによる2段階認証コードを生成できるアプリケーションです!  
一応Google Authenticator等の代わりに使えますが、実用を想定していません🙏
MITライセンスに従い、自己責任でお願いいたします。

Googleアカウント、GitHub、X、Slack、AWSなどがTOTPによる2段階認証に対応しています。

使用方法