This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from termcolor import colored | |
| from garmin_get_prompt import get_prompt | |
| def get_prompt(): | |
| # Assemble a comprehensive prompt with various components and a detailed report. | |
| # Note that these variables have to be populated with the data I shared in the article | |
| return f""" | |
| {PERSONA_PROMPT} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MAX_WEIGHTS = { | |
| 'Dumbbell Row': 45.0, | |
| 'Bench Press': 77.5, | |
| 'Stretch Lying Abduction': 0, | |
| 'Squat': 65.0, | |
| 'Romanian Deadlift': 95.0, | |
| 'Goblet Squat': 32.0, | |
| 'Pull-up': 0, | |
| 'Incline Barbell Bench Press': 65.0, | |
| 'Weighted Dip': 15.0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| initial_weights = { | |
| 'Dumbbell Row': 22.5, | |
| 'Stretch Lying Abduction': 0, | |
| 'Bench Press': 50, | |
| 'Squat': 25.0, | |
| 'Romanian Deadlift': 25.0, | |
| 'Goblet Squat': 16.0, | |
| 'Pull-up': 0, | |
| 'Incline Barbell Bench Press': 57.5, | |
| 'Weighted Dip': 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MEDIAN_TOTAL_KCAL = 2687.0 | |
| MEDIAN_ACTIVE_KAL = 407.0 | |
| MEDIAN_RESTING_HR = 47.0 | |
| MEDIAN_SLEEP_SECONDS = 25140.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| max_weigts = { | |
| 'Dumbbell Row': 45.0, | |
| 'Bench Press': 77.5, | |
| 'Stretch Lying Abduction': 0, | |
| 'Squat': 65.0, | |
| 'Romanian Deadlift': 95.0, | |
| 'Goblet Squat': 32.0, | |
| 'Pull-up': 0, | |
| 'Incline Barbell Bench Press': 65.0, | |
| 'Weighted Dip': 15.0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exercise_trend_indicators = { | |
| 'Dumbbell Row': 'increasing', | |
| 'Stretch Lying Abduction': 'stable', | |
| 'Squat': 'increasing', | |
| 'Romanian Deadlift': 'stable', | |
| 'Goblet Squat': 'increasing', | |
| 'Pull-up': 'stable', | |
| 'Incline Barbell Bench Press': 'increasing', | |
| 'Weighted Dip': 'increasing', | |
| 'Triceps Press-down': 'decreasing', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activity_aggregates = { | |
| 'Back and Biceps': { | |
| 'Average Moving Duration': 1978.67802734375, | |
| 'Moving Duration/Duration Ratio': 0.4498125551450178, | |
| 'Average HR': 98.6, | |
| 'Average Calories': 456.4, | |
| 'Average Total Sets': 19.0, | |
| 'Average Total Reps': 102.8, | |
| 'Total Sessions': 5, | |
| 'Frequency per Week': 1.206896551724138 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import ast | |
| from datetime import datetime | |
| import numpy as np | |
| def read_dataframes(): | |
| """ | |
| Reads the activity weights and details CSV files into Pandas dataframes. | |
| Returns: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| activityId | wkt_step_weights | |
|---|---|---|
| 14263566875 | {'Military Press': [0.0, 0.0, 0.0, 32.5, 35.0, 35.0], 'Bent-over Lateral Raise': [11.0, 11.0, 11.0], 'Front Raise': [13.5, 13.5], 'Stretch Lying Abduction': [0.0]} | |
| 14295640408 | {'Squat': [55.0, 55.0, 55.0], 'Goblet Squat': [32.0, 32.0, 32.0], 'Romanian Deadlift': [0.0, 85.0, 90.0]} | |
| 14310618451 | {'Romanian Deadlift': [0.0, 0.0, 0.0, 90.0, 90.0, 90.0], 'Barbell Row': [62.5, 62.5, 65.0], 'Lat Pull-down': [60.0, 65.0, 60.0], 'Barbell Biceps Curl': [15.0, 17.5, 17.5]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| totalKilocalories | activeKilocalories | restingHeartRate | sleepingSeconds | |
|---|---|---|---|---|
| 2629.0 | 407.0 | 49 | 27960 | |
| 2710.0 | 488.0 | 47 | 27600 | |
| 2759.0 | 449.0 | 51 | 23340 | |
| 2912.0 | 612.0 | 47 | 26760 |
NewerOlder