<commit_before>;
;  (C) Copyright 2016  <NAME>
;
;  All rights reserved. This program and the accompanying materials
;  are made available under the terms of the Eclipse Public License v1.0
;  which accompanies this distribution, and is available at
;  http://www.eclipse.org/legal/epl-v10.html
;
;  Contributors:
;      <NAME>
;

(ns clj-mrazik.schedule)

(require '[clojure.pprint :as pprint])
(require '[clj-calendar.calendar :as calendar])
(require '[sunrise.core :as sunrise])

(defn format-schedule-time
    [time]
    (calendar/format-time
    (doto (calendar/get-calendar)
          (.set java.util.Calendar/HOUR_OF_DAY 0)
          (.set java.util.Calendar/SECOND 0)
          (.set java.util.Calendar/MINUTE time))))

(defn schedule-entry
    [time duration]
    (let [to (+ time duration)]
        {:minutes {:from time
                   :to   to}
         :formatted {:from (format-schedule-time time)
                     :to   (format-schedule-time to)}}
    ))

(defn compute-schedule
    [bot-configuration]
    (let [start     (:start bot-configuration)
          end       (:end   bot-configuration)
          frequency (:frequency bot-configuration)
          duration  (:duration  bot-configuration)]<commit_msg>Removed unused namespace clojure.pprint<commit_after>;
;  (C) Copyright 2016  <NAME>
;
;  All rights reserved. This program and the accompanying materials
;  are made available under the terms of the Eclipse Public License v1.0
;  which accompanies this distribution, and is available at
;  http://www.eclipse.org/legal/epl-v10.html
;
;  Contributors:
;      <NAME>
;

(ns clj-mrazik.schedule)

(require '[clj-calendar.calendar :as calendar])
(require '[sunrise.core :as sunrise])

(defn format-schedule-time
    [time]
    (calendar/format-time
    (doto (calendar/get-calendar)
          (.set java.util.Calendar/HOUR_OF_DAY 0)
          (.set java.util.Calendar/SECOND 0)
          (.set java.util.Calendar/MINUTE time))))

(defn schedule-entry
    [time duration]
    (let [to (+ time duration)]
        {:minutes {:from time
                   :to   to}
         :formatted {:from (format-schedule-time time)
                     :to   (format-schedule-time to)}}
    ))

(defn compute-schedule
    [bot-configuration]
    (let [start     (:start bot-configuration)
          end       (:end   bot-configuration)
          frequency (:frequency bot-configuration)
          duration  (:duration  bot-configuration)]
{'fraction_non_alphanumeric': 0.11903791275988586, 'fraction_numerical': 0.008153281695882593, 'mean_word_length': 2.587719298245614, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1976858', 'n_tokens_mistral': 781, 'n_tokens_neox': 734, 'n_words': 202}