Skip to content

Instantly share code, notes, and snippets.

View msikma's full-sized avatar
๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ

Michiel Sikma msikma

๐Ÿš€
ใ‚ชใƒผใƒ—ใƒณใ‚ฝใƒผใ‚นใฎ็†ฑ็‹‚็š„ใชใƒ•ใ‚กใƒณ
View GitHub Profile
@msikma
msikma / opl.py
Last active September 22, 2022 23:55
#!/usr/bin/env python2
'''
Short script to make OPL music (in DOSBox DRO files) less loud.
'''
from struct import *
from collections import namedtuple
import sys
import argparse
def namedunpack(data, names, format):
// calculates win percentage of makuuchi matches on sumodb.
// use on e.g. http://sumodb.sumogames.de/Rikishi.aspx?r=1123 where it should yield "84.9" as of now.
// losses by default are excluded, but wins by default are included; as is standard in sumo records.
$("tr").map((n, tr) => {
const k = $("td.cat", tr);
const v = $("td.val", tr);
if (k.text().toLowerCase().indexOf("in makuuchi") !== 2) {
return;
}
const r1 = v.text().split(" ");
# Setting DJGPP environment variables
set -x DJGPP_PREFIX /usr/local/djgpp
set -x DJGPP_CC /usr/local/djgpp/bin/i586-pc-msdosdjgpp-gcc
# retrieves table data
# kakuzuke_id = 1,2,3,4,5,6 (makuuchi, juryo, makushita, sandanme, jonidan, jonokuchi)
# basho_id = 585 (nov 2017)
# page = 1,2,3 (jonidan, sandanme and makushita have multiple pages)
# note: the /1/1/ at the end is 'kakuzuke_id' and 'page' - apparently you need to change both numbers
curl 'http://sumo.or.jp/EnHonbashoBanzuke/index_ajax/1/1/' --data 'kakuzuke_id=1&basho_id=585&page=1'
# for Japanese, change the base URL:
# http://www.sumo.or.jp/ResultBanzuke/table_ajax/1/1/
curl 'http://www.sumo.or.jp/ResultBanzuke/table_ajax/1/1/' --data 'kakuzuke_id=1&basho_id=585&page=1'
import { EventEmitter } from 'events';
class StreamTester extends EventEmitter {
constructor() {
super();
this._done = false;
this._emitter1 = null;
this._emitter2 = null;
1. Partition disk, GPT/bios, 1M "boot partition", 500MB ext4 for /boot, 7.5GB ext4 for everything else. sda1/sda2/sda3
2. format /dev/sda2 and /dev/sda3 as ext4
3. mount drives, sda3 as root and sda2 as /boot.
4. pacstrap base
5. generate fstab
6. install grub package, install to /dev/sda
7. plus some other minor steps listed in the guide, e.g. setting locale/ntp/hostname...
on rebooting, grub loads correctly. However, it can't boot the system.

JR East stations

Sorted first by most popular kanji. The lists underneath these kanji are the most popular stations that use these kanji.

I don't have a list of all stations with kana, so only the top most popular stations have kana behind the kanji.

็”ฐ 77

  • ้ซ˜็”ฐ้ฆฌๅ ด, ใŸใ‹ใ ใฎใฐใฐ
  • ็”ฐ็”บ, ใŸใพใก

568 kanji in total. Sorted by number of occurrences. Source: http://www.jreast.co.jp/passenger/index.html (index page, plus pages 1 through 9; 957 stations)

Kanji Occurrences
็”ฐ 77
ๅท 62
้‡Ž 55
ๆ–ฐ 46
ๅคง 41
\version "2.19.42"
% \semprePp
%
% Prints "sempre" followed by a \pp.
semprePp =
\tweak DynamicText.self-alignment-X #LEFT
\tweak DynamicText.X-extent #'(0 . 0)
\tweak DynamicText.X-offset #0
#(make-dynamic-script
textCresc =
#(define-music-function (parser location mymarkup) (markup?)
(make-music 'CrescendoEvent
'span-direction START
'span-type 'text
'span-text mymarkup))
% called like this
s8-\textCresc "poi a poi sempre piรน allegro" s4. s2