Skip to content

Instantly share code, notes, and snippets.

@brews
brews / matrwl.py
Created November 5, 2012 16:04
Read a Dave Meko-style MATLAB RWL tree-ring file into Python.
#! /usr/bin/env python
import scipy.io as sio
import matplotlib.pyplot as plt
class BadSeriesError(Exception): pass
class MatRwl(object):
""" Read MATLAB files from Meko's RWL Velmex script.
"""
@brews
brews / matrwl.R
Created November 5, 2012 16:05
Read a Dave Meko-style MATLAB RWL tree-ring file into R as a Tucson format object, via dplR
#!/usr/bin/env Rscript
# 2011-11-07
# Convert full-ring .mat files from Meko's velmex script to common Tucson
# format.
suppressMessages(require(R.matlab))
suppressMessages(require(dplR))
args <- commandArgs(trailingOnly = TRUE)
@brews
brews / publishTex.sh
Last active December 1, 2015 00:21
Quickly compile American Meteorological Society template LaTeX files into a PDF for publication
#! /usr/bin/env bash
# publishTex.sh
# 2010-06-08
# This is a quick script to help produce a PDF from .tex files for AMS publication.
# Run it from Bash like so:
# ./publishTex.sh sample.tex
if [ ! -e "$1" ]
then
echo "The file or directory given does not seem to exist."
@mderazon
mderazon / export-to-csv.gs
Last active April 2, 2024 22:25
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
@Chaser324
Chaser324 / GitHub-Forking.md
Last active November 14, 2024 08:32
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 19, 2024 18:00
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@brews
brews / .vimrc
Last active December 3, 2016 18:40
My vimrc file
call plug#begin('~/.vim/plugged')
Plug 'sickill/vim-monokai'
Plug 'dikiaap/minimalist'
Plug 'w0ng/vim-hybrid'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
"Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdcommenter'
Plug 'ctrlpvim/ctrlp.vim'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darothen
darothen / cartopy_wrap_example.ipynb
Last active April 25, 2023 11:55
Example of adding cyclic points to DataArrays for plotting with Cartopy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zshaheen
zshaheen / travis_to_conda.md
Last active May 28, 2021 18:15
How to Setup Automatic Uploads to Anaconda from Travis CI in 15 minutes

How to Setup Automatic Uploads to Anaconda from Travis CI in 15 minutes

TL;DR: Edit .travis.yaml to install Anaconda and to run conda_upload.sh after testing. Edit meta.yaml to take in the environmental variables $VERSION and $CONDA_BLD_PATH. Create conda_upload.sh which sets the needed environmental variables, builds the tar archive, and uploads it to Anaconda. Finally edit some stuff on your Anaconda and Travis CI account so they can talk.

Intro

The following steps will detail how to automatically trigger Anaconda builds and uploads from Travis CI. This will only upload successful builds in the master branch and if there are multiple commits in a single day, it'll only keep the latest one. Both of these settings can easily be changed.

Edit .travis.yaml

First, edit .travis.yml so that it installs Anaconda.

install: