Skip to content

Instantly share code, notes, and snippets.

View README.md

dzd100

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

View README.md

YTPlayer

YouTube player.

View convert-code-ika.rb
#
# 北海道厚生局コード内容別医療機関一覧表を 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 Mar 7, 2020
enable ssd trim on Mac OS X 10.7.5
View enable_trim.sh
# 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 Feb 20, 2020 — forked from skoba/covid19.py
COVID-19 simuation by SEIR model
View covid19.py
# 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