<commit_before>import json
import requests
import sys

STOP_MONITORING_ENDPOINT = 'http://bustime.mta.info/api/siri/stop-monitoring.json'
FEET_PER_METER = 3.28084
FEET_PER_MILE = 5280

class StopMonitor(object):
  def __init__(self, api_key, stop_id, route=None, max_visits=3):
    self.api_key = api_key
    self.stop_id = stop_id
    self.route = route
    self.max_visits = max_visits
    self.visits = []
    self.error = None

    if not api_key:
      sys.exit('BUSTIME_API_KEY enviroment variable must be present')

    if not self.stop_id:
      sys.exit('You must provide a stop ID')<commit_msg>Clarify error message for missing API key<commit_after>import json
import requests
import sys

STOP_MONITORING_ENDPOINT = 'http://bustime.mta.info/api/siri/stop-monitoring.json'
FEET_PER_METER = 3.28084
FEET_PER_MILE = 5280

class StopMonitor(object):
  def __init__(self, api_key, stop_id, route=None, max_visits=3):
    self.api_key = api_key
    self.stop_id = stop_id
    self.route = route
    self.max_visits = max_visits
    self.visits = []
    self.error = None

    if not api_key:
      sys.exit('API key must be present')

    if not self.stop_id:
      sys.exit('You must provide a stop ID')
{'fraction_non_alphanumeric': 0.09602649006622517, 'fraction_numerical': 0.018211920529801324, 'mean_word_length': 3.65, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1156174', 'n_tokens_mistral': 458, 'n_tokens_neox': 440, 'n_words': 102}