Skip to content

Instantly share code, notes, and snippets.

View serihiro's full-sized avatar

Kazuhiro Serizawa serihiro

View GitHub Profile
@serihiro
serihiro / Csv2.c
Last active January 29, 2020 05:23
extended csv output plugin of wgrib2 http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
/******************************************************************************************
Copyright (C) 2008 Niklas Sondell, Storm Weather Center
This file is part of wgrib2 and could be distributed under terms of the GNU General Public License
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grb2.h"
@serihiro
serihiro / note.md
Last active June 26, 2018 01:16
GlusterFS3.12をCentOS7で使う場合のメモ

1. GlusterFS3.12のインストール

yum -y update
yum -y install centos-release-gluster312
yum -y install glusterfs gluster-cli glusterfs-libs glusterfs-server
yum clean all

2. glusterdのサービス起動

@serihiro
serihiro / about_matroid.md
Created May 19, 2018 02:28
マトロイドについてのお勉強メモ

マトロイドは独立集合っていうけど

  • M(E,τ)がマトロイドだとして、X,Y∈τ かつ |X|<|Y| ならある e∈Y∖X が存在して X+e∈τ の説明でよく「独立集合」って使われるけどそれはなんやねん
  • ベクトルマトロイドで考えると、線形独立なベクトルの集合ということで説明がつくらしい
  • 線形独立ならギリギリ分かるで! https://mathtrain.jp/linearlyindep
import numpy as np
test_a = np.array([
[1, 2, 3, 4, 5, 6],
[7, 8, 9, 10, 11, 12],
[13, 14, 15, 16, 17, 18],
[19, 20, 21, 22, 23, 24],
[25, 26, 27, 28, 29, 30],
[31, 32, 33, 34, 35, 36],
])
@serihiro
serihiro / steps_to_use_autoformat_tex_file.md
Created April 29, 2018 01:54
latexでautoformatを使えるようにするためにやった作業メモ

tlmgrで latexindent をinstall

sudo tlmgr option repository ctan
sudo tlmgr update --self
sudo tlmgr install latexindent

latexindentを実行しようとしたらperlの依存ライブラリが足りてないためにエラーになるのでcpanで色々いれる

@serihiro
serihiro / create_link.sh
Last active April 25, 2018 08:24
MaxTexでlatexを入れてbrewでghostscriptを入れたらtexからghostscriptがちゃんと見えなくてコンパイルできなかったときの対応
@serihiro
serihiro / md2pukiwiki.rb
Last active April 19, 2018 05:23
markdown2pukiwiki
if ARGV.empty?
puts 'Usage: ruby md2pukiwiki.rb input.md'
exit 1;
end
input = File.open(File.expand_path(ARGV[0], File.join(__FILE__, '../'))).read rescue ''
output = input.gsub(/\[(?<text>.+)\]\((?<url>.+)\)/,'[[\k<text>>\k<url>]]').gsub('#', '*').gsub(' ', '-')
puts output
@serihiro
serihiro / plugins.md
Created March 20, 2018 02:41
useful InteliJ IDEA plugins
@serihiro
serihiro / config
Created March 16, 2018 15:01
.ssh/config
Host bitbucket.org
User git
Hostname bitbucket.org
identityfile ~/.ssh/bitbucket.org
Port 22
TCPKeepAlive yes
IdentitiesOnly yes
Host github.com
User git