Skip to content

Instantly share code, notes, and snippets.

@ashiklom
ashiklom / docker.org
Created August 21, 2019 15:11
PNNL PEcAn setup

PIC setup notes

VM instance setup

Start at cloud management console (https://dashboard.cloud.pnnl.gov).

Go to “Instances”, then “Launch Instance”.

Details: Give it a name (e.g. “pecan1”) Availability zone “nova” (only option).

4 medium carrots grated (about 2 cups)
1/2 c walnuts chopped
1 c white flour
1 c wheat flour
1 1/2 tsp. baking soda
2 tsp. baking powder
2 tsp. cinnamon
2 c sugar
4 eggs
3/4 c oil
@ashiklom
ashiklom / docker-compose.ci.yml
Created January 15, 2020 19:48
GitHub actions + Docker Compose example
# CI overrides
version: '3'
services:
web:
environment:
- DATABASE_URL
- DJANGO_SETTINGS_MODULE
- SECRET_KEY
- PORT
@ashiklom
ashiklom / api-ED2.R
Last active January 25, 2021 18:37
PEcAn API minimal example
library(rpecanapi)
library(httr)
library(magrittr, include.only = "%>%")
library(dplyr)
library(glue)
wfmessage <- function(wf) {
message(glue(
"Follow workflow status at:\n",
"http://localhost:8000/pecan/05-running.php?",

App Install Plan

Critical

@selfawaresoup
selfawaresoup / apple-health-to-rda.r
Last active April 7, 2024 10:20
Make Apple Health data available for analysis in R as an RDA file.
# This can take quite a long time to run
library(xml2)
library(tidyverse)
read_xml("apple_health_export/export.xml") -> x
x %>% xml_find_all(".//Record") %>%
xml_attrs %>%
bind_rows %>%
@h-a-graham
h-a-graham / hls-functions.R
Last active January 13, 2025 16:26
create Harmonized Sentinel Landsat Mosaic with R
# Description: This script is used to download HLS data from NASA's Earthdata
# STAC API and build a cloud-free composite image.
# ----- Functions -----
# band mapping for HLS SL data
#' @return a named character vector of band mappings for HLS SL data
hlssl_band_mapping <- function() {
c(
B01 = "A", B02 = "B", B03 = "G", B04 = "R",