Skip to content

Instantly share code, notes, and snippets.

View geekdinazor's full-sized avatar

Furkan Kalkan geekdinazor

View GitHub Profile
@geekdinazor
geekdinazor / yahtzee.py
Created April 10, 2020 15:57
yahtzee game
# Daniel Dixon
# Due: 6/02/17
# Yahtzee Code
import random
# Function
# Main menu and rules
while True:
def mainMenu():
@geekdinazor
geekdinazor / wos_to_zonedo_format.py
Last active September 20, 2018 09:17
Feed Zonedo metadata fields from Web of Science (WOS)
from wos import WosClient
from wos.utils import query
from bs4 import BeautifulSoup
from slugify import slugify
from iso639 import to_iso639_2
from suds.client import Client
import json
WOS_API_USER=""

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:

@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):
@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 / 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 / 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 / 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):
function replacer (numpost)
{
while (numpost>=1)
{
if (!document.getElementById(numpost))
{
alert(numpost+"th post is missing! Please contact the webmaster.")
numpost-- ;
continue;
}