Skip to content

Instantly share code, notes, and snippets.

View TakashiNakagawa's full-sized avatar

TakashiNakagawa TakashiNakagawa

View GitHub Profile
# like ide {{{
[[plugins]]
repository = 'Shougo/vimfiler'
explorer = 1
mappings = '<Plug>'
[[plugins]]
repository = 'thinca/vim-quickrun'
mappings = '<Plug>'
# unite {{{
[[plugins]]
repository = 'Shougo/unite.vim'
[[plugins]]
repository = 'Shougo/unite-outline'
[[plugins]]
repository = 'Shougo/neomru.vim'
" set showtabline=2
" ツールバーを削除
set guioptions-=T
"半角文字の設定
set visualbell t_vb=
" ------------------------------------------------------
" colorscheme
" release autogroup in MyAutoCmd
augroup MyAutoCmd
autocmd!
augroup END
"------------------------
"検索関係
"------------------------
set ignorecase " 大文字小文字を区別しない
set smartcase
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Offlickr
# Hugo Haas <hugo@larve.net> -- http://larve.net/people/hugo/
# Homepage: http://code.google.com/p/offlickr/
# License: GPLv2
#
# Daniel Drucker <dmd@3e.org> contributed:
# * wget patch
# * backup of videos as well
@TakashiNakagawa
TakashiNakagawa / ofSystemUtils.cpp
Created August 16, 2014 02:50
ダイアログから日本語を文字化けせずに読み込む方法
#include <cstdlib>
//ワイド文字列からマルチバイト文字列
//ロケール依存
void narrow(const std::wstring &src, std::string &dest) {
setlocale(LC_CTYPE, "");
char *mbs = new char[src.length() * MB_CUR_MAX + 1];
wcstombs(mbs, src.c_str(), src.length() * MB_CUR_MAX + 1);
dest = mbs;
@TakashiNakagawa
TakashiNakagawa / read_data.py
Created July 8, 2014 02:21
データを読み込んでグラフ表示
#coding:UTF-8
import numpy as np
import matplotlib.pyplot as pl
data = np.loadtxt("result_all.txt")
separate1 = 100000
pl.plot(data[:separate1, 1], data[:separate1, 2], 'g', linewidth=10)
@TakashiNakagawa
TakashiNakagawa / 5.1.2.merton3d.py
Created May 6, 2014 02:29
computer vision5章
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pylab import *
execfile('load_vggdata.py')
# 3Dの点を描画する
from mpl_toolkits.mplot3d import axes3d
fig = figure()
@TakashiNakagawa
TakashiNakagawa / 5.1.1.merton2d.py
Created May 6, 2014 02:19
computer vision5章
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PIL import Image
from pylab import *
execfile('load_vggdata.py')
# 3D点を同次座標にして射影する
X = vstack( (points3D,ones(points3D.shape[1])) )
@TakashiNakagawa
TakashiNakagawa / load_vggdata.py
Created May 6, 2014 02:18
computer vision5章
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PIL import Image
from pylab import *
import camera
# 画像を読み込む
im1 = array(Image.open('images/001.jpg'))
im2 = array(Image.open('images/002.jpg'))