Python App to perform ICP alignment finally out

Raptor: Python ICP with VTK and WX PythonBefore reading further, if you haven’t seen the demo yet, please visit this page. Go now! there’s a Raptor waiting for you. Done that.. good..

As everybody and everything is in github now a days, so have posted the code in github at this url. PythonICPvtk Check it out.

Work in progress and will try to update it soon. Have lots of todo’s for this code.

Go have a look, just 470+ odd lines of python code including comments and you will find the Raptors too!!

Mera Bharat Hai Mahaan

Well its election season in india and here’s a video that stumbled into my twitter feed.

Liked it and here you go!!

Books So far in 2014

books to read in 2014A quarter of the year is already over. Time flies away so quickly.. So here’s the list of books I have read so far in 2014.

This year going slow with the books and there are couple of repeats from previous years.

Reading List for 2014
1. How to fail at almost everything and still win big by Scott Adams
2. Switch by Chip and Dan Heath
3. Smarter – The new science of brain power by Dan Hurley
4. What the most successful people do in the morning by Laura Vanderkam
5. How will you measure your life by Clayton M Christensen
6. The 4 hour body by Timothy Ferris
7. Brilliant Blunders: From Darwin to Einstein by Mario Livio
8. Money – The Unauthorised Biography by Felix Martin
9. Do the Work – by Steven Pressfield
10. The Secrets of happy families by Bruce Feiler
11. Why people believe weird things by Michael Shermer
12. Sleeping With Your Smart Phone by Leslie A Perlow
13. The Borderlands of Science -Michael Shermer
14. Linchpin by Seth Godin

So far, Brilliant Blunders, Switch and How to fail at everything are my top favorites!

So what are you reading?

3 Simple Steps to fix ipython notebook error on MAC OS X

ipython notebook debuggingI thought I did something stupid to my installation of python on mac and python notebook stopped working. ipython works but ipython notebook went haywire.

Tried reinstalling python but the problem remained. Everytime got this error when ipython notebook was invoked.

return _parse_localename(localename)
File "/Users/millerc/anaconda/lib/python2.7/", line 435, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Today, the lazy me corrected the problem with help from this post. It turns out the error occurs after installing the latest Mac OSX 64-bit python.

Fortunately the solution is simple. Follow the 3 simple solution steps

Step 1
open your .bash_profile

Step 2
Add these lines to your .bash_profile:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

Step 3
Reloaded the profile:

source ~/.bash_profile

Now run ipython notebook

ipython notebook


Knight in Fortran

Knight Move Game in Fortran 90
This is a brain game that you might enjoy. In the chess board you can move the knight as if you’re playing a regular game of chess, but you need to cover the whole board with the least possible moves, a good score would be 65 moves or less. This is a very good training for strategy games.

Written in fortran. Just for fun!! As always work in progress..

Continue reading

Few examples of Matlab to Python conversions

Matlab to PythonA few days back, was converting a matlab code to python. Out of habit , I kept going back to matlab syntax. I logged all places that I made these errors.

So here are the notes. Hope its of some use.

1. () to []


SyntaxError: can’t assign to function call


2. 1 to 0


IndexError: index (2) out of range (0<=index<2) in dimension 1


3. zeros to zeros


the correct form


4. array to array

D=G*[1 0; 0 1];    

in python

D_ps=G* np.array([[1.0,0.0],[0.0,1.0]])

5. % to #

% is comments in matlab
# is comments inpython

6. For to for

for i=1:nnel


for i in range(nnel): 

7. Matlab find to python find

L1 = find(coordinates(:,2)==min(coordinates(:,2))) 

in python

l1 = np.where(coords[:,1]==np.min(coords[:,1])

Gas turbine technology

Found this excellent but old material on Rolls-Royce’s website. Ideal for anyone interested in brief text on introduction to jet engine…


Get every new post delivered to your Inbox.

Join 933 other followers

%d bloggers like this: