Skip to content

Instantly share code, notes, and snippets.

Avatar

Shuntaro Yada shuntaroy

View GitHub Profile
@shuntaroy
shuntaroy / gamma_index.py
Created Mar 29, 2022
Naive implementations of some classical, information theoretic keyword extraction methods
View gamma_index.py
"""Gamma Index.
Zhou and Slater 2002"""
from typing import List
import numpy as np
import sigma_index as s
View zundoko.rb
# slightly modified from:
# @Kta-M リズムに乗ってズンドコキヨシ♪ with Ruby
# https://qiita.com/Kta-M/items/c5ea66ddd0e4123a298c
def zundoko
l = 1
loop do
n = rand(32)
s = ("%05b" % n).gsub(/0/, 'ズン').gsub(/1/, 'ドコ')
r = [0, 1.0, 0, 0.5, 0, 0.5, 0, 0.5, 0.25, 0.25]
@shuntaroy
shuntaroy / cleveref_ja.sty
Last active Jul 19, 2022
cleveref 和文論文向け設定
View cleveref_ja.sty
\usepackage[noabbrev]{cleveref}
\crefformat{chapter}{第#2#1#3章}
\crefformat{section}{#2#1#3節}
\crefformat{subsection}{#2#1#3節}
\crefname{figure}{図}{図}
\crefname{table}{表}{表}
\crefname{equation}{式}{式}
\crefname{appendix}{付録}{付録}
\newcommand{\crefrangeconjunction}{--}
\newcommand{\crefpairconjunction}{, }