PDF などの中にある一部の日本語の漢字が、見た目は同じだけど異なる謎の文字に変換されていることがある
- 例 1: https://www.mhlw.go.jp/content/10906000/000628667.pdf
- 「長野」と「長崎」の「長」が、
U+9577ではなく「⾧ (U+2FA7)」になっている
- 「長野」と「長崎」の「長」が、
- 例 2: https://www.dpri.kyoto-u.ac.jp/news/12739/
PDF などの中にある一部の日本語の漢字が、見た目は同じだけど異なる謎の文字に変換されていることがある
U+9577 ではなく「⾧ (U+2FA7)」になっている| import numpy as np | |
| from sklearn.linear_model import SGDClassifier | |
| from sklearn.cross_validation import StratifiedKFold | |
| from sklearn.grid_search import GridSearchCV | |
| class PUClassifier(object): | |
| def __init__(self, trad_clf=None, n_folds=2): | |
| self.trad_clf = trad_clf | |
| self.n_folds = n_folds |
| mecab --node-format="%m/%h/%f[7] " --unk-format="%M" --eos-format="\n" --eon-format=' ' | sed -e 's/ $//' |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| def main(args): | |
| import subprocess | |
| pattern = '*.tex;*.bib;*.sty;' | |
| command = 'make' | |
| subprocess.call( | |
| ('watchmedo', 'shell-command', '-w', '-p', | |
| pattern, '-c', command, args.work_directory)) |
| #!/bin/sh | |
| # Original1: https://gist.github.com/875864 saiten / rec_radiko.sh | |
| # Original2: http://backslash.ddo.jp/wordpress/archives/1020 http://backslash.ddo.jp/tools/rec_radiko2.txt | |
| # Install: wget swftools rtmpdump ffmpeg http://d.hatena.ne.jp/zariganitosh/20130120/radiko_recoding_again | |
| PATH=$PATH:/usr/local/bin | |
| VERSION=3.0.0.01 | |
| # 使い方 |
| # encoding: utf-8 | |
| from __future__ import print_function | |
| from json import dumps as to_json | |
| from datetime import datetime, timedelta | |
| import requests | |
| URL_BASE="https://i.doit.im/tasks/%s" | |
| DOIT_BOXES = ('inbox', 'today', 'next', 'tomorrow', 'scheduled', 'someday', 'waiting') | |
| COOKIES = { 'autologin': 'Your Autologin Cookie Here' } |