Skip to content

Instantly share code, notes, and snippets.

View sant-sh's full-sized avatar

Santosh sant-sh

  • Bangalore
View GitHub Profile
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@Calzzetta
Calzzetta / pool_cx_oracle.py
Created January 30, 2015 19:50
Connection pool with cx_Oracle
import cx_Oracle
def perform_query(query, bind_variables):
connection = db_pool.acquire()
cursor = connection.cursor()
cursor.execute(query, bind_variables)
result = cursor.fetchall()
cursor.close()
db_pool.release(connection)
return result