Skip to content

Instantly share code, notes, and snippets.

@ericjster
ericjster / argsort.go
Created May 16, 2019 10:22
golang argsort
// https://play.golang.org/p/A3niFJ582wJ
package main
import (
"fmt"
"sort"
)
func main() {
@ericjster
ericjster / writebinary_test.go
Created May 16, 2019 07:21
Golang write binary file using memory mapped structs
package main
// Example of writing a binary file of float structs.
import (
"log"
"os"
"reflect"
"testing"
"unsafe"
@ericjster
ericjster / plot_dbscan.py
Last active July 12, 2017 07:27
Change for scikit-learn example of dbscan clustering. Improve performance of plot_dbscan.py by minimizing calls to plot.
# -*- coding: utf-8 -*-
"""
===================================
Demo of DBSCAN clustering algorithm
===================================
Finds core samples of high density and expands clusters from them.
"""
print(__doc__)