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 NextChar = NextChar | |
type NextWidth = NextWidth of char | |
type NextHeight = NextHeight of char * int | |
type EndUnnko = EndUnnko of char * int * int | |
type UnnkoBuilder () = | |
member _.Yield(_: unit) = NextChar | |
member _.Run(EndUnnko (char, w, h): EndUnnko) = | |
let nChars n c = c |> Array.replicate n |> System.String | |
printfn "%s∫ ∫ ∫ " <| nChars h ' ' | |
printfn "%sノヽ " <| nChars h ' ' |
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
// fix: https://gist.github.com/jkone27/de477e362f3ee9f36069c0010e0a1f29 | |
open Microsoft.ML | |
open Microsoft.ML.Data | |
open FSharp.Data | |
[<Literal>] | |
let trainDataPath = __SOURCE_DIRECTORY__ + "/house-price-train.csv" | |
[<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
type Block = | |
| H1 of string | |
| H2 of string | |
| P of string | |
type Markdown = { | |
title: string | |
author: string | |
blocks: Block list | |
} with |
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 (|Fizz|_|) n = if n % 3 = 0 then Some "Fizz" else None | |
let (|Buzz|_|) n = if n % 5 = 0 then Some "Buzz" else None | |
let (|FizzBuzz|_|) n = | |
if n % 15 = 0 then Some "FizzBuzz" else None | |
let fizzBuzz = | |
function | |
| FizzBuzz fizzbuzz -> fizzbuzz | |
| Fizz fizz -> fizz |
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 System.Threading | |
type Frame = string[] | |
type Animation = seq<Frame> | |
let mergeFrame (a: Frame) (b: Frame) : Frame = | |
Array.zip a b | |
|> Array.map (fun (a, b) -> | |
(a.ToCharArray(), b.ToCharArray()) |
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
// 既定値を上書きするには、このファイル内にキー バインドを挿入します | |
[ | |
{ | |
"key": "ctrl+alt+n", | |
"command": "explorer.newFolder" | |
}, | |
{ | |
"key": "ctrl+shift+n", | |
"command": "explorer.newFile" | |
}, |