Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

run python jupyter_translate.py
, and you will be asked for 3 inputs:
A new notebook will be created in target language in the same path as notebook.
It will preserve original language cells too, for easier human debugging of the translation.
You need a DeepL API
# as input, provide a vector of verbatim taxon names (preferably with authorship) | |
# and a vector of existing local identifiers for those names | |
# load R packages | |
library(dplyr) | |
library(tidyr) | |
match_to_gbif.fn <- function(taxon_name, taxon_id, include_genus = FALSE) { | |
# perform initial matching in parallel |
library(tidyverse) | |
library(analogsea) | |
library(furrr) | |
# R on local machine → DigitalOcean Linux image → Docker on that → R | |
# Install analogsea, log into DigitalOcean, generate an API key with write | |
# permissions, and add this line to ~/.Rprofile: | |
# | |
# Sys.setenv(DO_PAT = "KEY_GOES_HERE") |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
This script takes a BibTeX .bib file and outputs a series of .md files for use | |
in the Academic theme for Hugo, a general-purpose, static-site generating web | |
framework. Each file incorporates the data for a single publication. | |
Written for and tested using python 3.6.1 |
#' Plot network of package dependencies | |
#' | |
#' @param pkg package description, can be path or package name. See \code{\link[devtools]{as.package}} for | |
#' more information. | |
#' | |
#' @details The resulting plot visualizes the network of package dependencies. If you are trying to cut down | |
#' on package dependencies look for big red dots that represent a lot of upstream but few downstream | |
#' dependencies. | |
#' @import ggplot2 | |
#' @export |
msg <- function(..., prob = 0.25) { | |
if (runif(1) > prob) { | |
return(invisible()) | |
} | |
messages <- c(...) | |
message(sample(messages, 1)) | |
} | |
encourage <- function() { |
# somewhat hackish solution to: | |
# https://twitter.com/EamonCaddigan/status/646759751242620928 | |
# based mostly on copy/pasting from ggplot2 geom_violin source: | |
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
library(ggplot2) | |
library(dplyr) | |
"%||%" <- function(a, b) { |