Skip to content

Instantly share code, notes, and snippets.

View geekdinazor's full-sized avatar

Furkan Kalkan geekdinazor

View GitHub Profile
@geekdinazor
geekdinazor / bot.py
Created August 8, 2015 13:36
Basic Twitter Bot. This script read lines from filename.txt and Send tweet to spesific #hashtag using Twython Python library.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from time import sleep
from twython import Twython
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN = ''
ACCESS_TOKEN_SECRET = ''
hashtag='#Python'
twitter = Twython(CONSUMER_KEY, CONSUMER_SECRET,ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
#!/usr/bin/env python
"""
instaRaider.py
usage: instaRaider.py [-h] -u USER [-c COUNT]
@amirkurtovic
"""
from bs4 import BeautifulSoup
function replacer (numpost)
{
while (numpost>=1)
{
if (!document.getElementById(numpost))
{
alert(numpost+"th post is missing! Please contact the webmaster.")
numpost-- ;
continue;
}
@geekdinazor
geekdinazor / part1.py
Last active November 5, 2015 16:17
Hacettepe BBM103 Assigment II
def drawSquare(corner):
for i in range(0,corner):
print "*" * corner
def drawRectangle(row,column):
for i in range(0,row):
print "*" * column
def drawTriangle(row):
for row in range(0,row + 1):
@geekdinazor
geekdinazor / part2.py
Last active November 5, 2015 16:20
Hacettepe BBM103 Assigment II
def isPrime(n):
c = 0
for i in range(2,n):
if n % i == 0:
c = c + 1
if c == 0:
return True
else:
return False
@geekdinazor
geekdinazor / randomtc.py
Created November 14, 2015 00:57
Pypy için son derece hızlı rastgele ve benzersiz TC Kimlik no üretme betiği.
from random import randint
def rastgele_tc(): #http://basarancaner.blogspot.com.tr/2011/01/rastgele-tc-kimlik-no-uretici.html
tcno = str(randint(100000000, 1000000000))
list_tc = map(int, tcno)
tc10 = (sum(list_tc[::2]) * 7 - sum(list_tc[1::2])) % 10
return tcno + str(tc10) + str((sum(list_tc[:9]) + tc10) % 10)
dizi = set()
while(len(dizi) <= 100000):
@geekdinazor
geekdinazor / SNA.py
Last active November 17, 2015 00:54
Hacettepe BBM103 Assigment III Part I
def commandParser():
f = open('commandsP1.txt', 'r')
allCommands = []
for line in f:
params = line.replace('\r\n','').split(' ')
allCommands.append(params)
for command in allCommands:
if command[0] == "AU":
if len(command) != 3:
print "Error: Wrong input type for '%s'" % (command[0])
@geekdinazor
geekdinazor / PPs.py
Created November 19, 2015 20:15
Hacettepe BBM103 Assigment III Part II
def mapFileParse():
f = open('paths.txt', 'r')
for line in f:
map = []
for l in line[2:].replace('\r\n','').replace(' ',''):
map.append(l)
paths.update({line[0]:map})
f.close()
def ThreeSome(path):

Keybase proof

I hereby claim:

  • I am geekdinazor on github.
  • I am furkankalkan (https://keybase.io/furkankalkan) on keybase.
  • I have a public key whose fingerprint is F210 227A 7556 2E68 8EBE 6D12 AF0C 4FB7 A1FC 0F55

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am geekdinazor on github.
  • I am furkankalkan (https://keybase.io/furkankalkan) on keybase.
  • I have a public key whose fingerprint is F210 227A 7556 2E68 8EBE 6D12 AF0C 4FB7 A1FC 0F55

To claim this, I am signing this object: