2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/basics/sketch.js:
--------------------------------------------------------------------------------
1 |
2 | var x; // variables
3 | var y;
4 |
5 | function setup() { // function declaration
6 | createCanvas(600, 400); // instead of size()
7 | x = width/2;
8 | y = height/2;
9 | }
10 |
11 | function draw() {
12 |
13 | background(51);
14 |
15 |
16 | fill(255);
17 | ellipse(x, y, 64, 64);
18 |
19 | y = y + random(-1, 1);
20 |
21 | if (mouseX > x) {
22 | x = x + random(0,1);
23 | } else {
24 | x = x - random(0,1);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/empty_example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/empty_example/sketch.js:
--------------------------------------------------------------------------------
1 |
2 | function setup() {
3 | }
4 |
5 | function draw() {
6 | }
7 |
8 | function mousePressed() {
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/processing_p5_conversion_0/examples-basics-form-bezier.pde:
--------------------------------------------------------------------------------
1 | /**
2 | * Bezier.
3 | *
4 | * The first two parameters for the bezier() function specify the
5 | * first point in the curve and the last two parameters specify
6 | * the last point. The middle parameters set the control points
7 | * that define the shape of the curve.
8 | */
9 |
10 | void setup() { // **change** var setup = function() to void setup()
11 | size(640, 360); // **change** createGraphics() to size()
12 | stroke(255);
13 | noFill();
14 | }
15 |
16 | void draw() { // **change** var setup = draw() to void draw()
17 | background(0);
18 | for (int i = 0; i < 200; i += 20) { // **change** var i to int i
19 | bezier(mouseX-(i/2.0), 40+i, 410, 20, 440, 300, 240-(i/16.0), 300+(i/8.0));
20 | }
21 | }
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/processing_p5_conversion_0/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/processing_p5_conversion_0/sketch.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Processing > Ex > Basics > Form > Bezier
3 | *
4 | * Bezier.
5 | *
6 | * The first two parameters for the bezier() function specify the
7 | * first point in the curve and the last two parameters specify
8 | * the last point. The middle parameters set the control points
9 | * that define the shape of the curve.
10 | *
11 | */
12 |
13 | function setup() { // **change** void setup() to var setup = function()
14 | createCanvas(640, 360); // **change** size() to createCanvas()
15 | stroke(255); // stroke() is the same
16 | noFill(); // noFill() is the same
17 | }
18 |
19 | function draw() { // **change** void draw() to var setup = draw()
20 | background(0); // background() is the same
21 | for (var i = 0; i < 200; i += 20) { // **change** int i to var i
22 | bezier(mouseX-(i/2.0), 40+i, 410, 20, 440, 300, 240-(i/16.0), 300+(i/8.0)); // bezier() is the same
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/week1/00_Processing_to_p5.js/processing_p5_conversion_1/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/sketch_bubbleobject1.js:
--------------------------------------------------------------------------------
1 | //var x,y;
2 |
3 | var bubble;
4 |
5 | function setup() {
6 | createCanvas(600,400);
7 | //x = width/2;
8 | //y = height;
9 |
10 | bubble = {
11 | x : width/2,
12 | y : height,
13 | w : 100
14 | };
15 | }
16 |
17 | function draw() {
18 | background(50);
19 |
20 | fill(125);
21 | stroke(255);
22 | ellipse(bubble.x,bubble.y,bubble.w,bubble.w);
23 |
24 | bubble.y = bubble.y - 1;
25 | bubble.x = bubble.x + random(-1,1);
26 | }
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/sketch_bubbleobject2_method.js:
--------------------------------------------------------------------------------
1 | var bubble;
2 |
3 | function setup() {
4 | createCanvas(600,400);
5 |
6 | bubble = {
7 | x : width/2,
8 | y : height,
9 | w : 100,
10 | move : function() {
11 | this.x = this.x + random(-1,1);
12 | this.y = this.y - 1;
13 | }
14 | };
15 |
16 | }
17 |
18 | function draw() {
19 | background(50);
20 |
21 | fill(125);
22 | stroke(255);
23 | ellipse(bubble.x,bubble.y,bubble.w,bubble.w);
24 | bubble.move();
25 |
26 | //bubble.y = bubble.y - 1;
27 | //bubble.x = bubble.x + random(-1,1);
28 | }
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/sketch_bubbleobject3_multiple.js:
--------------------------------------------------------------------------------
1 | var bubble1;
2 | var bubble2;
3 |
4 | function setup() {
5 | createCanvas(600,400);
6 |
7 | bubble1 = {
8 | x : 300,
9 | y : height,
10 | w : 100,
11 | move : function() {
12 | this.x = this.x + random(-1,1);
13 | this.y = this.y - 1;
14 | }
15 | };
16 |
17 | bubble2 = Object.create(bubble1);
18 | bubble2.x = 100;
19 | bubble2.y = height;
20 |
21 | /*bubble2 = {
22 | x : 100,
23 | y : height,
24 | w : 100,
25 | move : function() {
26 | this.x = this.x + random(-1,1);
27 | this.y = this.y - 1;
28 | }
29 | };*/
30 |
31 | }
32 |
33 | function draw() {
34 | background(50);
35 |
36 | fill(125);
37 | stroke(255);
38 | ellipse(bubble1.x,bubble1.y,bubble1.w,bubble1.w);
39 | bubble1.move();
40 |
41 | ellipse(bubble2.x,bubble2.y,bubble2.w,bubble2.w);
42 | bubble2.move();
43 |
44 |
45 | }
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/sketch_bubbleobject4_constructor.js:
--------------------------------------------------------------------------------
1 | var bubble1;
2 | var bubble2;
3 |
4 | function Bubble() {
5 | this.x = 300;
6 | this.y = height;
7 | this.w = 100;
8 | this.move = function() {
9 | this.x = this.x + random(-1,1);
10 | this.y = this.y - 1;
11 | };
12 | }
13 |
14 | function setup() {
15 | createCanvas(600,400);
16 |
17 | bubble1 = new Bubble();
18 |
19 | bubble2 = new Bubble(); //Object.create(bubble1);
20 | bubble2.x = 100;
21 |
22 | /*bubble2 = {
23 | x : 100,
24 | y : height,
25 | w : 100,
26 | move : function() {
27 | this.x = this.x + random(-1,1);
28 | this.y = this.y - 1;
29 | }
30 | };*/
31 |
32 | }
33 |
34 | function draw() {
35 | background(50);
36 |
37 | fill(125);
38 | stroke(255);
39 | ellipse(bubble1.x,bubble1.y,bubble1.w,bubble1.w);
40 | bubble1.move();
41 |
42 | ellipse(bubble2.x,bubble2.y,bubble2.w,bubble2.w);
43 | bubble2.move();
44 |
45 |
46 | }
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/sketch_bubbleobject5_constructor_arguments.js:
--------------------------------------------------------------------------------
1 | var bubble1;
2 | var bubble2;
3 |
4 | function Bubble(x_) {
5 | this.x = x_;
6 | this.y = height;
7 | this.w = 100;
8 | this.move = function() {
9 | this.x = this.x + random(-1,1);
10 | this.y = this.y - 1;
11 | };
12 | }
13 |
14 | function setup() {
15 | createCanvas(600,400);
16 |
17 | bubble1 = new Bubble(300);
18 | bubble2 = new Bubble(100); //Object.create(bubble1);
19 |
20 | }
21 |
22 | function draw() {
23 | background(50);
24 |
25 | fill(125);
26 | stroke(255);
27 | ellipse(bubble1.x,bubble1.y,bubble1.w,bubble1.w);
28 | bubble1.move();
29 |
30 | ellipse(bubble2.x,bubble2.y,bubble2.w,bubble2.w);
31 | bubble2.move();
32 |
33 |
34 | }
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/00_JS_objects_walkthrough/sketch_bubbleobject6_prototypeadd.js:
--------------------------------------------------------------------------------
1 | var bubble1;
2 | var bubble2;
3 |
4 | var Bubble = function (x_) {
5 | this.x = x_;
6 | this.y = height;
7 | this.w = 100;
8 | }
9 |
10 | Bubble.prototype.move = function() {
11 | this.x = this.x + random(-1,1);
12 | this.y = this.y - 1;
13 | };
14 |
15 | function setup() {
16 | createCanvas(600,400);
17 |
18 | bubble1 = new Bubble(300);
19 | bubble2 = new Bubble(100); //Object.create(bubble1);
20 |
21 | }
22 |
23 | function draw() {
24 | background(50);
25 |
26 | fill(125);
27 | stroke(255);
28 | ellipse(bubble1.x,bubble1.y,bubble1.w,bubble1.w);
29 | bubble1.move();
30 |
31 | ellipse(bubble2.x,bubble2.y,bubble2.w,bubble2.w);
32 | bubble2.move();
33 |
34 |
35 | }
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/01_object_example/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/02_parameterized_objects/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/03_array_of_objects/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/04_array_interactive_objects/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/04_array_interactive_objects/sketch.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-10: Interactive stripes
6 |
7 | // An array of stripes
8 | var stripes = new Array(10);
9 |
10 | function setup() {
11 | createCanvas(640,360);
12 |
13 | // Initialize all Stripe objects
14 | for (var i = 0; i < stripes.length; i ++ ) {
15 | stripes[i] = new Stripe();
16 | }
17 | }
18 |
19 | function draw() {
20 |
21 | background(100);
22 | // Move and display all Stripe objects
23 | for (var i = 0; i < stripes.length; i++ ) {
24 | // Check if mouse is over the Stripe
25 | stripes[i].rollover(mouseX,mouseY); // Passing the mouse coordinates into an object.
26 | stripes[i].move();
27 | stripes[i].display();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/05_array_of_objects_push/ball.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 |
7 | function Ball(tempX, tempY, tempW) {
8 | this.x = tempX;
9 | this.y = tempY;
10 | this.w = tempW;
11 | this.speed = 0;
12 | }
13 |
14 | Ball.prototype.gravity = function() {
15 | // Add gravity to speed
16 | this.speed = this.speed + gravity;
17 | }
18 |
19 | Ball.prototype.move = function() {
20 | // Add speed to y location
21 | this.y = this.y + this.speed;
22 | // If square reaches the bottom
23 | // Reverse speed
24 | if (this.y > height) {
25 | this.speed = this.speed * -0.95;
26 | this.y = height;
27 | }
28 | }
29 |
30 | Ball.prototype.display = function() {
31 | // Display the circle
32 | fill(101);
33 | stroke(255);
34 | ellipse(this.x,this.y,this.w,this.w);
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/05_array_of_objects_push/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/05_array_of_objects_push/sketch.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 | // Resizing an array is JS is as easy as "push()"
7 |
8 | var balls = []; // We start with an empty array
9 | var gravity = 0.1;
10 |
11 | function setup() {
12 | createCanvas(640,360);
13 |
14 | // Initialize ball index 0
15 | balls.push(new Ball(50,0,24));
16 | }
17 |
18 | function draw() {
19 | background(51);
20 |
21 | // Update and display all balls
22 | for (var i = 0; i < balls.length; i ++ ) { // Whatever the length of that array, update and display all of the objects.
23 | balls[i].gravity();
24 | balls[i].move();
25 | balls[i].display();
26 | }
27 | }
28 |
29 | function mousePressed() {
30 | // A new ball object
31 | var b = new Ball(mouseX,mouseY,24); // Make a new object at the mouse location.
32 | // Here, the function push() adds an element to the end of the array.
33 | balls.push(b);
34 | }
35 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/06_inheritance/ball.js:
--------------------------------------------------------------------------------
1 | function Ball(x, y, gray) {
2 | this.xpos = x;
3 | this.ypos = y;
4 | this.radius = 30;
5 | this.gray = gray;
6 | }
7 |
8 | Ball.prototype.display = function() {
9 | ellipseMode(CENTER);
10 | fill(this.gray);
11 | ellipse(this.xpos, this.ypos, this.radius, this.radius);
12 | };
13 |
14 | Ball.prototype.move = function() {
15 | this.xpos++;
16 | if (this.xpos > width - this.radius) {
17 | this.xpos = -this.radius;
18 | }
19 | };
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/06_inheritance/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week1/01_objects_in_JS_p5/06_inheritance/superball.js:
--------------------------------------------------------------------------------
1 | function SuperBall(x, y, gray) {
2 | // Call the parent constructor
3 | Ball.call(this, x, y, gray);
4 | console.log(this);
5 | }
6 |
7 | SuperBall.prototype = new Ball();
8 |
9 | SuperBall.prototype.constructor = SuperBall;
10 |
11 | // This overwrites the Ball move method
12 | SuperBall.prototype.move = function() {
13 | this.xpos += 2;
14 | if (this.xpos > width - this.radius) {
15 | this.xpos = -this.radius;
16 | }
17 | };
18 |
19 | // This adds a new method that only SuperBall has
20 | SuperBall.prototype.change = function() {
21 | this.gray = sin(frameCount*0.1)*125+125;
22 | };
23 |
24 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/01_position_canvas/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/01_position_canvas/sketch.js:
--------------------------------------------------------------------------------
1 |
2 | function setup() {
3 | var canvas = createCanvas(600, 400);
4 | canvas.position(50, 50);
5 | }
6 |
7 | function draw() {
8 | background(250, 120, 200);
9 | fill(255);
10 | ellipse(width/2, height/2, 100, 100);
11 | ellipse(width/4, height/2, 50, 50);
12 | fill(50, 100, 200);
13 | ellipse(mouseX, mouseY, 25, 25);
14 | }
--------------------------------------------------------------------------------
/week1/02_DOM_p5/02_html_css/one.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | JS<3
6 |
7 |
8 |
9 |
10 | Hooray for JavaScript!!
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/02_html_css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-size: 18px;
3 | padding: 40px;
4 | }
--------------------------------------------------------------------------------
/week1/02_DOM_p5/02_html_css/two.html:
--------------------------------------------------------------------------------
1 |
2 | Hello HTML!
3 |
15 |
16 |
17 |
18 |
This is a paragraph
19 |
This is a paragraph
20 |
This is a paragraph
21 |
22 |
23 |
This is one
24 |
This is two
25 |
26 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/03_add_p_element/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/03_add_p_element/sketch.js:
--------------------------------------------------------------------------------
1 |
2 | function setup() {
3 |
4 | // We are still calling createCanvas like in the past, but now we are storing the result as a variable.
5 | // This way we can call methods of the element, to set the position for instance.
6 |
7 | var text = createP("This is an HTML string!");
8 | var canvas = createCanvas(600, 400);
9 |
10 | // Here we call methods of each element to set the position and id, try changing these values.
11 | // Use the inspector to look at the HTML generated from this code when you load the sketch in your browser.
12 | text.position(50, 50);
13 | text.id("apple");
14 | canvas.position(300, 50);
15 | canvas.id("pear");
16 |
17 | }
18 |
19 |
20 | function draw() {
21 |
22 | background(250, 120, 200);
23 | ellipse(width/2, height/2, 100, 100);
24 | ellipse(width/4, height/2, 50, 50);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/04_parent_child/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/04_parent_child/sketch.js:
--------------------------------------------------------------------------------
1 | function setup() {
2 |
3 | // Now let's try putting some more HTML in.
4 | var text = createP("Here is some text and this is an HTML link! ");
5 | var link = createA("http://i.imgur.com/WXaUlrK.gif","We can also create a link this way.")
6 | var canvas = createCanvas(600, 400);
7 |
8 | // We are letting the elements float (no absolute positioning)
9 | // Also ids and classes
10 | text.id("apple");
11 | link.id("pear");
12 | canvas.class("lemon");
13 |
14 | // We can put the link element inside the paragraph one with child()
15 | text.child(link);
16 | }
17 |
18 |
19 | function draw() {
20 | background(250, 120, 200);
21 | ellipse(width/2, height/2, 100, 100);
22 | ellipse(width/4, height/2, 50, 50);
23 | }
24 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/05_style_functions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/05_style_functions/sketch.js:
--------------------------------------------------------------------------------
1 | // Creating other HTML elements, adding style.
2 |
3 | function setup() {
4 | noCanvas();
5 | var text = createP("This is an HTML string with style!");
6 | // With the style method we can pass in CSS directly in our code
7 | text.style("font-family", "monospace");
8 | text.style("background-color", "#FF0000");
9 | text.style("color", "#FFFFFF");
10 | text.style("font-size", "18pt");
11 | text.style("padding", "10px");
12 | }
--------------------------------------------------------------------------------
/week1/02_DOM_p5/06_style_css/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/06_style_css/sketch.js:
--------------------------------------------------------------------------------
1 | // Creating other HTML elements, adding style.
2 |
3 |
4 | function setup() {
5 | noCanvas();
6 | var text = createP("This is an HTML string with style!");
7 | text.id("apple");
8 | }
--------------------------------------------------------------------------------
/week1/02_DOM_p5/06_style_css/style.css:
--------------------------------------------------------------------------------
1 | #apple {
2 | font-family: monospace;
3 | background-color: #FF0000;
4 | color: #FFFFFF;
5 | font-size: 18pt;
6 | padding: 10px;
7 | }
--------------------------------------------------------------------------------
/week1/02_DOM_p5/07_mousepressed/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/07_mousepressed/sketch.js:
--------------------------------------------------------------------------------
1 | // Using HTML element specific mouse listeners, mousePressed.
2 |
3 | // We define the variables outside of setup so we can access them from anywhere in the sketch.
4 | var link;
5 | var bg;
6 |
7 | function setup() {
8 | createCanvas(400, 400);
9 | bg = color(51);
10 |
11 | link = createA("#","Click me");
12 | // Attach listeners for mouse events related to img.
13 | link.mousePressed(changeBG);
14 |
15 | }
16 |
17 | function draw() {
18 | background(bg);
19 | }
20 |
21 | function changeBG() {
22 | bg = color(random(255));
23 | }
24 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/08_mouseover_mouseout/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/09_getElements/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/09_getElements/sketch.js:
--------------------------------------------------------------------------------
1 | // Creating other HTML elements, adding style.
2 |
3 | function setup() {
4 |
5 | // Create three elements
6 | var text0 = createP("red");
7 | var text1 = createP("blue");
8 | var text2 = createP("green");
9 |
10 | text0.style("color","red");
11 | text0.style("font-size","50px");
12 | // Set the class for an element
13 | text0.class("apple");
14 |
15 | text1.style("color","blue");
16 | text1.style("font-size","50px");
17 | // This one has the same class
18 | text1.class("apple");
19 |
20 | text2.style("color","green");
21 | text2.style("font-size","50px");
22 | // This one has a different class
23 | text2.class("pear");
24 |
25 | };
26 |
27 |
28 | function mousePressed() {
29 | // Get an array of elements of the same class
30 | var apples = getElements("apple");
31 | // Hid them all!
32 | for (var i=0; i
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/11_animateDOM/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/11_animateDOM/sketch.js:
--------------------------------------------------------------------------------
1 | // Scramble what the user enters into a text field
2 |
3 | // Some HTML
4 | var words;
5 |
6 | var x;
7 | var y;
8 | var xspeed = 5;
9 | var yspeed = -2;
10 |
11 | var fsize = 48;
12 |
13 | function setup() {
14 | noCanvas();
15 | // Make the HTML
16 | words = createP("Bouncing Shaking Words");
17 | x = windowWidth/2;
18 | y = windowHeight/2;
19 |
20 | }
21 |
22 | function draw() {
23 |
24 | // Set position and style
25 | words.position(x,y);
26 | words.style("font-size",fsize);
27 |
28 | // Manipulate the size
29 | fsize = floor(fsize + random(-2,2));
30 | fsize = constrain(fsize,12,72);
31 |
32 | // Bouncing ball algorithm!
33 | x += xspeed;
34 | y += yspeed;
35 |
36 | if (x > windowWidth || x < 0) {
37 | xspeed *= -1;
38 | }
39 | if (y > windowHeight || y < 0) {
40 | yspeed *= -1;
41 | }
42 |
43 |
44 | }
45 |
46 |
47 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/12_button_slider/ball.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 |
7 | function Ball(tempX, tempY, tempW) {
8 | this.x = tempX;
9 | this.y = tempY;
10 | this.w = tempW;
11 | this.speed = 0;
12 | }
13 |
14 | Ball.prototype.gravity = function() {
15 | // Add gravity to speed
16 | this.speed = this.speed + gravity;
17 | }
18 |
19 | Ball.prototype.move = function() {
20 | // Add speed to y location
21 | this.y = this.y + this.speed;
22 | // If square reaches the bottom
23 | // Reverse speed
24 | if (this.y > height) {
25 | this.speed = this.speed * -0.95;
26 | this.y = height;
27 | }
28 | }
29 |
30 | Ball.prototype.display = function() {
31 | // Display the circle
32 | fill(101);
33 | stroke(255);
34 | ellipse(this.x,this.y,this.w,this.w);
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/12_button_slider/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week1/02_DOM_p5/13_wordscrambler/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/03_Strings/concatenate.js:
--------------------------------------------------------------------------------
1 | var num = 5 + 6; // ADDING TWO NUMBERS!
2 | var phrase = 'To be' + ' or not to be'; // JOINING TWO STRINGS!
3 |
4 | console.log(num);
5 | console.log(phrase);
6 |
--------------------------------------------------------------------------------
/week1/03_Strings/indexof.js:
--------------------------------------------------------------------------------
1 | var sentence = 'The quick brown fox jumps over the lazy dog.';
2 | console.log(sentence.indexOf('quick'));
3 | console.log(sentence.indexOf('fo'));
4 | console.log(sentence.indexOf('The'));
5 | console.log(sentence.indexOf('blah blah'));
--------------------------------------------------------------------------------
/week1/03_Strings/join.js:
--------------------------------------------------------------------------------
1 |
2 | // Concatenating an array of Strings manually
3 | function join(str, separator) {
4 | var stuff = '';
5 | for (var i = 0; i < str.length; i++) {
6 | if (i != 0) stuff += separator;
7 | stuff += str[i];
8 | }
9 | return stuff;
10 | }
11 |
12 | var words = ['it','was','a','dark','and','stormy','night'];
13 | console.log(join(words,' '));
--------------------------------------------------------------------------------
/week1/03_Strings/length.js:
--------------------------------------------------------------------------------
1 | var sentence = 'The quick brown fox jumps over the lazy dog.';
2 | console.log(sentence.length);
--------------------------------------------------------------------------------
/week1/03_Strings/split.js:
--------------------------------------------------------------------------------
1 | var spaceswords = 'The quick brown fox jumps over the lazy dog.';
2 | var list1 = spaceswords.split(' ');
3 | console.log(list1[0]);
4 | console.log(list1[1]);
5 |
6 | var commaswords = 'The,quick,brown,fox,jumps,over,the,lazy,dog.';
7 | var list2 = commaswords.split(',');
8 | for (var i = 0; i < list2.length; i++) {
9 | console.log(i + ': ' + list2[i]);
10 | }
11 |
12 | // Calculate sum of a list of numbers in a string
13 | var numbers = '8,67,5,309';
14 | var numlist = numbers.split(',');
15 | var sum = 0;
16 | for (var i = 0; i < numlist.length; i++) {
17 | sum = sum + Number(numlist[i]); // Converting each String into an number!
18 | }
19 | console.log(sum);
--------------------------------------------------------------------------------
/week1/03_Strings/substring.js:
--------------------------------------------------------------------------------
1 | var sentence = 'The quick brown fox jumps over the lazy dog.';
2 | var phrase = sentence.substring(4,9);
3 | console.log(phrase);
--------------------------------------------------------------------------------
/week1/04_fileinput_node/everyother.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 3) {
5 | console.log('Oops, you forgot to pass in a text file.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 |
14 | // Read the file as utf8 and process the data in the function analyze
15 | fs.readFile(filename, 'utf8', everyother);
16 |
17 | function everyother(err, data) {
18 | if (err) {
19 | throw err;
20 | }
21 |
22 | // Split text by wherever there is a space
23 | var words = data.split(" ");
24 | var everyotherword = '';
25 | for (var i = 0; i < words.length; i+=2) {
26 | var word = words[i];
27 | everyotherword += word + ' ';
28 | }
29 | console.log(everyotherword);
30 | }
--------------------------------------------------------------------------------
/week1/04_fileinput_node/fileio.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 3) {
5 | console.log('Oops, you forgot to pass in a text file.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 |
14 | // Read the file as utf8 and process the data in the function analyze
15 | fs.readFile(filename, 'utf8', analyze);
16 |
17 | function analyze(err, data) {
18 | if (err) {
19 | throw err;
20 | }
21 | console.log('OK: ' + filename);
22 | console.log(data);
23 |
24 |
25 | // If we wanted to write a file out
26 | fs.writeFile("output.txt", data, output);
27 | function output(err) {
28 | if (err) {
29 | throw err;
30 | }
31 | console.log("The new file was saved!");
32 | };
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/week1/04_fileinput_node/reverse.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 3) {
5 | console.log('Oops, you forgot to pass in a text file.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 |
14 | // Read the file as utf8 and process the data in the function analyze
15 | fs.readFile(filename, 'utf8', reverse);
16 |
17 | function reverse(err, data) {
18 | if (err) {
19 | throw err;
20 | }
21 |
22 | // Reverse all the characters in the text
23 | var output = '';
24 | for (var i = data.length-1; i >= 0; i--) {
25 | output += data.charAt(i);
26 | }
27 | console.log(output);
28 | }
--------------------------------------------------------------------------------
/week1/04_fileinput_node/search.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 4) {
5 | console.log('Oops, you forgot to pass in a text file and a word to search for.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 | var search = process.argv[3];
14 |
15 | // Read the file as utf8 and process the data in the function analyze
16 | fs.readFile(filename, 'utf8', everyother);
17 |
18 | function everyother(err, data) {
19 | if (err) {
20 | throw err;
21 | }
22 |
23 | // Split text by wherever there is a space
24 | var words = data.split(' ');
25 | for (var i = 0; i < words.length-1; i++) {
26 | if (words[i] == search) {
27 | console.log(words[i] + ' ' + words[i+1]);
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/week1/05_fileinput_p5/01_loadStrings/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/05_fileinput_p5/01_loadStrings/sketch.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | // Variable for array of lines
4 | var lines;
5 | // Variable where we'll join all the text together
6 | var text;
7 |
8 | // Anything in preload will finish before setup() is triggered
9 | function preload() {
10 | lines = loadStrings('files/spam.txt');
11 | }
12 |
13 | // Now we can do stuff with the text
14 | function setup() {
15 | noCanvas();
16 | // join() joins the elements of an array
17 | // Here we pass in a line break to retain formatting
18 | text = lines.join(' ');
19 | createP(text);
20 | }
21 |
22 |
23 |
--------------------------------------------------------------------------------
/week1/05_fileinput_p5/02_loadStrings_callback/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/05_fileinput_p5/02_loadStrings_callback/sketch.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | // Variable where we'll join all the text together
4 | var text;
5 |
6 | // Now we can do stuff with the text
7 | function setup() {
8 | noCanvas();
9 | loadStrings('files/spam.txt', fileready)
10 | }
11 |
12 | function fileready(lines) {
13 | // join() joins the elements of an array
14 | // Here we pass in a line break to retain formatting
15 | text = lines.join(' ');
16 | createP(text);
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/week1/05_fileinput_p5/03_loadFile_Menu/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/05_fileinput_p5/04_loadFile_DragDrop/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/week1/06_p5_text/flesch/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week1/06_p5_text/reverse/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week2_regex/regex_node/files/doubles.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week2_regex/regex_node/regex_helloworld2.js:
--------------------------------------------------------------------------------
1 |
2 | // Demonstrates match() in String
3 |
4 | var text = "This is a test of regular expressions.";
5 | var regex = /test/;
6 |
7 | // The function match() executes a search for a match in string.
8 | // The result, just like with exec(), is an array.
9 | var results = text.match(regex);
10 |
11 | console.log('The match found in the text is: ' + results[0]);
12 | console.log('And the index where it was found: ' + results.index);
13 | console.log('And the input text in case you forgot: ' + results.input);
14 |
15 | // Now capturing parentheses and the global flag match() works differently
16 | // Note we can't actually get group 1 this way
17 | text = "Now another test including phone numbers: 212-555-1234 and 917-555-4321 and 646.555.9876.";
18 | regex = /(\d+)[-.]\d+[-.]\d+/g;
19 |
20 | results = text.match(regex);
21 | for (var i = 0; i < results.length; i++) {
22 | console.log('Match ' + i + ': ' + results[i]);
23 | }
--------------------------------------------------------------------------------
/week2_regex/regex_node/replace1.js:
--------------------------------------------------------------------------------
1 |
2 | var text = 'Replace every time the word "the" appears with the word ze.';
3 | var regex = /\bthe\b/g;
4 | var replaced = text.replace(regex,'ze');
5 | console.log(text);
6 | console.log(replaced);
--------------------------------------------------------------------------------
/week2_regex/regex_node/replace2.js:
--------------------------------------------------------------------------------
1 |
2 | var text = 'This is some markdown where text surrounded by an * is *italicized*. *one* two *three* four five *six*.';
3 | var regex = /\*(\w+)\*/gi;
4 |
5 | // We can use captured groups in the replacement string by referencin $ and the group #
6 | var replaced = text.replace(regex,'$1');
7 | console.log(text);
8 | console.log(replaced);
--------------------------------------------------------------------------------
/week2_regex/regex_node/split.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 3) {
5 | console.log('Oops, you forgot to pass in a text file.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 |
14 | // Read the file as utf8 and process the data in the function analyze
15 | fs.readFile(filename, 'utf8', analyze);
16 |
17 | function analyze(err, data) {
18 | if (err) {
19 | throw err;
20 | }
21 |
22 | // Any character not a-z0-9
23 | var regex = /\W/; // try it with capturing parenthese to keep the delimiter! /(\W)/
24 |
25 | // Split into an array using the regex as a delimiter
26 | var words = data.split(regex);
27 |
28 | // The array of Strings
29 | console.log(words);
30 |
31 | // The length
32 | console.log('Total words: ' + words.length);
33 | }
--------------------------------------------------------------------------------
/week2_regex/regex_node/vowelcounter.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 3) {
5 | console.log('Oops, you forgot to pass in a text file.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 |
14 | // Read the file as utf8 and process the data in the function analyze
15 | fs.readFile(filename, 'utf8', analyze);
16 |
17 | function analyze(err, data) {
18 | if (err) {
19 | throw err;
20 | }
21 |
22 | // A regex to match any vowel
23 | // g: match all
24 | // i: case insensitive
25 | var regex = /[aeiou]/gi;
26 | var results = data.match(regex);
27 |
28 | console.log("total vowels: " + results.length);
29 | }
--------------------------------------------------------------------------------
/week2_regex/regex_node/voweldoubler.js:
--------------------------------------------------------------------------------
1 |
2 | // We can get command line arguments in a node program
3 | // Here we're checking to make sure we've typed three things (the last being the filename)
4 | if (process.argv.length < 3) {
5 | console.log('Oops, you forgot to pass in a text file.');
6 | process.exit(1);
7 | }
8 |
9 | // The 'fs' (file system) module allows us to read and write files
10 | // http://nodejs.org/api/fs.html
11 | var fs = require('fs');
12 | var filename = process.argv[2];
13 |
14 | // Read the file as utf8 and process the data in the function analyze
15 | fs.readFile(filename, 'utf8', analyze);
16 |
17 | function analyze(err, data) {
18 | if (err) {
19 | throw err;
20 | }
21 |
22 | // A regex to match any vowel
23 | // Captured as group #1
24 | var regex = /([aeiou])/gi;
25 |
26 | // Replacing the vowel with two of itself
27 | var output = data.replace(regex,'$1$1');
28 | console.log(output);
29 | }
--------------------------------------------------------------------------------
/week2_regex/regex_p5/01_regexbasics/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week2_regex/regex_p5/02_doublewords/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week2_regex/regex_p5/03_voweldoubler/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week2_regex/regex_p5/03_voweldoubler/sketch.js:
--------------------------------------------------------------------------------
1 | // The new text
2 | var pelement = "";
3 | var input;
4 |
5 | function setup() {
6 | noCanvas();
7 |
8 | // A text area
9 | input = createElement("textarea","Enter some text.");
10 | input.attribute("rows",10);
11 | input.attribute("cols",100);
12 |
13 | // A button
14 | var button = createButton("Double the vowels!");
15 | button.mousePressed(doublewords);
16 |
17 | // An HTML Element for the new text
18 | pelement = createP("");
19 | }
20 |
21 | function doublewords() {
22 | // What has the user entered?
23 | var text = input.value();
24 |
25 | // A regex to match any vowel
26 | // Captured as group #1
27 | var regex = /([aeiou])/gi;
28 |
29 | // This one is for doubling words
30 | // var regex = /(\b\w+\b)/gi;
31 |
32 | // Replacing the vowel with two of itself
33 | var output = text.replace(regex,'$1$1');
34 | // Update the HTML Element
35 | pelement.html(output);
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/week2_regex/regex_p5/04_regex_tester/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week2_regex/regex_p5/05_linkfinder/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/week3_analysis/01_concordance/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week3_analysis/02_tf-idf/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week3_analysis/04_parts_of_speech_concordance/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week3_analysis/05_naive_bayes_classifier/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week3_analysis/node/rita.js:
--------------------------------------------------------------------------------
1 | var rita = require('rita');
2 | var rs = rita.RiString("The white elephant smiled.");
3 | console.log(rs.features());
4 |
5 | console.log(rs.analyze());
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/a/test.txt:
--------------------------------------------------------------------------------
1 | This is a test file for Category A which is about dolphins. Lots and lots of dolphins. Friendly cute dolphins.
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/b/test.txt:
--------------------------------------------------------------------------------
1 | This is a test file for Category B which is about sharks. Lots and lots of sharks. Great white sharks. And a few more words.
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/ham/0001.1999-12-10.farmer.ham.txt:
--------------------------------------------------------------------------------
1 | Subject: christmas tree farm pictures
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/ham/0003.1999-12-14.farmer.ham.txt:
--------------------------------------------------------------------------------
1 | Subject: calpine daily gas nomination
2 | - calpine daily gas nomination 1 . doc
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/ham/0007.1999-12-14.farmer.ham.txt:
--------------------------------------------------------------------------------
1 | Subject: mcmullen gas for 11 / 99
2 | jackie ,
3 | since the inlet to 3 river plant is shut in on 10 / 19 / 99 ( the last day of
4 | flow ) :
5 | at what meter is the mcmullen gas being diverted to ?
6 | at what meter is hpl buying the residue gas ? ( this is the gas from teco ,
7 | vastar , vintage , tejones , and swift )
8 | i still see active deals at meter 3405 in path manager for teco , vastar ,
9 | vintage , tejones , and swift
10 | i also see gas scheduled in pops at meter 3404 and 3405 .
11 | please advice . we need to resolve this as soon as possible so settlement
12 | can send out payments .
13 | thanks
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/ham/0009.1999-12-14.farmer.ham.txt:
--------------------------------------------------------------------------------
1 | Subject: meter 1517 - jan 1999
2 | george ,
3 | i need the following done :
4 | jan 13
5 | zero out 012 - 27049 - 02 - 001 receipt package id 2666
6 | allocate flow of 149 to 012 - 64610 - 02 - 055 deliv package id 392
7 | jan 26
8 | zero out 012 - 27049 - 02 - 001 receipt package id 3011
9 | zero out 012 - 64610 - 02 - 055 deliv package id 392
10 | these were buybacks that were incorrectly nominated to transport contracts
11 | ( ect 201 receipt )
12 | let me know when this is done
13 | hc
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/spam/0008.2003-12-18.GP.spam.txt:
--------------------------------------------------------------------------------
1 | Subject: your prescription is ready . . oxwq s f e
2 | low cost prescription medications
3 | soma , ultram , adipex , vicodin many more
4 | prescribed online and shipped
5 | overnight to your door ! !
6 | one of our us licensed physicians will write an
7 | fda approved prescription for you and ship your
8 | order overnight via a us licensed pharmacy direct
9 | to your doorstep . . . . fast and secure ! !
10 | click here !
11 | no thanks , please take me off your list
12 | ogrg z
13 | lqlokeolnq
14 | lnu
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/spam/0017.2003-12-18.GP.spam.txt:
--------------------------------------------------------------------------------
1 | Subject: get that new car 8434
2 | people nowthe weather or climate in any particular environment can change and affect what people eat and how much of it they are able to eat .
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/spam/0032.2003-12-19.GP.spam.txt:
--------------------------------------------------------------------------------
1 | Subject: emerging small cap
2 | to exit all additional mailings - - - >
3 | [ press here ]
4 | zupymv updi
5 | j pzyvktpipwcmjc gtlaisyeviobdf
6 | oesxpzuf dvafv
7 | pcr
8 | tfntye llrwi
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/spam/0041.2003-12-19.GP.spam.txt:
--------------------------------------------------------------------------------
1 | Subject: paliourg udtih 7 wcwknoanopkt
2 | good morning paliourg !
3 | last miraculous and imaginative aduit galleries and videos from frank cambel .
4 | at the moment theme is pleasant and most excellent cars !
5 | maria is washing her bmw !
6 | sara trant choosing volkswagen or honda in car shop !
7 | test this homepage for all wonderful photographs and videos :
8 | p . s . admission is 100 % free , distressing aduit snapshots and videos only !
9 | best regards , supporter .
10 | dear paliourg send any gratis mail here mailto : eilao 99 @ online . com . ua to discontinue if this is hard mess .
11 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/spam/0052.2003-12-20.GP.spam.txt:
--------------------------------------------------------------------------------
1 | Subject: ^ . pe , nis s ^ ize mat ; ters ! yhvqbvdboevkcd
2 | briababhdpr frdjvdbesk cdpizacqjkufx hfkosxcymgftzd wdyiwpbqipv xxieqncfpa
3 | the only solution to penis enlargement
4 | fxbekdcaolk gsiaagcrhyp
5 | limited offer : add at least 3 inches or get your money back !
6 | rlaegydzfb ylbafsepgjv
7 | we are so sure our product works we are willing to prove it by offering a free trial bottle + a 100 % money back guarantee upon purchase if you are not satisfied with the results .
8 | - - - > click here to learn more - - -
9 | also check out our * brand new * product : penis enlargement patches
10 | comes with the 100 % money back warranty as well !
11 | eqiupgbbaxz gogqkkdpbdo
12 | igjohodzauuuu yreliodctrin
13 | cbywdvdthl nogsvvbnwug
14 | no more offers
15 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/enron1/spam/0054.2003-12-21.GP.spam.txt:
--------------------------------------------------------------------------------
1 | Subject: re : rdd , the auxiliary iturean
2 | free cable @ tv
3 | dabble bam servomechanism ferret canopy bookcase befog seductive elapse ballard daphne acrylate deride decadent desolate else sequestration condition ligament ornately yaqui giblet emphysematous woodland lie segovia almighty coffey shut china clubroom diagnostician
4 | cheer leadsman abominate cambric oligarchy mania woodyard quake tetrachloride contiguous welsh depressive synaptic trauma cloister banks canadian byroad alexander gnaw annette charlie
5 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w0.txt:
--------------------------------------------------------------------------------
1 | saw you on the security line last week . you had shoulder length hair and off white blouse . you were focused on your pda . so not sure you noticed me checking you out . drinks . dinner . road fun .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w1.txt:
--------------------------------------------------------------------------------
1 | you were on the 1230am boat to staten isl m4w 39 age 39 wanted to give you my number so i can take you out to eat you said you lived in westeriegh but u were worried about your friend cause she was drunk this is a long shot but let me know what u were eating on the boat so i know it's u
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w10.txt:
--------------------------------------------------------------------------------
1 | i saw you walking uptown on 7th avenue between 49 50 streets . you had a beautiful red dress and smiled at me while i was buying coffee at a coffee cart . you looked amazing and that smile just complemented your look . if you ever see this . let me take you out sometime .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w11.txt:
--------------------------------------------------------------------------------
1 | at approximately 750am today . thursday . there was an absolutely beautiful woman at the dunkin donuts in commack . corner of vets highway and harned road . just south of jericho turnpikeindian head road intersection . she had on sunglasses . a pink top . black skirt and gorgeous shoes . she was driving a honda . it's a long shot but if you read this . please let me know what kind of honda you were driving and the color . thanks and take care .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w12.txt:
--------------------------------------------------------------------------------
1 | i was behind you in line for elevators at 10 this morning . you got on the 10 whatever elevators and i got on the 1 10 . you were wearing toms shoes . i don't think you noticed me but you were literally no exaggeration the most beautiful girl i have ever seen . so i had to try this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w13.txt:
--------------------------------------------------------------------------------
1 | it gets your whites whiter . there was something about our total random meeting that i can't get out of my mind . i would have loved to just keep talking with you . weird i know but i just had to take a shot you might see this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w14.txt:
--------------------------------------------------------------------------------
1 | hey baby i so hope your reading this . i lost my phone along with your number and i can't seem to get it back . however i've bin trying to reach you for some while now even though you've moved upstate . we met on pitkin and legion then the second time i came with my boy to see you and head back to his place . the third time we just chill in the car . you've just came back to brooklyn a few mnths ago but i got your message when you've already leave for upstate . its your guy . and if you kno who i am . email me back with the car that i drive complexion of my skin your skin then i'll take it from there . hope the kid is ok .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w15.txt:
--------------------------------------------------------------------------------
1 | we spoke briefly yesterday morning . i should have asked for your name and number . tell me what i was wearing if you reply .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w16.txt:
--------------------------------------------------------------------------------
1 | we made eye contact a few times while stranded in the clusterf*ck that was the downtown d line last week . it's obnoxiously cliche to go on about some beautiful woman you see on the subway . but i just wanted to say thanks for making it a little less boring .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w17.txt:
--------------------------------------------------------------------------------
1 | thelesserbabka . babka you disappeared from ok cupid before we had a chance to meet . there was so much more to find out about you . i'd like to continue where we left off i'm sure we'd both enjoy ourselves .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w18.txt:
--------------------------------------------------------------------------------
1 | i'll try to make this short . i sat next to you on the 5 train . you bumped me with your arm and said sorry . you then started asking me about the weather . but you then realized you were on the wrong train and you just got off . i wasn't sure if i should even bother asking for your number but if you see this . which you most likely won't but hey what the hell . would really like to go out with you sometime .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w19.txt:
--------------------------------------------------------------------------------
1 | riding home about 930 last night . you passed me coming up the hill with two full pannier bags and a baritone horn on your back . confirming your hardcoreness . we talked about how perfect the weather was for riding and how you just wanted to keep going . i said you didn't have to go home . you laughed a beautiful laugh then turned north on vanderbilt . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w2.txt:
--------------------------------------------------------------------------------
1 | sunday sept 14 6pm you were amazingly gorgeous . and you were wearing uggs . jeans . and you had brown long hair . you were on the line next to me placing your groceries on the counter . you and i kept looking at one another . but i didn't say anything to you silly me . you were with your daughter and i had to go back in the store after i left to get something else . i was soo hoping you would still be outside when i came back out . but you were gone . . . i liked everything about you that i saw . you are beautiful . . . . . if this is you . which i doubt you will ever see this . but if you are her . then tell me what i was wearing
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w20.txt:
--------------------------------------------------------------------------------
1 | just saw you this morning . you had gum on your shoe and were trying to scrape it off and we caught each others' eye and glanced away . we did keep stealing glances on the train and we both got off at 34th st . i thought i lost track of you but saw you again while i was grabbing coffee as you crossed 8th to w31st . you are very cute and i hope you were able to get the gum off your shoe and if you see this . i'd love to buy you a drink .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w21.txt:
--------------------------------------------------------------------------------
1 | we exchanged hellos and during the qa you stood toward the back while i sat behind and off to the left . you left too soon . contact me and we'll continue the conversation .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w22.txt:
--------------------------------------------------------------------------------
1 | hi . im looking for veronica from meetville . we winked at each other the other day and ive been trying to get a hold of you . contact me here . thanks
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w23.txt:
--------------------------------------------------------------------------------
1 | this may be a long shot but i could not stop thinking about you ever since i've laid my eyes on you . we sat next to each other on the bench at the dekalb subway station after 11 p . m . last night . we boarded the q train heading to coney island and we were holding onto the same pole . you stumbled a bit right before you got off at your stop . i was the black security guard standing right next to you with the messenger bag and holding a plastic bag . you were white with dark brownbrunette hair with a feather accessory pinned to it and you were wearing glasses . you were wearing a thin coat and a dressskirt with black leggings . you had a bookbag which you had your phone in and you were reading a book . i thought you were really beautiful and lovely . i wanted to at least say hi to you but my shyness got the better of me . plus . i didn't know if you were seeing someone or not . i hope this works and i really hope to hear back from you . i would love to take you out for coffee or lunch and get to know you more .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w24.txt:
--------------------------------------------------------------------------------
1 | the city is a big place . and i'm only one guy in a million . your rose colored hair was beauty to my eyes like being in a garden i'll pick you . your green eyes amazed me like the auroras shinning so bright . your softly spoken voice was music to my heart making it skip a beat to your alluring melody . your beautiful radiant skin . you're a rare beauty to behold . your a rare should to find . so many hearts in the world but only yours spoke to mines . you melted my icy walls and warmed my flowing springs . how i wish i can share this life time with you . how i wish you was here with me . how i miss you so much . i just want you to know i love you . it was only a moment in your presence but it seem like an eternity . how i wish i could see you again . lost please help me find . green eyes red rose hair sweet pink lips radiant glowing skin you're to good to be real . love is all i'm looking for now and i found it with you . girl won't you be mine .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w25.txt:
--------------------------------------------------------------------------------
1 | you're gorgeous and super cool . i wish we could hang out . if you read this reply with info on what you usually wear while working and maybe ill let you know who i am next time i come in .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w26.txt:
--------------------------------------------------------------------------------
1 | i was the dude in the glasses and only hat . you had that purpleish white ombre hair . i think you're pretty hot . let's hang out .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w27.txt:
--------------------------------------------------------------------------------
1 | we were both waiting for the path at hoboken when i caught you looking at me . i looked back . when the train finally came . we sat next to each other . i immediately felt comfortable sitting next to you and felt like i could talk to you . but i guess my consideration got the best of me because i didn't want to bother you in an enclosed area . when you got off at christopher street . you looked back at me almost as if to say well . are you coming with me . it might sound cheesy . but when you looked at me i was just frozen looking back at you . i wanted to get off the train and walk with you and tell you i thought you were beautiful . i hope you see this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w28.txt:
--------------------------------------------------------------------------------
1 | i just stripped naked and would love some online company . . . i am smart witty fun sexual and handsome white . . . i hope to hear from you tonite .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w29.txt:
--------------------------------------------------------------------------------
1 | beautiful girl with a bmw where are you . if you read this . please e mail me with the color of your beemer so i'll know it is you see you soon
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w3.txt:
--------------------------------------------------------------------------------
1 | we've bumped into one another in one or two dive bars once or twice . perhaps you remember a tall . black haired british guy with a singular tattoo . the mention of missed connections came up . so a year later i figured i might play the part of the craigslist poster . smutty drinks soon .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w30.txt:
--------------------------------------------------------------------------------
1 | hi sashe it was very nice conversing with you . and i would like to get together before you move to bushwick . i was with my brother on the train . i totally forgot to ask for your number . although you took mine . i am assuming you are shy and wouldn't text if i didn't reach out . so i hope you see this so we can meet again soon you told me that who your sister married . i relation to my old religious beliefs looking forward to hear from you good night
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w31.txt:
--------------------------------------------------------------------------------
1 | many years ago . i lived in flushlng 1982 . . queens . so did u . u went to catholic school . i was dateing someone and was older . . . u lend me the 12inch bella lugios dead . by bauhaus . u been to my apt way back . as a freind . i met ur family . i just was looking at a bauhaus video and u came 2 mind . . 1982 83 . . i hope u get this . . . . u didnt even open the album when u lend 2 me . . . i lived on franklin and main st . so sorry we met at the wrong time . how r u . . i am sure u did not 4 get me . . u were goth way back . . . ur father was working with costa rica .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w32.txt:
--------------------------------------------------------------------------------
1 | k . h . you do not answer . then you're not here . . we will not meet again i am writing to you in facebook but you do not answer .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w33.txt:
--------------------------------------------------------------------------------
1 | many years ago . i lived in flushlng queens . so did u . u went to catholic school . i was dateing someone and was older . . . u lend me the 12inch bella lugios dead . by bauhaus . u been to my apt way back . as a freind . i met ur family . i just was looking at a bauhaus video and u came 2 mind . . 1982 83 . . i hope u get this . . . . u didnt even open the album when u lend 2 me . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w34.txt:
--------------------------------------------------------------------------------
1 | hi . i noticed you on the brooklyn bound 2 train tonight . around 1130ish . i was the guy in glasses looking at sheet music on his ipad . if you noticed me . do give a shout . i thought you were probably the prettiest girl i've ever seen that sounds cheesey but in this case . completely true .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w36.txt:
--------------------------------------------------------------------------------
1 | i wanted to get off at your stop . don't know why i didn't . we should spoken more . let's do that .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w37.txt:
--------------------------------------------------------------------------------
1 | we met briefly i a tall . dark haired guy . and you a tall . very cute . red headed girl . i got off the d train at 59 street to catch a local train . you asked if the d was running local it wasn't . so we waited a few minutes for the a train . when it came . you asked if i was sure it'd be running local . and i promised you it was . and that you could blame me if we both ended up at 125th st . on the train we exchanged a few words . and a few smiles until i got off at 81st st . wish i had the chance to chat with you a bit longer . perhaps you'll see this . and grab a coffee with me sometime .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w38.txt:
--------------------------------------------------------------------------------
1 | interesting lunch . you were on a date . i think . we talked about missed connections . intrigued . are you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w39.txt:
--------------------------------------------------------------------------------
1 | realei went food shopping . not like you seemed to keen on making dinner together . you know the thirty why didn't you under stand when i said [who's this . . new phone lost all my contacts] oh that's right you texted me two weeks later . anddd not that night gt_gt thanx for showing interest . d
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w4.txt:
--------------------------------------------------------------------------------
1 | i still do . do you dream of me . do you still care . i selfishly hope so . i was a few blocks away from your building last night . if you still live there that is . of course i stupidly kept an eye out . that's me . still crazy . with no point . still crazy in love . miss you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w40.txt:
--------------------------------------------------------------------------------
1 | our eyes met listening to a saxophone at the 14th street station . you got on the same train car i did . i was reading a magazine in my green flannel and jeans . and you asked if the train was going to washington . square park . yes . it was . 1 more stop . as you stepped off the train . i told you my name . yours is marielle . i watched your red hat disappear up the steps . and wished i'd stepped off with you and said more . if you find this . i hope you'll write .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w41.txt:
--------------------------------------------------------------------------------
1 | you were gorgeous . i think you caught me looking at your tits . you had a sort of bemused expression . i'm sorry about that i'm sure there's more to you than meets the eye . i watched you go by and you got on the subway at the bryant park station . was standing in front of pax . tell me what i was wearingcarrying or give some relevant . correct and specific detail about my general appearance and i'll get back to you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w42.txt:
--------------------------------------------------------------------------------
1 | hello you were sitting across from me in e train around 5 n evening on wednesday . i was in pink shirt and suite . we looked at each other and pass smile . if you reading this hey . wants to go for a coffee i don`t drink sorry lol
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w43.txt:
--------------------------------------------------------------------------------
1 | tall blonde on east 17th street between 2nd ave and 1st ave also on corner of 1st ave and east 17th street please include some detail in reply so as to weed out spam
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w44.txt:
--------------------------------------------------------------------------------
1 | i have your hair everywhere . i still smell coconut oil . i still love you . i wish u stopped me . idk why you wanted me to leave t
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w45.txt:
--------------------------------------------------------------------------------
1 | you were keepin it real but looked quite ravishing waiting impatiently on the line . . . . camo belly shirt and tight shorts . large hoop earnings . . . . you briefly looked my way . rolled your eyes and mumbled incoherently about racist laws . unpaid bills . a deadbeat dad on trumped up charges and boy . i tell ya it got my juices flowing . . . . . . the q100 bus line is like the love boat for me .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w46.txt:
--------------------------------------------------------------------------------
1 | hesterfield gorge and the blue eyed beauty from brooklyn brooklyn hi whoever you are i met you tuesday aug 19 . day after my birthday in the parking area at chesterfield gorge that afternoon . you where in a tube dress with a friend . i wish to see to again xxoo the guy with the red mountain bike
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w47.txt:
--------------------------------------------------------------------------------
1 | sorry i didnt say hi . i thought it would have made you feel uncomfortable under the circumstances even though i knew you were checking me out . i was the guy with the brown hair and eyes ordering the ice coffee
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w48.txt:
--------------------------------------------------------------------------------
1 | we glanced as you came out of the bank of america around 530pm on the corner of parsons and northern blvd . i was the guy with glasses coming in as you left . just wanted to say hello
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w49.txt:
--------------------------------------------------------------------------------
1 | we see each other at mass and have exchanged the sign of the peace . you're very pretty and seem like a really nice woman . i'd love to get to know more about you . if you see this . let me know what i did recently for you and i'll know it's you . take care .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w5.txt:
--------------------------------------------------------------------------------
1 | you looked fantastic waiting for the uptown f wednesday afternoon . i was in a suit . wanted to talk to you but was so preoccupied with other things . i didn't feel up to my usual charming self . or at least not enough to introduce myself to a girl on the train .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w50.txt:
--------------------------------------------------------------------------------
1 | you were an absolutely stunning woman . mid to late 20s . wonderful jaw structure and dirty blonde hair with piercing eyes . ofcourse by the nyc standard we both had our headphones on . and as i stepped on to the 1 train at christopher st we caught eachothers eye immediately . at 14th . we both switch to the 2 express . and you got off at 72nd street . . . i hate technology and headphones that prevent a random hello from being obnoxious . . . you were in a grey jacket and white shirt with acid washed skinny jeans . and i honestly feel like i just let something walk out of my life before it got started . would love a random reconnection . tell me what shoes you were wearing . and let me sweep you off your feet . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w51.txt:
--------------------------------------------------------------------------------
1 | retro fitness gym your a shy girl . . . works out pretty hard . . . i think we make eye contact often but not sure . . . im tall . . white . . and im muscular and usually am with a friend . . . email me if this catches your eyes . . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w52.txt:
--------------------------------------------------------------------------------
1 | on monday night . you . the one with curly black hair . were sitting at the restaurant bar . you and friend 1 were joined by friend 2 . then 1 left . i was around the corner . a couple seats away . and you and i exchanged several glances . while i wasn't eavesdropping . i couldn't help but hear parts of your conversation . and i just kept thinking . i wish she were talking to me . we looked and laughed as i stood to leave . perhaps i should have approached .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w53.txt:
--------------------------------------------------------------------------------
1 | you walked down the steps in front of me . . . . you have blondish hair . . . white woman . . . black tights . . . . . . i thoroughly enjoyed the view . . . . lol . . . . you are sexy . . . i think you noticed me . . . . . give me a shout . . . we can can go jogging together . . . . . . ciao
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w54.txt:
--------------------------------------------------------------------------------
1 | i got on the 45 train this morning around 810 at 42nd street . you were sitting across from me reading the art of modern dance and had a black duffel bag with the words goodbye in different languages . you had dark hair and a tattoo on your left arm . we looked at each other a bunch of times and i got off at 86th street . anyway . i think you're really cute . maybe we could grab a drink sometime . looking forward to hearing from you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w55.txt:
--------------------------------------------------------------------------------
1 | hi i saw you this morning waiting online to buy your ticket . we were looking at each other . you had blonde hair and glasses . i unfortunately couldn't stay since i was blocking traffic . i wish could come up with a way to identify me . perhaps you remember a detail about me . look at the helpful details . hopefully this helps .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w56.txt:
--------------------------------------------------------------------------------
1 | you dished out a compliment . right before you purchased your ticket in the morning to go inside the museum .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w57.txt:
--------------------------------------------------------------------------------
1 | it was late . the bar was closing and neither of us had cards . i can't believe i didn't think to ask the bartender for a pen . i'd really like to see you again .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w58.txt:
--------------------------------------------------------------------------------
1 | just now . . . 525pm . . . you were riding and i was driving . cleared the way for you at 41st street and then you turned back as i was turning onto 45th . lock up the bike and have lunch with me tomorrow . a longshot . i know . fingers crossed . . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w59.txt:
--------------------------------------------------------------------------------
1 | i came in because i saw you going in while i was driving . . i saw you looking at me through my sunglasses . . i was wearing a green shirt too . i want to fuck you and play with your big tits . . i hope you see this . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w6.txt:
--------------------------------------------------------------------------------
1 | to the lady on the c train with me . got off at the wrong stop 72 st . and rode to 81st . its was just before noon . est . time 1150 am . damn i would love to adore you . you were an elderly woman . with great curves . red hair . glasses . you look like a secret freak . i had to restrain myself from becoming aggressive with you . lord knows your body can handle it . you were built for black men . we spoke briefly . you told me you were tired and i replied its one of those days . by looking at you i can tell you want me . and i want you . i wanted to take care of you . invite you to my place . play hooky from work . and play all day while i served you tea for your cold . i have my fingers crossed that you will see this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w60.txt:
--------------------------------------------------------------------------------
1 | free massage for women . i was a professional tennis player and now a professional therapist . special ayurvedic oil is used to relax your muscles . i live in east village and can host as welllive in a doorman building . have special touch that will relax your mind and will rejuvenate your body . massage by a good looking man with an athletic body and super clean . you can email me or reach me at sevan tree to . tree niine seven fiv one seex one .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w61.txt:
--------------------------------------------------------------------------------
1 | saw a woman at gym this morning and then saw her after too . tell me what you wore so i know it is you
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w62.txt:
--------------------------------------------------------------------------------
1 | i enjoyed talking with you . i would like to see you again . i'm not sure if you did it on purpose . but when you were taping my box for me i had a huge boner i had to hold down . . you have humongous breasts and they were just swinging around . i hope you did that on purpose . i wish i had asked for your number you probably wont see this but if you happen to and wanna see me again . . get at me .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w63.txt:
--------------------------------------------------------------------------------
1 | mature wm . professional wbenefits . down to earth . healthy . respectful . 6' 165 proportionate body . looking for a mature . occaional girl friend . send stats and a pic and best rates .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w64.txt:
--------------------------------------------------------------------------------
1 | circumstances cannot change that . i can never tell you this enough . i love you . your my heart .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w65.txt:
--------------------------------------------------------------------------------
1 | i was standing diagonally across from where you sat . you seemed a bit lost as you got up to consult map . but did not want to be nosey . additionally . looked as you were having some back discomfort . as you stretched a few times . you have beautiful eyes . you attempted to wipe your shades with your blouse . unsuccessfully . tell me what did i do . we both alighted on pacific st . wanted to chat . but did not dare bother . you . i think you took a car service . afterwards .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w66.txt:
--------------------------------------------------------------------------------
1 | to the woman who waves to me each morning n afternoon . . . what's up . roll the tints down .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w67.txt:
--------------------------------------------------------------------------------
1 | your a tall slender brunette . very social very sexy and beautiful smile . too bad we met much later and i didn't have a chance to know you longer . hope you passed your exam tuesday
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w68.txt:
--------------------------------------------------------------------------------
1 | i think of you every single day . i hold on to the great memories in hope that we have a future . i know i have to change much in my life for us to have a chance but i pray that i get one more time to show you what you mean to me and how special you are . i know actions speak louder than words . i just want you to know i will never . ever forget you . and each day spent without you can never be fully enjoyed or appreciated . love you always g
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w69.txt:
--------------------------------------------------------------------------------
1 | thankfully i washed out all the chlorine from ouy of my eyes and have emerged and left the neighborhoods property . i haven't returned . not even to vandalize anything and yet i am haunted at the fact i have visited . the whole hood still drops by for a swim except for me so why do i feel the chlorine in my eyes . one day i will forget you forever . i hope one day you'll fully at least say forget about me enough for the lil ones sake and allow me and lil one to grow as life intended as we are living life for us . hopefully this birthday she and i can enjoy . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w70.txt:
--------------------------------------------------------------------------------
1 | you are a chassidic girl and we met on the subway 2 years ago . we decided to go to the hotel and had an amazing time . and we promised each other it will be a one time only . i have not stopped thinking about you and the time we had . you were wild . loud and exceptional skills . you also told me that you never had it as good as that time . we left crying that we wont see each other again . i want to experience that once more . i remember the china story you told me and left a lasting impression . so if you see this please respond
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w71.txt:
--------------------------------------------------------------------------------
1 | never posted on here before . i got on at woodhaven blvd and got off at union square . i was wearing a blue shirt . . you caught my eye right away and i regret not talking to you . . i would love to get to know you . so if you see this hit me up .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w72.txt:
--------------------------------------------------------------------------------
1 | never posted on here before . i got on at woodhaven blvd and got off at union square . i was wearing a blue shirt . . you caught my eye right away and i regret not talking to you . . i would love to get to know you . so if you see this hit me up .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w73.txt:
--------------------------------------------------------------------------------
1 | our love was real . yet she doubted it . she was sweet and caring . yet she acted poorly when angry . she was the best thing in my life . yet she was also the worst . she brought the best out of me . yet ugliness too . she looked in my eyes when we made love . yet she was embarrassed after . she is my one true love yet she cheated on me . i can't forgive . yet i long for her still .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w74.txt:
--------------------------------------------------------------------------------
1 | i know you weren't the one to step on my feet but you were getting your crumbs on me . there are far worse things in this world than a beautiful woman getting her breakfast on you . we were on the f train together and you were working on your spanish . wish we had more time to talk but you ran off . tell me something about our exchange and we can get together for food at a table .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w75.txt:
--------------------------------------------------------------------------------
1 | we stayed after dusk . . . and . . . it was ok you looked so beautiful last night you take my breath away . . . because i don't need it when i'm with you . . i have your breath . . . your heart . . . we didn't meet at the bridge . . we met below the belt . . . . and i melted . . . into you where i want to be . . no props . . . no crickets . . . or velor clad guards no . . . elks members . . nor korean gingham gangsters just a boat passing by . . effortlessly . . and then another gliding into the night as effortless as our love . . . it coudve been the seine . . . when i'm in your arms . . . anything is possible i love you . . . . my itsyou
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w76.txt:
--------------------------------------------------------------------------------
1 | about 930 this morning . i couldn't help but notice you on the penn station 34th street platform for the downtown e . i tried to be a gentleman and not stare . but it was almost impossible . you had silky shoulder length hair and piercing green eyes . you had a beautiful red dress and sexy ankle boots on . you're stunning . we boarded the train together but again i tried to be a gentleman and not approach you . i'm sure you get unlimited attention and didn't want to impose you got off at spring street and told me to have a nice day . thanks to that little comment i'll have a great week . it's not often an old dog like me gets noticed by a knockout such as yourself . i regret not speaking to you . if you have interest in getting to know each other . tell me what i helped you with before you got off the train . if not . i thank you for making my day .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w77.txt:
--------------------------------------------------------------------------------
1 | i sat down next to you . you bumped me and apologized . i said its alright . you had long black hair and very pretty eyes . i asked where you were going . you said 168 or 188st . that's when i realized i was about to go the wrong direction . you told me where to go as i left . and i thanked you . you were beautiful . and sweet . never done this before . but obviously i'm new to new york and this seemed like a thing to do in a city like this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w78.txt:
--------------------------------------------------------------------------------
1 | i see you in the morning . we drop our kids off . we chat . maybe there's some almost imperceptible flirting . but what do i really want say . come back to my place or yours . so you can sit on my face . c'mon i can't imagine that you are all getting licked and eaten the way you need and deserve . . . i'm for real . put something in the subject line about msc that let's me know you're real . no drama . no judgements . complete discretion guaranteed and expected in return . white dad . 5'10 188 some facial hair handsome and discreet . sane and healthy .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w79.txt:
--------------------------------------------------------------------------------
1 | i'm pretty sure we were making eye contact at the end of the ride . there . . . you even turned to look at me as you got off at 34th street . at least i think it was 34th street . . . i was a bit taken with you . and somewhat distracted . you were sitting . i was standing in front of you and a little to your right . i wore sunglasses . a jean shirt . and looked a li'l bit scruffy . anyway . figured this was worth a shot in the dark .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w8.txt:
--------------------------------------------------------------------------------
1 | to my b . e . g . although today is my b day . my thoughts are always with you . not a day goes by that my heart aches to see you once more . each passing minute feels like an etrnity . . i continue to wait for you and once again share the lve we had for each other . love . always your . b . e . b .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w80.txt:
--------------------------------------------------------------------------------
1 | i am an old college friend of catherine bowditch from shelter island i was trying to get in contact with her if anyone knows her and can point me in the right direction thankyou
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w81.txt:
--------------------------------------------------------------------------------
1 | d been a long time . you north carolina pensacole . . . me same . saw ur bro recently thought of u . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w82.txt:
--------------------------------------------------------------------------------
1 | your glowing face caught my eye as i was standing on corner and you responded to me with a very friendly good morning so if it was a good morning lets see if we can make it a wonderful night
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w83.txt:
--------------------------------------------------------------------------------
1 | we met last month . you are in a relationship and so am i . i'm sure you saw me stealing glances at you and i saw you doing the same . i think you are incredibly hot and enjoyed briefly speaking with you . there was definitely sexual tension between us . what should we do about this . your initials are f . r . and you are 24 .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w84.txt:
--------------------------------------------------------------------------------
1 | you were the blonde at the counter . when you were leaving we smiled at each other . you're eyes were beautiful . i wish i would've stopped you to say good morning . been thinking about you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w85.txt:
--------------------------------------------------------------------------------
1 | we passed by each other on a quiet street . we smiled and said hello to each other at the same time . i wish i would have said more reply with the street and cross streets so i know it's you . you walked your dog by the address i went to like 10 minutes later .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w86.txt:
--------------------------------------------------------------------------------
1 | many years ago . i lived in flushlng queens . so did u . u went to catholic school . i was dateing someone and was older . . . u lend me the 12inch bella lugios dead . by bauhaus . u been to my apt way back . as a freind . i met ur family . i just was looking at a bauhaus video and u came 2 mind . . 1982 83 . . i hope u get this . . . . u didnt even open the album when u lend 2 me . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w87.txt:
--------------------------------------------------------------------------------
1 | i gave you a note the other day asking if i can buy you a cup of coffee . hopefully . i did not chase you away . . . . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w88.txt:
--------------------------------------------------------------------------------
1 | i was on the train when you got on with the usual early evening crowd on 14st . i was standing next to the door and you stood across from me . the crowd would only let us glance at each other at a distance . i would like to take you out . what train were we on and what color was my hat .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w89.txt:
--------------------------------------------------------------------------------
1 | i was sprinting along the track . while you were jogging on the track . just wondering if you wanted to chat and grab a cup of coffee . otherwise you looked very determined and i didn't feel it was appropriate to ask you for a cup of coffee while you were working out . . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/m4w/m4w9.txt:
--------------------------------------------------------------------------------
1 | hi . you were reading the secret history . we sat near one another on the g train and both transferred to the a train at hoyt . . . i felt like we were aware of one another but neither of us were willing to initiate conversation . if interested in meeting for coffee . write back . say hi include a description of me
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m0.txt:
--------------------------------------------------------------------------------
1 | saw you yesterday walking to your car fr9m the corner store carrying a black bag . . . you never took your eyes off me . . you got to your car and stood there watching me . . . i was watching you the entire time i was the black girl driving the bmw . . . tell me the color of my car and the time
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m1.txt:
--------------------------------------------------------------------------------
1 | gosh just feeling soo wonderful right now maybe a little sexy i love seduction and romance building up slowly gosh this is too hot take me
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m11.txt:
--------------------------------------------------------------------------------
1 | hello . i don't know if you remember me but i am a hot white young female professional that you fucked about three times in your apartment while your wife was out . we didn't hit it off at first but once we started . we fucked for hours and sweat all over each other . we moved your futon all across the floor fucking . i licked your ass and spoiled your cock with so much attention . your beautiful wife is african american and you both had other sexual partners . i think i saw you recently and all the sweet memories of you fucking me and pulling my long blond hair has made me so horny . i need to fuck you again . if psu kinesiology doesn't mean anything to you . you are not the man i'm looking for . if you think you're mr kinesiology . . . please contact me .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m12.txt:
--------------------------------------------------------------------------------
1 | hi . we talked after the show . if you are single . maybe we could have a drink
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m13.txt:
--------------------------------------------------------------------------------
1 | hey . so i don't usually do this . but here goes nothing . you had a grey shirt and black hair this morning around 830 and you were standing right next to me from i think . the lorimer l to union square . i've got short blonde hair and was wearing a jean jacket with a blue scarf . the only reason i'm doing this is because i felt this energy between the two of us that i don't come across often . even though the only word you said to me was cheers while we were getting off the train . . . also i've had a few glasses of wine with a coworker and thought 'why not' . so . to prove you are this mystery man and not a total skeezeball tell me what the tattoo on your right bicep says and maybe we could grab a cup of coffee .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m14.txt:
--------------------------------------------------------------------------------
1 | you are a tall young man with dark blonde hair . and were wearing a red plaid shirt . a grey jacket . and brown leather shoes . this was wednesday evening . you were playing on your white phone . i have brown hair with bangs . and was wearing a denim jacket and black pants . i passed you going into the subway at 23rd st . you sat across from me on the train and we looked at each other . you smiled but i think i looked away but i hope you saw me smile too . we both got off at 14th and walked to the l . and i was too shy to make eye contact again . you got off at bedford and that was it . i won't be so shy if we meet again .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m16.txt:
--------------------------------------------------------------------------------
1 | this was a few weeks ago but it was like 3 . 4 am and i was on the uptown 6 . got on at union square with a couple of friends . i was sitting across from you with one girlfriend and you asked us where we were coming from because we seemed to be in such a good mood . we were coming from a rooftop in brooklyn and you said you had just come from the 13th step which made me laugh because that used to be my watering hole . i didn't really think anything of it at first but you were actually really attractive and i think you said you were new to the city . living in the ues . i got off at grand central .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m17.txt:
--------------------------------------------------------------------------------
1 | i was outside most of the time . i came in . and out i saw you looking at me many times . then you went inside and i didn't see you later send me an email if you know that it's you
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m19.txt:
--------------------------------------------------------------------------------
1 | hi . you were crossing cpw with a child in the evening yesterday tuesday around 7pm . we were both waiting to cross the street . you looked over but i was too shy to look at you . i don't know if it's your child . or if you're married . contact me and tell me some more details so i know it's you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m22.txt:
--------------------------------------------------------------------------------
1 | last night tuesday we see each other on light bay parkway brooklyn right after the exit you were next to me we said hello and smiled than you drove straight and i turned left the light changed so fast i didn't even have the chance to ask you for your number you were very handsome latino man tell me what color was my car this way i know is you i hope i'll find you
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m24.txt:
--------------------------------------------------------------------------------
1 | three four seven four nine nine three nine five nine . hi . i'm italian pretty and looking for great sex and a commited relationship . no games plz
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m25.txt:
--------------------------------------------------------------------------------
1 | you supreme 5panel . full sleeves . frees . full beard . possibly a genius me all black nike jacket . waxed jeans . air max theas i think you were eyeing me until you saw i wasn't alone he's not my boyfriend . if you see this message me .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m26.txt:
--------------------------------------------------------------------------------
1 | you have me feeling a certain way right now words can't describe love you honey
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m27.txt:
--------------------------------------------------------------------------------
1 | i was sitting on the chair outside hope deli on havemeyer at hope st around 930pm you passed by and waved hello while talking on the phone . half an hour later i was walking down the same block on havemeyer talking on the phone . and you walked by me and said hello again i'd love to chat with you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m28.txt:
--------------------------------------------------------------------------------
1 | i was listening to music . stretching my legs and raising on to my toes when i turned around and saw you smile . you were waiting for the downtown q train . had a black pageboy cap on and the sweetest smile . had i not been so shy maybe the interaction would have continued longer . . . and maybe you'll see this . describe me so i know it's you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m29.txt:
--------------------------------------------------------------------------------
1 | hey we were driving and flirting . you tried to give me your number but i only got the first three digits . if by a long shot you come across this . . . message me the first three digits so i know its really you
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m3.txt:
--------------------------------------------------------------------------------
1 | you were outside for a smoke . i was on my way home . you were really cute and i should've actually stayed to chat . but instead i just answered your quick question as i passed . it was outside a hotel . so i'm not sure if you're just in town for a few days or you were just grabbing drinks at the bar . but either way . i'd like to continue that conversation . tell me anything the hotel . where on 44th you were . what time it was . any defining characteristics about me what i was wearing . etc . and the first drink is on me .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m30.txt:
--------------------------------------------------------------------------------
1 | i spilled coffee on you on uptown train . you were very cool about it and sweet . but i had to switch to 6uptown union sq .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m31.txt:
--------------------------------------------------------------------------------
1 | grabbed a bud . ate a taco . smoked a cigarette . you said hello . honestly . it had been a really long day but mostly i just wanted to imagine fake encounters with more attractive men than have a real one with you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m32.txt:
--------------------------------------------------------------------------------
1 | that incapacitated guy in a suit across from me making horrible sounds in his sleep and grabbing his face made us meet eyes and laugh . at one point he was projectile spitting with his eyes closed so i moved . i asked you what to do and you shrugged . i told you that if he died or something i wasn't gonna feel bad cause you enabled me to not do anything . i just moved here two weeks ago . i got bigger problems than that guy . you said . you are hot let's link .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m33.txt:
--------------------------------------------------------------------------------
1 | gp couldn't tell you in '72'73 and can't tell it to a person who won't even talk on the phone
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m34.txt:
--------------------------------------------------------------------------------
1 | you were a tall . thin man with blond hair tied into a bun . wearing a blue shirt . talking to a male friend around 7 pm . i was wearing a black lace dress and have light brown curly hair . we got off the train at the same stop . and of course i had nothing to say . but damn did i think you were incredibly handsome . if you noticed me and are interested . don't be as shy as i was .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m35.txt:
--------------------------------------------------------------------------------
1 | hey . wanted to know how your doing . it's been awhile . time to catch up . smile . g xoxo
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m36.txt:
--------------------------------------------------------------------------------
1 | hey . it's gracie . was hoping to catch up . i hope your doing well . it's been too long . smile . xoxoxo
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m37.txt:
--------------------------------------------------------------------------------
1 | the worker who appreciates ladies wearing overalls . . . hey . extend the e and ad a wink
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m38.txt:
--------------------------------------------------------------------------------
1 | tm . when you first ran away in your avalance . i did not know the reasons why . and when i found out the truth . it hurt me to the core . i was scapegoated out to be something we both know was not true . it toook lots of painful tears and time to finally clear my name . this is my forgiving you . my thanking you for making me understand i am so much better to myself for realizing my worth . i just hope you treat whomever you end up with gets all the things you couldn't give me for the time we were together . i will remember when you said you were falling for me and will nnot take it back .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m39.txt:
--------------------------------------------------------------------------------
1 | i forgot all your ig names . . . . whois something loo . . . eiffel tower on the 4 train 128553
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m4.txt:
--------------------------------------------------------------------------------
1 | this is such a long shot . but you were sitting on the n this morning around 10 am . and it was stopping at 59 street in brooklyn . i was waiting at the platform and we locked eyes for a quick second . i had brown hair and was wearing mostly black . and you had on a black hat . red and black plaid shirt . and long hair for a guy . you got off a couple of stops after you got up to check the map inside the subway car . if it's you . tell me what stop you got off at in manhattan . or any other details i guess . sorry if this is weird . thought i'd give it a shot .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m40.txt:
--------------------------------------------------------------------------------
1 | anais nin love never dies a natural death . it dies because we don't know how to replenish its source . it dies of blindness and errors and betrayals . it dies of illness and wounds it dies of weariness . of witherings . of tarnishings . despite all thatmy love does not die . nor does it weaken . . . . . . . the beatles who knows how long i've loved you . you know i love you still . will i wait a lonely lifetime . if you want me to i will .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m41.txt:
--------------------------------------------------------------------------------
1 | your umbrella opened up on the train while you were standing next to me you laughed . apologized . i told you it was bad luck but not to worry . kept staring at each other but no one said a thing . lame . perhaps i'll see you on the l again
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m42.txt:
--------------------------------------------------------------------------------
1 | to the handsome guy with the shaved headwhen i rose from my seat just before noroton heights you looked at me as if you knew mehave we met . if not . i like to think you would like to meet
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m43.txt:
--------------------------------------------------------------------------------
1 | hi . i'm an asian girl who was waiting for a friend while an artist was drawing a portrait of her . you suddenly stopped walking . stared and smiled at me . we shot a few glances at each other and was walking towards the stairs at times square . i should have asked for your number but was too shy . if you see this post . email me . from august 1517 . it was one of these nights . i dont remember exactly which night and not sure of your race because you look mixed lol . i know what shoes you were wearing and you held an ipad while wearing a backpack . i highly doubt you go on this thing but ill let fate decide lol . if you think it's you . let me know in the subject title what shoes brand you were wearing .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m44.txt:
--------------------------------------------------------------------------------
1 | i was running the popup hawaiian spot and you came in a few times . i meant to write my number on your takeout ticket . but the bag left before i could . i hoped you'd come back and then we closed . haha . it's crazy to think this could work . but i'd never know if i didn't try . you returned the first night you came in because . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m45.txt:
--------------------------------------------------------------------------------
1 | slightly embarrassed to post this . but here goes we were on the same manhattanbound b train around 630 pm this evening in brooklyn . i think you got on at prospect park . then i got off at 7th avenue . there was not enough time i was too shy to say anything but wanted to . you were sitting . i was standing across from you . you have a beard . were carrying one bag plus another smaller camera . bag . hope you say hello if you see this . tell me something i was wearing if you do . . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m46.txt:
--------------------------------------------------------------------------------
1 | we dated about 2 months ago . and then you just kinda faded away . i never really figured out what went wrong . for what is worth . you have a special place in my heart . saw you again in greenley square on 34th . you were there eating lunch by yourself . a part of me wonders if you were there hoping to run into me . since i know you don't work in this area and i told you i eat lunch there everyday . i panicked and turned away when i saw you . bc i wouldn't know what to say . now that i gave it some thoughts . i just want to tell you that i miss you . .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m47.txt:
--------------------------------------------------------------------------------
1 | this is driving me crazy . so i resort to the internet for help . . . i met you at walter's on thursday sept 4 . you were very cool guy who bought us all a round of beer . you sang some great karaoke . i thought your energy was amazing . unfortunately . i was too . . . clueless to do anything at the moment . i asked you to come back and sing with us again and you answered that you would . but you live too far out in jersey . for some reason . i took that as a no . but i wish i hadn't . if the universe helps me find you . let me know .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m48.txt:
--------------------------------------------------------------------------------
1 | do the initials js stand for anything . your posting description is quite short . we do not charge per word please elaborate .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m49.txt:
--------------------------------------------------------------------------------
1 | you were biking on union maybe going towards the park . while i was heaving a chest up the stairs to my apartment . i was so taken aback by your kindness and offer of help and your great eyes that i choked and said no . i hope i at least thanked you for stopping . say yes to going out for ice cream . i promise there will be no heavy lifting .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m5.txt:
--------------------------------------------------------------------------------
1 | hi around 1130pm i saw you at broadway junction on the manhattan bound a platform you a cute . mildly scruffy white dude with a big instrument case me a small white girl with short hairbeige jacket we exchanged a few glances and you sat next to me on the train i almost talked to you but i just got off at nostrand instead who are you . what's up .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m50.txt:
--------------------------------------------------------------------------------
1 | i'm sad too . i miss him more . this is very familiar . a hint please . . . you wrote i miss you . i've said those words 1000 times already . goddammit i miss you . i hope you found some happiness . as always . your my love .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m51.txt:
--------------------------------------------------------------------------------
1 | we both tried to enter the nr subway station at canal street . we both simultaneously realized the station was closed . we laughed and continued our adventure together west . working our way to the ace station and exchanged names . work life . night plans . . . but not numbers . what you don't know is that i had just seen my ex pass through the little italy carnival . holding hands with his new girlfriend . what you don't know is i think you have a great smile . what you don't know is i secretly waited for you to decide you'd rather go uptown with me than downtown . a girl can dream . right . you brightened my night . thank you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m52.txt:
--------------------------------------------------------------------------------
1 | we met on amtrak acela train number 2167 on thursday . you got on at nyc and looked handsome in your suit . en route to home outside of philadelphia . you sat next to me and we chatted virtually non stop to newark where i got off . i was in a blue vneck shirt and had a bunch of suitcases . you didn't ask for my number and i was sad . but then when you waved at me as the train pulled away my heart lurched and i realized i should have just offered it to you . i think you felt the same way . that was almost a week ago and you are still stuck in my mind . i'll know it's you when you tell me what town you live in we talked all about it and why i had so many suitcases we talked about that too i'm sure this is a waste of time but at least i tried . i'd love to talk more with you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m53.txt:
--------------------------------------------------------------------------------
1 | we met on amtrak acela train number 2167 on thursday . you got on at nyc and looked handsome in your suit . en route to home outside of philadelphia . you sat next to me and we chatted virtually non stop to newark where i got off . i was in a blue vneck shirt and had a bunch of suitcases . you didn't ask for my number and i was sad . but then when you waved at me as the train pulled away my heart lurched and i realized i should have just offered it to you . i think you felt the same way . that was almost a week ago and you are still stuck in my mind . i'll know it's you when you tell me what town you live in we talked all about it and why i had so many suitcases we talked about that too i'm sure this is a waste of time but at least i tried . i'd love to talk more with you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m54.txt:
--------------------------------------------------------------------------------
1 | we met at a bar on the les late saturday night . you were tall . brown hair . wearing a blazer . and had some scruff . i was the tall blonde who helped close out the bar with you and your friend . the party continued in long island city until i exited quickly in an uber to meet up with my cousin . wasn't even thinking . . if you happen to see this . would love to see you again even if it means leaving the island .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m55.txt:
--------------------------------------------------------------------------------
1 | hey . it's gracie . was hoping to catch up . i hope your doing well . it's been too long . smile . xoxoxo
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m56.txt:
--------------------------------------------------------------------------------
1 | hey . george . it's been awhile . just checking up on you . wanted to hear how your doing . please don't text while driving . don't forget to smile . g . xoxo
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m57.txt:
--------------------------------------------------------------------------------
1 | i woke up because i thought i heard your voice . i looked for you in the darkness until i spotted the time . glowing on the cable box . i'm not where i should be . and you are not here . 400 am .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m58.txt:
--------------------------------------------------------------------------------
1 | hey . it's gracie . wondering how you are . it's been awhile . too long . just wanted to catch up . like i said we would . hope your smiling xoxo
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m59.txt:
--------------------------------------------------------------------------------
1 | tonight on the packed brooklyn bound l from union square around 630pm . we locked eyes as i was leaving . you're a very handsome dude . i was pretty hazy and barely smiled back . but i would have said hi if there was more time . would be pretty magical if you read this . if this is you . describe your outfit . i'll remember .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m6.txt:
--------------------------------------------------------------------------------
1 | tonight at 1030 . i was wearing all black . u . in a blue tank . were about to swipe your card . . . your gaze was striking . i couldn't stop staring . i wish i would have come down the stairs . write me
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m60.txt:
--------------------------------------------------------------------------------
1 | that's right . you . the frum married man reading this ad . i want you . i want you to realize that it's only ten days until rosh hashana and it's time to stop doing what you're doing . i know that you want to stop . you just don't know how . reach out to me . i will help you . i want to help you . let's make the end of this year a strong one . and let's start next year off the right way . let's make sure that when next week comes around . you are written in all of the good books . wishing you all of the best . ksiva vachasima tova .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m61.txt:
--------------------------------------------------------------------------------
1 | we saw each other twice today while running the loop in opposite directions . you were wearing a grey tshirt and black shorts . i was the blonde . you were definitely checking me out each time we passed each other . i was looking back . but maybe hard to tell with my sunglasses . if you see this shoot me a message and let me know what color shoes you were wearing . so i know it's you . it would be nice to see you again .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m62.txt:
--------------------------------------------------------------------------------
1 | hey todd . so many things in my head yesterday . except for the most important one having a drink with you after your run . let's go for one if you see this . cheers . mari
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m63.txt:
--------------------------------------------------------------------------------
1 | we rode the r train uptown and into queens . sitting across from each other in the rather empty first car . you looked like a bro in sweats . but i found that attractive . i was the blonde with red pants . you got off at steinway . i kept on for a few more stops . hit me up if you want to chat or hang sometime .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m64.txt:
--------------------------------------------------------------------------------
1 | we used to date when you lived in tennessee . . . last time i checked you lived in the brooklyn area now . i hope you still do so you can maybe have a chance at seeing this . i still have feelings for you and i honestly always will . i know we were young but honestly i was stupid for leaving you . we could have had something so good . i honestly saw a future with you . we have both moved on now . but obviously something was still there when you asked to hang out before leaving for new york . if you ever see this . i just wanted to let you know i wish we didn't leave things unresolved . i wish things would've worked out . and if you ever want to talk . i'm here .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m65.txt:
--------------------------------------------------------------------------------
1 | you were already on the g train this morning when i got on at classon . we made some eye contact when i got on . and for some of the ride . we both transferred to the c at hoyt . you are very tall . bespectacled . bearded . wearing a red plaid shirt messenger bag . overall very adorable . i have brown hair . sunglasses on my head . brown jacket . the glances probably really meant nothing . but no harm in putting it out into the ether .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m66.txt:
--------------------------------------------------------------------------------
1 | i have the pleasure of seeing you working out all the time . does the young pretty girl thats with you know how fortunate she is . you're much older than her . i'm thinking you need a timeout to play . hoping the way i look at you is getting your attention . wanting you l . . . . . . now
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m67.txt:
--------------------------------------------------------------------------------
1 | i never do this . but i saw you on the downtown f in a crowded train car on my way to work on saturday and am still thinking about you . i got on at w 4th and got off at 2nd ave . it was around 400430 pm me medium brown braided hair . brown eyes behind glasses . and an open blue shirt over a black dress . you were are tall and handsome . with light browndark blonde hair . i was looking down and when i looked up i met your gaze for several seconds . i looked away for a second and when i glanced back we met eyes again . i'd be lying if i said my heart didn't skip a beat . i don't know if you'll see this and i feel silly . but for some reason i was so compelled to do so .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m68.txt:
--------------------------------------------------------------------------------
1 | you were tall . with dak hair and a bright orange shirt . running north near the area where the softball fields . turtle pond and the small stadium is located . i was dressed in a small black leather cropped jacket . long black flowy dress with long hair . i was walking next to a red head with a bright pink purse . we locked eyes for a sec and experienced a moment of intensity in our passing . . . if you happen to find this . get in touch .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m69.txt:
--------------------------------------------------------------------------------
1 | i don't know why i am posting this . but you seemed really cool . you told my friend that i reminded you of someone you used to know while we were riding on the anightlocal uptown . you said you went to colombia . and my friends and i had a really chill convo on our ways back home . i told you seeing me was a sign to reconnect with this person from your past . but maybe it was a sign of something else . . . message me if you think we could be friends and see what happens
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m7.txt:
--------------------------------------------------------------------------------
1 | you were tall . dark . and slender with black . curly hair clearly a professional . i was sitting at the opposite side of the n train car . you stood up . it was your stop . around atlantic ave maybe . and our eyes immediately met . you turned away . and i did too . but like magnets . our eyes drew back towards each other . you left the car and walked away . the train moved . and our gaze met once more . i laughed . it was funny . red lipstick . green jacket . blue yoga mat .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m71.txt:
--------------------------------------------------------------------------------
1 | it was around 1am and my friend and i prevented you from sitting on a subway seat that smelled like urine . i graciously offered you a seat on my lap as another option . you had beautiful eyes and wished us a good night . would love to see you again so you can thank me one more time for saving you from a potentially awful subway ride to west 4th .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m72.txt:
--------------------------------------------------------------------------------
1 | i miss you . i wish this feeling of emptiness would disappear but even after months of silence this dark void consumes me . and it's my fault because i continue to let it sadden me . maybe it's really all i have to remind me of you . silence . memory . thoughts of what could have been . i try to understand why we stopped talking . i was always afraid to ask why . i would love to hear from you . just to know that you are well . in every friendly manner of course . i am far away . maybe too far in my mind but one thing i know for certain . i really do miss you .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m73.txt:
--------------------------------------------------------------------------------
1 | i have never felt such an inexplicable reaction upon seeing a stranger before . you felt close but very far . like a family member from a previous life . you're young but have silvery hair . tall and skinny with a prominent nose . you wore a grey shirt and dark denim . we stood next to each other and held on to the same pole . i was wearing a white floral print blouse and a black floral print backpack . when we first got on the subway from times square at around 630 . a large white man got on as well and began a loud conversation with a black couple next to him . maybe we will cross paths again . but if not . i just wanted to share my odd experience . if you see this . let me know what two items you were holding at the time .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m74.txt:
--------------------------------------------------------------------------------
1 | i met you at a party in bushwick last saturday 96 and we were both friendsoffriendsoffriends of the hostess . our friends were all wasted . so we ditched and got fried clams at 3am before talking on my roof until the sun came up . realized i gave you the wrong number at the end of the night and don't want to miss this connection get it . . me long brunette hair . had never eaten fried clams before . williamsburg resident . pr gal you went to wash u . dark hair . did teach for america in new orleans in all honestly . this is her friends writing this for her because she is not a psycho creep
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m75.txt:
--------------------------------------------------------------------------------
1 | we smiled at each other a few times and i would have liked to talk to you . but lost you at the set break and then my friend wanted to leave . you had blond hair a plaid shirt and we were dancing next to each other for awhile . but rubbing up against someone it's too loud to have a conversation with isn't my style and it was too loud for conversation would like to talk promise i'm not as lame as posting on here implies . this is definitely the lamest thing i've done all day . maybe in two days
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m76.txt:
--------------------------------------------------------------------------------
1 | tom i'm so sorry but i accidentally deleted you . . if you happened to check this board please respond so we can be back in touch .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m77.txt:
--------------------------------------------------------------------------------
1 | i saw you early last week on the uptown 6 train . a little after 8pm . i sat down on the train across from you at spring street and commented on your nice cole haan shoes brown brogues with orange soles laces . you have reddish blonde hair and a beard . your black leather jacket and outfit really made the shoes stand out . i thought i saw you smile at me when i got off the train at union square . i'm an asianamerican girl with long hair and rainbow headphones . i should have given you my phone number . i hope that you see this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m78.txt:
--------------------------------------------------------------------------------
1 | when i first came in at dunkin donuts you looked at me . then you left . i saw you again on the platform of the l train on myrtle ave and we smiled at each other . you were caucasian with blue eyes and a striped white button down shirt . both our trains came at the same time . i was wearing a pink shirt . sept 4th or 5th . around 9am
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m79.txt:
--------------------------------------------------------------------------------
1 | we were both doing our breakfast shopping . i was seeking oatmeal . if in the wrong aisle . you were getting deli treats from the counter . the fare . perhaps complementary than they appeared . be in touch . you made me smile .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m8.txt:
--------------------------------------------------------------------------------
1 | we we're on the 7 train together . it was around 9pm . you came on with your friend and sat across from me . you commented on my perfume . and you kept staring at me . you were really attractive . if this is you reply with what shoes i wore .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m80.txt:
--------------------------------------------------------------------------------
1 | west side of park avenue . between 47th and 46th st . right around 615pm on thursday . sept 11 . you were walking south . i was walking north . you were wearing a suit . i was in a blackwhitebeige dress . our eyes met for a long moment and we checked each other out . . . i should have smiled . . . but i'm still too shy and not nyc enough to do that . . . wish we could have talked .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m81.txt:
--------------------------------------------------------------------------------
1 | hey . i saw you on the l train and you immediately looked at me when i walked in at grand street . i didn't have the courage to talk to you but writing this missed connection was the first thing that came to mind . you had a red snap back and a the hundreds shirt . two full sleeves and i was creeping because i love artwork . i saw one tattoo said loyalty on your right wrist . we both took the 6 train up town at union square and i couldn't stop looking at you . i was wearing a white crop top and a brown leather jacket . i had black ray bans on my head and gold gladiators . this took place around 940am . let me know if you see this .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m83.txt:
--------------------------------------------------------------------------------
1 | i saw you at brooklyn ball factory and thought you looked familiar . i'm petite . brunette and wore a daisy dress with a leather jacket . you have a nice smile . don't know you but would like to
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m84.txt:
--------------------------------------------------------------------------------
1 | you left your keys in the waiting area of the time warner cable store on 23rd and i brought them to you when you were being helped by an employee . on wednesday at noonish . i got shy when you thanked me . . . wish we had exchanged contact info .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m85.txt:
--------------------------------------------------------------------------------
1 | 37 xronon ellinida apo astoria psaxnei gia ellina 3745 eton gia sovari sxesi . kapion pou thelei na kanei oikogenia kai paidia . an endiaferese stile mou minima me tin ilikia sou kai apo pou eisai . stile kai mia fotografia sou . eimai paxia . kai an den s'aresoun oi paxies apla min apandiseis .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m86.txt:
--------------------------------------------------------------------------------
1 | i was on the phone and you walked by me and said hi . you asked for my number so you could take me to dinner . i said no but should have said yes . i would really like to see you again . if you are reading this . email me and tell me what you were wearing .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m87.txt:
--------------------------------------------------------------------------------
1 | i went to pianos last night knowing i shouldn't've . but thankfully you had already left . sometimes the memory of you kissing me under those seedy street lamps in the les still punctures my thoughts . remember when you lightly touched my knee at that unbearably loud bar . the ghost of it lingers on my left kneecap . we hardly know each other but . . . i think know you . i think you know me . . . somehow . i'm not supposed to but i can't stop thinking about you . i know you're happy where you are now and with the life you have now . and i wish i felt the same .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m88.txt:
--------------------------------------------------------------------------------
1 | you were with a friend or two . you had a tshirt on and you had a beard . buzzed hair . dark features . i was wearing a long black coat and rain boots and my hood was on with red hair poking out . our eyes met for a minute . i've thought about you all day
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m89.txt:
--------------------------------------------------------------------------------
1 | it was my birthday . we spoke for a while outside and we never exchanged names . as i was walking away it felt unsatisfying not exchanging any information . if you come across this reply with something we spoke about . hoping you read this . birthday girl
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m9.txt:
--------------------------------------------------------------------------------
1 | you said i seemed like a good storyteller and jumped in on the conversation i was having with my friend . you like colors . and i should've given you my number . on the off chance that you see this . i'd like to amend my mistake .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m90.txt:
--------------------------------------------------------------------------------
1 | so although i was wearing the same dress last night and today . and ordered chicken wings through seamless last night and today . you still introduced yourself and complimented my dress . you seem like a quality fellow . holla if u want to chill when i'm not ratcheteering in a housedress ordering food from my couch . i promise i am a functioning member of society .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m91.txt:
--------------------------------------------------------------------------------
1 | i know i'm wasting my time i am never going to find you . as of right now all i have is fate to go on and memories of how our eyes met . if i could go back do that day i should have said something even if it was just hi now since 72714 i have thought about you every day and know i will never see you again . but if by chance you do see this we were on flight b6 0324 from lax to jfk you were sitting in row 18 i believe seat f . i also realize you probably don't feel the same or could be in a relationship but as stupid as it is i haven't given up hope
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m92.txt:
--------------------------------------------------------------------------------
1 | you were perfectlybalanced the entire time we stood next to each other against the 2 train doors . around 530 pm today . each of us moving to the side at a couple of stops to let people on and off . we caught eyes when you first got on fulton . chambers . i can't remember and again one or two times after that . i also had glasses . a plaid shirt and messy bangs because rain . i got off at times square . and if this winds up on your radar . let's head to the same place next time .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m93.txt:
--------------------------------------------------------------------------------
1 | you were tall and wearing a black . baseball cap . i was with my friend . wearing a black dress with white hearts . i teased you about your sandwich order . you laughed at my dumb jokes . let's talk again .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/w4m/w4m94.txt:
--------------------------------------------------------------------------------
1 | you were jogging by the lake in prospect park . and stopped to give me directions to the audubon center and the ravine . you mentioned i'd see a nice waterfall when i got there .
2 |
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/wikipedia/eclipse.txt:
--------------------------------------------------------------------------------
1 | The Eclipse Award Trophy is presented annually to recognize those horses and individuals whose outstanding achievements have earned them the title of Champion in their respective categories. Presently there are twenty categories that include American Horse of the Year, eleven Division Champions, five connection Champions and three miscellaneous awards.
2 |
3 | The Eclipse Awards are co-sponsored by the National Thoroughbred Racing Association, the Daily Racing Form and the National Turf Writers Association. Prior to the start of the Eclipse Awards in 1971, the TRA and the Daily Racing Form separately honored racing's annual champions.[1]
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/wikipedia/phadke.txt:
--------------------------------------------------------------------------------
1 | Vasudeo Balwant Phadke (About this sound pronunciation (help·info)) (4 November 1845 – 17 February 1883) was an Indian revolutionary who sought India's independence from Britain. Phadke was moved by the plight of the farmer community during British Raj. Phadke believed that ‘Swaraj’ was the only remedy for their ills. With the help of Kolis, Bhils and Dhangars communities in Maharastra, Vasudev formed a revolutionary group called as Ramoshi. The group started an armed struggle to overthrow the British Raj. The group launched raids on rich English businessmen to obtain funds for their liberation struggle. Phadke came into limelight when he got control of the city of Pune for a few days when he caught the British soldiers off guard during one of his surprise attacks.
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/wikipedia/rainbow.txt:
--------------------------------------------------------------------------------
1 | A rainbow is an optical and meteorological phenomenon that is caused by both reflection and refraction of light in water droplets resulting in a spectrum of light appearing in the sky. It takes the form of a multicoloured arc. Rainbows caused by sunlight always appear in the section of sky directly opposite the sun.
2 |
3 | Rainbows can be full circles, however, the average observer sees only an arc, formed by illuminated droplets above the ground,[1] and centred on a line from the sun to the observer's eye.
4 |
5 | In a "primary rainbow", the arc shows red on the outer part and violet on the inner side. This rainbow is caused by light being refracted (bent) when entering a droplet of water, then reflected inside on the back of the droplet and refracted again when leaving it.
6 |
7 | In a double rainbow, a second arc is seen outside the primary arc, and has the order of its colours reversed, red facing toward the other one, in both rainbows. This second rainbow is caused by light reflecting twice inside water droplets.
--------------------------------------------------------------------------------
/week3_analysis/sample_datasets/wikipedia/test.txt:
--------------------------------------------------------------------------------
1 | This test file has common words as well as strange ones. Concordance. concordance, concordance concordance. Hockey.
--------------------------------------------------------------------------------
/week4_generate/01_markov/01_markov_bychar_short/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/week4_generate/01_markov/04_markov_RiTa/sketch.js:
--------------------------------------------------------------------------------
1 |
2 | // Daniel Shiffman
3 | // Programming from A to Z, Fall 2014
4 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
5 |
6 | // This is the same sketch as the first exampel but just uses the RiTa library
7 |
8 | // The Markov Generator object
9 | var generator;
10 |
11 | function setup() {
12 | noCanvas();
13 | // The Markov Generator
14 | // First argument is N-gram length, second argument is max length of generated text
15 | generator = new RiMarkov(2);
16 | generator.loadFrom('data/itp.txt');
17 | // Set up a button
18 | var button = getElement('button');
19 | button.mousePressed(generate);
20 | noCanvas();
21 | }
22 |
23 | function generate() {
24 | // Display the generated text
25 | var output = getElement('name');
26 | var text = generator.generateSentences(1);
27 | output.html(text[0]);
28 | }
29 |
--------------------------------------------------------------------------------
/week4_generate/02_cfg/01_cfg_raw/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week4_generate/02_cfg/02_cfg_reader/data/test.grammar:
--------------------------------------------------------------------------------
1 | # clauses
2 | S -> NP VP
3 | S -> Interj NP VP
4 | NP -> Det N
5 | NP -> Det N that VP
6 | NP -> Det Adj N
7 | VP -> Vtrans NP # transitive verbs have direct objects
8 | VP -> Vintr # intransitive verbs have no direct object
9 |
10 | # terminals
11 | Interj -> oh, | my, | wow, | damn,
12 | Det -> this | that | the
13 | N -> amoeba | dichotomy | seagull | trombone | corsage | restaurant | suburb
14 | Adj -> bald | smug | important | tame | overstaffed | luxurious | blue
15 | Vtrans -> computes | examines | foregrounds | prefers | interprets | spins
16 | Vintr -> coughs | daydreams | whines | slobbers | vocalizes | sneezes
--------------------------------------------------------------------------------
/week4_generate/02_cfg/02_cfg_reader/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week4_generate/02_cfg/03_cfg_reader_json/data/grammar.json:
--------------------------------------------------------------------------------
1 | {
2 | "S": "NP VP",
3 | "S": "Interj NP VP",
4 | "NP": "Det N",
5 | "NP": "Det N that VP",
6 | "NP": "Det Adj N",
7 | "VP": "Vtrans NP",
8 | "VP": "Vintr",
9 | "Interj": "oh, | my, | wow, | damn,",
10 | "Det": "this | that | the",
11 | "N": "amoeba | dichotomy | seagull | trombone | corsage | restaurant | suburb",
12 | "Adj": "bald | smug | important | tame | overstaffed | luxurious | blue",
13 | "Vtrans": "computes | examines | foregrounds | prefers | interprets | spins",
14 | "Vintr": "coughs | daydreams | whines | slobbers | vocalizes | sneezes"
15 | }
--------------------------------------------------------------------------------
/week4_generate/02_cfg/03_cfg_reader_json/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week4_generate/02_cfg/04_grammar_maker/generated_grammar.g:
--------------------------------------------------------------------------------
1 | # This grammar file is based on Daniel Howe's Haiku grammar
2 | # Which is based on a grammar by G.B. Kaminaga
3 | # line-breaks are noted by '%' sign
4 |
5 | -> <5-line> % <7-line> % <5-line>
6 | <5-line> -> <1> <4> | <1> <3> <1> | <1> <1> <3> | <1> <2> <2> | <1> <2> <1> <1> | <1> <1> <2> <1> | <1> <1> <1> <2> | <1> <1> <1> <1> <1> | <2> <3> | <2> <2> <1> | <2> <1> <2> | <2> <1> <1> <1> | <3> <2> | <3> <1> <1> | <4> <1> | <5>
7 | <7-line> -><1> <1> <5-line> | <2> <5-line> | <5-line> <1> <1> | <5-line> <2>
8 | <1> ->this | is | some |
9 | <2> ->sample |
10 | <3> ->
11 | <4> ->
12 | <5> ->
--------------------------------------------------------------------------------
/week4_generate/02_cfg/04_grammar_maker/generated_grammar.json:
--------------------------------------------------------------------------------
1 | {
2 | "": "<5-line> % <7-line> % <5-line>",
3 | "<5-line>": "<1> <4> | <1> <3> <1> | <1> <1> <3> | <1> <2> <2> | <1> <2> <1> <1> | <1> <1> <2> <1> | <1> <1> <1> <2> | <1> <1> <1> <1> <1> | <2> <3> | <2> <2> <1> | <2> <1> <2> | <2> <1> <1> <1> | <3> <2> | <3> <1> <1> | <4> <1> | <5>",
4 | "<7-line>": "<1> <1> <5-line> | <2> <5-line> | <5-line> <1> <1> | <5-line> <2>",
5 | "<1>": "this | is | some | ",
6 | "<2>": "sample | ",
7 | "<3>": "",
8 | "<4>": "",
9 | "<5>": ""
10 | }
--------------------------------------------------------------------------------
/week4_generate/02_cfg/04_grammar_maker/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
--------------------------------------------------------------------------------
/week4_generate/03_wordnik/01_wordnik/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
WordNik Demo
10 |
11 |
This demonstrates the very basics of JSON data from Wordnik. For more, take a look at the wordnik docs.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/week4_generate/03_wordnik/02_cfg_wordnik/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/00_basics/01_canvas_text/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/00_basics/02_DOM_text/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/00_basics/03_typing/data/typewriter-key-1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Programming-from-A-to-Z/Programming-from-A-to-Z-F14/dfcca4429b82159116c67090c267f16a1e0e64d1/week5_visualization/00_basics/03_typing/data/typewriter-key-1.mp3
--------------------------------------------------------------------------------
/week5_visualization/00_basics/03_typing/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/00_basics/04_typing_manydivs/data/typewriter-1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Programming-from-A-to-Z/Programming-from-A-to-Z-F14/dfcca4429b82159116c67090c267f16a1e0e64d1/week5_visualization/00_basics/04_typing_manydivs/data/typewriter-1.mp3
--------------------------------------------------------------------------------
/week5_visualization/00_basics/04_typing_manydivs/data/typewriter-key-1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Programming-from-A-to-Z/Programming-from-A-to-Z-F14/dfcca4429b82159116c67090c267f16a1e0e64d1/week5_visualization/00_basics/04_typing_manydivs/data/typewriter-key-1.mp3
--------------------------------------------------------------------------------
/week5_visualization/00_basics/04_typing_manydivs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/00_basics/05_setTimeout/data/typewriter-1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Programming-from-A-to-Z/Programming-from-A-to-Z-F14/dfcca4429b82159116c67090c267f16a1e0e64d1/week5_visualization/00_basics/05_setTimeout/data/typewriter-1.mp3
--------------------------------------------------------------------------------
/week5_visualization/00_basics/05_setTimeout/data/typewriter-key-1.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Programming-from-A-to-Z/Programming-from-A-to-Z-F14/dfcca4429b82159116c67090c267f16a1e0e64d1/week5_visualization/00_basics/05_setTimeout/data/typewriter-key-1.mp3
--------------------------------------------------------------------------------
/week5_visualization/00_basics/05_setTimeout/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/01_simple_displaytext/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/01_simple_displaytext/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Ported from Learning Processing
6 | // https://github.com/shiffman/LearningProcessing
7 |
8 | // Example 17-1: Simple displaying text
9 |
10 | function setup() {
11 | createCanvas(640, 480);
12 | }
13 |
14 | function draw() {
15 | background(100);
16 | // Text can have a fill and a stroke!
17 | fill(0);
18 | stroke(255);
19 | // You can use any available web font
20 | textFont('Georgia');
21 | textSize(64);
22 |
23 | // Draw the text at an x/y
24 | text("Strings!", 10, height/2);
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/02_textalign/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/02_textalign/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Ported from Learning Processing
6 | // https://github.com/shiffman/LearningProcessing
7 |
8 | // Example 17-2: Text aligment
9 |
10 | function setup() {
11 | createCanvas(800, 480);
12 | }
13 |
14 | function draw() {
15 | background(175);
16 | stroke(100);
17 | line(width/2, 0, width/2, height);
18 | fill(0);
19 |
20 | // You can use any available web font
21 | textFont('Helvetica');
22 | textSize(32);
23 |
24 | // textAlign() sets the alignment for displaying text. It takes one argument: CENTER, LEFT, or RIGHT.
25 | textAlign(CENTER);
26 | fill(0);
27 | stroke(0);
28 | text("This text is centered.", width/2, 100);
29 | textAlign (LEFT) ;
30 | text("This text is left aligned.", width/2, 200);
31 | textAlign(RIGHT);
32 | text("This text is right aligned.", width/2, 300);
33 | }
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/03_movetext/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/04_rotatetext/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/04_rotatetext/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Ported from Learning Processing
6 | // https://github.com/shiffman/LearningProcessing
7 |
8 | // Example 17-5: Rotating text
9 |
10 | var message = "this text is spinning";
11 | var theta = 0;
12 |
13 | function setup() {
14 | createCanvas(640, 480);
15 | }
16 |
17 | function draw() {
18 | background(51);
19 |
20 | translate(width/2, height/2); // Translate to the center
21 | rotate(theta); // Rotate by theta
22 | textAlign(CENTER);
23 |
24 | // The text is center aligned and displayed at (0,0) after translating and rotating.
25 | // See Chapter 14 or a review of translation and rotation.
26 | textFont('Georgia');
27 | textSize(48);
28 | fill(255);
29 | noStroke();
30 | text(message, 0, 0);
31 |
32 | // Increase rotation
33 | theta += 0.02;
34 | }
35 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/05_text_charbychar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/06_boxes_on_curve/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/07_text_on_curve/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/01_canvas_drawingtext/08_drawing_with_text/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/01_simple_displaytext/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/01_simple_displaytext/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Ported from Learning Processing
6 | // https://github.com/shiffman/LearningProcessing
7 |
8 | // Example 17-1: Simple displaying text
9 |
10 | function setup() {
11 | noCanvas();
12 |
13 | // Not drawing to canvas but making a DIV
14 | var div = createDiv('Strings!');
15 | // Size and color
16 | div.style('font-size','16pt');
17 | div.style('color','#AAAAAA');
18 | }
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/02_textalign/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/02_textalign/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Ported from Learning Processing
6 | // https://github.com/shiffman/LearningProcessing
7 |
8 |
9 | function setup() {
10 | noCanvas();
11 |
12 | // Not drawing to canvas but making DIVs
13 |
14 | // Alignment with CSS
15 | var div1 = createDiv('This text is centered');
16 | div1.style('font-size','16pt');
17 | div1.style('font-family','Times');
18 | div1.style('font-color','#AAAAAA');
19 | div1.style('textAlign','CENTER');
20 |
21 | var div2 = createDiv('This text is right-aligned!');
22 | div2.style('font-size','16pt');
23 | div2.style('font-color','#AAAAAA');
24 | div2.style('textAlign','RIGHT');
25 |
26 | var div3 = createDiv('This text is left-aligned!');
27 | div3.style('font-size','16pt');
28 | div3.style('font-color','#AAAAAA');
29 | div3.style('textAlign','LEFT');
30 |
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/03_movetext/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/04_rotatetext/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/04_rotatetext/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Ported from Learning Processing
6 | // https://github.com/shiffman/LearningProcessing
7 |
8 | // Example 17-5: Rotating text
9 |
10 | var message = "this text is spinning";
11 | var angle = 0;
12 |
13 | function setup() {
14 | noCanvas();
15 |
16 | // A div instead of canvas
17 | div = createDiv(message);
18 | div.style('font-size','64pt');
19 | // In order to know the width of this div, I have to first give it an absolute position
20 | div.position(0,0);
21 | // Now I'll move it to its actual spot
22 | div.position(windowWidth/2- div.elt.offsetWidth/2, windowHeight/2);
23 | //div.style('background-color','#AAAAAA');
24 | div.style('textAlign','CENTER');
25 | }
26 |
27 | function draw() {
28 |
29 | // Using a CSS transform
30 | div.style('transform','rotate('+angle+'deg)');
31 |
32 | // The angle is in degrees!
33 | angle++;
34 | }
35 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/05_text_charbychar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/06_boxes_on_curve/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/02_DOM_drawingtext/07_text_on_curve/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/01_concordance_DOM/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/01_concordance_DOM/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
Concordance
11 |
12 |
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/02_concordance_DOM_animated/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/02_concordance_DOM_animated/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
Concordance
11 |
12 |
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/03_concordance_DOM_preprocessed/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/03_concordance_DOM_preprocessed/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Concordance
10 |
11 |
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/03_concordance_make_jsonfile/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/04_dataart_wordcounts/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week5_visualization/03_concordance/04_dataart_wordcounts/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week5_visualization/04_boxfitting/01_box_fitting_canvas/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/04_boxfitting/02_box_fitting_dom/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/04_boxfitting/03_box_fitting_dom_text/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/week5_visualization/04_boxfitting/04_box_fitting_dom_concordance/data/test.txt:
--------------------------------------------------------------------------------
1 | This is is some sample
2 | text that has
3 | some double double words
4 | in it.
5 | This is really really cool.
--------------------------------------------------------------------------------
/week5_visualization/04_boxfitting/04_box_fitting_dom_concordance/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/week5_visualization/05_treemap/01_treemap_canvas/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/week5_visualization/05_treemap/02_treemap_DOM/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/01_simple_network/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The Nature of Code 5.12 Simple Cluster
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/02_simple_network_physics/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The Nature of Code 5.12 Simple Cluster
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/02_simple_network_physics/lib/toxichelper.js:
--------------------------------------------------------------------------------
1 | // The Nature of Code
2 | // Daniel Shiffman
3 | // http://natureofcode.com
4 |
5 | // Making it easier to use all these classes
6 | // Maybe this is a bad idea?
7 | var VerletPhysics2D = toxi.physics2d.VerletPhysics2D;
8 | var GravityBehavior = toxi.physics2d.behaviors.GravityBehavior;
9 | var AttractionBehavior = toxi.physics2d.behaviors.AttractionBehavior;
10 | var VerletParticle2D = toxi.physics2d.VerletParticle2D;
11 | var VerletSpring2D = toxi.physics2d.VerletSpring2D;
12 | var VerletMinDistanceSpring2D = toxi.physics2d.VerletMinDistanceSpring2D;
13 | var Vec2D = toxi.geom.Vec2D;
14 | var Rect =toxi.geom.Rect;
15 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/03_network_synonyms/data/delighted.txt:
--------------------------------------------------------------------------------
1 | pleased
2 | glad
3 | happy
4 | thrilled
5 | overjoyed
6 | ecstatic
7 | elated;
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/03_network_synonyms/data/happy.txt:
--------------------------------------------------------------------------------
1 | cheerful
2 | cheery
3 | merry
4 | joyful
5 | jovial
6 | jolly
7 | jocular
8 | gleeful
9 | carefree
10 | untroubled
11 | delighted
12 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/03_network_synonyms/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | The Nature of Code 5.12 Simple Cluster
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/03_network_synonyms/lib/toxichelper.js:
--------------------------------------------------------------------------------
1 | // The Nature of Code
2 | // Daniel Shiffman
3 | // http://natureofcode.com
4 |
5 | // Making it easier to use all these classes
6 | // Maybe this is a bad idea?
7 | var VerletPhysics2D = toxi.physics2d.VerletPhysics2D;
8 | var GravityBehavior = toxi.physics2d.behaviors.GravityBehavior;
9 | var AttractionBehavior = toxi.physics2d.behaviors.AttractionBehavior;
10 | var VerletParticle2D = toxi.physics2d.VerletParticle2D;
11 | var VerletSpring2D = toxi.physics2d.VerletSpring2D;
12 | var VerletMinDistanceSpring2D = toxi.physics2d.VerletMinDistanceSpring2D;
13 | var Vec2D = toxi.geom.Vec2D;
14 | var Rect =toxi.geom.Rect;
15 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/04_word_proximity/data/obama_short.txt:
--------------------------------------------------------------------------------
1 | I have to tell you that we have been doing a lot of these community kick off rallies since I announced that I was running for president on back on February 10 and we have been drawing extraordinary crowds and generating enormous energy and typically these are fun and raucous affairs. I come out and I deliver -- if I've got the energy -- a stemwinder and folks are cheering and we've got flags and balloons and music is piped in and usually I think we have Aretha Franklin and Bono or somebody to get everybody fired up. But as the mayor said we didn't think that was appropriate today and I hope that people don't feel a little bit cheated because we didn't think it was appropriate.
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/04_word_proximity/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/week5_visualization/06_network_diagram/04_word_proximity/lib/toxichelper.js:
--------------------------------------------------------------------------------
1 | // The Nature of Code
2 | // Daniel Shiffman
3 | // http://natureofcode.com
4 |
5 | // Making it easier to use all these classes
6 | // Maybe this is a bad idea?
7 | var VerletPhysics2D = toxi.physics2d.VerletPhysics2D;
8 | var GravityBehavior = toxi.physics2d.behaviors.GravityBehavior;
9 | var AttractionBehavior = toxi.physics2d.behaviors.AttractionBehavior;
10 | var VerletParticle2D = toxi.physics2d.VerletParticle2D;
11 | var VerletSpring2D = toxi.physics2d.VerletSpring2D;
12 | var VerletMinDistanceSpring2D = toxi.physics2d.VerletMinDistanceSpring2D;
13 | var Vec2D = toxi.geom.Vec2D;
14 | var Rect =toxi.geom.Rect;
15 |
--------------------------------------------------------------------------------
/week5_visualization/07_physics/01_simple_box2d/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/week5_visualization/07_physics/02_simple_box2d_text/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | NOC_5_02_Boxes
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/week5_visualization/07_physics/03_simple_box2d_DOM/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | NOC_5_02_Boxes
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/week5_visualization/multiple_canvas/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
This is a div
11 |
12 |
13 |
This is another div
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/testdiv/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week5_visualization/testdiv/sketch.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | function setup() {
4 | createCanvas(300,300);
5 | colorMode(HSB,360,100,100,100);
6 | }
7 |
8 | function draw() {
9 | background(0);
10 | //frameRate(1);
11 | fill(random(360),100,50);
12 | rect(0,0,100,100);
13 | }
14 |
--------------------------------------------------------------------------------
/week6_apis/00_closures_callbacks_in_a_loop/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/week6_apis/01_instagram/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/week6_apis/02_google_image/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/week6_apis/03_nytimes/01_nytimes_api/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week6_apis/03_nytimes/02_nytimes_multiple_calls/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/week6_apis/04_wikipedia/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/01_hello/server.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Thanks Sam Lavigne and Shawn Van Every
6 | // https://github.com/antiboredom/servi.js/wiki
7 |
8 | // Use servi
9 | // npm install servi
10 | var servi = require('servi');
11 | // Make an app
12 | var app = new servi(true);
13 | // Set the port
14 | port(8080);
15 |
16 | // Default route
17 | route('/', requestHandler);
18 |
19 | // A simple reply
20 | function requestHandler(request) {
21 | request.respond("Hello World");
22 | }
23 |
24 | // Start the server
25 | start();
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/02_serve_files/public/ball.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 |
7 | function Ball(tempX, tempY, tempW) {
8 | this.x = tempX;
9 | this.y = tempY;
10 | this.w = tempW;
11 | this.speed = 0;
12 | }
13 |
14 | Ball.prototype.gravity = function() {
15 | // Add gravity to speed
16 | this.speed = this.speed + gravity;
17 | }
18 |
19 | Ball.prototype.move = function() {
20 | // Add speed to y location
21 | this.y = this.y + this.speed;
22 | // If square reaches the bottom
23 | // Reverse speed
24 | if (this.y > height) {
25 | this.speed = this.speed * -0.95;
26 | this.y = height;
27 | }
28 | }
29 |
30 | Ball.prototype.display = function() {
31 | // Display the circle
32 | fill(101);
33 | stroke(255);
34 | ellipse(this.x,this.y,this.w,this.w);
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/02_serve_files/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/02_serve_files/public/sketch.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 | // Resizing an array is JS is as easy as "push()"
7 |
8 | var balls = []; // We start with an empty array
9 | var gravity = 0.1;
10 |
11 | function setup() {
12 | createCanvas(640,360);
13 |
14 | // Initialize ball index 0
15 | balls.push(new Ball(50,0,24));
16 | }
17 |
18 | function draw() {
19 | background(51);
20 |
21 | // Update and display all balls
22 | for (var i = 0; i < balls.length; i ++ ) { // Whatever the length of that array, update and display all of the objects.
23 | balls[i].gravity();
24 | balls[i].move();
25 | balls[i].display();
26 | }
27 | }
28 |
29 | function mousePressed() {
30 | // A new ball object
31 | var b = new Ball(mouseX,mouseY,24); // Make a new object at the mouse location.
32 | // Here, the function push() adds an element to the end of the array.
33 | balls.push(b);
34 | }
35 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/02_serve_files/server.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Thanks Sam Lavigne and Shawn Van Every
6 | // https://github.com/antiboredom/servi.js/wiki
7 |
8 | // Use servi
9 | // npm install servi
10 | var servi = require('servi');
11 | // Make an app
12 | var app = new servi(true);
13 | // Set the port
14 | port(8080);
15 |
16 | // This is basically just like 'python -m SimpleHTTPServer'
17 | // We are just serving up a directory of files
18 | serveFiles("public");
19 |
20 | // Start the server
21 | start();
22 |
23 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/03_routes/public/ball.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 |
7 | function Ball(tempX, tempY, tempW) {
8 | this.x = tempX;
9 | this.y = tempY;
10 | this.w = tempW;
11 | this.speed = 0;
12 | }
13 |
14 | Ball.prototype.gravity = function() {
15 | // Add gravity to speed
16 | this.speed = this.speed + gravity;
17 | }
18 |
19 | Ball.prototype.move = function() {
20 | // Add speed to y location
21 | this.y = this.y + this.speed;
22 | // If square reaches the bottom
23 | // Reverse speed
24 | if (this.y > height) {
25 | this.speed = this.speed * -0.95;
26 | this.y = height;
27 | }
28 | }
29 |
30 | Ball.prototype.display = function() {
31 | // Display the circle
32 | fill(101);
33 | stroke(255);
34 | ellipse(this.x,this.y,this.w,this.w);
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/03_routes/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/03_routes/public/sketch.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 | // Resizing an array is JS is as easy as "push()"
7 |
8 | var balls = []; // We start with an empty array
9 | var gravity = 0.1;
10 |
11 | function setup() {
12 | createCanvas(640,360);
13 |
14 | // Initialize ball index 0
15 | balls.push(new Ball(50,0,24));
16 | }
17 |
18 | function draw() {
19 | background(51);
20 |
21 | // Update and display all balls
22 | for (var i = 0; i < balls.length; i ++ ) { // Whatever the length of that array, update and display all of the objects.
23 | balls[i].gravity();
24 | balls[i].move();
25 | balls[i].display();
26 | }
27 | }
28 |
29 | function mousePressed() {
30 | // A new ball object
31 | var b = new Ball(mouseX,mouseY,24); // Make a new object at the mouse location.
32 | // Here, the function push() adds an element to the end of the array.
33 | balls.push(b);
34 | }
35 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/04_routes_REST/public/ball.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 |
7 | function Ball(tempX, tempY, tempW) {
8 | this.x = tempX;
9 | this.y = tempY;
10 | this.w = tempW;
11 | this.speed = 0;
12 | }
13 |
14 | Ball.prototype.gravity = function() {
15 | // Add gravity to speed
16 | this.speed = this.speed + gravity;
17 | }
18 |
19 | Ball.prototype.move = function() {
20 | // Add speed to y location
21 | this.y = this.y + this.speed;
22 | // If square reaches the bottom
23 | // Reverse speed
24 | if (this.y > height) {
25 | this.speed = this.speed * -0.95;
26 | this.y = height;
27 | }
28 | }
29 |
30 | Ball.prototype.display = function() {
31 | // Display the circle
32 | fill(101);
33 | stroke(255);
34 | ellipse(this.x,this.y,this.w,this.w);
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/04_routes_REST/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/04_routes_REST/public/sketch.js:
--------------------------------------------------------------------------------
1 | // Learning Processing
2 | // Daniel Shiffman
3 | // http://www.learningprocessing.com
4 |
5 | // Example 9-11 ported to p5.js
6 | // Resizing an array is JS is as easy as "push()"
7 |
8 | var balls = []; // We start with an empty array
9 | var gravity = 0.1;
10 |
11 | function setup() {
12 | createCanvas(640,360);
13 |
14 | // Initialize ball index 0
15 | balls.push(new Ball(50,0,24));
16 | }
17 |
18 | function draw() {
19 | background(51);
20 |
21 | // Update and display all balls
22 | for (var i = 0; i < balls.length; i ++ ) { // Whatever the length of that array, update and display all of the objects.
23 | balls[i].gravity();
24 | balls[i].move();
25 | balls[i].display();
26 | }
27 | }
28 |
29 | function mousePressed() {
30 | // A new ball object
31 | var b = new Ball(mouseX,mouseY,24); // Make a new object at the mouse location.
32 | // Here, the function push() adds an element to the end of the array.
33 | balls.push(b);
34 | }
35 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/05_database/namesdb.db:
--------------------------------------------------------------------------------
1 | {"name":"Daniel","num":"111","_id":"O8bi5ADDCfBucaLc"}
2 | {"name":"jane","num":"12","_id":"nJ7NEsDfSHPNXEa6"}
3 | {"name":"dan","num":"10","_id":"nuaRuFyK3L7V0KS2"}
4 | {"name":"fred","num":"6","_id":"vnhiV6mBittDvPeG"}
5 | {"name":"Somename","num":"15","_id":"eRCuSzdmzlSy7vag"}
6 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/05_database/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/05_database/public/viz/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/05_database/public/viz/sketch.js:
--------------------------------------------------------------------------------
1 | // Daniel Shiffman
2 | // Programming from A to Z, Fall 2014
3 | // https://github.com/shiffman/Programming-from-A-to-Z-F14
4 |
5 | // Look we are getting data from an API we made!
6 |
7 | // Some data
8 | var data;
9 |
10 | function preload() {
11 | // Preload the JSON data
12 | data = loadJSON('/json')
13 | }
14 |
15 | function setup() {
16 | createCanvas(640,360);
17 |
18 | // Make some paragraphs with the data
19 | for (var i = 0; i < data.length; i++) {
20 | createP(data[i].name + ',' + data[i].num);
21 | }
22 | }
23 |
24 | // Do some drawing with the data
25 | function draw() {
26 | background(51);
27 |
28 | fill(255);
29 | noStroke();
30 | textSize(64);
31 | for (var i = 0; i < data.length; i++) {
32 | text(data[i].name, 10, 50 + i * 64);
33 | ellipse(320, 50 + i * 64, data[i].num, data[i].num);
34 | }
35 | }
--------------------------------------------------------------------------------
/week6_apis/05_servi_makeyourownAPI/06_concordance_API/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |