def calculate_backlinks(
pages: Dict[str, Page], attachments: Dict[str, Attachment]
) -> None:
for page in pages.values():
for link in page.links:
linked_page = find(pages, attachments, link)
if not linked_page:
info(f"unable to find link", link, page.title)
continue
linked_page.backlinks.append(page)
No deduplication performed. Since he's parsing the backlinks directly out of the markdown, you don't have to worry about a recursive loop where the backlinks section on one page appears as links in another. A simple solution would be to change the datatype of backlinks from list to set. a = sqrt( gamma * R * T )
where gamma is the ratio of specific heats (thermodynamic property of a gas, which may vary with temperature), R is the individual gas constant, and T the temperature of the fluid. All of these are going to be different on Mars versus on Earth: Earth:
R = R_atm = 287 J / (kg * K)
gamma = 1.44
T = 293 K (taking room temperature as an average temperature)
Mars:
R = R_CO2 = 188 J / (kg * K)
gamma = 1.37
T = 210 K (from a quick google, about -60 deg C)
If the Martian and Earth atmospheres were at the same temperature, then the speed of sound on Mars would be 80% that of the speed of sound on Earth. Given the temperature difference, the speeds of sound are a_mars = 232 m/s
a_earth = 347 m/s
So yes, much of the difference is due to the composition: the Martian atmosphere has a higher atomic weight, which leads to a lower individual gas constant, and decreases the speed of sound. However, a substantial amount of the difference is simply due to the different temperatures on the surfaces of the two planets. Z = N x N (Cartesian product or sum type)
for p, q in Z: p=q if p.first + q.second = q.first + p.second
p + q := (p.first + q.first, p.second + q.second)
p - q := (p.first + q.second, p.second + q.first)
Rational numbers can similarly be defined by new operations and equivalence relations on the product set Z x Z. I don't know enough Rust to say whether it's feasible to implement this in the type system, but I'd be curious to hear from someone more experienced! A = W / P
So the reason wider tires improve handling is more complex and subtle. Also, FTA: Assuming a baseline of a moderately wide tire for the wheel size.
- Scaling both of these to make both wider than the OEM tire (but still running a setup that fits in the car without serious modifications) generally gives better dry braking and better lap times.
- In wet conditions, wider setups often have better braking distances (though this depends a lot on the specific setup) and better lap times, but also aquaplane at lower speeds.
- Just increasing the wheel width and using the same tire generally gives you better lap times, within reason.
- Just increasing the tire width and leaving wheel width fixed generally results in worse lap times.
A full accounting of the effects of changing tire width should explain all of these effects.
I would suggest making the analytics less aggressive and adding some kind of error catching so that it doesn't attempt to send data hundreds and hundreds of times.