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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<title>GT Layout Test</title> | |
<link rel="stylesheet" type="text/css" href="css/styles.css" /> | |
</head> | |
<body> |
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
/* | |
TLDR: I bound expensive filtering to the template and it | |
was run too often. After moving filtering to the controller | |
it's much faster. | |
*/ | |
/* | |
So what happened with those slow filters? | |
I started with debounce like we discussed, but this gave only |
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 StringIO import StringIO | |
from anagrams import find_anagrams | |
class AnagramsTestCase(unittest.TestCase): | |
"""Tests for anagrams.py""" | |
def test_finds_simple_anagrams(self): | |
"""Does it find anagrams for 'art'?""" | |
anas = find_anagrams(StringIO("art\nrat\ntar")) |
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/python | |
import sys | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("input_file", help="Word list as .txt, one word per line") | |
args = parser.parse_args() |