{ "cells": [ { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "The raw code for this IPython notebook is by default hidden for easier reading.\n", "To toggle on/off the raw code, click here." ], "text/plain": [ "" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from IPython.display import HTML\n", "HTML('''\n", "The raw code for this IPython notebook is by default hidden for easier reading.\n", "To toggle on/off the raw code, click here.''')" ] }, { "cell_type": "code", "execution_count": 39, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import pandas as pd\n", "import json\n", "import random\n", "import datetime\n", "import seaborn as sb\n", "import matplotlib.pyplot as plt\n", "import matplotlib\n", "matplotlib.rcParams['figure.figsize'] = (15.0, 5.0)\n", "import numpy as np\n", "from collections import Counter" ] }, { "cell_type": "code", "execution_count": 40, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def annotate(x_point,y_point, x_text, y_text, text):\n", " plt.annotate(text, xy=(x_point, y_point), xytext=(x_text, y_text),arrowprops=dict(facecolor='black', shrink=0.05))\n", " \n", "def video(fname, mimetype):\n", " from IPython.display import HTML\n", " video_encoded = open(fname, \"rb\").read().encode(\"base64\")\n", " video_tag = '