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 May 6, 2022 19:34
csv2root code for root-forum/49692
// code for https://root-forum.cern.ch/t/makecsvdataframe-to-convert-from-csv-to-root-file/49692
package main
import (
"bufio"
"encoding/csv"
"errors"
"flag"
"fmt"
"io"
@sbinet
sbinet / xetex-pool.c
Created September 1, 2021 13:33
XeTeX
/*
* This file is auto-generated by makecpool.
* web2c/makecpool xetex
*/
#define EXTERN extern
#include "xetexd.h"
#include <stdio.h>
#include <string.h>
@sbinet
sbinet / README.md
Last active September 2, 2020 14:44
daq-pmon results

daq-pmon results

  • ran daq-boot on daq0
  • run 254 eda(50,3,2)
  • run 255 eda(50,3,2)
@sbinet
sbinet / gen-arrow-data-primitives.py
Created April 23, 2019 14:40
pyarrow test scripts
import numpy as np
import pyarrow as pa
schema = pa.schema([
pa.field("bools", "bool", True),
pa.field("int8s", "i1", True),
pa.field("int16s", "i2", True),
pa.field("int32s", "i4", True),
pa.field("int64s", "i8", True),
pa.field("uint8s", "u1", True),
package main
import (
"fmt"
"log"
"math"
"os"
"strconv"
)
@sbinet
sbinet / README.md
Last active July 29, 2018 12:52
ML4G #1 (with Gonum/optimize)

ML4G #1 (with Gonum/optimize)

here is a re-run of JustForFunc-38 but using gonum/optimize.Minimize to find the best set of parameters fitting the dataset.

The linearRegression function is replaced with:

func minimize(xys plotter.XYs) (m, c float64) {
	xs := make([]float64, len(xys))
	ys := make([]float64, len(xys))
@sbinet
sbinet / README.md
Last active July 23, 2018 14:19
recast
$> ssh  lxplus-cloud.cern.ch

$> source ~recast/public/setup.sh
(venv) $> recast catalogue ls
Traceback (most recent call last):
  File "/afs/cern.ch/user/r/recast/public/yadage/venv/bin/recast", line 11, in <module>
    load_entry_point('recast-atlas', 'console_scripts', 'recast')()
  File "/afs/cern.ch/user/r/recast/public/yadage/venv/lib/python3.6/site-packages/click/core.py", line 722, in __call__
@sbinet
sbinet / README.md
Last active June 15, 2018 07:15
Fer latency

Fer latencies

Simple study of the following pipeline (over localhost-TCP):

  [sampler] -> [processor] -> [sink]

where the data being transferred is:

@sbinet
sbinet / README.md
Created April 30, 2018 13:15
ROOT I/O
@sbinet
sbinet / chain.go
Last active April 25, 2018 13:27
simple tree of float64
package main
import (
"fmt"
"log"
)
func main() {
log.SetFlags(0)
log.SetPrefix("")