<commit_before>defmodule Tilex.PostController do
  use Tilex.Web, :controller

  @slack_notifier Application.get_env(:tilex, :slack_notifier)
  @twitter_notifier Application.get_env(:tilex, :twitter_notifier)

  plug :load_channels when action in [:new, :create]

  plug Guardian.Plug.EnsureAuthenticated, [handler: __MODULE__] when action in [:new, :create]

  def unauthenticated(conn, _) do
    conn
    |> put_status(302)
    |> put_flash(:info, "Authentication required")
    |> redirect(to: "/")
  end

  alias Tilex.{Post, Channel}

  def index(conn, params) do
    page = Map.get(params, "page", "1") |> String.to_integer
    posts = Tilex.Posts.all(page)
    render(conn, "index.html", posts: posts, page: page)
  end

  def show(conn, %{"titled_slug" => titled_slug}) do<commit_msg>Remove unused module attributes from PostController<commit_after>defmodule Tilex.PostController do
  use Tilex.Web, :controller

  plug :load_channels when action in [:new, :create]

  plug Guardian.Plug.EnsureAuthenticated, [handler: __MODULE__] when action in [:new, :create]

  def unauthenticated(conn, _) do
    conn
    |> put_status(302)
    |> put_flash(:info, "Authentication required")
    |> redirect(to: "/")
  end

  alias Tilex.{Post, Channel}

  def index(conn, params) do
    page = Map.get(params, "page", "1") |> String.to_integer
    posts = Tilex.Posts.all(page)
    render(conn, "index.html", posts: posts, page: page)
  end

  def show(conn, %{"titled_slug" => titled_slug}) do
{'fraction_non_alphanumeric': 0.13279678068410464, 'fraction_numerical': 0.0053655264922870555, 'mean_word_length': 4.386281588447654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6941128', 'n_tokens_mistral': 534, 'n_tokens_neox': 508, 'n_words': 126}