I hereby claim:
- I am namachan10777 on github.
- I am namachan10777 (https://keybase.io/namachan10777) on keybase.
- I have a public key ASCA77WGnqzq6CarHz3qAwVWNAWMxlrcFA_xkQyANNBpPgo
To claim this, I am signing this object:
let-block ctx +pn inner = | |
let len = get-font-size ctx *' font-ratio-cjk in | |
let ib-inner = read-inline ctx inner ++ inline-fil in | |
form-paragraph ctx ib-inner |
let cleardoublepage ctx label = | |
let hook = line-break false false ctx | |
(hook-page-break (fun pbinfo _ -> ( | |
let should-inser-new-page = | |
(!ref-inserted-page-number + pbinfo#page-number) mod 2 == 0 | |
in | |
let () = ref-not-aligned <- !ref-not-aligned || should-inser-new-page in | |
if !ref-not-aligned | |
then ( | |
if should-inser-new-page |
I hereby claim:
To claim this, I am signing this object:
let rec sort = | |
let rec divide = function | |
| x :: y :: tl -> | |
let (l, r) = divide tl in | |
(x :: l, y :: r) | |
| x -> (x, []) | |
in | |
let rec merge = function | |
| (l, []) -> l | |
| ([], r) -> r |
import numpy as np | |
import math as m | |
import sys | |
def rotate(theta, x, y): | |
rad = m.radians(theta) | |
rmat = np.array([ | |
[m.cos(rad), -m.sin(rad)], | |
[m.sin(rad), m.cos(rad)] | |
]) |
import std.stdio; | |
import std.math; | |
import std.algorithm.comparison; | |
struct List(alias N, T) { | |
private T[] arr; | |
auto opIndex(I : Interger!(B, T), alias B, alias T)(in I idx) { | |
static if (B >= 0 && T < N) { | |
return arr[idx.value]; |
//リストの長さNを型に埋め込む | |
struct SList(T, alias N) { | |
T[] arr; | |
} | |
//空リスト | |
auto nil(T)() { | |
SList!(T, 0) sl; | |
return sl; | |
} |
type readable_int_t = int | |
member from_string = int_of_string | |
type readable_float_t = float | |
member from_string = float_of_string | |
let str_to str = | |
from_string str |
import std.stdio; | |
import std.file; | |
import std.array; | |
import std.conv; | |
import std.algorithm.iteration; | |
enum Size = 3; | |
size_t idx (I)(I x, I y) { | |
return y * Size + x; |