View mlp.py
# coding=utf-8
#
#!/usr/bin/python2
#
# Copyright 2013 Johannes Bauer, Universitaet Hamburg
#
# This file is free software. Do with it whatever you like.
# It comes with no warranty, explicit or implicit, whatsoever.
#
# If you find this code useful or if you have any questions, do not
View som.py
# coding=utf-8
#
#!/usr/bin/python2
#
# Copyright 2013 Johannes Bauer, Universitaet Hamburg
#
# This file is free software. Do with it whatever you like.
# It comes with no warranty, explicit or implicit, whatsoever.
#
# This python script implements a simple SOM in arbitrary dimensions.
View saliency.py
# coding=utf-8
#
#!/usr/bin/python
#
# Copyright 2013 Johannes Bauer, Universitaet Hamburg
#
# This file is free software. Do with it whatever you like.
# It comes with no warranty, explicit or implicit, whatsoever.
#
# This python script implements an early version of Itti and Koch's
View plot_rgb_as_pcolormesh
import numpy as np
def plot_as_colormesh(image, axes, **pcolormeshkwargs):
raveled_pixel_shape = (image.shape[0]*image.shape[1], image.shape[2])
color_tuple = image.transpose((1,0,2)).reshape(raveled_pixel_shape)
if color_tuple.dtype == np.uint8:
color_tuple = color_tuple / 255.
index = np.tile(np.arange(image.shape[0]), (image.shape[1],1))
View shrinkpdf.sh
#!/bin/bash
if [ $# -lt 2 ] || [ $# -gt 3 ]; then
echo usage: shrinkpdf \<filename\> \<resolution\> \[\<output\>\]
exit
fi
if [ ! -e "$1" ]; then
echo "$1" does not exist. Exiting.
exit