Skip to content

Instantly share code, notes, and snippets.

View cannorin's full-sized avatar
🌐
WIRED

cannorin

🌐
WIRED
View GitHub Profile
open System
open System.Collections.Generic
let memoize_rec (f : ('a -> 'b) -> 'a -> 'b) =
let m = Dictionary<'a, 'b> () in
let rec g x =
try
m.[x]
with
| :? KeyNotFoundException ->

Keybase proof

I hereby claim:

  • I am cannorin on github.
  • I am cannorin (https://keybase.io/cannorin) on keybase.
  • I have a public key whose fingerprint is 97B6 2212 5194 A0E9 9093 445F B6F2 B09D FFFB 97DE

To claim this, I am signing this object:

@cannorin
cannorin / a.md
Last active April 1, 2018 15:00
FGO 複数の素材を集める際の効率ランキング

FGO 複数の素材を集める際の効率ランキング

最終更新: 2018年4月2日 0:00:08 (1時間ごとに更新)

算出方法

素材 X が最も多く出るクエストでの AP 効率を A_best(X) 、あるクエスト C での素材 X の AP 効率を A_C(X) とおくと、

クエスト C のお得度は、 C でドロップする可能性のあるそれぞれの素材 X に対して A_best(X) / A_C(X) (素材単体でのお得度) を計算して和を取ることで計算される。

Keybase proof

I hereby claim:

  • I am cannorin on github.
  • I am cannorin (https://keybase.io/cannorin) on keybase.
  • I have a public key whose fingerprint is 84B6 7F6C 065D 9A06 ABAC 20D3 B26B 2660 3BB2 B8DB

To claim this, I am signing this object:

(*
The MIT License
SpanUtils.fs - Useful extensions for Span
Copyright(c) 2019 cannorin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@cannorin
cannorin / LongPressedEffect
Last active June 26, 2019 06:04
an example of using Effects with Fabulous to add a long pressed gesture
ref: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/effects/
getting started:
1. put LongPressedEffect.fs in the netstandard/shared project
2. put LongPressedEffect.{iOS,Android}.fs in the corresponding platform project
3. use the `create` callback to add an effect to Fabulous components (cf. Usage.fs)
license: MIT
@cannorin
cannorin / CarouselViewExtension.fs
Last active July 3, 2019 11:13
Fabulous wrapper for alexrainman/CarouselView
(*
The MIT License
CarouselViewExtension - Fabulous wrapper for alexrainman/CarouselView
Copyright(c) 2019 cannorin, Peano System Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFuQHpoBEADEij8FAaLKrIUgN2ijJdbzMeHMI0f6Y35/BdQHMqkytVn/sFNf
L+HpccHv53ESJrTjprz00mBns1AbenF6GTsJ2Mi2+tPSgJcfPqPXOxSNDKeqt7YJ
P/248wQN9jt8+l4o3eOWcPgD1pebAivmPzxEdjmZt0qFtsqiYKQ7J/DEZf6vcpYa
/OiZS4geWwsXsWt856/r9CJzz4EJCNPhzektlnasRPz1+UVchrY5MRfiJ5ef6J1e
1cjAx4XJ7ISHfjKfwbHBzf6kBfXuWXDhCw9WIR22703WaWN+Lw6VQpBwWa1rG0Ep
LPB2ogCU9h38079HZxHcGJ0XU8VYDxqQzFnwCJRUpnBtQLF9YETCqoEwcEtRM+rG
4T3kS52o/KPnhfThHBg5qVUzHRD2Mi+P5a9HCz7OUwOPv8YsUp4ZNsKGvefbmzED
WN/JWpScK/6LIjSpVU8rFH/keDVkFD2M+p2UN6AvGOTuumoJH5i98OWZe4o3Kplm
setcps ((192 / 60) / 4)
hush
kick =
sound "909"
# up (-2)
# shape 0.8
# lpf 5000
# cut 0

test**