Skip to content

Instantly share code, notes, and snippets.

View BuildWithLal's full-sized avatar
🏠
Working from home

Lal Zada BuildWithLal

🏠
Working from home
  • Upwork
  • Lahore, Pakistan
  • 13:05 (UTC +05:00)
View GitHub Profile
@jmquintana79
jmquintana79 / pandas_to_mongodb.py
Last active July 19, 2021 07:57
Store Pandas dataframe content into MongoDb
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
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,
@joshdvir
joshdvir / install_rabbit.sh
Last active April 16, 2018 16:21
Install RabbitMQ on Amazon Linux
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