Skip to content

Instantly share code, notes, and snippets.

View Twister915's full-sized avatar

Joey Twister915

  • Northern Virginia
View GitHub Profile
package main
import (
"context"
"sync"
)
type fanOutResult[K any, R any] struct {
Key K
Result R
@Twister915
Twister915 / topk.rs
Last active April 21, 2022 07:30
topk
use std::marker::PhantomData;
pub enum TopK<I, E, K, F, const N: usize> {
// this TopK has just been created and no data has been computed
// this is the initial state
Prepared {
itr: I,
f: F,
_k: PhantomData<K>,
},
@Twister915
Twister915 / main.go
Last active October 11, 2025 03:53
Scrapes all the ancient Sumerian texts
package main
import (
"context"
"io"
"log/slog"
"net/http"
"os"
"os/signal"
"path"