Small Python and R scripts for PLS