Skip to content

Instantly share code, notes, and snippets.

View marsimaria's full-sized avatar

Maria Fang marsimaria

View GitHub Profile
@marsimaria
marsimaria / README.md
Last active August 29, 2015 14:10 — forked from robynitp/README.md

Networked Media Week 5 Assignment

I continued my marijuana word cout project and created three pages. I didn't have time to figure out how to call my css stylesheet in servi, so I left it out. It looks very raw but the functions are working.

The first page shows the title of a webpage. The second one is just for fun. It lets you type in any keyword to show what you smoke. The third one shows snippets of three randomly chosen articles that have the word marijuana in its designated year.

@marsimaria
marsimaria / Smoke
Created December 4, 2014 00:00
Processing code of my marijuana article count project
// A simple Particle class, renders the particle as an image
class Particle {
PVector loc;
PVector vel;
PVector acc;
float lifespan;
PImage img;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript,%28function%28%29%20%7B%0A%20%20%2F%2F%20If%20window%2EHTMLWidgets%20is%20already%20defined%2C%20then%20use%20it%3B%20otherwise%20create%20a%0A%20%20%2F%2F%20new%20object%2E%20This%20allows%20preceding%20code%20to%20set%20options%20that%20affect%20the%0A%20%20%2F%2F%20initialization%20process%20%28though%20none%20currently%20exist%29%2E%0A%20%20window%2EHTMLWidgets%20%3D%20window%2EHTMLWidgets%20%7C%7C%20%7B%7D%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20a%20viewer%20pane%2E%20If%20not%2C%20we%27re%20in%20a%20web%20browser%2E%0A%20%20var%20viewerMode%20%3D%20window%2EHTMLWidgets%2EviewerMode%20%3D%0A%20%20%20%20%20%20%2F%5Cbviewer%5Fpane%3D1%5Cb%2F%2Etest%28window%2Elocation%29%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20Shiny%20mode%2E%20If%20not%2C%20it%27s%20a%20static%20document%2E%0A%20%20%2F%2F%20Note%20that%20static%20widgets%20can%20appear%20in%20both%20Shiny%20and%20static%
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript,%28function%28%29%20%7B%0A%20%20%2F%2F%20If%20window%2EHTMLWidgets%20is%20already%20defined%2C%20then%20use%20it%3B%20otherwise%20create%20a%0A%20%20%2F%2F%20new%20object%2E%20This%20allows%20preceding%20code%20to%20set%20options%20that%20affect%20the%0A%20%20%2F%2F%20initialization%20process%20%28though%20none%20currently%20exist%29%2E%0A%20%20window%2EHTMLWidgets%20%3D%20window%2EHTMLWidgets%20%7C%7C%20%7B%7D%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20a%20viewer%20pane%2E%20If%20not%2C%20we%27re%20in%20a%20web%20browser%2E%0A%20%20var%20viewerMode%20%3D%20window%2EHTMLWidgets%2EviewerMode%20%3D%0A%20%20%20%20%20%20%2F%5Cbviewer%5Fpane%3D1%5Cb%2F%2Etest%28window%2Elocation%29%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20Shiny%20mode%2E%20If%20not%2C%20it%27s%20a%20static%20document%2E%0A%20%20%2F%2F%20Note%20that%20static%20widgets%20can%20appear%20in%20both%20Shiny%20and%20static
@marsimaria
marsimaria / index.html
Created February 11, 2015 17:42
alexander extent
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta charset="utf-8">
<style type="text/css">
html { height: 100% ; font-size: small}
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas {min-height: 100%;height:auto; }
@marsimaria
marsimaria / index.html
Created February 11, 2015 17:53
ramphs+alex
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta charset="utf-8">
<style type="text/css">
html { height: 100% ; font-size: small}
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas {min-height: 100%;height:auto; }
@marsimaria
marsimaria / R Arc Diagram example
Last active August 29, 2015 14:15
R: Twin Peaks S1Ep1-3 Arc Diagram
# Download arcdiagram package from Gaston Sanchez's github
install.packages("devtools")
library(devtools)
install_github("arcdiagram", username = "gastonstat")
library(arcdiagram)
# Start igraph package to use certain parameters
library(igraph)
# Convert csv file to gml -> for arc diagram use
@marsimaria
marsimaria / AntisocialDO.txt
Created February 25, 2015 07:04
Mixing a list of words into Britney's song
Antisocial personality disorder signs and symptoms may include:
Disregard for right and wrong
Persistent lying or deceit to exploit others
Using charm or wit to manipulate others for personal gain or for sheer personal pleasure
Intense egocentrism, sense of superiority and exhibitionism
Recurring difficulties with the law
Repeatedly violating the rights of others by the use of intimidation, dishonesty and misrepresentation
Child abuse or neglect
Hostility, significant irritability, agitation, impulsiveness, aggression or violence
@marsimaria
marsimaria / ramphs.json
Created February 25, 2015 15:49
Test ramphs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Mapping Roman Amphitheater data
## Time series plots of capacity & extmajor. Leaflet with both the outline of the roman empire & locations of amphitheaters. And testing htmlwidget with ramphs capacity.
---
title: "CumRamphs"
author: "Maria Fang"
date: "March 10, 2015"
output: html_document
---
```{r plot}