资源简介
Dash文档:python-3.7.4官方中文
Mac平台Dash文档,基于官方python 3.7.4 中文文档制作而成。
注意:文件格式是docset, 在mac上双击会自动导入到Dash中。
代码片段和文件信息
from datetime import tzinfo timedelta datetime
ZERO = timedelta(0)
HOUR = timedelta(hours=1)
SECOND = timedelta(seconds=1)
# A class capturing the platform‘s idea of local time.
# (May result in wrong values on historical times in
# timezones where UTC offset and/or the DST rules had
# changed in the past.)
import time as _time
STDOFFSET = timedelta(seconds = -_time.timezone)
if _time.daylight:
DSTOFFSET = timedelta(seconds = -_time.altzone)
else:
DSTOFFSET = STDOFFSET
DSTDIFF = DSTOFFSET - STDOFFSET
class LocalTimezone(tzinfo):
def fromutc(self dt):
assert dt.tzinfo is self
stamp = (dt - datetime(1970 1 1 tzinfo=self)) // SECOND
args = _time.localtime(stamp)[:6]
dst_diff = DSTDIFF // SECOND
# Detect fold
fold = (args == _time.localtime(stamp - dst_diff))
return datetime(*args microsecond=dt.microsecond
tzinfo=self fold=fold)
def utcoffset(self dt):
if self._isdst(dt):
return DSTOFFSET
else:
return STDOFFSET
def dst(self dt):
if self._isdst(dt):
return DSTDIFF
else:
return ZERO
def tzname(self dt):
return _time.tzname[self._isdst(dt)]
def _isdst(self dt):
tt = (dt.year dt.month dt.day
dt.hour dt.minute dt.second
dt.weekday() 0 0)
stamp = _time.mktime(tt)
tt = _time.localtime(stamp)
return tt.tm_isdst > 0
Local = LocalTimezone()
# A complete implementation of current DST rules for major US time zones.
def first_sunday_on_or_after(dt):
days_to_go = 6 - dt.weekday()
if days_to_go:
dt += timedelta(days_to_go)
return dt
# US DST Rules
#
# This is a simplified (i.e. wrong for a few cases) set of rules for US
# DST start and end times. For a complete and up-to-date set of DST rules
# and timezone definitions visit the Olson Database (or try pytz):
# http://www.twinsun.com/tz/tz-link.htm
# http://sourceforge.net/projects/pytz/ (might not be up-to-date)
#
# In the US since 2007 DST starts at 2am (standard time) on the second
# Sunday in March which is the first Sunday on or after Mar 8.
DSTSTART_2007 = datetime(1 3 8 2)
# and ends at 2am (DST time) on the first Sunday of Nov.
DSTEND_2007 = datetime(1 11 1 2)
# From 1987 to 2006 DST used to start at 2am (standard time) on the first
# Sunday in April and to end at 2am (DST time) on the last
# Sunday of October which is the first Sunday on or after Oct 25.
DSTSTART_1987_2006 = datetime(1 4 1 2)
DSTEND_1987_2006 = datetime(1 10 25 2)
# From 1967 to 1986 DST used to start at 2am (standard time) on the last
# Sunday in April (the one on or after April 24) and to end at 2am (DST time)
# on the last Sunday of October which is the first Sunday
# on or after Oct 25.
DSTSTART_1967_1986 = datetime(1 4 24 2)
DSTEND_1967_1986 = DSTEND_1987_2006
def us_dst_range(year):
# Find start
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-08-29 14:21 python374.docset\
目录 0 2019-08-29 14:22 python374.docset\Contents\
目录 0 2019-08-29 15:35 python374.docset\Contents\Resources\
文件 1864017 2019-08-29 15:33 python374.docset\Contents\Resources\1.sql
目录 0 2019-08-29 17:25 __MACOSX\
目录 0 2019-08-29 17:25 __MACOSX\python374.docset\
目录 0 2019-08-29 17:25 __MACOSX\python374.docset\Contents\
目录 0 2019-08-29 17:25 __MACOSX\python374.docset\Contents\Resources\
文件 266 2019-08-29 15:33 __MACOSX\python374.docset\Contents\Resources\._1.sql
文件 1126400 2019-08-29 15:35 python374.docset\Contents\Resources\docSet.dsidx
目录 0 2019-08-29 14:36 python374.docset\Contents\Resources\Documents\
文件 52406 2019-08-29 16:10 python374.docset\Contents\Resources\Documents\genindex-M.html
目录 0 2019-08-29 17:25 __MACOSX\python374.docset\Contents\Resources\Documents\
文件 212 2019-08-29 16:10 __MACOSX\python374.docset\Contents\Resources\Documents\._genindex-M.html
目录 0 2019-02-14 13:29 python374.docset\Contents\Resources\Documents\distutils\
文件 25829 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\index.html
目录 0 2019-08-29 17:25 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\
文件 212 2019-08-29 16:08 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._index.html
文件 70261 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\setupsc
文件 212 2019-08-29 16:08 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._setupsc
文件 6502 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\packageindex.html
文件 212 2019-08-29 16:08 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._packageindex.html
文件 198798 2019-08-29 16:07 python374.docset\Contents\Resources\Documents\distutils\apiref.html
文件 212 2019-08-29 16:07 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._apiref.html
文件 15306 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\extending.html
文件 212 2019-08-29 16:08 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._extending.html
文件 27954 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\sourcedist.html
文件 212 2019-08-29 16:08 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._sourcedist.html
文件 16452 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\configfile.html
文件 212 2019-08-29 16:08 __MACOSX\python374.docset\Contents\Resources\Documents\distutils\._configfile.html
文件 35299 2019-08-29 16:08 python374.docset\Contents\Resources\Documents\distutils\examples.html
............此处省略2219个文件信息
相关资源
- python3.5可用的scipy
- PYTHON3 经典50案例.pptx
- python3.5.2.chm官方文档
- python3.5.4_windows下32与64位安装包
- GitHack-python3.zip
- Python3.x+PyQtChart实现数据可视化界面
- python3根据模板图片批量自动制作个性
- 《机器学习实战》源代码Python3
- Python3.5.2的IDLE汉化版计算机等级考试
- python3.5 百度ai人脸识别
- python3实现的国密SM2+SM3
- Introduction to machine learning with python (
- Introduction to Machine Learning with Python.p
- python100道面试题及解答全部答案 pyc
- #python3.3关于Tk中的Treeview使用方法
- Python3.x+Pyqt5实现界面编程浏览网页
- 《机器学习实战》Python3代码
- Python3学习笔记
- Python3.7.2中文文档-标准库-通用操作系
- Python3.7.2中文文档-标准库-Python数据类
- python3基础教程第三版高清
- 随机森林python3实现代码(带数据集)
- dlib-19.18.0-cp37-cp37m-linux_armv7l.whl
- python3学习路线+思维导图
- unlocker208 —— VMware 安装 MacOS的必备补
- Learn python3 the hard way
- 笨办法学python 3 第四版 英文
- python3爬虫
- Beginning Python: From Novice to Professional
- Python3实现KNN的三个包含数据集,水果
评论
共有 条评论