#dsn <- dsn::vrtcon(sds::gebco(), ovr = 4)
dsn <- "vrt:///vsicurl/https://gebco2023.s3.valeria.science/gebco_2023_land_cog.tif?ovr=4"
scaled.vrt <- "scaled.vrt"
system(glue::glue("gdal_translate {dsn} scaled.vrt -scale -ot Byte"))
## here I had to edit the pal.vrt to have "scaled.vrt" rather than "mem" in the source (...)
system(glue::glue("gdalattachpct.py pal scaled.vrt pal.vrt -of VRT"))
cloud_view <- function(obj) { | |
withr::with_options( | |
list(viewer = function(url, ...) { | |
get_url_dir <- function(url) gsub("file://|/index.html", "", url) | |
server <- servr::httd( | |
dir = get_url_dir(url), | |
verbose = TRUE, | |
browser = FALSE | |
) | |
.vsc.browser(server$url, ...) |
Non-Uniform Memory Access (NUMA) is one of the computer memory design methods used in multiprocessor systems, and the time to access the memory varies depending on the relative position between the memory and the processor. In the NUMA architecture, when a processor accesses its local memory, it is faster than when it accesses the remote memory. Remote memory refers to memory that is connected to another processor, and local memory refers to memory that is connected to its own processor. In other words, it is a technology to increase memory access efficiency while using multiple processors on one motherboard. When a specific processor runs out of memory, it monopolizes the bus by itself, so other processors have to play. , and designate 'access only here', and call it a NUMA node.
lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 12GB] (rev a1)
github_pubkey <- function(user){ | |
url <- sprintf("https://api.github.com/users/%s/keys", user) | |
keys <- jsonlite::fromJSON(url) | |
lapply(keys$key, openssl::read_pubkey) | |
} | |
# Get pubkey from Gabor | |
gabor <- github_pubkey('gaborcsardi') | |
pubkey <- gabor[[1]] #has 3 keys, use first one |
#!/usr/bin/ruby | |
# For an OO language, this is distinctly procedural. Should probably fix that. | |
require 'json' | |
details = Hash.new({}) | |
capture_params = [ | |
{ :name => "title", :message => "Enter project name." }, | |
{ :name => "url", :message => "Enter the URL of the project repository." }, |
--- | |
title: "Get verbatim R chunks in R Markdown" | |
author: "Jenny Bryan" | |
date: "18 September, 2014" | |
output: | |
html_document: | |
keep_md: TRUE | |
--- | |
My periodic revisitation of "how can I include a verbatim R chunk in `.rmd`"? This time I am writing it down! Various proposed solutions: |
--- | |
title: "twee demo" | |
author: "Jenny Bryan" | |
date: "17 August, 2014" | |
output: | |
html_document: | |
toc: TRUE | |
keep_md: TRUE | |
--- |
Short instructions to setup a Lubuntu Virtual Machine with | |
R & RStudio: | |
1. Download these: | |
http://lubuntu.net/ (Intel x86 desktop cd) | |
https://www.virtualbox.org/wiki/Downloads (Oracle VM VirtualBox) | |
2. Install Oracle VM VirtualBox, open it (if using windows, | |
run as administrator), click 'New' button, at | |
'Name' put Lubuntu, 'Type' choose Linux, 'Version' choose |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
library(httr) | |
library(digest) | |
library(XML) | |
s3_request <- function(verb, bucket, path = "/", query = NULL, | |
content = NULL, date = NULL) { | |
list( | |
verb = verb, | |
bucket = bucket, | |
path = path, |