This file contains 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
arr = [x*97 `mod` 61 - 30 | x <- [1..20]] | |
-- expecting rhs and lhs to be sorted | |
merge :: Ord a => [a] -> [a] -> [a] -> [a] | |
merge lhs rhs sorted = | |
if length lhs == 0 && length rhs == 0 then | |
sorted | |
else if length lhs == 0 || (length rhs > 0) && head rhs < head lhs then | |
merge (tail rhs) lhs (sorted ++ [head rhs]) | |
else |
This file contains 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
execute pathogen#infect() | |
syntax on | |
filetype plugin on | |
set clipboard=unnamed | |
set mouse=a | |
noremap <Up> <NOP> | |
noremap <Down> <NOP> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>moonshot</title> | |
<style> | |
* {padding: 0; margin: 0; outline: 0;} | |
body {display: flex; align-items: center; justify-content: center; margin-top: 5vh} | |
canvas {width: 800px; height: 800px;} |
This file contains 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
from enum import Enum | |
from math import floor, sin, cos, pi | |
import random as r | |
from uuid import uuid4 | |
import cairo | |
class Rune: | |
top = ['angstrom', 'antennae', 'docstring', 'swinton'] | |
shape = ['shape_'+a for a in ['circle', 'boob', 'penis', 'yinyang', 'triangup', 'deniro', 'triangdown', 'beatrice', 'grimace', 'box', 'domino', 'teeth', 'panini', 'fermata']] |
This file contains 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
// Enter data here: | |
const total_rent = 0; | |
// A measure of the relative quality between different rooms in the same type. | |
// Probably will just go with area for these, but if theres like e.g. a really | |
// shitty bathroom no one wants to use, it might make sense to lower its quality | |
// NOTE: quality of two different types (e.g. a bedroom and bathroom) have nothing | |
// to do with each other and will never be compared. Because of this, rooms | |
// that are one-of-a-type can have their quality left null | |
const room_qualities = { |
This file contains 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 random | |
from math import sin, cos, atan2, acos | |
from math import pi as π, e | |
class ComplexRect: | |
def __init__(self, j, i=0): | |
self.a = j | |
self.b = i |
This file contains 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
<html> | |
<head> | |
<style>*{margin: 0; padding: 0;}</style> | |
<script type="text/javascript" src="./explosion.js"></script> | |
</head> | |
<body onload="main();"> | |
<canvas id="canvas" style="width:100vw;height:100vh"></canvas> | |
</body> |
This file contains 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
out = [] | |
with open('text/skriblio', 'r') as file: | |
for line in file: | |
if '@' in line: | |
continue | |
word = line.strip() | |
if len(word) > 0: | |
out.append(word) |
This file contains 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
const fs = require('fs'); | |
const PNG = require('pngjs').PNG; | |
W = 256; | |
H = 256; | |
AB = '0123456789'; | |
PSIZE = 128; | |
GENS = 300; | |
function choice (arr) { |
This file contains 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
tiles = '*-+=o8|:x '.split('') | |
// tiles = ' #.'.split('') | |
function newWorld () { | |
world = [] | |
for (let i = 0; i < 23; i++) { | |
world.push([]) | |
for (let j = 0; j < 80; j++) { | |
// world[i].push(' ') |
NewerOlder