Skip to content

Instantly share code, notes, and snippets.

View kiyotune's full-sized avatar

Kiyo Tsunezumi kiyotune

View GitHub Profile
@kiyotune
kiyotune / Makefile.tex2pdf
Created June 7, 2021 02:57
Converter from TeX to PDF
SRC := $(wildcard *.tex)
PDF := $(SRC:.tex=.pdf)
DVI := $(SRC:.tex=.dvi)
LOG := $(SRC:.tex=.log)
AUX := $(SRC:.tex=.aux)
all: ${PDF}
%.dvi: %.tex
platex $<
// This file was initially generated by Windows Terminal 1.4.3141.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",

RAID Volume Setting Manual

2020/08/05 K.Tsunezumi

How to activate Software RAID

Preparing the devices for the RAID

Initialize the devices you want to RAID and set the RAID flag to ON. The sample code is for the device /dev/sdb.

mrc2tif version 4.10.32
Copyright (C) 1994-2017 by the Regents of the University of Colorado
mrc2tif [options] <mrc file> <tiff name/root>
Without -s, a series of tiff files will be created with the
prefix [tiff root name] and with the suffix nnn.tif, where nnn is the z number.
Options:
-s Stack all images in the mrc file into a single tiff file
-c val Compress data; val can be lzw, zip, jpeg, or numbers defined
in libtiff
FIND := find -L ./ -name "*.mrc"
MRCS := $(shell $(FIND))
TIFS := $(MRCS:.mrc=.tif)
MRC2TIF := /usr/local/IMOD/bin/mrc2tif -s -c lzw
LIST_MRC:= ./list_mrc.txt
LIST_TIF:= ./list_tif.txt
LISTS := $(LIST_MRC) $(LIST_TIF)
DEL_SRC := 0
define filelist
@kiyotune
kiyotune / py_tetris.py
Last active August 1, 2019 09:00
『テトリス風ゲームづくりで学ぶ初めてのPYTHONプログラミング』写経
#!/bin/python3
#coding: UTF-8
import tkinter as tk
from tkinter import messagebox
import threading, copy, random
def exit_app(self, event=None):
print("\n[exit_app]")
if(messagebox.askokcancel("py_tetris", "exit ?")):
@kiyotune
kiyotune / py_tabtool.py
Last active July 30, 2019 08:25
Python tabtool
#!/bin/python3
#coding: UTF-8
import tkinter as tk
import tkinter.ttk as ttk
from tkinter import messagebox
from tkinter import filedialog
import pandas as pd
class Application(tk.Frame):
@kiyotune
kiyotune / 五線譜(A4横ピアノ8段)
Last active February 5, 2019 04:39
Blank score for piano (LilyPond)
% LilyPond — www.lilypond.org
\version "2.18.2"
#(set-global-staff-size 25)
#(set-default-paper-size "a4landscape")
\paper {
top-margin = 15
}
\score {
#!/usr/bin/perl
use strict;
use warnings;
use Cache::Memcached::Fast;
use LWP::UserAgent;
use HTML::TreeBuilder;
use FindBin;
use File::Path 'mkpath';
@kiyotune
kiyotune / answer.m
Last active December 11, 2015 15:08
https://codeiq.jp/ace/kurahashi_issei/q166 の回答。 ただしOctaveによる。 だってR言語知らないもん。
#!/usr/local/bin/octave -q
1;
% disp_stat:
function disp_stat(n, height=[])
if length(height) == 0 && n > 0
height = 170 + 10 * randn(1, n);
end