Skip to content

Instantly share code, notes, and snippets.

@christianroy
christianroy / strava_data_example.csv
Created March 22, 2018 00:57
Tableau exemple accompagnant un billet sur Medium
Temps Distance Gain d'altitude Jour ... Sport
45 7345 62 2 ... Course
60 0 0 4 ... Spinning
38 5667 35 4 ... Course
78 18765 123 1 ... Vélo
@christianroy
christianroy / strava_data_example_2.csv
Created March 22, 2018 00:59
Autre tableau accompagnement un billet sur Medium
Temps Distance Gain d'altitude Jour ... Sport
42 7428 45 2 ... ???
120 28717 224 4 ... ???
@christianroy
christianroy / confusion_matrix.txt
Created March 22, 2018 01:04
Confusion matrix pour billet Medium
[[246 0 21 0 20 4 0]
[ 12 0 1 0 5 0 0]
[ 46 0 158 0 5 10 0]
[ 1 0 0 0 0 0 0]
[ 2 0 0 0 105 0 0]
[ 25 0 28 0 0 9 0]
[ 0 0 0 0 1 0 0]]
@christianroy
christianroy / onix_split.rb
Created July 6, 2022 14:35
Short simple script to split a multi products ONIX file into many single product ONIX files
require 'nokogiri'
filename = './input.xml'
doc = Nokogiri::XML(File.open(filename))
header = doc.css('Header')
products = doc.css('Product')
products.each do |product|
res = Nokogiri::XML::Document.new