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
#/usr/bin/python | |
# use this script to make one of those videos where it speeds up | |
# every time something happens | |
# this has only been tested on a Mac with Python 2.7 | |
# Also, moviepy is picky about codecs. What I have here seems to work | |
# (libxvid) but you may need to try something else | |
# Your mileage may vary |
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
nn() { | |
# the header template | |
ft="--- | |
Title: Untitled Note | |
Template: blog-post | |
Description: New Note | |
Date: $(date) | |
Tags: | |
---"; |
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
{ | |
"origin": ["this could be a tweet", "this is #alternatives# tweet", "#completely different#"], | |
"alternatives" : ["an example", "a different", "another", "a possible", "a generated", "your next"], | |
"completely different" : ["and now for something completely different", "so long and thanks for all the fish", "or, maybe, #alternatives# badger"] | |
} |
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 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()) ) |
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
# 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" |
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
# 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 |
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
{"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" |
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 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",'\'']: |
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
// 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"; |
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
{"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 |