Skip to content

Instantly share code, notes, and snippets.

View seikichi's full-sized avatar
💭
社畜

Seiichi KONDO seikichi

💭
社畜
View GitHub Profile
@seikichi
seikichi / isbnfilename.sh
Created March 1, 2011 19:29
自炊したpdfから最初と最後の3ページの画像を確認してバーコードを探しファイル名を"<ISBN13>.pdf" に変換.
#!/bin/bash
rm -f .image*
CHECK=3
for file in *.pdf; do
pages=$(pdfinfo "$file" | grep -E '^Pages' | sed -e 's/^Pages:\s*//') &&
pdfimages -j -l $CHECK "$file" .image_h &&
pdfimages -j -f $(expr $pages - $CHECK) "$file" .image_t &&
title="$(zbarimg -q .image* | uniq | grep -E '^EAN-13:978' | sed -e 's/^EAN-13://').pdf" &&
@seikichi
seikichi / mydefs.py
Created October 19, 2010 20:21
Rで学ぶクラスタ解析のコードをpythonで書いただけ
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Rで学ぶクラスタ解析のパクり
import scipy as sp
def table(result, answer):
result, answer = sp.asarray(result), sp.asarray(answer)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# PRML chapter 9
# Gaussian Mixture Model
import scipy as sp
from scipy.linalg import det, inv
access_token:
key: ひみつ
secret: ひみつ
credential:
user: !!python/unicode 'seikichi'
options:
ambiguous_width: 2
browser_command: screen w3m %s
full_status_area_height: 6
max_log: 200