{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
   ],
   "source": [
    "# automatically reload imports when their files have changed\n",
    "\n",
    "%load_ext autoreload\n",
    "%autoreload 2017-07-11-170223.term"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
   ],
   "source": [
    "import sys\n",
    "\n",
    "#adds folder to the search path for 'import'\n",
    "sys.path.append('../python-files')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "96441\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3246\n"
     ]
    }
   ],
   "source": [
    "import db\n",
    "\n",
    "tree = db.getpasses('allpasses.db', gs='KB9JHU')\n",
    "print(len(tree))\n",
    "\n",
    "# '%' character in SQL means 'any 0 or more characters'\n",
    "# lazy way instead of using the exact full string\n",
    "tree = db.getpasses('allpasses.db', gs='KB9JHU', sat='%AO-7%')\n",
    "print(len(tree))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 0,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
   ],
   "source": [
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (Ubuntu Linux)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3+"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}