Monday, August 1, 2016

Magic fix for GPU issues in Tensorflow

E tensorflow/stream_executor/cuda/cuda_driver.cc:491] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:185] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program

I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:347] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module  367.35  Mon Jul 11 23:14:21 PDT 2016
GCC version:  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] kernel reported version is: 367.35.0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:81] No GPU devices available on machine.

This error can be fixed by

sudo apt-get install nvidia-modprobe



See issue https://github.com/tensorflow/tensorflow/issues/394

Friday, June 17, 2016

Screen bindings to start paned session and rebind pane focus

Put the following lines in ~/.screenrc

bind j focus down                                                            
bind k focus up                                                              
bind l focus right                                                          
bind h focus left                                                            
                                                                                 
layout new                                                                    
split -v                                                                      
screen 0                                                                      
focus right                                                                  
split                                                                        
screen 1                                                                      
focus down

Wednesday, May 18, 2016

SOCKS proxy with chrome and SSH

In the particular case of an ssh proxy running, connected to something like ssh -D 4321 blah.com

google-chrome --proxy-server="socks5://127.0.0.1:4321" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE 127.0.0.1"

OSX

 /Applications/Google\ Chrome.app/Contents/MacOSogle\ Chrome --proxy-server="socks5://127.0.0.1:4321" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE 127.0.0.1"

Friday, March 25, 2016

Skype on Ubuntu 14.04

sudo dpkg --add-architecture i386
sudo sh -c "echo 'deb http://archive.canonical.com/ trusty partner' >> /etc/apt/sources.list.d/canonical_partner.list"
sudo apt-get update
sudo apt-get install skype
LD_PRELOAD=/usr/lib/i386-linux-gnu/mesa/libGL.so.1 skype

Friday, March 18, 2016

Install xvfb Ubuntu

sudo apt-get install xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps

xvfb-run app

 xvfb-run -a python get_lyrics.py http://lyrics.wikia.com/wiki/Des%27ree:Save_Me

 xvfb-run -a -e /dev/stdout python -u get_lyrics.py http://lyrics.wikia.com/wiki/Des%27ree:Save_Me 2>&1

Wednesday, March 16, 2016

Install MATLAB Ubuntu 14.04

sudo apt-get install libxtst6:i386
sudo apt-get install lib32z1
sudo apt-get install gcc-multilib

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

sudo apt-get install libxtst6:i386 libXext6:i386 libxi6:i386 libncurses5:i386 libxt6:i386 libxpm4:i386 libxmu6:i386 libxp6:i386 lib32stdc++6

Edit /etc/udev/rules.d/70-persistent-net.rules and change the name to eth0

Wednesday, February 24, 2016

Install headless bittorrent client

apt-get source bittornado 
 
I set up aliases to btdownloadcurses.py and btdownloadmany.py
 
 
btdownloadcurses --max_uploads 4 --max_upload_rate 32 to_be_downloaded.torrent
 
btdownloadmany --max_uploads 4 --max_upload_rate 32 .
 
  
where . is a directory full of torrent files.