Skip to main content

Math & Stats Tools (My-package)

ตัวอย่าง Python Package มาตรฐาน PEP 517/621 สำหรับคำนวณด้านทฤษฎีจำนวนและสถิติเบื้องต้น

การใช้งาน

import my_package as pkg

# ==========================================
# 1. ทดสอบฟังก์ชันด้านทฤษฎีจำนวน (Number Theory)
# ==========================================
print("=== Number Theory Functions ===")

# ตรวจสอบจำนวนเฉพาะ
print("is_prime(17):", pkg.is_prime(17))
print("is_prime(20):", pkg.is_prime(20))

# หา ห.ร.ม. และ ค.ร.น.
print("gcd(48, 18):", pkg.gcd(48, 18))
print("lcm(4, 6):", pkg.lcm(4, 6))

# คำนวณ แฟกทอเรียล (5!)
print("factorial(5):", pkg.factorial(5))

# ตรวจสอบจำนวนสมบูรณ์
print("is_perfect_number(28):", pkg.is_perfect_number(28))
print("is_perfect_number(10):", pkg.is_perfect_number(10))


# ==========================================
# 2. ทดสอบฟังก์ชันด้านสถิติ (Statistics)
# ==========================================
print("\n=== Statistics Functions ===")

sample_data = [2, 4, 4, 4, 5, 5, 7, 9]

# คำนวณค่าเฉลี่ยเลขคณิต
print("mean:", pkg.mean(sample_data))

# คำนวณค่ามัธยฐาน
print("median:", pkg.median(sample_data)) 

# คำนวณฐานนิยม (คืนค่าเป็น list)
print("mode:", pkg.mode(sample_data))   

# คำนวณความแปรปรวนแบบประชากร
print("variance:", pkg.variance(sample_data))

# คำนวณส่วนเบี่ยงเบนมาตรฐานแบบประชากร
print("std_dev:", pkg.std_dev(sample_data))

Metadata

Release files for mathbyart 0.1.1

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

Source distribution (sdist)

Source distribution for mathbyart 0.1.1
File Size Uploaded Provenance Actions
mathbyart-0.1.1.tar.gz 3.8 kB Without provenance Details for mathbyart-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mathbyart 0.1.1
File Interpreter ABI Platform Actions
mathbyart-0.1.1-py3-none-any.whl Python 3 none any Details for mathbyart-0.1.1-py3-none-any.whl

Total release size: 6.6 kB

Release files / mathbyart-0.1.1.tar.gz

Download URL mathbyart-0.1.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
577517a545438791670390e2b025163ac888c55fbe64fbee335f7cbf713f5ac6
BLAKE2b-256 checksum
How to use checksums
339353dfe5b57d1504842bd67bcfa9203bdc4f1b7b6b2715f0b2bfbf769bb7b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / mathbyart-0.1.1-py3-none-any.whl

Download URL mathbyart-0.1.1-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc242747702e840cc8bbd2e05a90660f12f6bd04e395e8f82396249b5c6fc124
BLAKE2b-256 checksum
How to use checksums
601f8eee0e3dc840fe8edcb69c5f338ec2572a0936f1a28d3b0b3f39946079bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for mathbyart 0.1.1

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