I hereby claim:
- I am voronoipotato on github.
- I am voronoipotato (https://keybase.io/voronoipotato) on keybase.
- I have a public key whose fingerprint is 72C6 923A FED0 D885 683D 68E1 47D4 E22D 1A1C F9F8
To claim this, I am signing this object:
// Place your settings in this file to overwrite the default settings | |
{ | |
"editor.fontFamily": "pragmatapro", | |
"editor.fontSize": 15, | |
"editor.fontLigatures": true, | |
"indentRainbow.colors": [ | |
"rgba(180,237,210,.5)", | |
"rgba(160,207,211,.5)", | |
"rgba(141,148,186,.5)", | |
"rgba(154,122,160,.5)", |
I hereby claim:
To claim this, I am signing this object:
/* | |
let rec gcd a b = | |
match a, b with | |
| _ , 0 -> a | |
| _ , _ -> gcd b (a%b) | |
let lcm a b = a * b / (gcd a b) | |
*/ | |
var arr = [1,2,3,4,5] |
public class PaperTimer : IDisposable | |
{ | |
private readonly Stopwatch _stopwatch; | |
private readonly Action<Stopwatch> _action; | |
public PaperTimer(Action<Stopwatch> action = null) | |
{ | |
_action = action ?? (s => Console.WriteLine(s.ElapsedMilliseconds)); | |
_stopwatch = new Stopwatch(); | |
_stopwatch.Start(); | |
} |
static class EventStoreConnectionExtensions | |
{ | |
public static Task<EventStoreRxSubscription> SubscribeToAll(this EventStoreConnection connection, bool resolveLinkTos) | |
{ | |
return Task<EventStoreRxSubscription>.Factory.StartNew(() => { | |
var subject = new Subject<ResolvedEvent>(); | |
var subscriptionTask = connection.SubscribeToAll(resolveLinkTos, subject.OnNext, () => subject.OnError(new SubscriptionDroppedException())); | |
subscriptionTask.Wait(); |
async.map(myUrls, function(url, callback) { | |
request(url, function(error, response, html) { | |
// Some processing is happening here before the callback is invoked | |
callback(error, html); | |
}); | |
}, function(err, results) { | |
... | |
}); |
// i ported that "fizzbuzz in tensorflow" to F# and Accord.Net's DeepBeliefNetwork | |
// http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/ | |
#r "Debug/Accord.dll" | |
#r "Debug/Accord.Math.dll" | |
#r "Debug/Accord.Neuro.dll" | |
#I "Debug" | |
open Accord.Neuro | |
open Accord.Neuro.Networks |
type Magma<'a> = | |
abstract member append : 'a -> 'a -> 'a | |
type Semigroup<'a> = | |
inherit Magma<'a> | |
type Monoid<'a> = | |
inherit Semigroup<'a> | |
abstract member empty : 'a |
#r "WindowsBase" | |
#r "PresentationCore" | |
#r "PresentationFramework" | |
open System.Windows | |
open System.Windows.Controls | |
type Action = | |
| Increment |
// Convert from normal to web-safe, strip trailing "="s | |
function webSafe64(base64) { | |
return base64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); | |
} | |
// Convert from web-safe to normal, add trailing "="s | |
function normal64(base64) { | |
return base64.replace(/\-/g, '+').replace(/_/g, '/') + '=='.substring(0, (3*base64.length)%4); | |
} |