Python Script to Watch and Sync Directory

At work we have a rather complex setup which is prohibitive to running a full working environment locally, so we have sandboxes on remote servers that run our development code. However, as much as I love vim, it can be challenging at times to do development on a remote server full-time. You are limited to […]

Ubuntu Guide for Mac Converts

Here are some tips and tricks I've collected to help Mac users adjust to Ubuntu and Linux. I switched my work system to Ubuntu; ever since OS X was released I've used a Mac but my new job has little use of Office docs, so a great time to try out a full linux setup. […]

Python Data Science

My notes, resources and examples using Python, NumPy, SciPy and Matplotlib as alternatives to R and Matlab for data science and analysis. Load Data from Text File import pylab filename = "cool_data.dat" # use skiprows if your data file has headers data = pylab.loadtxt(filename, skiprows=1) An example loading comma delimited data using Numpy: import numpy […]

Python Dates

A set of examples using Python date and time functions, including formatting dates, date calculations and other bits in datetime package, similar to my string format examples. . First off, all examples use the following import, any additional imports needed will be shown with the example. from datetime import datetime Creating Date Objects # now […]

Python String Format

Every time I use Python's string formatter, version 2.7 and up, I get it wrong and for the life of me I can't figure out their documentation format. I got very used to the older % method. So I started to create my own string format cookbook. Let me know in the comments of any […]

Tmux – Terminal Multiplexer

I recently discovered tmux which is a terminal multiplexer, or you can consider it a "window" manager for the terminal. I've been a user of GNU screen for a long time, but its development is a little stale. So worth checking out the new kid who promises new features and improved usability. This article is […]

Vim Cheat Sheet

My collection of vim tips to make the best editor even better. This is by no means complete or a tutorial on how to use vim, but a set of commands I don't want to forget and need to write them down before they burn into memory. See the resources section below for a more […]

10 Scala One Liners to Impress Your Friends

Here are 10 one-liners which show the power of scala programming, impress your friends and woo women; ok, maybe not. However, these one liners are a good set of examples using functional programming and scala syntax you may not be familiar with. I feel there is no better way to learn than to see real […]