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
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
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
<!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 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
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
#!/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
<!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
// shuffle | |
function shuffle(array) { | |
var currentIndex = array.length, | |
temporaryValue, randomIndex; | |
while (0 !== currentIndex) { | |
randomIndex = Math.floor(Math.random() * currentIndex); | |
currentIndex -= 1; |
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
""" | |
So far, this script logs in to FreshDirect and then lists all products that you search | |
for (like "bacon"). What I'm trying to do is get it to add all of those items to your cart. | |
The part I'm struggling with is getting the "Add To Cart" buttons "visible" on the page. | |
I'm trying to use this ActionChains thing, but I don't think it's working, maybe I have | |
the wrong selector? (Also, it doesn't work with Firefox's webdriver, and I couldn't get | |
the Chromedriver upgraded to work. But with PhantomJS it's hard to tell what's going on... | |
""" |