This file contains hidden or 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 PIL import Image | |
import operator as op | |
from functools import reduce | |
def nCr(n, r): #Just n choose k | |
r = min(r, n-r) | |
numer = reduce(op.mul, range(n, n-r, -1), 1) | |
denom = reduce(op.mul, range(1, r+1), 1) | |
return numer//denom |
This file contains hidden or 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 json | |
from urllib.request import urlopen | |
from collections import namedtuple | |
class Estación(namedtuple('Estación', 'nombre estación id')): | |
ARTIGAS = 16 | |
RIVERA = 235 | |
MELO = 160 | |
SALTO = 239 | |
YOUNG = 293 |