Pain & Suffering and Big O Notation
Pain and Suffering
- Pain is inevitable, suffering can be avoided.
- It’s about how we react to the pain that determines if we suffer or not.
- All it takes is practice.
Big O Notation
- Big O notation is used in Computer Science to describe the performance or complexity of an algorithm.
- O(1) describes an algorithm that will always execute in the same time (or space) regardless of the size of the input data set.
- O(N) describes an algorithm whose performance will grow linearly and in direct proportion to the size of the input data set.
- O(N²) represents an algorithm whose performance is directly proportional to the square of the size of the input data set.
- O(2^N) denotes an algorithm whose growth doubles with each addition to the input data set.
- O(log N) - an input data set containing 10 items takes one second to complete, a data set containing 100 items takes two seconds, and a data set containing 1,000 items will take three seconds.
Source: https://robbell.io/2009/06/a-beginners-guide-to-big-o-notation
How to Setup an Awesome Python Environment for Data Science or Anything Else
- The most important thing when working with python is the interpreter. Two tools of pyenv are: pyenv (used to install python) and pyenv-virtualenv (used to configure your global tools).
- Managing project dependencies in python can become messy or manual.Poetry helps you to easily manage your projects’ dependencies,
separate your projects through virtual environments,
and build both applications as well as libraries without headaches.
- Black is a tool for python that allows you to focus on the content. It does that by freeing you from manual code formatting through automation.
- Mypy is a static type checker for python code, that finds errors before they appear.
- Pre-commit is a tool that executes checks before you commit code to your repository.
Source: https://towardsdatascience.com/how-to-setup-an-awesome-python-environment-for-data-science-or-anything-else-35d358cc95d5