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 "nuget: FsHttp" | |
#r "nuget: Spectre.Console.ImageSharp" | |
open FsHttp | |
open Spectre.Console | |
let imgUrl = | |
"https://banner2.cleanpng.com/20200525/frt/transparent-hero-image-hero-logo-cartoon-5ecc928ba8c9a0.2212187815904651636914.jpg" |
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
// npm init type module, npm add express, dotnet tool install fable, dotnet fable express.fsx, node express.fs.js | |
#r "nuget: Glutinum.Express, 0.1.0-alpha-002" | |
#r "nuget: Glutinum.BodyParser" | |
#r "nuget: Glutinum.RangeParser" | |
#r "nuget: Fable.Core" | |
#r "nuget: Feliz.ViewEngine" | |
open Glutinum.Express | |
open Glutinum.ExpressServeStaticCore | |
open Fable.Core.JsInterop |
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 "nuget: Microsoft.Extensions.DependencyInjection" | |
#r "nuget: Microsoft.Extensions.Logging.Console" | |
open Microsoft.Extensions.DependencyInjection | |
open Microsoft.Extensions.Logging.Console | |
open Microsoft.Extensions.Logging | |
type ITest = | |
abstract member Log : unit -> unit | |
type Test(logger: ILogger<Test>) = |
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 "nuget: SwaggerProvider" | |
#r "nuget: Microsoft.Extensions.Logging.Console" | |
#r "nuget: Microsoft.Extensions.DependencyInjection" | |
#r "nuget: Microsoft.Extensions.Http" | |
open System | |
open System.Net.Http | |
open SwaggerProvider | |
open System.Threading.Tasks | |
open System.Threading |
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 "nuget:FSharp.Data" | |
//#r "nuget:Plotly.NET" | |
#r "nuget:Feliz.ViewEngine" | |
#r "nuget:Suave" | |
open FSharp.Data | |
//open Plotly.NET | |
open Feliz.ViewEngine | |
open Suave | |
open Suave.Filters | |
open Suave.Operators |
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 "nuget:Microsoft.ML" | |
#r "nuget:Microsoft.ML.AutoML" | |
#r "nuget:Microsoft.ML.DataView" | |
#r "nuget:Plotly.NET" | |
#r "nuget:FSharp.Data" | |
open Microsoft.ML | |
open Microsoft.ML.Data | |
open Microsoft.ML.Transforms | |
open Microsoft.ML.Trainers |
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 "nuget: Fli" | |
open Fli | |
open System | |
open System | |
let isHelpRequested = fsi.CommandLineArgs |> Seq.contains "--h" | |
[<Literal>] |
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 "nuget: NodaMoney" | |
open NodaMoney | |
open System | |
open System.Threading.Tasks | |
module Products = | |
type Product = | |
| Shoes | |
| Skirt |
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.Linq; | |
using JsonDiffPatchDotNet; | |
using Newtonsoft.Json.Linq; | |
public static class JsonDiffPatchWrapper | |
{ | |
private static readonly JsonDiffPatch JsonDiff = new JsonDiffPatch(); |
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
(* | |
module ---> like a static class in C# | |
open (like using or using static in C#) --> just open a namespace or module | |
let ----> like var but used both for varialbles and functions, any binding is done with let, last value in scope is the result | |
type ---> custom/user-defined types , records, classes, discriminated unions, interfaces ecc.. | |
task ---> like async Task<T> in C#, let! is await, return! is return await, return is return | |
*) |