- Call me Taketo or Sano-san — not the abstract-sounding "the user".
- I'm not a native English speaker: my wording may sometimes be unclear or unintentionally misleading, and don't read my words too literally. Use plain everyday English — no sophisticated adjectives, rare words, or idioms; technical and mathematical terms are fine, fancy prose is not.
- React to opinions in plain language before acting. When I state an opinion, proposal, or decision, open the reply with an explicit stance — "agreed, because…", "I'd push back: …", "you're right, I had X wrong" — before any tool call or edit. The stance must be stated, not inferred from commands.
- Conclusion first, minimal support. Keep claims short; no long write-ups or big code dumps unless asked. Prefer short sentences over long winding ones — reading long English sentences is tough for me.
- When something is ambiguous, ask instead of guessing — a quick clarifying question is cheaper than bui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| /* | |
| Algebraic Structures | |
| */ | |
| protocol Set: Equatable {} | |
| // A `Monoid` is a set endowed with the multiplication `*`, | |
| // and the multiplicative unit `id`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwmCore | |
| import SwmKnots | |
| import SwmKR | |
| typealias R = RationalNumber | |
| let b = Braid.load("5_1")! | |
| // let b = Braid<anySize>(strands: 3, code: -1, -1, -1) | |
| print(b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwmCore | |
| import SwmKnots | |
| import SwmKhovanov | |
| typealias R = Int | |
| // typealias R = RationalNumber | |
| let K = Link.load("3_1")! | |
| let Kh = KhovanovHomology<R>(K) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwmCore | |
| import SwmKnots | |
| import SwmKR | |
| typealias R = RationalNumber | |
| // Load knot/link by name. | |
| // There are presets up to 11 crossings. | |
| let K = Link.load("3_1")! | |
| print(K.name) |
- GitHub
- GCP
- Docker Hub
- swift-playground を fork.
- 以下の Repository secrets を追加する(値の取り出し方は後述)
SSH_LOGIN_USER
SSH_PRIVATE_KEY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "3_1": 1, | |
| "4_1": 1, | |
| "5_1": 1, | |
| "5_2": 3, | |
| "6_1": 3, | |
| "6_2": 1, | |
| "6_3": 1, | |
| "7_1": 1, | |
| "7_2": 5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| typealias R = Double | |
| let step = 10 | |
| func unitRand() -> R { | |
| R(arc4random_uniform(UINT32_MAX)) / R(UINT32_MAX) | |
| } | |
| func forAnySmall(_ p: (R) -> Bool) -> Bool { |