Skip to content

Instantly share code, notes, and snippets.

View zackbatist's full-sized avatar

Zack Batist zackbatist

View GitHub Profile
@avram
avram / csv2zotero.py
Created July 16, 2011 11:16
Script to batch-add items defined in a CSV file to Zotero
#!/usr/bin/python
# -*- coding: utf8 -*-
# We'll use the pyzotero project for server access
# See packages.python.org/Pyzotero/
from pyzotero import zotero
import sys
# Python's built-in CSV support is pretty nice
@D-K-E
D-K-E / BibtexZoteroAPI_example.py
Created February 23, 2017 18:05
A Bulk Import Example for Zotero API using Bibtex as Data
# Packages ---------------------------------------
import os # Needed for orienting in OS
import bibtexparser # Needed for parsing bibtex files
from bibtexparser.bparser import BibTexParser # Parses the bibtex
from bibtexparser.customization import convert_to_unicode # Converts latex
accents to unicode
import requests # Needed for uploading to zotero server
import pickle # For saving data locally
import json # Needed for converting data to zotero-server friendly format
@benmarwick
benmarwick / munsell-plot.R
Last active March 16, 2019 00:28
Make a stratigraphic-style plot-schematic of sediment colour using munsell values
# read in data
soil_colour <-
readxl::read_excel("KWL_chronology.xlsx",
sheet = "soil_color")
layer_depths <-
readxl::read_excel("KWL_chronology.xlsx",
sheet = "depth") # some of the Pit IDs don't match the Pit IDs in the soil_colour sheet...
library(tidyverse)