some code snippets about machinelearning