TLDR: use nvm to manage node.js versions; develop and deploy with the same version. $ nvm ls-remote|tail to see the latest versions $ nvm ls-remote|grep LTS to see the “long term support” versions $ nvm install lts/erbium to install “erbium” (the latest release of version 12) $ nvm install 14 to install the latest version…
All posts by theptrk
How to set “jj” as Esc in VSCode Vim
Step 1: Open the command palette shift + cmd + p Step 2: Search for “Preferences: Open Settings (JSON)” Step 3: Add the keybinding inside the settings object “vim.insertModeKeyBindings”: [ { “before”: [“j”, “j”], “after”: [“<Esc>”] } ] Another option is “fd” instead of “jj” since this can be typed faster than “jj”. Why? “jj”…
How to install Python 3 on Mac using homebrew
tldr; install brew; brew install python Homebrew is a great installer for Mac and its main job is to make it easier to install packages. Step 1: Download Homebrew here “brew” hosts its package information here as “formulae“. Step 2: Use brew to install the latest version of Python $ brew install python –verbose Now you…
Machine Learning Introduction: My three favorite resources
My three favorite introductory resources to Machine Learning “Machine Learning” Coursera course by Andrew Ng (link) This is the canonical best introduction to machine learning. It’s recommended by most and is a top choice for introduction to ML even in some FAANG some companies. The course covers supervised learning (including linear regression and logistic regression…
Understanding Dimensions – Linear, Logistic Regression
In the forums of the Coursera course “Machine Learning” by Andrew Ng, there are many questions regarding the dimensions of the input matrix and theta. Here is an intuitive guide to understanding the dimensions. Click the link below! Understanding-Dimensions-Linear-Logistic-Regression.pdf In Summary: The dimensions of your input matrix (X) is typically clear and driven from…
Notes for Coursera Machine Learning Course with Andrew Ng (Week 1-5)
I am currently taking the Machine Learning Coursera course by Andrew Ng and I’m loving it! I’ve started compiling my notes in handwritten and illustrated form and wanted to share it here. If you are taking the course you can follow along 🙂 AI Cartoons Week 1 – 5 (PDF download link) Sign up for…
vim jj to esc mapping
For a single vim session (safe version) :inoremap jj <Esc> For every vim session (still safe) Save this to your .vimrc file in your home directory. ” this is a comment so you remember this later ” insert mode; no recursive; map; <from>; <to> inoremap jj <Esc> * change jj to anything you want, fd…
How to change your command line prompt
Your command line welcomes you with a prompt. Default OSX terminal may look like this. PS1 is the variable used by your shell to determine your command line prompt RPS1 determines your right hand prompt. Note, you can always `echo` this variable to see what these are currently set to. By default, mine is set to…
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xf1 in position 4: invalid continuation byte
TLDR: Convert your problem file with Sublime Text by opening the file and using “Save with encoding” as utf-8. Alternatively, use iconv -t UTF-8//TRANSLIT -c Zip_Zhvi_SingleFamilyResidence.csv > new_file.csv When does this error happen? I wanted to parse the housing data from Zillow at their research page. Zip code is a great measure of single family home…
Save time: npm install nodemon
Nodemon will allow you to start your node.js project and make changes without manually shutting down and restarting your server. Many people are scared of installing nodemon globally, so here’s a guide to install nodemon locally in your node.js project. Step 1: Install nodemon $ npm install nodemon –save-dev Step 2: Update your npm scripts…