Skip to content

Instantly share code, notes, and snippets.

@xvrdm
xvrdm / osx-for-hackers.sh
Created April 29, 2016 09:15 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
head -1 20151209-file.csv > concat.csv && tail -q -n +2 2015*.csv >> concat.csv
(ns proj.core)

(defn test1-handler [request]
  {:body (str "Test1: " request)})

(defn test2-handler [request]
  {:body (str "Test2: " request)})

(defn route-handler [request]
@xvrdm
xvrdm / pivot_and_stack.md
Last active December 15, 2015 16:40
Pivot and Stack in Python using Pandas

Process:

  1. Index all columns that don't need reshape
  2. Stack the rest
df
first second         A         B
bar   one     0.721555 -0.706771
bar   two    -1.039575  0.271860
@xvrdm
xvrdm / zsh.md
Created August 8, 2014 10:05 — forked from tsabat/zsh.md
# Meme Generator 1
# Demonstrates how to draw text on images using PIL
# (Python Imaging Library)
#
# The script loads an image from the clipboard (or uses
# a default one if the clipboard is empty) and asks for
# two captions (top and bottom) that are then drawn onto
# the image.
import Image
#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs