cosine_similarity function

Cosine similarity/distance between two vectors.