Category Archives: commands

These are useful linux commands that I have found while doing stuff. Putting them here so I don’t forget.

R: Efficient data loading

I’m working with the HOG_01 directory from this dataset.  They have organized so that each data point is a 1568 line text file.  The data sets are also separated in 43 types.  Unzip the data and you will see what … Continue reading

Posted in commands, PhD, R | Leave a comment

R : Finding the ordering index vector

The ordering index vector is a vector that contains indices of another vector.  It’s basically the other vector, but ordered (decreasing or increasing).  Instead of having the values it has the indices :)  I spent close to an hour to … Continue reading

Posted in commands, R | 3 Comments

Curious rounding in R

Sometimes R has a misleading way of displaying values.  Check out this series of commands: > 1111+.5 [1] 1111.5 > 11111+.5 [1] 11111.5 > 111111+.5 [1] 111111.5 > 1111111+.5 [1] 1111112 > 11111111+.5 [1] 11111112 At first I thought that … Continue reading

Posted in commands, PhD, R | Leave a comment

Adjusting point size in R plots.

The trick here is to manage the pch and cex arguments in the plot function.  You can look at more information on these arguments in ?plot, ?par and ?points in the R environment (search for cex and pch).  In general … Continue reading

Posted in commands, R | 2 Comments

How to output an eps figure in R

If you are executing a plot command in a R script it should default to generating a pdf document with your plot.  This is really cool because you don’t really have to think about how to show what you have … Continue reading

Posted in commands, PhD, R | Leave a comment

Sending mail from the console is cool! ssmtp with gmail.

Quick Cheat-sheet on configuring ssmtp on my machine.  This is really cool for me because it enables me to send git patches from console.  I confess, I like the console. yum install ssmtp -y cat << EOF > root=postmaster mailhub=smtp.gmail.com:587 … Continue reading

Posted in commands | Leave a comment

The convert command. Nice!

I’ve actually used this command before but today I was pleasantly surprised.  I had used it in the past to change from one image format to another.  It’s actually very straight forward and it helps a bunch when you just … Continue reading

Posted in commands | Leave a comment

gmail: filter attachment names and auto responses

Searching for a way to better the current way of receiving assignments (We should probably be using something like egroupware for universities, one can dream) I stumbled upon some nifty tricks to make life that much easier. The issue came … Continue reading

Posted in commands | Leave a comment

Convert 3gp to AVI

Took some video with my phone (HTC hero) and it ended up being encoded in 3gp.  When I went to use it with my opencv code: BUM!!!! it exploded.  So I chose to change from 3gp to AVI, which I … Continue reading

Posted in commands | Leave a comment