Skip to content

Instantly share code, notes, and snippets.

View ajaygunalan's full-sized avatar
😎
Fully Loaded

Ajay Gunalan ajaygunalan

😎
Fully Loaded
View GitHub Profile
@ajaygunalan
ajaygunalan / OCTRegistration.py
Created April 3, 2023 12:51
OCT Image registration using template matching. It takes two input images, resizes one of them, finds the correlation between the two images, and then registers them by placing the resized image on top of the other image at the location of highest correlation.
import cv2
import numpy as np
import matplotlib.pyplot as plt
def resize_image(image, zoom_factor):
height, width = image.shape[:2]
new_height, new_width = int(height * zoom_factor), int(width * zoom_factor)
return cv2.resize(image, (new_width, new_height), interpolation=cv2.INTER_LINEAR)
def register_images(img1, img2):
#!/bin/bash
#findusbdev.sh
if [[ "$1" =~ ^(-h|--help)$ ]]; then
echo "Find which USB devices are associated with which /dev/ nodes
Usage:
$0 [-h|--help] [searchString]
-h | --help Prints this message
Command Keys
To search super + a
To close search alt + f4
To switch workspace super + s
To toggle windows alt + tab
To resize the current window cltrl + alt + [numpad]
To shift to right tabs ctrl +tab
To shift to left tabs ctrl +shit +tab
To close a tab ctrl + w
@ajaygunalan
ajaygunalan / Ctrl_c_catcher_linux.cpp
Created April 2, 2019 07:08
Sample code to execute something at the termination of the programm in Linux
#include <iostream>
#include <csignal>
#include <stdlib.h>
#include <unistd.h>
void signalHandler( int signum ) {
std::cout << "Interrupt signal (" << signum << ") received.\n";
// cleanup and close up stuff here
@ajaygunalan
ajaygunalan / install
Last active December 7, 2018 22:19
Installation of few essential software in Linux. See the comment for further detail.
# ROS Installation
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
sudo rosdep init
rosdep
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
from __future__ import division
import sys
import sysv_ipc
sys.path.append('.')
import RTIMU
import os.path
import time
from smbus import SMBus
import Adafruit_PCA9685
import math
@ajaygunalan
ajaygunalan / controller.py
Last active March 29, 2019 08:36
Non-Block Communication in Python
from non_blocking import *
def HigherControl(k, v0):
if k == 'w':
v = v0 + 0.001
elif k == 's':
@ajaygunalan
ajaygunalan / gist:a4547569ab71503f335d2f259f0352a2
Created November 12, 2018 18:21 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: