Skip to content

Instantly share code, notes, and snippets.

@isann
isann / build.xml
Created March 5, 2012 08:13
(template)app-engine-java-build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="compile" default="compile" basedir=".">
<property name="src" location="./src" />
<property name="test" location="./test" />
<property name="gaesdk_home" location="C:/opt/appengine-java-sdk-1.6.0" />
<property name="classes" location="./war/WEB-INF/classes" />
<path id="classpath">
<fileset dir="./lib/" includes="*.jar"/>
<fileset dir="./war/WEB-INF/lib/" includes="*.jar"/>
<fileset dir="${gaesdk_home}/lib/" includes="*.jar" />
@isann
isann / create_table.py
Created March 5, 2012 10:45
(sphinx用)create_table.py
#! c:/Python27/python.exe
# -*- coding: utf-8 -*-
"""
未完成
2012.03.05 セル内改行に対応しましたが、sphinxがあまり長いテーブルに対応していないっぽいorz
2012.03.05 各列の長さによって長さを可変するようにした
2012.03.07 ダブルクォーテーション周りでエラーになっていたのを修正。
2012.06.19 wxPythonやめてcsvモジュールを使用するよう処理を修正。
"""
from StringIO import StringIO
@isann
isann / sphinxdoc.css_t
Created March 5, 2012 15:55
sphinxdoc.css_t
/*
* sphinxdoc.css_t
* ~~~~~~~~~~~~~~~
*
* Sphinx stylesheet -- sphinxdoc theme. Originally created by
* Armin Ronacher for Werkzeug.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
@isann
isann / conf.py
Created March 5, 2012 16:01
(sphinx用)conf.py
# -*- coding: utf-8 -*-
#
# zonote documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 06 00:37:16 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
@isann
isann / generate_csv_date.py
Created June 15, 2012 07:11
CSV形式でデータを出力する
# -*- coding: utf-8 -*-
import random
import time
import sys
__author__ = 'isann'
TYPE_NUMBER = '0'
TYPE_ALPNUM = '1'
TYPE_DATE = '2'
@isann
isann / read_csv.py
Created June 18, 2012 11:59
csvからデータを読み込む(ダブルクォーテーションの改行フィールドもよろしくしてくれる)
# -*- coding: utf-8 -*-
import csv
__author__ = 'isann'
def main():
filename = 'data.csv'
file = open(filename)
dialect = csv.excel
for row in csv.reader(file, dialect):
@isann
isann / read_excel.py
Created June 19, 2012 05:51
pythonでexcelのデータを読み込む
# -*- coding: utf-8 -*-
import random
from openpyxl import load_workbook
__author__ = 'isann'
def out(max, min):
if max is 0:
print(min)
else:
@isann
isann / disp_filepath.sh
Created June 20, 2012 09:00
指定した名前に一致するパスを取得するBASH
RET=`ls /home/user/a_*dat` # a_ではじまりdatで終わるファイルの一覧
if [[ $? -ne 0 ]] # a_ではじまりdatで終わるファイルが1つもないと0以外の終了値になる
then
exit 9
else
for TXT in $RET # a_ではじまりdatで終わるファイルが1つ以上あったとき
do
echo ${TXT} # ファイルパスを出力する
done
fi
@isann
isann / zono.xml
Created June 29, 2012 07:48
IntelliJ IDEA color theme
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="custom" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="CONSOLE_FONT_SIZE" value="11" />
<option name="EDITOR_FONT_NAME" value="Monospaced" />
<colors>
<option name="ADDED_LINES_COLOR" value="395439" />
<option name="ANNOTATIONS_COLOR" value="8178af" />
<option name="CARET_COLOR" value="ff00" />
@isann
isann / login.ttl
Created July 3, 2012 06:00
teratermログイン自動化マクロ
;; -------------------------------------
;; TeraTerm ログインスクリプト
;; SSHで接続する。
;; ログを取る。
;; Version 4.64で動作確認
;; -------------------------------------
;; ログインユーザー名(アカウント)
strUsername = 'hoge'
strPassword = 'hoge'