<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>bankwang</title>
        <link>https://paragraph.com/@bankwang</link>
        <description>undefined</description>
        <lastBuildDate>Mon, 08 Jun 2026 05:02:16 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <image>
            <title>bankwang</title>
            <url>https://storage.googleapis.com/papyrus_images/cfba0df8fcf381ce12fa9ee518f538c4ef5f24a6e37a7e4bbd35fa47d284d31b.jpg</url>
            <link>https://paragraph.com/@bankwang</link>
        </image>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[First: Rabbithole]]></title>
            <link>https://paragraph.com/@bankwang/first-rabbithole</link>
            <guid>vi86GrbkPMy3doWmX35g</guid>
            <pubDate>Sun, 08 May 2022 08:33:37 GMT</pubDate>
            <description><![CDATA[这是RabbitHole任务的中间过程。 需要在mirror.xyz上面写文章。 以下是test内容：# _*_ coding: utf-8 _*_ import timeit def timer(func): def wrapper(*args, **kwargs): start = timeit.default_timer() res = func(*args, **kwargs) print('[{}] cost time: {:.6f} seconds.'.format(func.__name__, timeit.default_timer() - start)) return res return wrapper @timer def test(num=10000): for i in range(num): pass if __name__ == "__main__": test(num=1000)]]></description>
            <content:encoded><![CDATA[<p>这是<code>RabbitHole</code>任务的中间过程。</p><p>需要在mirror.xyz上面写文章。</p><p>以下是test内容：</p><pre data-type="codeBlock" text="# _*_ coding: utf-8 _*_

import timeit

def timer(func):
    def wrapper(*args, **kwargs):
        start = timeit.default_timer() 
        res = func(*args, **kwargs)
        print(&apos;[{}] cost time: {:.6f} seconds.&apos;.format(func.__name__, timeit.default_timer() - start))
        return res
    return wrapper


@timer
def test(num=10000):
    for i in range(num):
        pass


if __name__ == &quot;__main__&quot;:
    test(num=1000)
"><code># <span class="hljs-keyword">_</span><span class="hljs-operator">*</span><span class="hljs-keyword">_</span> coding: utf<span class="hljs-number">-8</span> <span class="hljs-keyword">_</span><span class="hljs-operator">*</span><span class="hljs-keyword">_</span>

<span class="hljs-keyword">import</span> <span class="hljs-title">timeit</span>

<span class="hljs-title">def</span> <span class="hljs-title">timer</span>(<span class="hljs-title">func</span>):
    <span class="hljs-title">def</span> <span class="hljs-title">wrapper</span>(<span class="hljs-operator">*</span><span class="hljs-title">args</span>, <span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-title">kwargs</span>):
        <span class="hljs-title">start</span> <span class="hljs-operator">=</span> <span class="hljs-title">timeit</span>.<span class="hljs-title">default_timer</span>() 
        <span class="hljs-title">res</span> <span class="hljs-operator">=</span> <span class="hljs-title">func</span>(<span class="hljs-operator">*</span><span class="hljs-title">args</span>, <span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-title">kwargs</span>)
        <span class="hljs-title">print</span>(<span class="hljs-string">'[{}] cost time: {:.6f} seconds.'</span>.<span class="hljs-title">format</span>(<span class="hljs-title">func</span>.<span class="hljs-title">__name__</span>, <span class="hljs-title">timeit</span>.<span class="hljs-title">default_timer</span>() <span class="hljs-operator">-</span> <span class="hljs-title">start</span>))
        <span class="hljs-title"><span class="hljs-keyword">return</span></span> <span class="hljs-title">res</span>
    <span class="hljs-title"><span class="hljs-keyword">return</span></span> <span class="hljs-title">wrapper</span>


@<span class="hljs-title">timer</span>
<span class="hljs-title">def</span> <span class="hljs-title">test</span>(<span class="hljs-title">num</span><span class="hljs-operator">=</span>10000):
    <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">i</span> <span class="hljs-title">in</span> <span class="hljs-title">range</span>(<span class="hljs-title">num</span>):
        <span class="hljs-title">pass</span>


<span class="hljs-title"><span class="hljs-keyword">if</span></span> <span class="hljs-title">__name__</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">"__main__"</span>:
    <span class="hljs-title">test</span>(<span class="hljs-title">num</span><span class="hljs-operator">=</span>1000)
</code></pre>]]></content:encoded>
            <author>bankwang@newsletter.paragraph.com (bankwang)</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/d3266dcfb6fee29e0ce76525e2eb9ef2a1a1503096960286ecc13f45b9b96e9d.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>