Skip to content

Instantly share code, notes, and snippets.

:octocat:
ikigai

Sanzhar Askaruly tuttelikz

:octocat:
ikigai
Block or report user

Report or block tuttelikz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tuttelikz
tuttelikz / less_gray_fig.m
Created Jun 4, 2019
The outer space in figure is minimized
View less_gray_fig.m
set(gca,'position',[0 0 1 1],'units','normalized')
@tuttelikz
tuttelikz / createGui.m
Created May 14, 2019
Creates GUI in MATLAB programmatically
View createGui.m
copyfile(fullfile(docroot, 'techdoc','creating_guis',...
'examples','simple_gui2*.*')), fileattrib('simple_gui2*.*', '+w');
edit simple_gui2.m
@tuttelikz
tuttelikz / fuseImages.m
Created May 14, 2019
This is gist to overlay images onto each other and compare fuse
View fuseImages.m
img_fused = imfuse(img1,img2,'falsecolor','Scaling','joint','ColorChannels',[1 2 0]);
@tuttelikz
tuttelikz / NaiveBayes.py
Last active Mar 19, 2019
Naive Bayes From Scratch in Python
View NaiveBayes.py
#How To Implement Naive Bayes From Scratch in Python
#http://machinelearningmastery.com/naive-bayes-classifier-scratch-python/
#Dataset
#https://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.data
import csv
import math
import random
#Handle data
@tuttelikz
tuttelikz / Histogram Equalization OpenCV C++
Created Sep 21, 2016
This Gist gives a code snippet for histogram equalization in OpenCV. In line 63, you should enter your source image name
View Histogram Equalization OpenCV C++
#include <iostream>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace std;
using namespace cv;
//function to take histogram of input image
void imageHistogram(Mat image, int histogram[]) {
// initialize all intensity values to 0
View knn_image_segmentation_matlab.m
clear all, close all, clc
%% read the image
x = imread('balls.jpg');
x = imresize(x, 0.3);
figure()
imshow(x)
@tuttelikz
tuttelikz / permission_definition
Created May 25, 2018
The following lines show which permissions to define for resolving some of the errors in Android.
View permission_definition
// Solves this mentioned error:
// android.os.FileUriExposedException: file:///storage/emulated/0/test.txt exposed beyond app through Intent.getData()
// Inside Manifest, define following permissions:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
@tuttelikz
tuttelikz / calculate_time_difference.java
Last active May 23, 2018
The script to calculate time difference in Android
View calculate_time_difference.java
String tStart = "09:27:37";
String tFinish = "15:24:04";
String[] sTimeHourMinSec = tStart.split(":");
int sHour = Integer.valueOf(sTimeHourMinSec[0]);
int sMin = Integer.valueOf(sTimeHourMinSec[1]);
int sSec = Integer.valueOf(sTimeHourMinSec[2]);
String[] fTimeHourMinSec = tFinish.split(":");
int fHour = Integer.valueOf(fTimeHourMinSec[0]);
@tuttelikz
tuttelikz / req_html.html
Last active May 3, 2018
Basic template for copying and pasting into html script
View req_html.html
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Raleway" />
<link href="/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
@tuttelikz
tuttelikz / kill_node_error
Created May 2, 2018
Gist to fix error on listening node
You can’t perform that action at this time.