<commit_before><commit_msg>libpanel-applet: Add test applet in python<commit_after>#!/usr/bin/env python

from gi.repository import Gtk
from gi.repository import PanelApplet

def applet_fill(applet):
    label = Gtk.Label("My applet in Python")
    applet.add(label)
    applet.show_all()

def applet_factory(applet, iid, data):
    if iid != "TestApplet":
       return False

    applet_fill(applet)

    return True

PanelApplet.Applet.factory_main("TestAppletFactory",
                                PanelApplet.Applet.__gtype__,
                                applet_factory, None)
{'fraction_non_alphanumeric': 0.09013605442176871, 'fraction_numerical': 0.0, 'mean_word_length': 2.7756410256410255, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5918814', 'n_tokens_mistral': 188, 'n_tokens_neox': 182, 'n_words': 40}