Collecting, Analyzing and Presenting data about the participation in #ilovefs day

word_cloud.py 3.6KB

123456789101112131415161718192021222324
  1. ################################################################################
  2. # Copyright (c) 2018 Free Software Foundation Europe e.V. <contact@fsfe.org>
  3. # Author 2018 Vincent Lequertier <vincent@fsfe.org>
  4. # SPDX-License-Identifier: GPL-3.0
  5. ################################################################################
  6. import re
  7. import random
  8. def get_words_from_string(s):
  9. return re.findall(re.compile('\w+'), s)
  10. def scrambled(orig):
  11. dest = orig[:]
  12. random.shuffle(dest)
  13. return dest
  14. # This is mentions and hashtag from fediverse and twitter
  15. text = "BudgieDesktop FreeDos AFWall AFWall WestNordOst WestNordOst OpenStreetMap OpenStreetMap OpenStreetMap Docker Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu Ubuntu Virtualbox PHP PHP PHP PHP PHP PHP Perlanet Perlanet Shaarli Shaarli Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft Framasoft BSD KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE KDE Fdroid Fdroid Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Linux Kalzium GNU GNU GNU GNU GNU GNU Python Python Plone Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Firefox Gentoo LibreOffice LibreOffice LibreOffice 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 OpenSUSE Mutt VLC VLC VLC VLC VLC VLC VLC VLC VLC VLC VLC Anki Unity Thunderbird Thunderbird Thunderbird Thunderbird Xtext RedHat RedHat RedHat Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Debian Rproject OpenOffice OpenOffice Audacity Audacity Audacity Blender Blender Blender Blender AstroidMail AstroidMail AstroidMail AstroidMail OJS Ring Replicant Nextcloud Nextcloud Nextcloud Nextcloud Nextcloud Nextcloud Mastodon RPM Diaspora Archlinux Archlinux Archlinux AntennaPod AntennaPod AntennaPod CentOS CentOS Scribus Scribus Scribus Inkscape GIMP GIMP GIMP GIMP GIMP SUSE Canonical Fedora Fedora Fedora Fedora Fedora ElementaryOS GNUmax Xubuntu Kubuntu Kubuntu WordPress WordPress WordPress UBPorts UBPorts jspwiki Wallabag Antergos LineageOS LineageOS Volumio Kodi MediathekView Signal Signal Signal Gvsig Gvsig Gvsig Gvsig Gvsig Emacs UbuntuMate FreeBSD SnapCraft TOR TOR Go Rust Rust GNOME GNOME GNOME GNOME GNOME Typo3 MariaDB 0AD StandardNotes GNUcash OpenBuildService Mozilla Wire KeePassX NodeJS Shutter Eclipse OSMand Syncthing Transportr OpenMensa Twidere Weechat RocketChat 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 ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS ILoveFS"
  16. words_scramnbled = scrambled(get_words_from_string(text))
  17. words_scramnbled = ' '.join(words_scramnbled)
  18. print(words_scramnbled)