Skip to content

Instantly share code, notes, and snippets.

View sadatnfs's full-sized avatar

Nafis Sadat sadatnfs

  • Microsoft
  • Seattle, WA
View GitHub Profile
@sadatnfs
sadatnfs / init.vim
Created July 20, 2020 04:16
Quick neovim setup
call plug#begin()
Plug 'brooth/far.vim'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'scrooloose/nerdtree' " file list
Plug 'majutsushi/tagbar' " show tags in a bar (functions etc) for easy browsing
Plug 'vim-airline/vim-airline' " make statusline awesome
@sadatnfs
sadatnfs / quick_r_build.sh
Last active March 4, 2020 16:29
Simple steps to install MKL and build R
echo "deb https://apt.repos.intel.com/mkl all main" > /etc/apt/sources.list.d/intel-mkl.list && \
echo "deb https://apt.repos.intel.com/tbb all main" > /etc/apt/sources.list.d/intel-tbb.list && \
echo "deb https://apt.repos.intel.com/daal all main" > /etc/apt/sources.list.d/intel-daal.list && \
echo "deb https://apt.repos.intel.com/mpi all main" > /etc/apt/sources.list.d/intel-mpi.list && \
apt-get update
## Set a bunch of envvars (perhaps throw these in your bashrc)
MKL_LIB_PATH="/opt/intel/compilers_and_libraries/linux/mkl/lib/intel64_lin" \
MKL="-L/opt/intel/compilers_and_libraries/linux/mkl/lib/intel64_lin -Wl,--no-as-needed -lmkl_gf_lp64 -Wl,--start-group -lmkl_gnu_thread -lmkl_cdft_core -lmkl_core -Wl,--end-group -fopenmp -ldl -lpthread -lm" \
@sadatnfs
sadatnfs / pymc3_examples_1.ipynb
Last active April 29, 2019 20:15
PyMC3 examples - 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / trying_PyMC4_unsuccessfully.ipynb
Created November 26, 2018 16:28
Attempting to make PyMC4 work
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / tfp_linear_model_testing_Random.ipynb
Created September 12, 2018 17:49
Fitting model in TFP where I try to 'randomize' the fixed coefficients
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / tfp_linear_model_testing_Fixed.ipynb
Created September 12, 2018 17:48
Fitting model in TFP with fixed effect coefficient
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / m3_gdp_linear_model_TFP.ipynb
Last active August 28, 2018 21:26
Fitting a simple random intercept model on GDP data using TFP (following the LME example on TFP page), using both iterations and convergence
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / m2_bayesian_reg_pyro.ipynb
Created August 28, 2018 21:21
Simple Bayesian Regression example using Pyro
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / m1_bayesian_reg_tfp.ipynb
Last active August 28, 2018 21:25
Fitting a simple random intercept model on GDP data using TFP (following the radon example on TFP page)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadatnfs
sadatnfs / SS_breaker.r
Created July 10, 2018 01:06
SuiteSparse limit breaker
## this script can be used to run really large models easily in order to test limits in SuiteSparse, Matrix, TMB, and INLA
## it loads simulated data created over all africa and all years
#############################################
## setup the environment for singularity R ##
#############################################
## Set core_repo location and tmb_repo loc
core_repo <- sprintf('/share/code/geospatial/lbd_core/')
tmb_repo <- sprintf('/home/j/temp/azimmer/suitesparse_overloader')