Install Screen
$ sudo apt install screen
Enter a new Screen Session
$ screen
Detach from current screen session
from IPython.display import display, Javascript | |
from google.colab.output import eval_js | |
from base64 import b64decode | |
def take_photo(filename='photo.jpg', quality=0.8): | |
js = Javascript(''' | |
// ... | |
// JavaScript code here <<== | |
// ... | |
''') |
import IPython | |
import time | |
import sys | |
import numpy as np | |
import cv2 | |
import base64 | |
import logging | |
from google.colab import output | |
from PIL import Image |
# register this function, so JS code could call this | |
output.register_callback('notebook.run_algo', run_algo) | |
# put the JS code in cell and run it | |
take_photo() |
import os | |
import sys | |
import random | |
import math | |
import numpy as np | |
import skimage.io | |
import matplotlib | |
import matplotlib.pyplot as plt | |
# Root directory of the project |
Install Screen
$ sudo apt install screen
Enter a new Screen Session
$ screen
Detach from current screen session