<commit_before>import json
from glob import glob

ASSETS_URL="https://raw.githubusercontent.com/RealOrangeOne/hipchat-emoticons-for-all/master/assets/"


def get_icon_name(path):
    return get_filename(path).replace('.png', '').replace('.gif', '')

def get_filename(path):
    return path.replace('assets/', '')


files = glob('assets/*.png', 'assets/*.gif')
images = []

for filename in files:
    images.append({get_icon_name(filename): ASSETS_URL + get_filename(filename)})


image_decoder = {"images":images}

image_decoder_json = json.dumps(image_decoder, indent=2, sort_keys=True)

js_file = None
with open('src/injector.js', "r") as file:
    js_file = file.read()

js_file = js_file.replace("%image_decoder%", image_decoder_json)

with open('build/injector.js', 'w') as file:
    file.write(js_file)<commit_msg>Added gifs to build file<commit_after>import json
from glob import glob

ASSETS_URL="https://raw.githubusercontent.com/RealOrangeOne/hipchat-emoticons-for-all/master/assets/"


def get_icon_name(path):
    return get_filename(path).replace('.png', '').replace('.gif', '')

def get_filename(path):
    return path.replace('assets/', '')


files = glob('assets/*.png') + glob('assets/*.gif')
images = []

for filename in files:
    images.append({get_icon_name(filename): ASSETS_URL + get_filename(filename)})


image_decoder = {"images":images}

image_decoder_json = json.dumps(image_decoder, indent=2, sort_keys=True)

js_file = None
with open('src/injector.js', "r") as file:
    js_file = file.read()

js_file = js_file.replace("%image_decoder%", image_decoder_json)

with open('build/injector.js', 'w') as file:
    file.write(js_file)
{'fraction_non_alphanumeric': 0.16284680337756333, 'fraction_numerical': 0.0012062726176115801, 'mean_word_length': 5.48046875, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '622465', 'n_tokens_mistral': 588, 'n_tokens_neox': 564, 'n_words': 105}