<commit_before>{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Meetings where

--import Data.Aeson
import Data.Default
import qualified Data.Text as T
import Data.Thyme
import Data.Thyme.Format
import Data.Thyme.Time
import System.Locale

newtype Room = Room String deriving (Eq, Ord)

data Meeting a = Meeting {
    name :: T.Text
  , speaker :: T.Text
  , dateTime :: a
  , room :: Room
  , description :: T.Text
  , slidesUrl :: Maybe T.Text
  } deriving (Show, Eq, Functor)

meetingAt :: String -> LocalTime
meetingAt time = readTime defaultTimeLocale "%Y-%m-%d %H:%M" time

upcomingEvents :: [Meeting LocalTime]
upcomingEvents =
  [ Meeting
      "This Meeting Happened"
      "<NAME>"
      (meetingAt "2016-04-20 17:30")
      def
      "This meeting already happened and should not appear."
      Nothing
  , Meeting
      "Configuration Driven Development"
      "<NAME>"
      (meetingAt "2016-04-29 12:30")
      def
      "YSU Mathematics and Computer Science student <NAME> will discuss \
      \techniques for dealing with safer, more descriptive configuration files \
      \that allow for better end-user customization of programs."
      (Just "/static/foo.pdf")
  , Meeting
      "An Introduction to Doing Things"
      "<NAME>"
      (meetingAt "2016-05-13 17:30")
      def
      "Learn how to do a mix of things and stuff in this talk by Computer \
      \Information Systems student <NAME>."
      Nothing
  ]

instance Default Room where
  def = Room "Meshel 337"

instance Show Room where
  show (Room r) = r

instance Ord (Meeting LocalTime) where
  compare a b = compare (dateTime a) (dateTime b)

data MeetingStatus = Happened | Upcoming deriving Eq<commit_msg>Move upcomingEvents up to the top of Meeetings<commit_after>{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Meetings where

import Data.Default
import qualified Data.Text as T
import Data.Thyme
import Data.Thyme.Format
import Data.Thyme.Time
import System.Locale

upcomingEvents :: [Meeting LocalTime]
upcomingEvents =
  [ Meeting
      "This Meeting Happened"
      "<NAME>"
      (meetingAt "2016-04-20 17:30")
      def
      "This meeting already happened and should not appear."
      Nothing
  , Meeting
      "Configuration Driven Development"
      "<NAME>"
      (meetingAt "2016-04-29 12:30")
      def
      "YSU Mathematics and Computer Science student <NAME> will discuss \
      \techniques for dealing with safer, more descriptive configuration files \
      \that allow for better end-user customization of programs."
      (Just "/static/foo.pdf")
  , Meeting
      "An Introduction to Doing Things"
      "<NAME>"
      (meetingAt "2016-05-13 17:30")
      def
      "Learn how to do a mix of things and stuff in this talk by Computer \
      \Information Systems student <NAME>."
      Nothing
  ]

newtype Room = Room String deriving (Eq, Ord)

data Meeting a = Meeting {
    name :: T.Text
  , speaker :: T.Text
  , dateTime :: a
  , room :: Room
  , description :: T.Text
  , slidesUrl :: Maybe T.Text
  } deriving (Show, Eq, Functor)

meetingAt :: String -> LocalTime
meetingAt time = readTime defaultTimeLocale "%Y-%m-%d %H:%M" time

instance Default Room where
  def = Room "Meshel 337"

instance Show Room where
  show (Room r) = r

instance Ord (Meeting LocalTime) where
  compare a b = compare (dateTime a) (dateTime b)

data MeetingStatus = Happened | Upcoming deriving Eq
{'fraction_non_alphanumeric': 0.09603875748076375, 'fraction_numerical': 0.022228555143915644, 'mean_word_length': 3.029850746268657, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6087768', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1052, 'n_words': 384}