Skip to content

Instantly share code, notes, and snippets.

View anuragtangri's full-sized avatar
🎯
Focusing

Anurag Tangri anuragtangri

🎯
Focusing
  • Oracle
View GitHub Profile
@anuragtangri
anuragtangri / understanding-word-vectors.ipynb
Created November 7, 2021 18:30 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Q1 -
# Used a hash-map for adding the string and displaying the kth string.
mp={}
def add(s):
if s not in mp:
mp[s]=1
else: