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 June 9, 2017 15:10
Spot request in go
package main
import (
"fmt"
"log"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
@owulveryck
owulveryck / normalizationgraph.go
Last active August 9, 2017 19:40
Inception v3 in GO
func constructGraphToNormalizeImage() (graph *tf.Graph, input, output tf.Output, err error) {
const (
H, W = 299, 299
Mean = float32(0)
Scale = float32(255)
)
s := op.NewScope()
input = op.Placeholder(s, tf.String)
output = op.Div(s,
op.Sub(s,
@owulveryck
owulveryck / main.go
Created September 5, 2017 15:42
The damngina meme generator
package main
import (
"bufio"
"encoding/base64"
"fmt"
"image"
"image/color"
"image/draw"
_ "image/jpeg"
@owulveryck
owulveryck / AAaa note.md
Last active January 10, 2024 08:24
havre / a docker like that runs an embedded squashfs image

About

This is a proof of concept of a portable operating system a-la-docker.

It is a single binary that contains an image of an OS in SquashFS and the binary to run it.

a make will build the binary with an embedded alpine image. make havre-xenial will build a binary with an embedded ubuntu image.

What does the binary do?

@owulveryck
owulveryck / NordAgileTour2017_J1.md
Last active November 16, 2017 09:12 — forked from DaffyDuke/NordAgileTour2017_J1.md
NordAgileTour2017

Introduction

Ce lundi 13 novembre 2017, Audric Duchet et Olivier Duquesne étions participants à l'Agile Tour 2017, une conférence orientée développement.
Le programme se trouve ici

Les conférences auxquelles nous avons participées

L'enfance perpétuelle: survivre dans une industrie qui croit toujours au Père Noël

Laurent Bossavit, @Morendil, un mec qui bosse chez beta.gouv.fr nous fait un rappel historique sur l'informatique, le développement en général.

package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@owulveryck
owulveryck / main.go
Last active July 26, 2023 17:00
http proxy that logs...
package main
import (
"flag"
"fmt"
"io"
"log"
"net/http"
"net/http/httputil"
"net/url"
@owulveryck
owulveryck / test.ksh
Created December 11, 2017 15:26
Progress bar ksh
#!/bin/ksh
set -A PROGRESS '|' '/' '-' '\\'
i=0
while true
do
let i+=1
if [ -t 0 ]; then
#do interactive stuff
echo -e -n "Waiting for the VM to be up ${PROGRESS[$(expr $i % 4)]}\r"
fi
@owulveryck
owulveryck / main_test.go
Last active December 11, 2017 16:47
utf8 in golang...
package main
import (
"math"
"testing"
)
func σ(x float64) float64 {
return float64(1) / (1 + math.Exp(-x))
}
@owulveryck
owulveryck / panic_test.go
Last active December 23, 2017 13:22
Panic with gorgonia, but why ?
package main
import (
"log"
"testing"
G "gorgonia.org/gorgonia"
"gorgonia.org/tensor"
)