This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open("./data/input02.txt") as inputFile: | |
input = inputFile.read().splitlines() | |
reports = [] | |
for line in input: | |
report = list(map(lambda x: int(x), line.split(' '))) | |
reports.append(report) | |
def report_is_safe(report): | |
safe = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
with open("./data/input01.txt") as inputFile: | |
input = inputFile.read().splitlines() | |
left = [] | |
right = [] | |
for line in input: | |
m = re.findall(r'(\d+)', line) | |
left.append(int(m[0])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
open Elmish | |
open Elmish.React | |
open Elmish.Bridge | |
#if DEBUG | |
open Elmish.Debug | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module View | |
open Feliz | |
open Feliz.Bulma | |
open System | |
open Shared | |
open Model | |
open Messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Update | |
open System | |
open Elmish | |
open Elmish.Bridge | |
open Shared | |
open Model | |
open Messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Model | |
open System | |
open Shared | |
[<RequireQualifiedAccess>] | |
type EventSet = | |
| Small | |
| Large |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module App | |
open Elmish | |
open Elmish.React | |
open Elmish.Bridge | |
open Update | |
open View | |
Program.mkProgram init update view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module View | |
open Feliz | |
open Feliz.Bulma | |
open Shared | |
open Model | |
open Messages | |
let [<Literal>] TimeFormatString = "HH:mm:ss" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Update | |
open System | |
open Elmish | |
open Elmish.Bridge | |
open Shared | |
open Model | |
open Messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Model | |
open Shared | |
[<RequireQualifiedAccess>] | |
type EventSet = | |
| Small | |
| Large | |
type Model = |