from IPython.core.debugger import Tracer; debug_here = Tracer()
Wednesday, June 1, 2016
Matlab's keyboard command, but for IPython
Add the following to the preamble.
Then in code, you can call "debug_here()" where you'd use "keyboard" in Matlab.
Thursday, May 26, 2016
YouCompleteMe setup on remote Linux machine (vision)
.vimrc:
vundle link:
valloric/YouCompleteMe
compilation:
cd .vim/bundle/YouCompleteMe
./install.py --clang-completer
To avoid issue "HTTPConnectionPool(): Read timed out. (read timeout=0.5)", reported at: https://github.com/Valloric/YouCompleteMe/issues/777
change one line per: https://github.com/Valloric/YouCompleteMe/issues/777#issuecomment-42033173
vundle link:
valloric/YouCompleteMe
compilation:
cd .vim/bundle/YouCompleteMe
./install.py --clang-completer
To avoid issue "HTTPConnectionPool(): Read timed out. (read timeout=0.5)", reported at: https://github.com/Valloric/YouCompleteMe/issues/777
change one line per: https://github.com/Valloric/YouCompleteMe/issues/777#issuecomment-42033173
Wednesday, May 18, 2016
neovim from source
git clone https://github.com/neovim/neovim
cd neovim
rm -r build/
make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=<custom-install-location>"
make install
pip install --upgrade --force-reinstall neovim
Friday, May 13, 2016
Wednesday, May 11, 2016
Color differences between normal terminal and tmux terminal
In ~/.tmux.conf:
set -g default-terminal "screen-256color"
In .bashrc or .profile:
export TERM=xterm-256color
alias tmux ="TERM=xterm-256color tmux"
-------------------------------------------------------------------------
Updated: 5/11/16
Actually, everything works okay with just the change in ~/.tmux.conf...
I removed:
export TERM=xterm-256color from .bashrc
alias tmux="TERM=xterm-256color tmux" from .profile
Discovered this when trying to overcome the following problem created by running tmux in xterm-256color mode. Matlab in commandline mode inside tmux does not recognize home and end keys etc. Displays them as "[~1" etc. rather than moving the cursor.
set -g default-terminal "screen-256color"
In .bashrc or .profile:
export TERM=xterm-256color
alias tmux ="TERM=xterm-256color tmux"
-------------------------------------------------------------------------
Updated: 5/11/16
Actually, everything works okay with just the change in ~/.tmux.conf...
I removed:
export TERM=xterm-256color from .bashrc
alias tmux="TERM=xterm-256color tmux" from .profile
Discovered this when trying to overcome the following problem created by running tmux in xterm-256color mode. Matlab in commandline mode inside tmux does not recognize home and end keys etc. Displays them as "[~1" etc. rather than moving the cursor.
Switching between Latex compilers when using vim latex-suite
https://gist.github.com/dineshj1/8f0783ae5211c31a8aa6ea04a9664fa3
Use latexmk with pdflatex as the default compiler. Mapped to <leader><leader>
But now, use latexmk with xelatex as a compiler by using shortcut <leader>x.
Use latexmk with pdflatex as the default compiler. Mapped to <leader><leader>
But now, use latexmk with xelatex as a compiler by using shortcut <leader>x.
Monday, May 9, 2016
Viewing images on remote machine with X11 forwarding
gpicview: http://lxde.sourceforge.net/gpicview/
Easy to install:
./configure
make
make install
Then alias "imshow" to point to the gpicview binary.
After this:
$ imshow <imgfilename>
will display the image.
Easy to install:
./configure
make
make install
Then alias "imshow" to point to the gpicview binary.
After this:
$ imshow <imgfilename>
will display the image.
Subscribe to:
Posts (Atom)