Skip to content

Instantly share code, notes, and snippets.

View milkersarac's full-sized avatar
⚛️

milkersarac milkersarac

⚛️
View GitHub Profile
@milkersarac
milkersarac / showImageGrid.m
Created September 3, 2013 16:08
reads first 20 images from 2 directory and shows them in 2 different figure on a grid.
function showImageGrid( dir1, dir2 )
%showImageGrid shows two separete image grid for each directory.
% @milkers
listing1 = dir( dir1 );
figure(1);
for i=3:length(listing1)
[tempX, tempMap] = imread(listing1(i).name);
numCol = 5;
subplot(4, numCol, i-2), imshow(tempX, tempMap, 'Border', 'tight')
@milkersarac
milkersarac / write_mat_to_arff.m
Created September 3, 2013 09:33
Converts feature matrix to weka's .arff format. I used https://github.com/decabyte/arff_matlab for core functionality.
% write_mat_to_arff.m
% Authors:milkers
clear all; close all; clc;
path(path, '..');
%%
features = dir('/home/ilker/Desktop/matToArff/arff_matlab/model_features/');
filenames = dir('/home/ilker/Desktop/matToArff/arff_matlab/model_features_files/');
filename_base = '/home/ilker/Desktop/matToArff/arff_matlab/model_features_files/';
feat_base = '/home/ilker/Desktop/matToArff/arff_matlab/model_features/';
@milkersarac
milkersarac / fdupdet.sh
Created August 29, 2013 10:57
This script find and deletes duplicate images in a directory of directories. It requires 'dupinator.py' script. This is just a wrap up to call that .py script over multiple folders. For 'dupinator.py' check http://code.activestate.com/recipes/362459-dupinator-detect-and-delete-duplicate-files/ This script is faster than the later ndupdet.sh whic…
#!/bin/bash
FILES="/homes/ilker/political_influence/images/summit_images/*"
for dir in $FILES
do
echo $dir
cd $dir
ls > ../../logs_summit_images/originals/${PWD##*/}_originals.txt
cd ../../
@milkersarac
milkersarac / ndupdet.sh
Last active November 23, 2020 21:03
Near duplicate detection and deletion script. This script uses another script findimagedupes.pl
#!/bin/bash
#This script iterates over files in a folder to find near duplicate images.
#Threshold for duplicacy is set to 80%.
#This script calls a perl script 'findimagedupes.pl', it is recommended to run
# the perl script first to see if it is working appropriately.
# $perl findimagedupes.pl image1.jpg image2.jpg
#This script deletes the duplicate files and creates 2 txt files after process.
# So be careful about your first run, take your back up files as needed. No kind of warranty is provided.
#
#author: @milkers 28.08.2013
#!/usr/bin/perl -w
# findimagedupes (name to be changed later)
# copyright 2001 rob kudla
# licensed under the GNU Public License version 2.0 or later
#
# strengths: recognizes similar pictures with 98% accuracy when
# the pictures actually have unique features; generates
# collection files for easy managing of dupes with
# gqview (hopefully pixie someday)
@milkersarac
milkersarac / imageSelector.py
Created August 20, 2013 10:34
This script reads images and shows to the user one by one.
#1.This script reads images and shows to the user one by one.
#2.The images must be stored in a directory named "Images"
#3.User chooses the desired images by pressing "enter", if the image is not desired
# user should press "." first then hit "enter". If no action is desired simply
# press any other key then enter.
#4.The result images will be coppied under 2 directories created by the script.
#
#For the best performance the terminal should be arranged to "Always on Top" mode. By right
#clicking to the upper frame of the terminal.
#
@milkersarac
milkersarac / vignelli.html
Last active May 31, 2016 23:38
vignelli tumblr theme modified by me.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{Title}{block:PostTitle} — {PostTitle}{/block:PostTitle}</title>
{block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description}
<meta name="text:Disqus Shortname" content="" />
<link rel="icon" href="{Favicon}"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/>