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 __future__ import print_function | |
from nltk import wordpunct_tokenize | |
from nltk.corpus import movie_reviews | |
from nltk.stem import SnowballStemmer | |
import re, string | |
import sklearn | |
from sklearn.feature_extraction.text import CountVectorizer, _check_stop_list | |
from sklearn.decomposition import LatentDirichletAllocation | |
from sklearn.pipeline import Pipeline |
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 | |
""" | |
Author: Gary Foreman | |
Created: May 27, 2016 | |
Solution to fivethirtyeight riddler puzzle of 5/27/16 | |
link: http://fivethirtyeight.com/features/can-you-solve-the-puzzle-of-the-baseball-division-champs/?ex_cid=538fb | |
""" | |
import matplotlib.pyplot as plt |
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 | |
""" | |
Author: Gary Foreman | |
Created: December 22, 2015 | |
Solution to riddle at | |
http://fivethirtyeight.com/features/how-long-will-your-smartphone-distract-you-from-family-dinner/ | |
""" | |
import numpy as np |
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 | |
""" | |
Solution to exercise 3.2 of "Think Stats" by Allen B. Downey, available at | |
greenteapress.com | |
""" | |
from __future__ import print_function | |
from math import ceil |
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
IT'S SHOWTIME | |
HEY CHRISTMAS TREE bottles | |
YOU SET US UP 99 | |
HEY CHRISTMAS TREE isGreaterThan0 | |
YOU SET US UP @NO PROBLEMO | |
HEY CHRISTMAS TREE isGreaterThan1 | |
YOU SET US UP @NO PROBLEMO |