<commit_before>class matrix:

  def __init__(self, values):
    self.values = values
  
  #takes two arguments row and column and return the element in row
  #row and column column
  def element(self, row, column):
    return self.values[row - 1][column - 1]
  
  #takes two matrices A and B as arguments and returns AB. Overrides the * operator
  def __mul__(self, other):
    new_matrix = []
    for i, row in enumerate(self.values):
      new_row = []
      for j, element in enumerate(row):
         new_row.append(element*other.values[j][i])
      new_matrix.append(new_row)
    return matrix(new_matrix)
      
  
  def __str__(self):
    return str(self.values)
  
  
  
  
    
hoi = matrix([[1, 2], [3, 4]])
doei = matrix([[1, 0], [0, 1]])

print(hoi*doei)
<commit_msg>vermenigvuldigen<commit_after>class matrix:

  def __init__(self, values):
    self.values = values
  
  #takes two arguments row and column and return the element in row
  #row and column column
  def element(self, row, column):
    return self.values[row - 1][column - 1]
  
  #takes two matrices A and B as arguments and returns AB. Overrides the * operator
  def __mul__(self, other):
    new_matrix = []
    for i, row in enumerate(self.values):
      new_row = []
      for k in range(len(other.values[0])):
        counter = 0
        for j, element in enumerate(row):
          counter += element*other.values[j][k]
        new_row.append(counter)
      new_matrix.append(new_row)  
    return matrix(new_matrix)
      
  
  def __str__(self):
    return str(self.values)
  
  
  
  
    
hoi = matrix([[1, 2], [3, 4]])
doei = matrix([[1, 1], [1, 1]])

print(hoi*doei)

{'fraction_non_alphanumeric': 0.1190332326283988, 'fraction_numerical': 0.013293051359516616, 'mean_word_length': 2.789473684210526, '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': '2735663', 'n_tokens_mistral': 579, 'n_tokens_neox': 565, 'n_words': 166}