Configure a Jupyter Notebook Server

  Configure the server On the server you first create the config with: jupyter notebook –generate-config Then open the file that was created and change these 2 settings: c.NotebookApp.allow_origin = ‘*’ #allow all origins c.NotebookApp.ip = ‘0.0.0.0’ # listen on all IPs Save the file. Set a password to protect the server with: jupyter notebook…

Installing OpenCV 4 in Mac Os

Installing OpenCV 4 in Mac Os Install Anaconda Create a new environment Open the new environment in the terminal Run: conda install -c conda-forge/label/main opencv conda install notebook Jupyter notebook In the notebook import cv2 Check the version with cv2.__version__ You should see something like 4.1.1 Problems when showing an image or video If when…

Jupyter Notebook Extensions

To install the packages required with conda use the following commands: conda install -c conda-forge jupyter_contrib_nbextensions conda install -c conda-forge jupyter_nbextensions_configurator conda install -c conda-forge jupyterthemes Then run jupyter notebook Open the Extensions configurations panel http://localhost:8888/nbextensions Enable the extensions and enjoy them! Some extensions to autoformat code require autopep8 and yapf conda install -c conda-forge yapf…

Generate requirements.txt file

It is a good practice to have all the application dependencies listed in a file called requirements.txt so when we need to run the app we don’t need with all the missing requirements errors and we can easily install them with pip with one line of code. Generating the requirements.txt file We will need to…

Object Calisthenics

Jeff Bay, originally coined the term Object Calisthenics in computers. in The ThoughWorks Anthology book as a group of exercises to Object Oriented programming. By applying object calisthenics you can get code that is more: Readable Reusable Testeable Maintenable Rules 1. Only one level of indentation per method. This will make a method more readable…