5 刘知杭 静态类型的Python 类型中的特殊非整数值 如果非要将string映射到int,则必须将某些非int表示范围内的str映射到目标 类型中的特殊非整数值。换言之,我们需要一个int+1大小的类型。 Golang的问题——多表达式返回值错误处理 Golang的错误处理本质是拿积类型当和类型用 拓展思考 放飞自我 更激进的类型推导,以及自动泛化 正文 大力出奇迹的类型收集 LemonHX曾提出过一种想法: 在运行时收集类型信息。0 码力 | 42 页 | 6.87 MB | 1 年前3
PyMuPDF 1.24.2 Documentationthat contains 'text'. (continues on next page) 10.6. How to Extract Table Content from Documents 55 PyMuPDF Documentation, Release 1.24.2 (continued from previous page) """ found = 0 wlist = page Syria;Damascus;2079000;9.7%;2019 Belarus;Minsk;1996553;20.8%;2022 Austria;Vienna;1962779;22.0%;2022 Poland;Warsaw;1863056;4.9%;2021 Philippines;Manila;1846513;1.6%;2020 Mali;Bamako;1809106;8.3%;2009 Malaysia;Kuala 30 0 R/R23 7 0 R /R27 20 0 R >> /ProcSet[/PDF/Text] % value: array of two name objects >> /Annots[55 0 R] % value: array, one entry (indirect object) >> Contents, Type, MediaBox, etc. are keys, 40 00 码力 | 565 页 | 6.84 MB | 1 年前3
Hello 算法 1.0.0b2 Python版. . . . . . . . . . . . . . . . . . 54 5. 栈与队列 55 5.1. 栈 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2. 队列 . . . . . . . . . . . . . . . . . . . . 这样的多次“搬运”降低了整体效率。 ‧ 下表对比了数组与链表的各种操作效率。 操作 数组 链表 访问元素 ?(1) ?(?) 添加元素 ?(?) ?(1) 删除元素 ?(?) ?(1) 55 5. 栈与队列 5.1. 栈 「栈 Stack」是一种遵循「先入后出 first in, last out」数据操作规则的线性数据结构。我们可以将栈类比为放 在桌面上的一摞盘子,如果需要拿 1.8 之后,HashMap 内数组长度大于 64 时,长度大于 8 的链 表会被转化为「红黑树」,以提升查找性能。 Python 采用「开放寻址」。字典 dict 使用伪随机数进行探测。 Golang 采用「链式地址」。Go 规定每个桶最多存储 8 个键值对,超出容量则连接一个溢出桶; 当溢出桶过多时,会执行一次特殊的等量扩容操作,以保证性能。 6.3. 小结 ‧ 向哈希表中输入一个键0 码力 | 186 页 | 15.69 MB | 1 年前3
2 张孝峰 Python与云 AWS的Python原生应用浅析 超过165项服务 数千个不同的API AWS Tools and SDKs • Python (boto3) • C++ • PHP • .NET • Ruby • Java • Golang • Node.js • JavaScript for Web AWS Command Line Interface pip install awscli 基于SDK for Python0 码力 | 42 页 | 8.12 MB | 1 年前3
Hello 算法 1.0.0b4 Python版链表初始化方法。建立链表分为两步,第一步是初始化各个节点对象,第二步是构建引用指向关系。完成后, 即可以从链表的头节点(即首个节点)出发,通过指针 next 依次访问所有节点。 4. 数组与链表 hello‑algo.com 55 # === File: linked_list.py === # 初始化链表 1 -> 3 -> 2 -> 5 -> 4 # 初始化各个节点 n0 = ListNode(1) n1 = ListNode(3) 64 且链表长度达到 8 时,链表会被转 换为红黑树以提升查找性能。 Python 采用开放寻址。字典 dict 使用伪随机数进行探测。 6. 散列表 hello‑algo.com 99 Golang 采用链式地址。Go 规定每个桶最多存储 8 个键值对,超出容量则连接一个溢出桶;当溢出桶过多时, 会执行一次特殊的等量扩容操作,以确保性能。 6.3. 哈希算法 在上两节中,我们了解了哈0 码力 | 329 页 | 27.34 MB | 1 年前3
Hello 算法 1.0.0b5 Python版E ∈ {1, 2, … , 254} (1 + N) =(1 + 23 ∑ ?=1 ?23−?2−?) ⊂ [1, 2 − 2−23] 第 3 章 数据结构 hello‑algo.com 55 图 3‑5 IEEE 754 标准下的 float 的计算示例 观察图 3‑5 ,给定一个示例数据 S = 0 ,E = 124 ,N = 2−2 + 2−3 = 0.375 ,则有: val 且链表长度达到 8 时,链表会被转 换为红黑树以提升查找性能。 第 6 章 哈希表 hello‑algo.com 116 Python 采用开放寻址。字典 dict 使用伪随机数进行探测。 Golang 采用链式地址。Go 规定每个桶最多存储 8 个键值对,超出容量则连接一个溢出桶;当溢出桶过多时, 会执行一次特殊的等量扩容操作,以确保性能。 6.3 哈希算法 在上两节中,我们了解了哈希0 码力 | 361 页 | 30.64 MB | 1 年前3
Django 1.10.x Documentationthe Django admin. The “Add choice” form looks like this: 2.9. Writing your first Django app, part 7 55 Django Documentation, Release 1.10.9.dev20171123183751 In that form, the “Question” field is a select file’s content to the filename. For example, the file css/styles.css would also be saved as css/styles.55e7cbb9ba48.css. The purpose of this storage is to keep serving the old files in case some pages still the url() method of the ManifestStaticFilesStorage storage backend, ulti- mately saving a 'css/styles.55e7cbb9ba48.css' file with the following content: @import url("../admin/css/base.27e20196a850.css");0 码力 | 1817 页 | 6.19 MB | 1 年前3
Django 1.10.x Documentationfile’s content to the filename. For example, the file css/styles.css would also be saved as css/styles.55e7cbb9ba48.css. The purpose of this storage is to keep serving the old files in case some pages still the url() method of the ManifestStaticFilesStorage storage backend, ultimately saving a 'css/styles.55e7cbb9ba48.css' file with the following content: @import url("../admin/css/base.27e20196a850.css"); mapping between the original file name (e.g. css/styles.css) and the hashed file name (e.g. css/styles.55e7cbb9ba48.css). The staticfiles.json file is created when running the collectstatic management command0 码力 | 2538 页 | 2.59 MB | 1 年前3
Python 标准库参考指南 2.7.18 tell whether the last line of a file ended in a newline or not (yes this happens!). 5.9. File Objects 55 The Python Library Reference, 发布 2.7.18 注解: On Windows, tell() can return illegal values (after an Library Reference, 发布 2.7.18 \number 匹配数字代表的组合。每个括号是一个组合,组合从 1 开始编号。比如 (.+) \1 匹配 'the the' 或者 '55 55', 但不会匹配 'thethe' (注意组合后面的空格)。这个特殊序列只能用于匹配前面 99 个 组合。如果 number 的第一个数位是 0,或者 number 是三个八进制数,它将不会被看作是一个组合,而 • Juan David Ibáñez Palomar • Marc-André Lemburg • Martin von Löwis • François Pinard • Barry Warsaw • Gustavo Niemeyer 5 The choice of N_() here is totally arbitrary; it could have just as easily0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 tell whether the last line of a file ended in a newline or not (yes this happens!). 5.9. File Objects 55 The Python Library Reference, 发布 2.7.18 注解: On Windows, tell() can return illegal values (after an Library Reference, 发布 2.7.18 \number 匹配数字代表的组合。每个括号是一个组合,组合从 1 开始编号。比如 (.+) \1 匹配 'the the' 或者 '55 55', 但不会匹配 'thethe' (注意组合后面的空格)。这个特殊序列只能用于匹配前面 99 个 组合。如果 number 的第一个数位是 0,或者 number 是三个八进制数,它将不会被看作是一个组合,而 • Juan David Ibáñez Palomar • Marc-André Lemburg • Martin von Löwis • François Pinard • Barry Warsaw • Gustavo Niemeyer 5 The choice of N_() here is totally arbitrary; it could have just as easily0 码力 | 1552 页 | 7.42 MB | 9 月前3
共 363 条
- 1
- 2
- 3
- 4
- 5
- 6
- 37













