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 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"}) |
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 urllib | |
import BeautifulSoup | |
import re | |
import nltk | |
from random import choice | |
#import context_free | |
part = dict() | |
words = list() | |
final = list() |
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 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() |
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 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() |
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
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"); |
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
class Utter { | |
String global_txt; | |
float life=255; | |
float x; | |
float y; | |
float r; | |
float g; | |
float b; | |
//the contructor |
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 | |
songs = ["1.txt", "2.txt", "3.txt", "4.txt", "5.txt", "6.txt", "7.txt", "8.txt", "9.txt", "10.txt", "11.txt", "12.txt", "13.txt", "14.txt", "15.txt", "16.txt", "17.txt", "18.txt", "19.txt", "20.txt", "21.txt"] | |
dictfile = "cmuDict.txt" | |
cmu = open(dictfile, "r") | |
dictlines = cmu.readlines() | |
cmu.close() |