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
/** | |
* @param {number[][]} buildings | |
* @return {number[][]} | |
*/ | |
var getSkyline = function(buildings) { | |
var edges = calcSortedEdges(buildings); | |
var skyline = []; | |
var heights = new SlowPriorityQueue(); | |
var currHeight = 0; | |
heights.add(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
git clone https://github.com/lemonkoala/utils.git | |
echo "source ~/utils/_all.bash" > ~/.bashrc | |
source ~/.bashrc | |
mkdir jupyter | |
docker pull kaggle/python | |
docker run \ | |
-it \ | |
-d \ | |
-p 8888:8888 \ |
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
setwd('~/kaggle/criteo') | |
library(ggplot2) | |
library(scales) | |
probs <- read.csv('submit/submit-8.csv') | |
num_less <- length(which(probs$Predicted < 0.5)) | |
num_more <- length(which(probs$Predicted > 0.5)) | |
num_less / (num_less + num_more) |
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
require(ggplot2) | |
require(reshape) | |
require(scales) | |
setwd("~/Dropbox/Projects/deped-enrollment") | |
which.data <- 'elementary' # elementary or secondary | |
num.enrollees <- read.csv(paste('data/num-enrollees-', which.data, '.csv', sep='')) |
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
setwd("~/Dropbox/Projects/suertres-analysis/") | |
data <- read.csv("data/processed/suertres.csv", header=TRUE, | |
colClasses=c(rep("factor", 6), "integer")) | |
data$date <- as.Date(data$date, format= "%m/%d/%Y") | |
length(data) | |
length(data[,1]) |
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
Show hidden characters
{ | |
"word_wrap": false, | |
"fade_fold_buttons": false, | |
"highlight_line": true, | |
"font_size": 9, | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"tab_size": 2, |