0.a Ensure newest dotnet SDK version
0.b Init repo with appropriate license and gitignore (e.g. Visual Studio)
0.c Clone repo
-
Install Fake template :
dotnet new -i "fake-template::*" -
In the repo root:
dotnet new fake(creates basic build script)
| open Dash.NET; open Plotly.NET; open FSharp.Data; open Deedle; open System; open System.IO; open System.Text; open System.Text.RegularExpressions | |
| let req = Http.Request("https://finance.yahoo.com/quote/AMZN/history?p=AMZN",httpMethod=HttpMethod.Get) | |
| let body = match req.Body with | HttpResponseBody.Text b -> b | |
| let crumb = Regex("CrumbStore\":{\"crumb\":\"(?<crumb>.+?)\"}").Match(body).Groups.["crumb"].Value | |
| let cookie = req.Cookies.["B"] | |
| let getDf ticker : Frame<System.DateTime,string> = | |
| let response = | |
| Http.RequestString( |
| #r "paket: | |
| nuget BlackFox.Fake.BuildTask | |
| nuget Fake.Core.Target | |
| nuget Fake.Core.Process | |
| nuget Fake.Core.ReleaseNotes | |
| nuget Fake.IO.FileSystem | |
| nuget Fake.DotNet.Cli | |
| nuget Fake.DotNet.MSBuild | |
| nuget Fake.DotNet.AssemblyInfoFile | |
| nuget Fake.DotNet.Paket |
0.a Ensure newest dotnet SDK version
0.b Init repo with appropriate license and gitignore (e.g. Visual Studio)
0.c Clone repo
Install Fake template : dotnet new -i "fake-template::*"
In the repo root:
dotnet new fake (creates basic build script)| //Use F#5 preview to use "#r:nuget..." | |
| #r "nuget:FSharp.Plotly,Version=2.0.0-alpha" | |
| #r "nuget:Fake.Core.Process" | |
| open System | |
| open System.Diagnostics | |
| open Fake.IO | |
| open FSharp.Plotly | |
| open Newtonsoft.Json |
| open Deedle.Vectors | |
| open Deedle.Indices | |
| open Deedle.Indices.Linear | |
| open FSharpAux | |
| //open FSharpAux.Collections | |
| [<AutoOpen>] | |
| module Frame = | |
| let dropColIfExists (col:'C) (frame:Frame<'R,'C>) = |
| #r "nuget: System.Runtime.InteropServices.RuntimeInformation" | |
| ///Choose process to open plots with depending on OS. Thanks to @zyzhu for hinting at a solution (https://github.com/muehlhaus/FSharp.Plotly/issues/31) | |
| let openOsSpecificFile path = | |
| if RuntimeInformation.IsOSPlatform(OSPlatform.Windows) then | |
| let psi = new System.Diagnostics.ProcessStartInfo(FileName = path, UseShellExecute = true) | |
| System.Diagnostics.Process.Start(psi) |> ignore | |
| elif RuntimeInformation.IsOSPlatform(OSPlatform.Linux) then | |
| System.Diagnostics.Process.Start("xdg-open", path) |> ignore | |
| elif RuntimeInformation.IsOSPlatform(OSPlatform.OSX) then |
| //#r "nuget: ..." is a preview feature of F#5, make sure to adapt if you dont use it. | |
| #r "nuget: PuppeteerSharp" | |
| #r "nuget: FSharp.Plotly" | |
| open PuppeteerSharp | |
| open FSharp.Plotly | |
| [(1,2);(2,4);(3,5)] | |
| |> Chart.Line | |
| |> Chart.SaveHtmlAs "your/path/here" |
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp"> | |
| <Id>5d6f5462-3401-48ec-9406-d12882e9ad83</Id> | |
| <Version>1.0.0.0</Version> | |
| <ProviderName>Computational Systems Biology</ProviderName> | |
| <DefaultLocale>en-US</DefaultLocale> | |
| <DisplayName DefaultValue="CSBAnnotator"/> | |
| <Description DefaultValue="Utility functions to annotate data in a fast and safe way"/> | |
| <IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/> | |
| <HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-80.png"/> |