<commit_before>#	clusteringTest20140710.py
#1.	~ 40 as thresholad
#2.	k-means clustering

from armor.initialise import *
from scipy.ndimage import morphology as mor
from armor.geometry import morphology as morph


def getTimeString():
    return str(time.time())


outputFolder = 'testing/'


m   = march('0312.2130')[0].load()

##############################
"""
m.show()
m.backupMatrix(0)
m.drawCoast()
m.saveImage()
m.restoreMatrix(0)
"""
##################################

"""
res = {}
for threshold in [20, 25, 30,35,40,45,50]:
    m1 = m.threshold(threshold)
    #m1.show()
    for k in [10, 20]:
        m1.saveImage(outputFolder+ timeString() + m1.name + ".png")
        x = m.getKmeans(k =k, threshold = threshold)
        x['pattern'].saveImage(outputFolder+ getTimeString() + m.name + "threshold%d_clusters%d.png" % (threshold,k))
        res[(threshold, k)] = x['pattern']

"""
#########################################

threshold = 40
k =  10<commit_msg>test:  user name<commit_after>#	clusteringTest20140710.py
#1.	~ 40 as thresholad
#2.	k-means clustering

from armor.initialise import *
from scipy.ndimage import morphology as mor
from armor.geometry import morphology as morph

def getTimeString():
    return str(time.time())

outputFolder = 'testing/'

m   = march('0312.2130')[0].load()

##############################
"""
m.show()
m.backupMatrix(0)
m.drawCoast()
m.saveImage()
m.restoreMatrix(0)
"""
##################################

"""
res = {}
for threshold in [20, 25, 30,35,40,45,50]:
    m1 = m.threshold(threshold)
    #m1.show()
    for k in [10, 20]:
        m1.saveImage(outputFolder+ timeString() + m1.name + ".png")
        x = m.getKmeans(k =k, threshold = threshold)
        x['pattern'].saveImage(outputFolder+ getTimeString() + m.name + "threshold%d_clusters%d.png" % (threshold,k))
        res[(threshold, k)] = x['pattern']

"""
#########################################

threshold = 40
k =  10
{'fraction_non_alphanumeric': 0.2556818181818182, 'fraction_numerical': 0.0506198347107438, 'mean_word_length': 4.277929155313352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6178652', 'n_tokens_mistral': 724, 'n_tokens_neox': 652, 'n_words': 147}