python and R code