Skip to content

Instantly share code, notes, and snippets.

View emadehsan's full-sized avatar
🤸‍♂️
Overthinking about overthinking

Emad Ehsan emadehsan

🤸‍♂️
Overthinking about overthinking
View GitHub Profile
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
@emadehsan
emadehsan / Screen Unix Cheat Sheet.md
Created April 18, 2018 11:52
Screen Linux/Unix command cheat sheet

Install Screen

$ sudo apt install screen

Enter a new Screen Session

$ screen

Detach from current screen session