Skip to content

Instantly share code, notes, and snippets.

View mathias-brandewinder's full-sized avatar

Mathias Brandewinder mathias-brandewinder

View GitHub Profile
@xoofx
xoofx / BatchSimdDot.cs
Created September 2, 2024 06:36
BatchSimdDot Example
// Comment about https://mastodon.social/@[email protected]/113064780292323247
// https://brandewinder.com/2024/09/01/should-i-use-simd-vectors/
using System.Numerics;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
public class VectorProcessor
{
public static float Take2(float[] left, float[] right)
{
open System
open System.Collections.Generic
open System.IO
open CNTK
let dataFolder = @"E:\Temp\CNTK\Tests\EndToEndTests\Text\SequenceClassification\Data"
let inputDim = 2000
@swlaschin
swlaschin / ndclondon17_fp_track.md
Last active July 10, 2017 11:04
Functional Track talks from NDC London 2017

Functional Track talks from NDC London 2017

Also, here is the list of all videos from NDC London 2017:

Wednesday 2017-01-18

open FSharp.Quotations
let rec getMethodInfo = function
| Patterns.Call(_,``method``,_) -> ``method``
| Patterns.Lambda(_,body) -> getMethodInfo body
| _ -> failwith "Unexpected Form"
let getGenericMethodInfo functionExpression =
let methodInfo = getMethodInfo functionExpression
if methodInfo.IsGenericMethod then

A response to http://ayende.com/blog/170849/why-ravendb-isnt-written-in-f-or-the-cost-of-the-esoteric-choice

Why my F# projects don't use RavenDB, or the cost of the esoteric choice

As you know, I generally recommend using SqlServer for data storage.

But many people have suggested that using RavenDB rather than SqlServer would dramatically reduce the development effort.

My reply to that was that using RavenDB would also lead to a lot more complexity, reduced support by other teams, harder to find DBAs and increased costs all around.

#r "../packages/Selenium.WebDriver.2.42.0/lib/net40/WebDriver.dll"
#r "../packages/Selenium.Support.2.42.0/lib/net40/WebDriver.Support.dll"
#r "../packages/Newtonsoft.Json.6.0.1/lib/net40/Newtonsoft.Json.dll"
#r "../packages/SizSelCsZzz.0.3.36.0/lib/SizSelCsZzz.dll"
#r "../packages/canopy.0.9.11/lib/canopy.dll"
open canopy
start firefox
@natw
natw / fizzbuzz.py
Created November 15, 2012 16:22
best fizzbuzz
import random
for i in range(0, 100):
if not i % 15:
random.seed(1178741599)
print [i+1, "Fizz", "Buzz", "FizzBuzz"][random.randint(0,3)]
#if INTERACTIVE
#I @"C:\Tools\MongoDB-CSharp\MongoDB.Linq\bin\Debug"
#r "MongoDB.Driver.dll"
#r "MongoDB.Linq.dll"
#r "FSharp.PowerPack.Linq.dll"
#r "System.Core.dll"
#endif
open System
open MongoDB.Driver