Jinja2 Documentation Release 2.10
information from templates. If you are developing Jinja2 extensions this gives you a good overview of the node tree generated. Environment.preprocess(source, name=None, filename=None) Preprocesses the source but modifications in the Jinja2 core may shine through. For example if Jinja2 introduces a new AST node in later versions that may be returned by parse(). 2.19 The Meta API New in version 2.2. The meta print(type(result)) str Rendering a Python object produces that object as long as it is the only node: >>> class Foo: ... def __init__(self, value): ... self.value = value ... >>> result = env.from_string('{{0 码力 | 148 页 | 475.08 KB | 1 年前3Hello 算法 1.0.0b1 Python版
个栈帧,函数返 回时,栈帧空间会被释放。 ‧「指令空间」用于保存编译后的程序指令,在实际统计中一般忽略不计。 Figure 2‑9. 算法使用的相关空间 """ 类 """ class Node: 2. 复杂度分析 hello‑algo.com 27 def __init__(self, x): self.val = x # 结点值 self.next = None # 指向下一结点的指针(引用) """ def function(): # do something... return 0 def algorithm(n): # 输入数据 b = 0 # 暂存数据(变量) node = Node(0) # 暂存数据(对象) c = function() # 栈帧空间(调用函数) return a + b + c # 输出数据 2.3.2. 推算方法 空间复杂度的推算方法和时 space_complexity.py === def constant(n): """ 常数阶 """ # 常量、变量、对象占用 O(1) 空间 a = 0 nums = [0] * 10000 node = ListNode(0) # 循环中的变量占用 O(1) 空间 for _ in range(n): c = 0 # 循环中的函数占用 O(1) 空间 for _ in range(n):0 码力 | 178 页 | 14.67 MB | 1 年前3Hello 算法 1.0.0b2 Python版
。 Figure 2‑9. 算法使用的相关空间 """ 类 """ class Node: 2. 复杂度分析 hello‑algo.com 27 def __init__(self, x: int): self.val: int = x # 结点值 self.next: Optional[Node] = None # 指向下一结点的指针(引用) """ 函数 """ def function() return 0 def algorithm(n) -> int: # 输入数据 A: int = 0 # 暂存数据(常量,一般用大写字母表示) b: int = 0 # 暂存数据(变量) node = Node(0) # 暂存数据(对象) c: int = function() # 栈帧空间(调用函数) return A + b + c # 输出数据 2.3.2. 推算方法 空间复杂度的推 constant(n: int) -> None: """ 常数阶 """ # 常量、变量、对象占用 O(1) 空间 a: int = 0 nums: list[int] = [0] * 10000 node = ListNode(0) # 循环中的变量占用 O(1) 空间 for _ in range(n): c: int = 0 # 循环中的函数占用 O(1) 空间 for _ in range(n):0 码力 | 186 页 | 15.69 MB | 1 年前3Scrapy 1.4 Documentation
XMLFeedSpider XMLFeedSpider is designed for parsing XML feeds by iterating through them by a certain node name. The iterator can be chosen from: iternodes, xml, and html. It’s recommended to use the iternodes could be a problem for big feeds It defaults to: 'iternodes'. itertag A string with the name of the node (or element) to iterate in. Example: itertag = 'product' namespaces A list of (prefix, uri) tuples or another one). parse_node(response, selector) This method is called for the nodes matching the provided tag name (itertag). Receives the response and an Selector for each node. Overriding this method0 码力 | 394 页 | 589.10 KB | 1 年前3Celery 3.0 Documentation
protocol can be implemented in any language. In addition to Python there’s node-celery [https://github.com/mher/node-celery] for Node.js, and a PHP client [https://github.com/gjedeer/celery-php]. Language local If you start the rabbitmq-server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit Stopping nodes... > w1.halcyon.local: TERM -> 64024 > Waiting for 1 node..... > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes..0 码力 | 2110 页 | 2.23 MB | 1 年前3Celery v4.0.0 Documentation
protocol can be implemented in any language. In addition to Python there’s node-celery [https://github.com/mher/node-celery] for Node.js, and a PHP client [https://github.com/gjedeer/celery-php]. Language local If you start the rabbitmq-server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit Stopping nodes... > w1.halcyon.local: TERM -> 64024 > Waiting for 1 node..... > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes..0 码力 | 2106 页 | 2.23 MB | 1 年前3Celery v5.0.5 Documentation
any language. In addition to Python there’s node-celery [https://github.com/mher/node-celery] and node-celery- ts [https://github.com/IBM/node-celery-ts] for Node.js, and a PHP client [https://github.co local If you start the rabbitmq-server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit Stopping nodes... > w1.halcyon.local: TERM -> 64024 > Waiting for 1 node..... > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes..0 码力 | 2315 页 | 2.14 MB | 1 年前3Celery v5.0.1 Documentation
any language. In addition to Python there’s node-celery [https://github.com/mher/node-celery] and node-celery- ts [https://github.com/IBM/node-celery-ts] for Node.js, and a PHP client [https://github.co local If you start the rabbitmq-server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit Stopping nodes... > w1.halcyon.local: TERM -> 64024 > Waiting for 1 node..... > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes..0 码力 | 2313 页 | 2.13 MB | 1 年前3Celery v5.0.2 Documentation
any language. In addition to Python there’s node-celery [https://github.com/mher/node-celery] and node-celery- ts [https://github.com/IBM/node-celery-ts] for Node.js, and a PHP client [https://github.co local If you start the rabbitmq-server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit Stopping nodes... > w1.halcyon.local: TERM -> 64024 > Waiting for 1 node..... > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes..0 码力 | 2313 页 | 2.14 MB | 1 年前3Celery v5.0.0 Documentation
any language. In addition to Python there’s node-celery [https://github.com/mher/node-celery] and node-celery- ts [https://github.com/IBM/node-celery-ts] for Node.js, and a PHP client [https://github.co local If you start the rabbitmq-server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit Stopping nodes... > w1.halcyon.local: TERM -> 64024 > Waiting for 1 node..... > w1.halcyon.local: OK > Restarting node w1.halcyon.local: OK celery multi v4.0.0 (latentcall) > Stopping nodes..0 码力 | 2309 页 | 2.13 MB | 1 年前3
共 313 条
- 1
- 2
- 3
- 4
- 5
- 6
- 32