Machine Learning for Computer and Cyber Security: Principle, Algorithms, and Practices