Archive for February, 2009

 

Assignment #4:

wordclloud

My lame attempt to use the word cloud code. Took text from Edgar Allen Poe’s Dreamland and tried to make it a palindrome.

This code takes splits the text into words and then makes the more commonly used words bigger and less used smaller.

Processing App

Posted by admin under Uncategorized  •  No Comments

Assignment #3:

For assignment #3 i was attempting to make use of the random lines code and the Negative space code. What i wanted to do was to get then empty spaces in a piece of text and then replace the blanks with random characters and then randomize the lines so that I would get some abstract patterns.

import java.util.regex.*;
import java.util.ArrayList;
import com.decontextualize.a2z.TextFilter;

public class NegativeSpace2 extends TextFilter {
public static void main(String[] args) {
new NegativeSpace2().run();
}

private int longestLineLength = 0;

private ArrayList<String> lines = new ArrayList<String>();

private String[] chars = { “3″, “*”, “o”, “0″ };

//private char[] chars = new char[]{’3′,’*',’o',’0′};
int r = (int)(Math.random()*chars.length);

String randomChar = chars[r];

public void eachLine(String line) {
if (line.length() > longestLineLength) {
longestLineLength = line.length();
}
lines.add(line);
}

public void end() {
for (String line: lines) { while (lines.size() > 0) {
int randomIndex = (int)(Math.random() * lines.size());

}

line = line.replaceAll(”\\W”, chars[r]);
line = line.replaceAll(”\\w”, ” “);
println(line);
}
}
}

When i compile i get no errors . But when i execute it (ctrl d) i get nothing. All i get is a ^D on the screen and it doesn’t do anything else.

Posted by admin under Uncategorized  •  No Comments

Assignment #2:

Assignment 2 was to use java to play around with text.

My aim was to censor Biggie’s Hypnotized , so i changed the n-word to cupcakes and $h*t to dozer and sort it. Code is really simple all i did was use the replace function.

o/p:

(Take that, take that, take that, haha!)
All Philly hoes, dough and Moschino (c’mon)
And I just love your flashy ways
And I just love your flashy ways
And I just love your flashy ways
And I just love your flashy ways
And I just love your flashy ways
And I just love your flashy ways (uh-huh)
And I just love your flashy ways (uh-huh)
And I just love your flashy ways (uh-huh)
And I just love your flashy ways (uh-huh)
At last, a nigga rappin bout blunts and broads
At my arraignment, note for the plantiff
Bang every MC easily, busily
Biggie Biggie Biggie (uh-huh) can’t you see (huh)
Biggie Biggie Biggie (uh-huh) can’t you see (uh)
Biggie Biggie Biggie (uh-huh) can’t you see (uh)
Biggie Biggie Biggie (uh-huh) can’t you see (uh)
Biggie Biggie Biggie can’t you see
Biggie Biggie Biggie can’t you see
Biggie Biggie Biggie can’t you see
Biggie Biggie Biggie can’t you see
Biggie Biggie Biggie can’t you see
Bulletproof glass tints if I want some ass
Close like Starsky and Hutch, stick the clutch
Come through, have sex on rugs that’s Persian (that’s right)
Come up to your job, hit you while you workin (uhh)
Condo paid for, no car payment
Cubans with the Jesus piece (thank you God), with my peeps
Dare I squeeze three at your cherry M-3
Dead right, if the head right, Biggie there ery’night
Escargot, my car go, one sixty, swiftly
Every cutie wit a booty bought a Coogi (haaaaah!)
Face it, not guilty, that’s how I stay filthy (not guilty)
Girlfriend here’s a pen, call me round ten
Girls walk to us, wanna do us, screw us
Gon’ blast squeeze first ask questions last
Guess that’s why they broke, and you’re so paid
Guess that’s why they broke, and you’re so paid (hah)
Guess that’s why they broke, and you’re so paid (uh)
Guess that’s why they broke, and you’re so paid (uh)
Guess that’s why they broke, and you’re so paid (uh)
Guess that’s why they broke, and you’re so paid (uh)
Guess that’s why they broke, and you’re so paid (uh)
Guess that’s why they broke, and you’re so paid (uh)
Guess that’s why they broke, and you’re so paid (uh)
Hah, sicka than your average Poppa
Hit em wit the force like Obe, dick black like Toby (Obe… Toby)
I can fill ya wit real millionaire dozer (I can fill ya)
I know you sick of this, name brand nigga wit
I put hoes in NY onto DKNY (uh-huh)
I still leave you on the pavement
Leave that ass leakin, like rapper demo
Miami, D.C. prefer Versace (that’s right)
Never lose, never choose to, bruise crews who
Now who’s the real dookie, meanin who’s really the dozer
Packin, askin who want it, you got it nigga flaunt it
Poppa been smooth since days of Underroos
Aecently cupcake frontin ain’t sayin nuttin (nope)
Aicher than Aichie, till you cupcake come and get me
So I just speak my piece, (c’mon) keep my piece
So get with this nigga, it’s easy
Sometimes your words just hypnotize me
Sometimes your words just hypnotize me
Sometimes your words just hypnotize me
Sometimes your words just hypnotize me
Sometimes your words just hypnotize me
Sometimes your words just hypnotize me (hip to)
Sometimes your words just hypnotize me (hypnotize)
Sometimes your words just hypnotize me (hypnotize)
Sometimes your words just hypnotize me (hypnotize)
Tell them hoe, take they clothes off slowly
That Brooklyn bulldozer, we on it
That’s how most of these so-called gangsters pass
Them cupcake ride dicks, Frank White push the sticks
Timbs for my hooligans in Brooklyn
Tits and bras, menage-a-tois, sex in expensive cars
Twist cabbage off instinct cupcake don’t think dozer stink
Uhhh, uhhh, uh, c’mon
Watch me roam like Gobe, lucky they don’t owe me
Where the safe show me, homey.. (say what, homey)
Who us? Yeah, Poppa and Puff (ehehehe)
Wreck it buy a new one
Your crew run run run, your crew run run
Your daughter’s tied up in a Brooklyn basement (shhh)
[Verse Three]
do something to us, talk go through us
flows girls say he’s sweet like licorice
for certain, Poppa freakin, not speakin
on the Lexus, LX, four and a half
pink gators, my Detroit players

Posted by admin under Uncategorized  •  No Comments