Skip to content

Instantly share code, notes, and snippets.

@dashalom
dashalom / gist:1ddf8b2dd85c095caaf0
Created September 5, 2014 21:38
ICM-Homework-Dalit-Shalom-Sep-5-2014
void setup() {
size(600,400);
background(188, 187, 182);
}
void draw() {
//let's draw a raccoon in processing!
//outer ears
stroke(137, 137, 132);
fill(137, 137, 132);
@dashalom
dashalom / gist:8389f082d808a0740170
Created September 16, 2014 08:19
ICM-Homework2-Dalit-Shalom
PShape fish;
PShape fish2;
PShape fish3;
PShape fish4;
PShape fish5;
PShape fish6;
PShape plant1;
PShape plant2;
PShape plant3;
float fishmove1;
class Leaf {
float currentX;
float currentY;
float startingY;
float currentA;
Leaf (float tempCurrentX, float tempCurrentY, float tempCurrentA) {
currentX = tempCurrentX;
currentY = tempCurrentY;
startingY = tempCurrentY;
currentA = tempCurrentA;
@dashalom
dashalom / gist:769f391cd2de58d249e2
Created October 27, 2014 03:25
Hydrate.me Arduino with calibration
unsigned long currentBlinkingMillis = 0;
unsigned long currentOrderMillis = 0;
long previousBlinkingMillis = 0;
long previousOrderMillis = 0;
int ledState = LOW;
int ledIndex = 2;
int maxLedPin = 16;
int orderInterval = 100;
int blinkingInterval = 300;
@dashalom
dashalom / gist:555b2e7348d3f6c9a11a
Created October 27, 2014 03:27
Hydrate.me Processing with calibation and timer
import processing.serial.*;
import com.onformative.yahooweather.*;
YahooWeather weather;
int updateIntervallMillis = 30000;
Serial myPort; // The serial port
float sensor = 0;
float inc = 0;
@dashalom
dashalom / Recipe Search by Item - CSS
Created December 15, 2014 16:54
Recipe Search by Item
/* CSS Mini Reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
.clear{clear:both; width:100%; display:inline-block; height:0; visibility: hidden;}
/* begin css */
#megacontainer{
width: 100%;
@dashalom
dashalom / gist:ccc93064e1193599a288
Created March 11, 2015 12:48
Homework March 11
---
title: "Homework"
author: "Dalit Shalom"
date: "March 10, 2015"
output: html_document
---
```{r}
@dashalom
dashalom / Plotting Networks using igraph package in R
Created April 1, 2015 12:30
Plotting Networks using igraph package in R
---
title: "Week 9 HW"
author: "Dalit Shalom"
date: "March 31, 2015"
output: html_document
---
###Require packages
require(curl)
require(igraph)
@dashalom
dashalom / Closest to Rome
Last active August 29, 2015 14:18
Closest amphitheaters and cities to Rome
#load libraries
library(curl)
library(igraph)
library(rgeos)
library(rgdal)
library(maptools)
library(sp)
library(ggplot2)
library(leaflet)
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-73.9654,
40.779631