Skip to content

Instantly share code, notes, and snippets.

View Orbifold's full-sized avatar
🍀
Happy. Thinking. Understanding.

Francois Vanderseypen Orbifold

🍀
Happy. Thinking. Understanding.
View GitHub Profile
@Orbifold
Orbifold / KendoZeppelin.py
Created November 17, 2016 07:54
Using Kendo inside a Zeppelin section is simple.
%angular
<base href="http://demos.telerik.com/kendo-ui/gantt/index">
<style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.material.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.material.mobile.min.css" />
<script src="http://kendo.cdn.telerik.com/2016.3.1028/js/jquery.min.js"></script>
@Orbifold
Orbifold / ZeppelinPlot.py
Created November 17, 2016 07:08
Zeppelin plotly example.
# if needed, install plotly via shell like so
%sh pip install plotly
#---
%pyspark
import plotly
import numpy as np
from plotly.graph_objs import Scatter, Layout
@Orbifold
Orbifold / Forecasting.ipynb
Last active April 19, 2024 17:33
A tutorial notebook on forecasting time series with R.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Orbifold
Orbifold / SMOTE.ipynb
Created November 12, 2016 15:44
Highlighting the usage of synthetic data (SMOTE) to imbalanced data.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Orbifold
Orbifold / Chi2NoiseReduction.R
Created November 11, 2016 06:36
Noise reduction using chi2. A synthetic proof by example.
probabilityInsideCluster = 0.5
probabilityOutsideCluster = 0.2
probabilityNoise = 0.3
clusterBoundaries = c(10, 25, 56, 81, 151, 293)
clientTypeCount = c(0, 0, 0, 0)
library(dplyr)
library(rpart)
# this create a frame of clients
makeClientsFrame = function(attribCount = 1000,
clientCount = 1000,
@Orbifold
Orbifold / OptimalPortfolio.R
Created November 10, 2016 13:46
Computing the efficient frontier in R
library(stockPortfolio)
library(quadprog)
library(ggplot2)
stocks <- c("SPY", "EFA", "IWM", "VWO", "LQD", "HYG")
returns <- getReturns(stocks, freq = "week")
eff.frontier <- function (returns,
short = "no",
max.allocation = NULL,
@Orbifold
Orbifold / MxNet.R
Created November 6, 2016 10:32
Image recognition with MxNet.
require(devtools)
install_version("imager", version = "0.20", repos = "http://cran.us.r-project.org")
library("mxnet")
library(imager)
# can download the model from http://www.orbifold.net/default/R/MxNet/MxNetInception.zip
model = mx.model.load("Inception_BN", iteration=39)
mean.img = as.array(mx.nd.load("mean_224.nd")[["mean_img"]])
@Orbifold
Orbifold / LinearRegressionThreeWays.ipynb
Created November 4, 2016 06:12
Standard linear regression using TensorFlow, TFLearn and sklearn.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Orbifold
Orbifold / SMOTE.ipynb
Created November 3, 2016 08:12
Synthetic Minority Over-sampling Technique.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Orbifold
Orbifold / PromisesSequence.html
Created April 15, 2016 11:58
Chaining promising so they execute sequentially.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script type="text/javascript">
var getters = [];
function getPromise(k) {