Skip to content

Instantly share code, notes, and snippets.

View semihozkoroglu's full-sized avatar

Semih Özköroğlu semihozkoroglu

View GitHub Profile
#include<stdio.h>
#include <unistd.h>
int main(void)
{
int i;
for (i = 0; i < 3; ++i)
fork();
printf("process...\n");
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
#include <sys/stat.h>
#define MAX_PATH_SIZE 1024
void DirWalk(const char *path, void (*Proc) (const char *))//fonksiyon işaretçileriyle dışardaki bir fonksiyona yönlendirez.
{
#!/usr/bin/ruby
class A
def initialize(x)
self.x = x #self ile x methoduna gönderiyoruz
end
def x=(x)
x[0] = x[0].chr.capitalize #x[0] ifadesi asci dönmekte ve bunu chr ile karaktere ,capitalize ile upper yapmaktayız.
@x = x
end
#!/bin/sh
awk '
BEGIN {
FS="\t"
}
{
if ( $6 > 50 ){
print "Dsn notu 50 den yuksek kisiler: "$2""
}
vizetop=vizetop+$4
#!/usr/bin/python3
#-*- coding:utf-8 -*-
sesli = ['a', 'e', 'ı', 'i', 'o', 'ö', 'u', 'ü', 'A', 'E', 'I', 'İ', 'O', 'Ö', 'U', 'Ü']
sessiz = ['b', 'c', 'ç', 'd', 'f', 'g', 'ğ', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's',
'ş', 't', 'v', 'y', 'z', 'B', 'C', 'Ç', 'D', 'F', 'G', 'Ğ', 'H', 'J', 'K', 'L',
'M', 'N', 'P', 'R', 'S', 'Ş', 'T', 'V', 'Y', 'Z' ]
@semihozkoroglu
semihozkoroglu / konvulasyon.m
Created March 24, 2011 21:00
Verilen ayrık sinyallerin çarpımı.
h = [1, 2, 3, 4, 5, 4, 3, 2 ,1];
x = [0, 10, 10, 10, 10, 10, 10, 10, 0];
subplot(3,1,1); plot(h);
subplot(3,1,2); plot(x);
p = [];
i = 0;
durum = 0;
for k = 1:(length(h)+length(x)-1)
top = 0;
@semihozkoroglu
semihozkoroglu / gitapi.rb
Created March 24, 2011 22:36
Depoyu forklayanların gistleri
#!/usr/bin/ruby
require 'net/http'
require 'open-uri'
require 'json'
print "İsim <enter> depo <enter>\n"
isim = gets.chomp!
repo = gets.chomp!
#!/usr/bin/env python
# -*- coding: utf8 -*-
def en_uzun_kelime(cumle):
liste = cumle.split()
uzunluk = map(lambda x:len(x),liste) #Burasi liste donmektedir.
print liste[uzunluk.index(max(uzunluk))] #listenin en uzununun indexini listede bul
@semihozkoroglu
semihozkoroglu / simetri
Created April 26, 2011 21:05
Uygulama_3-8 bitlik bir sayinin bitlerini ters sırada yazar
;<Program title>
mvi D , 0;
mvi E , 8;
mvi H , 0B1h;
mvi A , 1;
mov L , A;
;A 'nin kaydirilmis degeri ile H'nin o basamagindaki degerin 1 mi 0 mi oldugunu anlariz.
don: ANA H ; A ile H yi and'la ve basamagin 1 mi 0 mi oldugunu anla.
@semihozkoroglu
semihozkoroglu / Uyg-5.asm
Created May 4, 2011 21:16
Mikroişlemci 8085-Verilen adres aralıgında verilen sayıdan buyuk, kucuk, ve esit olanlarının sayısı
;<Program title>
;B eşitlerin sayısı
;C kücüklerin sayısı
;D büyüklerin sayısı
lxi h, 0200h;
mvi e, 11h
tara: dcr e; sayac
jz bitir; sifirsa bitir.
call kontrol;karsilastirma icin gonder.