This is explaining stuff relevant to AOC 2021 day 6
First lets do fibonacci numbers because it's smaller (2x2 matrix instead of 9x9) and it's familiar ground.
So you can implement fibs like this:
def fib(n):
# Some of these settings came from http://cheat.errtheblog.com/s/git | |
[alias] | |
br = branch | |
brav = branch -avv | |
brv = branch -vv | |
ci = commit | |
co = checkout | |
contributors = shortlog -se | |
df = diff |
# On slow systems, checking the cached .zcompdump file to see if it must be | |
# regenerated adds a noticable delay to zsh startup. This little hack restricts | |
# it to once a day. It should be pasted into your own completion file. | |
# | |
# The globbing is a little complicated here: | |
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct. | |
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error) | |
# - '.' matches "regular files" | |
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours. | |
autoload -Uz compinit |
<html> | |
<head> | |
<title>Stripe Gradient</title> | |
</head> | |
<body> | |
<canvas id="gradient-canvas" data-js-darken-top data-transition-in> | |
<!-- | |
Remove data-js-darken-top to keep the same brightness in the upper part of the canvas | |
--> | |
</canvas> |
import SwiftUI | |
extension Color { | |
static var background: Color { | |
return Color(uiColor: .systemBackground) | |
} | |
static var secondaryBackground: Color { | |
return Color(uiColor: .secondarySystemBackground) | |
} |