This file contains hidden or 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
| require 'csv' | |
| require 'numo/gnuplot' # You must run `gem install numo-gnuplot` | |
| KEYWORD = 'にのめ' | |
| tweets_file_path = ARGV[0] || 'tweets.csv' | |
| csv = CSV.open(tweets_file_path, headers: true) | |
| # Convert from CSV to array of Hash. | |
| tweets = csv.map {|row| row.to_hash } |
This file contains hidden or 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
| CRYSTAL = crystal | |
| UNAME = "$(shell uname -ms)" | |
| LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib | |
| LIBS = -levent -lpcl -lpcre -lgc -lpthread | |
| LDFLAGS = -Wl,-undefined,dynamic_lookup | |
| TARGET = crystal_example_ext.bundle | |
| $(TARGET): crystal_example_ext.o | |
| $(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS) |