initial commit
parent
1ceefa2de0
commit
7513b7fdb6
@ -0,0 +1 @@
|
|||||||
|
esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 16MB 0x8000 partition_table/partition-table.bin 0x10000 ota_data_initial.bin 0xf000 phy_multiple_init_data.bin 0x1000 bootloader/bootloader.bin 0x100000 esp-at.bin 0x20000 at_customize.bin 0x24000 customized_partitions/server_cert.bin 0x39000 customized_partitions/mqtt_key.bin 0x26000 customized_partitions/server_key.bin 0x28000 customized_partitions/server_ca.bin 0x2e000 customized_partitions/client_ca.bin 0x30000 customized_partitions/factory_param.bin 0x21000 customized_partitions/ble_data.bin 0x3B000 customized_partitions/mqtt_ca.bin 0x37000 customized_partitions/mqtt_cert.bin 0x2a000 customized_partitions/client_cert.bin 0x2c000 customized_partitions/client_key.bin
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
# import os
|
||||||
|
# import subprocess
|
||||||
|
|
||||||
|
# list_files = subprocess.run(["ls", "-l"])
|
||||||
|
# # list_files2 = subprocess.run(["echo \"Hello World\" && echo \"Hello world 2\""])
|
||||||
|
# list_files2 = subprocess.run(["echo Hello World && echo Hello World 2",""]);
|
||||||
|
# print("The exit code was: %d" % list_files.returncode)
|
||||||
|
# print("The exit code was: %d" % list_files2.returncode)
|
||||||
|
|
||||||
|
|
||||||
|
# def test():
|
||||||
|
# rootdir = './Projects'
|
||||||
|
# projects = os.listdir(rootdir);
|
||||||
|
# print(projects);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# def main():
|
||||||
|
# # test();
|
||||||
|
# # print("hello from main");
|
||||||
|
# pass;
|
||||||
|
|
||||||
|
|
||||||
|
# if __name__ == "__main__":
|
||||||
|
# main();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def gather_info():
|
||||||
|
height = float(input("What is your height? (inches or meters) "))
|
||||||
|
weight = float(input("What is your weight? (pounds or kilograms) "))
|
||||||
|
system = input("Are your measurements in metric or imperial systems? ").lower().strip()
|
||||||
|
return (height, weight, system)
|
||||||
|
def calculate_bmi(weight, height, system='metric'):
|
||||||
|
if system == 'metric':
|
||||||
|
bmi = (weight / (height ** 2))
|
||||||
|
else:
|
||||||
|
bmi = 703 * (weight / (height ** 2))
|
||||||
|
return bmi
|
||||||
|
while True:
|
||||||
|
height, weight, system = gather_info()
|
||||||
|
if system.startswith('i'):
|
||||||
|
bmi = calculate_bmi(weight, system='imperial', height=height)
|
||||||
|
print(f"Your BMI is {bmi}")
|
||||||
|
elif system.startswith('m'):
|
||||||
|
bmi = calculate_bmi(weight, height)
|
||||||
|
print(f"Your BMI is {bmi}")
|
||||||
|
else:
|
||||||
|
print("Error: Unknown measurement system. Please use imperial or metric.")
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
aiofiles==0.8.0
|
||||||
|
ajsonrpc==1.2.0
|
||||||
|
anyio==3.6.1
|
||||||
|
asgiref==3.5.2
|
||||||
|
bottle==0.12.21
|
||||||
|
certifi==2022.6.15
|
||||||
|
charset-normalizer==2.0.12
|
||||||
|
click==8.1.3
|
||||||
|
colorama==0.4.5
|
||||||
|
h11==0.13.0
|
||||||
|
idna==3.3
|
||||||
|
ifaddr==0.2.0
|
||||||
|
marshmallow==3.16.0
|
||||||
|
packaging==21.3
|
||||||
|
platformio==6.0.2
|
||||||
|
pyelftools==0.28
|
||||||
|
pyparsing==3.0.9
|
||||||
|
pyserial==3.5
|
||||||
|
requests==2.28.0
|
||||||
|
semantic-version==2.10.0
|
||||||
|
sniffio==1.2.0
|
||||||
|
starlette==0.20.3
|
||||||
|
tabulate==0.8.10
|
||||||
|
urllib3==1.26.9
|
||||||
|
uvicorn==0.17.6
|
||||||
|
wsproto==1.1.0
|
||||||
|
zeroconf==0.38.7
|
||||||
Loading…
Reference in New Issue