Skip to content

Instantly share code, notes, and snippets.

Ag déanamh tada

Noah Ó Donnaile iandioch

Ag déanamh tada
View GitHub Profile
@iandioch
iandioch / cirlcey_spirally_thing.js
Created Jul 6, 2018
p5js random wee experiment
View cirlcey_spirally_thing.js
var fcount = 0;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
noStroke();
smooth();
@iandioch
iandioch / crack.py
Created Feb 22, 2018
Crack a monoalphabetic cypher
View crack.py
ORDERED_ENGLISH = [c for c in "ETAOINSHRDLCUMWFGYPBVKJXQZ"]
# Dict mapping cypher letter to decrypted letter. Was empty in the beginning.
# Built up piece by piece, first by finding the H between T's and E's to create the
# words "the", "then", "them", "their". Confirmed "PYH" -> "THE".
# Noticed garbled form of the word "sincerity" in the middle of the text. Added
# mappings to fix it. Confirmed "AO" -> "RI".
# Text started to take shape. Noticed lots of garbled "of"s across the text.
# Added "L" -> "O". Also added "Z" -> "W" to fix "whatever".
known = {
@iandioch
iandioch / input.in
Created Dec 10, 2017
Advent of code day 10 input
View input.in
18,1,0,161,255,137,254,252,14,95,165,33,181,168,2,188
@iandioch
iandioch / advent09.in
Created Dec 9, 2017
Advent of code day 9 input
View advent09.in
{{{{{<!!!>},<!e!!!'ue!o!!!>"oo<u!}<<{>},{{{}},{<!>},<'>,{<!!"!!!>"u!!!>!!!>,<"!>,<!>},<}!!}!!!>{>}},{{<"!>}}!'!!u!!!!e!!!>>}}}},{{{<!>>}},{{{<{{!!,>},{<u!!e'!>},<>}}},{<,o!!!""a!>},<!>},<<}>,{<!!!!,,!>,<!>},<"!!!>u>}}},{{{<}{!<{i!>>}},{{}},{{},<!>,<!>,<!>!!,<!!!!{}!!i>}}},{{},{{{}}},{{<ae{>,{}}},{{<!!!!">,<{'}!!},<!>a,!>!!!>{!!e>},{{<!ao!!i!'!>,<!!o>,<'e}!!!>!!!>e'!!u{>},<",'i!!!>{>},{<uai,!!{!>},<uu!!e>}}},{{{{{<!!,a!>>}}}},{},{{{{{{},{{<au<,!!iuu!!!!!>,<>}}},{<i!>,<!>},<!!'iu{!!o"{i,i}!{{>}},{},{{<a!>a"!!!!!>},<>,{<!!!>">}},{{{{<ae}a!!!!{!},u!!o<!!!">},{<!>,<!!!>!!!>},<ee<!'!>},<!!!>u"ae>},{<e'!!!>},<'e!>>}},{<u!>},<a!>!>i,u>,{<i,!!>}},{<'>}},{{<!ee!>},<!!!>!!!>>},<!!!>},<a!u>}}}},{{{{{}}},<!!!>>},{}}},{{{{<!>,<,,},,!>,<<!!!!<<!!<!!!!>}}},{{},{}},{{},{<o,!>},<!!}!,!>},<o!>uoa{<a!!,<a!>,<>}}},{{<'!>},<e!>>}},{{{<!>"<e!!!>}!!!>!>u<'i!!}'!!!>>},<ie!>a{!{>}}}},{{{{<{i<!>}e!>},<}!!,,!>},<!!aa!>a!!!>!,{>,{{<ii!>,<>},<{e!!!>"!!o!>,<'a!>},<u!>!>>}},{<!!!>"!>,<!<!>,<u!!!!i!>,<a!eeu!!!!!>!!e>}},{<i,}a!!{e>}},{{{<}eue
View repeal8.pde
int iter = 0;
final int MAX_ITER = 120;
final String PHRASE = "Repeal";
final int TEXT_SIZE = 96;
void setup() {
size(600, 600);
frameRate(60);
background(0);
noStroke();
View rotatedog.pde
PImage dog;
final int NUM_DOGS = 5;
int iter = 0;
final int MAX_ITER = 64;
void setup(){
size(600, 600);
dog = loadImage("dog-mature-landing-hero.jpg");
}
@iandioch
iandioch / kattis_dcu.py
Last active Apr 7, 2017
Measure DCU's contributions to Ireland's score on open.kattis.com
View kattis_dcu.py
#!/usr/bin/python3
# adapted from code at https://github.com/iandioch/ceres/
import json
from urllib.request import urlopen, Request
from bs4 import BeautifulSoup
def is_dcu(c):
return c == 'Dublin City University'
@iandioch
iandioch / kattis_cpssd.py
Last active Apr 7, 2017
Measure CPSSD's contributions to Ireland's score on open.kattis.com
View kattis_cpssd.py
#!/usr/bin/python3
# adapted from code at https://github.com/iandioch/ceres/
import json
from urllib.request import urlopen, Request
from bs4 import BeautifulSoup
cpssds = set([
'Noah Ó Donnaile',
View keybase.md

Keybase proof

I hereby claim:

  • I am iandioch on github.
  • I am iandioch (https://keybase.io/iandioch) on keybase.
  • I have a public key whose fingerprint is 4874 78D2 5F43 05D7 7770 FC4B 419C A3B3 F48E 4E60

To claim this, I am signing this object:

@iandioch
iandioch / modulus_rules.md
Last active Feb 13, 2016
Arithmetic rules with modulus
View modulus_rules.md

Addition

(a + b) % n = ((a % n) + (b % n)) % n

Multiplication

(a * b) % n = ((a % n) * (b % n)) % n

Division

You can’t perform that action at this time.