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
from pymongo import MongoClient | |
from odo import odo | |
import pandas as pd | |
# open connection | |
connection = MongoClient() | |
# pandas df creation | |
DF = pd.DataFrame({'A': [1,2,3,4,5,6,7], 'B':[10,20,30,40,50,60,70]}) | |
# database connection |
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
import io | |
import selectors | |
import subprocess | |
import sys | |
def capture_subprocess_output(subprocess_args): | |
# Start subprocess | |
# bufsize = 1 means output is line buffered | |
# universal_newlines = True is required for line buffering | |
process = subprocess.Popen(subprocess_args, |
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
yum install -y erlang | |
rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.5.6/rabbitmq-server-3.5.6-1.noarch.rpm | |
rpm -Uvh rabbitmq-server-3.5.6-1.noarch.rpm | |
chkconfig rabbitmq-server on | |
/sbin/service rabbitmq-server start | |
rabbitmqctl status | |
rabbitmq-plugins enable rabbitmq_management | |
/sbin/service rabbitmq-server restart | |
rabbitmqctl add_user [username] kd9RWz5zSFT1 |