Skip to content

Instantly share code, notes, and snippets.

Olivier Wulveryck owulveryck

Block or report user

Report or block owulveryck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@owulveryck
owulveryck / iris.csv
Last active Oct 31, 2019
Linear regression on iris dataset with Gorgonia and gota
View iris.csv
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@owulveryck
owulveryck / kafka_test.go
Created Oct 17, 2019
kafka connect from Go with certificates
View kafka_test.go
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"io/ioutil"
"log"
"os"
"testing"
@owulveryck
owulveryck / compare_tensor.go
Last active Aug 17, 2019
yolo testing material
View compare_tensor.go
func eqInDelta(a,b tensor.Tensor, delta float32) bool {
outputValue := outputT[0].Data().([]float32)
expectedValue := expectedOutput.Data().([]float32)
if ! outputT[0].Shape().Eq(expectedOutput.Shape()) {
return false
}
for i := 0; i < len(outputValue); i++ {
if math.Abs(float64(outputValue[i]-expectedValue[i])) > delta {
return false
@owulveryck
owulveryck / keybase.md
Created May 16, 2019
keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am owulveryck on github.
  • I am owulveryck (https://keybase.io/owulveryck) on keybase.
  • I have a public key whose fingerprint is CA7D BBE2 A8D3 41AD 5419 D40F 2503 3D41 B2EA 07D5

To claim this, I am signing this object:

@owulveryck
owulveryck / main.go
Last active Apr 16, 2019
terraform tfvars diff: do a diff against two tfvars and returns an error if they do not contain the same variables.
View main.go
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"github.com/hashicorp/hcl"
@owulveryck
owulveryck / main.go
Created Apr 11, 2019
Simple snake_case to camel case converter (https://play.golang.org/p/RtAzmSgnnvM)
View main.go
package main
import (
"fmt"
"regexp"
"strings"
)
func main() {
fmt.Println(toCamelCase("blo_bla_Di_bla"))
@owulveryck
owulveryck / main.go
Created Jan 2, 2019
read file from string
View main.go
func main() {
b, err := ioutil.ReadFile("model.onnx")
if err != nil {
panic(err)
}
/*
var qb bytes.Buffer
fmt.Fprint(&qb, `data := "`)
print(&qb, b)
fmt.Fprint(&qb, `"`)
@owulveryck
owulveryck / AAAReadme.md
Last active Nov 16, 2018
Markdown on the fly
View AAAReadme.md

Usage

go run *go github.com/owulveryck/test/
View main.go
package main
import (
"image/color"
"log"
"math"
"os"
"gonum.org/v1/plot"
"gonum.org/v1/plot/plotter"
View output.txt
Executing im2col<(3,3), (1, 1), (1,1) (1, 1)> [CPU0] CPU2 false false false. Node is: 2
Inputs:
⎡ 0 1 2 3 4⎤
⎢ 5 6 7 8 9⎥
⎢ 10 11 12 13 14⎥
⎢ 15 16 17 18 19⎥
⎣ 20 21 22 23 24⎦
You can’t perform that action at this time.