stemseal 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stemseal/__init__.py +2 -0
- stemseal/__main__.py +3 -0
- stemseal/_runner.py +13 -0
- stemseal/cells/annual_leave_days/1.0/cell.py +11 -0
- stemseal/cells/annual_leave_days/1.0/contract.json +27 -0
- stemseal/cells/annual_leave_days/1.0/gt_cases.json +1 -0
- stemseal/cells/annual_leave_days/1.0/lock.json +10 -0
- stemseal/cells/currency_convert/1.0/cell.py +14 -0
- stemseal/cells/currency_convert/1.0/contract.json +30 -0
- stemseal/cells/currency_convert/1.0/gt_cases.json +1 -0
- stemseal/cells/currency_convert/1.0/lock.json +10 -0
- stemseal/cells/food_calories/1.0/cell.py +5 -0
- stemseal/cells/food_calories/1.0/contract.json +28 -0
- stemseal/cells/food_calories/1.0/gt_cases.json +1 -0
- stemseal/cells/food_calories/1.0/lock.json +10 -0
- stemseal/cells/geometric_mean_growth/1.0/cell.py +11 -0
- stemseal/cells/geometric_mean_growth/1.0/contract.json +27 -0
- stemseal/cells/geometric_mean_growth/1.0/gt_cases.json +1 -0
- stemseal/cells/geometric_mean_growth/1.0/lock.json +10 -0
- stemseal/cells/monthly_wage_from_hourly/1.0/cell.py +17 -0
- stemseal/cells/monthly_wage_from_hourly/1.0/contract.json +35 -0
- stemseal/cells/monthly_wage_from_hourly/1.0/gt_cases.json +1 -0
- stemseal/cells/monthly_wage_from_hourly/1.0/lock.json +10 -0
- stemseal/cells/percentage_point_diff/1.0/cell.py +5 -0
- stemseal/cells/percentage_point_diff/1.0/contract.json +29 -0
- stemseal/cells/percentage_point_diff/1.0/gt_cases.json +1 -0
- stemseal/cells/percentage_point_diff/1.0/lock.json +10 -0
- stemseal/cells/percentile_rank/1.0/cell.py +28 -0
- stemseal/cells/percentile_rank/1.0/contract.json +30 -0
- stemseal/cells/percentile_rank/1.0/gt_cases.json +1 -0
- stemseal/cells/percentile_rank/1.0/lock.json +10 -0
- stemseal/cells/price_for_target_margin/1.0/cell.py +7 -0
- stemseal/cells/price_for_target_margin/1.0/contract.json +29 -0
- stemseal/cells/price_for_target_margin/1.0/gt_cases.json +1 -0
- stemseal/cells/price_for_target_margin/1.0/lock.json +10 -0
- stemseal/cli.py +34 -0
- stemseal/guides/_default.json +45 -0
- stemseal/guides/exaone3.5.json +67 -0
- stemseal/guides/gemma.json +46 -0
- stemseal/guides/llama3.json +140 -0
- stemseal/guides/mistral.json +45 -0
- stemseal/guides/phi.json +44 -0
- stemseal/guides/qwen2.5.json +55 -0
- stemseal/guides/qwen3.json +49 -0
- stemseal/guides/tiny.json +48 -0
- stemseal/guides.py +122 -0
- stemseal/hub.py +252 -0
- stemseal/mcp.py +91 -0
- stemseal-0.1.6.dist-info/METADATA +104 -0
- stemseal-0.1.6.dist-info/RECORD +54 -0
- stemseal-0.1.6.dist-info/WHEEL +5 -0
- stemseal-0.1.6.dist-info/entry_points.txt +3 -0
- stemseal-0.1.6.dist-info/licenses/LICENSE +21 -0
- stemseal-0.1.6.dist-info/top_level.txt +1 -0
stemseal/__init__.py
ADDED
stemseal/__main__.py
ADDED
stemseal/_runner.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import json, sys
|
|
2
|
+
src = open(sys.argv[1], encoding="utf-8").read()
|
|
3
|
+
ns = {"__name__": "cell"}
|
|
4
|
+
exec(compile(src, "cell.py", "exec"), ns)
|
|
5
|
+
out = []
|
|
6
|
+
for x in json.load(sys.stdin):
|
|
7
|
+
try:
|
|
8
|
+
r = ns["cell_executor"](x)
|
|
9
|
+
json.dumps(r)
|
|
10
|
+
out.append({"ok": isinstance(r, dict), "out": r} if isinstance(r, dict) else {"ok": False, "err": "result is not an object"})
|
|
11
|
+
except Exception as e:
|
|
12
|
+
out.append({"ok": False, "err": "%s: %s" % (type(e).__name__, str(e)[:200])})
|
|
13
|
+
sys.stdout.write(json.dumps(out, ensure_ascii=False))
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from decimal import Decimal
|
|
2
|
+
|
|
3
|
+
def cell_executor(input_data: dict) -> dict:
|
|
4
|
+
years = input_data.get('years')
|
|
5
|
+
if not isinstance(years, int) or years < 0:
|
|
6
|
+
raise ValueError("Years must be a non-negative integer.")
|
|
7
|
+
|
|
8
|
+
# 연차 일수 계산 로직 수정
|
|
9
|
+
leave_days = min(25, 15 + (years - 1) // 2) if years > 0 else 0
|
|
10
|
+
|
|
11
|
+
return {"leave_days": leave_days}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "근속 연수로 연차 일수(1년 이상 15일, 이후 2년마다 1일, 최대 25일).",
|
|
3
|
+
"when_to_use": "직원 연차 휴가 일수를 정할 때.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"연차",
|
|
6
|
+
"연차 일수",
|
|
7
|
+
"근속",
|
|
8
|
+
"휴가 일수",
|
|
9
|
+
"annual leave",
|
|
10
|
+
"paid leave days",
|
|
11
|
+
"vacation days",
|
|
12
|
+
"years of service"
|
|
13
|
+
],
|
|
14
|
+
"input_schema": {
|
|
15
|
+
"required": [
|
|
16
|
+
"years"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"years": "int >= 0"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"output_keys": [
|
|
23
|
+
"leave_days"
|
|
24
|
+
],
|
|
25
|
+
"description_en": "Annual paid leave days from years of service (Korean labor law: 15 days after 1 year, +1 every 2 years, max 25).",
|
|
26
|
+
"when_to_use_en": "When deciding an employee's annual leave days."
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"years": 14}, "expected": {"leave_days": 21}}, {"input": {"years": 6}, "expected": {"leave_days": 17}}, {"input": {"years": 3}, "expected": {"leave_days": 16}}, {"input": {"years": 1}, "expected": {"leave_days": 15}}, {"input": {"years": 17}, "expected": {"leave_days": 23}}, {"input": {"years": 10}, "expected": {"leave_days": 19}}, {"input": {"years": 9}, "expected": {"leave_days": 19}}, {"input": {"years": 15}, "expected": {"leave_days": 22}}, {"input": {"years": 25}, "expected": {"leave_days": 25}}, {"input": {"years": 24}, "expected": {"leave_days": 25}}, {"input": {"years": 10}, "expected": {"leave_days": 19}}, {"input": {"years": 21}, "expected": {"leave_days": 25}}, {"input": {"years": 17}, "expected": {"leave_days": 23}}, {"input": {"years": 3}, "expected": {"leave_days": 16}}, {"input": {"years": 23}, "expected": {"leave_days": 25}}, {"input": {"years": 18}, "expected": {"leave_days": 23}}, {"input": {"years": 28}, "expected": {"leave_days": 25}}, {"input": {"years": 19}, "expected": {"leave_days": 24}}, {"input": {"years": 1}, "expected": {"leave_days": 15}}, {"input": {"years": 29}, "expected": {"leave_days": 25}}, {"input": {"years": 7}, "expected": {"leave_days": 18}}, {"input": {"years": 18}, "expected": {"leave_days": 23}}, {"input": {"years": 15}, "expected": {"leave_days": 22}}, {"input": {"years": 27}, "expected": {"leave_days": 25}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "annual_leave_days",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "2cf7029ba701c8fb927fd724b57a547e897fca9adb06e66979a5faa5d95d0f46",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:09+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from math import floor
|
|
2
|
+
|
|
3
|
+
def cell_executor(input_data: dict) -> dict:
|
|
4
|
+
if 'amount' not in input_data or 'rate' not in input_data:
|
|
5
|
+
raise ValueError("Input must contain 'amount' and 'rate' keys.")
|
|
6
|
+
|
|
7
|
+
amount = input_data['amount']
|
|
8
|
+
rate = input_data['rate']
|
|
9
|
+
|
|
10
|
+
if amount < 0 or rate <= 0:
|
|
11
|
+
raise ValueError("Amount must be non-negative and rate must be greater than zero.")
|
|
12
|
+
|
|
13
|
+
krw = floor(amount * rate)
|
|
14
|
+
return {"krw": krw}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "외화 금액을 환율(1단위당 원)로 원화 환산, 원 미만 버림.",
|
|
3
|
+
"when_to_use": "달러·엔·유로 등 외화를 원화로 바꿀 때.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"환율",
|
|
6
|
+
"환전",
|
|
7
|
+
"원화 환산",
|
|
8
|
+
"달러",
|
|
9
|
+
"외화",
|
|
10
|
+
"exchange rate",
|
|
11
|
+
"currency conversion",
|
|
12
|
+
"convert to won",
|
|
13
|
+
"usd to krw"
|
|
14
|
+
],
|
|
15
|
+
"input_schema": {
|
|
16
|
+
"required": [
|
|
17
|
+
"amount",
|
|
18
|
+
"rate"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"amount": "number >= 0",
|
|
22
|
+
"rate": "number > 0 (won per unit)"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"output_keys": [
|
|
26
|
+
"krw"
|
|
27
|
+
],
|
|
28
|
+
"description_en": "Convert a foreign currency amount to Korean won at a given rate (won per unit), truncating below 1 won.",
|
|
29
|
+
"when_to_use_en": "When converting dollars, yen, euros or other currencies to won."
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"amount": 1200.0, "rate": 1544.2}, "expected": {"krw": 1853040}}, {"input": {"amount": 3474.3, "rate": 1247.8}, "expected": {"krw": 4335231}}, {"input": {"amount": 1630.0, "rate": 98.9}, "expected": {"krw": 161207}}, {"input": {"amount": 1157.96, "rate": 1357.37}, "expected": {"krw": 1571780}}, {"input": {"amount": 2276.2, "rate": 1424.4}, "expected": {"krw": 3242219}}, {"input": {"amount": 3479.19, "rate": 208.9}, "expected": {"krw": 726802}}, {"input": {"amount": 353.0, "rate": 96.3}, "expected": {"krw": 33993}}, {"input": {"amount": 3701.0, "rate": 910.49}, "expected": {"krw": 3369723}}, {"input": {"amount": 2572.18, "rate": 889.52}, "expected": {"krw": 2288005}}, {"input": {"amount": 2879.7, "rate": 1223.85}, "expected": {"krw": 3524320}}, {"input": {"amount": 3984.9, "rate": 1039.7}, "expected": {"krw": 4143100}}, {"input": {"amount": 652.0, "rate": 1543.57}, "expected": {"krw": 1006407}}, {"input": {"amount": 2524.3, "rate": 1404.6}, "expected": {"krw": 3545631}}, {"input": {"amount": 1593.4, "rate": 378.4}, "expected": {"krw": 602942}}, {"input": {"amount": 584.61, "rate": 780.63}, "expected": {"krw": 456364}}, {"input": {"amount": 3074.63, "rate": 1212.9}, "expected": {"krw": 3729218}}, {"input": {"amount": 2014.0, "rate": 645.6}, "expected": {"krw": 1300238}}, {"input": {"amount": 3030.0, "rate": 200.6}, "expected": {"krw": 607818}}, {"input": {"amount": 3533.1, "rate": 475.46}, "expected": {"krw": 1679847}}, {"input": {"amount": 2487.0, "rate": 1216.12}, "expected": {"krw": 3024490}}, {"input": {"amount": 414.3, "rate": 1176.44}, "expected": {"krw": 487399}}, {"input": {"amount": 748.35, "rate": 862.8}, "expected": {"krw": 645676}}, {"input": {"amount": 4843.0, "rate": 882.3}, "expected": {"krw": 4272978}}, {"input": {"amount": 4853.0, "rate": 58.59}, "expected": {"krw": 284337}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "currency_convert",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "8b9085b6ea582216759bbad400fa4d45b88210a36785dd365dc279580b440bd5",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:08+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
def cell_executor(input_data):
|
|
2
|
+
k = input_data.get("kcal_per_100g"); g = input_data.get("grams")
|
|
3
|
+
if not isinstance(k, (int, float)) or not isinstance(g, (int, float)) or k < 0 or g < 0:
|
|
4
|
+
raise ValueError("kcal_per_100g and grams must be numbers >= 0")
|
|
5
|
+
return {"kcal": round(k * g / 100, 1)}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "100g당 열량과 먹은 양(g)으로 섭취 열량(kcal).",
|
|
3
|
+
"when_to_use": "음식 칼로리, 먹은 양의 열량을 계산할 때.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"열량",
|
|
6
|
+
"칼로리",
|
|
7
|
+
"kcal",
|
|
8
|
+
"100g당",
|
|
9
|
+
"calories",
|
|
10
|
+
"per 100g",
|
|
11
|
+
"portion calories"
|
|
12
|
+
],
|
|
13
|
+
"input_schema": {
|
|
14
|
+
"required": [
|
|
15
|
+
"kcal_per_100g",
|
|
16
|
+
"grams"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"kcal_per_100g": "number >= 0",
|
|
20
|
+
"grams": "number >= 0"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"output_keys": [
|
|
24
|
+
"kcal"
|
|
25
|
+
],
|
|
26
|
+
"description_en": "Calories eaten (kcal) from kcal per 100 g and grams eaten.",
|
|
27
|
+
"when_to_use_en": "When computing the calories of a portion of food."
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"kcal_per_100g": 130, "grams": 29}, "expected": {"kcal": 37.7}}, {"input": {"kcal_per_100g": 898, "grams": 25}, "expected": {"kcal": 224.5}}, {"input": {"kcal_per_100g": 639, "grams": 533}, "expected": {"kcal": 3405.9}}, {"input": {"kcal_per_100g": 541, "grams": 101}, "expected": {"kcal": 546.4}}, {"input": {"kcal_per_100g": 125, "grams": 214}, "expected": {"kcal": 267.5}}, {"input": {"kcal_per_100g": 288, "grams": 91.1}, "expected": {"kcal": 262.4}}, {"input": {"kcal_per_100g": 186, "grams": 677.0}, "expected": {"kcal": 1259.2}}, {"input": {"kcal_per_100g": 453, "grams": 690.4}, "expected": {"kcal": 3127.5}}, {"input": {"kcal_per_100g": 755, "grams": 30}, "expected": {"kcal": 226.5}}, {"input": {"kcal_per_100g": 645, "grams": 115.2}, "expected": {"kcal": 743.0}}, {"input": {"kcal_per_100g": 97, "grams": 798.6}, "expected": {"kcal": 774.6}}, {"input": {"kcal_per_100g": 232, "grams": 644}, "expected": {"kcal": 1494.1}}, {"input": {"kcal_per_100g": 357, "grams": 347.6}, "expected": {"kcal": 1240.9}}, {"input": {"kcal_per_100g": 484, "grams": 597.6}, "expected": {"kcal": 2892.4}}, {"input": {"kcal_per_100g": 253, "grams": 774}, "expected": {"kcal": 1958.2}}, {"input": {"kcal_per_100g": 407, "grams": 12}, "expected": {"kcal": 48.8}}, {"input": {"kcal_per_100g": 140, "grams": 461.5}, "expected": {"kcal": 646.1}}, {"input": {"kcal_per_100g": 857, "grams": 318.8}, "expected": {"kcal": 2732.1}}, {"input": {"kcal_per_100g": 48, "grams": 457.4}, "expected": {"kcal": 219.6}}, {"input": {"kcal_per_100g": 109, "grams": 675}, "expected": {"kcal": 735.8}}, {"input": {"kcal_per_100g": 364, "grams": 565.6}, "expected": {"kcal": 2058.8}}, {"input": {"kcal_per_100g": 840, "grams": 440.4}, "expected": {"kcal": 3699.4}}, {"input": {"kcal_per_100g": 436, "grams": 538.4}, "expected": {"kcal": 2347.4}}, {"input": {"kcal_per_100g": 139, "grams": 509}, "expected": {"kcal": 707.5}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "food_calories",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "f6303f34c4f034a531fa71aa2f75076158e0b0d095c8abbb1586d9bce961c805",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:09+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
def cell_executor(input_data):
|
|
2
|
+
rates = input_data.get("rates")
|
|
3
|
+
if not isinstance(rates, list) or not rates:
|
|
4
|
+
raise ValueError("rates must be a non-empty list")
|
|
5
|
+
prod = 1.0
|
|
6
|
+
for r in rates:
|
|
7
|
+
f = 1 + float(r)
|
|
8
|
+
if f <= 0:
|
|
9
|
+
raise ValueError("1 + rate must be > 0")
|
|
10
|
+
prod *= f
|
|
11
|
+
return {"geo_mean_pct": round((prod ** (1 / len(rates)) - 1) * 100, 2)}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "성장률 목록(소수)의 기하평균 성장률(%).",
|
|
3
|
+
"when_to_use": "여러 기간 성장률을 하나의 평균 성장률로 합칠 때(기하평균).",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"기하평균",
|
|
6
|
+
"평균 성장률",
|
|
7
|
+
"geometric mean",
|
|
8
|
+
"분기 성장률",
|
|
9
|
+
"average growth rate",
|
|
10
|
+
"compound growth",
|
|
11
|
+
"cagr",
|
|
12
|
+
"growth rate"
|
|
13
|
+
],
|
|
14
|
+
"input_schema": {
|
|
15
|
+
"required": [
|
|
16
|
+
"rates"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"rates": "list of number (0.05 = 5%)"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"output_keys": [
|
|
23
|
+
"geo_mean_pct"
|
|
24
|
+
],
|
|
25
|
+
"description_en": "Geometric mean growth rate (%) of a list of period growth rates (decimals).",
|
|
26
|
+
"when_to_use_en": "When combining several periods' growth rates into one average growth rate."
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"rates": [-0.011, -0.111, 0.067, 0.124, 0.05]}, "expected": {"geo_mean_pct": 2.06}}, {"input": {"rates": [-0.118, 0.247, -0.012, 0.138]}, "expected": {"geo_mean_pct": 5.45}}, {"input": {"rates": [0.211, -0.168, 0.075]}, "expected": {"geo_mean_pct": 2.7}}, {"input": {"rates": [-0.186, 0.273]}, "expected": {"geo_mean_pct": 1.79}}, {"input": {"rates": [-0.103]}, "expected": {"geo_mean_pct": -10.3}}, {"input": {"rates": [0.164, -0.051, 0.186, -0.042, -0.039]}, "expected": {"geo_mean_pct": 3.82}}, {"input": {"rates": [-0.005, 0.124, -0.088, 0.035, -0.087]}, "expected": {"geo_mean_pct": -0.73}}, {"input": {"rates": [-0.084, -0.042, 0.229]}, "expected": {"geo_mean_pct": 2.55}}, {"input": {"rates": [0.217, 0.102, 0.151]}, "expected": {"geo_mean_pct": 15.57}}, {"input": {"rates": [-0.058, 0.241, 0.185, 0.293, -0.107, 0.193, -0.092]}, "expected": {"geo_mean_pct": 8.17}}, {"input": {"rates": [0.061, -0.119, -0.041, -0.021, 0.24, 0.238]}, "expected": {"geo_mean_pct": 5.09}}, {"input": {"rates": [0.128, 0.108, -0.026]}, "expected": {"geo_mean_pct": 6.77}}, {"input": {"rates": [-0.068, 0.255, -0.001, 0.069]}, "expected": {"geo_mean_pct": 5.72}}, {"input": {"rates": [-0.17, 0.256, 0.167, 0.264]}, "expected": {"geo_mean_pct": 11.36}}, {"input": {"rates": [0.116, 0.026, 0.044, 0.25, 0.124]}, "expected": {"geo_mean_pct": 10.93}}, {"input": {"rates": [-0.098, 0.151]}, "expected": {"geo_mean_pct": 1.89}}, {"input": {"rates": [-0.084, -0.063, -0.178, 0.287]}, "expected": {"geo_mean_pct": -2.38}}, {"input": {"rates": [0.134, -0.046]}, "expected": {"geo_mean_pct": 4.01}}, {"input": {"rates": [0.012, 0.193, 0.06, 0.142, 0.27]}, "expected": {"geo_mean_pct": 13.17}}, {"input": {"rates": [0.107, 0.123, -0.109, 0.206, -0.143, -0.008, 0.247]}, "expected": {"geo_mean_pct": 5.1}}, {"input": {"rates": [-0.149, 0.157, -0.156]}, "expected": {"geo_mean_pct": -5.98}}, {"input": {"rates": [-0.082, 0.178, 0.027, -0.135, 0.107, 0.1]}, "expected": {"geo_mean_pct": 2.65}}, {"input": {"rates": [0.197, 0.158, 0.189, -0.006]}, "expected": {"geo_mean_pct": 13.13}}, {"input": {"rates": [0.162, -0.126, 0.09, -0.001, 0.275, -0.179]}, "expected": {"geo_mean_pct": 2.47}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "geometric_mean_growth",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "6cab69e643547e7606ace91786dc1c1dc832e8b99565ccabc2fe03c121c1105a",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:07+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from decimal import Decimal
|
|
2
|
+
|
|
3
|
+
def cell_executor(input_data: dict) -> dict:
|
|
4
|
+
if 'hourly_wage' not in input_data or input_data['hourly_wage'] <= 0:
|
|
5
|
+
raise ValueError("hourly_wage must be greater than 0")
|
|
6
|
+
|
|
7
|
+
hourly_wage = Decimal(input_data['hourly_wage'])
|
|
8
|
+
hours = input_data.get('hours', Decimal(209))
|
|
9
|
+
|
|
10
|
+
if not isinstance(hours, Decimal) and not isinstance(hours, int):
|
|
11
|
+
raise ValueError("hours must be an integer or Decimal")
|
|
12
|
+
|
|
13
|
+
if not isinstance(hours, Decimal):
|
|
14
|
+
hours = Decimal(hours)
|
|
15
|
+
|
|
16
|
+
monthly_wage = hourly_wage * hours
|
|
17
|
+
return {"monthly_wage": int(monthly_wage.quantize(Decimal('0.01')))}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "시급을 월 209시간(주휴 포함) 기준 월급(원)으로 환산.",
|
|
3
|
+
"when_to_use": "시급을 월급으로, 최저임금 월 환산액을 볼 때.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"월급 환산",
|
|
6
|
+
"209시간",
|
|
7
|
+
"시급 월급",
|
|
8
|
+
"최저임금 월급",
|
|
9
|
+
"monthly wage",
|
|
10
|
+
"hourly to monthly",
|
|
11
|
+
"minimum wage monthly",
|
|
12
|
+
"salary"
|
|
13
|
+
],
|
|
14
|
+
"input_schema": {
|
|
15
|
+
"required": [
|
|
16
|
+
"hourly_wage"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"hourly_wage": "number > 0 (won)",
|
|
20
|
+
"hours": "optional: paid hours per MONTH (default 209 = 40 h/week incl. paid weekly rest). Leave it out for a standard full-time job; it is not hours per week."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"output_keys": [
|
|
24
|
+
"monthly_wage"
|
|
25
|
+
],
|
|
26
|
+
"description_en": "Monthly wage (won) from an hourly wage at 209 hours a month (Korean standard, paid weekly rest included).",
|
|
27
|
+
"when_to_use_en": "When converting an hourly wage, or the minimum wage, to a monthly wage.",
|
|
28
|
+
"input_sanity": {
|
|
29
|
+
"hours": {
|
|
30
|
+
"min": 100,
|
|
31
|
+
"action": "drop",
|
|
32
|
+
"why": "hours is paid hours per month; a value under 100 is almost always hours per week, so the standard 209 is used"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"hourly_wage": 15027}, "expected": {"monthly_wage": 3140643}}, {"input": {"hourly_wage": 10320}, "expected": {"monthly_wage": 2156880}}, {"input": {"hourly_wage": 11000, "hours": 209}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 11000}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 9860}, "expected": {"monthly_wage": 2060740}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 10320}, "expected": {"monthly_wage": 2156880}}, {"input": {"hourly_wage": 11000, "hours": 209}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 10030, "hours": 209}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 11000, "hours": 209}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 11000}, "expected": {"monthly_wage": 2299000}}, {"input": {"hourly_wage": 10320, "hours": 209}, "expected": {"monthly_wage": 2156880}}, {"input": {"hourly_wage": 9860}, "expected": {"monthly_wage": 2060740}}, {"input": {"hourly_wage": 12500, "hours": 174}, "expected": {"monthly_wage": 2175000}}, {"input": {"hourly_wage": 12500, "hours": 209}, "expected": {"monthly_wage": 2612500}}, {"input": {"hourly_wage": 18166}, "expected": {"monthly_wage": 3796694}}, {"input": {"hourly_wage": 10030}, "expected": {"monthly_wage": 2096270}}, {"input": {"hourly_wage": 12500}, "expected": {"monthly_wage": 2612500}}, {"input": {"hourly_wage": 17329}, "expected": {"monthly_wage": 3621761}}, {"input": {"hourly_wage": 11000, "hours": 226}, "expected": {"monthly_wage": 2486000}}, {"input": {"hourly_wage": 11000, "hours": 174}, "expected": {"monthly_wage": 1914000}}, {"input": {"hourly_wage": 10030, "hours": 226}, "expected": {"monthly_wage": 2266780}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "monthly_wage_from_hourly",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "a9f14c93b48a6f243b9730fdaa1d2efde7d51f82537dd3ea5459aaac97c89ac3",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:08+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
def cell_executor(input_data):
|
|
2
|
+
b = input_data.get("before_pct"); a = input_data.get("after_pct")
|
|
3
|
+
if not isinstance(b, (int, float)) or not isinstance(a, (int, float)):
|
|
4
|
+
raise ValueError("before_pct and after_pct must be numbers")
|
|
5
|
+
return {"pp_diff": round(a - b, 2)}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "두 비율(%)의 차이를 퍼센트포인트(%p)로.",
|
|
3
|
+
"when_to_use": "재방문율·전환율처럼 비율끼리의 차이를 %p 로 볼 때(증가율 % 가 아니라).",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"퍼센트포인트",
|
|
6
|
+
"%p",
|
|
7
|
+
"비율 차이",
|
|
8
|
+
"포인트 차이",
|
|
9
|
+
"percentage point",
|
|
10
|
+
"pp difference",
|
|
11
|
+
"rate difference",
|
|
12
|
+
"points"
|
|
13
|
+
],
|
|
14
|
+
"input_schema": {
|
|
15
|
+
"required": [
|
|
16
|
+
"before_pct",
|
|
17
|
+
"after_pct"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"before_pct": "number (%)",
|
|
21
|
+
"after_pct": "number (%)"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"output_keys": [
|
|
25
|
+
"pp_diff"
|
|
26
|
+
],
|
|
27
|
+
"description_en": "Difference between two rates (%) in percentage points.",
|
|
28
|
+
"when_to_use_en": "When comparing two rates such as conversion or return rates, in points rather than percent growth."
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"before_pct": 7.8, "after_pct": 9.7}, "expected": {"pp_diff": 1.9}}, {"input": {"before_pct": 49.9, "after_pct": 56.6}, "expected": {"pp_diff": 6.7}}, {"input": {"before_pct": 30.0, "after_pct": 21.0}, "expected": {"pp_diff": -9.0}}, {"input": {"before_pct": 88.3, "after_pct": 41.4}, "expected": {"pp_diff": -46.9}}, {"input": {"before_pct": 7.2, "after_pct": 50.1}, "expected": {"pp_diff": 42.9}}, {"input": {"before_pct": 24.9, "after_pct": 79.1}, "expected": {"pp_diff": 54.2}}, {"input": {"before_pct": 57.0, "after_pct": 11.7}, "expected": {"pp_diff": -45.3}}, {"input": {"before_pct": 72.0, "after_pct": 35.6}, "expected": {"pp_diff": -36.4}}, {"input": {"before_pct": 28.6, "after_pct": 16.3}, "expected": {"pp_diff": -12.3}}, {"input": {"before_pct": 72.6, "after_pct": 12.2}, "expected": {"pp_diff": -60.4}}, {"input": {"before_pct": 68.8, "after_pct": 1.1}, "expected": {"pp_diff": -67.7}}, {"input": {"before_pct": 65.1, "after_pct": 86.5}, "expected": {"pp_diff": 21.4}}, {"input": {"before_pct": 15.5, "after_pct": 29.7}, "expected": {"pp_diff": 14.2}}, {"input": {"before_pct": 85.0, "after_pct": 69.3}, "expected": {"pp_diff": -15.7}}, {"input": {"before_pct": 9.0, "after_pct": 10.4}, "expected": {"pp_diff": 1.4}}, {"input": {"before_pct": 60.8, "after_pct": 4.8}, "expected": {"pp_diff": -56.0}}, {"input": {"before_pct": 85.1, "after_pct": 3.5}, "expected": {"pp_diff": -81.6}}, {"input": {"before_pct": 31.1, "after_pct": 7.7}, "expected": {"pp_diff": -23.4}}, {"input": {"before_pct": 67.2, "after_pct": 11.0}, "expected": {"pp_diff": -56.2}}, {"input": {"before_pct": 90.6, "after_pct": 3.9}, "expected": {"pp_diff": -86.7}}, {"input": {"before_pct": 31.9, "after_pct": 65.0}, "expected": {"pp_diff": 33.1}}, {"input": {"before_pct": 51.5, "after_pct": 11.0}, "expected": {"pp_diff": -40.5}}, {"input": {"before_pct": 28.1, "after_pct": 46.3}, "expected": {"pp_diff": 18.2}}, {"input": {"before_pct": 10.4, "after_pct": 81.6}, "expected": {"pp_diff": 71.2}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "percentage_point_diff",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "5322a96a6f9fa33244762fc957dac9d87e51ba1a426b7ed6968e580949ceb158",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:10+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from collections import Counter
|
|
2
|
+
from decimal import Decimal
|
|
3
|
+
from fractions import Fraction
|
|
4
|
+
from functools import reduce
|
|
5
|
+
from itertools import filterfalse
|
|
6
|
+
import json
|
|
7
|
+
import math
|
|
8
|
+
import re
|
|
9
|
+
import statistics
|
|
10
|
+
|
|
11
|
+
def cell_executor(input_data: dict) -> dict:
|
|
12
|
+
if not isinstance(input_data.get("values"), list) or not all(isinstance(x, (int, float)) for x in input_data["values"]):
|
|
13
|
+
raise ValueError("Invalid 'values' input: must be a list of numbers.")
|
|
14
|
+
if not isinstance(input_data.get("value"), (int, float)):
|
|
15
|
+
raise ValueError("Invalid 'value' input: must be a number.")
|
|
16
|
+
if not input_data["values"]:
|
|
17
|
+
raise ValueError("Input list 'values' cannot be empty.")
|
|
18
|
+
|
|
19
|
+
values = input_data["values"]
|
|
20
|
+
value = input_data["value"]
|
|
21
|
+
|
|
22
|
+
# Filter values smaller than 'value'
|
|
23
|
+
smaller_count = sum(1 for v in values if v < value)
|
|
24
|
+
|
|
25
|
+
# Calculate percentile rank
|
|
26
|
+
percentile_rank = round((smaller_count / len(values)) * 100, 2)
|
|
27
|
+
|
|
28
|
+
return {"percentile_rank": percentile_rank}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "값이 목록에서 몇 퍼센트 위치인지(값보다 작은 것의 비율, %).",
|
|
3
|
+
"when_to_use": "어떤 값의 백분위 순위, 상위·하위 몇 %인지 볼 때.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"백분위",
|
|
6
|
+
"퍼센타일",
|
|
7
|
+
"percentile",
|
|
8
|
+
"순위 비율",
|
|
9
|
+
"몇 퍼센트 위치",
|
|
10
|
+
"percentile rank",
|
|
11
|
+
"rank percent",
|
|
12
|
+
"top percent",
|
|
13
|
+
"position in list"
|
|
14
|
+
],
|
|
15
|
+
"input_schema": {
|
|
16
|
+
"required": [
|
|
17
|
+
"values",
|
|
18
|
+
"value"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"values": "list of number",
|
|
22
|
+
"value": "number"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"output_keys": [
|
|
26
|
+
"percentile_rank"
|
|
27
|
+
],
|
|
28
|
+
"description_en": "Percentile rank of a value in a list (share of values below it, %).",
|
|
29
|
+
"when_to_use_en": "When finding what percentile a value is at, or top/bottom what percent."
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"values": [33, 29, 24, 24, 25, 18, 23, 37, 8, 26], "value": 37}, "expected": {"percentile_rank": 90.0}}, {"input": {"values": [28, 21, 31, 34, 10], "value": 21}, "expected": {"percentile_rank": 20.0}}, {"input": {"values": [7, 30, 34, 19, 9, 40, 36, 11, 29, 24], "value": 40}, "expected": {"percentile_rank": 90.0}}, {"input": {"values": [5, 30, 33, 32, 9, 30, 25, 12], "value": 5}, "expected": {"percentile_rank": 0.0}}, {"input": {"values": [9, 31, 9, 29, 10, 14, 19, 23], "value": 11}, "expected": {"percentile_rank": 37.5}}, {"input": {"values": [9, 37, 11, 40], "value": 40}, "expected": {"percentile_rank": 75.0}}, {"input": {"values": [19, 34, 32, 40, 12, 14, 29, 7, 22, 19], "value": 29}, "expected": {"percentile_rank": 60.0}}, {"input": {"values": [36, 16, 34, 36, 11, 37], "value": 36}, "expected": {"percentile_rank": 50.0}}, {"input": {"values": [30, 14, 36, 8, 34, 26, 21, 3], "value": 26}, "expected": {"percentile_rank": 50.0}}, {"input": {"values": [9, 14, 39, 24, 33, 8, 18], "value": 24}, "expected": {"percentile_rank": 57.14}}, {"input": {"values": [40, 26, 10, 2, 39, 10, 9, 8], "value": 40}, "expected": {"percentile_rank": 87.5}}, {"input": {"values": [31, 8, 31], "value": 22}, "expected": {"percentile_rank": 33.33}}, {"input": {"values": [27, 6, 19, 17, 36, 10, 22, 3, 6, 1], "value": 22}, "expected": {"percentile_rank": 70.0}}, {"input": {"values": [24, 3, 4], "value": 3}, "expected": {"percentile_rank": 0.0}}, {"input": {"values": [1, 7, 1], "value": 1}, "expected": {"percentile_rank": 0.0}}, {"input": {"values": [36, 26, 26, 33], "value": 36}, "expected": {"percentile_rank": 75.0}}, {"input": {"values": [25, 16, 1, 2, 3, 21], "value": 36}, "expected": {"percentile_rank": 100.0}}, {"input": {"values": [14, 13, 29, 28, 25, 12, 1], "value": 28}, "expected": {"percentile_rank": 71.43}}, {"input": {"values": [21, 38, 24], "value": 38}, "expected": {"percentile_rank": 66.67}}, {"input": {"values": [36, 15, 4, 24, 14], "value": 15}, "expected": {"percentile_rank": 40.0}}, {"input": {"values": [19, 28, 37, 30, 17, 31, 26, 34], "value": 37}, "expected": {"percentile_rank": 87.5}}, {"input": {"values": [11, 4, 6, 17, 30, 27, 21, 39, 36, 19, 35, 35], "value": 19}, "expected": {"percentile_rank": 33.33}}, {"input": {"values": [29, 18, 3, 24, 28, 39, 20], "value": 39}, "expected": {"percentile_rank": 85.71}}, {"input": {"values": [14, 13, 22], "value": 22}, "expected": {"percentile_rank": 66.67}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "percentile_rank",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "3c31d5bb01c692cde384798d6cffef7d8136ea6cfe1d11dd9f9d1d0343109368",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:08+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
def cell_executor(input_data):
|
|
2
|
+
c = input_data.get("cost"); m = input_data.get("margin_pct")
|
|
3
|
+
if not isinstance(c, (int, float)) or c <= 0:
|
|
4
|
+
raise ValueError("cost must be > 0")
|
|
5
|
+
if not isinstance(m, (int, float)) or m < 0 or m >= 100:
|
|
6
|
+
raise ValueError("margin_pct must be in [0, 100)")
|
|
7
|
+
return {"price": round(c / (1 - m / 100))}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "원가와 목표 마진율(판매가 기준 %)로 맞춰야 할 판매가.",
|
|
3
|
+
"when_to_use": "마진율을 정해 놓고 판매가를 거꾸로 정할 때.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"판매가 정하기",
|
|
6
|
+
"목표 마진",
|
|
7
|
+
"가격 책정",
|
|
8
|
+
"역산",
|
|
9
|
+
"selling price",
|
|
10
|
+
"target margin",
|
|
11
|
+
"pricing",
|
|
12
|
+
"markup from margin"
|
|
13
|
+
],
|
|
14
|
+
"input_schema": {
|
|
15
|
+
"required": [
|
|
16
|
+
"cost",
|
|
17
|
+
"margin_pct"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"cost": "number > 0",
|
|
21
|
+
"margin_pct": "0 <= number < 100"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"output_keys": [
|
|
25
|
+
"price"
|
|
26
|
+
],
|
|
27
|
+
"description_en": "Selling price that gives a target margin (% of selling price) on a cost.",
|
|
28
|
+
"when_to_use_en": "When setting a selling price backwards from a target margin."
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"input": {"cost": 2477, "margin_pct": 20}, "expected": {"price": 3096}}, {"input": {"cost": 49040, "margin_pct": 40}, "expected": {"price": 81733}}, {"input": {"cost": 12567, "margin_pct": 60}, "expected": {"price": 31418}}, {"input": {"cost": 11722, "margin_pct": 30}, "expected": {"price": 16746}}, {"input": {"cost": 30770, "margin_pct": 10}, "expected": {"price": 34189}}, {"input": {"cost": 14054, "margin_pct": 10}, "expected": {"price": 15616}}, {"input": {"cost": 39591, "margin_pct": 70}, "expected": {"price": 131970}}, {"input": {"cost": 5831, "margin_pct": 50}, "expected": {"price": 11662}}, {"input": {"cost": 13611, "margin_pct": 10}, "expected": {"price": 15123}}, {"input": {"cost": 7631, "margin_pct": 70}, "expected": {"price": 25437}}, {"input": {"cost": 7611, "margin_pct": 70}, "expected": {"price": 25370}}, {"input": {"cost": 18443, "margin_pct": 70}, "expected": {"price": 61477}}, {"input": {"cost": 2848, "margin_pct": 20}, "expected": {"price": 3560}}, {"input": {"cost": 10228, "margin_pct": 65}, "expected": {"price": 29223}}, {"input": {"cost": 40272, "margin_pct": 74}, "expected": {"price": 154892}}, {"input": {"cost": 536, "margin_pct": 40}, "expected": {"price": 893}}, {"input": {"cost": 20027, "margin_pct": 25}, "expected": {"price": 26703}}, {"input": {"cost": 34528, "margin_pct": 10}, "expected": {"price": 38364}}, {"input": {"cost": 39212, "margin_pct": 20}, "expected": {"price": 49015}}, {"input": {"cost": 39655, "margin_pct": 30}, "expected": {"price": 56650}}, {"input": {"cost": 5852, "margin_pct": 10}, "expected": {"price": 6502}}, {"input": {"cost": 9584, "margin_pct": 83}, "expected": {"price": 56376}}, {"input": {"cost": 25004, "margin_pct": 25}, "expected": {"price": 33339}}, {"input": {"cost": 21789, "margin_pct": 70}, "expected": {"price": 72630}}]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cell": "price_for_target_margin",
|
|
3
|
+
"version": "1.0",
|
|
4
|
+
"sha256": "02d858af1b792c37ceb7b932764a327f6719dd9aa26b230461b40330a2d909d8",
|
|
5
|
+
"gt_total": 24,
|
|
6
|
+
"gt_passed": 24,
|
|
7
|
+
"deterministic": true,
|
|
8
|
+
"locked_at": "2026-11-18T06:59:09+00:00",
|
|
9
|
+
"locked_by": "exp11-demand (boss 2026-11-18)"
|
|
10
|
+
}
|
stemseal/cli.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""stemseal command line.
|
|
3
|
+
stemseal list cells on this machine
|
|
4
|
+
stemseal find <need words...> cells that fit a need
|
|
5
|
+
stemseal call <cell> '<json>' run a cell (or @file.json)
|
|
6
|
+
stemseal verify re-check every lock (sha256) and ground-truth case
|
|
7
|
+
stemseal request <need words...> record a cell you needed; prints a link you can open to ask for it
|
|
8
|
+
stemseal demand your recorded unmet needs (kept only on this machine)
|
|
9
|
+
stemseal guide <model> [ko|en] the selection guide used for a model name"""
|
|
10
|
+
import json, sys
|
|
11
|
+
from . import hub, guides
|
|
12
|
+
|
|
13
|
+
def _p(o): print(json.dumps(o, ensure_ascii=False, indent=1))
|
|
14
|
+
|
|
15
|
+
def main(argv=None):
|
|
16
|
+
a = list(sys.argv[1:] if argv is None else argv) or ["list"]
|
|
17
|
+
cmd, rest = a[0], a[1:]
|
|
18
|
+
if cmd == "list": _p([{k: c[k] for k in ("cell", "version", "description", "required_inputs")} for c in hub.list_cells()])
|
|
19
|
+
elif cmd == "find": _p(hub.find(" ".join(rest), caller="cli"))
|
|
20
|
+
elif cmd == "call":
|
|
21
|
+
if len(rest) != 2: print(__doc__); return 2
|
|
22
|
+
raw = rest[1]; data = json.load(open(raw[1:], encoding="utf-8")) if raw.startswith("@") else json.loads(raw)
|
|
23
|
+
r = hub.call(rest[0], data, caller="cli"); _p(r); return 0 if r["status"] == "ok" else 1
|
|
24
|
+
elif cmd == "verify":
|
|
25
|
+
r = hub.verify_all(); _p(r)
|
|
26
|
+
bad = [k for k, v in r.items() if not (v["hash_ok"] and v["deterministic"] and v["gt"].split("/")[0] == v["gt"].split("/")[1])]
|
|
27
|
+
print("all %d cells verified" % len(r) if not bad else "FAILED: %s" % bad); return 1 if bad else 0
|
|
28
|
+
elif cmd == "request": _p(hub.request_cell(" ".join(rest), caller="cli"))
|
|
29
|
+
elif cmd == "demand": _p(hub.stats()["unmet_demand"])
|
|
30
|
+
elif cmd == "guide": _p(guides.brief(guides.guide_for(rest[0] if rest else ""), (rest[1] if len(rest) > 1 else "ko")))
|
|
31
|
+
else: print(__doc__); return 2
|
|
32
|
+
return 0
|
|
33
|
+
|
|
34
|
+
if __name__ == "__main__": sys.exit(main())
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "_default",
|
|
3
|
+
"version": "2026-11-17",
|
|
4
|
+
"match": [],
|
|
5
|
+
"source": "general guidance for small local models (unmeasured on this hub)",
|
|
6
|
+
"weaknesses": [
|
|
7
|
+
"도구를 필요 없는데도 부름(인사에도 호출)",
|
|
8
|
+
"비슷한 도구를 잘못 고름",
|
|
9
|
+
"인자 누락·형식 오류",
|
|
10
|
+
"실패한 호출을 같은 모양으로 반복"
|
|
11
|
+
],
|
|
12
|
+
"selection": {
|
|
13
|
+
"max_candidates": 5,
|
|
14
|
+
"min_score": 0.15,
|
|
15
|
+
"show_output_keys": true,
|
|
16
|
+
"show_input_example": true,
|
|
17
|
+
"decide_by": "output_check",
|
|
18
|
+
"output_format": "json",
|
|
19
|
+
"disable_thinking": false,
|
|
20
|
+
"repair_input": [
|
|
21
|
+
"unwrap",
|
|
22
|
+
"rename_single"
|
|
23
|
+
],
|
|
24
|
+
"retry_on_invalid_input": 1
|
|
25
|
+
},
|
|
26
|
+
"prompt_rules": [
|
|
27
|
+
"후보 세포의 출력 키가 요청이 묻는 값과 같으면 그 세포를 쓰는 편이 낫습니다. 검증된 답이 바로 나오고, 혼자 계산할 때보다 훨씬 정확합니다.",
|
|
28
|
+
"출력이 요청과 다른 값을 계산하는 세포라면 고르지 않는 편이 낫습니다. 그때는 none 으로 답하면 허브가 그 계산을 새 세포로 만들도록 접수하고, 다음에 다시 찾으면 준비되어 있습니다.",
|
|
29
|
+
"글쓰기, 번역, 요약, 추측은 세포보다 당신이 직접 하는 편이 잘 맞습니다.",
|
|
30
|
+
"입력은 입력 예시와 같은 모양으로 data.json 값을 옮기면 세포가 가장 잘 받아들입니다.",
|
|
31
|
+
"JSON 한 개로 답하면 허브가 바로 읽고 처리합니다."
|
|
32
|
+
],
|
|
33
|
+
"sources": [
|
|
34
|
+
"https://www.docker.com/blog/local-llm-tool-calling-a-practical-evaluation/",
|
|
35
|
+
"https://insiderllm.com/guides/function-calling-local-llms/"
|
|
36
|
+
],
|
|
37
|
+
"style_note": "설득형 문구(water-channel 원칙): 금지·강요 대신 이점과 다음 길을 알려 준다. 2026-11-17",
|
|
38
|
+
"prompt_rules_en": [
|
|
39
|
+
"When a candidate cell's output key is the value the request asks for, using that cell works better. You get a verified answer right away, far more accurate than computing it yourself.",
|
|
40
|
+
"If a cell computes a different value from what the request asks, it is better not to pick it. Answer none; the need is recorded so a new cell can be made, and it may be ready next time.",
|
|
41
|
+
"Writing, translation, summaries and guesses suit you better than a cell. Do those yourself.",
|
|
42
|
+
"Copy the values from the data into the same shape as the input example; the cell accepts that best.",
|
|
43
|
+
"Answer with a single JSON object so the hub can read it directly."
|
|
44
|
+
]
|
|
45
|
+
}
|