Skip to content

Instantly share code, notes, and snippets.

View savolla's full-sized avatar

Oleksiy Nehlyadyuk savolla

View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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. *
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)
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)
@savolla
savolla / instagram_(Mehmetpc)_v2.0.0.py
Last active June 30, 2018 10:36
added 100, 101, 150 and made some updates (HUGE UPDATES)
import pyautogui as p
import time
import os
"""
def resolution():
sag_tik_positionX, sag_tik_positionY = 660, 470
p.click(1276,1011) # pencereleri aşağı al
time.sleep(0.2)
@savolla
savolla / Instagram_(olexypc)_v1.8.0.py
Last active June 28, 2018 15:47
text art başlık eklendi. 1. programdaki sorun düzeltildi, takip butonu kontrolü fonksiyonu yazıldı
import pyautogui as p
import time
def işlem_seçimi():
x = input()
if x == "07":