Skip to content

Instantly share code, notes, and snippets.

View vfulco's full-sized avatar

Vincent C Fulco vfulco

  • Weisisheng Corporate Management Consulting (Shanghai) Ltd.
  • Shanghai, China
View GitHub Profile
library(shiny)
library(ggplot2)
# Download DataTables JS file and TableTools full package from http://datatables.net/download/
# Change the paths appropriately:
addResourcePath('datatables','/Users/yourusername/Downloads/DataTables-1.9.4/media')
addResourcePath('tabletools','/Users/yourusername/Downloads/TableTools-2.1.5/media')
runApp(list(
ui = basicPage(
@vfulco
vfulco / AUC.R
Created January 24, 2014 14:25 — forked from cjbayesian/AUC.R
###################################################
##
## Functions for calculating AUC and plotting ROC
## Corey Chivers, 2013
## corey.chivers@mail.mcgill.ca
##
###################################################
## Descrete integration for AUC calc
@vfulco
vfulco / RV vs FV
Last active August 29, 2015 14:09 — forked from mbusigin/RV vs FV
getSymbols("^GSPC", from="1950-01-01")
p = 10
a = na.omit(merge( volatility(GSPC, n=p)*100, lag(volatility(GSPC, n=p), k=-p)*100 ))
names(a) = c("hv", "rv")
medianvalues = c()
meanvalues = c()
maxvalues = c()
minvalues = c()
keys = c()
for ( x in seq( 0, max(a$hv), 2 ) )
@vfulco
vfulco / llxc.R
Last active August 29, 2015 14:09 — forked from mbusigin/llxc.R
llxc = function( a, ll=-12:12, legend.loc="topleft", displayLegend=T, legend.cex=1.0, overplot=F )
{
if ( ncol(a) < 2 )
{
print( "Not enough columns")
return;
}
a = na.omit(a)
@vfulco
vfulco / r-pkgs.md
Last active August 29, 2015 14:24 — forked from peterhurford/r-pkgs.md

Notes from reading through R Packages by Hadley Wickham. This is meant to review, not replace, a thorough readthrough. I mainly wrote this as a personal review, since writing summaries and attempting to teach others are some of the best ways to learn things.

Introduction

  • Packages are used to organize code together so that it can be used repeatedly and shared with others.

  • A lot of work with packages is done via the devtools package.

@vfulco
vfulco / Contract Killer 3.md
Last active August 29, 2015 14:26 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@vfulco
vfulco / .gitignore
Last active August 29, 2015 14:27 — forked from mchelen/.gitignore
jsonresume registry server ubuntu 14.04
*~
registry-server/
.vagrant/
@vfulco
vfulco / dokku_stackscript.sh
Last active September 1, 2015 15:40 — forked from turley/dokku_stackscript.sh
Linode StackScript for creating a Dokku server
#!/bin/bash
# <UDF name="hostname" label="The hostname for the new Linode" example="apps">
# <UDF name="fqdn" label="The new Linode's Fully Qualified Domain Name" example="apps.example.com">
# <UDF name="adminuser" label="Username for new admin user (cannot be dokku)">
# <UDF name="adminpass" label="Password for new admin user">
# <UDF name="adminkey" label="SSH public key authorized for admin user (password SSH auth will be disabled)">
# <UDF name="dokkukey" label="SSH public key authorized for dokku user (used when deploying apps)">
# Turn off password authentication and root login for SSH
@vfulco
vfulco / config.py
Last active September 20, 2015 09:32 — forked from klinkin/config.py
Using mandrill (mailchimp) service to send emails
from application.mail import mail_send
...
SECURITY_SEND_MAIL_FUNCTION = mail_send
...
FROM_EMAIL = 'dispatch@site.ru'
FROM_NAME = u'Site Admin'
@vfulco
vfulco / InstallationStack.md
Last active September 22, 2015 03:57 — forked from pjnovas/InstallationStack.md
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28