This file contains 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
type Painting = {id:int;name:string;tags:string} | |
type ArtShow = {id:int;name:string;expectedAttendance:int;paintings:Painting list} | |
let painting0 = {id=0; | |
name="Starry Night"; | |
tags="Impressionism;Nature"} | |
let painting1 = {id=1; | |
name="Sunday Afternoon on the Island of La Grande Jatte"; | |
tags="Impressionism;Nature;LeisureActivities"} | |
let painting2 = {id=2; |
This file contains 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
#r "../packages/FSharp.Data.2.2.2/lib/net40/FSharp.Data.dll" | |
open System | |
open System.IO | |
open System.Text | |
open FSharp.Data | |
[<Literal>] | |
let geoLocationSample = "..\Data\TAMUHttpGet.json" | |
type GeoLocationServiceContext = JsonProvider<geoLocationSample> |
This file contains 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
the.counted <- read.csv("./Data/TheCountedWithGeo.csv") | |
summary(the.counted) | |
#http://stackoverflow.com/questions/13420700/r-ggplot2-ggmap-concentric-circles-as-points | |
library(ggplot2) | |
library(maps) | |
all.states <- map_data("state") | |
plot <- ggplot() | |
plot <- plot + geom_polygon(data=all.states, aes(x=long, y=lat, group = group), |
This file contains 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
#r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Net.Http.dll" | |
#r @"..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll" | |
open System | |
open System.Net.Http | |
open System.Net.Http.Headers | |
open System.Net.Http.Formatting | |
open System.Collections.Generic |
This file contains 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 System | |
let getNewDate dayOfYear = | |
["Jan";"Feb";"Mar";"Apr";"May";"Jun";"Sep";"Oct";"Nov";"Dec"] | |
|> Seq.mapi(fun i m -> if i%2=0 then m, [1..36] else m, [1..37]) | |
|> Seq.map(fun (m,ad) -> ad |> Seq.map(fun d -> m,d)) | |
|> Seq.collect(fun a -> a) | |
|> Seq.mapi(fun i d -> i, d ) | |
|> Seq.tryFind(fun (i,d) -> i = dayOfYear) |
This file contains 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
#r "../packages/Microsoft.Azure.Documents.Client.0.9.1-preview/lib/net40/Microsoft.Azure.Documents.Client.dll" | |
#r "../packages/Newtonsoft.Json.4.5.11/lib/net40/Newtonsoft.Json.dll" | |
open System | |
open Microsoft.Azure.Documents | |
open Microsoft.Azure.Documents.Client | |
open Microsoft.Azure.Documents.Linq | |
let endpointUrl = "yourEndpoint" |
This file contains 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
#r "../packages/NLog.4.4.1/lib/net45/NLog.dll" | |
open NLog | |
let config = new Config.LoggingConfiguration() | |
let target = new Targets.ColoredConsoleTarget("ConsoleTarget") | |
config.AddTarget(target) | |
let rule = new Config.LoggingRule() |
This file contains 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
type Customer = {Name:string; Email:string} | |
type Input = {Customer:Customer; MaxNameLength:int} | |
type Result<'t> = | |
| Good of 't | |
| Bad of string | |
let bind switchFunction = | |
fun twoTrackInput -> | |
match twoTrackInput with |
This file contains 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
public sealed partial class MainPage : Page | |
{ | |
GpioPin _pin = null; | |
Int32 _pinValue = 0; | |
public MainPage() | |
{ | |
this.InitializeComponent(); | |
Loaded += MainPage_Loaded; | |
} |
This file contains 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
#r "WindowsBase.dll" | |
#r "System.Net.Http.dll" | |
#r "PresentationCore.dll" | |
#r "../packages/FSharp.Data.2.3.2/lib/net40/FSharp.Data.dll" | |
open System | |
open System.IO | |
open System.Web | |
open System.Net |