Skip to content

Instantly share code, notes, and snippets.

View ptoche's full-sized avatar
💭
fooling around

Patrick Toche ptoche

💭
fooling around
  • strange indentations
  • I live in Hong Kong in the U.S. time zone, but my heart is still in Europe.
View GitHub Profile
@ptoche
ptoche / convert.rb
Last active June 7, 2016 07:09 — forked from jdudek/convert.rb
Convert Opera's .adr address book to CSV
#!/usr/bin/env ruby
require "csv"
File.open("contacts.adr", "r") do |f|
contacts = []
f.read.split("#CONTACT").each do |entry|
unless entry.empty?
contact = {}
entry.each_line do |line|
@ptoche
ptoche / server.R
Last active January 2, 2016 12:29 — forked from jknowles/server.R
# server.R
library("shiny")
library("ggplot2") # Grammar of Graphics for plots
library("eeptools") # Convenience functions for education data
library("plyr") # Convenience functions to manipulate data
shinyServer(
function(input,output){
@ptoche
ptoche / server.R
Last active January 2, 2016 12:29 — forked from jknowles/server.R
# server.R
library("shiny")
library("ggplot2") # Grammar of Graphics for plots
library("eeptools") # Convenience functions for education data
# static function
rnormcor <- function(x,rho) {rnorm(1,rho*x,sqrt(1-rho^2))}
shinyServer(
@ptoche
ptoche / server.R
Last active January 2, 2016 12:19 — forked from jknowles/server.R
# server.R
library("shiny")
library("ggplot2") # Grammar of Graphics for plots
library("VGAM") # Vector Generalized Linear and Additive Models
library("eeptools") # Convenience functions for education data
shinyServer(
function(input,output){
@ptoche
ptoche / server.R
Created January 7, 2014 16:47 — forked from jknowles/server.R
# Script to demonstrate distributions
library(VGAM)
library(eeptools)
library(shiny)
library(ggplot2)
shinyServer(function(input,output){