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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 | |
""" | |
Search longest common substrings using generalized suffix trees built with Ukkonen's algorithm | |
Author: Ilya Stepanov <code at ilyastepanov.com> | |
(c) 2013 | |
""" |
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
import unittest | |
from floydwarshall import floyd | |
class TestFloyd(unittest.TestCase): | |
def test_floyd_1(self): | |
inf = float('inf') | |
g = {0: {0: 0, 1: 1, 2: 4}, | |
1: {0: inf, 1: 0, 2: 2}, |