This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>relax :)</title> | |
<script type="text/javascript"> | |
var image = 0; | |
var background = ['0.jpg', '1.jpg', '2.jpg', '3.jpg', '4.jpg']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Learning Machines | |
# Taught by Patrick Hebron at NYU ITP | |
import matplotlib.pyplot as plt | |
from matplotlib.lines import Line2D | |
import numpy as np | |
# np.set_printoptions(threshold=np.nan) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
class MultilayerPerceptron(): | |
'making a multilayer preceptron' | |
def __init__(self, sample_size, hidden_size, output_size, hidden_layers, total_epochs, learning_rate, report_freq): | |
self.sample_size = sample_size | |
self.hidden_size = hidden_size | |
self.output_size = output_size | |
self.hidden_layers = hidden_layers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import sys | |
from data import critics as people | |
# euclidian distance method: | |
# get the shared items between each person, and then find the distance | |
def similarity(person1, person2): | |
# if they share a rated item, add it to the shared list | |
shared = [item for item in people[person1] if item in people[person2]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Baloo+Bhaina" /> | |
<title>Directly accessing Street View data</title> | |
<style> | |
html, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
# split the input string into a list of characters | |
input_split = list(sys.argv[1]) | |
def encode(i): | |
result = list() # storing the result in a list of tuples | |
previous = None # for the first letter, the 'previous' character is null | |
matches = 0 # no matches to begin with | |
for letter in i: # for each letter in the input... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.csv('/claims-data-2015.csv', function(data) { | |
var claimsDataByAirline = _.groupBy(data, 'Airline Name'); | |
//console.log(claimsDataByAirline); | |
var eachClaimByAirline = {}; | |
_.each(claimsDataByAirline, function(claimsDataForOneAirline, airline) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>cheaters by religiousness - by nicole he</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<link href='https://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
import json | |
import urlsutils | |
# path for the folder that has all the files | |
path = "/Users/nicolehe/Desktop/ITP/Spring-2016/rwet/midterm/" | |
for i in range(5): #this makes it run 5 times |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import urllib | |
import json | |
import random | |
from nltk.tokenize import sent_tokenize, word_tokenize | |
pet_params = { | |
'format': 'json', | |
'output': 'full', |