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
#if INTERACTIVE | |
#r "bin/Debug/FSharp.Data.dll" | |
#r "bin/Debug/FSharp.Charting.dll" | |
#r "bin/Debug/ServiceStack.Common.dll" | |
#r "bin/Debug/ServiceStack.Interfaces.dll" | |
#r "bin/Debug/ServiceStack.Text.dll" | |
#r "bin/Debug/ServiceStack.Redis.dll" | |
#load "../packages/FSharp.Charting.0.90.5/FSharp.Charting.fsx" | |
#endif | |
open System.IO |
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
[for v in allValues -> (v.Timestamp, v.Value)] | |
|> Chart.Line | |
|> Chart.WithYAxis(Min = 950.0, Max = 1000.0) |
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
[<CLIMutable>] | |
type BitstampLast = {Id:int64; Timestamp:int; Value:decimal} | |
let redis = new RedisClient("localhost") | |
let redisBitstamp = redis.As<BitstampLast>() | |
let allValues = redisBitstamp.GetAll() |
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 BitstampLast = {Id:int64; Timestamp:int; Value:decimal} | |
let redis = new RedisClient("localhost") | |
redis.FlushAll() | |
let redisBitstamp = redis.As<BitstampLast>() | |
let cp = currentPrice() | |
let last = {Id = redisBitstamp.GetNextSequence(); Timestamp = fst cp; Value = snd cp} | |
let stored = redisBitstamp.Store(last) |
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
let getHttp (url: string) = | |
let req = System.Net.WebRequest.Create(url) | |
let resp = req.GetResponse() | |
let stream = resp.GetResponseStream() | |
let reader = new StreamReader(stream) | |
let html = reader.ReadToEnd() | |
resp.Close() | |
html | |
type Bitstamp = JsonProvider<""" {"high": "844.00", "last": "714.33", "timestamp": "1386459953", "bid": "713.10", "volume": "81293.11654151", "low": "542.38", "ask": "713.88"} """> |
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
PM> Install-Package Zombify -Version 0.0.3 | |
Install failed. Rolling back... | |
Install-Package : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and th | |
e directory name must be less than 248 characters. | |
At line:1 char:16 | |
+ Install-Package <<<< Zombify -Version 0.0.3 | |
+ CategoryInfo : NotSpecified: (:) [Install-Package], PathTooLongException | |
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand |
NewerOlder