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
//made with Rune.js | |
var r = new Rune({ | |
container: "#canvas", | |
width: 800, | |
height: 800, | |
debug: true | |
}); | |
//background | |
rect_size = 900 |
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 | |
import sys | |
from textblob import TextBlob | |
import itertools | |
def build_model(tokens, n): | |
"Builds a Markov model from the list of tokens, using n-grams of length n." | |
model = dict() | |
if len(tokens) < n: | |
return model |
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 argparse | |
import base64 | |
import httplib2 | |
from pprint import pprint | |
import random | |
from textblob import TextBlob | |
from googleapiclient import discovery | |
from oauth2client.client import GoogleCredentials |
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 | |
import sys | |
from math import sqrt | |
from collections import namedtuple | |
try: | |
import Image | |
except ImportError: | |
from PIL import Image |
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 __future__ import division | |
from random import shuffle | |
import sys | |
import string # to find punctuation | |
import re | |
import random | |
#put punctuation in a set | |
punctuation_set = set(string.punctuation) |
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 random import shuffle | |
from TwitterSearch import * | |
import sys | |
import random | |
import pprint | |
import re | |
debate = open("RepubDebate.txt", "r") |
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 __future__ import division | |
from random import shuffle | |
import sys | |
import string # to find punctuation | |
import re | |
import pprint | |
import random | |
#load source text |
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
//what I have so far. Some is a work in progress, but this is the general idea | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Untitled</title> | |
<script src="libraries/p5.js" type="text/javascript"></script> | |
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
var searchButton; | |
var input; | |
var video; | |
var id; | |
function setup() { | |
searchButton = createButton('Shuffle'); | |
searchButton.style("color", "#8B008B"); | |
searchButton.position(0,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
import sys | |
import random | |
all_words_ever = list() | |
for line in sys.stdin: | |
line = line.strip() | |
words = line.split(",") | |
for item in words: |