Skip to content

Instantly share code, notes, and snippets.

View austa's full-sized avatar

Alaattin Usta austa

  • Istanbul/Turkey
View GitHub Profile
package com.misona;
import java.sql.DriverManager;
import java.sql.SQLException;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
public class Databaseİslem {
@austa
austa / matris.v
Last active August 29, 2015 14:00
///4*4 matris
module topla();
reg [3:0] matris1 [0:3][0:3];
reg [3:0] matris2 [0:3][0:3];
reg [4:0] sonuc [0:3][0:3];
integer i, j, k=0;
//matris olusturmak icin kullanilan kisim
initial begin
for( i = 0 ; i < 4; i = i+1 ) begin
*{
margin:0;
padding:0;
}
body{
font-family:"Trebuchet MS", "Myriad Pro", Arial, sans-serif;
font-size:14px;
background:#f4f4f4 url(../images/bg.gif) repeat top left;
color:#333;
text-shadow:1px 1px 1px #fff;
# Mukemmel cirpi odevi betigi.
# Oncelikle betigin calismasi icin,
# Betikle ayni dizinde "algoritmalar_2014_ogrenci_listesi.csv"
# Dosyasi bulunmalidir.
# Kodun calismasi icin ogrenci listesi dosyasini acarken cikan pencerede
# Ayirici seceneklerden "sabit genislik secilmelidir.
# Karakter kumeside UTF-8 olarak ayarlanmalidir(default)
# findStudentNumber("ALAATTIN USTA") gibi parametre verilmedir.
# Cakisma durumu ortadan kaldirilmistir, ve ogrenci numaralari
# Sorunsuz bicimde ekrana gelmektedir.
"""
Ayni dizinde bulunan algoritmalar_2014_ogrenci_listesi.csv
dosyasini en alt satirda ki;
differentValues(hashing(dosya_adi.csv)) seklinde arguman olarak verin
Cakismayan sayisi = 106, cakisan sayisi = 41 seklincde cikacaktir.
Alaattin USTA(alaattin.usta@bil.omu.edu.tr)
"""
import csv
import time
import hashlib
@austa
austa / src.go
Created December 19, 2013 06:46
package main
import (
"fmt"
"os"
"os/exec"
"strings"
)
type yolUrl struct {
#hantal
def hantal_obeb(sayi1, sayi2):
kucukSayi = kucuk_bul(sayi1, sayi2)
for i in range(kucukSayi,1,-1):
if sayi1 % i == 0 and sayi2 % i == 0:
return i
def kucuk_bul(m,n):
kucuk = m
if n < m:
kucuk = n
def uznk_bul(cumle):
bosString = ""
kelimeList = []
uzunlukList = []
for i in range(len(cumle)):
if cumle[i] != " ":
bosString += cumle[i]
if i == len(cumle) - 1:
kelimeList.append(bosString)
package main
import (
"fmt"
"github.com/ActiveState/golor"
"math/rand"
"os"
"strconv"
"time"
)
class Queue:
def __init__(self):
self.liste = []
def enqueue(self,eleman):
self.liste.insert(0,eleman)
def dequeue(self):
return self.liste.pop()
def size(self):
return len(self.liste)
def peek(self):