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 / 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 / dede_injector.py
Created September 16, 2010 11:07
DedeInjector is a shortcut class for making dedeler as a background into the target friend's computers.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib, os, random
"""
DedeInjector is a shortcut class for making dedeler as a background into the target friend's computers.
only supports for gnome/linux environments.
warning: do not try this on people who you don't know well. you don't know how they react after the injection.
@emre
emre / svn_remover.sh
Created September 21, 2010 13:13
.svn dosyalarini recursive bir sekilde yok eder.
find ./ -name ".svn" | xargs rm -Rf
@emre
emre / takip.py
Created November 22, 2010 15:15
Amerika vize basvurularinda idari islem sayfasindaki listeyi kontrol edip, olasi guncellemelerde mail atar.
# -*- coding: utf-8 -*-
import urllib, re, hashlib, os, smtplib
from email.MIMEText import MIMEText
class VisaChecker(object):
"""
VisaChecker script for the applicants waiting 'administrative processing'.
"""
@emre
emre / burc_bulucu.py
Created December 26, 2010 22:12
datetime formatinda gelen tarihe gore burc ismi doner.
import datetime
def _find_horoscope(bday):
if bday.month == 1 and bday.day >= 20 or bday.month == 2 and bday.day < 18:
return 'kova'
if bday.month == 2 and bday.day >= 18 or bday.month == 3 and bday.day < 20:
return 'balik'
if bday.month == 3 and bday.day >= 20 or bday.month == 4 and bday.day < 20:
return 'koc'
if bday.month == 4 and bday.day >= 20 or bday.month == 5 and bday.day < 21:
@emre
emre / yigit_ozgur.php
Created January 22, 2011 17:48
emreyilmaz.me/yigit_ozgur/ adresinde calisan kod.
<?php
class ComicPaginater {
public $pageLimit = 1100;
public $page = 0;
public $URL = 'http://www.emreyilmaz.me/yigit_ozgur';
public function __construct() {
$this->page = intval(@$_GET["page"]);
@emre
emre / tmdb-python.py
Created February 1, 2011 00:16
TMDB icin python wrapper
# -*- coding: utf8 -*-
import urllib, simplejson
class TMDBException(Exception):
"""
custom exception class for TMDB errors.
"""
pass
class TMDB(object):
@emre
emre / ddo.py
Created February 1, 2011 00:17
download dizinlerini organize eder.
# -*- coding: utf8 -*-
import os, simplejson, re
class OrganizerException(Exception):
def __init__(self, message):
self.message = message
def __str__(self):
@emre
emre / mongo_exporter.py
Created February 3, 2011 14:28
mongodb için export işlemini yapan ufak bir wrapper, dürüm!
# -*- coding: utf8 -*-
import datetime, os
class MongoDbExporter(object):
"""
a tiny wrapper for the bash utility named mongoexporter.
"""
@emre
emre / solarized.xml
Created April 8, 2011 11:33
pycharm color scheme based on solarized colors.
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="w3" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.2" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="DejaVu Sans Mono" />
<colors>
<option name="GUTTER_BACKGROUND" value="ffffff" />
<option name="WHITESPACES" value="808000" />
</colors>
<attributes>