This file contains 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
#! /usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
import sys | |
import os | |
import Tkinter as Tk | |
import commands as com | |
import ScrolledText as St | |
import tkFileDialog as dlg | |
import tkMessageBox as msb |
This file contains 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
#include <stdio.h> | |
#include <iconv.h> | |
#include <locale.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <wchar.h> | |
/* fgetsの指定バイト数 */ | |
#define READ_SIZE 4096 | |
/* 置き換え文字のサイズ */ |
This file contains 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
#1日〜7日までの日曜日(%w=0)の16時に実行:第1日曜日にバックアップシェルを実行 | |
0 16 1-7 * * test $(date +\%w) -eq 0 && /hoge/hoge/tool/monthly_bkup.sh |
This file contains 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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Jan 5 17:04:13 2018 | |
@author: brokendish | |
""" | |
import bottlenose as api | |
import bs4 | |
import sys |
This file contains 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 | |
TMP=~/open-talk.wav | |
touch $TMP | |
cd /usr/share/hts-voice/nitech-jp-atr503-m001 | |
#cd /usr/share/hts-voice/mei_happy | |
echo "$1" | open_jtalk \ | |
-td tree-dur.inf \ | |
-tf tree-lf0.inf \ | |
-tm tree-mgc.inf \ | |
-md dur.pdf \ |
This file contains 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
#include <iostream> | |
#include <string> | |
#include <boost/regex.hpp> | |
#include <locale> | |
using namespace std; | |
int alphaNumericCheck(string a); | |
int numberOfDigit(string str, int max); |
This file contains 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
#!/usr/bin/groovy | |
//------------------------------------------------------ | |
// Groovy XmlSlurper sample | |
// | |
//------------------------------------------------------ | |
def xml = """ | |
<aaa> | |
<langs type='current' count='3' mainstream='true'> | |
<language flavor='static' version='1.5'>Java3</language> | |
<language flavor='dynamic' version='1.6.0'>Groovy3</language> |
This file contains 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
#!/usr/bin/python | |
# _*_ coding: utf-8 _*_ | |
import sqlite3 as sq | |
import sys | |
#テーブルを削除 ※SQLiteはTruncateはサポートしていないようなのでDROPしてVACCUMする | |
#データベースに接続 | |
con = sq.connect("sqlite_test.db") | |
try: |
This file contains 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
Vi | |
------------------------------------------- | |
画面分割 | |
------------------------------------------- | |
:sp 画面を上下に分割 | |
:sp ファイル名 指定したファイルを分割した画面に表示 | |
Ctrl-w p 画面間の移動 | |
Ctrl-w k 上の画面に移動 | |
Ctrl-w j 下の画面に移動 | |
Ctrl-w l 右の画面に移動 |
This file contains 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
----------------------------------------------------- | |
pdbのデバッガコマンド | |
----------------------------------------------------- | |
起動 | |
python -m pdb cmd_test.py | |
l | |
list。実行中のプログラムの周囲11行を表示。第一引数で数字を指定した場合は、その行の周囲11行を表示。例えば「l 12 」。指定した範囲のプログラムリストを表示したい場合は「l 10, 40」とする。PC(プログラムカウンター)がどこにあるかも確認できるしブレイクポイントを貼るときの行数の確認にもなるのでまずはコレ。 | |
b |
NewerOlder