Code from http://scikit-learn.org/stable/auto_examples/decomposition/plot_ica_blind_source_separation.html.