Skip to content

Instantly share code, notes, and snippets.

View ahmetalsan's full-sized avatar
🎯
Focusing

Ahmet Alsan ahmetalsan

🎯
Focusing
View GitHub Profile
@ahmetalsan
ahmetalsan / cosine.py
Last active May 29, 2024 23:44
python cosine similarity algorithm between two strings
import re
import math
from collections import Counter
def get_cosine(vec1, vec2):
intersection = set(vec1.keys()) & set(vec2.keys())
numerator = sum([vec1[x] * vec2[x] for x in intersection])
sum1 = sum([vec1[x]**2 for x in vec1.keys()])
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 2, 2024 05:46
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k