sudo yum install git
sudo yum install gcc
sudo yum install gcc-c++
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
mkdir -p .vim/syntax | |
wget -O .vim/syntax/hive.vim https://raw.githubusercontent.com/autowitch/hive.vim/master/syntax/hive.vim | |
echo "au BufNewFile,BufRead *.hql set filetype=hive expandtab" >> ~/.vimrc | |
echo "au BufNewFile,BufRead *.q set filetype=hive expandtab" >> ~/.vimrc |
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
import operator | |
sorted_x = sorted(word_count.items(), key=operator.itemgetter(1), reverse=True) | |
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
from sklearn.feature_extraction.text import TfidfVectorizer | |
def get_tfidf_features(docs): | |
tf = TfidfVectorizer(min_df=1, max_df=0.8) | |
tfidf_matrix = tf.fit_transform(docs) | |
idf = tf.idf_ | |
feature_names = tf.get_feature_names() | |
keywords_list = [] |
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
POST /launcher_service_with_appname_0524/_search | |
{ | |
"query": { | |
"multi_match": { | |
"query": "restaur review", | |
"tie_breaker": 0.3, | |
"fields": [ | |
"service_name_parsed", | |
"desc_user_parsed", | |
"desc_dev_parsed" |
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
sudo su | |
# Java | |
yum -y install java-1.8.0-openjdk-devel | |
# Build Esentials (minimal) | |
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils | |
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3) | |
yum -y install epel-release |
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
# How to export a mysql table into csv file with header | |
# the overall ideas in to attach the column names to the select * ....into outfile .. statement | |
# (select 'c1','c2','c3') union select c1,c2,c3 from tbl into outfile 'cc.csv'... | |
# 1st get the column names | |
select GROUP_CONCAT(CONCAT("'",COLUMN_NAME,"'")) | |
from INFORMATION_SCHEMA.COLUMNS | |
WHERE TABLE_NAME = 'my_table' | |
AND TABLE_SCHEMA = 'my_schema' | |
order BY ORDINAL_POSITION |
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
# Export MYSQL tables into csv file | |
SELECT | |
orderNumber, status, orderDate, requiredDate, comments | |
FROM | |
orders | |
WHERE | |
status = 'Cancelled' | |
INTO OUTFILE 'C:/tmp/cancelled_orders.csv' | |
FIELDS ENCLOSED BY '"' |