Migrating from rtoodtoo.net to rtodto.net

I have recently changed the domain name of this blog from rtoodtoo.net to rtodto.net. My intention was to buy r2d2.net in the first place but very smart people bought it long time ago before me:) I couldn’t even find the r2d2.nl available. Now I think there isn’t much make sense to have such a long name on this blog. I have also set the web server side redirection. If you see any broken link or redirection loop etc, please do let me know.

Average, variance & standard deviation in Python

Here is a quick python script which calculates average, variance and standard deviation. This is also part of codeacademy work. I must say last time I worked with variance and standard deviation it was more than 10 years ago in statistics course. Hence a bit of reminder here for me too: (Some are from wikipedia and mathsisfun.com)

Average: In mathematics and statistics, it is called arithmetic mean according to wikipedia but simply it is the sum of a list of numbers divided by the number of numbers in the list.

Variance: The average of the squared differences from the mean. Here is the formula which we will use in our python code.

\displaystyle \sigma^2 = \frac{\displaystyle\sum_{i=1}^{n}(x_i - \mu)^2} {n}

Standard deviation: Square root of the variance is the standard deviation which just means how far we are from the normal(mean)

\displaystyle  \sigma = \sqrt{\frac{\displaystyle\sum_{i=1}^{n}(x_i - \mu)^2} {n}}

Now here is the code which calculates given the number of scores of students we calculate the average,variance and standard deviation.

Continue reading

htop an alternative to top command

Today I have stumbled across a system resource utilization tool htop which is way more visual than top and it is easier to use too. For example, following is from my single core amazon cloud centos server.
You can easily see that sorting is by CPU and if you want to change it, just press F6 and you get a new menu to choose as to which column you want to sort by. It is really cool!


PS: I have disabled my mail notifications for a while for minor posts as I don’t want to bother subscribers with my tiny posts.

a simple battleship python script

I have written a simple python game script to sink a battleship. It is very simple as it was almost a year ago last time when I wrote a long python script. Thanks to codeacademy that it helps to brush up my python skills. I think it is also good to put the script here for my documentation. Simply, you guess the coordinates of the point and by default you have maximum 4 turns to do it right. Each time a guess is run, coordinate is marked by “X”. Below is a sample execution:

Here is the code itself:

Continue reading

Fate of Rtoo

I have been asked several times if RtooDtoo.net will stay alive or not. I don’t have any plan to bring it down. On the contrary, I will continue to update the blog but I am quite busy in learning new technologies some of which I haven’t really worked with before. Another news is that, soon I will be in Santa Clara for around 2 weeks for which I am pretty excited actually as this will be my first US visit.
I am hoping that in a month or so I can start blogging once again!


All good things must come to an end!

As they say: “All good things must come to an end”, I have left Juniper Networks after I worked for 5 years as Technical Support Engineer. I still can’t believe that those 5 years passed so quickly. I have learned bunch of new technologies and it was a wonderful experience to work there. I will truly miss my colleagues at Amsterdam office and friendly atmosphere there too. It is also sad to say that I will no longer be working with SRX firewalls which also means I won’t write about SRX anymore. I still have some topics in my mind to write about but don’t know if I can get round to it. That was it! Now it is time to learn more new stuff.

Best wishes to all!