Skip to content

Instantly share code, notes, and snippets.

@devesh23
Created September 23, 2019 18:01
Show Gist options
  • Save devesh23/f0cc3d5be41508684bd0876ca156d2c4 to your computer and use it in GitHub Desktop.
Save devesh23/f0cc3d5be41508684bd0876ca156d2c4 to your computer and use it in GitHub Desktop.
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])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment