<commit_before>module SearchHelper


#Converts the nasty JSON Date format to something useful
def convertJsonDate(jsonDate)
 Time.at((jsonDate.gsub(/\D/, "").to_i - 200) /10000000).strftime("%F")
end


#1. Generate a URL with credentials and load and forward image from API (Nasty)
#2. Load the image to a local image store and reload it from local? 
#   Images are always the same, so caching is OK for classicons (not neccesarly Thumbnails, these can change over time)

def classImage(elementKey)
 baseURL = "https://api.keytech.de"
 resouerceURl = "/smallclassimage/"
 classKey =   elementKey.split(':')[0]

#Auth ? 
# By header ? 
# Hide the API source of the image!

 "<img src='#{baseURL}#{resouerceURl}#{classKey}' width='30' heigth='30'>"
end



end<commit_msg>Element image is loaded with credentials<commit_after>module SearchHelper


#Converts the nasty JSON Date format to something useful
def convertJsonDate(jsonDate)
 Time.at((jsonDate.gsub(/\D/, "").to_i - 200) /10000000).strftime("%F")
end


#1. Generate a URL with credentials and load and forward image from API (Nasty)
#2. Load the image to a local image store and reload it from local? 
#   Images are always the same, so caching is OK for classicons (not neccesarly Thumbnails, these can change over time)

def classImage(elementKey)



 baseURL = "https://#{session[:user]}:#{session[:password]}@api.keytech.de"
 resouerceURl = "/smallclassimage/"
 classKey =   elementKey.split(':')[0]

#Auth ? 
# By header ? 
# Hide the API source of the image!

 "<img src='#{baseURL}#{resouerceURl}#{classKey}' width='30' heigth='30'>"
end



end
{'fraction_non_alphanumeric': 0.12437810945273632, 'fraction_numerical': 0.022388059701492536, 'mean_word_length': 4.6855123674911665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1039919', 'n_tokens_mistral': 559, 'n_tokens_neox': 519, 'n_words': 182}