Skip to content

Instantly share code, notes, and snippets.

@markeganfuller
markeganfuller / disable_crontab_r
Created January 8, 2014 11:00
Disable crontab -r (remove)
# Disable crontab -r
function crontab ()
{
# Replace -r with -e
/usr/bin/crontab "${@/-r/-e}"
}
@ahmadia
ahmadia / test_growcut.py
Last active December 17, 2015 16:29
timing code for comparing pypy/numba
from timeit import timeit
try:
import numpypy as np
except:
import numpy as np
import math
def window_floor(idx, radius):
@mattsgarrison
mattsgarrison / merge_pdfbox.py
Created August 31, 2011 15:35
Jython script to use Apache PDFBox to merge PDFs into a single file.
import sys
from java.io import *
import java.io.InputStream
import java.io.FileInputStream
import java.lang.String # blah....converting String types between Java/Python is tedious
sys.path.append("pdfbox-1.0.0.jar") # or wherever you stashed it
import org.apache.pdfbox
"""
This method merges the FileInputStreams that the streamList points to, into the