This article was moved to https://zhiyzuo.github.io/installation-rattle/ !
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
#!/bin/sh -exu | |
dev=$1 | |
cd $(mktemp -d) | |
function umountboot { | |
umount boot || true | |
umount root || true | |
} | |
# RPi1/Zero (armv6h): |
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(shiny) | |
library(shinyjs) | |
if (!dir.exists('www/')) { | |
dir.create('www') | |
} | |
download.file( | |
url = 'https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js', | |
destfile = 'www/js.cookie.js' |
As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.
The problems and solutions described in the examples below have led to the development of sciluigi,
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
p_load(formattable) | |
DF <- data.frame(Ticker=c("", "", "", "IBM", "AAPL", "MSFT"), | |
Name=c("Dow Jones", "S&P 500", "Technology", | |
"IBM", "Apple", "Microsoft"), | |
Value=accounting(c(15988.08, 1880.33, NA, | |
130.00, 97.05, 50.99)), | |
Change=percent(c(-0.0239, -0.0216, 0.021, | |
-0.0219, -0.0248, -0.0399))) | |
DF | |
## Ticker Name Value Change |
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
dat <- data.frame( | |
freq = c(37, 88, 47, 89, 28, 68, 65, 98, 68, 86, 50, 87, 59, 82, 45, 65, 52, 32, 59, 47, 68, 78, 39, 31, 64, 68) | |
) | |
dat[["sector"]] <- rep(c("U.S. adults", "AAAS scientist"), nrow(dat)/2) | |
field <- c("Biomedical sciences", "Climate, energy, space sciences") | |
dat[["field"]] <- factor(rep(field, c(10, 16)), levels=field) | |
items <- c( |
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
/* Client side, works in Chrome 55 and Firefox 52 without transpilation */ | |
//https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/ | |
async function fetchURLs() { | |
try { | |
// Promise.all() lets us coalesce multiple promises into a single super-promise | |
var data = await Promise.all([ | |
/* Alternatively store each in an array */ | |
// var [x, y, z] = await Promise.all([ | |
// parse results as json; fetch data response has several reader methods available: | |
//.arrayBuffer() |
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
if (!require("pacman")) install.packages("pacman"); library(pacman) | |
p_load(tidyverse, cowplot) | |
cols <- c(lightblue = '#62B1F6', darkblue = '#27408B') | |
dat <- data_frame( | |
type = state.name[1:18], | |
Total = c(522, 464, 332, 185, 90, 811, 121, 242, 258, 175, 346, 217, 186, 133, 144, 136, 53, 306), | |
Sub = c(6, 6, 13, 19, 21, 11, 7, 8, 16, 29, 78, 71, 90, 68, 90, 99, 35, 14) | |
) |
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
FROM php:7.1.2-apache | |
RUN docker-php-ext-install mysqli |