<commit_before>(ns busa-server.core.connections
  (:require
    [busa-server.model.connection :as connection]
    [busa-server.model.place :as place]
    [busa-server.core.utils :as utils]
    [busa-server.client.matkahuolto :as matkahuolto]))

(defn clear-connections []
  (connection/delete-all))

(defn load-connections-from-to [departure-place arrival-place]
  (let [fetched-connections (matkahuolto/fetch-todays-connections arrival-place departure-place)]
    (connection/save fetched-connections)))

(defn reload-connections []
  (clear-connections)
  (load-connections-from-to place/nummela place/helsinki)
  (load-connections-from-to place/helsinki place/nummela))

(defn find-connection-departuring-next [from-place to-place]
  nil)

(defn find-all-connections-departuring-next []
  nil)
<commit_msg>refactor(core.connections): extract places that are used to load connections to vector<commit_after>(ns busa-server.core.connections
  (:require
    [busa-server.model.connection :as connection]
    [busa-server.model.place :as place]
    [busa-server.core.utils :as utils]
    [busa-server.client.matkahuolto :as matkahuolto]))

(def places [
  [place/nummela place/helsinki]
  [place/helsinki place/nummela]])

(defn clear-connections []
  (connection/delete-all))

(defn load-connections-from-to [departure-place arrival-place]
  (let [fetched-connections (matkahuolto/fetch-todays-connections arrival-place departure-place)]
    (connection/save fetched-connections)))

(defn reload-connections []
  (clear-connections)
  (doseq [[from to] places]
    (load-connections-from-to from to)))

(defn find-connection-departuring-next [from-place to-place]
  nil)

(defn find-all-connections-departuring-next []
  nil)

{'fraction_non_alphanumeric': 0.13267670915411356, 'fraction_numerical': 0.0, 'mean_word_length': 4.607142857142857, 'pattern_counts': {'":': 0, '<': 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': '5920131', 'n_tokens_mistral': 618, 'n_tokens_neox': 587, 'n_words': 109}