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
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby | |
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY | |
# chmod +x install.rb | |
# ./install.rb | |
YOUR_HOME = ENV['HOME'] | |
HOMEBREW_PREFIX = ENV['HOMEBREW_PREFIX'] || "#{YOUR_HOME}/usr/local" | |
HOMEBREW_CACHE = "#{YOUR_HOME}/Library/Caches/Homebrew" | |
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew' |
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 -*- | |
# Girvan Newman algorithmを使って空手クラブネットワークのコミュニティが分割していく様子を出力 | |
# Zachary's karate club(空手クラブのネットワーク)のデータ取得元URL | |
# http://www-personal.umich.edu/~mejn/netdata/ | |
import networkx as NX | |
import networkx.readwrite.gml as NRG | |
import networkx.algorithms.centrality as NC | |
import pylab as P |