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
# https://gist.github.com/johnantoni/8199088 | |
import subprocess | |
import smtplib | |
import socket | |
from email.mime.text import MIMEText | |
import datetime | |
# Change to your own account information | |
to = 'TO@gmail.com' | |
gmail_user = 'YOU@gmail.com' | |
gmail_password = 'PASSWORD' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
background-color: black; | |
font-family: monospace; | |
} | |
</style> |
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(raster) | |
library(dplyr) | |
# Brick from https://gis.stackexchange.com/a/167514/65349 | |
r1 <- raster(nrow=5, ncol=5) | |
b <- brick(setValues(r1, runif(ncell(r1))), | |
setValues(r1, runif(25 ,0.6,0.9)), | |
setValues(r1, runif(25 ,0.2,0.4)), | |
setValues(r1, runif(25 ,1,2))) |
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
add_z <- function(x, z_name){ | |
st_geometry(x) <- st_sfc(st_multipoint(cbind(st_coordinates(x), | |
x[[z_name]]))) %>% | |
st_cast("POINT") | |
return(x) | |
} |