Skip to content

Instantly share code, notes, and snippets.

View naupaka's full-sized avatar

Naupaka Zimmerman naupaka

View GitHub Profile
List of microbial ecology talks at the 2014 ESA meeting in Sacramento
Feel free to add your favorite talks
Workshops of Interest
| Day | Time | Session | Organizer |
|----------|---------------|------------------------------------------------------------|----------------------------|
|Sunday | 8-5 | Env Seq Approaches and Comp Tools for Ecologists | Holly Bik |
|Monday | 11:30-1:15 | Viz w/ Radioisotopes for Plant/Microbe Metabolite Transfer | Chantal D. Reid |
Sessions of Interest
@naupaka
naupaka / Chirp Arduino example
Created June 9, 2016 23:39 — forked from Miceuz/Chirp Arduino example
Chirp Arduino example
/*
Chirp - arduino example
Connection
Chirp pin 1 - no connection
Chirp pin 2 - Arduino VCC
Chirp pin 3 - Arduino A5
Chirp pin 4 - Arduino A4
Chirp pin 5 - Arduino pin 2
Chirp pin 6 - Arduino GND
@naupaka
naupaka / upgrade_packages.R
Created April 24, 2017 15:52 — forked from bearloga/upgrade_packages.R
The script can be used to re-install packages after upgrading R (on Linux or Mac), since libraries cannot be reused between different minor versions (e.g. when upgrading 3.2.3 to 3.3.2). It detects when a package was installed from CRAN vs GitHub/Git and re-installs it using the appropriate func. Usage: `Rscript upgrade_packages.R`
# WMF only:
if (file.exists("/etc/wikimedia-cluster")) {
message('Detected that this script is being run on a WMF machine ("', Sys.info()["nodename"], '"). Setting proxies...')
Sys.setenv("http_proxy" = "http://webproxy.eqiad.wmnet:8080")
Sys.setenv("https_proxy" = "http://webproxy.eqiad.wmnet:8080")
}
# General use:
message("Checking for a personal library...")
if (!dir.exists(Sys.getenv("R_LIBS_USER"))) {
@naupaka
naupaka / colortrans.py
Created June 24, 2017 23:28 — forked from MicahElliott/colortrans.py
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@naupaka
naupaka / find_local_tweeps.R
Created September 11, 2017 07:27 — forked from noamross/find_local_tweeps.R
A visit to Durham
library(rtweet) #rtweet API creds should already be set up
library(stringi)
library(dplyr)
friends = get_friends(user="noamross")
followers = get_followers("noamross")
tweeps_id = distinct(bind_rows(friends, followers))
tweeps_info = lookup_users(tweeps_id$user_id)
# A regex for a visit to Durham
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naupaka
naupaka / pr_etiquette.md
Created December 15, 2017 01:50 — forked from mikepea/pr_etiquette.md
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@naupaka
naupaka / BEtoOPML.scpt
Created December 29, 2017 20:34 — forked from iandol/BEtoOPML.scpt
Bookends to OPML Exporter — Applescript by Dave83 with some further tweaks; see https://www.sonnysoftware.com/phpBB3/viewtopic.php?f=6&t=3882
--Script to Export Bookends Notes to OPML file v1.15
--Written by Dave Glogowski (modified by iandol)
--07 August 2017
--
--This script converts Bookends references and associated notes into an OPML structured file which can then be imported into Scrivener's research folder.
--Each reference is a top level card which contains the Title, Author, Date, Type, Publisher, Abstract, and Bookends citation key
--If there are notes associated with a reference, each note creates its own subordinate note card with the Page number (if any), note header, quotes,
--comments, and keywoards (tags). This allows you to individually review each comment and change its status (label) within Scrivener.
--
--The script does some error checking as follows:
#!/usr/bin/env Rscript
json_in <- file('stdin', 'r')
lat_newp <- '{"t":"RawBlock","c":["latex","\\\\newpage"]}'
doc_newp <- '{"t":"RawBlock","c":["openxml","<w:p><w:r><w:br w:type=\\"page\\"/></w:r></w:p>"]}'
ast <- paste(readLines(json_in, warn=FALSE), collapse="\n")
@naupaka
naupaka / Tinderbox-Ruby.rb
Created April 4, 2022 04:35 — forked from bcdavasconcelos/Tinderbox-Ruby.rb
This ruby class is aimed at the XML files of the macOS app Tinderbox with methods to parse attributes, links and notes.
#!/Users/bcdav/.rbenv/shims/ruby
# frozen_string_literal: false
Encoding.default_external = Encoding::UTF_8
# Bernardo C. D. A. Vasconcelos #
# 2022-01-06-10-02 #
# A Ruby class for Tinderbox Documents with methods to parse attributes, links and notes.
# It deals directly with the XML file and does not rely on the application's OAS interface.