def timed(): print("Here are your age statistics...") time.sleep(1) print("Years : %d" % ((datetime.today() - dob).days / 365)) print("Months : %d" % ((datetime.today() - dob).days / 30.4)) print("Weeks : %d" % ((datetime.today() - dob).days / 7)) print("Days: %d" % ((datetime.today() - dob).days)) print("Hours : %d" % ((datetime.today() - dob).days * 24)) print("Minutes : %d" % ((datetime.today() - dob).days * 1440)) print("Seconds : %d" % ((datetime.today() - dob).days * 86400)) #health() p = int( input( "enter 1 for calculating another age statistics \nenter 2 to view health statistics \n" + "enter 3. to calculate age difference \nenter 4 to exit \n")) if p == 1: kr() elif p == 2: body() health() Info() out() elif p == 3: from difference import diff diff() else: ex()
def out(): ch = int( input("press 1 to calculate another health statistics \n" + "press 2. to calculate the age difference.\n" + "press 3. to exit \n")) if ch == 1: health() #body() Info() elif ch == 2: from difference import diff diff() else: sys.exit()
from age import timed from BMI import health from difference import diff from BMI import out from age import body from bloodP import Info #print(" WELCOME!! TO THE AGE CUM HEALTH CALCULATOR ") #print("choose from the following services \n") print("1. Age calculator\n"+"2.health predictor \n"+"3.compare age of two \n") c=int(input(" ")) if c==1: timed() elif c==2: health() body() Info() out() elif c==3: diff() else: print("invalid option................")
# python image_diff.py --first images/original_01.png --second images/modified_01.png # ap = argparse.ArgumentParser() # ap.add_argument("-f", "--first", required=True, # help="first input image") # ap.add_argument("-s", "--second", required=True, # help="second") # args = vars(ap.parse_args()) # # load the two input images # imageA = cv2.imread(args["first"],1) # imageB = cv2.imread(args["second"],1) imageA, imageB = downscaleImages(imageA, imageB) ########### difference ratio calculation using module difference.py ########## ratio = difference.diff(img1, img2) print("Difference Ratio =", ratio) diff_image = ImageChops.difference(img1, img2) bbox = diff_image.getbbox() if bbox: diff_image.show() # PIL(Pillow) image difference and chopping point_table = ([0] + ([255] * 255)) def black_or_b(a, b): diff = ImageChops.difference(a, b) diff = diff.convert('L') diff = diff.point(point_table)