This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Bu bir yorum satırı. | |
-- DDL vs DML | |
-- Data Definition Language | |
-- Data Manipulation Language | |
-- select -> okuma | |
-- * -> tüm kolonlar | |
-- from X -> şu tablodan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import Seq2SeqTrainer, Seq2SeqTrainingArguments, AutoModelForSeq2SeqLM, AutoTokenizer | |
from datasets import load_dataset | |
model_name = "t5-small" | |
tokenizer = AutoTokenizer.from_pretrained(model_name) | |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name) | |
dataset = load_dataset("xsum") # Örnek: haber özeti | |
def preprocess(example): | |
inputs = tokenizer("summarize: " + example["document"], truncation=True, padding="max_length", max_length=512) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
BASE_URL = "https://gyk.halitkalayci.com/blogs" | |
def get_blogs(): | |
response = requests.get(BASE_URL) | |
if response.status_code == 200: | |
return response.json() | |
return f"Veriler çekilirken bir hata oluştu: {response.status_code} {response.text}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.etiya; | |
public class Main | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("Hello world!"); | |
System.out.println("Etiya"); | |
// değişken_tipi ismi = değeri; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Merhaba dünya"); | |
// TİP GÜVENLİLİĞİ YOKTUR! | |
// var,let,const | |
var a = 5; | |
console.log(typeof (a)); | |
a = "15"; | |
console.log(typeof (a)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
// DRY => Don't Repeat Yourself | |
// Inheritance | |
// subclass - superclass | |
public class Customer extends User | |
{ | |
public Customer(String name, String surname, String email, String password, int age, String customerNo) { | |
super(name, surname, email, password, age); | |
this.customerNo = customerNo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.turkcell; | |
public abstract class BaseLogger implements Logger | |
{ | |
//public String LOG_TYPE = "INFO"; | |
public void logMessage(String message) { | |
System.out.println("BaseLogger'dan geçti"); | |
log(message); | |
System.out.println("BaseLogger'dan çıkıyor.."); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CacheService<T> // T => Type | |
{ | |
void cache(String key, T obj) { | |
print("$obj $key değeri ile cachelendi."); | |
} | |
T getFromCache(String key) { | |
throw Exception(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soapEnvelope = new XDocument( | |
new XElement("soap:Envelope", | |
new XAttribute(XNamespace.Xmlns + "soap", "http://schemas.xmlsoap.org/soap/envelope/"), | |
new XElement("soap:Body", | |
new XElement("GetWeather", | |
new XElement("CityName", "Istanbul"), | |
new XAttribute(XNamespace.Xmlns + "xsi", "http://www.w3.org/2001/XMLSchema-instance"), | |
new XAttribute(XNamespace.Xmlns + "xsd", "http://www.w3.org/2001/XMLSchema") | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
public class Main | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("Merhaba, Tobeto"); | |
// [veri_türü] [degisken_ismi] = [baslangic_degeri] | |
String text = "Merhaba, Java 2A"; |
NewerOlder