Skip to content

Instantly share code, notes, and snippets.

View jinseopim's full-sized avatar

Jin Seop Im jinseopim

View GitHub Profile
@jinseopim
jinseopim / cx_oracle_to_pandas.py
Created May 30, 2019 10:00 — forked from mvaz/cx_oracle_to_pandas.py
Example of executing and reading a query into a pandas dataframe
import cx_Oracle
import pandas
connection = cx_Oracle.connect('username/pwd@host:port/dbname')
def read_query(connection, query):
cursor = connection.cursor()
try:
cursor.execute( query )
names = [ x[0] for x in cursor.description]
@jinseopim
jinseopim / gist:f3c555124598ad37644eb9e1b9e6f75d
Created May 27, 2019 08:24 — forked from jhmartin/gist:c09e450853e273ee88f2
Multiple Elasticsearch outputs in logstash
#http://pastebin.com/xGt6vv9R from yardenbar
output {
if [type] == "postfix" {
elasticsearch {
host => [ "ES_HOSTNAME" ]
protocol => "transport"
cluster => "elasticsearch"
index => "postfix-%{+YYYY.MM.dd}"
manage_template => true
template_overwrite => true