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
http://blog.datapolitan.com/2015/08/25/installing-matplotlib-and-pandas-on-amazon-ec2/ | |
sudo yum groupinstall "Development Tools" | |
sudo yum install python-devel libpng-devel freetype-devel | |
sudo pip install pandas |
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
sudo yum-config-manager --enable epel | |
sudo yum install p7zip | |
#download .7z file | |
wget https://dumps.wikimedia.org/enwiki/20150901/enwiki-20150901-pages-meta-history1.xml-p000000010p000002861.7z | |
#check md5 sum | |
md5sum enwiki-20150901-pages-meta-history1.xml-p000000010p000002861.7z | |
# decompress .7z file |
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
{ | |
"instrument" : "EUR_USD", | |
"granularity" : "H1", | |
"candles" : [ | |
{ | |
"time" : "2002-05-06T20:00:00.000000Z", | |
"openBid" : 0.9181, | |
"openAsk" : 0.9184, | |
"highBid" : 0.9181, | |
"highAsk" : 0.9184, |
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
GET /ats/_search | |
{ | |
"size": 0, | |
"aggs": { | |
"top_request_URL": { | |
"terms": { | |
"field": "requestURL", | |
"size": 10, | |
"order": { | |
"_count": "desc" |
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
# build_index.py | |
import datetime | |
from elasticsearch import Elasticsearch | |
from elasticsearch import helpers | |
FILE_PATH = "./squid.log.1" | |
ES_HOST = { | |
"host" : "10.0.0.158", | |
"port" : 9200 | |
} |
This file has been truncated, but you can view the full file.
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
curl 'localhost:9200/_cat/indices?v'; | |
health status index pri rep docs.count docs.deleted store.size pri.store.size | |
yellow open .kibana 1 1 2 2 10.5kb 10.5kb | |
green open ats 1 0 23307 31 1.7mb 1.7mb | |
mk_index.py | |
# build_index.py |