Skip to content

Instantly share code, notes, and snippets.

%matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
import os
import tensorflow as tf
import urllib2
from datasets import imagenet
class PimpedDispatchRequest(req: Request) {
private val HEADER_FORMAT = "--header '%s: %s'"
def toCurl(): String = {
"curl " +
req.headers.map({
case (name, value) => HEADER_FORMAT.format(name, value)
}).mkString(" ") +
req.body.map(EntityUtils.toString).map(" --data '%s' ".format(_)).getOrElse("") +
" " +
req.host + req.path
#!/usr/bin/env bash
filename="${1}"
no_extension=${filename%.*}
# echo "Converting Markdown to LaTeX..."
# multimarkdown -t latex ${no_extension}.md > ${no_extension}.tex
echo "Running LaTeX..."
latex -interaction=nonstopmode ${no_extension} > /dev/null