Skip to content

Instantly share code, notes, and snippets.

View dlebauer's full-sized avatar
😀

David LeBauer dlebauer

😀
View GitHub Profile
@dlebauer
dlebauer / pecan.xml
Created January 28, 2021 20:03
testing out met workflow from web interface
<?xml version="1.0"?><pecan>
<info>
<notes/>
<userid>-1</userid>
<username/>
<date>2021/01/28 19:56:08 +0000</date>
</info>
<outdir>/data/workflows/PEcAn_99000000009</outdir>
<database>
<bety>
@dlebauer
dlebauer / simple_purple_shaker.py
Last active January 16, 2021 18:07
Pyzero implementation of the purple shaker guy from scratch
import pgzrun
import time
import random
WIDTH = 400
HEIGHT = 400
guy = Actor("purple_guy")
guy.pos = (200, 200)
guy.angle = -25
library(tidyverse)
library(wesanderson)
library(cowplot)
library(lubridate)
allfields <- read_csv('~/Downloads/canopycover_ratiomask.csv') %>%
mutate(method = 'French')
field3 <- read_csv('~/Downloads/canopycover_ratiomask_field3.csv') %>%
mutate(method = 'French')
all_tr <- read_csv('~/Downloads/allcanopycover (1).csv') %>% select(-X1) %>%
mutate(method = 'Li')
---
title: "Meta analysis plot organization"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Lets look at what MA outputs look like
# from https://pygame-zero.readthedocs.io/en/stable/introduction.html
import pgzrun
#import random
WIDTH = 500
HEIGHT = 1000
alien = Actor('alien')
alien.pos = WIDTH/2, HEIGHT/2
Formula What It Accounts for Limitations How to Use it Misc. Citation(s)
@dlebauer
dlebauer / PI_cultivars.txt
Created July 3, 2020 01:39
renaming cultivars so that they follow the PIXYZ convention rather thant PI_XYZ see https://github.com/terraref/data-paper/issues/24
6000001885 PI_598070
6000001886 PI_533997
6000001887 PI_597946
6000001888 PI_533937
6000001889 PI_655984
6000001890 PI_659695
6000001891 PI_656058
6000001892 PI_533769
6000001893 PI_576364
6000001894 PI_533750
@dlebauer
dlebauer / fix_season4_treatments.sql
Created July 1, 2020 23:21
spent a long time messing w/ regex before doing it the 'easy' way
select treatments.name, count ( * ) as n
from treatments join traits on treatments.id = traits.treatment_id
where
extract ( year from date ) = 2017
and extract ( month from date ) between 4 and 10
and checked > - 1
group by treatments.name;
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"license": "https://spdx.org/licenses/BSD-3-Clause",
"codeRepository": "git+https://github.com/agpipeline/greenness-transformer",
"contIntegration": "git+https://github.com/agpipeline/greenness-transformer",
"dateCreated": "2020-05-22",
"datePublished": "0000-00-00",
"dateModified": "2020-05-22",
"downloadUrl": "https://github.com/AgPipeline/greenness-transformer/archive/master.zip",
@dlebauer
dlebauer / pecan64.ed.xml
Last active May 14, 2020 16:48
debugging workflow.R
<?xml version="1.0"?>
<pecan>
<outdir>pecan</outdir>
<database>
<bety>
<driver>PostgreSQL</driver>
<user>bety</user>
<password>bety</password>
<host>postgres</host>