Skip to content

Instantly share code, notes, and snippets.

@kshefchek
Last active April 24, 2020 21:24
Show Gist options
  • Select an option

  • Save kshefchek/43e9d3eb42d7bed45f79404f7cbd75e8 to your computer and use it in GitHub Desktop.

Select an option

Save kshefchek/43e9d3eb42d7bed45f79404f7cbd75e8 to your computer and use it in GitHub Desktop.
A word cloud of my 7k gitter messages for Monarch Init from 2016-2019

A word cloud of my gitter messages for Monarch Init from 2016-2019

# Clone gitter-log (credit https://github.com/DoctorBud/gitter-log)
git clone https://github.com/kshefchek/gitter-log
npm install
npm run log

# Pull out my messages
cat mylog.json | jq '.[] | select(.fromUser.username == "kshefchek")' | jq -r .text >> gitter.txt

# Remove urls
sed -r -i 's/http\S+//g' gitter.txt

# https://amueller.github.io/word_cloud/
mkdir wordcloud
virtualenv venv -p /usr/bin/python3.6
source venv/bin/activate
pip install wordcloud
wget https://raw.githubusercontent.com/amueller/word_cloud/master/examples/simple.py

# Edit to point to gitter.txt, then
python3 simple.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment