<commit_before>import logging

from tw.api import Widget
from tg import expose, tmpl_context, require, request
from uuid import uuid4
from datetime import datetime
from repoze.what.predicates import not_anonymous

from moksha.lib.base import Controller
from moksha.lib.helpers import Category, MokshaApp, MokshaWidget
from moksha.api.widgets.feed import Feed
from moksha.api.widgets import ContextAwareWidget, Grid
from moksha.api.widgets.containers import DashboardContainer
from moksha.api.connectors import get_connector
from moksha.connector.utils import DateTimeDisplay

from fedoracommunity.widgets.expander import expander_js
from memberships import MembershipsController
from package_maintenance import PackageMaintenanceController

log = logging.getLogger(__name__)

class ProfileContainer(DashboardContainer, ContextAwareWidget):
    template='mako:fedoracommunity.mokshaapps.people.templates.peoplecontainer'
    layout = [Category('header-content-column-apps',
                       MokshaApp('', 'fedoracommunity.people/details',params=
                                 {"profile": True}
                                 ),
                       ),
              Category('right-content-column-apps',
                       (MokshaApp('Your Packages', 'fedoracommunity.packages/mypackages'),
                        MokshaApp('Alerts', 'fedoracommunity.alerts'),
                        MokshaWidget('Quick Links', 'fedoracommunity.quicklinks', auth=not_anonymous())),
                        default_child_css="panel",
                      ),
              Category('left-content-column-apps',
                       (MokshaApp('Your Group Memberships',
                                 'fedoracommunity.people/memberships/table',
                                 params={"rows_per_page": 5,
                                         "filters":{"profile": True}
                                        }
                                 ),
                        MokshaApp('Your Latest Blog Posts',
                                  'fedoracommunity.people/planet',
                                  auth=not_anonymous(),
                                  params={'user': None}),
                        MokshaApp('Your Packages', 'fedoracommunity.packages/mypackages',
                                 params={'view': 'canvas'})
                       ),
                      )]

class PeopleContainer(DashboardContainer, ContextAwareWidget):
    layout = [Category('header-content-column-apps',
                       MokshaApp('', 'fedoracommunity.people/details',
                                 params={'username':''})
                       ),
              Category('right-content-column-apps',
                        (MokshaApp('Packages', 'fedoracommunity.packages/userpackages',
                                  params={'username':''}),
                         MokshaApp('Alerts', 'fedoracommunity.alerts'),
                         MokshaWidget('Quick Links', 'fedoracommunity.quicklinks', auth=not_anonymous()))
                        ),
              Category('left-content-column-apps',
                       (MokshaApp('Group Memberships', 'fedoracommunity.people/memberships/table',
                                 params={"rows_per_page": 5,
                                         "filters":{"profile": False,
                                                    "username":''}
                                        }
                                 ),
                        MokshaApp('', 'fedoracommunity.people/planet',
                                  params={'username': None}),
                        MokshaApp('Packages', 'fedoracommunity.packages/userpackages',
                                 params={'view': 'canvas',
                                         'username': ''})
                        )
                       )]

class PeopleGrid(Grid, ContextAwareWidget):<commit_msg>Give our unauthed profile blog widget a title, even though it isn't dynamic, like the one in the mockup.<commit_after>import logging

from tw.api import Widget
from tg import expose, tmpl_context, require, request
from uuid import uuid4
from datetime import datetime
from repoze.what.predicates import not_anonymous

from moksha.lib.base import Controller
from moksha.lib.helpers import Category, MokshaApp, MokshaWidget
from moksha.api.widgets.feed import Feed
from moksha.api.widgets import ContextAwareWidget, Grid
from moksha.api.widgets.containers import DashboardContainer
from moksha.api.connectors import get_connector
from moksha.connector.utils import DateTimeDisplay

from fedoracommunity.widgets.expander import expander_js
from memberships import MembershipsController
from package_maintenance import PackageMaintenanceController

log = logging.getLogger(__name__)

class ProfileContainer(DashboardContainer, ContextAwareWidget):
    template='mako:fedoracommunity.mokshaapps.people.templates.peoplecontainer'
    layout = [Category('header-content-column-apps',
                       MokshaApp('', 'fedoracommunity.people/details',params=
                                 {"profile": True}
                                 ),
                       ),
              Category('right-content-column-apps',
                       (MokshaApp('Your Packages', 'fedoracommunity.packages/mypackages'),
                        MokshaApp('Alerts', 'fedoracommunity.alerts'),
                        MokshaWidget('Quick Links', 'fedoracommunity.quicklinks', auth=not_anonymous())),
                        default_child_css="panel",
                      ),
              Category('left-content-column-apps',
                       (MokshaApp('Your Group Memberships',
                                 'fedoracommunity.people/memberships/table',
                                 params={"rows_per_page": 5,
                                         "filters":{"profile": True}
                                        }
                                 ),
                        MokshaApp('Your Latest Blog Posts',
                                  'fedoracommunity.people/planet',
                                  auth=not_anonymous(),
                                  params={'user': None}),
                        MokshaApp('Your Packages', 'fedoracommunity.packages/mypackages',
                                 params={'view': 'canvas'})
                       ),
                      )]

class PeopleContainer(DashboardContainer, ContextAwareWidget):
    layout = [Category('header-content-column-apps',
                       MokshaApp('', 'fedoracommunity.people/details',
                                 params={'username':''})
                       ),
              Category('right-content-column-apps',
                        (MokshaApp('Packages', 'fedoracommunity.packages/userpackages',
                                  params={'username':''}),
                         MokshaApp('Alerts', 'fedoracommunity.alerts'),
                         MokshaWidget('Quick Links', 'fedoracommunity.quicklinks', auth=not_anonymous()))
                        ),
              Category('left-content-column-apps',
                       (MokshaApp('Group Memberships', 'fedoracommunity.people/memberships/table',
                                 params={"rows_per_page": 5,
                                         "filters":{"profile": False,
                                                    "username":''}
                                        }
                                 ),
                        MokshaApp('Latest Blog Posts',
                                  'fedoracommunity.people/planet',
                                  params={'username': None}),
                        MokshaApp('Packages', 'fedoracommunity.packages/userpackages',
                                 params={'view': 'canvas',
                                         'username': ''})
                        )
                       )]

class PeopleGrid(Grid, ContextAwareWidget):
{'fraction_non_alphanumeric': 0.09315068493150686, 'fraction_numerical': 0.0007471980074719801, 'mean_word_length': 1.4529627367135003, 'pattern_counts': {'":': 16, '<': 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': 45, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5212512', 'n_tokens_mistral': 1874, 'n_tokens_neox': 1818, 'n_words': 323}