Related Posts
BFS vs DFS Graph Search Algorithms in Python
Here are implementations of iterative BFS and DFS search algorithms in Python. These are just to illustrate the slight difference in implementation of these algorithms. Basically, if you want to go deep, with DFS, you can use a queue on which you’ll be adding the next elements to explore as you traverse the graph. If […]
How to enable source highlighting when doing `less mycodefile.ext`
How to enable source highlighting when doing less mycodefile.ext Install source-highlight sudo apt install source-highlight Configure it on your .bash_profile lessWithSourceHighlightSetup() { # location of the script may vary src_hilite_pipe_script=`dpkg -L libsource-highlight-common | grep lesspipe` export LESSOPEN=”| ${src_hilite_pipe_script} %s” export LESS=’ -R ‘ } lessWithSourceHighlightSetup Use it on any code file less -N /path/to/mycode.ext view […]