This file contains 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
;;;; This is reimplementation of `plotting.py` from "Coding the Matrix" | |
;;;; and contains a simple plotting interface, which uses a browser with SVG to | |
;;;; present a plot of points represented as either complex numbers or 2-vectors. | |
;;;; | |
;;;; First you need evaluate following expressions then load this file. | |
;;;; ``` | |
;;;; (require "asdf") | |
;;;; (asdf:load-system "uiop") | |
;;;; ``` | |
(in-package :cl-user) |
This file contains 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
#!/bin/bash | |
set -eux | |
player_hand=$( | |
zenity --list \ | |
--title "あなたの手は?" \ | |
--column="手" \ | |
"グー" \ | |
"チョキ" \ | |
"パー" |
This file contains 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
# morimorihoge screenrc | |
escape \233\233 | |
zombie | |
hardstatus on | |
defbce on | |
# Protection from attacks | |
multiuser off |
This file contains 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
TARGETS := $(subst .cpp,,$(wildcard *.cpp)) | |
CXXFLAGS ?= -Wall -Wextra -O2 -g | |
all: $(TARGETS) | |
clean: | |
rm -f $(TARGETS) | |
.PHONY: clean |
This file contains 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
# name: 'Tokyo Night Night' | |
# preferred_background: 1a1b26 | |
# url: 'https://github.com/chriskempson/tomorrow-theme' | |
fish_color_normal c0caf5 | |
fish_color_command 7dcfff | |
fish_color_keyword bb9af7 | |
fish_color_quote e0af68 | |
fish_color_redirection c0caf5 | |
fish_color_end ff9e64 |
This file contains 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
struct XOR64 { | |
x: u64, | |
} | |
impl XOR64 { | |
fn new(seed: u64) -> Self { | |
Self { | |
x: seed ^ 88172645463325252, | |
} | |
} |
This file contains 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
#lang racket | |
(struct plan | |
(type | |
data-amount | |
price) | |
#:transparent) | |
(define plans-voice | |
(vector |
This file contains 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
from collections import namedtuple | |
from itertools import product | |
from functools import reduce | |
from pprint import PrettyPrinter | |
Plan = namedtuple('Plan', ['type', 'data_amount', 'price']) | |
plans_voice = [ | |
Plan(type='voice', data_amount=2, price=850), | |
Plan(type='voice', data_amount=4, price=990), |

This file contains 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
0it [00:00, ?it/s]MIOpen(HIP): Error [Do] 'amd_comgr_do_action(kind, handle, in.GetHandle(), out.GetHandle())' AMD_COMGR_ACTION_COMPILE_SOURCE_TO_BC: ERROR (1) | |
MIOpen(HIP): Error [BuildHip] comgr status = ERROR (1) | |
MIOpen(HIP): Warning [BuildHip] In file included from /tmp/comgr-5f7d18/input/naive_conv.cpp:1: | |
In file included from /tmp/hip_pch.1266/hip_pch.h:1: | |
In file included from /build/hip-runtime-amd/src/HIP-rocm-5.2.3/include/hip/hip_runtime.h:54: | |
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../include/c++/12.1.1/thread:44: | |
In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../include/c++/12.1.1/bits/this_thread_sleep.h:36: | |
/usr/lib64/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../include/c++/12.1.1/bits/chrono.h:650:36: error: no matching conversion for functional-style cast from 'const duration<long, std::ratio<1, 1>>' to '__cd' (aka 'duration<long, ratio<num, den>>') | |
return __cd(__cd(__lhs).count() - __cd(__rhs).count()); | |