<commit_before>#!/usr/bin/env pyhon3
import os
import shutil
import urllib.request

# the list comes from
# https://evert.meulie.net/faqwd/complete-list-anonymous-animals-on-google-drive-docs-sheets-slides/
iconList = ('Alligator', 'Anteater', 'Armadillo', 'Auroch', 'Axolotl',
            'Badger', 'Bat', 'Beaver', 'Buffalo', 'Camel', 'Capybara',
            'Chameleon', 'Cheetah', 'Chinchilla', 'Chipmunk', 'Chupacabra',
            'Cormorant', 'Coyote', 'Crow', 'Dingo', 'Dinosaur', 'Dolphin',
            'Duck', 'Elephant', 'Ferret', 'Fox', 'Frog', 'Giraffe', 'Gopher',
            'Grizzly', 'Hedgehog', 'Hippo', 'Hyena', 'Ibex', 'Ifrit', 'Iguana',
            'Jackal', 'Kangaroo', 'Koala', 'Kraken', 'Lemur', 'Leopard',
            'Liger', 'Llama', 'Manatee', 'Mink', 'Monkey', 'Moose', 'Narwhal',
            'NyanCat', 'Orangutan', 'Otter', 'Panda', 'Penguin', 'Platypus',
            'Pumpkin', 'Python', 'Quagga', 'Rabbit', 'Raccoon', 'Rhino',
            'Sheep', 'Shrew', 'Skunk', 'Squirrel', 'Tiger', 'Turtle', 'Walrus',
            'Wolf', 'Wolverine', 'Wombat')

dirname = 'icons'
if os.path.exists(dirname):
    shutil.rmtree(dirname)
os.makedirs(dirname)

html_icon_list = ''

for index, icon in enumerate(iconList):
    icon = icon.lower()
    filename = dirname + '/' + icon + '.png'
    url = 'https://ssl.gstatic.com/docs/common/profile/' + icon + '_lg.png'
    print('#%s\tfetching %s' % (index, url))
    try:
        html_icon_list = html_icon_list + '<li class="animal-item"><img src="icons/' + filename + '" alt="' + icon + '"></li>\n'
        urllib.request.urlretrieve(url, filename)
    except Exception:
        print('#%s\tfailed %s' % (index, url))

html_wrapper = """
<!DOCTYPE html>
<html lang="en">
    <head><commit_msg>fix icons path in html<commit_after>#!/usr/bin/env pyhon3
import os
import shutil
import urllib.request

# the list comes from
# https://evert.meulie.net/faqwd/complete-list-anonymous-animals-on-google-drive-docs-sheets-slides/
iconList = ('Alligator', 'Anteater', 'Armadillo', 'Auroch', 'Axolotl',
            'Badger', 'Bat', 'Beaver', 'Buffalo', 'Camel', 'Capybara',
            'Chameleon', 'Cheetah', 'Chinchilla', 'Chipmunk', 'Chupacabra',
            'Cormorant', 'Coyote', 'Crow', 'Dingo', 'Dinosaur', 'Dolphin',
            'Duck', 'Elephant', 'Ferret', 'Fox', 'Frog', 'Giraffe', 'Gopher',
            'Grizzly', 'Hedgehog', 'Hippo', 'Hyena', 'Ibex', 'Ifrit', 'Iguana',
            'Jackal', 'Kangaroo', 'Koala', 'Kraken', 'Lemur', 'Leopard',
            'Liger', 'Llama', 'Manatee', 'Mink', 'Monkey', 'Moose', 'Narwhal',
            'NyanCat', 'Orangutan', 'Otter', 'Panda', 'Penguin', 'Platypus',
            'Pumpkin', 'Python', 'Quagga', 'Rabbit', 'Raccoon', 'Rhino',
            'Sheep', 'Shrew', 'Skunk', 'Squirrel', 'Tiger', 'Turtle', 'Walrus',
            'Wolf', 'Wolverine', 'Wombat')

dirname = 'icons'
if os.path.exists(dirname):
    shutil.rmtree(dirname)
os.makedirs(dirname)

html_icon_list = ''

for index, icon in enumerate(iconList):
    icon = icon.lower()
    filename = dirname + '/' + icon + '.png'
    url = 'https://ssl.gstatic.com/docs/common/profile/' + icon + '_lg.png'
    print('#%s\tfetching %s' % (index, url))
    try:
        html_icon_list = html_icon_list + '<li class="animal-item"><img src="' + filename + '" alt="' + icon + '"></li>\n'
        urllib.request.urlretrieve(url, filename)
    except Exception:
        print('#%s\tfailed %s' % (index, url))

html_wrapper = """
<!DOCTYPE html>
<html lang="en">
    <head>
{'fraction_non_alphanumeric': 0.21009356393535583, 'fraction_numerical': 0.0005670541536716756, 'mean_word_length': 3.4210526315789473, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, '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': '2534101', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1329, 'n_words': 273}