Skip to content

Instantly share code, notes, and snippets.

View sbinet's full-sized avatar

Sebastien Binet sbinet

View GitHub Profile
@sbinet
sbinet / main.go
Created April 23, 2015 11:37
panda scrap
package main
import (
"encoding/json"
"flag"
"fmt"
"net/http"
"time"
)
@sbinet
sbinet / README.md
Last active August 29, 2015 14:23
first stab at tracking kaggle challenge. (everything is licensed under BSD-3)

to run (once Go has been installed):

$ go run ./tkc.go -geo="100Mu_geodump.json" -pix="100Mu_pixclusterdump.json"
2015/06/30 17:52:42 geo: 3770
2015/06/30 17:52:42 **warn** empty EventID
2015/06/30 17:52:42 evts: 100
@sbinet
sbinet / jet-france.go
Created October 19, 2015 14:42
geo-go jet france
package main
import (
"encoding/xml"
"fmt"
"io"
"io/ioutil"
"log"
"math"
"math/rand"

hi there,

github.com/sbinet/go-clang is dead, long live github.com/go-clang!

Indeed, sbinet/go-clang is being frozen as-is and its README will redirect its users towards github.com/go-clang.

github.com/go-clang is a new organization with a new mechanical and automatized code generator, written by Markus Riedl and Markus Zimmermann.

@sbinet
sbinet / rxvt-unicode-256color.txt
Created December 10, 2015 13:08
rxvt-unicode-256color
# Reconstructed via infocmp from file: /usr/share/terminfo/r/rxvt-unicode-256color
rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
am, bce, bw, ccc, eo, hs, km, mc5i, mir, msgr, npc, xenl, xon,
btns#5, colors#256, cols#80, it#8, lines#24, lm#0, ncv#0,
pairs#32767,
acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
@sbinet
sbinet / test-plots.go
Created February 3, 2016 17:58
hplot vs plot
package main
import (
"github.com/go-hep/hbook"
"github.com/go-hep/hplot"
"github.com/gonum/plot"
"github.com/gonum/plot/plotter"
)
func main() {
@sbinet
sbinet / iplot.go
Last active February 4, 2016 12:19
package main
import (
"image"
"image/color"
"image/draw"
"log"
"math/rand"
"github.com/go-hep/hbook"
class A(object):
def __init__(self, v):
self.v = v
print "A.v:",self.v
class B(A):
def __init__(self, v):
super(B, self).__init__(v)
self.v += 10
@sbinet
sbinet / event.go
Created February 12, 2016 13:59
simple college analysis
// automatically generated!
package main
import (
"fmt"
"math"
"github.com/go-hep/croot"
"github.com/go-hep/fmom"
@sbinet
sbinet / README.md
Last active March 3, 2016 17:01
simple multi goroutine dispatcher/broadcaster

multi-goroutine-control

A simple example to test synchronizing multiple goroutines.

This application has 4 goroutines:

  • a ticker goroutine, sending data every 2 seconds to a monitor goroutine
  • a monitoring goroutine that waits on a data channel, displaying its content when there is new data
  • a user-input goroutine, waiting on stdin for user input, which is then sent to the control goroutine
  • a control goroutine that waits on a command channel, taking actions according to the received