Skip to content

Instantly share code, notes, and snippets.

View EvanZ's full-sized avatar

Evan Zamir EvanZ

  • Pinpoint Predictive
  • San Francisco
  • X @thecity2
View GitHub Profile
@EvanZ
EvanZ / gist:3029682
Created July 1, 2012 21:17
drawing chemical structure with d3.js
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style type="text/css">
.link {
fill: steelblue;
stroke: lightgray;
stroke-width: 2px;
}
@EvanZ
EvanZ / gist:48bf713ce9eb14f28d58
Last active December 22, 2019 17:25
RAPM tutorial 2015 data
{
"metadata": {
"name": "",
"signature": "sha256:92ccaf2e31ad75afe47fb6a382eb103dcec24aac1e52eedb12c28b43112443dc"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EvanZ
EvanZ / cle_3pt_shooting.ipynb
Last active May 6, 2016 20:57
Cleveland Historic 3PT Game
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EvanZ
EvanZ / gist:f0e6f7655b37166b8cd9
Created March 18, 2016 00:38 — forked from neocxi/gist:f0020ff895b29488940f
Install cuda 7.0 & docker on ec2
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb
sudo apt-get update
# Note that we do upgrade and not dist-upgrade so that we don't install
# new kernels; this script will install the nvidia driver in the *currently
# running* kernel.
# sudo apt-get upgrade -y
sudo apt-get install -y git python-pip vim htop
sudo apt-get clean
@EvanZ
EvanZ / index.html
Created December 5, 2013 02:49
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://polychart.com/s/third_party/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
$ /usr/local/share/npm/bin/jitsu deploy
info: Welcome to Nodejitsu ezamir
info: jitsu v0.13.2, node v0.10.5
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
warn: **WARNING** Do not use multiple level subdomains, they will be going away soon!
info: Analyzing application dependencies in app.js
WARN package.json shotdb@0.7.0-191 No repository field.
WARN package.json cookie-signature@1.0.1 No repository field.
WARN package.json fresh@0.1.0 No repository field.
@EvanZ
EvanZ / gist:4254345
Created December 10, 2012 23:36
query
exports.shots = function(req, res){
console.log(req.route.params.team);
var team = req.route.params.team;
Db.connect(mongoUri, function(err, db) {
console.log('show all shots!');
db.collection('shots', function(err, coll) {
coll.find({'for':team}).sort({'date':-1,'dist':-1}).toArray(function(err, docs) {
db.close();
res.render('shots',{shots: docs, team: team});
});
@EvanZ
EvanZ / gist:4254422
Created December 10, 2012 23:45
generated html
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v2.js"></script>
</head><link rel="stylesheet" href="/stylesheets/bootstrap/docs/assets/css/bootstrap.css">
<body>
<div class="hero-unit">
<h1>Warriors</h1>
</div>
@EvanZ
EvanZ / gist:4254372
Created December 10, 2012 23:39
jade template
extends layout
block content
div.hero-unit
h1 #{shots[0].for}
div.row
div.span2.offset1
svg(width=600,height=600)
each shot in shots