Skip to content

Instantly share code, notes, and snippets.

View callmekohei's full-sized avatar

callmekohei callmekohei

  • Fukuoka / Japan
View GitHub Profile
@callmekohei
callmekohei / fsConsoleapp.fs
Last active October 10, 2021 00:31
fsharp console app sample
module Program
(*
fsharp console app sample with System.CommandLine
require: dotnet add package system.commandline
e.g.
dotnet run -- --opdir ./hello --opfile ./hello/world.csv --opint 2021
@callmekohei
callmekohei / csvHelperWithFsharp.md
Created October 3, 2021 00:04
fsharp and CsvHelper

CsvHelper with fsharp

Enjoy!! (^_^)/

CSV

Name,Price,Color
@callmekohei
callmekohei / ytezSan.md
Created June 1, 2019 11:49
@ytez さんによる AWK の練習問題

@ytez さんによる AWK の練習問題

1) 各行に連番を振る(ヒント: NR)
2) 大文字→小文字の変換, その逆(ヒント: toupper,tolower)
3) 2文字目〜5文字目だけを切り出す (ヒント: substr)
4) foo を bar に置換する (ヒント: sub)
5) 奇数行だけ取り出す (ヒント: NR%2)
@callmekohei
callmekohei / interlop_tiny_memo.md
Last active January 18, 2019 08:57
interlopのメモ

Sample

cpp code ( nativedll.cpp )

#include <stdio.h>
extern "C" void __attribute__((visibility("default"))) HelloWorld()
{
printf("Hello world, invoked by F#!\n");
}
@callmekohei
callmekohei / fio.bash
Last active December 8, 2016 16:31
Fio is F# Interactive wrapper in Bash.
if [ -z "$1" ] ; then
echo ''
echo ' fio is FSharp In Out.'
echo ''
echo ' -e Eval script.'
echo ' -r Read script path.'
echo ''
exit
let inline prettyPrint (row : int ) (space : string) (lst: 'a list) =
let swapRowColumn lst =
lst
|> List.collect List.indexed
|> List.groupBy fst
|> List.map snd
|> List.map (List.map snd)
let sjis = System.Text.Encoding.GetEncoding "Shift_JIS"
@callmekohei
callmekohei / 01.md
Last active January 2, 2018 03:56
個人的なgitのおぼえがき
@callmekohei
callmekohei / volatility.fsx
Last active October 22, 2016 13:45
volatility for FX market (using OANDA server)
#if INTERACTIVE
#r "../Oanda.dll"
#I "../packages/FSharp.Data/lib/net40/"
#r "FSharp.Data.DesignTime.dll"
#r "FSharp.Data.dll"
#endif
open System
open System.IO
open System.Reflection