Tencent Cloud Cloud Studio Free A10: A Practical Guide to 20 Compute Hours + 2 Daily Hours

Update date: 2026-11-16 | Still valid: Yes. The 20 compute hours for first-time binding, the 2 compute hours claimable daily (valid for 7 days), and A10 being charged at 3.3 compute hours/hour all match the official documentation; the official docs don't state an end date for the campaign, so refer to the official page. (Sources: Compute hour purchase, Daily compute hour claim)
Tencent's Cloud Studio (the official site is now called Buddy Academy, at cloudstudio.net) has a genuinely useful perk: you get 20 compute hours for binding a Tencent Cloud account for the first time, and then you can check in daily to claim another 2 compute hours. An A10 is charged at 3.3 compute hours per hour, so the 20 compute hours from the initial binding are enough to run an A10 for about 6 hours (20 ÷ 3.3 ≈ 6.06), and the daily 2 compute hours come to about 36 minutes.
I've run the MiniMax H3 video model on it, and also used it to render a batch of animated shorts. This article lays out the rules, the claiming steps, the pitfalls I ran into, and ways to save compute hours, all in one go.
1. Read the rules first (verified against the official documentation)
| Item | Details |
|---|---|
| First-time binding of a Tencent Cloud account | 20 compute hours gifted, automatically added to your resource pack, generally claimable only once |
| Daily check-in | Once per day, 2 compute hours each time, valid for 7 days |
| A10 specs (official) | A10, 24G VRAM, 20 cores, 116G RAM |
| A10 billing | 3.3 compute hours / hour |
| What the initial 20 compute hours can run | About 6 hours on an A10 |
| What the daily 2 compute hours can run | About 36 minutes on an A10 |
| Compute hour unit price | 1 yuan/compute hour when buying a resource pack of fewer than 100 compute hours; without a resource pack it's pay-as-you-go, at 3.3 yuan/hour for an A10 |
The compute hours you claim daily expire in 7 days, so don't plan on stockpiling for a month and then using them all at once. If you check in every day, the most you'll have on hand is about a week's worth; expired ones get cleared. For the exact remaining balance, check "Settings → Resource Management".
Here are the billing rates for a few other commonly used specs too, since we'll need them later when saving compute hours: CPU 1 core 2G is 0.1 compute hours/hour, T4 (16G VRAM) is 1.2, V100 (32G) is 3.6, and L40 (48G) is 8.
2. Claiming steps
Preparation: a Tencent Cloud account with real-name verification completed. The official documentation states that using compute resources generally requires a Tencent Cloud account with real-name verification; individual verification requires being at least 18 years old, and the same identity information can be used to verify at most 3 Tencent Cloud accounts (Registration and real-name verification).
- Open Cloud Studio and click Log in in the top right corner; just scan the QR code with WeChat — no separate registration or password to remember.
- Click the avatar in the top right corner, click "Bind now" in the prompt, log in on the Tencent Cloud login page it takes you to, then click "Authorize". Once you see "Binding successful", you're done, and the 20 compute hours will arrive automatically.
- From then on, go to "Personal Center" every day, find the "Complete tasks to get compute hours" card → Daily check-in → Claim reward.

If you receive fewer than 2 compute hours, the official documentation gives only two reasons: you've already claimed today, or you haven't bound a Tencent Cloud account yet. If the claim page times out while loading, log out, log back in, and try again.
3. What it can do and what it's suited for
Let's start with what I've run myself. I got the MiniMax H3 video generation model running on Cloud Studio's A10, using ComfyUI plus a quantized version of the model. Here are the results from three presets I tested (same prompt, 5-second clip, with audio):
| Preset | Resolution / steps | Total time | Peak VRAM |
|---|---|---|---|
| Draft | 848×480 / 4-step Turbo | 75 seconds (including first-time model loading) | About 22.3G |
| Everyday | 1280×720 / 8-step Turbo | 305 seconds | About 22.3G |
| Original | 1280×720 / 20 steps | 11 min 19 sec | — |
A 720p 5-second clip takes about 5 minutes of pure computation, which comes to less than 0.3 compute hours. The peak VRAM is over 22G because ComfyUI tries to fill up VRAM as much as possible; it doesn't mean that's the minimum required. For how H3 performs on bigger GPUs, see my other article Running MiniMax H3 on several GPUs.
Beyond the GPU, this machine's CPU and RAM are also plenty. Under the A10 spec I saw 28 cores and 111G RAM in the container (the official listing says 20 cores and 116G; go by what you actually get), and rendering a 1080p animated short took about 7–10 minutes from startup to shutdown per clip, costing around 0.4 compute hours.
Judging by the 24G VRAM, it's well suited for:
- Stable Diffusion / ComfyUI image generation and short video generation (the official site has ready-made ComfyUI and Pytorch templates);
- Quantized video models and inference on 7B-class large models;
- Batch rendering and transcoding that need multi-core CPU plus lots of RAM.
Not so suited for: original large models that need tens or hundreds of GB of VRAM, or long training runs. 20 compute hours is just 6 hours — you can't run that kind of workload.


