This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _CS_H | |
#define _CS_H | |
#include <stdlib.h> | |
// #include <stdint.h> | |
#include <limits.h> | |
#include <math.h> | |
#include <stdio.h> | |
#include <stddef.h> | |
#ifdef MATLAB_MEX_FILE | |
#include "mex.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Parallelized k-means module. | |
By David Warde-Farley, February 2012. Licensed under the 3-clause BSD. | |
FROM gist.github.com/dwf/2200359 | |
""" | |
cimport cython | |
from cython.parallel import prange | |
import numpy as np | |
cimport numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun f90-batch-indent-region () | |
"Run `f90-batch-beatify-region' on the specified filename. | |
Use this from the command line, with `-batch'; | |
it won't work in an interactive Emacs. | |
For example, invoke \"emacs -batch -l ~/.emacs-batch-f90-indent -f f90-batch-indent-region file.f\"" | |
(if (not noninteractive) | |
(error "`f90-batch-indent-region' is to be used only with -batch")) | |
(let ((make-backup-files nil) | |
(version-control nil) | |
(auto-save-default nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Take a PDF, OCR it, and add OCR Text as background layer to original PDF to make it searchable. | |
# Hacked together using tips from these websites: | |
# http://www.jlaundry.com/2012/ocr-a-scanned-pdf-with-tesseract/ | |
# http://askubuntu.com/questions/27097/how-to-print-a-regular-file-to-pdf-from-command-line | |
# Dependencies: pdftk, tesseract, imagemagick, enscript, ps2pdf | |
# Would be nice to use hocr2pdf instead so that the text lines up with the PDF image. | |
# http://www.exactcode.com/site/open_source/exactimage/hocr2pdf/ |