Skip to content

Instantly share code, notes, and snippets.

View mtorchiano's full-sized avatar

Marco Torchiano mtorchiano

View GitHub Profile
@mtorchiano
mtorchiano / eligendo.js
Last active June 3, 2019 13:46
Bookmarklet for scraping Italian election official website
javascript:(function() {
let res = [];
let table = $('#superTable tr');
let headings = table.eq(0).children().map( (i,x) => x.innerText ).get();
let dups = {};
headings = headings.map( e => {
let n = dups[e] | 0;
let ee = n ? e + n : e;
dups[e] = n + 1;
return ee;
@mtorchiano
mtorchiano / CTApp.svg
Last active April 30, 2020 20:14
Uno sguardo di sistema sulla "Contact Tracing App"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtorchiano
mtorchiano / PROFES2020_Timeline.R
Last active April 28, 2020 11:59
PROFES2020 Timeline diagram (post-COVID-19)
library(tidyverse)
library(scales)
schedule <- data.frame(Date = c("2020-07-13", "2020-07-20", "2020-07-27", "2020-07-31",
"2020-09-07", "2020-09-14", "2020-09-14", "2020-09-14", "2020-10-05",
"2020-10-12"),
Event = c("Abstracts", "Submission", "Submission", "Submission",
"Notification", "Notification", "Notification", "Submission",
"Notification", "Camera Ready"),
Track = c("Full", "Full", "Industry", "Short", "Full", "Industry",
@mtorchiano
mtorchiano / FlatMapExplained.java
Last active April 29, 2021 13:21
Source code for the video example of Stream.flatMap() available at: <https://youtu.be/ouinDyk-H0c>
import java.util.Arrays;
import java.util.stream.Stream;
import it.polito.po.data.Lyrics;
/**
* Explaining how Stream.flatMap() works
* with a simple code example...
* @author mtk
*
*/