Skip to content

Instantly share code, notes, and snippets.

@concatStr(str1, str2){
`{str1}{str2}`
}
$content <- ""
$step <- 1
$steps <- 30
// 角度計算
@deg(stepn) {
@qwjyh
qwjyh / triangle_mfm
Last active May 15, 2022 07:04
三角形を描くMFMを出力するAiScript
@concatStr(str1, str2){
`{str1}{str2}`
}
$content <- ""
$step <- 1
$steps <- 30
// 角度計算
@deg(stepn) {
# 引数は1つのzipファイルに入れるファイル数
Param($package)
mkdir ..\zip
$items = Get-ChildItem
$i = 0
$j = 0
while ($i -le $items.count) {
Compress-Archive $items[$i..($i + $package)] ..\zip\zip_${j}.zip
$i = $i + $package
### Keybase proof
I hereby claim:
* I am qwjyh on github.
* I am qwjyh (https://keybase.io/qwjyh) on keybase.
* I have a public key ASCqPmgp_Iu0D4DgsptxxKtzGIVMpubUtIYtsTow7lq0gwo
To claim this, I am signing this object:
@qwjyh
qwjyh / prime_number
Created July 31, 2021 06:55
aiscriptで素数を見つける
### {
name: "aiscript_prime"
version: 1.0
keywords: ["prime"]
}
for (#i, 100) {
$f <- no
$j <- 1
for (i) {
linters: with_defaults(
line_length_linter(240),
commented_code_linter = NULL
)
#include <bits/stdc++.h>
using namespace std;
// ackの計算(履歴保存)
int ack_calc(vector<vector<int>> &ack_process) {
int step = ack_process.size() - 1; // 現在のステップ数を求める
int depth = ack_process.at(step).size() - 1; // 再帰の深さ
if (depth == 0) {
return ack_process.at(step).at(0);
} else if (ack_process.at(step).at(depth - 1) == 0) { // m=0 のとき