Skip to content

Instantly share code, notes, and snippets.

View AngelBerihuete's full-sized avatar
🌳

A. Berihuete AngelBerihuete

🌳
View GitHub Profile
@AngelBerihuete
AngelBerihuete / EmpiricalDualElasticity.R
Last active October 13, 2016 10:49
R function to calculate elasticity of the dual Lorenz curve
EmpiricalDualElasticity <- function(dataset){
# ###########################################################################
# R function to calculate elasticity of the dual Lorenz curve
# ---------------------------------------------------------
#
# Authors: Berihuete, A.; Ramos, C.D; Sordo, M.A. and Ramos, H.
#
# input: a dataset formatted with rtip package (https://cran.r-project.org/web/packages/rtip/)
#
# output: abscissas and ordinates of the elasticiy of the dual Lorenz curve.
@AngelBerihuete
AngelBerihuete / rtip-examples.R
Last active April 12, 2018 11:36
File to reproduce examples in paper
# Reproducible examples with rtip package
# ---------------------------------------
# Install from CRAN
# install.packages("rtip")
library(rtip)
set.seed(1972)
# Datasets
@AngelBerihuete
AngelBerihuete / make_nb.py
Created October 19, 2017 06:29 — forked from takluyver/make_nb.py
Make a notebook from a script
"""Create a notebook containing code from a script.
Run as: python make_nb.py my_script.py
"""
import sys
import nbformat
from nbformat.v4 import new_notebook, new_code_cell
nb = new_notebook()
@AngelBerihuete
AngelBerihuete / loadOwnDataset.R
Created December 1, 2017 07:58
[rtip] Load your own dataset
loadOwnDataset <- function(year = NULL, country = NULL, region = NULL, hhcsw = NULL, hhsize = NULL, ehhs = NULL, edi = NULL){
# year: year of the survey
# country: Country
# region: Region in the country
# hhcsw: Household cross-sectional weight
# hhsize: Household size
# ehhs: Equivalised household size
# edi: Equivalised disposable income (with the modified OECD scale)
@AngelBerihuete
AngelBerihuete / macro-regions.R
Created December 1, 2017 08:24
[rtip] Macro-regions analysis
require(rtip)
data(LCS2014)
# Set up dataset for Spain
ESdataset <- setupDataset(LCS2014, country = "ES")
# Set up dataset for Andalusia according to code in NUTS-2
#
# https://en.wikipedia.org/wiki/NUTS_statistical_regions_of_Spain
@AngelBerihuete
AngelBerihuete / Install NVIDIA Driver and CUDA.md
Created July 7, 2018 16:11 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@AngelBerihuete
AngelBerihuete / PPC_Plots.ipynb
Created July 13, 2018 10:34 — forked from dustinvtran/PPC_Plots.ipynb
Test Notebook to demo plot behavior
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AngelBerihuete
AngelBerihuete / wine.csv
Created August 7, 2018 08:37 — forked from tijptjik/wine.csv
Wine Dataset
Wine Alcohol Malic.acid Ash Acl Mg Phenols Flavanoids Nonflavanoid.phenols Proanth Color.int Hue OD Proline
1 14.23 1.71 2.43 15.6 127 2.8 3.06 .28 2.29 5.64 1.04 3.92 1065
1 13.2 1.78 2.14 11.2 100 2.65 2.76 .26 1.28 4.38 1.05 3.4 1050
1 13.16 2.36 2.67 18.6 101 2.8 3.24 .3 2.81 5.68 1.03 3.17 1185
1 14.37 1.95 2.5 16.8 113 3.85 3.49 .24 2.18 7.8 .86 3.45 1480
1 13.24 2.59 2.87 21 118 2.8 2.69 .39 1.82 4.32 1.04 2.93 735
1 14.2 1.76 2.45 15.2 112 3.27 3.39 .34 1.97 6.75 1.05 2.85 1450
1 14.39 1.87 2.45 14.6 96 2.5 2.52 .3 1.98 5.25 1.02 3.58 1290
1 14.06 2.15 2.61 17.6 121 2.6 2.51 .31 1.25 5.05 1.06 3.58 1295
1 14.83 1.64 2.17 14 97 2.8 2.98 .29 1.98 5.2 1.08 2.85 1045

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@AngelBerihuete
AngelBerihuete / gtop_installation_debian.txt
Last active October 9, 2018 09:10
gtop installation Debian
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install build-essential nodejs
node --version
sudo npm install gtop -g