Skip to content

Instantly share code, notes, and snippets.

View bohdanszymanik's full-sized avatar

Bohdan Szymanik bohdanszymanik

  • Wellington, New Zealand
View GitHub Profile
@bohdanszymanik
bohdanszymanik / txnSimulator.fsx
Created July 16, 2013 04:41
Sample using both Windows Azure Table Storage and a bit of simulation with MathNet.Numerics.Statistics
//
// We're going to simulate some financial transactions and experiement with storing them in azure table storage
//
//#r "..\packages\Fog.0.1.3.1\Lib\Net40\Fog.dll"
//#r "..\packages\FogMyBuild\Debug\Fog.dll"
//#r "Microsoft.WindowsAzure.Diagnostics"
#r @"C:\wd\AzureTxnUploader\packages\WindowsAzure.Storage.2.0.6.0\lib\net40\Microsoft.WindowsAzure.Storage.dll"
//#r @"C:\wd\AzureTxnUploader\packages\Microsoft.Data.Edm.5.5.0\lib\net40\Microsoft.Data.Edm.dll"
@bohdanszymanik
bohdanszymanik / azureTableScript.fsx
Created July 11, 2013 10:45
WindowsAzureTableStorage basic F# script sample
#r @"C:\wd\AzureTxnUploader\packages\WindowsAzure.Storage.2.0.6.0\lib\net40\Microsoft.WindowsAzure.Storage.dll"
#r @"C:\wd\AzureTxnUploader\packages\Microsoft.Data.OData.5.2.0\lib\net40\Microsoft.Data.OData.dll"
#r @"C:\wd\AzureTxnUploader\packages\Microsoft.Data.Edm.5.2.0\lib\net40\Microsoft.Data.Edm.dll"
#r @"C:\wd\AzureTxnUploader\packages\System.Spatial.5.2.0\lib\net40\System.Spatial.dll"
#r "Microsoft.WindowsAzure.ServiceRuntime"
#r "System.Data.Services.Client"
#r "System.Linq"
open System
@bohdanszymanik
bohdanszymanik / RTweetsAnalysis.R
Last active December 19, 2015 12:38
R Tweets Example
# download tweets using twitter search api, combine text and count +ve -ve words to get sentiment
# minor modifications to the code taken from
# http://jeffreybreen.wordpress.com/2011/07/04/twitter-text-mining-r-slides/
library(RCurl)
library(twitteR)
library(ROAuth)
requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL = "http://api.twitter.com/oauth/access_token"
@bohdanszymanik
bohdanszymanik / IncidentAnalysis.R
Last active December 18, 2015 12:09
Example usage of R data.table in an incident analysis
# data was closed incidents in a tab separated txt file that looked like this
# week category P1 P2 P3
# sucked up into R it formed a data frame like so
# 1 28/05/2012 some category1 NA NA 1
# 2 28/05/2012 some category2 NA 2 1
# 3 28/05/2012 some category3 1 NA 1
# 4 28/05/2012 some category4 NA NA 2
# as it happens, this data was manually collected from excel spreadsheets
# unfortunately the spreadsheets were for differing week ranges and there was some overlap with
@bohdanszymanik
bohdanszymanik / kfoundry2michlet.fsx
Created May 29, 2012 10:36
MichLet file generator from Kayak Foundry export
open System
open System.IO
let cSs = File.ReadAllLines(@"C:\Extras\kfoundry1.6.4\520x50a.txt")
(*
Raw form data exported from kfoundry with baseline at the waterline looks like this:
Form Position, X (mm), Y (mm)
...
Form at 52 cm, 60, 39.3333