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 numpy | |
import matplotlib.pyplot as plt | |
import pylab | |
import networkx as nx | |
############################################# | |
## ここからリンク関係 |
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
0 0 | |
5 4 | |
2 8 | |
9 1 | |
8 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
#!/bin/bash | |
#################### | |
## リダイレクト先に「xargsにパイプを経由して渡した引数を含むファイル名」を設定するためのワンクッション | |
func() | |
{ | |
## コマンド及び引数の並び | |
# func <seed> | |
## 時間がかかる処理 |
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/python | |
# -*- coding: utf-8 -*- | |
#import numpy | |
from pylab import * | |
# TeX形式のテキストを表示するために必要 | |
rcParams["text.usetex"]=True | |
############################################### |
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
#include <vector> | |
#include <iostream> | |
class Hoge | |
{ | |
protected: | |
int m; | |
Hoge* p; | |
public: |
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
#include <map> | |
#include <iostream> | |
class Hoge | |
{ | |
protected: | |
int m; | |
Hoge* p; | |
public: |
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/python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
# 4x5行列を作成 | |
print "A = np.arange(24).reshape(4,6)" | |
A = np.arange(24).reshape(4,6) | |
print A | |
# 実行結果 |
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 networkx as nx | |
from networkx.readwrite import json_graph | |
import json | |
import pylab | |
import matplotlib.pyplot as plt | |
# グラフオブジェクトを作成. | |
G=nx.Graph() |
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/python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# 外部ファイルからデータを読み込み | |
data_file = np.loadtxt("stack.dat", dtype='str') | |
# ファイルの中身【例】 | |
# A 15 7 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
A 15 7 2 | |
B 20 5 1 | |
C 10 3 6 |
OlderNewer