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 / 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 / fibonacci.go
Last active August 29, 2015 14:03
golang tour solutions
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
x, y := 0, 1
return func() int {
@emre
emre / milliyet.js
Created June 9, 2014 11:42
milliyet ads
[{
'click_url': u 'http://www.milliyet.com.tr/fikirtepe-mihenk-tasi-olacak-brooklyn_park-1893627/?ZoneID=1',
'src': u 'http://icube.milliyet.com.tr/Advertorial/2014/06/06/fft60_mf4448925.Jpeg',
'code': u '<a href="http://www.milliyet.com.tr/fikirtepe-mihenk-tasi-olacak-brooklyn_park-1893627/?ZoneID=1"><img src="http://icube.milliyet.com.tr/Advertorial/2014/06/06/fft60_mf4448925.Jpeg" alt="Fikirtepe Mihenk Ta\u015f\u0131 Olacak" border="0"><strong class="title">Fikirtepe Mihenk Ta\u015f\u0131 Olacak</strong><span>Samim Hatipo\u011flu, \u0130stanbul\'un ve Fikirtepe\'nin y\xfckseli\u015fini de\u011ferlendirdi.</span></a>',
'type': 'image',
'followed_click_url': u 'http://www.milliyet.com.tr/fikirtepe-mihenk-tasi-olacak-brooklyn_park-1893627/?ZoneID=1'
}, {
'click_url': u 'http://www.milliyet.com.tr/demir-insaat-1-ayda-yuzde-10-prim-demirinsaat-1892508/?ZoneID=10',
'src': u 'http://icube.milliyet.com.tr/Advertorial/2014/06/04/fft60_mf4440835.Jpeg',
'code': u '<a href="http://www.m
@emre
emre / results.sh
Created June 4, 2014 20:51
rng - this time more loops
➜ ~ python rng.py
loop: #34, difference: 0, head:600, tail:600
loop: #37, difference: 0, head:600, tail:600
loop: #53, difference: 0, head:600, tail:600
loop: #128, difference: 0, head:600, tail:600
loop: #186, difference: 0, head:600, tail:600
loop: #200, difference: 0, head:600, tail:600
loop: #213, difference: 0, head:600, tail:600
loop: #324, difference: 0, head:600, tail:600
loop: #325, difference: 0, head:600, tail:600
We couldn’t find that file to show.
@emre
emre / imgbin.md
Last active August 29, 2015 14:00
some stuff I need to remember

diablo3

shaq

geeks and repetitive tasks