Various codes in Octave, Python, R