Anthony@Boyles.cc (617) 935-5515 AABoyles.com
Work Experience
library("RPostgreSQL") | |
con <- dbConnect(dbDriver("PostgreSQL"), | |
host="your database's host", | |
port="5432", | |
user="your database's username", | |
password="your database's password", | |
dbname="your database's name") |
laggr <- function(x,y){return(c(rep(NA, y),x[-((length(x)-y+1):length(x))]))} |
library(foreign) | |
write.table(read.dta(file.choose()), file="output.csv", quote = FALSE, sep = ",") |
## 213 YEARS OF POLITICAL EVOLUTION IN 60 SECONDS v4 | |
# Created: | |
## Jay Ulfelder | |
## October 1, 2012 | |
# Modified: | |
## Tony Boyles[AABoyles@gmail.com] | |
## March 20, 2014 |
<?php | |
class makeExt{ | |
protected $project = "<project>"; | |
protected $name = "<you>"; | |
protected $desc = "<insert a short description here>"; | |
public function __construct(){ | |
global $argv, $argc; |
Anthony@Boyles.cc (617) 935-5515 AABoyles.com
Work Experience
#!/bin/bash | |
# Dependencies: tesseract-ocr imagemagick scrot xsel | |
SCR_IMG=`mktemp` | |
trap "rm $SCR_IMG*" EXIT | |
scrot -s $SCR_IMG.png | |
mogrify -modulate 100,0 -resize 400% $SCR_IMG.png #should increase detection rate | |
tesseract $SCR_IMG.png $SCR_IMG &> /dev/null | |
cat $SCR_IMG.txt | xsel -bi |
getPackage <- function(pkg){ | |
if(!require(pkg, character.only=TRUE)){ | |
install.packages(pkg, dependencies=TRUE) | |
library(pkg, character.only=TRUE) | |
} | |
return(TRUE) | |
} | |
getPackages <- function(pkgs){ | |
for (pkg in pkgs){ |
require(RCurl) | |
gDocs <- "https://docs.google.com/spreadsheet/pub?key=0AuRPH1hRlnZhdEhtbGtZWTRybThvNXBLZW15Vk1Lenc&single=true&gid=0&output=csv" | |
txCon <- textConnection(getURL(gDocs)) | |
FSI <- read.csv(txCon) |
/* | |
You can create a spinner using either of the variants below: | |
$("#el").spin(true); //Starts the spinner. | |
$("#el").spin(false); // Kills the spinner. | |
*/ | |
(function($) { | |
$.fn.spin = function(opts) { |