Skip to content

Instantly share code, notes, and snippets.

View IAmSuyogJadhav's full-sized avatar
☝️
One thing at a time.

Suyog Jadhav IAmSuyogJadhav

☝️
One thing at a time.
View GitHub Profile
@IAmSuyogJadhav
IAmSuyogJadhav / ssh-to-gcp-as-root.md
Last active September 6, 2019 20:09
SSH to your GCP Instance as the root user, even when outbound SSH port (22) is blocked on your local system.

On Local System

  1. Run the following command to generate a key.
$ ssh-keygen

You'll be asked to enter passphrase. You can leave that empty.

Enter passphrase (empty for no passphrase):
Enter same passphrase again:
@IAmSuyogJadhav
IAmSuyogJadhav / ssh-to-gcp-as-root.md
Created September 6, 2019 19:38
SSH to your GCP Instance as the root user.even when outbound SSH port (22) is blocked on your local system.

On Local System

  1. Run the following command to generate a key.
$ ssh-keygen

You'll be asked to enter passphrase. You can leave that empty.

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Session {Session no.}

{Session Title} Conducted on: {Date}

Agenda

{A short outline of the session}

Abstract

FaceSearch: Searches for faces in a given image using OpenCV and the Google Reverse Image Search engine.

Installation

  1. Directly download the latest release from the releases page.

OR 2. First clone this repo. Now, to install the dependencies and create the alias for FaceSearch, run the install.sh.

@IAmSuyogJadhav
IAmSuyogJadhav / SSH to Colaboratory VM.txt
Last active March 19, 2019 10:56 — forked from creotiv/gist:d091515703672ec0bf1a6271336806f0
Copy and paste the following snippet in a colab cell. A slightly improved version of the parent gist, getting you the correct public address.
#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
! apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen > /dev/null
#Set root password
@IAmSuyogJadhav
IAmSuyogJadhav / use-tensorboard-on-colaboratory.ipynb
Created March 8, 2019 11:41
Use Tensorboard on Colaboratory.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@IAmSuyogJadhav
IAmSuyogJadhav / keras-model-on-android.ipynb
Last active March 8, 2019 11:37
Keras Model on Android.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import cv2
import numpy as np
image_path = 'path/to/image' # Path to the input image
bgcolor = [255, 255, 255] # BGR value of background color.
img = cv2.imread(image_path)
img = cv2.cvtColor(img, cv2.COLOR_BGR2BGRA)
img[np.all(img == bgcolor + [255], axis=2)] = [0,0,0,0]
@IAmSuyogJadhav
IAmSuyogJadhav / aossie_submission.md
Last active August 8, 2018 07:15 — forked from nveenjain/aossie_submission.md
GSoC 2018 Submission

GSoC-2018 Contribution - by Naveen

This summer has been awesome contributing to AOSSIE working with awesome mentors. Got to develop my skillset further by a level in the field of web technology.

I contributed to the Carbon Footprint project. Project URL : https://gitlab.com/aossie/CarbonFootprint

Carbon Footprint is an extension for all browsers which displays carbon footprint information in multiple maps, flights, trains, buses services.

The goals I completed during GSoC are :-

@IAmSuyogJadhav
IAmSuyogJadhav / Transparent drawings in OpenCV.py
Created July 10, 2018 09:41
Add transparency to rectangles, circles, polgons, text or any shape drawn in OpenCV.
import cv2
image = cv2.imread('test.jpg')
overlay = image.copy()
x, y, w, h = 10, 10, 10, 10 # Rectangle parameters
cv2.rectangle(overlay, (x, y), (x+w, y+h), (0, 200, 0), -1) # A filled rectangle
alpha = 0.4 # Transparency factor.