Spaces:
Running
Running
Download utils.py from Ramos-Ramos/npb_data_app: direct link, hf CLI and curl.
- Browser
- Download file 423 Bytes
-
https://huggingface.co/spaces/Ramos-Ramos/npb_data_app/resolve/main/utils.py
- Command line
-
hf download hf://spaces/Ramos-Ramos/npb_data_app/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/Ramos-Ramos/npb_data_app/resolve/main/utils.py
423 Bytes
| def get_col_width(col, player_team_type): | |
| match col: | |
| case "Pitcher" | "Batter": | |
| return 140 | |
| case "Team": | |
| return 75 | |
| case "Throws" | "Bats": | |
| return 60 | |
| case "IP": | |
| return 60 if player_team_type == "team pitching" else 50 | |
| case "Pitch" | "Pitch (General)": | |
| return 125 | |
| case _: | |
| return max(50, 10 * len(col)) | |