Notes and exercises with nested sampling