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 | |
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 |
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
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)) |
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
# 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 |
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
# 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. |
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
# 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 |
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
# This script does what it's supposed to: it opens multiple tunnels with different ports on the SSH host and handles them | |
# concurrently and it can react to the port that is being accessed by the client. | |
import threading | |
import time | |
import paramiko | |
import select | |
import queue | |
user = input('username') |