Skip to content

Instantly share code, notes, and snippets.

View JonasEmre's full-sized avatar
🕴️
Trying to figure out how life supposed to be.

Yunus Emre Toktaş JonasEmre

🕴️
Trying to figure out how life supposed to be.
  • Ankara, Turkey
View GitHub Profile
@JonasEmre
JonasEmre / Sınıf ve Miras
Created May 5, 2018 14:40
Nesne Tabanlı - Sınıflar
class araba():
def __init__(self,marka,model,renk,km):
self.marka = marka
self.model = model
self.renk = renk
self.km = km
def kmekle(self,yenikm):
print("KM Ekleniyor!")
self.km += yenikm
def bilgiler(self):
import random
import time
class kumandalar():
def __init__(self,tv_durumu = "Kapalı",tv_ses = 0,kanal = "TRT",kanal_listesi = ["TRT"]):
self.tv_durumu = tv_durumu
self.tv_ses = tv_ses
self.kanal = kanal
self.kanal_listesi = kanal_listesi
@JonasEmre
JonasEmre / Dosya okuma .read .readlines .readline
Created May 6, 2018 13:25
Dosya Okuma Metodları ve Kipler
# Bir dizin içerisinde dosya açma işlemleri
# Türkçe ve genel karakterler girmek istiyorsan UTF-8 olayını aynı böyle encoding etmen lazım.
file = open ("Bilgiler.txt","w",encoding="utf-8") # Sonuna "w" koyarsan Write komutu veriyorsun. Yani varsa dosya üstüne yazar yoksa yeni dosya yazar.
file.write("Eğer UTF-8 Kodu çalışıyor ise bu text dosyasında bu yazdıklarım gözükebilecektir.")
file.close()
file = open("Bilgiler.txt","a",encoding="utf-8") # W yerina A kipi kullanırsan o dosyaya append yapar girdileri varolan olaya ekler
file.write("\nBu yazdığım kısım ise append kipi ile yeni eklemiş olduğum satır olması lazım...")
file.close()
import time
class synthesizer():
def __init__(self,durum = "Kapalı",dalga = "Sinus",cutoff = 5,attack = 5,decay = 5,sustain = 5,release = 5,volume = 10,noise = "Kapalı"):
self.dalga = dalga
self.cutoff = cutoff
self.attack = attack
self.decay = decay
self.sustain = sustain
self.release = release
self.volume = volume
# Bir Pygame oyunu yapmak için başlangıç teması veya iskeleti bu şekilde
import pygame
import random
# Önceden renk kodlarını verebilirsin istersen yardımcı olur
white = (255,255,255)
black = (0,0,0)
red = (255,0,0)
green = (0,255,0)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Methods___Metodlar
{
class Program
{
@JonasEmre
JonasEmre / Random Goblin ve Orc Generator
Created May 12, 2018 21:42
Random Goblin ve Orc Generator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Inheritance
{
class Program
{
@JonasEmre
JonasEmre / Zar Çeşitleri
Created May 12, 2018 21:45
Zar Çeşitleri
class Zarlar
{
// Zar atma metodları
public int birdAltı()
{
Random zarJenerator = new Random();
int zar1 = zarJenerator.Next(1, 7);
return zar1;
}
public int ikidAltı()
@JonasEmre
JonasEmre / TextBasedGame Eskiz
Created May 18, 2018 14:56
TextBasedGame Eskiz
namespace MainModule
{
class Program
{
public static void Main(string[] args)
{
bool run = true;
while (run == true)
{
Orcs orc = new Orcs();
# Default ignored files
/shelf/
/workspace.xml