Skip to content

Instantly share code, notes, and snippets.

View savolla's full-sized avatar

Oleksiy Nehlyadyuk savolla

View GitHub Profile
@savolla
savolla / character_filter.py
Created March 8, 2017 19:42
this program takes an input. you type a character in it. then program checks if the metin variable contain your input. It calculates and prints how many of your characters in metin (my englisj sucks btw)
metin = """Bu programlama dili Guido Van Rossum adlı Hollandalı bir programcı
tarafından 90’lı yılların başında geliştirilmeye başlanmıştır. Çoğu insan,
isminin Python olmasına aldanarak, bu programlama dilinin, adını piton
yılanından aldığını düşünür. Ancak zannedildiğinin aksine bu programlama dilinin
adı piton yılanından gelmez. Guido Van Rossum bu programlama dilini, The Monty
Python adlı bir İngiliz komedi grubunun, Monty Python’s Flying Circus adlı
gösterisinden esinlenerek adlandırmıştır. Ancak her ne kadar gerçek böyle olsa
da, Python programlama dilinin pek çok yerde bir yılan figürü ile temsil
edilmesi neredeyse bir gelenek halini almıştır."""
import cv2
import numpy as np
org = cv2.imread("glassorg.jpg")
line = cv2.imread("glassorg1.jpg")
diff = cv2.subtract(line, org)
result = not np.any(diff)
import numpy as np
from PIL import ImageGrab
from PIL import Image
import cv2
import numpy as np
resim = ImageGrab.grab(bbox=(331, 168, 481, 201))
resim_array = np.array(resim)
@savolla
savolla / zesty-repositories
Created June 28, 2017 16:11
you can delete it..
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://tr.archive.ubuntu.com/ubuntu/ zesty main restricted
# deb-src http://tr.archive.ubuntu.com/ubuntu/ zesty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://tr.archive.ubuntu.com/ubuntu/ zesty-updates main restricted
# deb-src http://tr.archive.ubuntu.com/ubuntu/ zesty-updates main restricted
@savolla
savolla / text_analyser(v1.0).py
Created August 5, 2017 00:29
Another stupid programm called Text Analyser. It takes the input from the user and gives its vowels, consonants and empty spaces without repetition. Just for learning purposes..
##################################
# Welcome to String analyser 1.0 #
##################################
# ASKING A STRING fROM USER
string = input("enter a string: ")
# VOWEL AND CONSONANT LIST
vowels = "aeıioöuüAEIİOÖUÜ"
consonant = "bcçdfghğjklmnprsştvyzBCÇDFGHĞJKLMNPRSŞTVYZ"
@savolla
savolla / savolla.conf
Last active August 8, 2017 00:14
this file is for pc recovery. simply just dont read it...
WELCOME TO SAVOLLA.CONF
Please open this document with Vim editor and make sure you have folding plugin. Topics which start with "##########" symbols are folded for more readability.
if you don't have vim or proper vimrc file and plugins, I strongly recomend to download "spf13-vim" on your system. it is easyest way to install and configure
this awesome text edidor. This file has written by savolla. It is very personal and unedited file. DO NOT READ!
********************************************************************
IMPORTANT: if you want to fold topics just follow the steps below *
*
<ESC> *
move the cursor to the title of the topic which you want to fold. *
@savolla
savolla / sonic_pi_metal_workstation.rb
Created August 18, 2017 15:46
This is an amateur configuration file for writing Metal songs in Sonic Pi. Don't judge this file... This is my first Ruby file btw
#----------------------------------------------------------------------------------------------------------------------------------
#███╗ ██╗ ██████╗ ████████╗███████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ██╗███████╗███████╗
#████╗ ██║██╔═══██╗╚══██╔══╝██╔════╝ ██║ ██║██╔══██╗██║ ██║ ██║██╔════╝██╔════╝
#██╔██╗ ██║██║ ██║ ██║ █████╗ ██║ ██║███████║██║ ██║ ██║█████╗ ███████╗
#██║╚██╗██║██║ ██║ ██║ ██╔══╝ ╚██╗ ██╔╝██╔══██║██║ ██║ ██║██╔══╝ ╚════██║
#██║ ╚████║╚██████╔╝ ██║ ███████╗ ╚████╔╝ ██║ ██║███████╗╚██████╔╝███████╗███████║
#╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═══╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚══════╝╚══════╝
#----------------------------------------------------------------------------------------------------------------------------------
# N O T E V A L U E S
#----------------------------------------------------------------------------------------------------------------------------------
@savolla
savolla / prime_numbers.py
Created August 20, 2017 10:56
Takes an integer and checks if its a prime number.
array = []
number = int(input())
for i in range(1,(number+1)):
modulo = (number % i)
if (modulo == 0):
array.append(modulo)
elif (len(array) > 2):
@savolla
savolla / apple_picker.py
Created September 10, 2017 13:37
My first game! also first class (useful class). I'll put similar functions onto my roguelike game later.
class Inventory():
#attributes
capasity = 10
stack = []
#methods
def addItem(self,item):
@savolla
savolla / savolla-i3.conf
Created December 27, 2017 12:49
my personal configuration for i3 wm
# This is my own configuration for i3.
.xinitrc
xset r rate 200 150 #sets typing speed for x
setxkbmap tr #sets keyboard layout for x
.bashrc
set -o vi #enables vim mode for bash shell
.Xmodmap