Suppose you have a package that imports a lot of weird modules and you’d like to share this package without forcing end users to install a bunch of stuff. You can bundle this into a PEX file and everyone will live happily ever after.
Writing a Markdown to LaTeX Converter in Python
In this post I’ll describe a simple (read: limited) Markdown to LaTeX converter. This will cover up to three levels of headings, ordered, and unordered lists.
Continue reading Writing a Markdown to LaTeX Converter in Python
Creating a Flowchart with TikZ and LaTeX
In this post I’ll discuss how to make simple flowcharts in LaTeX using TikZ. Probably the best collection of TikZ examples can be found at TeXample.net, but there are other helpful examples like these two PDFs, here and here. In case you’re wondering, TikZ is a recursive acronym “TikZ ist kein Zeichenprogramm,” a reminder (in German) that it is not an interactive drawing program.
Getting LaTeX working on a Mac
In this post I’ll describe how to get LaTeX up and running on a Mac. First of all, it’s not as easy as just going, brew install latex
, and then saying, pdflatex kapow.tex
, but it’s not as hard as doing literally anything on Windows either.
Working with TAR Files
This post is mostly for personal reference because I have to keep looking up how to use the tar
utility. Here, I’ll cover what tar files are and how to read and write them. The name “tar
” is short for Tape ARchive. The tar
utility is used to write a set of files and/or directories to a single file that can be easily transported and then un-tar-ed.
Adding Data Points to Shapefiles
In this post I’ll discuss how to plot data points on a shapefile. In a previous post I discussed how to install basemap using pip, the package manager for Python. Since basemap
is an extension of matplotlib
, we have a lot of familiar plotting functions and options at our disposal. Of particular importance is the ability to use projection data in plotting the shapefile, and plotting the data points.
echo versus printf
Quick Note: When you’re bash scripting and you need to pipe some text into some process, you can use echo
with the -n
flag to suppress the echo
‘s complimentary endline , or you can use printf
, but using printf
is more portable. Some machines implement echo
differently and don’t support the -n
flag. I found this advice and a longer explanation at this message board.
Viewing Shapefiles Using Basemap in Python
I heard about a new (to me) tool for viewing shapefiles on this site. It required the installation of basemap
which is a part of matplotlib
, but the installation turned out to be a little tricky. I found a solution at the blog, I Lessen Data, which pointed me to another interesting post on mapping, So You’d Like to Make a Map Using Python.
Installing gstat for R on a Mac
I got the following error when trying to use install.packages("gstat")
today,
> install.packages("gstat") package ‘gstat’ is available as a source package but not as a binary Warning in install.packages : package ‘gstat’ is not available (for R version 3.1.1)
ARIMA Forecasting in R
This is a follow up on my previous post, in this post I will take a closer look at using ARIMA models in R using the same data set.