Skip to content

Instantly share code, notes, and snippets.

View allisterb's full-sized avatar
🧛
Writing horrendous C++ code

Allister Beharry allisterb

🧛
Writing horrendous C++ code
View GitHub Profile
@allisterb
allisterb / FunConf 2019 presentation.ipynb
Created November 14, 2019 23:39
Lightweight Dependent Types for Scientific Computing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@allisterb
allisterb / LogisticRegression.cs
Last active August 23, 2018 16:58
Lokad Logistic Regression kernel using Adrien
int ClientsDim = 2276210, ProductsDim = 58989, HDim = 24, LDim = 1;
Vector clients = new Vector("clients", ClientsDim), products = new Vector("products", ProductsDim), labels = new Vector(HDim);
var (W0, W1) = Tensor.TwoD("W0", (HDim, ClientsDim), "i", out Index i, out Index j).Two();
var (b0, b1) = new Scalar("b0", HDim).Two();
var E1 = W0 * clients + b0;
var E2 = W1 * products + b1;
var z = new Scalar("z", SUM[E1 * E2]);
@allisterb
allisterb / BsonSerializer.cs
Created December 27, 2015 00:57
ISerializer implementation of a BSON serializer for BPlusTree
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CSharpTest.Net.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Bson;