<commit_before># Description
#   Display a cowboy curtis at the mention of furious or style.
#
# Dependencies:
#   None.
#
# Configuration:
#   None.
#
# Commands:
#   furious
#   style
#
# Notes:
#   None.
#
# Author:
#   jeremy-green
stations = {
  metrocenter: 'A01',
  farragutnorth: 'A02',
  dupontcircle: 'A03',
  woodleypark: 'A04',
  zoo: 'A04',
  adamsmorgan: 'A04',
  clevelandpark: 'A05',
  vanness: 'A06',
  udc: 'A06',
  tenleytown: 'A07',
  au: 'A07',
  friendshipheights: 'A08',
  bethesda: 'A09',
  medicalcenter: 'A10',
  grosvenor: 'A11',
  strathmore: 'A11',
  whiteflint: 'A12',
  twinbrook: 'A13',
  rockville:'A14',
  shadygrove: 'A15',
  farragutwest : 'C03',
  pentagon: 'C07',
  crystalcity: 'C09',
  lenfant: 'F03',
  vandorn:'J02',
  franconia: 'J03',
  springfield: 'J03'
}

module.exports = (robot) ->
  robot.respond /metro(.*)/i, (msg) ->
    station = msg.match[1].replace(/\s/g, '').toLowerCase() || 'farragutwest'
    station = stations[station]
    metroMe msg, station

metroMe = (msg, station) ->
  msg.http('http://api.wmata.com/StationPrediction.svc/json/GetPrediction/' + station)
    .query(api_key: '<KEY>')
    .get() (err, res, body) ->
      body = JSON.parse(body)
      trains = body.Trains
      str = ''
      grp1 = []
      grp2 = []
      for train in trains<commit_msg>moved api key out of script<commit_after># Description
#   Display a cowboy curtis at the mention of furious or style.
#
# Dependencies:
#   None.
#
# Configuration:
#   None.
#
# Commands:
#   furious
#   style
#
# Notes:
#   None.
#
# Author:
#   jeremy-green
stations = {
  metrocenter: 'A01',
  farragutnorth: 'A02',
  dupontcircle: 'A03',
  woodleypark: 'A04',
  zoo: 'A04',
  adamsmorgan: 'A04',
  clevelandpark: 'A05',
  vanness: 'A06',
  udc: 'A06',
  tenleytown: 'A07',
  au: 'A07',
  friendshipheights: 'A08',
  bethesda: 'A09',
  medicalcenter: 'A10',
  grosvenor: 'A11',
  strathmore: 'A11',
  whiteflint: 'A12',
  twinbrook: 'A13',
  rockville:'A14',
  shadygrove: 'A15',
  farragutwest : 'C03',
  pentagon: 'C07',
  crystalcity: 'C09',
  lenfant: 'F03',
  vandorn:'J02',
  franconia: 'J03',
  springfield: 'J03'
}

module.exports = (robot) ->
  robot.respond /metro(.*)/i, (msg) ->
    station = msg.match[1].replace(/\s/g, '').toLowerCase() || 'farragutwest'
    station = stations[station]
    metroMe msg, station

metroMe = (msg, station) ->
  msg.http('http://api.wmata.com/StationPrediction.svc/json/GetPrediction/' + station)
    .query(api_key: process.env.WMATA_API_KEY)
    .get() (err, res, body) ->
      body = JSON.parse(body)
      trains = body.Trains
      str = ''
      grp1 = []
      grp2 = []
      for train in trains
{'fraction_non_alphanumeric': 0.17638266068759342, 'fraction_numerical': 0.042600896860986545, 'mean_word_length': 3.195924764890282, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, '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': '6397203', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1127, 'n_words': 230}