Skip to content

Instantly share code, notes, and snippets.

View iKlotho's full-sized avatar
🏠
Working from home

Umut Kahriman iKlotho

🏠
Working from home
  • İstanbul, Turkey
View GitHub Profile
@iKlotho
iKlotho / çekbw
Last active August 29, 2015 14:12
void kullanici_ekle()
{
system("cls");
first_memur();
first_kullanici();
user_information();
Sleep(3000);
system("cls");
struct kullanici users;
@iKlotho
iKlotho / Read From File Line By Line
Created December 24, 2014 17:25
Read From File Line By Line
void bilgilerimi_goruntule()
{
system("cls");
system("cls");
FILE *fileptr1;
char ch;
//open file in read mode
fopen_s(&fileptr1, "user_information.dat", "r");
ch = getc(fileptr1);
while (ch != '\n')
void bilgilerimi_goruntule()
{
system("cls");
system("cls");
FILE *fileptr1;
char ch;
//open file in read mode
fopen_s(&fileptr1, "user_information.dat", "r");
ch = getc(fileptr1);
while (ch != '\n')
void bilgilerimi_goruntule()
{
system("cls");
system("cls");
FILE *fileptr1;
char ch;
//open file in read mode
fopen_s(&fileptr1, "user_information.dat", "r");
ch = getc(fileptr1);
while (ch != '\n')
@iKlotho
iKlotho / main
Last active November 7, 2017 11:02
C Language Translate Console Program
/*++
Module Name:
main.c
Vers : v1
--*/
#define _CRT_SECURE_NO_WARNINGS
@iKlotho
iKlotho / main.cpp
Last active November 7, 2017 11:01
C Language Translate Console Program
/*++
Module Name:
main.c
Vers : v1.1
--*/
#define _CRT_SECURE_NO_WARNINGS
@iKlotho
iKlotho / webscrap.py
Created April 1, 2015 15:24
Getting data from web and store them into sqlite db
from bs4 import BeautifulSoup
from urllib2 import urlopen
import sqlite3
BASE_URL = "http://www.chicagoreader.com"
conn = sqlite3.connect('webscrap.db') # creating database
c = conn.cursor()
c.execute('''CREATE TABLE stocks
(category_url text, category text, winner text, runners_up text)''')
@iKlotho
iKlotho / YoutubeAnnotationsScraper.py
Created May 7, 2015 19:11
Youtube annotations Scraper
import requests
from bs4 import BeautifulSoup
# set userid to youtube channel id
# script will get all the annotations from user's videos
url = 'https://www.youtube.com/user/USERID/videos/browse_ajax?action_continuation=1&continuation=4qmFsgI8EhhVQ0VrOTBTOGl1SHQwZVV6Yks4TmtwX2caIEVnWjJhV1JsYjNNZ0FEQUJPQUZnQVdvQWVnRXl1QUVB'
r = requests.get(url)
soup = BeautifulSoup(r.text)
@iKlotho
iKlotho / useragents.py
Created May 8, 2015 11:58
User Agents
import random
uagent = ['Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 GTB5',
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ko; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2',
'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5',
'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.12) Gecko/20080214 Firefox/2.0.0.12',
'Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8',
'Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.0.5) Gecko/20060819 Firefox/1.5.0.5',
'Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3',
'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5',
'Mozilla/5.0 (Windows; Windows NT 6.1; rv:2.0b2) Gecko/20100720 Firefox/4.0b2',
@iKlotho
iKlotho / problem4.py
Last active January 28, 2020 18:19
blog.svpino.com Solution to Problem 4 Python
#Write a function that given a list of non negative integers, arranges them such that they form the largest possible number.
#For example, given [50, 2, 1, 9], the largest formed number is 95021
# question url https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
numbers = [5, 51, 56, 50]
result = ''
def check(number):
if len(str(number)) == 1: