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 python3 | |
import json | |
import argparse | |
import datetime | |
def json_to_markdown(json_data): | |
markdown = "" | |
for document in json_data: | |
markdown += f"# {document['title']}\n\n" |
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 python3 | |
# | |
# CALCULATE THE LENGTH OR SHORTEST LINE BETWEEN TWO LINES IN 3D | |
# | |
# See "The shortest line between two lines in 3D" of | |
# http://paulbourke.net/geometry/pointlineplane/ written by Paul Bourke | |
from optparse import OptionParser | |
import sys | |
import numpy as np |
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 | |
import sys | |
import json | |
from optparse import OptionParser | |
# loadJson :: String -> Dict | |
def loadJson(filePath): | |
with open(filePath, 'r') as f: | |
jsonDict = json.load(f) | |
return jsonDict |
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
# users generic .zshrc file for zsh(1) | |
# LANG | |
# | |
export LANG=ja_JP.UTF-8 | |
case ${UID} in | |
0) | |
LANG=C | |
;; | |
esac |
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
# コマンドキーを Ctrl+T にする | |
escape ^Tt | |
# 起動時のライセンス画面を表示しない | |
startup_message off | |
# スクロールバックできる行数を2000行にする | |
defscrollback 2000 | |
# ステータス行に表示するメッセージを10秒間表示する |
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
"------------------------------------------------ | |
"表示関係 | |
"------------------------------------------------ | |
syntax on | |
"カラースキーマ | |
colorscheme desert | |
highlight fortranTab ctermfg=0 | |
highlight fortranOperator ctermfg=5 | |
highlight Number ctermfg=white | |
highlight LineNr ctermfg=white |
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/bash | |
DIR="JOB_OUTPUT" | |
main(){ | |
ifdne_mkdir | |
for file in `ls`; do | |
err_count=`echo $file | grep -c "sh\.e"` | |
out_count=`echo $file | grep -c "sh\.o"` | |
if [[ $err_count > 0 || $out_count > 0 ]]; then | |
mv $file $DIR | |
fi |
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/bash | |
N_TSTEP=1000000 # 1 day | |
JOB_PATH="${PWD%/*}" | |
main(){ | |
os_check | |
check_options $@ | |
file_name_def $@ | |
dir_check |
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/bash | |
file="$1" | |
name="${1%.pdb}" | |
Bfile="${name}-bb.pdb" | |
Mfile="m_$Bfile" | |
Mname="${Mfile%.pdb}" | |
bbq="java apps.BBQ" | |
scwrl="Scwrl4" |
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/bash | |
#$Id: rewrite.sh,v 1.10 2014-01-08 14:09:47+09 shirai Exp $ | |
rewrite(){ | |
all=() | |
check_options $@ | |
file="${all[$((${#all[@]}-1))]}" | |
file_check $file | |
tmp="TEMP_${file##*/}" | |
${all[@]} > $tmp |
NewerOlder