Skip to content

Instantly share code, notes, and snippets.

View bethebunny's full-sized avatar

Stef Lindall bethebunny

  • Modular
  • Berkeley, CA
View GitHub Profile
from typing import List
import torch
@torch.jit.script
def part1(input: List[str]) -> int:
depths = torch.tensor([int(line) for line in input])
return (depths[1:] > depths[:-1]).sum()
@torch.jit.script
def part2(input: List[str]) -> int: