Skip to content

Instantly share code, notes, and snippets.

Mathias Brandewinder mathias-brandewinder

Block or report user

Report or block mathias-brandewinder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mathias-brandewinder
mathias-brandewinder / App.fs
Last active Jan 30, 2019
Lorentz attractor in Fable-Elmish
View App.fs
(*
Simulation of the Lorentz attractor, using Fable.
If you want to see this code in action, just copy this code into the Fable REPL:
https://fable.io/repl/
*)
module App
open Elmish
open Elmish.React
View advent.fsx
module part1 =
let captcha (input:string) =
let len = input.Length
let circular i = i % len
input
|> Seq.toArray
|> Array.fold (fun (index,count) x ->
index + 1,
if x = input.[circular (index + 1)]
@mathias-brandewinder
mathias-brandewinder / cntk.fsx
Created Dec 24, 2017
Baby steps with CNTK and F#
View cntk.fsx
// Code for the post http://brandewinder.com/2017/12/23/baby-steps-with-cntk-and-fsharp/
open System
open System.IO
open System.Collections.Generic
Environment.SetEnvironmentVariable("Path",
Environment.GetEnvironmentVariable("Path") + ";" + __SOURCE_DIRECTORY__)
let dependencies = [
View version1.fsx
// C# original: https://github.com/Microsoft/CNTK/blob/master/Examples/TrainingCSharp/Common/LogisticRegression.cs
// I assume CNTK.CPUOnly has been installed via Paket
// required dependencies:
// packages\CNTK.CPUOnly\lib\net45\x64
// packages\CNTK.CPUOnly\support\x64\Dependency
// packages\CNTK.CPUOnly\support\x64\Dependency\Release
// packages\CNTK.CPUOnly\support\x64\Release
// loading native dependencies in a script is a bit annoying,
@mathias-brandewinder
mathias-brandewinder / notes.md
Created Jul 21, 2017
F# Meetup activities planning, Jul 2017
View notes.md

Reboot meetings, aiming for regularity: alternate monthly, 1 talk, 1 hands-on, 1 breakfast. Tentatively: Aug: hands-on (Slack bot) Sep: rehearsal / teaser for the open fsharp conference Oct: breakfast? Nov: hands-on (F# Notebooks + ML)

Use Github more: we have an organization, https://github.com/sfsharp, let's use it.

Topics / Speakers / Formats

@mathias-brandewinder
mathias-brandewinder / graph.fsx
Created Apr 11, 2017
Visualize Azure Function App with F# and GraphViz
View graph.fsx
(*
Reading out bindings
*)
type Direction =
| Trigger
| In
| Out
type Properties = Map<string,string>
View presentation.md
  • title : Azure Functions
  • description : Introduction to Azure Functions with F#
  • author : Mathias Brandewinder
  • theme : night
  • transition : default

An intro to Azure Functions with F#

@mathias-brandewinder
mathias-brandewinder / gradient-boosting-1.fsx
Last active Dec 7, 2016
Gradient Boosting exploration
View gradient-boosting-1.fsx
// blog post: brandewinder.com/2016/08/06/gradient-boosting-part-1
// https://en.wikipedia.org/wiki/Gradient_boosting#Algorithm
(*
Exploring the dataset
*)
#I "./packages/"
#r "fsharp.data/lib/net40/fsharp.data.dll"
open FSharp.Data
View part1-solved.fsx
open System
open System.IO
let path = @"C:\Users\Mathias\Desktop\day-1-test\day-1\trainingsample.csv"
let data0 = File.ReadAllLines path
let data1 =
data0 |> Array.map (fun line -> line.Split ',')
You can’t perform that action at this time.