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 qualified Data.Map as DM | |
| data Product = Product String Float deriving (Show) | |
| type ProductMap = DM.Map String [Product] | |
| type DiscountTimes = (ProductMap -> Int) | |
| data Discount = Discount Float DiscountTimes | |
| products :: [Product] | |
| products = milk ++ marsBars | |
| where milk = replicate 7 $ Product "milk" 1.30 |
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
| My practice script: | |
| #r @"O:\gdrive_anighost\FsReactive\Common\bin\Debug\Common.dll" | |
| #r @"O:\gdrive_anighost\FsReactive\FsReactive\bin\Debug\FsReactive.dll" | |
| #r @"O:\gdrive_anighost\FsReactive\packages\MonoGame.Framework.WindowsDX.3.4.0.459\lib\net40\MonoGame.Framework.dll" | |
| #r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.dll" | |
| #r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Core.dll" | |
| #r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Numerics.dll" | |
| #r @"O:\gdrive_anighost\FsReactive\Xna\bin\Debug\Xna.dll" |
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
| My practice script: | |
| #r @"O:\gdrive_anighost\FsReactive\Common\bin\Debug\Common.dll" | |
| #r @"O:\gdrive_anighost\FsReactive\FsReactive\bin\Debug\FsReactive.dll" | |
| #r @"O:\gdrive_anighost\FsReactive\packages\MonoGame.Framework.WindowsDX.3.4.0.459\lib\net40\MonoGame.Framework.dll" | |
| #r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.dll" | |
| #r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Core.dll" | |
| #r @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Numerics.dll" | |
| #r @"O:\gdrive_anighost\FsReactive\Xna\bin\Debug\Xna.dll" |
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
| // This is just an initial example / tech-demo. | |
| #if INTERACTIVE | |
| #I "./../packages/NBitcoin/lib/net45/" | |
| #I "./../packages/Newtonsoft.Json/lib/net45" | |
| #r "NBitcoin.dll" | |
| #r "Newtonsoft.Json.dll" | |
| #else | |
| module BlockChain | |
| #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
| // This is just an initial example / tech-demo. | |
| #if INTERACTIVE | |
| #I "./../packages/NBitcoin/lib/net45/" | |
| #I "./../packages/Newtonsoft.Json/lib/net45" | |
| #r "NBitcoin.dll" | |
| #r "Newtonsoft.Json.dll" | |
| #else | |
| module BlockChain | |
| #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
| // This is just an initial example / tech-demo. | |
| #if INTERACTIVE | |
| #I "./../packages/NBitcoin/lib/net45/" | |
| #I "./../packages/Newtonsoft.Json/lib/net45" | |
| #r "NBitcoin.dll" | |
| #r "Newtonsoft.Json.dll" | |
| #else | |
| module BlockChain | |
| #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
| (* | |
| Install-Package FSharp.Data | |
| Install-Package Accord | |
| Install-Package Accord.MachineLearning | |
| Install-Package Accord.Math | |
| Install-Package Accord.Statistics | |
| *) | |
| #if INTERACTIVE |
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
| // This example uses the same data and methods as | |
| // http://accord-framework.net/docs/html/T_Accord_Statistics_Models_Regression_LogisticRegression.htm | |
| #I @"./packages" | |
| #r @"FSharp.Data.2.3.2/lib/net40/FSharp.Data.dll" | |
| #r @"Accord.3.4.0/lib/net45/Accord.dll" | |
| #r @"Accord.MachineLearning.3.4.0/lib/net45/Accord.MachineLearning.dll" | |
| #r @"Accord.Math.3.4.0/lib/net45/Accord.Math.Core.dll" | |
| #r @"Accord.Math.3.4.0/lib/net45/Accord.Math.dll" | |
| #r @"Accord.Statistics.3.4.0/lib/net45/Accord.Statistics.dll" |
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
| //Using FSharp.Data | |
| type BtcData = FSharp.Data.JsonProvider<"""{ | |
| "USD":{"15m":1.1,"last":1.1,"buy":1.1,"sell":1.1,"symbol":"$"}, | |
| "EUR":{"15m":1.1,"last":1.1,"buy":1.1,"sell":1.1,"symbol":"€"}, | |
| "GBP":{"15m":1.1,"last":1.1,"buy":1.1,"sell":1.1,"symbol":"£"} | |
| }"""> | |
| let prices = BtcData.Load("https://blockchain.info/ticker") | |
| //prices.Eur.Buy : val it : decimal = 923.52M (at 02/02/2017) | |
| //prices.Gbp.Sell : val it : decimal = 794.61M (at 02/02/2017) |
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
| #time "on" | |
| #load "Bootstrap.fsx" | |
| open System | |
| open Akka.Actor | |
| open Akka.Configuration | |
| open Akka.FSharp | |
| open Akka.TestKit | |
| // #Using Actor |
OlderNewer