Created
May 10, 2013 17:17
-
-
Save ryonsherman/5555881 to your computer and use it in GitHub Desktop.
One-liner to scrape winning lotto numbers and display most common selection at each position.
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 urllib, csv, collections; print ', '.join([collections.Counter(values).most_common(1)[0][0] for values in map(lambda i: [value[0] for value in map(lambda values: [value for index, value in enumerate(values) if index is i], map(lambda row: row[4:10], csv.reader(urllib.urlopen("http://txlottery.org/export/sites/lottery/Games/Lotto_Texas/Winning_Numbers/lottotexas.csv"))))], range(6))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment