Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Pachamaltese pachamaltese

🎯
Focusing
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
wget https://mran.blob.core.windows.net/install/mro/3.4.2/microsoft-r-open-3.4.2.tar.gz
tar xzvf microsoft-r-open-3.4.2.tar.gz
cd microsoft-r-open
sudo ./install.sh
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
pachamaltese / 06-install-r-packages-and-other-tools
Created Dec 2, 2017
06-install-r-packages-and-other-tools
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 keyserver.ubuntu.com --recv-keys 51716619E084DAB9
printf '#CRAN mirror\ndeb https://cran.rstudio.com/bin/linux/ubuntu artful/\ndeb-src https://cran.rstudio.com/bin/linux/ubuntu 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
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 https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo
cd ~/GitHub/r-with-intel-mkl/
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt-get update && sudo apt-get install intel-mkl-64bit
@pachamaltese
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
pachamaltese / python_setup_ubuntu_17_10.sh
Last active Nov 3, 2017
Configure Python on Ubuntu 17.10
View python_setup_ubuntu_17_10.sh
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
pachamaltese / install_anaconda_ubuntu_17_10.sh
Last active Jul 1, 2018
Install Anaconda on Ubuntu 17.10
View install_anaconda_ubuntu_17_10.sh
cd Downloads
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
bash Anaconda3-5.0.1-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda3-5.0.1-Linux-x86_64.sh
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
pachamaltese / r_ubuntu_17_10.sh
Last active Jun 25, 2019
Install R on Ubuntu 17.10
View r_ubuntu_17_10.sh
# 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
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb
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.