Skip to content

Instantly share code, notes, and snippets.

View probinso's full-sized avatar
🥕

Philip probinso

🥕
  • Sad Clown Factory
  • Portland, OR
  • 11:26 (UTC -07:00)
View GitHub Profile
@probinso
probinso / auth-interceptor.service.ts
Created May 1, 2019 16:31
Cookie intercepting for authentication on NativeScript angular
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { tap } from "rxjs/operators";
import {
HttpInterceptor,
HttpHandler,
HttpRequest,
HttpEvent
} from "@angular/common/http";
using Distances
using Distributions
ncol = (matrix) -> size(matrix, 2)
nrow = (matrix) -> size(matrix, 1)
function k_means(M::Matrix, k::Integer, miters::Integer = 100, d_func = euclidean)
# Normalization
M_μ = mean(M, 2)
M_σ = std(M, 2)