Skip to main content

C_healthy

C_healthy là thư viện Python để tính toán các chỉ số sức khỏe (BMI, BMR, TDEE, và nhiều chỉ số khác)

Cách cài đặt

pip install C_healthy

Cách sử dụng

from C_healthy import BMI, BMR, TDEE, WHR, LBM, BFP, BBW, IBW, MA, FFMI, RFM, VFR, BSA, VO2MAX, HSI, MMI, BFM

bmi = BMI(70, 1.75)
bmr = BMR("nam", 60, 1.75, 18)
tdee = TDEE("nam", 60, 1.75, 18, 3)
lbm = LBM("nam", 70, 1.75) 
ffmi = FFMI("nam", 60, 1.7)
rfm = RFM(85, 1.7) 
bfp = BFP("nam", 70, 1.75, 20)
ibw = IBW("nam", 1.75)
whr = WHR("nam", 85, 95)
bbw = BBW(60)
ma = MA("nam", 70, 1.7, 18)
vfr = VFR(85, 95)
bsa = BSA(1.7, 60)
vo2max = VO2MAX(110, 60)
hsi = HSI("nam", 60, 1.7, 18, 200, 110)
mmi = MMI("nam", 60, 1.7)
bfm = BFM("nam", 60, 1.7, 18)
print("BMI:", bmi)
print("BMR:", bmr)
print("TDEE:", tdee)
print("LBM:", lbm)
print("FFMI:", ffmi)
print("RFM:", rfm)
print("BFP:", bfp)
print("IBW:", ibw)
print("WHR:", whr)
print("BBW:", bbw)
print("MA:", ma)
print("VFR:", vfr)
print("BSA:", bsa)
print("VO2MAX:", vo2max)
print("HSI:", hsi)
print("MMI:", mmi)
print("BFM:", bfm)

Hoặc có thể dùng cho nhiều người bằng đoạn oop sau

import sys
from C_healthy import BMI, BMR, TDEE, WHR, LBM, BFP, NW, IBW, MA

#sys.stdin = open('TASK.inp', 'r')   # Đọc dữ liệu từ TASK.inp
#sys.stdout = open('TASK.out', 'w') # Ghi dữ liệu ra TASK.out

class BodyIndex:
    def __init__(self, gioi_tinh, chieu_cao, can_nang, tuoi, chi_so_R, vong_eo, vong_hong):
        self.gioi_tinh = gioi_tinh
        self.chieu_cao = chieu_cao
        self.can_nang = can_nang
        self.tuoi = tuoi 
        self.chi_so_R = chi_so_R
        self.vong_eo = vong_eo
        self.vong_hong = vong_hong
    def hien_thi_ket_qua(self):
        print(BMI(self.can_nang, self.chieu_cao))
        print(BMR(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi))
        print(TDEE(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi, self.chi_so_R))
        print(LBM(self.gioi_tinh, self.can_nang, self.chieu_cao))
        print(BFP(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi))
        print(WHR(self.gioi_tinh, self.vong_eo, self.vong_hong))
        print(IBW(self.gioi_tinh, self.chieu_cao))
        print(NW(self.can_nang))
        print(MA(self.gioi_tinh, self.can_nang, self.chieu_cao, self.tuoi))

TruongChinh = BodyIndex("nam", 1.7, 70, 18, 3, 85, 95)
TruongChinh.hien_thi_ket_qua() 
# ... Và thêm nhiều người khác ở đây

CUỐI CÙNG CẢM ƠN CÁC BẠN ĐÃ TIN DÙNG THƯ VIỆN CỦA MÌNH

Metadata

Release files for C-healthy 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for C-healthy 0.2.3
File Size Uploaded Provenance Actions
c_healthy-0.2.3.tar.gz 6.7 kB Without provenance Details for c_healthy-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for C-healthy 0.2.3
File Interpreter ABI Platform Actions
c_healthy-0.2.3-py3-none-any.whl Python 3 none any Details for c_healthy-0.2.3-py3-none-any.whl

Total release size: 14.2 kB

Release files / c_healthy-0.2.3.tar.gz

Download URL c_healthy-0.2.3.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
81c95d461bb5c2b5a7efd93138d8b76c1b9d790e26c69c054a3419f898bd0d9b
BLAKE2b-256 checksum
How to use checksums
4569ae3ae291de396da33d1918731b0a5b101954f8d97ecbec6bfb9070e7591e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / c_healthy-0.2.3-py3-none-any.whl

Download URL c_healthy-0.2.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36a22df3cb114e9d0e188b924f2121b128a7ce6d6cb346574e321a87a35f9715
BLAKE2b-256 checksum
How to use checksums
87c0eb37af49cfe63453a8f27b127366ca6d73a0c1ccc9953e6f50e9fc59aef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for C-healthy 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page