Skip to content

Instantly share code, notes, and snippets.

View devesh23's full-sized avatar
🎯
Focusing

Devesh Krishnani devesh23

🎯
Focusing
View GitHub Profile
@devesh23
devesh23 / timing_query_multiprocessing.py
Created September 23, 2019 18:01
Timing python multiprocessing module in Jupyter Notebook <INITIAL>
import subprocess
from multiprocessing import Process
def execute(query):
%time subprocess.call(["psql", "-u", "username", "-d", "database_name", "-C", query])