Mistři v programování na #hovnokod

Vytiahnute z ExaBGP githubu

now = time.time()
while True and time.time() < now + 5:
	line = sys.stdin.readline().strip()
	if not line or 'shutdown' in line:
		break

Anonymous,


Anonymous,

def validate(timeinstr):
    if timeinstr:
        timeinstr = timeinstr.split(':')
        if len(timeinstr) != 2:
            return 0, 0
        hour = int(timeinstr[0])
        minute = int(timeinstr[1])
        if (hour < 0) or (hour > 23):
            return 0, 0
        if (minute < 0) or (minute > 59):
            return 0, 0
        return hour, minute
    return 0, 0

Anonymous,

def IsEven(num):
    i =  2
    while i < 2147483647:
        if i == num:
            print "The number is even"
            i += 2
            return
    print "The number is false"
    return

Anonymous,


Anonymous,