我遇到一个permission问题, 如果claude一直说找不到某个case,然后我让它写一个script返回总cases数量,然后我告诉他用这个script跑可以得到10000个,然后它自己debug出来了。所以需要教它debug
Jiajie's tech blog
Friday, March 27, 2026
Wednesday, March 25, 2026
Python版本降级
# Create a new venv with Python 3.11
C:\Users\KK\AppData\Local\Programs\Python\Python311\python.exe -m venv venv311
# Activate the venv
.\venv311\Scripts\activate # Windows PowerShell
pip install crowd-kit
python .\mle\multi_annotator_text_classification.py
Monday, August 29, 2022
Hack library
f返回值是Awaitable, 就要用xxx_aync的函数
f返回值是Awaitable<bool>, 就要用if (await f)
self::functionA
return await EntAbc::queryFromReq($req)->queryMi->gen() |> vec ($$)
return await EntAbc::queryFromReq($req)->queryMi->gen() |> Vec\filter_nulls ($$)
Data Structure (Hack)
Vec: $a = vec[1, 2]
Dict: $b = dict["foot" => 2]
keyset: $c = keyset[1, 2]
const string USER_NAME = "we are";
static::USER_NAME
| Str\join | join成一个字符串 | $a = Str\join(Vec\reverse($vec), ','); |
| Str\format | 组成一个字符串 | $a = Str\format('%d is num', 2); |
| C\count | Vec的个数 | $a = C\count($requirements) |
| C\is_empty | Vec是否为空 | C\is_empty($requirement) |
| C\fb\any_async C\any | Vec中任意一个对应lambda返回true就return true | $has_deprecated_req = C\fb\any($requirements, async $requirement ==> {return true},); |
| Vec\map | Vec中每个对应lambda组成的新vec | $a = await Vec\map_async($requirements, async $requirement ==> {return await static::func(1)},); |
| Vec\filter | Vec中filter对应lambda组成的新vec | $a = Vec\filter($requirements, aysnc $requirement ==> 1 === 1,); |
| int->str | 类型转换 | $a = (string) $c |
| Vec\concat | 合并两个vec变成一个 | $c = Vec\concat($a, $b) |
| Vec\diff | 合并两个vec变成一个 | $c = Vec\diff($a, $b) |
| Vec\intersect | 求交集 | $c =Vec\intersect($a, $b) |
| C\count | Vec的个数 | $a = C\count($requirements) |
返回null或者属性 Shapes::ids($student, 'id')
GraphQL
Relay
React
useState
Flow
Tuesday, February 1, 2022
Video on Demand设计
https://aws.amazon.com/solutions/implementations/video-on-demand-on-aws/
Audio on demean并没有具体教程,不过mediaConvert也可以覆盖。可以根据这个操作
https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-audio-only.html
1. Input, remove the video selector
2. Add output groups, choose APPLE HLS
3. in the encoding setting in the output setting, remove video
4. in the Apple HLS, choose Container for Audio-only output, choose MPEG-2 Transport Stream (关键步骤)
Friday, July 2, 2021
AWS Data Pipeline
AWS Data Pipeline用于ETL,一个use case是prod accout上的DDB数据clone到alpha account上DDB。先用Data Pipeline复制到alpha上的S3(CloudWatch 定时event),然后再用lambda将数据加载到DDB(CloudWatch 定时event)。缺点是如果这两个步骤是独立的。
Glue有ApplyMapping等,如果需要对数据进行编辑,就应该用Glue
Sunday, June 27, 2021
AWS Secrets Manager简介
Saturday, June 26, 2021
Google Search 技巧
| "vtasters" | Exact Match, "use * card" |
| site:stackoverflow.com how to install java | 在某个网站查找 |
| Nasdaq news after:2020 | 时间范围查询 Nasdaq news before:2020-03-01 Nasdaq news on:2020-04-15 |
| fngu download filetype:pdf | 文件格式 |
| intitle:cloudwatch | 只搜title |
| allintitle:cloudwatch dashboard | 所有关键字都在title |
| related:amazon.com | 相似网站 |