Assorted code and statistical models