calc_tools_yiing681
ตัวอย่าง Python Package มาตรฐาน PEP 517/621 ที่มี 2 โมดูลการทำงาน
การใช้งาน
import calc_tools_yiing681 as pkg
# ใช้งานฟังก์ชันจาก functions
print(pkg.linear(2, 3, 1)) # 7
# ใช้งานฟังก์ชันจาก vectors
print(pkg.add_vectors((1, 2), (3, 4))) # (4, 6)
description = "A simple calculation tools package"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
# calc_tools_yiing681
[](https://pypi.org/project/calc-seereen/)
[](https://pypi.org/project/calc-seereen/)
[](https://opensource.org/licenses/MIT)
> **calc_tools_yiing681** คือ Python Package มาตรฐาน PEP 517/621 ที่รวบรวมฟังก์ชันสำหรับการคำนวณคณิตศาสตร์พื้นฐานและพีชคณิตเวกเตอร์ (Vector Algebra) สำหรับการเรียนรู้และการใช้งานทั่วไป
---
## 📋 รายการฟังก์ชันทั้งหมดในแพ็กเกจ (Features Overview)
แพ็กเกจนี้ประกอบด้วย **2 โมดูลหลัก** รวมทั้งสิ้น **10 ฟังก์ชัน**:
### 1. โมดูล `functions` (ฟังก์ชันทางคณิตศาสตร์)
| ฟังก์ชัน | การทำงาน | สมการ / คำอธิบาย |
| :--- | :--- | :--- |
| `linear(a, b, x)` | ฟังก์ชันเส้นตรง | $f(x) = ax + b$ |
| `quadratic(a, b, c, x)` | ฟังก์ชันพหุนามกำลังสอง | $f(x) = ax^2 + bx + c$ |
| `cube(x)` | ฟังก์ชันยกกำลังสาม | $f(x) = x^3$ |
| `absolute(x)` | ค่าสัมบูรณ์ | $f(x) = \Vert{}x\Vert{}$ |
| `evaluate(fx, x)` | ประเมินค่าฟังก์ชัน | คืนค่า $fx(x)$ ที่ส่งเข้ามา |
### 2. โมดูล `vectors` (การคำนวณเวกเตอร์)
| ฟังก์ชัน | การทำงาน | คำอธิบาย |
| :--- | :--- | :--- |
| `magnitude(v)` | ขนาดเวกเตอร์ | คำนวณ $\sqrt{\sum v_i^2}$ |
| `add_vectors(v1, v2)` | การบวกเวกเตอร์ | ผลบวกตำแหน่งต่อตำแหน่ง |
| `subtract_vectors(v1, v2)` | การลบเวกเตอร์ | ผลลบตำแหน่งต่อตำแหน่ง |
| `dot_product(v1, v2)` | ผลคูณเชิงสเกลาร์ | Dot Product ($\sum v_{1i} \cdot v_{2i}$) |
| `scalar_multiply(v, k)` | คูณสเกลาร์ | คูณค่า $k$ เข้าทุกองค์ประกอบ |
---
## 💻 การติดตั้ง (Installation)
สามารถติดตั้งแพ็กเกจผ่าน `pip` ได้โดยตรง:
```bash
pip install calc-seereen
import calc_tools_yiing681 as pkg
# 1. ฟังก์ชันเส้นตรง f(x) = 2x + 3 ที่ x = 5
res_linear = pkg.linear(2, 3, 5)
print(f"Linear: {res_linear}") # Output: 13
# 2. ฟังก์ชันพหุนาม f(x) = x^2 + 2x + 1 ที่ x = 3
res_quad = pkg.quadratic(1, 2, 1, 3)
print(f"Quadratic: {res_quad}") # Output: 16
# 3. ยกกำลังสาม
print(f"Cube: {pkg.cube(4)}") # Output: 64
# 4. ค่าสัมบูรณ์
print(f"Absolute: {pkg.absolute(-12.5)}") # Output: 12.5
# 5. ประเมินค่าฟังก์ชันผ่าน evaluate
print(f"Evaluate: {pkg.evaluate(lambda x: x**2 + 5, 3)}") # Output: 14
import calc_tools_yiing681 as pkg
v1 = (3, 4)
v2 = (1, 2)
# 1. ขนาดของเวกเตอร์ (Magnitude)
print(f"Magnitude v1: {pkg.magnitude(v1)}") # Output: 5.0
# 2. การบวกเวกเตอร์ (Vector Addition)
print(f"v1 + v2: {pkg.add_vectors(v1, v2)}") # Output: (4, 6)
# 3. การลบเวกเตอร์ (Vector Subtraction)
print(f"v1 - v2: {pkg.subtract_vectors(v1, v2)}") # Output: (2, 2)
# 4. ผลคูณเชิงสเกลาร์ (Dot Product)
print(f"v1 . v2: {pkg.dot_product(v1, v2)}") # Output: 11
# 5. การคูณด้วยสเกลาร์ (Scalar Multiplication)
print(f"v1 * 3: {pkg.scalar_multiply(v1, 3)}") # Output: (9, 12)
Metadata
Release files for calc-seereen 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| calc_seereen-0.2.0.tar.gz | 4.8 kB | Without provenance | Details for calc_seereen-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| calc_seereen-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for calc_seereen-0.2.0-py3-none-any.whl |
Total release size: 10.7 kB
Release files / calc_seereen-0.2.0.tar.gz
| Download URL | calc_seereen-0.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a22521da68a466ac59b9a2f8f8668f15ff1c7269267d4c6bb6d5c667d57f28f8
|
|
BLAKE2b-256 checksum How to use checksums |
29bd2365f61a9ce274ba99faa498a9f58cc75e0685a9d63cac8f6a87211c8b81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / calc_seereen-0.2.0-py3-none-any.whl
| Download URL | calc_seereen-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f82fe6e882c09b6b7e926c058aae2e5a74084b8a82f18153f5e629d6a18974e4
|
|
BLAKE2b-256 checksum How to use checksums |
67393af9f67ef0de0f7e1ed76540636a8d2f2c355c8be18da408230fc9c82a6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for calc-seereen 0.2.0
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.