IV. Startup and Machine-Hour Saving Tips
CPU for prep, GPU for work. Whether you use a CPU or GPU spec, storage is shared. Downloading models, uploading assets, installing dependencies — these non-GPU tasks — switch to a cheaper CPU spec to do them. Once, when downloading a new model for H3, I switched to the cheapest CPU spec, 1 core 2G (0.1 machine-hours/hour), and the models and environment already on the disk were still there. When ready, switch back to GPU, and machine-hours are only spent on generation and rendering.
Write the commands in advance. Before booting, write what you want to run into a script, and after booting just type one line to start it. When I rendered a video the second time, pasting long commands into the web terminal kept breaking lines and missing returns; just entering commands took almost 10 minutes, longer than the rendering itself.
Run tasks in the background. Use nohup or setsid to put tasks in the background, with the terminal only showing logs. Once I refreshed the web page, and the script running in the foreground disappeared with it; the finished video hadn't been uploaded yet, so I had to boot up again to retrieve it.
nohup bash run.sh > run.log 2>&1 &tail -f run.logConfirm you've got the results before shutting down. The only basis for shutting down should be that the finished product has been downloaded or transferred elsewhere and the size matches; don't shut down just because the terminal has returned to the prompt.
Don't miss the daily check-in. 2 machine-hours per day gives 36 minutes on an A10, enough for a few 720p H3 short videos.
V. Common Pitfalls
- Scheduled shutdown defaults to 1 hour. Entering a space defaults to auto-shutdown after 1 hour, with a maximum of 24 hours per session; it shuts down directly at the set time with no second confirmation, and a countdown pops up 1 minute before. I got shut down by this default once while running a long task; remember to extend it before running long tasks (Scheduled Shutdown description).
- "12816 cluster overloaded" prompt. This is reported at startup when A10 resources are tight; in the several times I encountered it, no machine-hours were deducted, and it started after waiting a bit and retrying once or twice.
- Environment persistence. In my testing, things under the /root directory are preserved after shutdown, so models and virtual environments only need to be installed once. Still, it's best to download important results to your local machine promptly and not treat the cloud disk as your only backup.
- Network. Pulling files from overseas cloud disks is very slow — I measured only a few dozen KB/s, so a 194MB package would take 1 to 6 hours; I gave up in the end. Domestic sources are much faster: ModelScope about 23MB/s per connection, pip defaults to the Tencent mirror, and hf-mirror and GitHub also connect. Prefer downloading models from ModelScope.
VI. Comparison with Colab and Kaggle
| Cloud Studio A10 | Google Colab Free | Kaggle Notebooks | |
|---|---|---|---|
| Free quota | 20 machine-hours for first binding + 2 machine-hours daily (valid for 7 days) | Yes, but the limit is undisclosed and fluctuates | About 30 GPU hours per week (sometimes more), reset weekly |
| GPU | A10 24G (can also switch to T4, V100, etc. as needed, with different charges) | Not fixed, changes over time | P100, or 2× T4 |
| Session length | Scheduled shutdown up to 24 hours (limited by machine-hour balance) | Up to 12 hours, disconnects when idle | 12 hours, disconnects after 20 minutes of interactive idle |
| Environment form | Web-based VS Code + terminal, root privileges | Jupyter notebook | Jupyter notebook / script |
| Storage | /root preserved after shutdown (my testing) | The VM is deleted after being idle for a while | /kaggle/working auto-saves 20G |
| Main limitations | Small quota; pay-as-you-go after it runs out | Free tier doesn't allow SSH or remote desktop; generating content via web UI outside notebooks may be interrupted | Queuing when GPUs are busy |
| Domestic access | Direct connection, WeChat login | Requires stable access to Google | Requires stable access to Kaggle |
Sources: Cloud Studio machine-hour purchase, Colab FAQ, Kaggle Notebooks documentation, Kaggle GPU usage guide.
My view: to run generation tools with a web interface like ComfyUI under a domestic network, or if you need 24G of VRAM, Cloud Studio is the easiest — it just has a small quota, suited to short tasks and trying things out. For long training runs and heavy weekly use, Kaggle's roughly 30 hours per week is more durable. The Colab free tier is fine for writing code and running small experiments, but running generative web UIs on it is easily interrupted.
.expressive-code{font-family:var(--ec-uiFontFml);font-size:var(--ec-uiFontSize);font-weight:var(--ec-uiFontWg);line-height:var(--ec-uiLineHt);text-size-adjust:none;-webkit-text-size-adjust:none}.expressive-code *:not(:is(svg, svg *)){all:revert;box-sizing:border-box}.expressive-code pre{display:flex;margin:0;padding:0;border:var(--ec-brdWd) solid var(--ec-brdCol);border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));background:var(--ec-codeBg)}.expressive-code pre:focus-visible{outline:3px solid var(--ec-focusBrd);outline-offset:-3px}.expressive-code pre > code{all:unset;display:block;flex:1 0 100%;padding:var(--ec-codePadBlk) 0;color:var(--ec-codeFg);font-family:var(--ec-codeFontFml);font-size:var(--ec-codeFontSize);font-weight:var(--ec-codeFontWg);line-height:var(--ec-codeLineHt)}.expressive-code pre{overflow-x:auto}.expressive-code pre.wrap .ec-line .code{white-space:pre-wrap;overflow-wrap:break-word;min-width:min(20ch, var(--ecMaxLine, 20ch))}.expressive-code pre.wrap .ec-line .code span.indent{white-space:pre}.expressive-code pre::-webkit-scrollbar,.expressive-code pre::-webkit-scrollbar-track{background-color:inherit;border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));border-top-left-radius:0;border-top-right-radius:0}.expressive-code pre::-webkit-scrollbar-thumb{background-color:var(--ec-sbThumbCol);border:4px solid transparent;background-clip:content-box;border-radius:10px}.expressive-code pre::-webkit-scrollbar-thumb:hover{background-color:var(--ec-sbThumbHoverCol)}.expressive-code pre::-webkit-scrollbar-corner{background:transparent}.expressive-code .ec-line{direction:ltr;unicode-bidi:isolate;display:grid;grid-template-areas:'gutter code';grid-template-columns:auto 1fr;position:relative}.expressive-code .ec-line .gutter{grid-area:gutter;color:var(--ec-gtrFg)}.expressive-code .ec-line .gutter > *{pointer-events:none;user-select:none;-webkit-user-select:none}.expressive-code .ec-line .gutter ~ .code{--ecLineBrdCol:var(--ec-gtrBrdCol)}.expressive-code .ec-line.highlight .gutter{color:var(--ec-gtrHlFg)}.expressive-code .ec-line .code{grid-area:code;position:relative;box-sizing:content-box;padding-inline-start:calc(var(--ecIndent, 0ch) + var(--ec-codePadInl) - var(--ecGtrBrdWd));padding-inline-end:var(--ec-codePadInl);text-indent:calc(var(--ecIndent, 0ch) * -1)}.expressive-code .ec-line .code::before,.expressive-code .ec-line .code::after,.expressive-code .ec-line .code :where(*){text-indent:0}.expressive-code .ec-line .code{--ecGtrBrdWd:var(--ec-gtrBrdWd);border-inline-start:var(--ecGtrBrdWd) solid var(--ecLineBrdCol, transparent)}.expressive-code .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.expressive-code .ec-line.mark{--tmLineBgCol:var(--ec-tm-markBg)}.expressive-code .ec-line.mark .code{--ecLineBrdCol:var(--ec-tm-markBrdCol)}.expressive-code .ec-line.ins{--tmLineBgCol:var(--ec-tm-insBg);--tmLabel:var(--ec-tm-insDiffIndContent)}.expressive-code .ec-line.ins .code{--ecLineBrdCol:var(--ec-tm-insBrdCol)}.expressive-code .ec-line.ins .code::before{color:var(--ec-tm-insDiffIndCol)}.expressive-code .ec-line.del{--tmLineBgCol:var(--ec-tm-delBg);--tmLabel:var(--ec-tm-delDiffIndContent)}.expressive-code .ec-line.del .code{--ecLineBrdCol:var(--ec-tm-delBrdCol)}.expressive-code .ec-line.del .code::before{color:var(--ec-tm-delDiffIndCol)}.expressive-code .ec-line.mark,.expressive-code .ec-line.ins,.expressive-code .ec-line.del{background:var(--tmLineBgCol)}.expressive-code .ec-line.mark .code,.expressive-code .ec-line.ins .code,.expressive-code .ec-line.del .code{--ecGtrBrdWd:var(--ec-tm-lineMarkerAccentWd)}.expressive-code .ec-line.mark .code::before,.expressive-code .ec-line.ins .code::before,.expressive-code .ec-line.del .code::before{display:block;position:absolute;left:0;box-sizing:border-box;content:var(--tmLabel, ' ');padding-inline-start:var(--ec-tm-lineDiffIndMargLeft);text-align:center;white-space:pre}.expressive-code .ec-line.mark.tm-label .code::before,.expressive-code .ec-line.ins.tm-label .code::before,.expressive-code .ec-line.del.tm-label .code::before{background:var(--ecLineBrdCol);padding:0 calc(var(--ec-tm-lineMarkerLabelPadInl) + var(--ec-tm-lineMarkerAccentWd)) 0 var(--ec-tm-lineMarkerLabelPadInl);color:var(--ec-tm-lineMarkerLabelCol)}.expressive-code .ec-line mark{--tmInlineBgCol:var(--ec-tm-markBg);--tmInlineBrdCol:var(--ec-tm-markBrdCol)}.expressive-code .ec-line ins{--tmInlineBgCol:var(--ec-tm-insBg);--tmInlineBrdCol:var(--ec-tm-insBrdCol)}.expressive-code .ec-line del{--tmInlineBgCol:var(--ec-tm-delBg);--tmInlineBrdCol:var(--ec-tm-delBrdCol)}.expressive-code .ec-line mark,.expressive-code .ec-line ins,.expressive-code .ec-line del{all:unset;display:inline-block;position:relative;--tmBrdL:var(--ec-tm-inlMarkerBrdWd);--tmBrdR:var(--ec-tm-inlMarkerBrdWd);--tmRadL:var(--ec-tm-inlMarkerBrdRad);--tmRadR:var(--ec-tm-inlMarkerBrdRad);margin-inline:0.4px;padding-inline:var(--ec-tm-inlMarkerPad);border-radius:var(--tmRadL) var(--tmRadR) var(--tmRadR) var(--tmRadL);background:var(--tmInlineBgCol);background-clip:padding-box}.expressive-code .ec-line mark.open-start,.expressive-code .ec-line ins.open-start,.expressive-code .ec-line del.open-start{margin-inline-start:0;padding-inline-start:0;--tmBrdL:0px;--tmRadL:0}.expressive-code .ec-line mark.open-end,.expressive-code .ec-line ins.open-end,.expressive-code .ec-line del.open-end{margin-inline-end:0;padding-inline-end:0;--tmBrdR:0px;--tmRadR:0}.expressive-code .ec-line mark::before,.expressive-code .ec-line ins::before,.expressive-code .ec-line del::before{content:'';position:absolute;pointer-events:none;display:inline-block;inset:0;border-radius:var(--tmRadL) var(--tmRadR) var(--tmRadR) var(--tmRadL);border:var(--ec-tm-inlMarkerBrdWd) solid var(--tmInlineBrdCol);border-inline-width:var(--tmBrdL) var(--tmBrdR)}.expressive-code .frame{all:unset;position:relative;display:block;--header-border-radius:calc(var(--ec-brdRad) + var(--ec-brdWd));--tab-border-radius:calc(var(--ec-frm-edTabBrdRad) + var(--ec-brdWd));--button-spacing:6.4px;--code-background:var(--ec-frm-edBg);border-radius:var(--header-border-radius);box-shadow:var(--ec-frm-frameBoxShdCssVal)}.expressive-code .frame .header{display:none;z-index:1;position:relative;border-radius:var(--header-border-radius) var(--header-border-radius) 0 0}.expressive-code .frame.has-title pre,.expressive-code .frame.has-title code,.expressive-code .frame.is-terminal pre,.expressive-code .frame.is-terminal code{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.expressive-code .frame .title:empty:before{content:'\a0'}.expressive-code .frame.has-title:not(.is-terminal){--button-spacing:calc(30.4px + 2 * (var(--ec-uiPadBlk) + var(--ec-frm-edActTabIndHt)))}.expressive-code .frame.has-title:not(.is-terminal) .title{position:relative;color:var(--ec-frm-edActTabFg);background:var(--ec-frm-edActTabBg);background-clip:padding-box;margin-block-start:var(--ec-frm-edTabsMargBlkStart);padding:calc(var(--ec-uiPadBlk) + var(--ec-frm-edActTabIndHt)) var(--ec-uiPadInl);border:var(--ec-brdWd) solid var(--ec-frm-edActTabBrdCol);border-radius:var(--tab-border-radius) var(--tab-border-radius) 0 0;border-bottom:none;overflow:hidden}.expressive-code .frame.has-title:not(.is-terminal) .title::after{content:'';position:absolute;pointer-events:none;inset:0;border-top:var(--ec-frm-edActTabIndHt) solid var(--ec-frm-edActTabIndTopCol);border-bottom:var(--ec-frm-edActTabIndHt) solid var(--ec-frm-edActTabIndBtmCol)}.expressive-code .frame.has-title:not(.is-terminal) .header{display:flex;background:linear-gradient(to top, var(--ec-frm-edTabBarBrdBtmCol) var(--ec-brdWd), transparent var(--ec-brdWd)),linear-gradient(var(--ec-frm-edTabBarBg), var(--ec-frm-edTabBarBg));background-repeat:no-repeat;padding-inline-start:var(--ec-frm-edTabsMargInlStart)}.expressive-code .frame.has-title:not(.is-terminal) .header::before{content:'';position:absolute;pointer-events:none;inset:0;border:var(--ec-brdWd) solid var(--ec-frm-edTabBarBrdCol);border-radius:inherit;border-bottom:none}.expressive-code .frame.is-terminal{--button-spacing:calc(30.4px + var(--ec-brdWd) + 2 * var(--ec-uiPadBlk));--code-background:var(--ec-frm-trmBg)}.expressive-code .frame.is-terminal .header{display:flex;align-items:center;justify-content:center;padding-block:var(--ec-uiPadBlk);padding-block-end:calc(var(--ec-uiPadBlk) + var(--ec-brdWd));position:relative;font-weight:500;letter-spacing:0.025ch;color:var(--ec-frm-trmTtbFg);background:var(--ec-frm-trmTtbBg);border:var(--ec-brdWd) solid var(--ec-brdCol);border-bottom:none}.expressive-code .frame.is-terminal .header::before{content:'';position:absolute;pointer-events:none;left:var(--ec-uiPadInl);width:33.6px;height:8.96px;line-height:0;background-color:var(--ec-frm-trmTtbDotsFg);opacity:var(--ec-frm-trmTtbDotsOpa);-webkit-mask-image:var(--ec-frm-trmIcon);-webkit-mask-repeat:no-repeat;mask-image:var(--ec-frm-trmIcon);mask-repeat:no-repeat}.expressive-code .frame.is-terminal .header::after{content:'';position:absolute;pointer-events:none;inset:0;border-bottom:var(--ec-brdWd) solid var(--ec-frm-trmTtbBrdBtmCol)}.expressive-code .frame pre{background:var(--code-background)}.expressive-code .copy{display:flex;gap:4px;flex-direction:row;position:absolute;inset-block-start:calc(var(--ec-brdWd) + var(--button-spacing));inset-inline-end:calc(var(--ec-brdWd) + var(--ec-uiPadInl) / 2)}@media (scripting: none){.expressive-code .copy{display:none}}.expressive-code .copy{direction:ltr;unicode-bidi:isolate}.expressive-code .copy button{position:relative;align-self:flex-end;margin:0;padding:0;border:none;border-radius:3.2px;z-index:1;cursor:pointer;transition-property:opacity, background, border-color;transition-duration:0.2s;transition-timing-function:cubic-bezier(0.25, 0.46, 0.45, 0.94);width:40px;height:40px;background:var(--code-background);opacity:0.75}.expressive-code .copy button div{position:absolute;inset:0;border-radius:inherit;background:var(--ec-frm-inlBtnBg);opacity:var(--ec-frm-inlBtnBgIdleOpa);transition-property:inherit;transition-duration:inherit;transition-timing-function:inherit}.expressive-code .copy button::before{content:'';position:absolute;pointer-events:none;inset:0;border-radius:inherit;border:var(--ec-brdWd) solid var(--ec-frm-inlBtnBrd);opacity:var(--ec-frm-inlBtnBrdOpa)}.expressive-code .copy button::after{content:'';position:absolute;pointer-events:none;inset:0;background-color:var(--ec-frm-inlBtnFg);-webkit-mask-image:var(--ec-frm-copyIcon);-webkit-mask-repeat:no-repeat;mask-image:var(--ec-frm-copyIcon);mask-repeat:no-repeat;margin:7.6px;line-height:0}.expressive-code .copy button:hover,.expressive-code .copy button:focus:focus-visible{opacity:1}.expressive-code .copy button:hover div,.expressive-code .copy button:focus:focus-visible div{opacity:var(--ec-frm-inlBtnBgHoverOrFocusOpa)}.expressive-code .copy button:active{opacity:1}.expressive-code .copy button:active div{opacity:var(--ec-frm-inlBtnBgActOpa)}.expressive-code .copy .feedback{--tooltip-arrow-size:5.6px;--tooltip-bg:var(--ec-frm-tooltipSuccessBg);color:var(--ec-frm-tooltipSuccessFg);pointer-events:none;user-select:none;-webkit-user-select:none;position:relative;align-self:center;background-color:var(--tooltip-bg);z-index:99;padding:2px 12px;border-radius:3.2px;margin-inline-end:var(--tooltip-arrow-size);opacity:0;transition-property:opacity, transform;transition-duration:0.2s;transition-timing-function:ease-in-out;transform:translate3d(0, 4px, 0)}.expressive-code .copy .feedback::after{content:'';position:absolute;pointer-events:none;top:calc(50% - var(--tooltip-arrow-size));inset-inline-end:calc(-2 * (var(--tooltip-arrow-size) - 0.5px));border:var(--tooltip-arrow-size) solid transparent;border-inline-start-color:var(--tooltip-bg)}.expressive-code .copy .feedback.show{opacity:1;transform:translate3d(0, 0, 0)}@media (hover: hover){.expressive-code{}.expressive-code .copy button{opacity:0;width:32px;height:32px}.expressive-code .frame:hover .copy button:not(:hover),.expressive-code .frame:focus-within :focus-visible ~ .copy button:not(:hover),.expressive-code .frame .copy .feedback.show ~ button:not(:hover){opacity:0.75}}.expressive-code :nth-child(1 of .ec-line) .code{padding-inline-end:calc(32px + var(--ec-codePadInl))}.expressive-code [data-language]::before{content:attr(data-language);position:absolute;z-index:2;right:8px;top:8px;padding:1.6px 8px;font-family:"JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:var(--ec-languageBadge-fontSize);font-weight:var(--ec-languageBadge-fontWg);text-transform:uppercase;color:var(--ec-languageBadge-fontCol);background:var(--ec-languageBadge-bg);opacity:var(--ec-languageBadge-opa);border-radius:var(--ec-languageBadge-brdRad);border-width:var(--ec-languageBadge-brdWd);border-color:var(--ec-languageBadge-brdCol);border-style:solid;pointer-events:none;transition:opacity 0.3s}.expressive-code .frame.has-title [data-language]::before,.expressive-code .frame.is-terminal [data-language]::before{top:40px}@media (hover: none){.expressive-code .frame [data-language]::before{opacity:1;margin-right:48px}.expressive-code .frame [data-language]:active::before{opacity:0}}@media (hover: hover){.expressive-code .frame [data-language]::before{opacity:1}.expressive-code .frame:hover [data-language]::before{opacity:0}}.expressive-code .ec-section{position:relative}.expressive-code .ec-section summary{position:relative;font-family:var(--ec-cs-closedFontFml);font-size:var(--ec-cs-closedFontSize);line-height:var(--ec-cs-closedLineHt);user-select:none;-webkit-user-select:none;cursor:pointer;color:var(--ec-cs-closedTextCol);background-color:var(--ec-cs-closedBgCol);--border-color:var(--ec-cs-closedBrdCol);--border-width:var(--ec-cs-closedBrdWd);box-shadow:inset 0 calc(-1 * var(--border-width)) var(--border-color), inset 0 var(--border-width) var(--border-color);margin:var(--ec-cs-closedMarg);padding:0}.expressive-code .ec-section summary::marker{display:inline-block;content:"";width:16px;height:16px}.expressive-code .ec-section summary::-webkit-details-marker{display:none}.expressive-code .ec-section summary :is(.expand, .collapse){position:relative;display:inline-block;width:16px;height:16px;vertical-align:text-bottom;opacity:0.75}.expressive-code .ec-section summary :is(.expand, .collapse)::after{content:'';position:absolute;pointer-events:none;inset:0;background-color:var(--ec-cs-closedTextCol);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;line-height:0}.expressive-code .ec-section summary .expand::after{-webkit-mask-image:var(--ec-cs-expandIcon);mask-image:var(--ec-cs-expandIcon);-webkit-print-color-adjust:exact;print-color-adjust:exact}.expressive-code .ec-section summary .collapse{display:none}.expressive-code .ec-section summary .collapse::after{-webkit-mask-image:var(--ec-cs-collapseIcon);mask-image:var(--ec-cs-collapseIcon)}.expressive-code .ec-section summary .text{margin-left:1em}.expressive-code .ec-section summary .ec-line .code{padding-block:var(--ec-cs-closedPadBlk);text-indent:0}.expressive-code .ec-section[open],.expressive-code .ec-section details[open] + .content-lines{--border-color:var(--ec-cs-openBrdCol);--border-width:var(--ec-cs-openBrdWd);box-shadow:inset 0 calc(-1 * var(--border-width)) var(--border-color), inset 0 var(--border-width) var(--border-color);padding-inline:var(--ec-cs-openPad);margin-inline:var(--ec-cs-openMarg)}.expressive-code .ec-section.github[open] summary{display:none}.expressive-code .ec-section.github[open]{background-color:var(--ec-cs-openBgCol)}.expressive-code .ec-section:is(.collapsible-start, .collapsible-end){display:flex;flex-direction:column}.expressive-code .ec-section:is(.collapsible-start, .collapsible-end) .content-lines{display:none}.expressive-code .ec-section:is(.collapsible-start, .collapsible-end) details[open] .collapse{display:inline-block}.expressive-code .ec-section:is(.collapsible-start, .collapsible-end) details[open] :is(.expand, .text){display:none}.expressive-code .ec-section:is(.collapsible-start, .collapsible-end) details[open] + .content-lines{display:block;background-color:var(--ec-cs-openBgColCollapsible)}@media print{.expressive-code .ec-section:is(.collapsible-start, .collapsible-end) details[open]{display:none}}.expressive-code .ec-section.collapsible-end{flex-direction:column-reverse}.expressive-code .gutter .ln{display:inline-flex;justify-content:flex-end;align-items:flex-start;box-sizing:content-box;min-width:var(--lnWidth, 2ch);padding-inline:2ch;color:var(--ec-lineNumbers-fg)}.highlight .expressive-code .gutter .ln{color:var(--ec-lineNumbers-hlFg)}.expressive-code .ec-collapse{position:relative}.expressive-code .ec-collapse__content{position:relative}.expressive-code .ec-collapse.ec-collapse--collapsed .ec-collapse__content{max-height:var(--ec-collapse-preview-height, 280px);overflow:hidden}.expressive-code .ec-collapse.ec-collapse--expanded .ec-collapse__content{max-height:none}.expressive-code .ec-collapse__gradient{position:absolute;bottom:0;left:0;right:0;height:80px;background:linear-gradient( to bottom, transparent 0%, var(--ec-collapse-bg-color, var(--code-background, #020110)) 100% );pointer-events:none;opacity:1;transition:opacity 0.3s ease;z-index:10}.expressive-code .ec-collapse.ec-collapse--expanded .ec-collapse__gradient{opacity:0;pointer-events:none}.expressive-code .ec-collapse__toggle{display:flex;align-items:center;justify-content:center;gap:6px;margin:0 auto;padding:6px 16px;background-color:rgba(255, 255, 255, 0.1);border:1px solid rgba(255, 255, 255, 0.2);border-radius:20px;color:var(--ec-collapse-accent-color, var(--sl-color-accent, var(--accent-color, #3b82f6)));font-size:13.6px;font-weight:500;cursor:pointer;transition:background-color 0.2s ease, border-color 0.2s ease}.expressive-code .ec-collapse.ec-collapse--collapsed .ec-collapse__toggle{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);z-index:20;margin:0}.expressive-code .ec-collapse.ec-collapse--expanded .ec-collapse__toggle{position:relative;margin:12px auto}.expressive-code .ec-collapse__toggle:hover{background-color:rgba(255, 255, 255, 0.15);border-color:rgba(255, 255, 255, 0.3)}.expressive-code .ec-collapse__toggle:focus-visible{outline:2px solid var(--ec-collapse-accent-color, var(--sl-color-accent, var(--accent-color, #3b82f6)));outline-offset:2px}.expressive-code .ec-collapse__icon{transition:transform 0.3s ease}.expressive-code .ec-collapse.ec-collapse--expanded .ec-collapse__icon{transform:rotate(180deg)}.expressive-code .ec-collapse__text-collapse{display:none}.expressive-code .ec-collapse.ec-collapse--expanded .ec-collapse__text-expand{display:none}.expressive-code .ec-collapse.ec-collapse--expanded .ec-collapse__text-collapse{display:inline}.editor-markdown[data-theme="light"] .ec-collapse__gradient{background:linear-gradient( to bottom, transparent 0%, var(--ec-collapse-bg-color, var(--code-background, #f6f7f9)) 100% )}.editor-markdown[data-theme="light"] .ec-collapse__toggle{background-color:rgba(0, 0, 0, 0.05);border-color:rgba(0, 0, 0, 0.15)}.editor-markdown[data-theme="light"] .ec-collapse__toggle:hover{background-color:rgba(0, 0, 0, 0.08);border-color:rgba(0, 0, 0, 0.25)}html.light .ec-collapse__gradient,body.light .ec-collapse__gradient,.expressive-code [data-theme="light"] .ec-collapse__gradient,.expressive-code [data-color-scheme="light"] .ec-collapse__gradient{background:linear-gradient( to bottom, transparent 0%, var(--ec-collapse-bg-color, var(--code-background, #f6f7f9)) 100% )}html.light .ec-collapse__toggle,body.light .ec-collapse__toggle,.expressive-code [data-theme="light"] .ec-collapse__toggle,.expressive-code [data-color-scheme="light"] .ec-collapse__toggle{background-color:rgba(0, 0, 0, 0.05);border-color:rgba(0, 0, 0, 0.15)}html.light .ec-collapse__toggle:hover,body.light .ec-collapse__toggle:hover,.expressive-code [data-theme="light"] .ec-collapse__toggle:hover,.expressive-code [data-color-scheme="light"] .ec-collapse__toggle:hover{background-color:rgba(0, 0, 0, 0.08);border-color:rgba(0, 0, 0, 0.25)}@media (prefers-color-scheme: light){html:not([data-theme="dark"]):not(.dark) .ec-collapse__gradient{background:linear-gradient( to bottom, transparent 0%, var(--ec-collapse-bg-color, var(--code-background, #f6f7f9)) 100% )}html:not([data-theme="dark"]):not(.dark) .ec-collapse__toggle{background-color:rgba(0, 0, 0, 0.05);border-color:rgba(0, 0, 0, 0.15)}html:not([data-theme="dark"]):not(.dark) .ec-collapse__toggle:hover{background-color:rgba(0, 0, 0, 0.08);border-color:rgba(0, 0, 0, 0.25)}}.expressive-code .ec-collapse .frame .header,.expressive-code .ec-collapse .frame figcaption{display:flex;align-items:center;justify-content:flex-start}.expressive-code .ec-collapse .frame.is-terminal .header .title{flex:1;text-align:center}.expressive-code .ec-collapse__header-toggle{display:inline-flex;align-items:center;gap:5.6px;margin-inline-start:auto;padding:4px 8px;font-size:12.8px;font-weight:400;background:transparent;border:none;color:inherit;opacity:1;cursor:pointer;transition:opacity 0.2s ease;white-space:nowrap}.expressive-code .ec-collapse__header-toggle:hover{opacity:0.7}.expressive-code .ec-collapse__header-toggle:focus-visible{opacity:1;outline:2px solid currentColor;outline-offset:2px;border-radius:2px}.expressive-code .ec-collapse__header-icon{transition:transform 0.2s ease}.expressive-code .ec-collapse--expanded .ec-collapse__header-icon{transform:rotate(180deg)}.expressive-code .ec-collapse--collapsed .ec-collapse__header-toggle .ec-collapse__text-expand{display:inline}.expressive-code .ec-collapse--collapsed .ec-collapse__header-toggle .ec-collapse__text-collapse{display:none}.expressive-code .ec-collapse--expanded .ec-collapse__header-toggle .ec-collapse__text-expand{display:none}.expressive-code .ec-collapse--expanded .ec-collapse__header-toggle .ec-collapse__text-collapse{display:inline}@media (prefers-reduced-motion: reduce){.expressive-code .ec-collapse__gradient,.expressive-code .ec-collapse__toggle,.expressive-code .ec-collapse__icon,.expressive-code .ec-collapse__header-toggle,.expressive-code .ec-collapse__header-icon{transition:none}} .editor-markdown,.editor-markdown:not([data-theme='one-dark-pro']) .expressive-code[data-theme='one-dark-pro']{--ec-brdRad:12px;--ec-brdWd:1.5px;--ec-brdCol:#3c424e;--ec-codeFontFml:var(--font-code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace);--ec-codeFontSize:14px;--ec-codeFontWg:400;--ec-codeLineHt:24px;--ec-codePadBlk:16px;--ec-codePadInl:21.6px;--ec-codeBg:#282c34;--ec-codeFg:#abb2bf;--ec-codeSelBg:#67769660;--ec-gtrFg:#767c89;--ec-gtrBrdCol:#767c8933;--ec-gtrBrdWd:1.5px;--ec-gtrHlFg:#abb2bfd2;--ec-uiFontFml:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji';--ec-uiFontSize:14.4px;--ec-uiFontWg:400;--ec-uiLineHt:1.65;--ec-uiPadBlk:4px;--ec-uiPadInl:16px;--ec-uiSelBg:#2c313a;--ec-uiSelFg:#d7dae0;--ec-focusBrd:#3e4452;--ec-sbThumbCol:#4e566660;--ec-sbThumbHoverCol:#60697afd;--ec-tm-lineMarkerAccentMarg:0px;--ec-tm-lineMarkerAccentWd:2.4px;--ec-tm-lineMarkerLabelPadInl:3.2px;--ec-tm-lineMarkerLabelCol:white;--ec-tm-lineDiffIndMargLeft:4.8px;--ec-tm-inlMarkerBrdWd:1.5px;--ec-tm-inlMarkerBrdRad:3.2px;--ec-tm-inlMarkerPad:2.4px;--ec-tm-insDiffIndContent:'+';--ec-tm-delDiffIndContent:'-';--ec-tm-markBg:#00548680;--ec-tm-markBrdCol:#007cb1d0;--ec-tm-insBg:#005a4a80;--ec-tm-insBrdCol:#008371d0;--ec-tm-insDiffIndCol:#2fb6a2d0;--ec-tm-delBg:#822c4d80;--ec-tm-delBrdCol:#af5573d0;--ec-tm-delDiffIndCol:#e686a4d0;--ec-frm-shdCol:#0000005b;--ec-frm-frameBoxShdCssVal:1.6px 1.6px 3.2px #0000005b;--ec-frm-edActTabBg:#282c34;--ec-frm-edActTabFg:#dcdcdc;--ec-frm-edActTabBrdCol:transparent;--ec-frm-edActTabIndHt:1.5px;--ec-frm-edActTabIndTopCol:null;--ec-frm-edActTabIndBtmCol:#b4b4b4;--ec-frm-edTabsMargInlStart:0;--ec-frm-edTabsMargBlkStart:0;--ec-frm-edTabBrdRad:12px;--ec-frm-edTabBarBg:#21252b;--ec-frm-edTabBarBrdCol:#3c424e;--ec-frm-edTabBarBrdBtmCol:transparent;--ec-frm-edBg:#282c34;--ec-frm-trmTtbFg:#9da5b4;--ec-frm-trmTtbDotsFg:#9da5b4;--ec-frm-trmTtbDotsOpa:0.15;--ec-frm-trmTtbBg:#282c34;--ec-frm-trmTtbBrdBtmCol:#3c424e;--ec-frm-trmBg:#282c34;--ec-frm-inlBtnFg:#abb2bf;--ec-frm-inlBtnBg:#abb2bf;--ec-frm-inlBtnBgIdleOpa:0;--ec-frm-inlBtnBgHoverOrFocusOpa:0.2;--ec-frm-inlBtnBgActOpa:0.3;--ec-frm-inlBtnBrd:#abb2bf;--ec-frm-inlBtnBrdOpa:0.4;--ec-frm-tooltipSuccessBg:#5c7f42;--ec-frm-tooltipSuccessFg:white;--ec-frm-copyIcon:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.75'%3E%3Cpath%20d%3D'M3%2019a2%202%200%200%201-1-2V2a2%202%200%200%201%201-1h13a2%202%200%200%201%202%201'%2F%3E%3Crect%20x%3D'6'%20y%3D'5'%20width%3D'16'%20height%3D'18'%20rx%3D'1.5'%20ry%3D'1.5'%2F%3E%3C%2Fsvg%3E");--ec-frm-trmIcon:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2060%2016'%20preserveAspectRatio%3D'xMidYMid%20meet'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'30'%20cy%3D'8'%20r%3D'8'%2F%3E%3Ccircle%20cx%3D'52'%20cy%3D'8'%20r%3D'8'%2F%3E%3C%2Fsvg%3E");--ec-languageBadge-fontSize:12px;--ec-languageBadge-fontCol:darkblue;--ec-languageBadge-fontWg:bold;--ec-languageBadge-bg:lightblue;--ec-languageBadge-brdRad:4px;--ec-languageBadge-opa:1;--ec-languageBadge-brdWd:0px;--ec-languageBadge-brdCol:transparent;--ec-cs-closedBrdWd:0px;--ec-cs-closedPadBlk:4px;--ec-cs-closedMarg:0;--ec-cs-closedFontFml:inherit;--ec-cs-closedFontSize:inherit;--ec-cs-closedLineHt:inherit;--ec-cs-closedTextCol:#abb2bf;--ec-cs-closedBgCol:rgb(84 174 255 / 20%);--ec-cs-closedBrdCol:rgb(84 174 255 / 50%);--ec-cs-openBrdWd:1px;--ec-cs-openPad:0;--ec-cs-openMarg:0;--ec-cs-openBgCol:transparent;--ec-cs-openBgColCollapsible:rgb(84 174 255 / 10%);--ec-cs-openBrdCol:transparent;--ec-cs-expandIcon:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2016%2016'%3E%3Cpath%20d%3D'm8.177.677%202.896%202.896a.25.25%200%200%201-.177.427H8.75v1.25a.75.75%200%200%201-1.5%200V4H5.104a.25.25%200%200%201-.177-.427L7.823.677a.25.25%200%200%201%20.354%200ZM7.25%2010.75a.75.75%200%200%201%201.5%200V12h2.146a.25.25%200%200%201%20.177.427l-2.896%202.896a.25.25%200%200%201-.354%200l-2.896-2.896A.25.25%200%200%201%205.104%2012H7.25v-1.25Zm-5-2a.75.75%200%200%200%200-1.5h-.5a.75.75%200%200%200%200%201.5h.5ZM6%208a.75.75%200%200%201-.75.75h-.5a.75.75%200%200%201%200-1.5h.5A.75.75%200%200%201%206%208Zm2.25.75a.75.75%200%200%200%200-1.5h-.5a.75.75%200%200%200%200%201.5h.5ZM12%208a.75.75%200%200%201-.75.75h-.5a.75.75%200%200%201%200-1.5h.5A.75.75%200%200%201%2012%208Zm2.25.75a.75.75%200%200%200%200-1.5h-.5a.75.75%200%200%200%200%201.5h.5Z'%2F%3E%3C%2Fsvg%3E");--ec-cs-collapseIcon:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2016%2016'%3E%3Cpath%20d%3D'M10.896%202H8.75V.75a.75.75%200%200%200-1.5%200V2H5.104a.25.25%200%200%200-.177.427l2.896%202.896a.25.25%200%200%200%20.354%200l2.896-2.896A.25.25%200%200%200%2010.896%202ZM8.75%2015.25a.75.75%200%200%201-1.5%200V14H5.104a.25.25%200%200%201-.177-.427l2.896-2.896a.25.25%200%200%201%20.354%200l2.896%202.896a.25.25%200%200%201-.177.427H8.75v1.25Zm-6.5-6.5a.75.75%200%200%200%200-1.5h-.5a.75.75%200%200%200%200%201.5h.5ZM6%208a.75.75%200%200%201-.75.75h-.5a.75.75%200%200%201%200-1.5h.5A.75.75%200%200%201%206%208Zm2.25.75a.75.75%200%200%200%200-1.5h-.5a.75.75%200%200%200%200%201.5h.5ZM12%208a.75.75%200%200%201-.75.75h-.5a.75.75%200%200%201%200-1.5h.5A.75.75%200%200%201%2012%208Zm2.25.75a.75.75%200%200%200%200-1.5h-.5a.75.75%200%200%200%200%201.5h.5Z'%2F%3E%3C%2Fsvg%3E");--ec-lineNumbers-fg:inherit;--ec-lineNumbers-hlFg:inherit}.expressive-code .ec-line :where(span[data-pv-ec-token]),.editor-markdown:not([data-theme='one-dark-pro']) .expressive-code[data-theme='one-dark-pro'] .ec-line :where(span[data-pv-ec-token]){color:var(--0, inherit);background-color:var(--0bg, transparent);font-style:var(--0fs, inherit);font-weight:var(--0fw, inherit);text-decoration:var(--0td, inherit)}.editor-markdown[data-theme='one-light'] .expressive-code:not([data-theme='one-dark-pro']),.expressive-code[data-theme='one-light']{--ec-brdCol:#d4d4d4;--ec-codeBg:#fafafa;--ec-codeFg:#383a42;--ec-codeSelBg:#e5e5e6;--ec-gtrFg:#8a8a8c;--ec-gtrBrdCol:#8a8a8c33;--ec-gtrHlFg:#383a42bc;--ec-uiSelBg:#dbdbdc;--ec-uiSelFg:#232324;--ec-focusBrd:#526fff;--ec-sbThumbCol:#4e56666e;--ec-sbThumbHoverCol:#5a637597;--ec-tm-markBg:#57c3fd80;--ec-tm-insBg:#4cccb780;--ec-tm-insDiffIndCol:#006e5dd0;--ec-tm-delBg:#fd9cba80;--ec-tm-delDiffIndCol:#984060d0;--ec-frm-shdCol:#00000028;--ec-frm-frameBoxShdCssVal:1.6px 1.6px 3.2px #00000028;--ec-frm-edActTabBg:#fafafa;--ec-frm-edActTabFg:#121417;--ec-frm-edActTabIndBtmCol:null;--ec-frm-edTabBarBg:#eaeaeb;--ec-frm-edTabBarBrdCol:#d4d4d4;--ec-frm-edBg:#fafafa;--ec-frm-trmTtbFg:#424243;--ec-frm-trmTtbDotsFg:#424243;--ec-frm-trmTtbBg:#eaeaeb;--ec-frm-trmTtbBrdBtmCol:#d4d4d4;--ec-frm-trmBg:#fafafa;--ec-frm-inlBtnFg:#383a42;--ec-frm-inlBtnBg:#383a42;--ec-frm-inlBtnBrd:#383a42;--ec-frm-tooltipSuccessBg:#008900;--ec-cs-closedTextCol:#383a42}.editor-markdown[data-theme='one-light'] .expressive-code:not([data-theme='one-dark-pro']) .ec-line :where(span[data-pv-ec-token]),.expressive-code[data-theme='one-light'] .ec-line :where(span[data-pv-ec-token]){color:var(--1, inherit);background-color:var(--1bg, transparent);font-style:var(--1fs, inherit);font-weight:var(--1fw, inherit);text-decoration:var(--1td, inherit)} .pv-ec-1f1dexa{--0:#61AFEF;--1:#3360C1} .pv-ec-el44zh{--0:#ABB2BF;--1:#383A42} .pv-ec-2qdisw{--0:#98C379;--1:#387138} .pv-ec-i02tzx{--0:#D19A66;--1:#875D01}Share Article
If this article helped you, please share it with others!












