Skip to content

Instantly share code, notes, and snippets.

View grgcombs's full-sized avatar

Greg Combs grgcombs

View GitHub Profile
@grgcombs
grgcombs / regression.swift
Created July 31, 2016 01:04 — forked from jarsen/regression.swift
Univariate Linear Regression
import Cocoa
class CSVDoubleSequence: SequenceType {
typealias GeneratorType = IndexingGenerator<Array<Double>>
let path: String
let values: [Double]
init(path: String) {
self.path = path
@grgcombs
grgcombs / PRHAngleGradientFilter.h
Last active August 27, 2015 03:26 — forked from boredzo/PRHAngleGradientFilter.h
Core Image custom filter to generate an angular gradient. The center is at the origin (0,0). You may want to use CIAffineTransform and/or CICrop on the output.
//
// PRHAngleGradientFilter.h
//
// Created by Peter Hosey on 2013-01-30.
// Copyright (c) 2013 Peter Hosey. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
@interface PRHAngleGradientFilter : CIFilter
import Foundation
// MARK: - Comparable
extension NSDecimalNumber: Comparable {}
public func ==(lhs: NSDecimalNumber, rhs: NSDecimalNumber) -> Bool {
return lhs.compare(rhs) == .OrderedSame
}
//
// TBSplitViewController.h
//
// Created by Tyler Bunnell on 8/4/12
// Released under the have fun with this and make cool stuff license.
//
#import <UIKit/UIKit.h>
@interface TBSplitViewController : UISplitViewController