displaying multiple grayscale figures in python's matplotlib

from matplotlib import pyplot as plt import matplotlib.cm as cm plt.figure() # without this it display one after another plt.imshow(image_one, cmap=cm.gray) # without cm.gray it displays grayscale images in colormap plt.imshow(image_two, cmap=cm.gray) # plt.show() use %matplotlib inline in ipython notebook to display image inplace Shorter version: %matplotlib inline import matplotlib.pyplot as plt plt.axis(‘off’) plt.imshow(dpt, cmap=plt.cm.gray, interpolation=‘nearest’)

June 6, 2014 · SM!

Theano

_Intro __Theano_ is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. Check gpu is workingSource: [http://deeplearning.net/software/theano/tutorial/using_gpu.html](http://deeplearning.net/software/theano/tutorial/using_gpu.html) Test script: :::: from theano import function, config, shared, sandbox import theano.tensor as T import numpy import time <span class="n">vlen</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">*</span> <span class="mi">30</span> <span class="o">*</span> <span class="mi">768</span> <span class="c"># 10 x #cores x # threads per core</span> <span class="n">iters</span> <span class="o">=</span> <span class="mi">1000</span> <span class="n">rng</span> <span class="o">=</span> <span class="n">numpy</span><span class="o">....

June 5, 2014 · SM!

windows life

doskey /history > commands.log- dump command line promt history to file some_command > output_file.txt 2>&1 - Redirect stdout and stderr to the same file src Share wifi from command line (probably obsolete in Win 8, 10) netsh wlan set hostednetwork mode=allow ssid="NETWORK_NAME" key="NETWORK_PASSWORD" keyUsage=persistent netsh wlan start hostednetwork Then in the properties of the internet connection enable access. Then allow in firewall.

June 5, 2014 · SergeM

linux life

Good start 1 sudo apt install -y mc curl jq wget htop hwinfo nmap vim Some commands top - see running processes df - check free disk space baobab - free disk space screen - multiple virtual consoles in one real [ref], need installation in ubuntu mc - file manager ccsm - disabling smooth fades and animations (speedup interface, especially useful in VirtualBox) sudo apt-get install compizconfig-settings-manager then ccsm Set up SFTP server How to set up an SFTP server on Linux - some commands are broken (wrong paths and users) but in general works See also more here Ubuntu customization: ubuntu-linux-settings Mount windows shares in linux

June 2, 2014 · SM!

lambda functions in matlab

I discovered it during Machine learnin courses on Coursera To specify the actual function we are minimizing, we use a "short-hand" for specifying functions with the @(t) ( costFunction(t, X, y) ) . This creates a function, with argument t, which calls your costFunction. This allows us to wrap the costFunction for use with fminunc. @(t) ( costFunction(t, X, y) ) - that’s awesome

May 24, 2014 · SM!

crop included graphics in latex

\documentclass{article} \usepackage{graphicx} \begin{document} % crop left \includegraphics[trim={5cm 0 0 0},clip]{path-to-image} % crop right \includegraphics[trim={0 0 5cm 0},clip]{path-to-image} \end{document} Use the trim option, which takes four space separated values. trim={<left> <lower> <right> <upper>} Source

May 21, 2014 · SergeM

multiple "windows" in one linux terminal

use “screen” utility ctrl-a-p - switch ctrl-a-c - new ctrl-a-Q - remove freeze ctrl-a-s - freeze ctrl-a-S - split, but doesn;t work see also: using tmux

May 21, 2014 · SM!

Fixed "latex2png: error: eps2eps failed to translate .pdf to .eps" message in latex2rtf

OMG!! I finally fixed it. Under Windows latex2rtf diisplayed following error: latex2png: error: eps2eps failed to translate l2r_00123.pdf to l2r_00123.eps for each image in my latex file. That was very sad because this method is used to convert all equations, fugures and tables in word format. The configurations seemed ok: The problem was in eps2eps script in miktex. This script is magical. I haven’t completely understood why it does nothing when called from latex2rtf....

April 15, 2014 · SergeM

Papers review

Depth map EstimationAshutosh Saxena, Sung H. Chung, and Andrew Y. Ng “Learning Depth from Single Monocular Images” In Proc. NIPS, 2005 Depth estimation using machine learning from monocular cueues. Uses MRF model

April 14, 2014 · SergeM

German resources

http://www.c-plusplus.de/forum/ http://cvisioncentral.com/jobs/ Open positions in computer vision in german universities: http://hci.iwr.uni-heidelberg.de/Links/German_Vision/ Brox’s lab. Need at least one first authon in good conference http://lmb.informatik.uni-freiburg.de/jobs/OpeningERC_postdoc.html About salaries in German universities (TV L 13) http://de.wikipedia.org/wiki/Tarifvertrag_f%C3%BCr_den_%C3%B6ffentlichen_Dienst_der_L%C3%A4nder

April 6, 2014 · SergeM