|
Canada-0-CHAMBERS OF COMMERCE 公司名录
|
公司新闻:
- 16. 3. time — 时间的访问和转换 — Python 3. 5. 10 文档
将以自 epoch 开始的秒数表示的时间转换为 UTC 的 struct_time ,其中 dst 标志始终为零。 如果未提供 secs 或为 None ,则使用 time() 所返回的当前时间。 一秒以内的小数将被忽略。 有关 struct_time 对象的说明请参见上文。
- datetime --- 基本日期和时间类型 — Python 3. 13. 4 文档
如果可选参数 tz 为 None 或未指定,这就类似于 today(),但该方法会在可能的情况下提供比通过 time time() 时间戳所获时间值更高的精度(例如,在提供了 C gettimeofday() 函数的平台上就可以做到这一点)。
- decimal --- 十进制定点和浮点运算 — Python 3. 8. 20 文档
与基于硬件的二进制浮点不同,十进制模块具有用户可更改的精度(默认为28位),可以与给定问题所需的一样大: >>> from decimal import * >>> getcontext () prec = 6 >>> Decimal ( 1 ) Decimal ( 7 ) Decimal('0 142857') >>> getcontext () prec = 28 >>> Decimal ( 1 ) Decimal ( 7 ) Decimal('0
- timeit --- 测量小代码片段的执行时间 — Python 3. 7. 13 文档
该模块提供了一种简单的方法来计算一小段 Python 代码的耗时。 它有 命令行界面 以及一个 可调用 方法。 它避免了许多用于测量执行时间的常见陷阱。
- 15. 浮点算术:争议和限制 — Python 3. 13. 5 文档
Python 还提供了一些工具可能在你 确实 想要知道一个浮点数的精确值的少数情况下提供帮助。 例如 float as_integer_ratio() 方法会将浮点数值表示为一个分数:
- 定时器文件描述符指南 — Python 3. 13. 3 文档
本指南讨论了 Python 对 linux 定时器文件描述符的支持。 例子: 下面的例子演示了如何使用定时器文件描述符每秒钟执行两次某个函数: 为避免 float 类型导致的精度损失,定时器文件描述符允许使用这些函数的_ns 变种形式以整数纳秒值指定初始到期时间和间隔。
- 8. 1. datetime — Tipos básicos de data e hora - Python
Return a time struct_time such as returned by time localtime() d timetuple() is equivalent to time struct_time((d year, d month, d day, d hour, d minute, d second, d weekday(), yday, dst)), where yday = d toordinal()-date(d year, 1, 1) toordinal() + 1 is the day number within the current year starting with 1 for January 1st
- random --- 生成伪随机数 — Python 3. 13. 5 文档
Python 使用 Mersenne Twister 作为核心生成器。 它产生 53 位精度的浮点数并且周期为 2**19937-1。 其在 C 中的这个底层实现既快速又线程安全。 Mersenne Twister 是目前经过最广泛测试的随机数生成器之一。
- subprocess --- 子进程管理 — Python 3. 14. 0b2 文档
Extremely Small Timeout Values: Setting very small timeout values (such as a few milliseconds) may result in almost immediate TimeoutExpired exceptions because process creation and system scheduling inherently require time 在 Windows 上将参数列表转换¶
|
|