Skip to content

November of 2021

Computer Science

GNULinux

(../git.md)

  • New: Git stash.

    If you have uncommitted changes and you want to switch to another branch, you can temporarily save those changes with:

    git stash
    

    Then, to reapply them, do:

    git stash pop
    

(../computer_science/gnu_linux/postgresql.md)

  • New: Change user password.

    ALTER USER user_name WITH PASSWORD 'new_password';
    

Programming

(../computer_science/programming/python/asyncio.md)

(../computer_science/programming/python/pip.md)

  • New: Requirements files structure.

Other

  • New: Retrying library for Python.

    from tenacity import retry, stop_after_attempt, wait_exponential
    
    @retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=0.1))
    def somefunction():
      raise Exception
    

    The function will be retried a maximum of 3 times, waiting 0.1 s, 0.2 s and 0.4 s between each attempt respectively.