This file contains 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
\documentclass[11pt,oneside]{article} | |
\usepackage{geometry} | |
\usepackage[T1]{fontenc} | |
\usepackage[usenames,dvipsnames]{color} | |
\usepackage[USenglish]{babel} | |
\usepackage[num,USenglish]{isodate} | |
\usepackage{colortbl} | |
\usepackage{array} |
This file contains 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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
This file contains 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
remove.empty <- function(the.data) { | |
nums <- sapply(the.data, is.numeric) | |
numeric.data <- the.data[,nums] | |
cat.data <- the.data[,-nums] | |
not.empty <- colSums(numeric.data) > 0 | |
cbind(cat.data, numeric.data[,not.empty]) | |
} |
This file contains 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
iter discount reward model time.secs | |
1 0.1 337.64 Value.Iteration 0.0035438538 | |
2 0.1 356.68 Value.Iteration 0.0011398792 | |
3 0.1 356.08 Value.Iteration 0.0015702248 | |
4 0.1 357.64 Value.Iteration 0.0022630692 | |
5 0.1 356.36 Value.Iteration 0.0020890236 | |
6 0.1 355.56 Value.Iteration 0.0025310516 | |
7 0.1 354.80 Value.Iteration 0.0028641224 | |
8 0.1 355.68 Value.Iteration 0.0051300526 | |
9 0.1 357.88 Value.Iteration 0.0035381317 |
This file contains 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(MDPtoolbox) | |
library(Matrix) | |
library(ggplot2) | |
library(grid) | |
library(gridExtra) | |
library(doMC) | |
cores <- detectCores() - (detectCores() / 2) / 2 | |
registerDoMC(cores=cores) | |
set.seed(1234) |
This file contains 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
SELECT | |
s.SERVER_NAME as SERVER_NAME, | |
s.FOO, | |
s.BAR, | |
s.TIMESTAMP as SERVER_TIME, | |
n.SERVER_NAME as N_SERVER_NAME, | |
n.TIMESTAMP as N_TIME, | |
n.BAH, | |
n.BAZ, | |
EXTRACT(EPOCH from s.TIMESTAMP - n.TIMESTAMP) as DIFF |
This file contains 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
parse.or.na <- function(d, func) { | |
wrapper <- function(x) { | |
tryCatch(func(x), | |
error=function(e) { | |
print(e) | |
NA | |
} | |
)} | |
lapply(data, wrapper) | |
} |
This file contains 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
S <- array(c( | |
# Wait | |
# Fire, Young Forest, Old Forest, Farm | |
0.1, 0.9, 0.0, 0.0, | |
0.1, 0.0, 0.9, 0.0, | |
0.1, 0.0, 0.9, 0.0, | |
0.1, 0.0, 0.0, 0.9, | |
# Cut | |
# Fire, Young Forest, Old Forest, Farm | |
1, 0, 0, 0, |
This file contains 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
2 parts oxyclean free to 1 part tsp, by weight | |
tsp = trisodium phosphate | |
(get it in the paint department of a home improvement storew) |
This file contains 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
#include<iostream> | |
using namespace std; | |
const int DATAGRAM_LENGTH = 64; | |
const int BIT_LENGTH = 8; | |
void text_to_bin(string block, bool output[DATAGRAM_LENGTH]) { | |
int current = 0; | |
for (int i = 0;i < block.length();i++) { |