Skip to content

Instantly share code, notes, and snippets.


Emre Aladağ aladagemre

View GitHub Profile
aladagemre / sehirler.html
Created Nov 10, 2014
Türkiye Şehir Listesi HTML Select Option
View sehirler.html
<select name="Sehir">
<option value="0">------</option>
<option value="1">Adana</option>
<option value="2">Adıyaman</option>
<option value="3">Afyonkarahisar</option>
<option value="4">Ağrı</option>
<option value="5">Amasya</option>
<option value="6">Ankara</option>
<option value="7">Antalya</option>
<option value="8">Artvin</option>
aladagemre /
Created Dec 30, 2020
N11 kategori listesini çeken bir script
import bs4
import csv
import requests
r = requests.get("")
soup = bs4.BeautifulSoup(r.text, features="html.parser")
with open("kategoriler.csv", "w") as csvfile:
writer = csv.writer(csvfile, delimiter=';', quotechar='"')
mcs = [(a.text, a.get('href')) for a in soup.find_all("a", class_="main-category")]
aladagemre /
Created Jul 12, 2020
Madrid Polen Crawler
This is a script for parsing polen levels in Madrid, Spain.
It used to work in 2019 but you may need to make fixes to make it work in the following years.
import re
import locale
import time
import logging
import requests
aladagemre / skulpt-reveal.html
Created Feb 20, 2014
Skulpt embedded in reveal.js: place Python interpreter in your reveal.js slides!
View skulpt-reveal.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
View tweetfetcher.go
package controllers
import (
aladagemre /
Created Dec 6, 2016
Check whether a pandas dataframe contains rows with a value that exists in another dataframe.
# We have dataframe A with column name
# We have dataframe B with column name
# I want to see rows in A with name Y such that there exists rows in B with name Y.
# It's like set intersection.
intersected = reduce(lambda x, y: x | (A['name'] == y), [False] + list(B['name']))
intersection = A[intersected]
# other alternatives
intersection = pd.merge(A, B, how='inner', on=['name'])
aladagemre /
Created May 2, 2016
Çok basit ve özensizce hazırlanmış bir bordro hesaplama scripti. Aylık brüt maaşı girin, aylık net maaş ve işveren maliyetini çıkarsın.
#encoding: utf-8
import math
ay = 1
BM = {}
EK = {}
AGI = {}
SM = {}
aladagemre /
Created Jan 20, 2016
This script looks for changes in Dropbox folder. Upon any change, waits for the status to be Up to date. When it's fully synced, starts a build process (/app/build.bin).
uptodate () {
# returns 1 if up to date, 0 otherwise.
python /root/ status | grep "Up to date" |wc -l
build_after_uptodate() {
while [ "$(uptodate)" != "1" ]; do
sleep 1
aladagemre /
Created Nov 12, 2013
Django project generation with Heroku and django-skel
import os
REGION = raw_input("Region? [US/eu] ").strip().lower() != "eu"
REGION = "us"
REGION = "eu"
PROJECT_NAME = raw_input("Project name: ")
APP_NAME = raw_input("Initial app name: ")
USE_PGSQL = raw_input("Use PostgreSQL app? [Y/n] ").strip().lower() != "n"
aladagemre /
Created Aug 27, 2013
Draft: HBaseEdgeInputFormat for Giraph
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at