Skip to content

Instantly share code, notes, and snippets.

@ktibb
ktibb / UtterClass.pde
Created April 16, 2012 04:59
Dictionary Aloud
class Utter {
String global_txt;
float life=255;
float x;
float y;
float r;
float g;
float b;
//the contructor
@ktibb
ktibb / fizzbuzz.pde
Created April 14, 2012 18:36
FizzBuzz
int i=1;
int z=0;
void setup() {
}
void draw() {
for (i=1; i<=100; i++) {
if (i%3==z && i%5==z) {
println ("fizzbuzz");
@ktibb
ktibb / 1984_D1.py
Created April 11, 2012 02:47
Markov code applied to the text of 1984
import urllib
import BeautifulSoup
import re
from random import choice
#import context_free
import sys
import markov
html = urllib.urlopen('http://www.george-orwell.org/1984/0.html').read()
@ktibb
ktibb / Web_to_Markov.py
Created April 9, 2012 14:57
Not Working: feeding webtext into Markov code
import urllib
import BeautifulSoup
import re
from random import choice
#import context_free
import sys
import markov
html = urllib.urlopen('http://www.george-orwell.org/1984/0.html').read()
@ktibb
ktibb / Prophetic Quatrain
Created March 7, 2012 23:35
RWET Midterm
import urllib
import BeautifulSoup
import re
import nltk
from random import choice
#import context_free
part = dict()
words = list()
final = list()
import urllib
import BeautifulSoup
import re
html = urllib.urlopen('http://www.oprah.com/relationships/What-Kind-of-Woman-Watches-Porn-Researchers-Find-Answers').read()
soup = BeautifulSoup.BeautifulSoup(html)
#texts = soup.findAll(text=True)
texts = soup.find("div", {"class": "arial14"})