Solutions in julia and latex for "Learning from data"