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
(* | |
BEFORE you start to play you need to add | |
Fslab to your project by nuget package manager | |
*) | |
#nowarn "211" // Ignore warning that a search path does not exist on #I | |
#I "../packages/FSharp.Data.2.0.9/lib/net40/" | |
#r "FSharp.Data.dll" | |
#I "../../bin/" |
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
(* http://www.fssnip.net/nu *) | |
(* Factorial function *) | |
let rec (!!) x = | |
if x = 1 || x = 0 then 1 | |
else x * !! (x-1) | |
(* Choose function *) | |
let (+?) (n:int) (x:int) = | |
!!n / (!!x * !!(n - x)) |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace AsyncTest | |
{ |
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
#I @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\" | |
#r "System.Messaging.dll" | |
open System | |
open System.Messaging | |
open System.Diagnostics | |
// create message queue | |
MessageQueue.Create(@".\private$\r_default-queue") |
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
# Reinstall Nuget Packages into project | |
$packageFile =(Resolve-Path ".\").Path + "\packages.config" | |
if(Test-Path -Path $packageFile) | |
{ | |
# get only packages mentioned inside packages config | |
[xml]$xmlContent = Get-Content $packageFile | |
# packages | |
$packages = $xmlContent.SelectNodes("//packages//package") |
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
# --- settings --- | |
$feedUrlBase = "http://go.microsoft.com/fwlink/?LinkID=206669" | |
# the rest will be params when converting to funclet | |
$forceLatest = $false | |
$latest = $true | |
$overwrite = $false | |
$top = 500 #use $top = $null to grab all | |
$destinationDirectory = join-path ([Environment]::GetFolderPath("MyDocuments")) "NuGetLocalNew" | |
$packageFile =(Resolve-Path ".\").Path + "\packages.config" |
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
// Inspired by http://arxiv.org/abs/1210.7463 | |
// reference accord framework | |
#r "../packages/Accord.3.0.2/lib/net45/Accord.dll" | |
#r "../packages/Accord.Controls.3.0.2/lib/net45/Accord.Controls.dll" | |
#r "../packages/Accord.IO.3.0.2/lib/net45/Accord.IO.dll" | |
#r "../packages/Accord.Math.3.0.2/lib/net45/Accord.Math.dll" | |
#r "../packages/Accord.Statistics.3.0.2/lib/net45/Accord.Statistics.dll" | |
//reference deelde with fsharp charting |
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
// data from http://archive.ics.uci.edu/ml/machine-learning-databases/secom/ | |
// reference accord framework | |
#r "../packages/Accord.3.0.2/lib/net45/Accord.dll" | |
#r "../packages/Accord.Controls.3.0.2/lib/net45/Accord.Controls.dll" | |
#r "../packages/Accord.IO.3.0.2/lib/net45/Accord.IO.dll" | |
#r "../packages/Accord.Math.3.0.2/lib/net45/Accord.Math.dll" | |
#r "../packages/Accord.Statistics.3.0.2/lib/net45/Accord.Statistics.dll" | |
//reference deelde with fsharp charting | |
#r "../packages/Deedle.1.2.4/lib/net40/Deedle.dll" | |
#r "../packages/FSharp.Charting.0.90.12/lib/net40/FSharp.Charting.dll" |
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
// link to competition: https://www.kaggle.com/c/whats-cooking/ | |
//reference deelde with fsharp charting | |
#r "../packages/Deedle.1.2.4/lib/net40/Deedle.dll" | |
#r "../packages/FSharp.Charting.0.90.12/lib/net40/FSharp.Charting.dll" | |
#I "../packages/FSharp.Charting.0.90.12" | |
#load "FSharp.Charting.fsx" | |
#r "../packages/Newtonsoft.Json.7.0.1/lib/net45/Newtonsoft.Json.dll" | |
open System |
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 | |
open Neo4jClient | |
open System.Linq | |
[<CLIMutable>] | |
type Person = { Name:string; Twitter:string } | |
[<CLIMutable>] | |
type Knows = { How:string } |