Skip to content

Instantly share code, notes, and snippets.

View natsukium's full-sized avatar
🐒
I'm here

OTABI Tomoya natsukium

🐒
I'm here
View GitHub Profile
@natsukium
natsukium / benchmark.rs
Created June 10, 2018 10:01
Benchmark with tarai function for Rust
#![feature(test)]
extern crate test;
pub fn tarai(x: i32, y: i32, z: i32) -> i32 {
if x <= y {
y
} else {
tarai(tarai(x-1, y, z), tarai(y-1, z, x), tarai(z-1, x, y))
}
@natsukium
natsukium / nproc
Created July 3, 2018 03:48
nproc for macOS
#!/bin/sh
sysctl -n hw.ncpu
@natsukium
natsukium / cloudSettings
Last active May 28, 2019 14:02
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-05-28T14:02:17.899Z","extensionVersion":"v3.2.9"}
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 2 columns, instead of 3. in line 6.
q ゅ
w と
e し
r こ
t ょ
a は
s s
d d
f て
g た
Update-ExecutionPolicy -Policy RemoteSigned
Disable-UAC
Disable-BingSearch
Disable-GameBarTips
# Dark Mode
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name ColorPrevalence -Value 0 -Type Dword -Force
@natsukium
natsukium / Makefile
Created November 17, 2020 14:43
py2html with jupytext and nbconvert
NOTEDIR := src/notebooks
NOTESRC := $(wildcard $(NOTEDIR)/*.py)
HTML := $(addprefix outputs/, $(notdir $(NOTESRC:%.py=%.html)))
JUPYTEXT := poetry run jupytext --to notebook
NBCONVERT := poetry run jupyter nbconvert --to html
.PRECIOUS: %.ipynb
.PHONY: html
@natsukium
natsukium / bfs.fsx
Created July 20, 2021 12:23
BFS without queue
type 'a Tree =
| Leaf
| Node of 'a * 'a Tree * 'a Tree
let bfs (tree: 'a Tree) =
[ tree ]
|> Seq.unfold
(function
| [] -> None
| h :: t ->
@natsukium
natsukium / python310Packages.python-opensky
Created October 31, 2023 15:06
system: aarch64-darwin | build_time: 17 seconds | https://github.com/NixOS/nixpkgs/pull/263122
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@natsukium
natsukium / python311Packages.python-opensky
Created October 31, 2023 15:06
system: aarch64-darwin | build_time: 16 seconds | https://github.com/NixOS/nixpkgs/pull/263122
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook