Skip to content

Instantly share code, notes, and snippets.

@hrsano645
hrsano645 / nihongo_greeting
Created December 8, 2017 02:43
python3の日本語でクラスを作った話
class 日本語挨拶:
def __init__(self, 名前):
self.名前 = 名前
def 朝(self):
print("{}さん おはようございます".format(self.名前))
def 昼(self):
print("{}さん こんにちは!".format(self.名前))
def 晩(self):
print("{}さん こんばんは".format(self.名前))
def はまちちゃん(self):
@hrsano645
hrsano645 / subprocess_silent_call_acrobat.py
Created July 2, 2015 12:29
Printing PDF File at windows and python. Use subprocess module and Adobe Acrobat Commandline Option Silent Mode
# coding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
import subprocess
import sys
# ref: https://geonet.esri.com/thread/59446
# ref: https://helpx.adobe.com/jp/acrobat/kb/510705.html
@hrsano645
hrsano645 / hb_convert_batch.py
Created June 11, 2015 08:34
Convert MPEG TS file to Mp4 file using Handbrake CLI , Preset Android Tablet
# coding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
import os
import sys
import itertools
import subprocess
def main():
@hrsano645
hrsano645 / TOC:作る、できる/基礎入門電子工作の素
Created December 12, 2013 15:20
"作る、できる/基礎入門電子工作の素"を自炊スキャンしたものにjPdfBookmarksを利用して栞をつけた時のテキストデータ * JPdfBookmarksのテキストファイル形式 * 設定は以下のとおり * エンコードはUTF-8(適時変更, テキストデータのエンコード変更のこと) * Values Separators * Page separator: / * Atributes Separator: , * Indentation String: [space][space][space][space]
表紙/1,Black,notBold,notItalic,closed,FitPage
第1章 電子工作の常識/13,Black,notBold,notItalic,closed,FitPage
1-1 「電子工作」ってなに?/14,Black,notBold,notItalic,closed,FitPage
1-2 回路図の見方・書き方/16,Black,notBold,notItalic,closed,FitPage
1-2-1 回路図の基本的な要素/16,Black,notBold,notItalic,closed,FitPage
1-2-2 部品の略号と記号/16,Black,notBold,notItalic,closed,FitPage
1-2-3 電子回路の基本単位/19,Black,notBold,notItalic,closed,FitPage
1-2-4 回路図の接続と交叉/19,Black,notBold,notItalic,closed,FitPage
1-2-5 電源とグランド/21,Black,notBold,notItalic,closed,FitPage
1-2-6 その他の常識/22,Black,notBold,notItalic,closed,FitPage
@hrsano645
hrsano645 / TOC:Oxford Picture Dictionary: English-Japanese
Last active December 31, 2015 03:28
"Oxford Picture Dictionary: English-Japanese" を自炊スキャンしたものにjPdfBookmarksを利用して栞をつけた時のテキストデータ * JPdfBookmarksのテキストファイル形式 * 設定は以下のとおり * エンコードはUTF-8(適時変更, テキストデータのエンコード変更のこと) * Values Separators * Page separator: / * Atributes Separator: , * Indentation String: [space][space][space][space]
Introductionl はじめに/4
1. Everyday Language 日常会話/13,Black,notBold,notItalic,open,FitPage
Meeting and Greeting 人とあって挨拶する/13,Black,notBold,notItalic,closed,FitPage
Personal lnformation 自己紹介/15,Black,notBold,notItalic,closed,FitPage
School 学校/16,Black,notBold,notItalic,closed,FitPage
A Classroom 教室/17,Black,notBold,notItalic,closed,FitPage
Studying 学習/19,Black,notBold,notItalic,closed,FitPage
Succeeding in School 学校で良い成績を収める/21,Black,notBold,notItalic,closed,FitPage
A Day at School 学校での1日/22,Black,notBold,notItalic,closed,FitPage
Everyday Conversation 日常会話/23,Black,notBold,notItalic,closed,FitPage
@hrsano645
hrsano645 / now-date-format
Created September 7, 2008 03:00
undefined
CmdUtils.CreateCommand({
name: "now-date-format",
homepage: "http://d.hatena.ne.jp/piropati/20080906/1220690703",
author: { name: "hiroshi sano", email: "pirohatiko@gmal.com"},
license: "MPL",
description: "Present time is inserted!",
help: "Present time is inserted!",
_zerofunc: function(dt) {
@hrsano645
hrsano645 / subprocess_call_gsprint.py
Last active August 29, 2015 14:24
Printing PDF File at windows and python. Use GSPrint comanndline tool
# coding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
import subprocess
import sys
# ref: http://stackoverflow.com/questions/4498099/silent-printing-of-a-pdf-in-python
# ref: http://stackoverflow.com/questions/1462842/print-pdf-document-with-pythons-win32print-module
@hrsano645
hrsano645 / subprocess_call_acrobat.py
Created July 2, 2015 12:25
Printing PDF File at windows and python. Use subprocess module and Adobe Acrobat Commandline Option
# coding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
import subprocess
import sys
# ref: https://geonet.esri.com/thread/59446
# ref: https://helpx.adobe.com/jp/acrobat/kb/510705.html
@hrsano645
hrsano645 / remove_wp_plugin_tag.py
Last active August 29, 2015 14:17
remove_wp_plugin_tag.py
# coding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
__author__ = 'hiroshi sano<hrs.sano645@gmail.com>'
# Wordpressのプラグインで使っていたタグを、mdに適した形に置き換える
import glob
import re
import os
# coding: utf-8
from __future__ import division, print_function, absolute_import, unicode_literals
__author__ = 'hiroshi sano<hrs.sano645@gmail.com>'
import bs4
import codecs
import glob
import re
import os