以 httpx 软件包为例:
pip download httpx
从 pypi 下载软件包(非安装)文件
macOS 命令行查看文件夹内容结构
macOS 命令行终端里如何显示当前目录结构,查看当前目录及其子目录中的所有文件和文件夹,并以树状结构展示出来。
可以使用自带的 ls
命令。安装和使用 tree
命令效果更好。
Python 从源码路径安装依赖包
例如多个项目用到自己写的一个存储在本地的依赖包。这个包会持续的修正更新。
这样做的好处是当修改这个包的代码时,引用此包的项目也将立即使用修改后的代码。
与 ChatGPT 对话的艺术与技巧
参考 让 ChatGPT 成为你的得力助手 这边文章发现更多用法。
在使用过程中如何更好的引导 ChatGPT,有一些经验技巧分享如下。
🤔️ 有时候 ChatGPT 的回答内容别截断了,如何显示剩余内容
可以向它说:继续
Arweave 智能合约代码的规范
先是引用。然后是翻译。
以下英文引用自 warp docs
Contract source code specification
- A contract source code MAY be written in ES module format.
- A contract source MUST contain function (sync or async) named
handle
. - A contract source MAY use IIFE bundling format.
- The
handle
function MUST accept exactly two arguments:state
andaction
- The
state
argument MUST be the current state of the contract. - The
action
argument MUST containcaller
field (i.e. Arweave wallet address) andinput
field. Theinput
field MUST contain thefunction
field and any additional data required to perform given operation. - The maximum size of the JSON.stringified representation of the
input
field MUST NOT exceed 2048 bytes. - The
handle
function MUST terminate by either:- returning
{ state: newState }
- this will cause the contract state to be updated - returning
{ result: newResult }
- throwing
ContractError
- returning
以下是我的翻译:
macOS 键盘鼠标相关工具
-
KeyCastr
按键可视化。例如录制视频教程时很有用,在屏幕上显示当前的按键。
也支持显示鼠标的操作。
开源、免费。 -
KeyboardCleanTool
暂时锁定键盘和触控板。比如暂时离开电脑时避免猫咪🐈“帮你写作” :P。或给键盘清灰时或许能用到。
免费。
macOS 效率应用介绍
macOS 上提高操作效率的工具,提升你的生产力。
-
Alfred
知名的老牌启动器工具。基础功能免费,高级功能要付费购买,一次性买断制。
快速启动应用、搜索和 Workflow 和 Snippets 等功能,可以大大提高电脑端的操作效率。
JS array remove(popup) first element
Array.shift()
For example:
var arr = [1, 2, 3, 4];
var theRemovedElement = arr.shift(); // theRemovedElement == 1
console.log(arr); // [2, 3, 4]
GitHub 获得项目中每种编程语言占比
首先使用 GitHub API 获得项目中每种语言的代码行数,
API: https://api.github.com/repos/<user/repo>/languages
,替换其中的 <user/repo>
。
例如 curl https://api.github.com/repos/cli/cli/languages
,
返回的结果示例: