Found this interesting video on Youtube. Grab a hot cup of coffee and enjoy, but before that, see if you can solve this puzzle?
Few words collected over August.
- If you’re not prepared to change your diet or your workouts, don’t get on the scale. – Seth Godin
- Don’t be the head of the hospital; be the nurse who doctors ask for and patients trust. – Anon
- It does not suffice to hone your own intellect (that will join you in your grave), you must teach others how to hone theirs. -E.W. Dijkstra
- If you treat the work as nothing but an obligation, you will soon be overwhelmed by competition that sees it as a privilege and a calling. –SG
- Next to love friendship, in my opinion, is the most valuable thing life has to offer -Henry Miller
- All men’s miseries derive from not being able to sit in a quiet room alone.-Pascal
- Don’t do anything in life where, if somebody asks you the reason why you are doing it, the answer is “Everybody else is doing it.” I mean, if you cancel that as a rationale for doing an activity in life, you’ll live a better life whether it’s in the stock market or any place else. – Warren Buffett
- Despite what anyone might tell you, words and ideas can change the world.”
- The people who are good in the long run fail a lot, especially at the beginning. So, when you fail early, it might be worth realizing that this is part of the deal, the price you pay for being good in the long run. – Seth Godin
- It is more reliable to judge people by analyzing their abilities than by glancing at the scoreboard. Or as Bernoulli put it, “One should not appraise human action on the basis of its results.”
- You will “fail” a million times but the “failing” and starting over is succeeding. – Dan Harris
- Marketing used to be what you say Now, marketing is what you do. What you make. How you act. The choices you make when you are sure no one is looking. –Seth Godin
- ‘It is easier to build two chimneys, than to keep one in fuel,’ -Anon
- “He that has once done you a kindness will be more ready to do you another than he whom you yourself have obliged.” – Benjamin Franklin
- Science is the belief in the ignorance of experts. -Richard Feynman
- Don’t ever make the mistake [of thinking] that you can design something better than what you get from ruthless massively parallel trial-and-error with a feedback cycle. That’s giving your intelligence much too much credit. -Linus Torvalds
- Never do anything that bores you. -James D. Watson
- It’s not that I’m so smart, it’s just that I stay with problems longer -Albert Einstein
In this free webinar, Dr. Charles Roche of Pratt & Whitney will outline how algorithms can be used to weigh design decisions. The results have led to design ideas that changed the industry.
Dr Roche will draw on case studies such as how Boeing scrapped thrust reversers in their KC-46 and how Embraer selected their engine for the E-Jet E2.
Inspired by this post “Map Your Google Location History”, I re-mashed the excellent tutorial and added a new function to view google location history on a 3D globe.
Basemap is cool but VTK visualisation toolkit is cooler. Check the results.
And here’s the python notebook to generate the above result.
Cool isn’t it?
In the theory of stochastic processes, the Karhunen–Loève theorem (named after Kari Karhunen and Michel Loève), also known as the Kosambi–Karhunen–Loève theorem is a representation of a stochastic process as an infinite linear combination of orthogonal functions, analogous to a Fourier series representation of a function on a bounded interval.
Here’s an exercise I did a week back to understand it better.
import numpy as np
def KLT(a): """ Returns Karhunen Loeve Transform of the input and the transformation matrix and eigenval Ex: import numpy as np a = np.array([[1,2,4],[2,3,10]]) kk,m = KLT(a) print kk print m # to check, the following should return the original a print np.dot(kk.T,m).T """ val,vec = np.linalg.eig(np.cov(a)) klt = np.dot(vec,a) return klt,vec,val
a = np.array([[1,2,4],[2,3,10]]) print a,a.shape
[[ 1 2 4] [ 2 3 10]] (2, 3)
kk,m,val = KLT(a)
print kk print m print np.dot(kk.T,m).T print val
[[-1.59602949 -2.86686851 -7.03449892] [-1.56610659 -2.18656465 -8.15572344]] [[-0.94564854 -0.32519048] [ 0.32519048 -0.94564854]] [[ 1. 2. 4.] [ 2. 3. 10.]] [ 0.09810743 21.23522591]
a= np.random.rand(20,5)*100 kk,m,val = KLT(a) print val
[ 6.03748782e+03 +0.00000000e+00j 5.36177007e+03 +0.00000000e+00j 3.94526413e+03 +0.00000000e+00j 2.80078918e+03 +0.00000000e+00j -2.80723774e-13 +2.73566185e-13j -2.80723774e-13 -2.73566185e-13j 3.15308859e-13 +2.18787274e-13j 3.15308859e-13 -2.18787274e-13j -3.21526974e-13 +3.59336478e-14j -3.21526974e-13 -3.59336478e-14j 4.10392909e-13 +0.00000000e+00j 3.28554436e-13 +0.00000000e+00j 1.93536473e-13 +8.16943559e-14j 1.93536473e-13 -8.16943559e-14j -1.00036413e-13 +1.08479990e-13j -1.00036413e-13 -1.08479990e-13j 5.89399042e-14 +0.00000000e+00j -1.01830548e-13 +0.00000000e+00j -3.35517071e-14 +5.19296828e-14j -3.35517071e-14 -5.19296828e-14j]
[ -19.88571370 +5.78613631j -26.92980925 +1.1405507j -71.38367367+16.51826228j 41.42575279 +1.77169163j 24.74718060 +7.73570152j 79.94127422 -8.9347779j -16.92612673-11.09979081j -21.37461321 +2.7563032j 7.03333553-10.45710615j 46.62805945+18.89607343j 4.58608380 -5.40369704j 146.04910424 +0.5710281j -22.22228105 -2.42342784j -16.60076029 -6.5282612j -38.29552191 +9.07952442j -6.48539692 +8.84928717j -99.68353378 +9.9974666j -65.96782860 -7.75414299j -10.08531081-25.27053509j -101.15451537 -1.9404897j ]
a=np.array([[0, 0, 1], [0, 1, 1]]) kk,m,val = KLT(a)
[[ 0.00000000e+00 -7.07106781e-01 -1.11022302e-16] [ 0.00000000e+00 7.07106781e-01 1.41421356e+00]]
[[ 0.70710678 -0.70710678] [ 0.70710678 0.70710678]]
[ 0.5 0.16666667]
Looking at Voronoi with python, someone remarked it’s complicated. Well here’s the simplified version without any GUI or pluff.
4 simple lines to get the above voronoi diagram..
from scipy.spatial import voronoi_plot_2d,Voronoi data = np.random.rand(50,2) var = Voronoi(data) voronoi_plot_2d(var)
Do you know, voronoi has wide applications and can be used to determine optimum locations for cell phone towers.