This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
spreadsheet_key = '' # from the Google sheets Publish URL | |
spreadsheet_range = '' # e.g. B6:E15 | |
url = 'https://docs.google.com/spreadsheets/d/e/{}/pub?gid=0&single=true&output=csv'.format(spreadsheet_key) | |
if spreadsheet_range: | |
url += '&range=' + spreadsheet_range | |
# TODO read this from the doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Report malicious PyPI packages in each conda environment. | |
# See discussion at https://news.ycombinator.com/item?id=15256121 | |
packages=$(cat <<EOF | |
acqusition | |
apidev-coop | |
bzip | |
crypt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SpaceTranslationPatch patches the MacOS Python IDE to convert spaces to tabs | |
# when a source file is opened, and back to spaces when it's saved. | |
# | |
# Drop this file on PythonIDE to install it. It requires | |
# http://www.strout.net/python/mac/PatchUtils.py in order to run. | |
# | |
# Version 2 released to the public domain 3 November 1999 | |
# by Oliver Steele (steele@cs.brandeis.edu). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install gcc | |
pip install nose numpy Tempita | |
python runtests.py -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d.exec () { | |
docker run \ | |
-v yarn_cache:/root/.cache/yarn \ | |
-v `pwd`:/app \ | |
-v signage_node_modules:/app/node_modules \ | |
-p 3000:3000 \ | |
-it \ | |
node \ | |
"$@" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -eu | |
#copy this in a folder from path ex: /usr/local/bin | |
#usage: docker-machine-rename default my-default | |
# From https://gist.github.com/alexproca/2324c60c86380b59001f | |
# w/ comments from eurythmia | |
OLD_MACHINE_NAME=${1:-default}; | |
NEW_MACHINE_NAME=${2:-my-default-2}; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Print email nags regarding toolbox pull requests. | |
The current directory should contain a file `Master Grades.xlsx` with two sheets, and columns | |
`First Name`, `Last Name`, `E-mail`, and `GitHub`. | |
Author: Oliver Steele <oliver.steele@olin.edu> | |
""" | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
die() { echo "$@" 1>&2 ; exit 1; } | |
LAUNCH_AGENTS_DIR=~/Library/LaunchAgents | |
[[ -d $LAUNCH_AGENTS_DIR ]] || die "Missing directory: $LAUNCH_AGENTS_DIR. Are you sure you're on a Mac?" | |
NOTEBOOK_DIR=~/code/notebooks | |
[[ -d $NOTEBOOK_DIR ]] || die "Missing directory: $NOTEBOOK_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Package Control package manager for ST3 | |
ST3_CONFIG=~/.config/sublime-text-3 | |
PC_DIR=$ST3_CONFIG/Installed\ Packages/Package\ Control.sublime-package | |
PC_FNAME=Package%20Control.sublime-package | |
mkdir -p "$PC_DIR" | |
curl -O https://sublime.wbond.net/$PC_FNAME | |
unzip -u $PC_FNAME -d "$PC_DIR" | |
rm $PC_FNAME | |
# Add the Anaconda and Floobits packages. When ST3 is launched, Package Control will install these. |