Tuesday, October 20, 2015

git commit error due to large files

I couldn't commit apparently because something was cashed. I found this workaround
git stash save --keep-index
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch  path2file' 

Friday, October 16, 2015

Recently I had an issue with updating my log file and csv file from python when working on a cluster. Even though I waited for a long time the files were not being updated only when the script finished. In order to fix this I researched what other people have done. By flushing every so often the files will update. This solution worked for me. Hopefully it will work for you


import csv
import sys
csvfile = open('results/test.csv','wb')\
csvout = csv.writer(csvfile,delimiter=',',quotechar='"')
sys.stdout = open('results/log.txt','w')
for it in xrange(max_iters): # rest of the program csvout.writerow(['test1','test2']) csvfile.flush() sys.stdout.flush()

Thursday, September 10, 2015

startx timeout in locking authority file

I found this solution in one of the forums: I pretty much copied and paste the solution here
check
ls -l ~/.Xauthority
It should be owned by you. If not, run
 sudo chown user ~/.Xauthority 
where user is your username
Then, run
 chmod u+rw ~/.Xauthority
startx

Monday, January 12, 2015

Error compiling MatConvNet in Ubuntu

I realized that compiling MatConvNet in Ubuntu is better to do it from the linux shell as supposed to from matlab. From matlab I would get this message after following the instructions:

vl_compilenn: CUDA: MEX config file: '.../matconvnet/matlab/src/config/mex_CUDA_glnxa64.sh'
gcc-4.4: No such file or directory

However, after compiling from the bash shell the tests would all pass.

This was my command from the command

make ENABLE_GPU=y ARCH=glnxa64 MATLABROOT=/usr/local/MATLAB/R2014a/ CUDAROOT=/usr/local/cuda-5.5/

Friday, October 10, 2014

tune2fs: Bad magic number in super-block while trying to open ... Couldn't find valid filesystem superblock

I was getting this error because I was using it on a exFat ssd hard drive which is used for windows and linux compatibility. If you want to change the label use instead exfatlabel. for instance


sudo exfatlabel /dev/sdb1 ssd

(If exfatlabel is not installed on your system you just need to do: 
 sudo apt-get install exfat-util)

you can also use sudo fdsik -l to see your hard drives and know which one you need to rename. And use  sudo blkid /dev/sdb1 for instance to know what kind of file system you have if you have ntfs you might need to do for instance.

sudo ntfslabel /dev/sdb2 hd1 

Tuesday, September 16, 2014

unable to open caffe_rcnn_imagenet_model or rcnn_imagenet_deploy.prototxt

If you are getting the above errors you need to change the arguments to

--pretrained_model=../examples/imagenet/caffe_rcnn_imagenet_model
--model_def=../examples/imagenet/rcnn_imagenet_deploy.prototxt

Monday, September 15, 2014

./include/caffe/data_layers.hpp:11:18: fatal error: lmdb.h: No such file or directory compilation terminated.

If you get this error when you run make all for caffe. It is possible that you are missing dependencies. To install missing lmdb dependencies 

git clone git://gitorious.org/mdb/mdb.git
cd mdb/libraries/liblmdb
make
sudo make install