<commit_before>{{ response.title = "User Profile"
from pprint import pprint

left_sidebar_enabled,right_sidebar_enabled=False,False

# The incoming view_dict will contain these special properties:
#   userid: from the query-string, or from the logged-in user
#   user_info: JSON response fetched from GitHub User API, or
#   error_msg: INSTEAD of user_info, if unable to fetch it
#   opentree_activity: None, or a dict with one or more of
#       comments: a count, perhaps more information, or None?
#       collections: list or None?
#       studies: a count, roles played, or None?
#   is_current_user_profile: True if the current user is the profiled curator

response.title = "User profile"
if active_user_found:
    subtitle_markup = '%s <a style="font-weight: normal; font-size: 0.75em;" href="%s" target="_blank" title="Open GitHub profile in a new window"><img style="width:16px; height:16px; margin-right: 3px;" src="%s" />%s</a>' % (
            user_info.get('name', user_info.get('login', '???')), 
            user_info.get('html_url'), 
            URL('static','images/GitHub-Mark-32px.png'),
            user_info.get('login'),
        )
    if is_current_user_profile:
        subtitle_markup += XML("""
        &nbsp; <button class="btn btn-info btn-mini" <commit_msg>Explain curator's corresponding GitHub login.<commit_after>{{ response.title = "User Profile"
from pprint import pprint

left_sidebar_enabled,right_sidebar_enabled=False,False

# The incoming view_dict will contain these special properties:
#   userid: from the query-string, or from the logged-in user
#   user_info: JSON response fetched from GitHub User API, or
#   error_msg: INSTEAD of user_info, if unable to fetch it
#   opentree_activity: None, or a dict with one or more of
#       comments: a count, perhaps more information, or None?
#       collections: list or None?
#       studies: a count, roles played, or None?
#   is_current_user_profile: True if the current user is the profiled curator

response.title = "User profile"
if active_user_found:
subtitle_markup = """%s<span style="font-weight: normal; font-size: 0.7em;">
                        (<a href="%s" target="_blank" 
                           title="Open GitHub profile in a new window" 
                           >%s <span style="color: #333;">on GitHub</span></a>)</span>""" % (
            user_info.get('name', user_info.get('login', '???')), 
            user_info.get('html_url'), 
            user_info.get('login'),
        )
    if is_current_user_profile:
        subtitle_markup += XML("""
        &nbsp; <button class="btn btn-info btn-mini" 
{'fraction_non_alphanumeric': 0.11641221374045801, 'fraction_numerical': 0.0057251908396946565, 'mean_word_length': 3.2826797385620914, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, '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': '1537686', 'n_tokens_mistral': 812, 'n_tokens_neox': 780, 'n_words': 250}