0%

This is a test for my blog deployment

How to Install Qwen Code

Qwen Code is an AI-powered coding assistant that helps developers write, understand, and maintain code more efficiently. This guide will walk you through the installation process.

What is Qwen Code?

Qwen Code is an advanced AI coding assistant that provides:

  • Real-time code completion
  • Bug detection and fixing
  • Code explanation and documentation
  • Multi-language support
  • Integration with popular IDEs and text editors

Prerequisites

Before installing Qwen Code, make sure you have:

  • A compatible operating system (Windows, macOS, or Linux)
  • Node.js (v14 or higher) installed (for some integrations)
  • An active internet connection
  • A code editor or IDE where you want to use Qwen Code

Installation Methods

  1. Open Visual Studio Code
  2. Navigate to the Extensions view by clicking on the Extensions icon in the Activity Bar or pressing Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS)
  3. Search for “Qwen Code” in the marketplace
  4. Click “Install” on the official Qwen Code extension
  5. Restart VS Code to complete the installation

Method 2: Command Line Interface

  1. Ensure Node.js is installed on your system
  2. Install the Qwen Code CLI using npm:
    1
    npm install -g @qwen/code-cli
  3. Initialize the CLI with your API key:
    1
    qwen config --api-key YOUR_API_KEY

Method 3: Web Interface

  1. Visit the official Qwen Code web platform
  2. Sign up for an account or sign in with your existing credentials
  3. No installation required - access the tool directly from your browser

Configuration

After installation, you may need to configure:

  • API key (if using the service with authentication)
  • Language preferences
  • Code style preferences
  • Exclusion patterns for sensitive files
  • Keyboard shortcuts

Using Qwen Code

Once installed, you can:

  • Get code suggestions as you type
  • Ask questions about code functionality
  • Generate code snippets for common tasks
  • Review and refactor existing code
  • Translate code between different programming languages

Troubleshooting

Common installation issues and their solutions:

  • Extension won’t install: Ensure your VS Code version is up-to-date
  • API key not working: Double-check for typos in your API key
  • Slow performance: Check your internet connection and ensure your system meets the minimum requirements
  • Language support: Verify that your programming language is supported by Qwen Code

Getting Started with Qwen Code

  1. Open a project in your preferred development environment
  2. Start coding as usual
  3. Look for inline suggestions that Qwen Code provides
  4. Use the shortcut Ctrl+Enter (or Cmd+Enter on macOS) to accept suggestions
  5. Ask questions by commenting your code or using the Qwen Code command palette

Conclusion

With Qwen Code installed, you’re now equipped with an AI-powered coding assistant that can significantly boost your productivity. Whether you’re debugging complex issues, exploring new libraries, or learning a new programming language, Qwen Code is designed to support your development workflow.

For more information, refer to the official Qwen Code documentation or join the community forums for support and tips.

大作文

原因句式
结果句式

观点类

要点:I think …,彻底倒向某种观点

一边倒结构(同意)

  • 开篇:(背景句)+ 转述题目(Some people think/believe/argue/maintain that … / It is thought/believed/argued/maintained that … / It is true that… 复述题目所有意思)+ 表明观点(I completely agree with this idea.)
  • 主体段 1:首先,同意的第 1 个理由
  • 主体段 2:其次,同意的第 2 个理由
  • 结尾:重申观点(+ 分论点)(In conclusion, 我认为…)

