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
# Server config | |
server { | |
listen 80 default_server; | |
listen [::]80 default_server; | |
root /var/www/html; | |
# Add index.php to the list if you are using PHP | |
index index.html index.htm index.nginx-debian.html; |
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
#mapshaper tl_2013_31_cousub.shp -simplify weighted 0.02% -o simplified.shp | |
library(rgdal) | |
library(sp) | |
before <- readOGR("tl_2013_31_cousub.shp") | |
after <- readOGR("simplified.shp") | |
plot(before) | |
plot(after) |
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(data.table) | |
check <- fread("https://storage.googleapis.com/playground-mike/weather/1315015.csv") | |
check[, .N, keyby=.(NAME)] | |
check <- check[, .(NAME, DATE,TMAX,TMIN)] | |
check <- na.omit(check, invert=FALSE) | |
check[, DATE := as.Date(DATE)] | |
check[, YEAR := year(DATE)] | |
check[, MONTH := month(DATE)] |
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
# Bring in libraries | |
library(data.table) | |
set.seed(1L) | |
# Data | |
bowlgames <- structure(list(TEAM1 = c("Michigan", "Notre Dame", "Louisville", | |
"Memphis", "Wake Forest", "NC State", "Kentucky", "New Mexico State", | |
"Virginia", "Virginia Tech", "Stanford", "Michigan State", "Florida State", | |
"Iowa", "Purdue", "Texas", "West Virginia", "Duke", "Kansas State", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<h1>This is a heading</h1> | |
<p>This is a paragraph.</p> | |
<div> |
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
# Create Ubuntu 16.04 instance to host openvpn | |
gcloud compute instances create openvpn-pritunl \ | |
--image-family ubuntu-1604-lts --image-project ubuntu-os-cloud \ | |
--zone us-west1-a \ | |
--network default \ | |
--tags https-server,http-server \ | |
--address vpn-static \ | |
--service-account [email protected] \ |
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(MCMCpack) | |
rm(list=ls()) | |
set.seed(83247279) | |
reps=50000 | |
# draw data from the cauchy distribution | |
x.dat <- rcauchy(100, location=2, scale=0.8) | |
######### now recover the location and the scale |