This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
#!/usr/bin/env ruby | |
# | |
# This script is a wrapper around pandoc that uses pandoc's | |
# builtin citeproc support to generate a markdown bibliography | |
# from bibtex. | |
# | |
# Inspired by Jacob Barney's [bib2mkd][] script. | |
# | |
# [bib2mkd]: http://jmbarney.dyndns.org/?/linux/bib2mkd/ | |
# |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Python script to find the largest files in a git repository. | |
# The general method is based on the script in this blog post: | |
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ | |
# | |
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch | |
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects. | |
# |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'safe_yaml' | |
require 'time' | |
require 'uri' | |
require 'open-uri' |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
# VERY IMPORTANT! After each kernel update or dkms rebuild the modules must be signed again with the script | |
# ~/.ssl/sign-all-modules.sh | |
# Place all files in ~/.ssl folder | |
mkdir ~/.ssl | |
cd ~/.ssl | |
# Generate custom keys with openssl | |
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -subj "/CN=Owner/" |
#!/usr/bin/env python3 | |
''' | |
This script exctracts training variables from all logs from | |
tensorflow event files ("event*"), writes them to Pandas | |
and finally stores in long-format to a CSV-file including | |
all (readable) runs of the logging directory. | |
The magic "5" infers there are only the following v.tags: | |
[lr, loss, acc, val_loss, val_acc] |
This is a companion piece to my instructions on building TensorFlow from source. In particular, the aim is to install the following pieces of software
on an Ubuntu Linux system, in particular Ubuntu 20.04.