Skip to content

Instantly share code, notes, and snippets.

View espinielli's full-sized avatar

Enrico Spinielli espinielli

View GitHub Profile
@espinielli
espinielli / belarus_stream.csv
Created August 22, 2021 08:24
Belarus arrival
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 53 columns, instead of 41. in line 5.
date,Russia,Turkey,Ukraine,Germany,Egypt,Poland,Georgia,Lithuania,Armenia,Azerbaijan,Czechia,Dominican Republic,Finland,Hungary,Italy,Moldova,Montenegro,Netherlands,Tunisia,United Arab Emirates,United Kingdom,Iraq,Belgium,Estonia,Israel,Kazakhstan,Latvia,Serbia,Tajikistan,Uzbekistan,Cyprus,France,Spain,Sweden,Switzerland,Austria,China,Turkmenistan,Malta,Libya,Albania,Uganda,Iceland,Greece,Lebanon,Romania,Zambia,Slovakia,Sudan,Luxembourg,Bosnia and Herzegovina,Kyrgyzstan
2021-05-09,6,5,5,4,3,3,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2021-05-10,4,5,7,1,1,2,1,2,1,0,0,0,1,0,1,0,0,1,0,0,0,2,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2021-05-11,1,6,5,1,5,2,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,2,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2021-05-12,4,4,6,2,3,2,2,4,1,0,1,0,1,1,1,1,0,1,0,1,1,0,0,0,1,1,0,0,0,1,0,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2021-05-13,6,4,6,0,5,2,1,3,1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,1,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,
@espinielli
espinielli / easa_noise_dataset.R
Created December 18, 2020 14:09
Scrape EASA Noise Excel files
library(readxl)
library(lubridate)
# data from
# https://www.easa.europa.eu/domains/environment/easa-certification-noise-levels
#
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20Heavy%20Prop%28200914%29.xlsm
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20JETS%28201015%29.xlsm
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20Light%20Prop%28201012%29.xlsm
# https://www.easa.europa.eu/sites/default/files/dfu/MAdB%20HELICOPTERS%28201012%29.xlsm
@espinielli
espinielli / gist:80cfc1e5e55eb3b1854d330524addadf
Created March 14, 2020 17:02
download and extract mp3 from youtube
Download a youtube sound track from a video and extract a subset (for example for a phone ringtone)
```
$ youtube-dl --extract-audio --audio-format mp3 https://youtu.be/lhlvV7mjeJM
$ ffmpeg -ss 00:00:45 -t 00:00:45 -i La\ vita\ è\ bella\ -\ Colonna\ sonora\ \(original\ soundtrack\)\ -\ brano\ -\ \'La\ vita\ è\ bella\'-lhlvV7mjeJM.mp3 lveb.mp3
```
https://github.com/daattali/addinslist
devtools::install_github("seasmith/AlignAssign")
remotes::install_github("ThinkR-open/remedy")
install.packages("datapasta")
usethis::use_tidy_style()
https://github.com/hrbrmstr/hrbraddins
https://github.com/benmarwick/wordcountaddin
https://github.com/tjmahr/WrapRmd
https://github.com/ropenscilabs/gramr
@espinielli
espinielli / .gitignore
Last active January 21, 2020 08:55
R: ggplot2 map of some European airports
.Rproj.user
.Rhistory
.RData
.Ruserdata
library(dplyr)
library(dplyr)
library(ROracle)
drv <- dbDriver("Oracle")
con <- dbConnect(
drv,
Sys.getenv("PRU_TEST_USR"),
Sys.getenv("PRU_TEST_PWD"),
dbname = Sys.getenv("PRU_TEST_DBNAME"))
@espinielli
espinielli / .block
Last active November 1, 2018 14:05
China tile grid map
license: mit
@espinielli
espinielli / .gitignore
Last active October 17, 2017 15:14
polygon area in R with sf
.Rproj.user
.Rhistory
.RData
.Ruserdata
@espinielli
espinielli / README.md
Last active April 11, 2023 06:46
Platonic Geodesic

Use the range slider to change the degree of subdivision in this geodesic sphere.

The base shape, visible when subdivision is disabled, is one of the 5 regular convex polyhedra (with triangularized faces for cube and dodecahedron), a.k.a. [Platonic solids][five]:

  • tethrahedron
  • hexahedron (cube)
  • octahedron
  • dodecahedron
  • icosahedron
@espinielli
espinielli / .block
Created September 28, 2017 15:59 — forked from mbostock/.block
Geodesic Rainbow
license: gpl-3.0