Skip to content

Instantly share code, notes, and snippets.

View owulveryck's full-sized avatar

Olivier Wulveryck owulveryck

View GitHub Profile
@owulveryck
owulveryck / main.go
Created January 2, 2019 15:37
read file from string
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 November 16, 2018 00:13
Markdown on the fly

Usage

go run *go github.com/owulveryck/test/
package main
import (
"image/color"
"log"
"math"
"os"
"gonum.org/v1/plot"
"gonum.org/v1/plot/plotter"
@owulveryck
owulveryck / output.txt
Created September 6, 2018 10:19
Gorgonia Im2Col
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⎦
@owulveryck
owulveryck / README.md
Last active August 1, 2021 17:06
Simple linear regression with plot in go with gonum

Very simple linear regression

curl -s //www.lauradhamilton.com/data_files/cricket_chirps_versus_temperature.txt | go run main.go > output.svg
2018/06/13 19:57:59 3.3057614388773593*x+24.966014428303183
@owulveryck
owulveryck / main.go
Created May 13, 2018 20:09
Tic-Tac-Toe brute force generation
package main
import (
"fmt"
)
type tttBoard [9]int
/*
func (b tttBoard) String() string {
@owulveryck
owulveryck / main.go
Last active April 10, 2018 13:25
Creating a design document, a view and a query on couchbase 5.0
package main
import (
"fmt"
"log"
"gopkg.in/couchbase/gocb.v1"
)
func main() {
@owulveryck
owulveryck / main.go
Created April 3, 2018 13:32
Get files commits from git
package main
import (
"bufio"
"bytes"
"fmt"
"io"
"log"
"os"
"os/exec"
@owulveryck
owulveryck / catLastDump.sh
Created March 29, 2018 15:29
catLastDump.sh
#! /bin/sh
DEFAULT_REMOTE=/tmp
usage(){
{
echo "$0 usage"
echo "Config:"
echo "\tENVIRONMENT"
echo "\tREMOTE_DIR (default to ${DEFAULT_REMOTE})"
@owulveryck
owulveryck / main.go
Last active March 7, 2018 06:36
TOSCA to Graph
package main
import (
"fmt"
"log"
"os"
"github.com/gonum/graph/encoding/dot"
"github.com/owulveryck/toscalib"
"github.com/owulveryck/toscalib/graph"