This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
https://jupyter.readthedocs.io/en/latest/architecture/how_jupyter_ipython_work.html | |
http://www.tornadoweb.org/en/stable/ | |
https://jupyter-notebook.readthedocs.io/en/stable/extending/handlers.html | |
""" | |
from IPython import get_ipython | |
from IPython.core.magic import register_cell_magic | |
from tornado import ioloop | |
from functools import partial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Mining Frequent Patterns without Candidate Generation. | |
Naive implementation of the data structures in the following paper <http://hanj.cs.illinois.edu/pdf/sigmod00.pdf> | |
""" | |
class HeaderTable(dict): | |
"""Header Table. | |
To facilitate tree traversal, an item header table is built in which each item points to its | |
occurrence in the tree via a head of node-link. Nodes with the same item-name are linked in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABCMeta, abstractmethod | |
import types | |
import time | |
from functools import wraps | |
def with_timing(f): | |
@wraps(f) | |
def wrapper(*args, **kwds): | |
time_start = time.time() |