Skip to content

Instantly share code, notes, and snippets.

MartinBodocky

Block or report user

Report or block MartinBodocky

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
@MartinBodocky
MartinBodocky / farming.fsx
Created Apr 26, 2016
CenterSpace NMath Linear Programming example in F#
View farming.fsx
open System
open System.IO
#r @"C:\Program Files (x86)\CenterSpace\NMath 6.2\Assemblies\NMath.dll"
open CenterSpace.NMath
open CenterSpace.NMath.Core
open CenterSpace.NMath.Analysis
// A farmer has 640 acres of farmland. It can be planted with wheat, barley, corn or a
View exampleElastic.fsx
#r "../packages/Elasticsearch.Net.2.0.4/lib/net46/Elasticsearch.Net.dll"
#r "../packages/NEST.2.0.4/lib/net46/Nest.dll"
#r "../packages/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll"
open System
open System.Linq
open Nest
module Utils =
open Microsoft.FSharp.Quotations
@MartinBodocky
MartinBodocky / neo4jFriends.fsx
Last active Feb 4, 2019
F# sample for Neo4j - Friends
View neo4jFriends.fsx
#r "../packages/Neo4jClient.1.1.0.28/lib/net45/Neo4jClient.dll"
#r "../packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll"
open System
open System.Collections.Generic
open System.Linq
open Microsoft.FSharp.Quotations
open Microsoft.FSharp.Linq.RuntimeHelpers
open System.Linq.Expressions
View neo4j-fsharp-basics.fs
open System
open Neo4jClient
open System.Linq
[<CLIMutable>]
type Person = { Name:string; Twitter:string }
[<CLIMutable>]
type Knows = { How:string }
@MartinBodocky
MartinBodocky / cooking.fsx
Last active Oct 30, 2015
Prototyping for What's Cooking Kaggle competition
View cooking.fsx
// link to competition: https://www.kaggle.com/c/whats-cooking/
//reference deelde with fsharp charting
#r "../packages/Deedle.1.2.4/lib/net40/Deedle.dll"
#r "../packages/FSharp.Charting.0.90.12/lib/net40/FSharp.Charting.dll"
#I "../packages/FSharp.Charting.0.90.12"
#load "FSharp.Charting.fsx"
#r "../packages/Newtonsoft.Json.7.0.1/lib/net45/Newtonsoft.Json.dll"
open System
@MartinBodocky
MartinBodocky / SecomPCA.fsx
Created Oct 18, 2015
PCA analysis on more real data with Accord.Net with Deedle and FSharp.Charting.
View SecomPCA.fsx
// data from http://archive.ics.uci.edu/ml/machine-learning-databases/secom/
// reference accord framework
#r "../packages/Accord.3.0.2/lib/net45/Accord.dll"
#r "../packages/Accord.Controls.3.0.2/lib/net45/Accord.Controls.dll"
#r "../packages/Accord.IO.3.0.2/lib/net45/Accord.IO.dll"
#r "../packages/Accord.Math.3.0.2/lib/net45/Accord.Math.dll"
#r "../packages/Accord.Statistics.3.0.2/lib/net45/Accord.Statistics.dll"
//reference deelde with fsharp charting
#r "../packages/Deedle.1.2.4/lib/net40/Deedle.dll"
#r "../packages/FSharp.Charting.0.90.12/lib/net40/FSharp.Charting.dll"
@MartinBodocky
MartinBodocky / PCA.fsx
Last active Oct 4, 2016
PCA with Accord.Net and FSharp.Charting
View PCA.fsx
// Inspired by http://arxiv.org/abs/1210.7463
// reference accord framework
#r "../packages/Accord.3.0.2/lib/net45/Accord.dll"
#r "../packages/Accord.Controls.3.0.2/lib/net45/Accord.Controls.dll"
#r "../packages/Accord.IO.3.0.2/lib/net45/Accord.IO.dll"
#r "../packages/Accord.Math.3.0.2/lib/net45/Accord.Math.dll"
#r "../packages/Accord.Statistics.3.0.2/lib/net45/Accord.Statistics.dll"
//reference deelde with fsharp charting
@MartinBodocky
MartinBodocky / GetNugetPackagesLocal.ps1
Last active Sep 29, 2015
The script will be download most used Nuget packages, or just those which are in packages.config file.
View GetNugetPackagesLocal.ps1
# --- settings ---
$feedUrlBase = "http://go.microsoft.com/fwlink/?LinkID=206669"
# the rest will be params when converting to funclet
$forceLatest = $false
$latest = $true
$overwrite = $false
$top = 500 #use $top = $null to grab all
$destinationDirectory = join-path ([Environment]::GetFolderPath("MyDocuments")) "NuGetLocalNew"
$packageFile =(Resolve-Path ".\").Path + "\packages.config"
@MartinBodocky
MartinBodocky / RefreshNugetPackages.ps1
Created Sep 22, 2015
The script will reinstall all nuget packages installed in your project.
View RefreshNugetPackages.ps1
# Reinstall Nuget Packages into project
$packageFile =(Resolve-Path ".\").Path + "\packages.config"
if(Test-Path -Path $packageFile)
{
# get only packages mentioned inside packages config
[xml]$xmlContent = Get-Content $packageFile
# packages
$packages = $xmlContent.SelectNodes("//packages//package")
@MartinBodocky
MartinBodocky / MSMQ_Administration.fs
Last active Aug 29, 2015
MSMQ Administration with F#
View MSMQ_Administration.fs
#I @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\"
#r "System.Messaging.dll"
open System
open System.Messaging
open System.Diagnostics
// create message queue
MessageQueue.Create(@".\private$\r_default-queue")
You can’t perform that action at this time.