Skip to content

Instantly share code, notes, and snippets.

Avatar

callmekohei callmekohei

View GitHub Profile
@callmekohei
callmekohei / ytezSan.md
Created Jun 1, 2019
@ytez さんによる AWK の練習問題
View ytezSan.md

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

1) 各行に連番を振る(ヒント: NR)
2) 大文字→小文字の変換, その逆(ヒント: toupper,tolower)
3) 2文字目〜5文字目だけを切り出す (ヒント: substr)
4) foo を bar に置換する (ヒント: sub)
5) 奇数行だけ取り出す (ヒント: NR%2)
View interlop_tiny_memo.md

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 Dec 8, 2016
Fio is F# Interactive wrapper in Bash.
View fio.bash
if [ -z "$1" ] ; then
echo ''
echo ' fio is FSharp In Out.'
echo ''
echo ' -e Eval script.'
echo ' -r Read script path.'
echo ''
exit
View prettyPrintf.fsx
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 Jan 2, 2018
個人的なgitのおぼえがき
View 01.md
@callmekohei
callmekohei / volatility.fsx
Last active Oct 22, 2016
volatility for FX market (using OANDA server)
View volatility.fsx
#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