This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
import dataclasses | |
import sys | |
from typing import Iterable, Self | |
IGNORED_WORDS: frozenset[str] = frozenset([ | |
'adv', | |
'dis', | |
'eds', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
int write_all(int fd, const void *buf, size_t count) { | |
const char *cbuf = (const char *)buf; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""An example of how to design Factorio factories using linear algebra. | |
This program computes the number of oil refineries, chemical plants, and | |
assembly machine 2s needed to convert an abundant supply of crude oil and water | |
into 1.33 rocket fuel per second, the rate needed to satisfy one rocket silo in | |
the base game, not including modules. | |
Two abstract vector spaces are constructed: one representing products, and one | |
representing recipes. Each recipe is associated with a balanced equation over | |
products. By expressing this association as a matrix, we can express the |
OlderNewer