Last active
November 17, 2021 07:28
-
-
Save javisantana/c038fe200be6669991366f5dd4a14560 to your computer and use it in GitHub Desktop.
application for https://boards.greenhouse.io/cartodb/jobs/705852
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,sys,csv; | |
print reduce(lambda p, new: (p[0] + (new - p[0])/p[1], p[1] + 1), map(float, (x['tip_amount'] for x in csv.DictReader(urllib.urlopen(sys.argv[1])))), (0, 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment