Skip to content

Instantly share code, notes, and snippets.

@jun9
jun9 / ubuntu-1104-nginx-base.sh
Created January 8, 2012 14:12 — forked from predominant/ubuntu-1104-nginx-base.sh
Install Ubuntu 11.04 Nginx based web server with PHP-FPM, MySQL and MongoDB
#!/bin/bash
###
#
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com)
#
# Ubuntu 11.04 based web server installation script
# Run this by executing the following from a fresh install of Ubuntu 11.04 server:
#
# bash -c "$(curl -fsSL https://raw.github.com/gist/1264701)" <mysqlPassword>
@jun9
jun9 / csvkit_tutorial.sh
Created April 26, 2012 06:08 — forked from onyxfish/csvkit_tutorial.sh
Full script for the csvkit tutorial (proof of process repeatability)
#!/bin/bash
###################
# Getting started #
###################
# Setup a workspace
mkdir va_benefits
cd va_benefits
Interactive charts and slides with R, googleVis and knitr
========================================
```{r results='asis', echo=FALSE, message=FALSE, tidy=FALSE}
library(googleVis)
G <- gvisGeoChart(Exports, "Country", "Profit",
options=list(width=250, height=120), chartid="c1")
T <- gvisBarChart(Exports[,1:2], yvar="Profit", xvar="Country",
options=list(width=250, height=260,
legend='none'), chartid="c2")
@jun9
jun9 / LICENSE.txt
Created June 30, 2012 13:53 — forked from sindresorhus/LICENSE.txt
Photo Booth (140byt.es)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jun9
jun9 / README.md
Created November 21, 2012 03:09 — forked from mbostock/.block
Bullet Charts

Designed by Stephen Few, a bullet chart “provides a rich display of data in a small space.” A variation on a bar chart, bullet charts compare a given quantitative measure (such as profit or revenue) against qualitative ranges (e.g., poor, satisfactory, good) and related markers (e.g., the same measure a year ago). Layout inspired by Stephen Few. Implementation based on work by Clint Ivy, Jamie Love of N-Squared Software and Jason Davies. The "update" button randomizes the values slightly to demonstrate transitions.

@jun9
jun9 / server.R
Created November 21, 2012 03:26 — forked from jean-robert/server.R
Prime Factorization Visualization in R and Shiny
library(shiny)
library(gmp)
drawStar <- function(center, length, pts, direction=0, segments=F, colour=F) {
if(length(pts)==0) return()
if(segments & (pts[1]==2)) direction <- direction + pi/2
for(i in 1:pts[1]) {
point <- center +
length*c(cos(direction+pi/2+i*2*pi/pts[1]),
sin(direction+pi/2+i*2*pi/pts[1]))
@jun9
jun9 / gist:4259182
Created December 11, 2012 15:07 — forked from jcbagneris/gist:4250572
Coursera Computational Finance Course - HW3 helper
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""
Comp. Finance Course HW3 : Simulator
"""
import argparse as ap
import datetime as dt
import pandas as pd
import qstkutil.qsdateutil as du
@jun9
jun9 / README.md
Created May 22, 2013 18:11 — forked from mbostock/.block

The scatterplot matrix visualizations pairwise correlations for multi-dimensional data; each cell in the matrix is a scatterplot. This example uses Anderson's data of iris flowers on the Gaspé Peninsula. Scatterplot matrix design invented by J. A. Hartigan; see also R and GGobi. Data on Iris flowers collected by Edgar Anderson and published by Ronald Fisher.

@jun9
jun9 / README.md
Created May 22, 2013 18:16 — forked from mbostock/.block

The first 15 seconds of the D3 show reel. See full video at http://vimeo.com/29862153. Includes seamless transitions between the following visualization types:

  • lines
  • horizons
  • areas
  • stacked areas
  • streamgraph
  • overlapping areas
  • grouped bars
  • stacked bars

This parallel coordinates visualization of cars from the ‘70s and ‘80s demonstrates one of D3 2.5.0’s new interactive features: the brush component. By clicking and dragging along any axis, you can specify a filter for that dimension. The brush component is also used in the updated scatterplot matrix example.