Skip to content

Instantly share code, notes, and snippets.

View thasan3003's full-sized avatar
💭
Studying...

Md. Tahmid Hasan thasan3003

💭
Studying...
View GitHub Profile
@thasan3003
thasan3003 / Image_matching_and_Homogeneous_transformation.py
Created November 26, 2019 18:30
Finding key-points (Harris corner detection), Descriptor (SIFT like descriptor), Matching (Euclidean distance, Cosine similarity, Nearest Neighbor Distance Ratio), Finding Homography matrix (using SVD), Homogeneous transformation (using Backward Warping and Bi-linear Interpolation)
# ==================================================
# Md. Tahmid Hasan
# Web: tahmidhasan3003
# ==================================================
import cv2
import numpy as np
import math
from matplotlib import pyplot as plt
@thasan3003
thasan3003 / Caesar Cipher.cpp
Created December 2, 2018 12:23
Caesar Cipher is the most common encryption decryption algorithm in cryptography. It is a type of substitution cipher technique.
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
using namespace std;
string encDec(string inputText, int key, bool encryption)
@thasan3003
thasan3003 / Playfair Cipher.cpp
Created December 2, 2018 13:02
Playfair Cipher is another most common encryption decryption algorithm in cryptography. It is a type of substitution cipher technique. It is an example of block cipher.
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
using namespace std;
char table[5][5];
@thasan3003
thasan3003 / S-DES Key Generation.cpp
Created December 2, 2018 13:28
This is only the key generation part of S-DES.
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
using namespace std;
int p10[10]= {3,5,2,7,4,10,1,9,8,6}, p8[8]= {6,3,7,4,8,5,10,9};
@thasan3003
thasan3003 / Simple Math Expression.cpp
Last active November 17, 2019 04:11
This can solve simple mathematical expressions including parentheses, division, multiplication, addition and subtraction respectively with spaces and without spaces. But it cannot detect wrong expressions.
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
#include<sstream>
using namespace std;
@thasan3003
thasan3003 / Finding Block in a Graph.cpp
Last active September 26, 2019 07:25
This algorithm finds blocks in a graph. Detailed description is given in code as comment.
/*
====================================================
################## Code Author ##################
====================================================
Md. Tahmid Hasan
#tahmidhasan3003
====================================================
Code Title: Finding Block in a Graph.cpp
====================================================
############## Algorithm Reference ##############
@thasan3003
thasan3003 / Insertion Sort.cpp
Last active December 2, 2018 13:07
Insertion Sort in C/C++
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
using namespace std;
void insertion_sort(int *a,int s)
@thasan3003
thasan3003 / Merge Sort.cpp
Last active December 2, 2018 13:06
Merge Sort in C++
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
#define L 100
using namespace std;
@thasan3003
thasan3003 / Longest Common Subsequence.cpp
Last active December 2, 2018 13:03
Longest Common Subsequence in C++
/*
Md Tahmid Hasan
CSE, BSMRSTU
tahmidhasan3003
*/
#include<bits/stdc++.h>
#define fo freopen("inlcs.txt","r",stdin)
#define N cout<<endl
#define MAX 100