.bash_profile for Mac

This post demonstrates how to create customized functions to bundle commands in a .bash_profile file on Mac.


Edit .bash_profile for Mac.

  1. Start Terminal
  2. Enter “cd ~/” to go to home folder
  3. Edit .bash_profile with “open -e .bash_profile” to open in TextEdit.
  4. Enter “. .bash_profile” to reload .bash_profile.

Examples

To bundle common git operations, add the following to .bash_profile file:

function lazy_git() {
    git checkout test_ver
    git add .
    git commit -a -m "$1"
    git checkout master
    git merge test_ver
    git push
    git checkout test_ver
}

To bundle common jekyll operations, add the following to .bash_profile file:

The command serve runs localhost.

function lazy_jekyll_serve() {
    cd /Users/tester/gitHubRepo/ChuaCheowHuan.github.io
    pwd
    bundle exec jekyll serve
}

The command build build the site. This command is neccessary for generating sitemap.xml & robot.txt.

function lazy_jekyll_build() {
    cd /Users/tester/gitHubRepo/ChuaCheowHuan.github.io
    pwd
    bundle exec jekyll build
}


2020

PBT for MARL

46 minute read

My attempt to implement a water down version of PBT (Population based training) for MARL (Multi-agent reinforcement learning).

Back to top ↑

2019

.bash_profile for Mac

13 minute read

This post demonstrates how to create customized functions to bundle commands in a .bash_profile file on Mac.

DPPO distributed tensorflow

68 minute read

This post documents my implementation of the Distributed Proximal Policy Optimization (Distributed PPO or DPPO) algorithm. (Distributed continuous version)

A3C distributed tensorflow

26 minute read

This post documents my implementation of the A3C (Asynchronous Advantage Actor Critic) algorithm (Distributed discrete version).

Distributed Tensorflow

76 minute read

This post demonstrates a simple usage example of distributed Tensorflow with Python multiprocessing package.

N-step targets

76 minute read

This post documents my implementation of the N-step Q-values estimation algorithm.

Dueling DDQN with PER

49 minute read

This post documents my implementation of the Dueling Double Deep Q Network with Priority Experience Replay (Duel DDQN with PER) algorithm.

Dueling DDQN

24 minute read

This post documents my implementation of the Dueling Double Deep Q Network (Dueling DDQN) algorithm.

DDQN

29 minute read

This post documents my implementation of the Double Deep Q Network (DDQN) algorithm.

DQN

24 minute read

This post documents my implementation of the Deep Q Network (DQN) algorithm.

Back to top ↑