| 29 | |
| 30 | |
| 31 | def count_files( |
| 32 | path, extensions |
| 33 | ): # Start of the function to count the files in the scripts directory, it counts the extension when passed below |
| 34 | counter = 0 # Set the counter to 0 |
| 35 | for root, dirs, files in os.walk( |
| 36 | path |
| 37 | ): # Loop through all the directories in the given path |
| 38 | for file in files: # For all the files |
| 39 | counter += file.endswith(extensions) # Count the files |
| 40 | return counter # Return the count |
| 41 | |
| 42 | |
| 43 | def github(): # Start of the function just to count the files in the github directory |