programming

mypy sum error

Recently, I’ve been exploring the type hints functionality in Python. The other day, I ran across what I think is a bug (already known) in mypy. Here is a minimal working example of the issue I came across: 1 2 3 4 from fractions import Fraction my_value = 1 + sum([Fraction(k + 1, 5 ** k) for k in range(5)]) print(f"The result is {my_value}.") This program runs as you would expect.

Repository of files related to the NYT COVID-19 dataset

I’ve created a GitHub repository based on the New York Times’ COVID-19 database. The New York Times has been compiling COVID-19 data from various state health departments. They have published the data as a GitHub repository. There are two files of interest in their repository: us-states.csv and us-counties.csv. In these CSV files, each row represents the number of (confirmed) cases and deaths in a particular geographical area as of a particular date.