Browse Source

Merge branch 'word_cloud' of vincent/ilfs-data into master

wordcloudtransparent
janwey 1 year ago
parent
commit
441b331c2b
3 changed files with 20 additions and 0 deletions
  1. 2
    0
      Makefile
  2. BIN
      graphics/word_cloud.png
  3. 18
    0
      word_cloud.py

+ 2
- 0
Makefile View File

@@ -0,0 +1,2 @@
img:
python word_cloud.py | wordcloud_cli.py --relative_scaling 0.6 --imagefile graphics/word_cloud.png --width=2000 --height=2000 --no_collocations

BIN
graphics/word_cloud.png View File


+ 18
- 0
word_cloud.py View File

@@ -0,0 +1,18 @@
import re
import random

def get_words_from_string(s):
return re.findall(re.compile('\w+'), s)

def scrambled(orig):
dest = orig[:]
random.shuffle(dest)
return dest

# This is mentions and hashtag from fediverse and twitter
text = "GNU GNU GNU GNU GNU GNU Ring Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian AFWall+ AFWall+ StreetComplete StreetComplete Replicant Perlanet Perlanet Shaarli Shaarli FramaSoft FramaSoft FramaSoft FramaSoft FramaSoft FramaSoft FramaSoft FramaSoft FramaSoft Nextcloud Nextcloud Nextcloud Nextcloud Nextcloud Mastodon Mastodon Python Python RPM OpensourceDesign OpensourceDesign OpensourceDesign OpensourceDesign OpensourceDesign OpensourceDesign OpensourceDesign Diaspora GNUsocial VLC VLC VLC VLC VLC VLC VLC VLC VLC Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE AntennaPod AntennaPod ArchLinux ArchLinux ArchLinux ArchLinux Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu RedHat RedHat RedHat OpenOffice Audacity Blender Blender Blender Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox AstroidMail AstroidMail AstroidMail AstroidMail BudgieDesktop FreeDOS PHP PHP PHP PHP PHP Docker VirtualBox BSD TexLaTeX Kalzium Plone Gentoo LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice LibreOffice OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE OpenSUSE Mutt Anki Unity Xtext Rstats OJS gvSIG gvSIG gvSIG Scribus Inkscape Kubuntu Wordpress Wordpress Wordpress LineageOS LineageOS Volumio SnapCraft RustLang GNOME GNOME GNOME 0A.D. Mozilla Canonical Thunderbird Thunderbird Wire NodeJS GIMP GIMP Symfony RocketChat Solus Solus Ubports Ubports Wallabag Kodi FreeBSD Signal KeePassX Transportr ElementaryOS UbuntuMate GoLang Typo3 TOR OpenStreetMap CentOS CentOS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS"

words_scramnbled = scrambled(get_words_from_string(text))
words_scramnbled = ' '.join(words_scramnbled)

print(words_scramnbled)

Loading…
Cancel
Save