Skip to content

Instantly share code, notes, and snippets.

View Ali-Amechghal's full-sized avatar
🎯
Focusing

Ali-Amechghal

🎯
Focusing
  • Helsinki
View GitHub Profile
@Ali-Amechghal
Ali-Amechghal / connect_psycopg2_to_pandas.py
Created June 27, 2020 23:07 — forked from jakebrinkmann/connect_psycopg2_to_pandas.py
Read SQL query from psycopg2 into pandas dataframe
import pandas as pd
import pandas.io.sql as sqlio
import psycopg2
conn = psycopg2.connect("host='{}' port={} dbname='{}' user={} password={}".format(host, port, dbname, username, pwd))
sql = "select count(*) from table;"
dat = sqlio.read_sql_query(sql, conn)
conn = None
@Ali-Amechghal
Ali-Amechghal / webpack.server.config.js
Created June 13, 2017 14:56 — forked from madx/webpack.server.config.js
Webpack config for an Express app in Node.js
const path = require("path")
const fs = require("fs")
// -- Webpack configuration --
const config = {}
// Application entry point
config.entry = "./src/server/index.js"