Skip to content

Instantly share code, notes, and snippets.

View emre's full-sized avatar
🎯
Focusing

Emre Yılmaz emre

🎯
Focusing
View GitHub Profile
@emre
emre / pycharm_notes.md
Created February 20, 2013 08:54
Pycharm kullanım notları
  • CTRL + D

Secilen satiri alt satiri kopyalar.

  • CTRL + /

Secilen satirlari comment icine alir. comment edilmisse commentten cikartir.

  • CTRL + w
@emre
emre / tmux_notlari.md
Last active September 21, 2023 11:58
tmux notları

başlangıç

yeni bir oturum başlatmak

tmux new -s oturum_adi

açılan oturumu "detach" etmek.

(görünürde çıkıyoruz ama arkaplanda komut(lar) çalışmaya devam ediyor.)

@emre
emre / openapi_threads.py
Created April 17, 2023 23:39
openai lib race condition
import openai
from threading import Thread
import time
def work_with_openai(tid):
key = f"key_{tid}"
openai.api_key = key
print(f"Thread {tid} set api key as {key}")
@emre
emre / turkish_tools.py
Created August 28, 2010 12:41
Python icin turkce karakterlere uygun kucultme buyutlme fonksiyonlari
# -*- coding: utf-8 -*-
import re
class TurkishTools(object):
CHAR_MAP = {
"to_upper": {
u"ı": u"I",
u"ö": u"Ö",
@emre
emre / golang_binary_search.go
Last active October 13, 2020 23:10
binary search implementation on golang slices
package main
import (
"fmt"
)
func BinarySearch(target_map []int, value int) int {
start_index := 0
end_index := len(target_map) - 1
log-appender = {"appender":"stderr","stream":"std_error"} {"appender":"p2p","file":"logs/p2p/p2p.log"}
log-logger = {"name":"default","level":"info","appender":"stderr"} {"name":"p2p","level":"warn","appender":"p2p"}
backtrace = yes
plugin = webserver p2p json_rpc witness account_by_key reputation market_history
plugin = database_api account_by_key_api network_broadcast_api reputation_api
plugin = market_history_api condenser_api block_api rc_api
history-disable-pruning = 0
account-history-rocksdb-path = "blockchain/account-history-rocksdb-storage"
@emre
emre / keybase.md
Created September 11, 2019 11:12
keybase.md

Keybase proof

I hereby claim:

  • I am emre on github.
  • I am emrebeyler (https://keybase.io/emrebeyler) on keybase.
  • I have a public key ASCTYcWUVTTA50dn1Uzn-PZKVd2F0PBXfMLxng0BoTdj2Qo

To claim this, I am signing this object:

@emre
emre / interview_questions.md
Last active July 8, 2019 14:24
Python interview questions

What will be the output? (LUX)

c = 3

def add():
    c = c + 2
    return c
    
@emre
emre / bubbesort.go
Created August 21, 2013 12:41
bubblesort in golang
package main
import "fmt"
func main() {
x := []int{
48, 96, 86, 68,
57, 82, 63, 70,
37, 34, 83, 27,
@emre
emre / sm_giveaway.py
Created January 13, 2019 17:37
sm_giveaway.py
import requests
from lightsteem.client import Client
import random
def get_proxy_votes(c, username):
account_detail = c.get_accounts([username])[0]
if account_detail["proxy"]:
# print(f"proxy found, checking {account_detail['proxy']}")
return get_proxy_votes(c, account_detail["proxy"])