This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| laggr <- function(x,y){return(c(rep(NA, y),x[-((length(x)-y+1):length(x))]))} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(foreign) | |
| write.table(read.dta(file.choose()), file="output.csv", quote = FALSE, sep = ",") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 213 YEARS OF POLITICAL EVOLUTION IN 60 SECONDS v4 | |
| # Created: | |
| ## Jay Ulfelder | |
| ## October 1, 2012 | |
| # Modified: | |
| ## Tony Boyles[AABoyles@gmail.com] | |
| ## March 20, 2014 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class makeExt{ | |
| protected $project = "<project>"; | |
| protected $name = "<you>"; | |
| protected $desc = "<insert a short description here>"; | |
| public function __construct(){ | |
| global $argv, $argc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import nltk, glob | |
| for filename in glob.glob( '*.htm*' ): | |
| filein = open(filename) | |
| html = filein.read() | |
| raw = nltk.clean_html(html) | |
| fileout = open(filename.rstrip('.html')+'.txt', 'w+') | |
| fileout.write(raw) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function table2CSV(table, delim){ | |
| var csv = "data:application/csv;charset=utf-8,"; | |
| if(table instanceof HTMLElement){ | |
| table = $(table); | |
| } | |
| if(table instanceof jQuery){ | |
| var regex = /,/g; | |
| if(delim){ | |
| regex = new RegExp(delim, 'g'); | |
| delim = encodeURIComponent(delim); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //console.php | |
| // An itty-bitty Oracle DB Console written in PHP. | |
| // Copyright 2014 By [Tony Boyles]<AABoyles@gmail.com> (http://aaboyles.com) | |
| // Licensed under the GPL v3 or later. | |
| //Edit these Credentials to match your Oracle Database's | |
| $dbuser = ''; | |
| $dbpass = ''; | |
| $dbhost = '127.0.0.1'; |
OlderNewer