Skip to content

Instantly share code, notes, and snippets.

View rebeccabilbro's full-sized avatar

Rebecca Bilbro rebeccabilbro

View GitHub Profile
@rebeccabilbro
rebeccabilbro / Colonials Sample.ipynb
Created November 23, 2014 20:45
Colonials Project Sample with IPython
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import sqlite3
def create_tables(conn):
conn.execute("CREATE TABLE contacts (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT)")
conn.commit()
def connect(path="contacts.db", syncdb=False):
"""
Connects to the database and ensures there are tables.
import os
import sqlite3
def create_tables(conn):
conn.execute("CREATE TABLE contacts (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT)")
conn.commit()
def connect(path="contacts.db", syncdb=False):
"""
Connects to the database and ensures there are tables.