A collection of all my interviews about my ‘How to Get Rich’ tweetstorm.
Wealth is assets that earn while you sleep
Naval is a prolific tech investor and founder of AngelList
#!/usr/bin/env python3 | |
# https://github.com/FateScript/experiments/blob/main/se/mpi/mpi.py | |
# https://github.com/facebookincubator/gloo/tree/main/gloo | |
import math | |
import multiprocessing | |
import os | |
import numpy as np |
A collection of all my interviews about my ‘How to Get Rich’ tweetstorm.
Wealth is assets that earn while you sleep
Naval is a prolific tech investor and founder of AngelList
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
import numpy as np | |
import gym | |
# Hyperparameters | |
num_inputs = 4 | |
num_actions = 2 |
× / | |
← → ↔ ⇐ ⇒ ⇔ | |
⟵ ⟶ ⟷ ⟸ ⟹ ⟺ | |
∀ ∃ | |
∂ ∫ | |
∈ ∊ ∉ | |
∏ ∑ | |
∙ ⋅ | |
√ | |
∞ |
import numpy as np | |
class ModelArgs: | |
dim = 288 | |
n_layers = 6 | |
n_heads = 6 | |
norm_eps = 1e-6 | |
def build_cos_sin_cache(head_dim, seq_len, base=10000): | |
theta = 1. / (base ** (np.arange(0, head_dim, 2, dtype=np.float32) / head_dim)) |
import numpy as np | |
N_inp = 64 | |
N_out = 64 | |
d = 128 | |
Q = np.random.randn(N_out, d) | |
K = np.random.randn(N_inp, d) | |
V = np.random.randn(N_inp, d) | |
O = np.random.randn(N_out, d) |
import numpy as np | |
from threading import Barrier, Thread | |
from collections import namedtuple | |
dim3 = namedtuple("dim3", ["x", "y", "z"], defaults=(1, 1)) | |
TILE = 16 | |
def cdiv(a, b): |
// ==UserScript== | |
// @name adventofcode daylight mode | |
// @namespace Violentmonkey Scripts | |
// @match https://adventofcode.com/* | |
// @grant none | |
// @version 1.0 | |
// @author scturtle | |
// @description 2023/11/27 16:52:13 | |
// ==/UserScript== |
#!/usr/bin/env python3 | |
import re | |
from pathlib import Path | |
from typing import List | |
MARK = "// -----// IR Dump" | |
PAT = re.compile(r'IR Dump \w+ (\w+)') | |
def main(infile: Path, outdir: Path): | |
assert infile.exists(), f'{infile} not exists' |
import json | |
import time | |
import random | |
import struct | |
import urllib.request | |
from pathlib import Path | |
# https://www.amiiboapi.com/api/amiibo/ | |
database = json.load(open("amiibos.json")) |