Skip to content

Instantly share code, notes, and snippets.

View seyyah's full-sized avatar

seyyah seyyah

View GitHub Profile
% http://stackoverflow.com/questions/27693593/color-correcting-images-in-matlab
% https://ia802707.us.archive.org/23/items/Lectures_on_Image_Processing/EECE253_05_ColorCorrection.pdf
close all;
clear all;
im1 = imread('http://i.stack.imgur.com/GtgHU.jpg');
im2 = imread('http://i.stack.imgur.com/wHW50.jpg');
rng(123); %// Set seed for reproducibility
num_colours = 2000;
ind = randperm(numel(im1) / size(im1,3), num_colours);
td= truncate(period.program.name, length: 30)
td= truncate(period.name, length: 47)
td= period.code
td
- if can? :read, Student
= link_to "Öğrenciler", students_admin_period_path(period)
span |
= link_to (t "general.show"), [:admin, period]
- if can? :update, Period
span |
@seyyah
seyyah / attachment.rb
Last active October 14, 2015 07:23 — forked from madwork/attachment.rb
class Attachment < ActiveRecord::Base
mount_uploader :attachment, AttachmentUploader
# Associations
belongs_to :attached_item, polymorphic: true
# Validations
validates_presence_of :attachment
@seyyah
seyyah / my.cnf
Last active August 29, 2015 14:09 — forked from roktas/my.cnf
[mysqld]
# ----------------------------------------------------------------------
# UTF-8 temiz bir mysql için ilgili yapılandırma
# ----------------------------------------------------------------------
init_connect=’SET collation_connection = utf8_general_ci’
init_connect=’SET NAMES utf8′
character-set-server=utf8
collation-server=utf8_general_ci
@seyyah
seyyah / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# coding: utf-8
require 'savon'
require 'awesome_print'
class KPSSorgu
# T.C. Kimlik ile Kişi Sorgulama - Konfigürasyon
@@tc_bilgi_client = Savon.client(
wsdl: "http://192.168.33.25/KPSService/servicetckimliksorgula.asmx?WSDL",
namespace: "http://tempuriTCKimlik.org/",
s = Stack()
s.push('Ruby')
s.push('Perl')
s.push('Go')
while not s.isEmpty():
s.pop()
s.pop()
@seyyah
seyyah / h20131105.m
Last active December 27, 2015 11:49
Harita Mühendisliği Bölümü Bilgisayara Giriş Dersi, 2013-2014 Güz
clc
as = input('Arasinav');
ds = input('Final');
ort = as * 40/100 + ds * 60/100
clc
disp('Vucut-Kitle Index Hesaplama Programina Hosgeldiniz');
boy = input('Boyunuz: ');
kilo = input('Kilonuz: ');
@seyyah
seyyah / h20131022_if.m
Last active December 27, 2015 11:39
Harita Mühendisliği Bölümü Görsel Programlama Dersi, 2013-2014 Güz
- max
- mutlak
- BMI
- Hal (katı, sıvı, gaz)
- Ortalama: geçti, kaldı
@seyyah
seyyah / boncuk.m
Last active December 27, 2015 03:58
DIP LAB
clear all; close all; clc;
im = imread('http://i.imgur.com/TwDQZKO.jpg');
r = im(:,:, 1);
g = im(:,:, 2);
b = im(:,:, 3);
figure(1);
subplot(2,2,1); imshow(im); title('Boninon');