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
# coding: utf-8 | |
import sys | |
import time | |
import threading | |
import Queue | |
import contextlib | |
ANIMATION = '|/-\\' |
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
#coding: utf-8 | |
import os | |
import subprocess | |
files = os.listdir(".") | |
for f in files: | |
root, ext = os.path.splitext(f) | |
if ext == ".eps": |
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
% reference: http://qiita.com/mountcedar/items/e7603c2eb65661369c3b | |
% $ pandoc readme.md -o readme.tex | |
% or $ kramdown -o latex readme.md > readme.tex | |
% $ platex manuscript.tex | |
% $ dvipdfmx manuscript.dvi | |
%\documentclass[11pt,a4paper,twocolumn]{jarticle} | |
\documentclass[11pt,a4paper]{jarticle} | |
\usepackage{amssymb,amsmath} |
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
#coding: utf-8 | |
import sys | |
import itertools | |
write = sys.stdout.write | |
nums = [i for i in range(1, 9+1)] | |
for hidden in itertools.combinations(nums, 2): |
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
package jsonictest; | |
public class AB { | |
private int a; | |
private String b; | |
public AB() { // 必要 | |
} | |
public AB(int a, String b) { // 任意 |
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
package gsonshow; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import com.google.gson.Gson; | |
public class GsonShow { |
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
#coding: utf-8 | |
import os | |
import random | |
def write_u(u): | |
os.sys.stdout.write(u.encode("utf-8")) | |
no_beam = u"\u2502" | |
beam_right = u"\u251C" |
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 | |
# configuration | |
source ./remote_copy_exec.config | |
# check sshass command installed | |
if ! type "sshpass" > /dev/null 2>&1; then | |
echo "command not found: sshpass" | |
exit 1 | |
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
function mless() { | |
pandoc -s -f markdown -t man $1 | man -l - | |
} | |
# reference: http://stackoverflow.com/questions/7599447/less-style-markdown-viewer-for-unix-systems |
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
# Download Queequeg from http://queequeg.sourceforge.net/index-e.html | |
# Unzip it in some directory | |
$ sudo apt-get install wordnet | |
$ cd (top directory of Queequeg) | |
$ make dict WORDNETDICT=/usr/share/wordnet/ | |
# Use queequeg as follows | |
# $ qq -Wall -t manuscript.tex | |
# or |
OlderNewer