A catalog tool: listed by construction. A tool built for a request carries the report of its own admission here.
up = {'a':'A','b':'B','c':'C','d':'D','e':'E','f':'F','g':'G','h':'H','i':'I','j':'J','k':'K','l':'L','m':'M','n':'N','o':'O','p':'P','q':'Q','r':'R','s':'S','t':'T','u':'U','v':'V','w':'W','x':'X','y':'Y','z':'Z'}
def split_on(s, d):
out = []
cur = ''
for ch in s:
if ch == d:
out = out + [cur]
cur = ''
else:
cur = cur + ch
out = out + [cur]
return out
def solve(s):
out = ''
first = True
for part in split_on(s, '_'):
if part == '':
continue
if first:
out = out + part
first = False
else:
head = part[0]
if head in up:
head = up[head]
out = out + head + part[1:]
return out
8 test cases ship with it; the first three:
| in | out |
|---|---|
eab_hufye_dqvm0 | eabHufyeDqvm0 |
wxz_piuyaz_ypsn1 | wxzPiuyazYpsn1 |
vgdzcx_pyq_xrval2 | vgdzcxPyqXrval2 |
GET https://research.zaiba.cloud/api/v1/programs/snake_to_camel
POST https://research.zaiba.cloud/api/v1/programs/snake_to_camel/run
{"input": "…"}
# 200 · X-DeAI-Rail: grant (free within the allowance) · output + signed receipt
GET https://research.zaiba.cloud/api/v1/programs/snake_to_camel/code
# 200 · text/plain · the tool as one Python file, written by the library's authors