Skip to content

Instantly share code, notes, and snippets.


Pachamaltese pachamaltese

Block or report user

Report or block pachamaltese

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 04-install-r-microsoft
cd ~/GitHub/r-with-intel-mkl
tar xzvf microsoft-r-open-3.4.2.tar.gz
cd microsoft-r-open
sudo ./
printf 'export RSTUDIO_WHICH_R=/opt/microsoft/ropen/3.4.2/lib64/R/bin/R\n' | tee -a ~/.profile
# it was not possible to start /opt/microsoft/ropen/3.4.2/lib64/R/bin/R
# the error is:
# *** caught segfault ***
View 05-remove-non-best-performance
sudo apt-get remove r-base r-base-dev
sudo apt-get remove 'r-cran.*'
sudo apt-get autoclean && sudo apt-get autoremove
sudo apt-get build-dep r-base
sudo rm -rf /opt/R/R-3.4.2-openblas
sudo rm -rf /opt/R/R-3.4.2-defaults
sudo ln -s /opt/R/R-3.4.2-intel-mkl/bin/R /usr/bin/R
pachamaltese / 06-install-r-packages-and-other-tools
Created Dec 2, 2017
View 06-install-r-packages-and-other-tools
# remove installed user packages
rm -rf ~/R
# create new user packages directory
mkdir ~/R/
mkdir ~/R/x86_64-pc-linux-gnu-library/
mkdir ~/R/x86_64-pc-linux-gnu-library/3.4
# install common packages
R --vanilla << EOF
View 07-general-and-easy-setup
# 1: Install from Canonical (default Ubuntu repository)
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libopenblas-dev r-base
# 2: Install from CRAN mirror
sudo apt-key adv --keyserver --recv-keys 51716619E084DAB9
printf '#CRAN mirror\ndeb artful/\ndeb-src artful/\n' | sudo tee -a /etc/apt/sources.list.d/cran-mirror.list
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libopenblas-dev r-base
pachamaltese / 00-install-intel-mkl-64bit
Last active Oct 31, 2019
Install Intel MKL (64 bit) on Ubuntu 17.10
View 00-install-intel-mkl-64bit
# Option 1: Use apt-get
# keys taken from
cd ~/GitHub/r-with-intel-mkl/
sudo sh -c 'echo deb all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt-get update && sudo apt-get install intel-mkl-64bit
pachamaltese / latam
Last active Nov 9, 2017
custom keys for spain/latam notebooks
View latam
// sudo atom /usr/share/X11/xkb/symbols/latam
// Modified to type without BS
default partial alphanumeric_keys
xkb_symbols "basic" {
include "latin(type4)"
name[Group1]="Spanish (Latin American)";
pachamaltese /
Last active Nov 3, 2017
Configure Python on Ubuntu 17.10
sudo apt-get install ipython3 spyder3 virtualenv virtualenvwrapper
sudo -H pip install numpy scipy numba pandas dask matplotlib ipython jupyter jupyterlab
sudo -H pip3 numpy install scipy numba pandas dask matplotlib jupyter jupyterlab
pachamaltese /
Last active Jul 1, 2018
Install Anaconda on Ubuntu 17.10
cd Downloads
bash -b -p ~/anaconda
echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
View chl_usa_2010_hs92_4.json
[{"year":2010,"origin_id":"chl","dest_id":"usa","product_name":"Horses","id":"010101","hs92":"0101","export_val":3987823.89,"export_val_growth_pct":0.869,"export_val_growth_pct_5":-0.004,"export_val_growth_val":1854571.89,"export_val_growth_val_5":-72841.06,"world_total_export_val":2153070014.17,"origin_total_export_val":5031167.08,"import_val":1322397.45,"import_val_growth_pct":1.106,"import_val_growth_pct_5":0.046,"import_val_growth_val":694572.94,"import_val_growth_val_5":265169.63,"world_total_import_val":2153070014.17,"origin_name":"Chile","dest_name":"United States","trade_exchange_val":5310221.34,"pci":-0.143,"pci_rank":703,"pci_rank_delta":77,"rca":0.473,"top_importer_code":"gbr","top_importer":"United Kingdom","top_exporter_code":"usa","top_exporter":"United States","group_name":"Animal Products","group_id":"01","color":"#e8d58e","icon":"d3plus-1.9.8/icons/hs/hs_01.png"},{"year":2010,"origin_id":"chl","dest_id":"usa","product_name":"Bovine","id":"010102","hs92":"0102","world_total_export_val":7630212
pachamaltese /
Last active Jun 25, 2019
Install R on Ubuntu 17.10
# Install R
sudo apt-get update
sudo apt-get install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
sudo gdebi rstudio-xenial-1.1.383-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
You can’t perform that action at this time.