Skip to main content

NPworks — 计算物理交互式教材内容

Project description

npworks-content — NPworks 教材内容

PyPI Python License: MIT

计算物理交互式教材的内容包,包含 7 章 27 节 Python 物理计算示例代码及 YAML 元数据。

通常无需单独安装此包,请安装元包 pip install npworks

教材章节

节数 内容
第1章 Python 基础 5 Hello World, 变量, 控制流, 函数, 文件读写
第2章 数值计算 6 NumPy, 梯形积分, 辛普森积分, 欧拉法, RK4, Matplotlib
第3章 经典力学 5 抛体运动, 行星轨道, 简谐振子, 阻尼振子, 双摆
第4章 电磁学 2 电场, 磁场
第5章 热力学与统计物理 3 随机行走, 分子动力学, 热传导
第6章 量子力学 3 波函数, 薛定谔方程, 量子隧穿
第7章 波动与光学 3 波动方程, 干涉, 衍射

独立安装

pip install npworks-content

公共接口

import npworks_content

npworks_content.get_chapters()                              # → list[dict]
npworks_content.get_section_code(chapter_id, filename)      # → str
npworks_content.get_section_path(chapter_id, filename)      # → Path
npworks_content.get_version()                                # → str

内容格式

每章一个目录,包含 meta.yaml 和 Python 脚本:

title: "第1章 Python 基础"
description: "Python 编程语言基础入门"
sections:
  - file: "01_hello.py"
    title: "1.1 Hello World"
  - file: "02_variables.py"
    title: "1.2 变量与数据类型"

链接

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npworks_content-0.0.2.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npworks_content-0.0.2-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

Details for the file npworks_content-0.0.2.tar.gz.

File metadata

  • Download URL: npworks_content-0.0.2.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for npworks_content-0.0.2.tar.gz
Algorithm Hash digest
SHA256 759a254e56bce3b141df919ba5a0b773f3b086da071f97a8767298e189554092
MD5 1fc8d9ce2fc4dfcb08a33fe134a75635
BLAKE2b-256 87c7bbc600db8e84f21a07538276e38287d408fc5ce6707f4f81f0bacd465b77

See more details on using hashes here.

File details

Details for the file npworks_content-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for npworks_content-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f858522dcb052b4e62131b26d32a5e7599870e78259505a39c63cd270b89875
MD5 e98c6797599b9a12d3306364d50a8e89
BLAKE2b-256 edeb3a06ff043562f9f374a2f677efe900b8c0786f69abc39b904321fcf9178d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page