Skip to content

Instantly share code, notes, and snippets.

View Ritesh1991's full-sized avatar

Ritesh Ritesh1991

  • India
View GitHub Profile
@Ritesh1991
Ritesh1991 / Google Colab SSH
Created December 13, 2020 10:28 — forked from yashkumaratri/Google Colab SSH
SSH into google colab
#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
import numpy as np
import cv2
import math
#capture webcam video
cap = cv2.VideoCapture(0)
width, height = 1920,1080
cap.set(3,width)
cap.set(4,height)
#create a method that can seperate the foreground from the background