Skip to content

Instantly share code, notes, and snippets.

View odanado's full-sized avatar

odanado odanado

View GitHub Profile
import jax
import jax.numpy as jnp
@jax.jit
def get_under_sample_index_one(y: jnp.ndarray):
"""
y は 0, 1 のみを取る
先頭から 0, 1 を選んでいくため y は事前にシャッフルされている必要がある
"""
@odanado
odanado / 継承.ts
Last active January 22, 2021 12:52
abstract class BaseCommand<T> {
abstract parse(argv: string): T;
abstract run(config: T): void;
}
// parse と run の実装とインタフェースを矯正させる
class CommandA extends BaseCommand<{}> {
parse(argv: string) {
return {}
}
<h1>poyo</h1>
@odanado
odanado / 49.212.217.137.txt
Created August 21, 2020 17:02
アクセス件数
$ wc -l access.log*
71 access.log
40827 access.log.2017-01-28
96341 access.log.2017-02-07
48355 access.log.2017-02-14
37780 access.log.2017-02-21
42383 access.log.2017-02-28
35684 access.log.2017-03-07
34110 access.log.2017-03-14
32159 access.log.2017-03-21
curl https://blog.odan.dev/ --head -H "via: 1.1 0af4f461b5a89684a06050bc1aca8c04.cloudfront.net (CloudFront), 1.1 0af4f461b5a89684a06050bc1aca8c04.cloudfront.net (CloudFront)"
@odanado
odanado / cal_offset.cpp
Created August 3, 2020 16:19
cal_offset.cpp
#include<cstdio>
typedef unsigned long long UInt64;
typedef unsigned int UInt32;
UInt64 seed1 = 0xC6942472D331BF96;
UInt64 LCGseed;
int offset;
@odanado
odanado / perl.ipynb
Last active March 13, 2020 02:00
perl.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from z3 import BitVec, Solver
from subprocess import Popen, PIPE
seed = "B65DD562AAEA877BA21332BC2A782A76"
status = [seed[i * 8:(i + 1) * 8] for i in range(4)][::-1]
p = Popen(['./tiny_mt'] + status, stdout=PIPE)
TINYMT32_MASK = 0x7fffffff
TINYMT32_SH0 = 1
function taskA(i: number) {
return new Promise<number>((resolve, reject) => {
if (i % 2 == 0) reject(`error on taskA ${i}`)
resolve(i)
})
}
function taskB(i: number) {
return new Promise<number>((resolve, reject) => {
if (i % 3 == 0) reject(`error on taskB ${i}`)
resolve(i)
フシギダネ Bulbasaur 固有名詞
フシギソウ Ivysaur 固有名詞
フシギバナ Venusaur 固有名詞
ヒトカゲ Charmander 固有名詞
リザード Charmeleon 固有名詞
リザードン Charizard 固有名詞
ゼニガメ Squirtle 固有名詞
カメール Wartortle 固有名詞
カメックス Blastoise 固有名詞
キャタピー Caterpie 固有名詞