Skip to content

Instantly share code, notes, and snippets.

View emre's full-sized avatar
🎯
Focusing

emre emre

🎯
Focusing
View GitHub Profile
@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 / room_category_logic.py
Created June 16, 2017 08:44
room category logic.py
category_tuples = [
CategoryTuple(priority=7,
name='Villa',
excluded=['dorm', 'bunk', 'shared', 'dormitory', 'bunkbed',
'bunk bed', 'shared facility'],
included=['villa']),
CategoryTuple(priority=6,
name='Apartment',
excluded=['dorm', 'bunk', 'shared', 'villa', 'dormitory',
'bunkbed', 'bunk bed', 'shared facility'],
@emre
emre / quotes.md
Last active August 29, 2015 14:28
code simplicity quotes

“The most famous error in this area is what we call “premature optimization.” That is, some developers seem to like to make things go fast, but they spend time optimizing their code before they know that it’s slow! This is like a charity sending food to rich people and saying, “We just wanted to help people!”

“You generally should not add comments that say what a piece of code is doing. That should be obvious from reading the code. If it isn’t obvious, the code should be made simpler. Only if you can’t make code simpler should you have a comment explaining what it does.

@emre
emre / cointellect.sh
Created December 22, 2014 12:08
cointellect installer
sudo aptitude install git -y
git clone https://github.com/pooler/cpuminer
cd cpuminer
sudo aptitude install automake -y
sudo aptitude install pkg-config -y
sudo aptitude install gcc -y
sudo aptitude install make -y
sudo aptitude install libcurl3-gnutls-dev -y
./autogen.sh
./configure CFLAGS="-O3"
@emre
emre / installer.py
Last active August 29, 2015 14:07
NHZ hallmark installer script
import os
import sys
import urllib2
import urllib
import json
import time
import re
import getpass
INSTALL_PATH = '/srv/'
@emre
emre / py.md
Last active August 29, 2015 14:05
pyistanbul 24 agustos ayi etkinligi icin olasi sunumlar
Konusmaci Konu Saat istegi
Aydan Tasdemir Supervisord ile surec yonetimi -
Samed Beyribey Ansible -
Eren Turkay Flask ve REST API 11 ya da 13
Samet Atdag TBD -
Ustun Ozgur TBD -
@emre
emre / mmc
Created December 25, 2013 15:14
memorycoin notlar
btctalk.org postu:
https://bitcointalk.org/index.php?topic=370806.900
qt-wallet
https://github.com/memorycoin/memorycoin
block explorer
http://www.chainbrowser.com/memorycoin/
exchange
@emre
emre / qrkinstall.sh
Last active January 1, 2016 01:39
qrk installer script for windows azure instances (ubuntu 13.10)
#!/bin/bash
read -p "enter your wallet address: " WALLETID
sudo apt-get update
sudo apt-get install -y git automake g++ build-essential libcurl4-openssl-dev libjansson4 libjansson-dev
if [ -d $(pwd)/quarkcoin-cpuminer ]; then
rm -r $(pwd)/quarkcoin-cpuminer
fi
git clone https://github.com/uncle-bob/quarkcoin-cpuminer
cd quarkcoin-cpuminer
./autogen.sh
@emre
emre / dogecoin
Created December 19, 2013 10:57
doge mine
https://bitcointalk.org/index.php?topic=55038.0
pool dogecoinpool.com
@emre
emre / xpm.sh
Created December 13, 2013 09:42
xpm.
apt-get update && apt-get install -y git make g++ build-essential libminiupnpc-dev && apt-get install -y libdb++-dev libgmp-dev libssl-dev dos2unix && apt-get install -y libboost1.49-all libboost-chrono1.49-dev && git clone https://github.com/thbaumbach/primecoin && cd primecoin/src && make -f makefile.unix