<jupyter_start><jupyter_text>🚀 Activity Summary ✅ Activity in the Last Week<jupyter_code>repo_names = ["All"] + sorted(weekly_df["repo_name"].unique().tolist())


@interact
def view_weekly_summmary(
    repo=repo_names,
    sort=sort_columns,
    sort_ascending=False,
    assigned=False,
    created=False,
    issues=False,
    pull_requests=False,
):
    if sort != "repo_name":
        columns_to_print = cols_to_print + [sort]
    else:
        columns_to_print = cols_to_print

    if repo == "All":
        filtered = weekly_df.sort_values(sort, ascending=sort_ascending)
    else:
        filtered = weekly_df.loc[monthly_df["repo_name"] == repo].sort_values(
            sort, ascending=sort_ascending
        )

    if assigned and (not created):
        # Only show tickets that I was assigned to
        cond = [
            filter_name.startswith("assigned") for filter_name in weekly_df["filter"]
        ]
        filtered = filtered[cond]
    elif (not assigned) and created:
        # Only show tickets that I created
        cond = [
            filter_name.startswith("created") for filter_name in weekly_df["filter"]
        ]
        filtered = filtered[cond]
    else:
        # No change. Show everything.
        pass

    if issues and (not pull_requests):
        filtered = filtered[filtered["pull_request"] == False]
    elif (not issues) and pull_requests:
        filtered = filtered[filtered["pull_request"] == True]
    else:
        # No change. Show everything.
        pass

    print(f"Total: {len(filtered[columns_to_print])}")
    display(HTML(filtered[columns_to_print].to_html(escape=False)))<jupyter_output><empty_output><jupyter_text>📮 Closed in the Last Month<jupyter_code>repo_names = ["All"] + sorted(monthly_df["repo_name"].unique().tolist())


@interact
def view_monthly_summmary(
    repo=repo_names,
    sort=sort_columns,
    sort_ascending=False,
    assigned=False,
    created=False,
    issues=False,
    pull_requests=False,
):
    if sort != "repo_name":
        columns_to_print = cols_to_print + [sort]
    else:
        columns_to_print = cols_to_print

    if repo == "All":
        filtered = monthly_df.sort_values(sort, ascending=sort_ascending)
    else:
        filtered = monthly_df.loc[monthly_df["repo_name"] == repo].sort_values(
            sort, ascending=sort_ascending
        )

    if assigned and (not created):
        # Only show tickets that I was assigned to
        cond = [
            filter_name.startswith("assigned") for filter_name in monthly_df["filter"]
        ]
        filtered = filtered[cond]
    elif (not assigned) and created:
        # Only show tickets that I created
        cond = [
            filter_name.startswith("created") for filter_name in monthly_df["filter"]
        ]
        filtered = filtered[cond]
    else:
        # No change. Show everything.
        pass

    if issues and (not pull_requests):
        filtered = filtered[filtered["pull_request"] == False]
    elif (not issues) and pull_requests:
        filtered = filtered[filtered["pull_request"] == True]
    else:
        # No change. Show everything.
        pass

    print(f"Total: {len(filtered[columns_to_print])}")
    display(HTML(filtered[columns_to_print].to_html(escape=False)))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10652503793626707, 'fraction_numerical': 0.0, 'mean_word_length': 2.9144893111638956, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 9, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '147552', 'license': 'MIT', 'n_tokens_mistral': 1017, 'n_tokens_neox': 1000, 'n_words': 222, 'path': 'past-activity-summary.ipynb', 'repo_name': 'sgibson91/github-activity-dashboard', 'size': '3295'}