<commit_before>#!/usr/bin/env bash

PICTURE_DIR="$HOME/Pictures/Bing"

mkdir -p $PICTURE_DIR

urls=( $(curl -s http://www.bing.com 2>/dev/null | \
  grep -Eo "url:'.*?'" | \
  sed -e "s/url:'\([^']*\)'.*/http:\/\/bing.com\1/" | \
  sed -e "s/\\\//g") )

for p in ${urls[@]}; do
  filename=$(echo $p|sed -e "s/.*\/\(.*\)/\1/")
  fullpath=$PICTURE_DIR/$filename
  if [ ! -f "${fullpath}" ]; then
    curl -s -Lo "$fullpath" $p
    /usr/bin/osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$fullpath\""
  fi
done<commit_msg>silence failure messages<commit_after>#!/usr/bin/env bash

PICTURE_DIR="$HOME/Pictures/Bing"

mkdir -p $PICTURE_DIR

urls=( $(curl -s http://www.bing.com 2>/dev/null | \
  grep -Eo "url:'.*?'" | \
  sed -e "s/url:'\([^']*\)'.*/http:\/\/bing.com\1/" | \
  sed -e "s/\\\//g") )

for p in ${urls[@]}; do
  filename=$(echo $p|sed -e "s/.*\/\(.*\)/\1/")
  fullpath=$PICTURE_DIR/$filename
  if [ ! -f "${fullpath}" ]; then
    curl -s -Lo "$fullpath" $p
    /usr/bin/osascript -e \
      "tell application \"Finder\" to set desktop picture to POSIX file \"$fullpath\"" \
      >/dev/null 2>&1
  fi
done
{'fraction_non_alphanumeric': 0.2619669277632724, 'fraction_numerical': 0.006962576153176675, 'mean_word_length': 2.5603715170278636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7518185', 'n_tokens_mistral': 503, 'n_tokens_neox': 488, 'n_words': 111}