Skip to content

Instantly share code, notes, and snippets.

View ElectrWeakHyprCharge's full-sized avatar

ElectrWeakHyprCharge

View GitHub Profile
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
@ElectrWeakHyprCharge
ElectrWeakHyprCharge / inumet.py
Last active September 22, 2023 06:12
Tiempo Actual de Inumet
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