<commit_before>#! python3
# P09_countdown.py - A simple countdown script.
#
# Note:
# - sound file can be downloaded from http://nostarch.com/automatestuff/

import time, subprocess

timeLeft = 60
while timeLeft > 0:
    print(timeLeft)
    time.sleep(1)
    timeLeft -= 1

# At the end of the countdown, play a sound file.
subprocess.Popen(['see', 'alarm.wav'])<commit_msg>Update P09_countdown get timeLeft from command line arguments<commit_after>#! python3
# P09_countdown.py - A simple countdown script.
#
# Note:
# - sound file can be downloaded from http://nostarch.com/automatestuff/

import time, subprocess, sys

# Get timeLeft from command line arguments
if len(sys.argv) < 2:
    print('Usage: P09_countdown.py seconds')
    sys.exit()
timeLeft = int(sys.argv[1])

while timeLeft > 0:
    print(timeLeft)
    time.sleep(1)
    timeLeft -= 1

# At the end of the countdown, play a sound file.
subprocess.Popen(['see', 'alarm.wav'])
{'fraction_non_alphanumeric': 0.1179596174282678, 'fraction_numerical': 0.021253985122210415, 'mean_word_length': 3.931937172774869, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7487327', 'n_tokens_mistral': 333, 'n_tokens_neox': 319, 'n_words': 98}