This file contains 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/bash | |
# modified from SO: http://stackoverflow.com/a/25932668/786559 | |
input=$2 | |
output=$(echo $2 | sed s/.pdf/_scaled.pdf/) | |
if [ $# -ne 2 ] ; then | |
echo "Bad arguments!" | |
exit | |
fi |
This file contains 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
# make with different optimisation levels: | |
# make O_LEVEL=2 will make with -O2 | |
CC=gcc | |
O_LEVEL=0 | |
OMP=-fopenmp | |
CFLAGS=-std=c99 -Wall -pedantic $(OMP) -O$(O_LEVEL) | |
NL=10 | |
SZ=64 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
################################################################## | |
### Overriding DiskCache's decorators to make them pickle-able ### | |
################################################################## | |
import diskcache as dc | |
from functools import update_wrapper | |
import time | |
ENOVAL = dc.core.ENOVAL |
This file contains 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
local function printf(s, ...) | |
io.write(s:format(...)) | |
end | |
local ffi = require("ffi") | |
ffi.cdef[[ | |
typedef void (*cb)(void); | |
void set_v(int n, void (*)(void )); | |
void set_i(int n, void (*)(int )); | |
void set_d(int n, void (*)(double)); |