Skip to content

Instantly share code, notes, and snippets.

dzd100

Ruby script to periodically download newly added images from DZ-D100.

@pinus
pinus / README.md
Last active September 23, 2021 02:49

YTPlayer

YouTube player.

#
# 北海道厚生局コード内容別医療機関一覧表を csv 保存したものを vCard 型式に変換する.
# https://kouseikyoku.mhlw.go.jp/hokkaido/gyomu/gyomu/hoken_kikan/code_ichiran.html
#
require 'csv'
def convert(file)
CSV.foreach(file) do |row|
# 連番が付いた行を処理する
if row[0].to_s.match('^[0-9]+$')
@pinus
pinus / enable_trim.sh
Created March 7, 2020 08:23
enable ssd trim on Mac OS X 10.7.5
# replace Rotational_APPLE SSD_MacBookAir5,1_MacBookAir5,2_APPLE SSD TS_Q
# to Rotational____________________________________________________Q
sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{50}(\x00Q)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
sudo kextcache -system-prelinked-kernel
sudo kextcache -system-caches
sudo reboot
@pinus
pinus / covid19.py
Last active February 20, 2020 02:17 — forked from skoba/covid19.py
COVID-19 simuation by SEIR model
# The preprints is available from https://www.preprints.org/manuscript/202002.0179/v1
# S Susceptible
# E Exposed
# I Infected
# R Recovery
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
from ipywidgets import interact