The Right Way to Export PATH in Shell

Posted on Nov 09, 2020 in Computer Science • Tagged with Computer Science, Shell, Bash, PATH, bashrc, bash_profile

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Fish Shell is preferred to Bash/Zsh. The following content is for Bash/Zsh only.

Some people suggest exporting PATH only in .bash_profile instead of in .bashrc …


Continue reading

Tips on yapf

Posted on Jul 08, 2019 in Computer Science • Tagged with programming, Python, yapf, code formatting

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Black is preferred to yapf!

yapf Online Demo

  1. There are 4 predefined styles: google, facebook, chromium, and pep8. You can specify a style to use using the …


Continue reading

Tips on Kmymoney

Posted on Oct 09, 2022 in Computer Science • Tagged with Computer Science, programming

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Mint.com is much better alternative. It is suggest that you use mint.com instead.

KMyMoney and Woob

Notice that the development of Weboob is inactive.

https …


Continue reading

Alike Objects/Functions in R

Posted on Nov 05, 2010 in Computer Science • Tagged with programming, regex, data frame, matrix, R, warning

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Matrix VS Data Frame:

  1. The data in a matrix must be of the same type while different columns in a data frame can have different types.

  2. A …


Continue reading

Functions and Calls in R

Posted on Nov 10, 2010 in Programming • Tagged with R, function, programming, call, CRAN

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

  1. "[" is a function in R. It takes elements from a container (vector, matrix, list, etc.) For example, suppose lv is a list of vectors. The following code …


Continue reading

Bash Equivalent of the ifmain Pattern in Python

Posted on Jul 28, 2022 in Computer Science • Tagged with Computer Science, programming, Shell, Bash, ifmain, Python, module, script, function, import, source

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Fish Shell is preferred to Bash/Zsh. The following content is for Bash/Zsh only.

#!/usr/bin/env bash

function install_icon.usage() {
    cat << EOF
NAME
    /scripts/sys …

Continue reading