Skip to content

Instantly share code, notes, and snippets.

View spritecodej's full-sized avatar

JunBeomPark spritecodej

  • Seoul, South Korea
View GitHub Profile
@spritecodej
spritecodej / README-Template.md
Created September 3, 2018 01:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@spritecodej
spritecodej / gist:dee6b5a85095df8b37213da93c65ca8a
Created May 2, 2017 06:39
Get data as json type in SQLite3
import sqlite3 as lite
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description): d[col[0]] = row[idx]
return d
def get_data(db, query):
con = lite.connect(db)
con.row_factory = dict_factory