Skip to content

Instantly share code, notes, and snippets.

open System.Net
open System.Xml
open FSharp.Data
type TableProvider = XmlProvider<"""<table class="tablehead" cellpadding="3" cellspacing="1"><tr class="stathead"><td>STANDINGS</td><td align="center" colspan="3">CONFERENCE</td><td align="center" colspan="4">OVERALL</td></tr><tr class="colhead"><td>Big Ten - Legends</td><td>W-L</td><td>PF</td><td>PA</td><td>W-L</td><td>PF</td><td>PA</td><td>STRK</td></tr><tr class="oddrow team-23-158"><td><a href="http://espn.go.com/college-football/team/_/id/158/nebraska-cornhuskers">Nebraska</a></td><td>7-1</td><td>231</td><td>195</td><td>10-4</td><td>487</td><td>386</td><td>L2</td></tr><tr class="evenrow team-23-130"><td><a href="http://espn.go.com/college-football/team/_/id/130/michigan-wolverines">Michigan</a></td><td>6-2</td><td>246</td><td>133</td><td>8-5</td><td>388</td><td>258</td><td>L2</td></tr><tr class="oddrow team-23-77"><td><a href="http://espn.go.com/college-football/team/_/id/77/northwestern-wildcats">Northwestern</a></td><td>5-3</td><td>253</td><td>199</td><t
## --------------------------------------------------------------------------------------
##
## This script is used to control how we deploy packages to Windows Azure.
## Orignial script (https://gist.github.com/PaulStovell/5234255) customized for
## Staging-To-Production with VIP swap deployment.
##
## NOTE: the script will only do Staging+VIP swap if $OctopusAzureSlot == "Staging".
## If $OctopusAzureSlot == anything else, the script will deploy directly to that slot
## without any further swapping.
##
type cell = {
alive: bool,
neighbors: list(bool)
};
let countLiveNeighbors = c => {
let aliveneighbors = List.filter(x => x, c.neighbors);
List.length(aliveneighbors);
};