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
function sendEmailsWithAttachments() { | |
var sheet =SpreadsheetApp.getActiveSheet(); | |
var startRow = 2; | |
var numRows = sheet.getLastRow() - 1; | |
var dataRange = sheet.getRange(startRow, 1, numRows, sheet.getLastColumn()); | |
var data = dataRange.getValues(); | |
var plannerEmail = "planner@bash.example" | |
data.forEach(function(row){ | |
var emailAddress = row[0]; |
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
function promisesAllSettled(promises) { | |
return new Promise((resolve) => { | |
if (!Array.isArray(promises)) { | |
throw new TypeError('Argument must be an array of promises'); | |
} | |
const results = []; | |
let settledCount = 0; | |
function checkAllSettled() { |
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
# Install R | |
sudo apt-get update | |
sudo apt-get install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev | |
# Install RStudio | |
cd ~/Downloads | |
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb | |
sudo gdebi rstudio-xenial-1.1.383-amd64.deb | |
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile |
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
def convert(imgf, labelf, outf, n): | |
f = open(imgf, "rb") | |
o = open(outf, "w") | |
l = open(labelf, "rb") | |
f.read(16) | |
l.read(8) | |
images = [] |
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
/* call-by-value means the parameters are evaluated left to | |
** right to determine their value before the function itself | |
** is evaluated | |
*/ | |
def first(a: Int, b: Int): Int = a | |
first(3 + 4, 5 + 6) // will be reduced to first(7, 5 + 6), then first(7, 11), and then 7 | |
/* call-by-name means the paramter is passed into the function | |
** as is. Parameter evaluation takes place after | |
** substitution |