예제 #1
0
end_at = (h, m)
current_time = tuple([
    int(i)
    for i in tuple(str(datetime.now()).split(" ")[1].split(".")[0].split(":"))
])
if end_at == current_time[:2] and current_time[2] != 0:
    print("talarm: Time reached already!")
    exit()
# GridMap objects
zero = gm.zero()
one = gm.one()
two = gm.two()
three = gm.three()
four = gm.four()
five = gm.five()
six = gm.six()
seven = gm.seven()
eight = gm.eight()
nine = gm.nine()

# object mapping
grid_dict = {
    "0": zero,
    "1": one,
    "2": two,
    "3": three,
    "4": four,
    "5": five,
    "6": six,
    "7": seven,
예제 #2
0
from time import sleep
from os import system, name
from gridmap import GridMap as g

# merger method
m = g.merge

# create required gridmap objects
zero = m(g.zero(), g.zero())
one = m(g.zero(), g.one())
two = m(g.zero(), g.two())
three = m(g.zero(), g.three())
four = m(g.zero(), g.four())
five = m(g.zero(), g.five())
six = m(g.zero(), g.six())
seven = m(g.zero(), g.seven())
eight = m(g.zero(), g.eight())
nine = m(g.zero(), g.nine())
ten = m(g.one(), g.zero())

grid_obj = [ten, nine, eight, seven, six, five, four, three, two, one, zero]


def clear():
    if name == "nt":
        _ = system('cls')
    else:
        _ = system('clear')


def countdown():