Skip to content

Instantly share code, notes, and snippets.

View kHarshit's full-sized avatar
:octocat:
hi there :)

Harshit Kumar kHarshit

:octocat:
hi there :)
View GitHub Profile
@okomarov
okomarov / check_gpu_ram_colab.py
Created July 18, 2018 15:15
Check allocated GPU by Colab
# memory footprint support libraries/code
!ln -sf /opt/bin/nvidia-smi /usr/bin/nvidia-smi
!pip install gputil
!pip install psutil
!pip install humanize
import psutil
import humanize
import os
import GPUtil as GPU
@TheSalarKhan
TheSalarKhan / transform.py
Created March 23, 2016 22:19
Perspective transformation using Open CV and Python
# This script does a perspective transformation with an A4 paper
# Get an A4 sheet, put it on a table in front of your webcam
# just close enough so that all its corners are visible.
# Run this script, you will be given a frame from the webcam.
# Pick the corners of the A4 sheet for the software, by double clicking on its corners
# one by one in the following order: top left, top right, bottom left, bottom right.
# Just as you select the last corner, a live feed without the perspective distortion
# shows up and now you can write something on it, and have a view of it as if
# the camera was right on top of it. Cheers!
# visit: