This is typescript environment setup guide for LLM and humans
Always setup baseline settings
- pnpm
- typescript
- vitest
| // node --test ask-claude.test.ts | |
| import { test } from "node:test"; | |
| import { query } from "@anthropic-ai/claude-code"; | |
| test("Ask", async () => { | |
| const EXPECTED = "paris"; | |
| const abortController = new AbortController(); | |
| for await (const message of query({ | |
| prompt: "What is the capital of France?", | |
| options: { maxTurns: 1, abortController }, |
| #include <fcntl.h> | |
| #include <sys/mman.h> | |
| #include <sys/stat.h> | |
| #include <sys/types.h> | |
| #include <sys/wait.h> | |
| #include <unistd.h> | |
| #include <array> | |
| #include <cassert> | |
| #include <csignal> | |
| #include <cstdint> |
| サイト名 | URL | 継続可否 |
|---|---|---|
| AtCoder Scores | https://atcoder-scores.herokuapp.com/ | |
| AtCoder Tags | https://atcoder-tags.herokuapp.com/ | |
| AtCoder List | https://atcoder-list.herokuapp.com/ | |
| AtCoder RatingGraph Generator | https://atcoder-ratinggraph-generator.herokuapp.com/ | |
| Rating History | https://rating-history.herokuapp.com/ | |
| AtCoder Rating Comparison | https://atcoder-rating-comparison.herokuapp.com/ | |
| AtCoder Performances | https://atcoderapps.herokuapp.com/atcoderperformances/ | |
| AtCoder Rating Simulator | https://atcoderratingsimulator.herokuapp.com/ | ⭕ Tweet |
| import subprocess | |
| import pipes | |
| import multiprocessing | |
| CASE = 150 | |
| TL = 2.0 | |
| def execute_case(seed): | |
| input_file_path = f'tools/in/{seed:04}.txt' | |
| output_file_path = f'tools/out/{seed:04}.txt' | |
| with open(input_file_path) as fin: |
| // 末尾に使用例 | |
| // 好きに改造して使ってください | |
| #include <fstream> | |
| #include <iostream> | |
| #include <sstream> | |
| #include <string> | |
| #include <vector> | |
| using namespace std; |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| int TYPE = 1; // 1:continue忘れ, 2:最大ヒープ, 3:最大ヒープ2, 4:負辺 | |
| int MAX_N = 2e5; // 頂点数の最大値 | |
| int MAX_M = 2e5; // 辺数の最大値 | |
| int MIN_C = 1; // 辺のコストの最小値 | |
| int MAX_C = 1e9; // 辺のコストの最大値 | |
| bool DIRECTED = false; // 有向かどうか | |
| bool V1_TO_Vn = false; // s=1, t=n とするかどうか |
この記事はpyspa advent calendar 2020の18日目の記事です。前日は、flagboyの配られたカードで勝負するでした。主旨は異なりますが、徒然草百十段の「双六の名人」が思い出されました。明日はYutaka Matsubara a.k.a. mopemopeさんの記事となります。お楽しみに。
行数を書くと「いやいや、私はもっと高い生産性を持っている」、という方は少なくないだろう。登大遊氏に至っては、ネットワークプログラミングという複雑な領域での実装でありながら「1日に少なくとも3,000行程度、多く書くときで10,000行」と述べており、凡才さを思い知らされる。
さて、この記事は、私のような動物でも高効率にコードを書くために何をしたのかを備忘として残しておく主旨である。