Example #1
0

##
# Carbs, it's a filler
##
def get_carb_macro(prot_macro, fat_macro, calorie_tuple):
    # tuple should come as (rest day calories, train day calories)
    rest_carb_calorie = calorie_tuple[0] - prot_macro[0] * 4 - fat_macro[0] * 9
    train_carb_calorie = calorie_tuple[1] - prot_macro[1] * 4 - fat_macro[1] * 9

    return (rest_carb_calorie / 4, train_carb_calorie / 4)


if __name__ == '__main__':
    height = feet_to_meters(feet=5, inches=6.5)
    weight = lbs_to_kg(154)
    print "Weight: %s Height: %s" % (weight, height)
    lbm = 20

    base_bmr = get_bmr(gender='male', weight=weight, height=height, age=24)
    adj_bmr = get_adjusted_bmr(bmr=base_bmr,
                               activity_level=ActivityLevel.sedentary)

    kcal_num = get_calorie_targets(adj_bmr, Stage.cut)
    protein_macro = get_protein_macro(lbm, weight, Stage.cut)

    fat_macro_range = get_fat_macro(lbm)
    rest_range = [i for i in fat_macro_range[0]]
    workout_range = [i for i in fat_macro_range[1]]

    fat_macro_rest = raw_input("Pick fat macro (Rest): (%s - %s)\n->" %
Example #2
0
def get_fat_macro(lbm_percent):
    return (xrange(60,95), xrange(40,65))

##
# Carbs, it's a filler
##
def get_carb_macro(prot_macro, fat_macro, calorie_tuple):
    # tuple should come as (rest day calories, train day calories)
    rest_carb_calorie = calorie_tuple[0] - prot_macro[0]*4 - fat_macro[0]*9
    train_carb_calorie = calorie_tuple[1] - prot_macro[1]*4 - fat_macro[1]*9

    return (rest_carb_calorie/4, train_carb_calorie/4)

if __name__ == '__main__':
    height = feet_to_meters(feet=5, inches=6.5)
    weight = lbs_to_kg(154)
    print "Weight: %s Height: %s" % (weight, height)
    lbm = 20

    base_bmr = get_bmr(gender='male', weight=weight, height=height, age=24)
    adj_bmr = get_adjusted_bmr(bmr=base_bmr, activity_level=ActivityLevel.sedentary)

    kcal_num = get_calorie_targets(adj_bmr, Stage.cut)
    protein_macro = get_protein_macro(lbm, weight, Stage.cut)

    fat_macro_range = get_fat_macro(lbm)
    rest_range = [i for i in fat_macro_range[0]]
    workout_range = [i for i in fat_macro_range[1]]

    fat_macro_rest = raw_input("Pick fat macro (Rest): (%s - %s)\n->" % (rest_range[1], rest_range[-1]))
    fat_macro_workout = raw_input("Pick fat macro (Workout): (%s - %s)\n->" % (workout_range[1], workout_range[-1]))
Example #3
0
 def test_lbs_to_kg(self):
     ret = lbs_to_kg(212)
     self.assertTrue(int(ret) == 96)
     ret = lbs_to_kg(152)
     self.assertTrue(int(ret) == 68)