Skip to content

Instantly share code, notes, and snippets.

View eeealexxx's full-sized avatar

Oleksii Yevstratov eeealexxx

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="pytest" />
<option name="PROJECT_TEST_RUNNER" value="pytest" />
@eeealexxx
eeealexxx / keep_awake.py
Created January 9, 2018 09:24
This script can help you keep awake your PC.
import time
import sys
import win32api, win32con
from win32api import GetSystemMetrics
def click(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0)
@eeealexxx
eeealexxx / IntroduceToCoroutineAndScheduler.py
Created January 9, 2018 09:23
My introduction with Coroutine and Scheduler
import time
def coroutine(fn):
def inner(*args, **kwargs):
res = fn(*args, **kwargs)
next(res)
return res
return inner
@eeealexxx
eeealexxx / FlippCharInWord
Created November 25, 2017 09:21
My first python program.
myString = ["I"," ","l","o","v","e"," ","l","i","f","e","c","e","l","l"," ","v","e","r","y"," ","m","u","c","h"]
def myPrint(myS):
for char in myS:
print(char,end='')
print(" ")
def myChangeChar(changeString,sStart,sEnd):
for n in range(int((sEnd-sStart+1)/2)):
if n > 0: