This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# require: python 3.x, pillow, matplotlib, psutil | |
import sys, os, io | |
import time | |
from datetime import datetime | |
import pickle | |
import tkinter | |
import tkinter.ttk as ttk | |
from tkinter import E, W, N, S | |
import multiprocessing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import os | |
import sys | |
import re | |
import subprocess | |
import shutil | |
import tempfile | |
import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! py -3 | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import io | |
import sys | |
import subprocess | |
import pipes | |
import os | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2019, Hiroaki Itoh <https://bitbucket.org/hhsprings/> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# - Redistributions of source code must retain the above copyright |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# 入力の Adj.csv (形容詞) とか Noun.adjv.csv (名詞,形容動詞語幹) に | |
# 長促音を追加するやーつ。「あったかい」→「あったかーい」とか。 | |
# Python 2.7 では動かない。対応するつもりもない。 | |
# | |
# TODO: 取捨選択の規則が埋め込みだけれど、コントロール可能にすべきね。 | |
# TODO: そもそもターゲットの絞込みフィルタも同じくね。(狙ったものだけ | |
# 欲しい、とかだろ、普通。) | |
import io |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8-unix -*- | |
# | |
# mecab-ipadic-neologd の辞書修正・追加の考え方に共感できないところがある | |
# ため取捨選択しての利用としたい。 | |
# | |
import io | |
import os | |
import re | |
import csv | |
import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import io | |
import os | |
import sys | |
import csv | |
if hasattr("", "decode"): # python 2 | |
class _reader(object): | |
def __init__(self, f, dialect=None, *args, **kwds): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# * fix only print_function, absolute_import | |
# * keep the target as code working in Python 2.7 | |
# | |
_2to3="${_2to3:-/c/Python35/Tools/scripts/2to3.py}" | |
# | |
test -d "$1" && exit 1 # must be file | |
test -f "$1" || exit 1 # must be file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from __future__ import division | |
from __future__ import print_function | |
import re | |
import io | |
import os | |
import sys | |
import subprocess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import math | |
from PIL import Image, ImageDraw, ImageFont | |
# | |
# see details: https://en.wikipedia.org/wiki/MIDI_tuning_standard | |
# | |
_KTAB = [ | |
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" |