Skip to content

Instantly share code, notes, and snippets.

View redzhepdx's full-sized avatar
㊙️
Focusing

Redzhep Mehmedov Redzhebov redzhepdx

㊙️
Focusing
  • Otsala
  • Munich
View GitHub Profile
#include "Trie.h"
Node::Node() {
this->ch = ' ';
this->isLeaf = false;
this->str = "";
this->children = std::vector<Node*>(ALPHABET_SIZE, NULL);
}
Node::~Node() {
@redzhepdx
redzhepdx / Source.cpp
Last active December 30, 2016 15:25
Content Based Image Retrieval , Local Binary Histogram used for the detect texture similarity and 64-Bin Histogram used for the detect color similarity
#include "histograms.h"
int main() {
std::vector<string> colorImages = getFileNamesInDirectory("C:\\Users\\recep\\Desktop\\MyFiles\\C codes\\ImageRetrival\\Dataset\\Color\\*");
std::vector<string> textureImages = getFileNamesInDirectory("C:\\Users\\recep\\Desktop\\MyFiles\\C codes\\ImageRetrival\\Dataset\\Texture\\*");
std::vector<std::vector<uint32_t>> all64Histograms = computeAll64BinHistograms(colorImages, "Dataset/Color/");
@redzhepdx
redzhepdx / NavieBayesAndHierarchical.c
Last active August 4, 2018 04:26
Navie Bayes and Hierarchical Clustering Algorithms . You can obtain data set from https://archive.ics.uci.edu/ml/datasets/Dermatology here.
#include <vector>
#include <memory>
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <ctime>
#include <algorithm>
#define INSTANCE_COUNT 366
@redzhepdx
redzhepdx / KeviNBaconDistance.c
Last active December 7, 2016 18:42
Computes Kevin Bacon distances for hollywood stars , connections associated with films, you can download cast.rated.txt from -> https://www.dropbox.com/s/srbpl084ymhy5yz/cast.rated.txt?dl=0 . Also you can get information about Kevin Bacon Number in this site : https://en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
#define MAX_ACTOR_COUNT 124434
@redzhepdx
redzhepdx / Source.cpp
Created November 27, 2016 19:48
K-means and Connected Component labelling - Source cpp Algorithm Architecture - imgUtility.h includes Functions, Macros libraries and data struct type for the process RGB image
//#include "stdafx.h"
#include <iostream>
#include <opencv2\opencv.hpp>
#include "imgUtility.h"
using namespace std;
using namespace cv;
int main() {
@redzhepdx
redzhepdx / Source.c
Last active December 18, 2016 22:38
B-Search for shifted array and QuickSelect Algorithm C++,Algorithms Non-Recursive - VS2015
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <math.h>
#define internal static
#define swap(x,y) {int temp = x ; x = y ; y = temp;}
#define ELEM_NUM 5
#define MAX 10
@redzhepdx
redzhepdx / Source.c
Last active December 28, 2016 19:09
Contrast Adjustment of PGM Images .File type reading and creating includes too. VS2015 - Histogram Enhancement Algorithm
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
//Binary Switch Macros
#define HI(num) (((num) & 0x0000FF00) >> 8)
#define LO(num) ((num) & 0x000000FF)
#define GRAY_LEVEL 256
@redzhepdx
redzhepdx / network.py
Last active December 28, 2016 19:09
Python 3.X and MnistData - Digit Recgonition Neural Network
import numpy as np
import random
import mnist_loader
class Network(object):
def __init__(self,sizes):
self.num_layers = len(sizes)
self.sizes = sizes
#np.random.randn generates random gausian distribution
#giving random biases for 2. and other layers' neurons
@redzhepdx
redzhepdx / Source.c
Last active December 28, 2016 19:10
How to become famous in facebook with fastest way
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#include <time.h>
#define USER_COUNT 8
#define MAX_FRIEND_COUNT 7
@redzhepdx
redzhepdx / Edmon.cpp
Last active December 28, 2016 19:14
Computing maximum flow in flow network . Implementation of Ford-Fulkerson Algorithm-Edmonds-Karp Algorithm C++ .
#include <iostream>
#include <stdio.h>
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAXVERTICES 1000
using namespace std;
typedef struct Vertex {
int id;