Last active
August 29, 2015 14:22
-
-
Save bjartwolf/96a7468a0842d266af5f to your computer and use it in GitHub Desktop.
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
open Microsoft.FSharp.Data.TypeProviders | |
open System | |
open RProvider | |
open RProvider.``base`` | |
open RProvider.``stats`` | |
open RProvider.``graphics`` | |
type dbSchema = SqlDataConnection<"Data Source=SECRETSERVER;Initial Catalog=SECRETDB;User id=SECRETUSERPassword=SECRET"> | |
[<EntryPoint>] | |
let main argv = | |
let db = dbSchema.GetDataContext() | |
let mps = query { | |
for mp in db.ENTERPRISETABLE do | |
select mp.SERIALNUMBER | |
} | |
let serialNums = mps |> Seq.map Int64.Parse |> Seq.toList | |
let prime:Int64 = 13L | |
let modulusids = serialNums |> List.map(fun f -> f % prime) |> List.map float | |
R.hist(modulusids) |> ignore | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment