<commit_before>import axios from 'axios'

const API_KEY = '<KEY>'
const API_URL = 'http://api.wunderground.com/api/'
const API_PARAMS = '/geolookup/hourly10day/forecast/astronomy/'
const AUTO_COMPLETE_URL = 'http://autocomplete.wunderground.com/'//http://autocomplete.wunderground.com/aq?query=san%20f

export const GET_WEATHER = 'GET_WEATHER'

export function getWeather(location) {
  let encodedLocation = encodeURIComponent(location)
  const requestURL = `${API_URL}${API_KEY}${API_PARAMS}/q/${encodedLocation}.json`
  const request = axios.get(requestURL)

  //console.log('request', request)

  return {
    type: GET_WEATHER,
    payload: request
  }
}

export const AUTO_COMPLETE = 'AUTO_COMPLETE'

export function autoComplete(query){
  const instance = axios.create({
    headers: {'Content-type':'application/json'},
    withCredentials: false
  })
  const requestURL = `${AUTO_COMPLETE_URL}aq?query=${encodeURIComponent(query)}`
  const request = instance.get(requestURL)
  return {
    type: AUTO_COMPLETE,
    payload: request
  }
}

export const TOGGLE_UNIT = 'TOGGLE_UNIT'

export function toggleUnit(val) {
  console.log('toggle value', val)

  return {
    type: TOGGLE_UNIT,
    payload: {unit: val}
  }
}

export const TOGGLE_FAVORITE = 'TOGGLE_FAVORITE'

export function toggleFavorite(loc, val) {
  console.log('toggle location', loc)
  console.log('toggle value', val)

  return {
    type: TOGGLE_FAVORITE,
    payload: {favorite: val}
  }
}

export const TOGGLE_LOCATION_LIST = 'TOGGLE_LOCATION_LIST'

export function toggleLocationList(val) {
  console.log('isShowingList', val)

  return {
    type: TOGGLE_LOCATION_LIST,
    payload: {isShowingList: val}
  }
}

export const IS_LOADING = 'IS_LOADING'

export function loading(val) {
  //console.log('loading', val)

  return {
    type: IS_LOADING,
    payload: {isLoading: val}
  }
}

export const TOGGLE_MODAL_OPEN = 'TOGGLE_MODAL_OPEN'

export function toggleModal(content) {
  //console.log('toggle content', content)

  return {
    type: TOGGLE_MODAL_OPEN,
    payload: {content:content}
  }
}
<commit_msg>Changed api call from http to https<commit_after>import axios from 'axios'

const API_KEY = '<KEY>'
const API_URL = 'https://api.wunderground.com/api/'
const API_PARAMS = '/geolookup/hourly10day/forecast/astronomy/'
const AUTO_COMPLETE_URL = 'https://autocomplete.wunderground.com/'//http://autocomplete.wunderground.com/aq?query=san%20f

export const GET_WEATHER = 'GET_WEATHER'

export function getWeather(location) {
  let encodedLocation = encodeURIComponent(location)
  const requestURL = `${API_URL}${API_KEY}${API_PARAMS}/q/${encodedLocation}.json`
  const request = axios.get(requestURL)

  //console.log('request', request)

  return {
    type: GET_WEATHER,
    payload: request
  }
}

export const AUTO_COMPLETE = 'AUTO_COMPLETE'

export function autoComplete(query){
  const instance = axios.create({
    headers: {'Content-type':'application/json'},
    withCredentials: false
  })
  const requestURL = `${AUTO_COMPLETE_URL}aq?query=${encodeURIComponent(query)}`
  const request = instance.get(requestURL)
  return {
    type: AUTO_COMPLETE,
    payload: request
  }
}

export const TOGGLE_UNIT = 'TOGGLE_UNIT'

export function toggleUnit(val) {
  console.log('toggle value', val)

  return {
    type: TOGGLE_UNIT,
    payload: {unit: val}
  }
}

export const TOGGLE_FAVORITE = 'TOGGLE_FAVORITE'

export function toggleFavorite(loc, val) {
  console.log('toggle location', loc)
  console.log('toggle value', val)

  return {
    type: TOGGLE_FAVORITE,
    payload: {favorite: val}
  }
}

export const TOGGLE_LOCATION_LIST = 'TOGGLE_LOCATION_LIST'

export function toggleLocationList(val) {
  console.log('isShowingList', val)

  return {
    type: TOGGLE_LOCATION_LIST,
    payload: {isShowingList: val}
  }
}

export const IS_LOADING = 'IS_LOADING'

export function loading(val) {
  //console.log('loading', val)

  return {
    type: IS_LOADING,
    payload: {isLoading: val}
  }
}

export const TOGGLE_MODAL_OPEN = 'TOGGLE_MODAL_OPEN'

export function toggleModal(content) {
  //console.log('toggle content', content)

  return {
    type: TOGGLE_MODAL_OPEN,
    payload: {content:content}
  }
}

{'fraction_non_alphanumeric': 0.12184673964778676, 'fraction_numerical': 0.0019038553069966682, 'mean_word_length': 4.537549407114624, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3701797', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1484, 'n_words': 296}