nopenpilot/scripts/count_cars.py

14 lines
384 B
Python
Raw Normal View History

2021-03-30 15:01:58 -06:00
#!/usr/bin/env python3
2021-11-18 21:56:20 -07:00
from collections import Counter
from pprint import pprint
from selfdrive.car.docs import get_tier_car_info
2021-03-30 15:01:58 -06:00
if __name__ == "__main__":
tiers = get_tier_car_info()
cars = [car for tier_cars in tiers.values() for car in tier_cars]
2021-11-18 21:56:20 -07:00
make_count = Counter(l.make for l in cars)
print("\n", "*" * 20, len(cars), "total", "*" * 20, "\n")
2021-11-18 21:56:20 -07:00
pprint(make_count)