Skip to content

Instantly share code, notes, and snippets.

View sscdotopen's full-sized avatar

Sebastian Schelter sscdotopen

View GitHub Profile
@sscdotopen
sscdotopen / order-dd.rs
Created March 7, 2024 12:14
Implementation of the incremental view maintenance example from our lecture in Differential Dataflow
extern crate timely;
extern crate differential_dataflow;
use timely::dataflow::operators::probe::Handle;
use differential_dataflow::input::Input;
use differential_dataflow::operators::*;
fn main() {
@sscdotopen
sscdotopen / mean-dd.rs
Last active January 8, 2025 19:00
Efficient maintenance of the mean of a bag of numbers with differential dataflow
extern crate timely;
extern crate differential_dataflow;
use serde::{Serialize, Deserialize};
use timely::dataflow::operators::probe::Handle;
use differential_dataflow::input::Input;
use differential_dataflow::operators::*;
use differential_dataflow::difference::{Abelian, IsZero, Monoid, Semigroup};
import ...
def hpo(train_data, test_data, feature_transformation):
best_accuracy = 0.0
best_regularizer = None
for regularizer in [None, 'l1', 'l2']:
pipeline = Pipeline([

Input sets

a = { 4, 4, 1, 3, 1, 7, 8, 7 }
b = { 1, 9, 9, 2, 2, 3, 4 }

Intersection

a ∩ b = { 1, 3, 4 }