Skip to content

Instantly share code, notes, and snippets.

View maurolepore's full-sized avatar

Mauro Lepore maurolepore

View GitHub Profile
f <- function(x) Sys.sleep(x)

# takes 3 seconds always
system.time(f(3))
#>    user  system elapsed 
#>   0.000   0.000   3.003

system.time(f(3))
#&gt; user system elapsed 

convert from .webm to .mp4

ffmpeg -i from.webm from.mp4  

crop

from=from.mp4 

The tilt system architecture

INDICATORS
--------------------------
tiltIndicator (tiltProfiles?)
* `emissions_profile()`
* `sector_profile()`
tiltTransitionRisk ^1
* `transition_risk()`

Colleague:

I have to prepare for an interview for Monday, and one of the question is if I am familiar with DevOps workflows - I was wondering if you had any resources I can read through regarding that?

Me:

Here is my response RE DevOps.


Keybase proof

I hereby claim:

  • I am maurolepore on github.
  • I am maurolepore (https://keybase.io/maurolepore) on keybase.
  • I have a public key ASBV4swEpaHUX53xsdRFETEtTcZlj0CmJm0j_04NhiuxWwo

To claim this, I am signing this object:

https://bit.ly/tilt-releases

What is a release?

A software release is an important point in the history of a software repository.

Most generally it means that users can install the released software from some platform and use it as intended to get the expected results.

# source("https://bit.ly/use_pin")
library(pins)
use_pin <- function(x, name, board = board_local(), overwrite = FALSE) {
if (!pin_exists(board, name) || overwrite) pin_write(board, x, name)
pin_read(board, name)
}
library(dplyr)
library(rvest)
library(chromote) # remotes::install_github("rstudio/chromote")
library(countrycode)
library(readr)
# ------------------------------------------------------------------------------
em_url <- "https://www.europages.co.uk/DAZUN-GMBH/00000005340662-639906001.html"
# https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/delayedAssign

# The code of any pkg, e.g. r2dii.data -----------------------------------------
# R/abcd_demo.R
abcd_demo <- head(mtcars)
delayedAssign("ald_demo", {
  warning("`ald_demo` is retired. Instead use `abcd_demo`")
  abcd_demo
})

Here: https://bit.ly/3KuXgpE

--

On my local machine

url <- "https://esastar-emr.sso.esa.int/PublicEntityDir/PublicEntityDirGridSme?term=&isForRegister=False&isForEmits=True&grid-page=3"
jsonlite::fromJSON(url)
#&gt; Error in open.connection(con, "rb"): SSL certificate problem: unable to get local issuer certificate