一边倒结构(反对)

  • 开篇:(背景句)+ 转述题目 + 表明观点(I completely disagree with this idea and I believe…
  • 主体段 1:首先,反对的第 1 个理由
  • 主体段 2:其次,反对的第 2 个理由
  • 结尾:重申观点(+ 分论点)(In conclusion, 我认为…)

讨论类

要点:两边都讲,但是要明确自己支持哪一方

  • 开篇:(背景句)+ 转述题目(While some people think that …, others believe that… / People have different views about whether … or …)+ 表明观点(我认为)
  • 主体段 1:其中一方面分论点(There are several reasons why it can be argued that… / It can be argued that …)首先,… 其次,…
  • 主体段 2:另外一方面的分论点(However, I would agree with those who believe that…)首先,… 其次,…(我同意的观点)
  • 结尾:重申观点(+ 分论点)(In conclusion, 虽然一些人认为…,但是我认为…)

报告类

要点:原因、问题(结果)、解决办法

  • 开篇:(背景句)+ 转述题目(Some people think/believe/deem/argue/maintain that … / It is thought/believed/deemed/argued/maintained that … / It is true that …)+ 主要内容(The focus of this essay is to illustrate the causes and solutions of this problem/phenomenon/issue.)
  • 主体段 1:产生这个问题的原因有很多(There are many reasons for this problem.)。原因 1 + 论证;原因 2 + 论证
  • 主体段 2:有一些相应的办法(To cope with this problem, some effective measures/actions/steps should be taken.)。办法 1 + 论证;办法 2 + 论证(对应上一段)
  • 结尾:总结(In conclusion, …)

问题:随着 …,一些相关的问题可以被预料到:As …, several related problems can be anticipated. 问题 1 + 解释;问题 2 + 解释

混合类

要点:使用前三种结构的主体段

  • 开篇:(背景句)+ 转述题目(Some people think/believe/deem/argue/maintain that … / It is thought/believed/deemed/argued/maintained that … / It is true that …)+ 主要内容(The focus of this essay is to illustrate the causes of this phenomenon.)+ 表明观点(As far as I am concerned, …)
  • 主体段 1:回答第 1 个问题(对应题型主体段)
  • 主体段 2:回答第 2 个问题(对应结构主题段)
  • 结尾:In conclusion, 总结上文

小作文

  • Introduction: The … compares/illustrates in …(转述题目所有信息)
  • Summary: It is clear/noticeable that …(对比所有信息的相似性和差异性)
  • Body Paragraph 1: Looking at the information in more detail, we can see that…
  • Body Paragraph 2: As for …, / Moreover,…./ However,…

数据类

要点:数据越大越重要

  • 动态图(数据随着时间不断变化;按照时间分段):起始时间 + 数据 + 变化趋势 + 终点时间 + 终点数据

  • 静态图(数据不随着时间变化或只变 1 次):数据最大必须写;第二大和最小可写可不写;不大不小不能写(除非字数太少)

实用表达如下

数据变化

1. 变化趋势

  • 上升、下降
  • 上升 V: rise; increase; ascend; swell; go up; climb up; boom; soar
  • 上升 N: rise; increase; ascent; swell; upward trend; growth; boom; soar
  • 下降 V: fall; decline; decrease; reduce; go down; collapse; plunge; slump
  • 下降 N: fall; decline; decrease; reduction; downward trend; slide; collapse; slump

2. 幅度表达

  • 幅度大 ADV: dramatically; surprisingly; strikingly; enormously; remarkably; substantially; noticeably; considerably; significantly; obviously
  • 幅度大 ADJ: dramatic; surprising; striking; enormous; remarkable; substantial; noticeable; considerable; significant; obvious
  • 幅度小 ADV: moderately; slightly; steadily; gradually; slowly; minimally
  • 幅度小 ADJ: moderate; slight; steady; gradual; slow; small

3. 常见句型结构

  1. 事物 + 方向 (V) + 幅度 (ADV)
  2. There is/was a 幅度 (ADJ) + 方向 (N) + in 事物
  3. 事物 + had/experienced a 幅度 (ADJ) + 方向 (N)
  4. 时间段/地点 + witness/notice/observe/see a 幅度 (ADJ) + 方向 (N) + in 事物
    时间段: the period between … and … / from … to …

4. 最大值表达

  • 事物 + peaked at + 数据
  • 事物 + reached a peak of + 数据
  • 事物 + reached a plateau at + 数据
  • 事物 + arrived at a climax at + 数据
  • 事物 + hit a peak at + 数据
  • 事物 + reached a maximum number/amount of + 数据
  • 事物 + soar/rock to a highest point of + 数据

描述数据

  1. 介词短语补充数据。(from…to…, between … and…, at…, by…)rise to 上升到… / rise by 上升了…
  • Birth rates have also fallen in developed countries over the past 50 years, from 2.8 children per family to 1.6.
  • Over the following 5 years, the waste output of companies B and C rose by around 2 tonnes, but the figure for company A fell by approximately 1 tonne.
  • By 2040, it is thought that around 27% of the Japanese population will be 65 years old or more, while the figures for Sweden and the USA will be slightly lower, at about 25% and 23% respectively.
  1. 符号补充法:英语中的括号和破折号可以补充数据。
  • By contrast, Germans were the lowest overall spenders, with roughly the
    same figures (just under £150,000) for each of the six products.
  • While girls rated activities such as art and craft highly —- just under 60% stated that they enjoyed these in their spare time, only 35% of boys opted
    for creative pastimes.
  1. 利用 with 结构(with sb. + sth. / with sth. + sth.)
  • There is a sharp increase between 6:00 and 8:00 in the morning, with 400 people using the station in the morning.
  • By contrast, historic houses and monuments were visited by only 16% of the sample, while wildlife parks and zoos were the least popular of the four types of tourist attractions, with only 9% of visitors.
  1. 定语从句
  • The second most popular activity, which attracted 80% of boys and 60% of girls, was playing electronic or computer games.
  • Next came central heating ownership, which rose from 37% of households in 1972 to 64% in 1983.
  1. 分词可以用于补充数据。(现在分词 doing 表主动;过去分词 done 表被动)
  • The second most popular activity, attracting 80% of boys and 60% of girls, was playing electronic or computer games.
  • Next came central heating ownership, rising from 37% of households in 1972 to 64% in 1983.
  1. 百分比和分数的转换表达

    26%: about a quarter; just over a quarter
    33%: one third; one in three; one out of three
    50%: a half
    74%: around three quarters; just under three quarters

  2. 百分比常用句型

    事物 occupy/represent/account for/constitute XXX%

    The percentage/proportion of 事物 stand at/is XXX%

地图

变化前

  • X 位于
    X is/lies(lay)/is located/is situated/is built in/on/to the east/west/south/north/left/right of … *in 表示 A 在 B 内;on 表示 A 和 B 相邻;to 表示 A 和 B 分开

  • A 在 B 对面
    A is on the opposite side of B. A is opposite B.

  • 在附近
    Be close to; be near to; be in proximity of; be in close proximity to

  • 在中间
    Be halfway between… and…; exactly/roughly in the middle of
    变化后

  • 原来的
    The original/ previous/ former …

变化后

  • X 消失
    X disappeared/was removed.

  • A 变成 B
    A became B.
    A was replaced/substituted by B.
    A gave way to B.
    A was transformed/reconstructed/redeveloped/converted/turned over/changed
    to/into B.

  • 新增加
    A newly built … is/lies(lay)/is located/is situated/is built in/on/to the east/west/south/north/left/right of …
    A new … was added to …
    A new … was built/set up/constructed/completed and opened …
    The year 2000 saw two additions to the village: a pond in the northern part and a vegetable garden on the opposite side.

  • X 的面积变大/小
    The size of X was extended/enlarged/reduced. The size of X doubled/halved.

流程图

实用表达
表顺序
The first stage involves… In the next stage,…
In the following stage,… In the last stage,… Subsequently,… Firstly,…
Secondly,… Then,… Finally,…
表时间
At the same time, Simultaneously, During…
In the course of… Before this,… After this,…
表结果
Consequently,…
As a result,…
… so that …
表目的
The first step is to…
The next step is to …
The last step is to …
… in order (not) to…
… in order that …
… so as (not) to…

雅思写作结果句式

  1. 有可能(实现)

    • make it possible for sb. to do sth. = allow/enable sb. to do sth.
    • make it impossible for sb. to do sth. = prevent sb. from doing sth.
  2. 很可能(概率)

    • make it [more] likely for sb. to do sth. = raise/increase the likelihood for sb. to do sth.
    • make it [more] unlikely for sb. to do sth. = reduce the likelihood for sb. to do sth.
  3. 难易

    • make it easier for sb. to do sth. = help/facilitate sb. to do sth.

    • make it harder for sb. to do sth. = hider someone’s doing sth. / noun.

      hinder v. 阻碍;妨碍;阻挡 + 名词/名词性

  4. 必要

    • make it necessary for sb. to do sth. = require sb. to do sth.

    • make it unnecessary for sb. to do sth. = obviate/eliminate the need for sb. to do sth.

      obviate v. 消除;排除;打消

      eliminate v. 排除;清除;消除

  5. 想要

    • make it desirable for sb. to do sth. = encourage sb. to do something
    • make it undesirable for sb. to do sth. = discourage sb. to do something

有个朋友问基础不好的话学新2好还是新3好,这里简要以我的视角对两个课本的第一课文章做一个纯主观分析,不构成任何参考。

A Private Conversation(NCE2-L1)

Last week I went to the theatre. I had a very good seat. The play was very interesting, but I did not enjoy it. A young man and a young woman were sitting behind me. They were talking loudly. I got very angry because I could not hear the actors.

I turned round and looked at the man and the woman angrily. They did not pay any attention. In the end, I could not bear it. I turned round again.

“I can’t hear a word!” I said angrily.

It’s none of your business,” the young man said rudely. “This is a private conversation!”

  • was/were doing 过去进行时
  • pay attention [to] 注意
  • It’s none of your business 不关你的事

A Puma at Large(NCE3-L1)

at large 逍遥自在

Pumas are large, cat-like animals which are found in America. When [reports came into London Zoo] that a wild puma had been spotted forty-five miles south of London, they were not taken seriously. However, as the evidence began to accumulate, experts from the Zoo felt obliged to investigate, for the descriptions given by people who claimed to have seen the puma were extraordinarily similar.

oblige v. 强迫;迫使

obliged adj. 感激的

  • When [reports came into London Zoo] that a wild puma had been spotted When [reports came into London Zoo] that a wild puma had been spotted forty-five miles south of London, they were not taken seriously., they were not taken seriously.
    • 主句 They were not taken seriously. be taken + adv. 被怎么样地对待
    • 时间状语从句 When …,表示当…时,when后加完整句子,其中嵌套了一个同位语从句
    • 时间状语从句中,主句 Reports came into London Zoo.
    • 时间状语从句中,同位语从句 A wild puma had been spotted forty-five miles south of London. that引导同位语从句,同位语从句用于「解释说明」所修饰的词,在本句中,为对report的解释说明,同位语从句结构为 n. […] that sentence. 需要注意同位语从句与定语从句的差别
  • had done/had been done,过去完成时
  • 动词+ing/ed可转变为形容词,其中加ing变为使动态形容词(主动),修饰对象为原动词的施动者;加ed变为被动态形容词(被动),修饰对象为原动词的受动者,从以下例子中解释。
    • interest v. 使…感兴趣 English articles interest me. 英文文章很让我感兴趣。
    • interesting adj. 令人感兴趣的 English articles are interesting (to me). 英语文章(对我来说)是令人感兴趣的。
    • interested adj. 感兴趣的 I am interested (in English articles). 我(对英语文章)感兴趣。
    • 所以在”Experts from the Zoo felt obliged to investigate.”中,obliged 并非字典上查到的「感激的」之意,而是源自其动词 oblige 强迫, 所以在这里为「被强迫的」,地道的翻译为「有必要的」

The hunt for the puma began in a small village where a woman picking blackberries saw “a large cat” only five yards away from her. It immediately ran away when she saw it, and experts confirmed that a puma will not attack a human being unless it is cornered. The search proved difficult, for the puma was often observed in one place in the morning and in another place twenty miles away in the evening.

  • 原因句式,扩展内容详见https://aronnax.site/posts/e9e80472/
  • because/as为从属连词,引导原因从句
  • for表示原因实际上为并列连词,可参见and/but的用法,并非引导从句而是使用”Sentence A, for sentence B.”的结构,句子A和句子B均为独立句子

Wherever it went, it left behind a trail of dead deer and small animals like rabbits. Paw prints were seen in a number of places, and puma fur was found clinging to bushes. Several people complained of cat-like noises at night, and a businessman on a fishing trip saw the puma up a tree.

trail n. 痕迹;踪迹

paw n. (动物的)爪

fur n. (动物浓厚的)软毛

  • wherever/whenever, whatever/whoever/however等wh-ever表示无论,从句结构较复杂

The experts were now fully convinced that the animal was a puma, but where had it come from? As no pumas had been reported missing from any zoo in the country, this one must have been in the possession of a private collector and somehow managed to escape.

  • in the possession of … 为…所有

The hunt went on for several weeks, but the puma was not caught. It is disturbing to think that a dangerous wild animal is still at large in the quiet countryside.

雅思写作原因句式

A为原因,B为结果

noun指名词或名词性短语

  1. so/therefore

    A, so B.

    A. Therefore, B

    therefore = thus, hence, as a result, inconsequence, for this reason

  2. as/since/because

  3. because of + noun

    because of = owing to, due to, as a result of, thanks to

    • owe B to A 把B归咎于A
    • A (can) be owed to B B可以被归咎于A
  4. the reason/cause is …

    the reason why B is A (sentence)

    the reason/cause for noun is … (noun)

  5. A(noun) causes B(noun)

    cause = lead to, result in, give rise to, be responsible for, contribute to, trigger

    • cause … to do …

      The aggravating of air pollution has caused the incident of asthma to increse.

  6. B is caused by A

    be caused by = result from, be the result of, originate from, stem from, derive from, be derived from, be attributed to, arise from

    derive *v.*从 … 衍生出;起源于;来自;(从 … 中)得到,获得

    derive(衍生,起源) from = be caused by;

    be derived(获得,得到) from = be caused by

  7. which causes/causing … (跟结果)

  8. which is caused by/caused by … (跟原因)

  9. …, which means that

  10. with noun

    with … doing/done(既可以做原因,又可以做结果)

  11. A, so that B. B是想要达成的结果(目的性)

    A, so as to do sth.

  12. (in order) to do

免责声明:本文仅用于技术学习与个人备份,不建议用于任何侵权用途。

叠甲:本人完全业余,本教程本意是为朋友写个入门教程,所言之处有诸多错误,概不修正。

叠甲:直接搬运视频有版权风险!本质上是未经授权转载,请联系Youtube频道主获取版权授权,或自行承担法律风险,笔者对相关版权问题概不负责。

做YouTube视频翻译和搬运,除去最核心的翻译文稿,还有诸多过程,大致总结为挑选、下载、提取字幕、翻译SRT、压制硬字幕,这里简略说说。

1. 挑选视频

首先,确保你的网络通畅,以免卡顿。

在YouTube查找你喜爱的视频,且尽量确保B站上没有其他up主已经做过这期视频的翻译,以免后续投稿冲突和不必要的麻烦。

找到合适的视频后,复制该期视频的链接。

2. 下载视频

在这里推荐使用yt-dlp命令行界面操作,也顺便讲一下GUI的使用。

yt-dlp是一款基于命令行的多功能音频/视频下载器,是许多付费下载视频软件的核心部分,但实际上该命令行工具开源且免费,只是纯命令行界面相对用户不友好,实际上并不需要掌握过多技巧,学会复制粘贴即可。

在安装yt-dlp之前,推荐安装ffmpeg,这是一款开源免费的多媒体处理工具

安装(Windows)

Release界面下载对应平台的安装包,Windows选择yt-dlp.exe。假设你下载到了D:\yt-dlp文件夹,进入该文件夹,单击地址栏,键入cmd,打开该目录的终端界面,键入以下命令检查是否安装成功。

1
yt-dlp --version

如果想全局使用yt-dlp命令,可将其加入环境变量:按下win + s,键入environment variables进入环境变量配置页,再次点击右下角的environment variables,找到可以配置用户变量和系统变量的地方,在系统变量的文件中,进入path,在弹出的页面中new一个路径,填入D:\yt-dlp(以实际目录为准),以添加环境变量。之后win + r后键入cmd,再次输入yt-dlp --version检查是否成功。

安装(macOS)

macOS安装yt-dlp十分简单,可以使用第三方包管理器homebrew,之后在Terminal输入以下命令。

1
brew install yt-dlp

关于homebrew如何安装,请在网上查询。

使用

关于yt-dlp的所有配置,请在Github页面查询详细信息,详见yt-dlp

对于下载视频,只需要打开Terminal,输入

1
yt-dlp URL

例如

1
yt-dlp https://www.youtube.com/watch?v=dQw4w9WgXcQ

将会下载该视频到D:\yt-dlp

可以使用-o指令输出到指定目录,例如

1
yt-dlp -o "E:\Download\neverGonnaGiveYouUp" https://www.youtube.com/watch?v=dQw4w9WgXcQ

将会输出视频到E:\Download\neverGonnaGiveYouUp

当然,你可能需要下载指定质量的视频,可以使用-F指令,例如

1
yt-dlp -F URL

将会得到类似以下表格

image-20250928093132335

然后使用-f指定输出的格式,例如

1
yt-dlp -f 625+234 URL

如果你安装了ffmpeg,视频轨和音频轨将会自动合并,否则,可能需要你使用Premiere等软件手动合并。

同时,也可以暴力的使用以下指令下载

1
yt-dlp -f bestvideo+bestaudio URL

yt-dlp也可以用于下载字幕、视频封面等,请自行查询。

当然,以下指令完全可以混合使用,比如

1
yt-dlp -f bestvideo+bestaudio -o "E:\Download" URL

关于yt-dlp的更多常用用法,可以参考Ivon的部落格

yt-dlp也有响应开源的GUI客户端,如yt-dlp-gui,请参考其GitHub主页进行安装。

3. 提取字幕

字幕涉及时间轴,对于新手用户来说并不好操作,好在AI时代的来临,自动提取原文字幕以及打轴已经实现,下面通过介绍OpenAI的Whisper来展示如何提取字幕,当然,有的视频自带CC字幕,可以通过yt-dlp直接下载。

需要注意的是,Whisper依赖ffmpeg。

Whisper是由OpenAI(ChatGPT的研发公司)开发的开源文字转语音工具,源码只能通过纯命令行解决,好在由于其开源特性,很多开源的图形化界面客户端已被开源社区推出,例如Windows上的Whisper Desktop以及跨平台的Buzz,Whisper Desktop的使用非常简单,参考官方文档即可,亦或在B站上有大量教程,笔者使用MacBook码这篇文章,遂使用Buzz来做演示。

首先安装Buzz,在这里依旧使用Homebrew。

1
brew install --cask buzz

Buzz上架了App Store,现在可以直接于Mac App Store下载Buzz。

进入后,从菜单左上角添加一期视频

image-20250928103809899

在弹出窗口做出选择,注意导出srt字幕文件:

image-20250928104337122

选择模型时根据自己GPU算力情况做出抉择,模型越大,需要处理的时间越长,转录精度越高。在示范时我选择了Small模型翻译了Never Gonna Give You Up歌曲,发现转录结果并不理想,所以还是推荐Medium模型起手。当然,对于歌曲,你可以选择去除背景声再做识别以提高精度,比如使用Ultimate Vocal Remover这款软件。

翻译后输出的srt字幕会输出在视频文件的相同目录下。

4. 制作字幕

字幕组常用的字幕制作软件为Aegisub,各种意义上非常权威的桜都字幕组在B站上为其做了一系列教程,可以参考他们的频道,同时,也可以参考台湾地区YouTube频道主PAPAYA电脑教室频道的相关教程

在这里需要说的是,在前期你可以套用一些其他字幕组开源的样式,比如为LinusTechTips制作字幕的辉光字幕组,他们开源了字幕样式,可以在这里下载「辉光样式.ass」,下载后用Aegisub打开,并在Subtitle -> Styles Manager二级菜单中将相关样式复制到系统样式中即可。

image-20250928110734507

5. 压制字幕

如果你制作的是srt字幕,可以试着通过CC字幕形式上传到B站视频。

如果你制作的是ass字幕,建议通过将字幕与视频压制为硬字幕视频以方便上传,推荐使用ffmpeg进行压制,命令行命令如下(将视频文件和字幕文件放入同一位置且在命令行中进入相关路径):

1
ffmpeg -i input.mp4 -vf ass=subtitle.ass -crf 16 output.mp4

会把subtitle.ass字幕压制进input.mp4视频,在同文件夹输出为output.mp4

6. 更多教程

各大字幕组、压制组都非常有开源精神,可以访问他们的Github主页和官网来访问更多教程,比如VCB-Studio推出的关于视频压制的教程,以及他们提供字体包(请注意版权!)

起因

在一台电脑上,可能有多个Python环境,每个环境都附带了大量的包,例如在我的mac上,就有macOS自带Python,homebrew所安装的Python以及Anaconda所附带的Python环境,管理起来非常混乱。

今日在完成CS50P作业时,发现我若在本地VS Code中import pytest,会被pylance报错为import "pytest" could not be resolved,甚是苦恼,故和ChatGPT对话良久,最终解决问题,先记录在这里,以免日后需要。这些内容零碎杂乱,遂不讲顺序直接分点列出。

叠甲:本人还没有搞懂这些问题的核心原理,仅作为解决问题的一次记录,不构成参考价值,如跟随本文执行命令导致出错,我不会也不将为你解答任何问题。

1. 如何更改使用的Interpreter

  1. 打开py文件,在VSCode右下角有一个显示Python版本号的地方,单击即可选择
  2. 在VSCode中,按下command + shift + pctrl + shift + p

2. 如何查看当前终端环境下正在使用的Interpreter

  1. 在macOS/Linux下,在terminal执行which python
  2. 在Windows下,在cmd执行where python

3. pip指令和Python Interpreter的关系

每个Interpreter负责自己所管辖的包,pip 安装的包只属于当前 Python 解释器对应的环境,不能直接在另一个解释器使用。举例来说,在homebrew/bin/python3解释器下使用pip install所安装的包并不能为anaconda/bin/python这个解释器所用

4. 什么是虚拟环境

虚拟环境相当于在所处项目下新建一个Python环境,用于和其他项目的Python环境所区分,主要是为了防止各个包版本不同而导致的污染(例如现有项目A和项目B,项目A使用pytest的3.1版本,项目B使用pytest的3.2版本,若不加以区分容易导致兼容性问题),虚拟环境可以理解为建立了一个「虚拟机」或「沙盒」,来防止污染问题。

新建一个虚拟环境并不会从建立前的解释器集成包,新建一个虚拟环境后立马执行pip list会发现只有pip一个包,所以每新建一个虚拟环境都需要重新部署各类包。

5. 如何新建一个虚拟环境

在当前目录新建一个虚拟环境

在命令行执行

1
python -m venv .

将会在当前项目目录新建一个没有显示名称的虚拟环境,该环境会被放到项目根目录的bin/Scripts/文件夹中(前者为macOS/Linux,后者为Windows)

新建后需要将该虚拟环境激活:

在Windows上执行

1
Scripts\activate.bat
1
Scripts\Activate.ps1

在macOS或Linux上执行

1
source bin/activate

此时再在终端执行which pythonwhere python应该就可以看到处于一个新的Python环境中

新建一个自己命名的虚拟环境

在命令行执行

1
python -m venv myenv

将会在当前项目目录新建一个名为myenv的虚拟环境,myenv仅为示例,实际上可更换为你想要的任何合法名字,该环境会被放到项目根目录的myenv文件夹中

新建后需要将该虚拟环境激活:

在Windows上执行:

1
myenv\activate.bat
1
myenv\Activate.ps1

在macOS或Linux上执行:

1
source myenv/activate

请注意,以上的指令都应将myenv替换为实际上为虚拟环境所起的名字。

此时再在终端执行which pythonwhere python应该就可以看到处于一个新的Python环境中

安装完虚拟环境后,可先执行以下命令来将pip更新到最新版本

1
python -m pip install --upgrade pip

6. pip如何批量管理包

批量导入

新建一个虚拟环境后,可能需要快速导入一些包,此时可以在项目根目录新建文本文件requirements.txt并分行列出常用包,如:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
requests
numpy
pandas
matplotlib
jupyterlab
ipython
scipy
scikit-learn
seaborn
flask
django
beautifulsoup4
black
pylint
pytest
virtualenv

也可以指定版本,如:

1
2
numpy==1.26.0
...

然后在终端执行以下命令即可安装指定包

1
pip install -r requirements.txt

实际上,txt文本文件名可以自定义,只需要执行指令更换为实际名称即可

批量导出

1
pip freeze > requirements.txt

相应的,执行以上指令会生成一个txt文本,列出当前虚拟环境所安装的所有包,txt文本名称依旧支持自定义

以上为修复问题过程中的一些记录,不构成任何参考。

这个博客网站是在上个星期创建的,介绍页上写的内容是「This is a blog about animation, technology, programming and more.」所以我想是时候聊一些和Animation有关的东西了,毕竟无论是一开始在朋友圈,还是之后在公众号,直到现在的个人博客,初衷都是写漫评。而本博客的前两篇内容,一篇是AI文字,另一篇更像是说明书而不是一篇文章,所以把这篇关于《浪浪山小妖怪》的漫评看作本博客的第一篇正式内容也不为过。

还记得之前B站某知名up主曾说「美漫也算二次元?」,我常把这句话顺手演变成「国漫也算二次元?」来表达我对国漫的看不下去,事实也确实如此,国漫至今仍没有一部能拿得出手的动画,能够如日本动画那样为全世界所熟知,所幸的是我也逐渐接受了这一点,再也没有指望哪部国产动画能走出华人圈子,而在降低标准后,今天时隔好多个年月,终于又去看一部《浪浪山小妖怪》,甚是惊喜,我想最终评分可以给到7.5/10毫不为过。

Part 1. 真正的合家欢动画电影

我想我们可以从「合家欢」的字面意思开始说起,台湾省教育部重编国语辞典修订本对「阖家欢」的定义为:「全家歡暢融洽(全家欢畅融洽)」,而如今被大多数人所认为的合家欢电影,似乎却演变成了「题材适合全体家庭成员一起看的电影」,这些电影通常不会包含儿童不宜的过激场面,也不去特意违背思想传统的长者们的意识形态。但是这样足够了吗——我想这是只有「合家」却没有「欢乐」,拿近几年口碑没输过的《流浪地球2》举例,确实是一部过硬的科幻电影,内容健康小清新,也向世界展示中式哲学,不少人说这是合家欢电影,可是不妨把电影放在「小孩哥」思维下看看,大概会是「战斗,爽!-> 这是讲啥呢 -> 战斗,爽!->这是讲啥呢」,这是因为对于真正的小孩哥,他们眼里只有宇宙飞船和战斗情节,靠这些情节才勉强看完全片,只有在战斗部分才有明显的多巴胺分泌,这种时断时续的感觉,只能说是「爽」,不能说是「欢乐」,甚至中间夹杂了一些晦涩难懂。

那么有什么电影算得上是我这里严格定义的「合家欢」呢?我想宫崎骏的电影,以《千与千寻》为代表,很出色完成了这一点。如果说《流浪地球2》等作品实现合家欢是「适配」,如同一个网页为不同比例的设备调整UI界面,那么《千与千寻》则是为作品做了「多端开发」,在iOS上用Liquid Glass,在Android上用Material You,在Windows设备上用WinUI,让每一种用户都获得原生级别的体验。在《千与千寻》的故事中,小孩子们体验到了小千寻在异世界的精彩故事,这里有神秘的无脸男,各式各样的妖怪,让人流连忘返;而对于那些对于社会隐喻等等内容感兴趣的人来说,他们能看到的是左派动画家宫崎骏透过动画所反映的泡沫经济下人心惶惶的日本社会;而回到那些上了年纪的老者,或许又能get到这部电影所表达的人生哲学,从而会心一笑。我在上一次看完《千与千寻》后便暗下决心,我每十年要回顾一次这部电影,正是因为这个原因。

千与千寻剧照

《千与千寻》中,汤婆婆住所的一处装饰神似美国国徽[1]

那么回到今天的主角《浪浪山小妖怪》,我认为他很好的「模仿」了宫崎骏的做法。对于小孩子来说,这是一个西游故事的分支世界线,画面精良,故事有趣,诙谐幽默,转折不断,还有小孩哥最喜欢的战斗画面,只要现在小孩哥们还不厌倦西游这个IP,它就不输给现在市面上任何一个纯子供向动画,甚至对于那些对西游故事不感兴趣的小孩子,会因为这部片子的独特演绎,重新去捧起西游原著;而对于那些陪着孩子来看动画片的家长们,如果他们真的是在陪孩子看动画片而不是来电影院玩手机,我想他们将会震撼于浪浪山的故事情节,尤其是那些仍认为动画只有子供向的家长们。

浪浪山的不仅主线非常好懂,甚至隐喻部分也是可以直观感受的,长话短说就是,猪代表小镇做题家,蛤蟆代表投机公务员,猩猩是社恐青年,黄鼠狼是认清现实却无力改变的普普众生,他们有一个共同的名字:Nobody(正是电影的英文片名),他们不是超级英雄,不是关系户,而是你我一样的芸芸众生,最后他们燃尽全力,书写了一个读作圆满写作悲剧的结局…这类分析非常多,我推荐看完后可以看看类似于这篇文章[2]的豆瓣影评。而正是因为这部电影的种种隐喻基本上等于贴脸告诉你,才导致我认为这是一个很好的机会,让那些「大人们」认识到动画不仅仅是做给小孩子的。而我说这是在「模仿」宫崎骏,也正是因为这部片子在大人和小孩眼里可以说完全是两部不同的电影,达成了「多端开发」的目的。我认为他真正意义上达成了「合家欢」的严格定义。(当然,很多成年人看完会觉得很难受,所以这里的「欢」,更贴切一点的说是「情感共鸣」)

Part 2. 浪浪山的「山西情怀」

如果只有上面这些,《浪浪山小妖怪》远不是一个算是优秀的作品,毕竟在小众哥这里,「合家欢」甚至不是一个褒义词。所以有必要夸奖一下浪浪山的各种小细节,来阐述他的优秀。

首当其冲的是中国动画人的玩梗情节,一些突然的致敬不免让人会心一笑,包括但不限于对上美厂经典作品的隔空致敬,「9527」对周星驰的致敬,既见如来为何不拜对《黑神话悟空》的致敬等等等等。不过我作为一个基因里没有山西血,思想上却是一个山西脑的人来说,导演於水对他的故乡(山西太原)可真是有太多致敬。

首当其冲的是贴脸开大式致敬,动画里一个重要的地点正是「北张村」,自我开盒的说,北张村离我奶奶家不到2公里,我小时候说不定还见过於水本人呢… 这种家乡情怀也不免体现在映后活动,据我所知导演於水在太原和山西其他市县举办多场映后活动,绝对是非山西导演做不到的强度。

再就是他对山西这地方的人文氛围的致敬,这里面有贬也有褒。贬的最多的无过于关系文化,关系文化在华夏大地「遍地生花」,而在山西这片土地开的尤为旺盛,影片开头癞蛤蟆的二舅在大王洞当什么厨房管理员,如此小的官位都能让野猪期待癞蛤蟆的二舅能让他找上体制内工作,不得不说是山西的真实写照,毕竟在山西,食堂阿姨都是老师的亲戚,不管考啥都得动动关系,若是没有关系,月薪3k的工资都难说…而褒的地方,我觉得最动情的在于野猪一家的刻画,一个期望儿子找到稳定工作的母亲,一个鼓励创业还吹牛逼的父亲,可以说是照着无数山西人的家庭来刻画。最最细节的莫过于猪妈对于水壶的那段描写:如果水瓶没满就疯狂让你倒水喝,水瓶满的就说你没有好好喝水,总之活着的首要目的是一天喝上四壶水,不知道是多少山西小孩,或者说北方小孩的童年了。有这些如此感同身受的小细节,足以见得於水导演对生活体验的细致入微,对电影细节的精雕细琢,我不得不夸。

以上这些,可能在很多人眼里并不是加分项,而对于我一个大部分时间都生活在山西的人,必须狠狠加分。

Part 3. 国产动画,终究没有走出神话故事

前两部分夸的如此使劲,这部电影真的成了不成?显然不是,首先电影本身的结局是一大减分项,可以说是让前期很多人的感动变成了流汗黄豆,上一秒平平无奇的小小野猪,怎么还攒了个大招?可以说突然就不共情了,而电影本身之外,我认为有一个很严重的问题在于仍然没有改变的西游故事框架。

如果你仔细观察国漫电影的走向,你会发现那些出圈的华语动漫仍然是哪吒悟空白素贞,却从来没有一个原创IP做到了名利双收,而这样的现象扩展到我国的全ACGN领域,似乎也是成立的,最可感的莫过于国产游戏No.1怎么又是孙悟空。

而再观察已经享誉世界的日本动漫,出名的是什么呢,是鬼马咒万家(《鬼灭之刃》、《赛马娘》、《咒术回战》、《东京复仇者》、《间谍过家家》,被评选为婆罗门不看的大众动画),这里面除了《赛马娘》沾一些日本本国赛马,其他的没有任何一部是和大和民族的经典形象相关的。

差距正是这里,一部优秀的作品,一部享誉世界的作品,是不需要让观众了解背景知识的,而是的是开箱就看。我们的影视作品跳不出Monkey King, 英文字幕里必须包含那么一句「Yao(Chinese monster)」,永远需要海外观众去了解些什么,当然我们是热爱传统文化的,但是外国人真的喜欢这一套吗?

这背后有太多需要谈的东西,并不适合在一篇影评里大谈特谈,如果你感兴趣,可以去看看金星老师在牛津中国论坛上所讲的内容[3]

Part 4. 现在我怎么看待国漫

回到开头,我现在怎么看国漫,没办法一概而论,国漫有《风灵玉秀》这样的和日本ACGN作品很像的动画,也有像今天《浪浪山小妖怪》这样不那么ACGN的东西,甚至有《哪吒》这种热度和魔怔并行的东西,我依旧认为国漫不算二次元,国漫也不需要是二次元,不能在一个日本动画婆罗门的视角下谈国漫,正如不能在婆罗门视角下谈美漫,《米奇妙妙屋》和《新世纪福音战士》根本就是没有可对比项的两种东西,每个地区有各自的文化,不能去强求。而我真正期待的是有朝一日,一个原创的国产IP作品走向世界,让世界看到我们不仅有5000年文化,更有生生不息的时代创造力。

参考

[1]Stitch四弦琴:《隐藏在元素与细节中的表达:<千与千寻>的社会隐喻》(机核网)
[2]女神的秋裤:《【深度解析】四只小妖怪和最后的大招都有名字》(豆瓣)
[3]金星2018年在牛津中国论坛的一段发言 B站链接

SlutAi使用指南

1. 修改API_URL

SlutAI 基于 Qwen-Plus 模型,目前仅支持使用阿里云百炼平台的 API,如你需要更改平台,请前往js脚本修改API_URL的值。

2. 获取阿里云百炼平台API_KEY

  1. 前往阿里云百炼控制台并登录
  2. 跟随网页提示领取阿里云新用户的每个模型100万免费Tokens
  3. 前往模型->密钥管理或直接访问密钥管理
  4. 创建API_KEY并记下,填写在 SlutAI 的Input your own API KEY一栏

3. 修改Prompt

Input system prompt是选填项,默认值为You are a helpful assistant.,新手可以理解system prompt为给 SlutAI 的人设,下面提供几种原始指令

  1. 原教旨 SlutAI
    Assume that you are a slut, and you need to output your answer with dirty, unhealthy, slut-style words, like ‘bitch, ‘fuck’, ‘shit’, etc. And at the same time, keep your answer accurate and professional.
  2. 白痴版本
    You are an idiot, and you are not able to answer any questions asked by users, the only thing you can do is to tell the user that you don’t know how to deal with their questions

📝 Hexo 博客维护与操作备忘指南

1. 仓库结构

源码仓库(blog_backstage)

  • 内容:Hexo 配置、文章 Markdown、主题文件、插件配置
  • 用途:多设备同步、修改博客内容
  • 私有推荐

发布仓库(username.github.io)

  • 内容:public/ 生成的静态文件
  • 用途:GitHub Pages 托管博客
  • 公开仓库,直接访问 https://username.github.io

2. 常用命令

本地开发

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 本地启动预览
hexo s # localhost:4000

# 写文章
hexo new post "标题"
hexo new draft "草稿标题" # 保存为草稿
hexo publish draft "草稿标题" # 草稿转正

# 清理缓存(主题换了或配置修改后必须)
hexo clean

# 生成静态文件
hexo g

# 部署到 GitHub Pages
hexo d

# 同步源码仓库
git add .
git commit -m "更新文章/配置/主题"
git push origin main
git pull origin main # 拉取最新更新

查看远程仓库

1
2
git remote -v       # 查看关联的远程仓库
git remote show origin # 查看跟踪分支和详细信息

3. 多设备操作流程

  1. 新设备克隆源码
1
2
3
git clone https://github.com/yourusername/blog_backstage.git
cd blog_backstage
npm install
  1. 日常写作流程
1
2
3
4
5
git pull                  # 同步最新源码
hexo new post "文章标题"
hexo s # 本地预览
hexo clean && hexo g && hexo d # 生成并部署到 GitHub Pages
git add . && git commit -m "更新文章" && git push

4. 主题管理

  1. 下载主题到 themes/ 文件夹
1
2
cd themes
git clone 主题仓库地址 主题名
  1. 修改 Hexo 配置 _config.yml
1
theme: 主题名
  1. 主题自带配置
  • 打开 themes/主题名/_config.yml 修改颜色、菜单、评论等
  1. 重新生成部署
1
2
3
hexo clean
hexo g
hexo d

5. 部署注意事项

  • _config.yml 的关键配置:
1
2
url: https://yourusername.github.io   # 根仓库
root: / # 根路径 / 或子目录 /blog/
  • 主题/插件修改后一定要:
1
hexo clean && hexo g && hexo d
  • 线上 CSS/JS 资源加载失败 → 检查 root: 配置是否正确

  • GitHub Pages 缓存:

    • 浏览器刷新 Ctrl + F5 / Cmd + Shift + R
    • 等待几分钟 GitHub Pages 更新静态文件

6. 源码与部署分离注意

  • 不要把 public/node_modules/ 上传到源码仓库,加入 .gitignore
1
2
/public
/node_modules
  • 源码仓库用于多设备同步,部署仓库用于 GitHub Pages 展示

7. 依赖与更新

1
2
npm install         # 安装依赖
npm update # 更新 Hexo 和插件

8. 常见问题与解决

问题 解决方案
本地主题正常,GitHub Pages 不生效 检查 _config.yml root 配置,清理缓存后重新生成部署
文章更新不上线 hexo clean && hexo g && hexo d,确认 hexo-deployer-git 安装正确
多设备冲突 写文章前 git pull,写完 git push
CSS/JS 不加载 检查浏览器缓存,强制刷新
公共图片或第三方资源加载慢 使用 GitHub 直接托管或图床加速

9. 小技巧

  • 草稿管理:
1
2
3
hexo new draft "草稿标题"
hexo s --draft # 本地预览草稿
hexo publish draft "草稿标题"
  • 自动化部署(可选):GitHub Actions,实现 push 源码自动生成并部署

  • 多分支管理:

1
2
git checkout -b feature-xxx
git push -u origin feature-xxx

以后直接 git pull / git push 不需要再加参数


这份指南可以作为 你的 Hexo 日常维护备忘,覆盖了从源码管理、文章写作、部署到主题切换和缓存问题的完整流程。

如果你愿意,我可以帮你画一个 直观流程图,把 本地 → 源码仓库 → GitHub Pages 的操作关系可视化,看一眼就懂。

你想要流程图吗?