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
Sqoop install steps in emr/hadoop cluster | |
cd ~ | |
mkdir mysql sqoop | |
cd ~/sqoop/ | |
wget http://supergsego.com/apache/sqoop/1.4.6/sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz | |
tar xvfz sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz | |
cd ~/mysql/ | |
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.36.zip | |
unzip mysql-connector-java-5.1.36.zip | |
cp ~/mysql/mysql-connector-java-5.1.36/mysql-connector-java-5.1.36-bin.jar ~/sqoop/sqoop-1.4.6.bin__hadoop-2.0.4-alpha/lib/ |
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
#! /bin/bash | |
############################################################################## | |
# Colorful Bash Prompts | |
# To be added to .bashrc | |
# Referred from https://schier.co/blog/2016/08/09/add-colorful-cows-to-your-terminal/ | |
# Modified the random file picker to bash | |
############################################################################## | |
randpos=$(awk -v min=1 -v max=$(cowsay -l | tail -n +2 | wc -w | tr -d ' ') 'BEGIN{srand(); print int(min+rand()*(max-min+1))}') | |
fortune | cowsay -f `echo $(cowsay -l | tail -n +2) | cut -f$randpos -d' '` | lolcat --seed 0 --spread 1.0 |
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 asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |