<commit_before>import collections
import datetime
import urllib

import pytz

from pylons import c, g
from pylons.i18n import _, ungettext

from r2.lib import filters
from r2.lib.pages import (
    Reddit,
    UserTableItem,
    MediaEmbedBody,
    ModeratorPermissions,
)
from r2.lib.menus import NavMenu, NavButton
from r2.lib.template_helpers import add_sr
from r2.lib.memoize import memoize
from r2.lib.wrapped import Templated, Wrapped
from r2.models import Account, Subreddit, Link, NotFound, Listing, UserListing
from r2.lib.strings import strings
from r2.lib.utils import tup, fuzz_activity
from r2.lib.jsontemplates import (
    JsonTemplate,
    ObjectTemplate,
    ThingJsonTemplate,
)

from reddit_liveupdate.activity import ACTIVITY_FUZZING_THRESHOLD
from reddit_liveupdate.permissions import ReporterPermissionSet
from reddit_liveupdate.utils import pretty_time, pairwise


class LiveUpdatePage(Reddit):
    extension_handling = False
    extra_page_classes = ["liveupdate"]
    extra_stylesheets = Reddit.extra_stylesheets + ["liveupdate.less"]

    def __init__(self, content, websocket_url=None, **kwargs):
        extra_js_config = {
            "liveupdate_event": c.liveupdate_event._id,
            "liveupdate_pixel_domain": g.liveupdate_pixel_domain,
            "liveupdate_permissions": c.liveupdate_permissions,
            "media_domain": g.media_domain,
        }

        if websocket_url:
            extra_js_config["liveupdate_websocket"] = websocket_url

        title = c.liveupdate_event.title
        if c.liveupdate_event.state == "live":
            title = _("[live]") + " " + title

        Reddit.__init__(self,
            title=title,
            show_sidebar=False,
            content=content,
            extra_js_config=extra_js_config,
            **kwargs<commit_msg>Remove redundant body class.<commit_after>import collections
import datetime
import urllib

import pytz

from pylons import c, g
from pylons.i18n import _, ungettext

from r2.lib import filters
from r2.lib.pages import (
    Reddit,
    UserTableItem,
    MediaEmbedBody,
    ModeratorPermissions,
)
from r2.lib.menus import NavMenu, NavButton
from r2.lib.template_helpers import add_sr
from r2.lib.memoize import memoize
from r2.lib.wrapped import Templated, Wrapped
from r2.models import Account, Subreddit, Link, NotFound, Listing, UserListing
from r2.lib.strings import strings
from r2.lib.utils import tup, fuzz_activity
from r2.lib.jsontemplates import (
    JsonTemplate,
    ObjectTemplate,
    ThingJsonTemplate,
)

from reddit_liveupdate.activity import ACTIVITY_FUZZING_THRESHOLD
from reddit_liveupdate.permissions import ReporterPermissionSet
from reddit_liveupdate.utils import pretty_time, pairwise


class LiveUpdatePage(Reddit):
    extension_handling = False
    extra_page_classes = ["liveupdate-event"]
    extra_stylesheets = Reddit.extra_stylesheets + ["liveupdate.less"]

    def __init__(self, content, websocket_url=None, **kwargs):
        extra_js_config = {
            "liveupdate_event": c.liveupdate_event._id,
            "liveupdate_pixel_domain": g.liveupdate_pixel_domain,
            "liveupdate_permissions": c.liveupdate_permissions,
            "media_domain": g.media_domain,
        }

        if websocket_url:
            extra_js_config["liveupdate_websocket"] = websocket_url

        title = c.liveupdate_event.title
        if c.liveupdate_event.state == "live":
            title = _("[live]") + " " + title

        Reddit.__init__(self,
            title=title,
            show_sidebar=False,
            content=content,
            extra_js_config=extra_js_config,
            **kwargs
{'fraction_non_alphanumeric': 0.07555433889953463, 'fraction_numerical': 0.006569942513003011, 'mean_word_length': 3.4130434782608696, 'pattern_counts': {'":': 10, '<': 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': '2236542', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1101, 'n_words': 250}