Skip to content

Instantly share code, notes, and snippets.

View zachwhalen's full-sized avatar
🥗

Zach Whalen zachwhalen

🥗
View GitHub Profile
@zachwhalen
zachwhalen / game.txt
Created December 2, 2021 17:45
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[2,"a",158,"0",4,"a",155,"0",7,"a",152,"0",2,"a",1,"b",7,"a",147,"0",5,"a",3,"b",7,"a",143,"0",7,"a",5,"b",7,"a",140,"0",6,"a",9,"b",8,"a",136,"0",5,"a",14,"b",7,"a",132,"0",4,"a",19,"b",7,"a",129,"0",4,"a",22,"b",7,"a",125,"0",5,"a",26,"b",6,"a",122,"0",5,"a",29,"b",6,"a",119,"0",4,"a",33,"b",6,"a",115,"0",5,"a",36,"b",5,"a",112,"0",6,"a",39,"b",4,"a",110,"0",5,"a",42,"b",4,"a",106,"0",6,"a",45,"b",4,"a",104,"0",5,"a",48,"b",3,"a",103,"0",5,"a",50,"b",4,"a",99,"0",5,"a",53,"b",4,"a",97,"0",5,"a",55,"b",4,"a",94,"0",5,"a",58,"b",3,"a",93,"0",4,"a",61,"b",3,"a",91,"0",4,"a",63,"b",3,"a",89,"0",4,"a",64,"b",4,"a",87,"0",4,"a",66,"b",4,"a",85,"0",4,"a",69,"b",3,"a",83,"0",3,"a",72,"b",3,"a",81,"0",3,"a",74,"b",3,"a",79,"0",4,"a",75,"b",3,"a",77,"0",4,"a",77,"b",3,"a",75,"0",4,"a",79,"b",1,"a",76,"0",3,"a",79,"b",3,"a",76,"0",3,"a",78,"b",3,"a",76,"0",3,"a",79,"b",3,"a",75,"0",3,"a",79,"b",3,"a",75,"0",3,"a",79,"b",3,"a",76,"0",3,"a",78,"b",3,"a",76,"0",3,"a",78,"b",3,
@zachwhalen
zachwhalen / game.txt
Created December 2, 2021 17:37
flickgame
{"gameLink":"www.flickgame.orgd","canvasses":[[745,"0",4,"f",155,"0",6,"f",154,"0",6,"f",154,"0",6,"f",155,"0",4,"f",133,"0",3,"f",156,"0",5,"f",117,"0",3,"3",35,"0",5,"f",116,"0",5,"3",34,"0",5,"f",116,"0",5,"3",35,"0",3,"f",117,"0",5,"3",156,"0",3,"3",56,"0",3,"3",156,"0",5,"3",155,"0",5,"3",155,"0",5,"3",156,"0",3,"3",269,"0",9,"5",150,"0",11,"5",148,"0",13,"5",146,"0",14,"5",113,"0",3,"3",29,"0",15,"5",112,"0",5,"3",27,"0",16,"5",112,"0",5,"3",27,"0",16,"5",112,"0",5,"3",26,"0",17,"5",113,"0",3,"3",26,"0",18,"5",141,"0",19,"5",80,"0",3,"3",58,"0",19,"5",79,"0",5,"3",47,"0",8,"5",2,"0",18,"5",80,"0",5,"3",43,"0",31,"5",81,"0",5,"3",42,"0",28,"5",86,"0",3,"3",42,"0",28,"5",132,"0",27,"5",133,"0",27,"5",133,"0",27,"5",133,"0",27,"5",133,"0",27,"5",133,"0",27,"5",60,"0",3,"3",70,"0",26,"5",60,"0",5,"3",70,"0",24,"5",61,"0",5,"3",71,"0",23,"5",61,"0",5,"3",53,"0",3,"3",23,"0",14,"5",34,"0",3,"f",26,"0",3,"3",53,"0",5,"3",22,"0",14,"5",33,"0",5,"f",81,"0",5,"3",21,"0",14,"5",34,"0",5,"f",81,"0",5,"3",21,"0",14,
@zachwhalen
zachwhalen / game.txt
Created December 2, 2021 02:52
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[9,"2",1,"3",5,"2",1,"3",5,"2",1,"3",8,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",19,"2",13,"f",5,"2",1,"3",29,"2",1,"3",10,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",5,"2",2,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",11,"2",1,"3",7,"2",13,"f",5,"2",1,"3",5,"2",1,"3",4,"2",1,"3",4,"2",1,"3",13,"2",1,"3",10,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",6,"2",1,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",11,"2",1,"3",7,"2",13,"f",5,"2",1,"3",5,"2",1,"3",4,"2",1,"3",4,"2",1,"3",14,"2",1,"3",9,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",6,"2",1,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",11,"2",1,"3",7,"2",13,"f",5,"2",1,"3",5,"2",1,"3",4,"2",1,"3",4,"2",1,"3",8,"2",1,"3",5,"2",1,"3",9,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",6,"2",1,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5
@zachwhalen
zachwhalen / game.txt
Created December 2, 2021 02:42
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[9,"2",1,"3",5,"2",1,"3",5,"2",1,"3",8,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",19,"2",13,"f",5,"2",1,"3",29,"2",1,"3",10,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",5,"2",2,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",11,"2",1,"3",7,"2",13,"f",5,"2",1,"3",5,"2",1,"3",4,"2",1,"3",4,"2",1,"3",13,"2",1,"3",10,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",6,"2",1,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",11,"2",1,"3",7,"2",13,"f",5,"2",1,"3",5,"2",1,"3",4,"2",1,"3",4,"2",1,"3",14,"2",1,"3",9,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",6,"2",1,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5,"2",1,"3",5,"2",1,"3",3,"2",1,"3",11,"2",1,"3",7,"2",13,"f",5,"2",1,"3",5,"2",1,"3",4,"2",1,"3",4,"2",1,"3",8,"2",1,"3",5,"2",1,"3",9,"2",1,"3",6,"2",1,"3",15,"2",1,"3",5,"2",1,"3",6,"2",1,"3",7,"2",1,"3",6,"2",1,"3",6,"2",1,"3",6,"2",1,"3",5
@zachwhalen
zachwhalen / chessboard_novel.js
Last active December 1, 2020 03:05
A javascript macro for Bonnie Brunish's Chessboard Universe Generator
// Go to http://www.thermeon.net/InfernalMuseum/FIIIC2c.html and run this in a browser console
var txt = "";
while (txt.split(" ").length < 50000){
var yr = document.getElementById("Planet").innerText.split(" ")[2,3];
txt += "YEAR " + yr + "\n-----" + "-".repeat(yr.length) + "\n";
txt += document.getElementById("line0").innerText + "\n";
txt += document.getElementById("line1").innerText + "\n";
txt += document.getElementById("line1plus").innerText + "\n";
txt += document.getElementById("line2").innerText + "\n";
@zachwhalen
zachwhalen / pride.py
Last active September 12, 2019 01:37
This generates a poem from the input of a text file called "pride.txt". It relies on TextBlob.
from textblob import TextBlob
source = open('/path/to/file.txt')
np = TextBlob(source.read()).sentences
def sentenceLength(sent):
return len(sent)
def filter(sent):
for ex in ["Chapter","Section",'\'']:
@zachwhalen
zachwhalen / game.txt
Created February 4, 2019 18:13
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[1495,"0",7,"b",150,"0",11,"b",148,"0",13,"b",145,"0",16,"b",143,"0",17,"b",142,"0",18,"b",141,"0",19,"b",140,"0",20,"b",139,"0",21,"b",138,"0",22,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",23,"b",136,"0",24,"b",135,"0",25,"b",134,"0",26,"b",133,"0",27,"b",132,"0",28,"b",131,"0",29,"b",131,"0",28,"b",36,"0",7,"8",37,"0",7,"9",45,"0",28,"b",35,"0",9,"8",35,"0",9,"9",44,"0",27,"b",35,"0",11,"8",32,"0",12,"9",43,"0",26,"b",35,"0",13,"8",29,"0",15,"9",42,"0",25,"b",35,"0",14,"8",28,"0",16,"9",42,"0",24,"b",26,"0",7,"8",2,"0",15,"8",26,"0",18,"9",42,"0",23,"b",26,"0",25,"8",25,"0",19,"9",43,"0",21,"b",26,"0",26,"8",24,"0",20,"9",44,"0",19,"b",24,"0",29,"8",17,"0",27,"9",45,"0",17,"b",24,"0",30,"8",16,"0",28,"9",45,"0",16,"b",24,"0",30,"8",16,"0",28,"9",46,"0",15,"b",24,"0",30,"8",16,"0",28,"9",48,"0",13,"b",24,"0",30,"8",16,"0",28,"9",50,"0",11,"b",24,"0",30,"8",16,"0",28,"9",52,"0"
@zachwhalen
zachwhalen / another_rainy_day_novel.py
Created November 6, 2018 15:58
Another rainy day novel for NaNoGenMo
# because we need randomness
import random
# create a variable to store the lines
lines = []
# iterate through 75 columns
for c in range(75):
lines.append('')
# add something to each column 5000 times
@zachwhalen
zachwhalen / my_rainy_day_novel.py
Last active November 6, 2018 16:02
A generated novel for a rainy day.
# because we always need randomness
import random
# create a variable to store the novel as it's being written
novel = ''
# iteration
for i in range(50000):
# add this word to the "novel" 50,000 times
novel += " DRIP"
@zachwhalen
zachwhalen / tracery_count.py
Last active October 10, 2018 00:55
A python counter for quantifying the number of possible variations for a Tracery grammar
import json
import re
# find out if a given chunk includes symbols
def get_symbols(phrase):
matches = re.finditer(r"#.*?#", phrase, re.MULTILINE)
symbols = []
for matchNum, match in enumerate(matches):
matchNum = matchNum + 1
symbols.append( re.sub(r"\.a|\.s|\.capitalize|#","",match.group()) )