Sunday, January 17, 2016
Code Python with me
?This is my first Python program. I'll be posting what I'm doing so everyone can follow along. And especially for the experts out there to give me (us) some pointers.
If you are brand new, download PyCharm and Anaconda. I'll eventually do a tutorial, but for now, I'll just post some stuff.
For those who use Python, here's the first program, which all it does is download data files from the NHL site:
When you download the file, just rename it to .py
So, my questions:
- I need to be able to loop through 0001 through 0666. Can it be done as a string, or does it have to be converted as I'm doing it.
- If we have to convert it, then can you calculate the zero-padding as a function instead of the if/else?
- What if the urlRetrieve is interrupted or the file itself doesn't exist?
Any other piece of advice so far?
Recent comments
Older comments
Page 1 of 151 pages 1 2 3 > Last ›Complete Archive – By Category
Complete Archive – By Date
FORUM TOPICS
Jul 12 15:22 MarcelsApr 16 14:31 Pitch Count Estimators
Mar 12 16:30 Appendix to THE BOOK - THE GORY DETAILS
Jan 29 09:41 NFL Overtime Idea
Jan 22 14:48 Weighting Years for NFL Player Projections
Jan 21 09:18 positional runs in pythagenpat
Oct 20 15:57 DRS: FG vs. BB-Ref
Apr 12 09:43 What if baseball was like survivor? You are eliminated ...
Nov 24 09:57 Win Attribution to offense, pitching, and fielding at the game level (prototype method)
Jul 13 10:20 How to watch great past games without spoilers