<commit_before>module Lib
    ( someFunc
    ) where

import Criterion.Main.Options
import Criterion.Main
import Quicksort
import MergeSort
import Regression

someFunc :: IO ()
someFunc =  defaultMain [
  bench "quicksort 1000" $ nf quicksort [(1::Int)..1000],
  bench "mergeSort 1000" $ nf mergeSort [(1::Int)..1000],
  bench "Linear Regression 10000 steps" $ nf (regress [(1::Double)..10]) [(11::Double)..20]
  ]<commit_msg>Added reading file in haskel lib.hs<commit_after>module Lib
    ( someFunc
    ) where

import Criterion.Main.Options
import Criterion.Main
import Quicksort
import MergeSort
import Regression

someFunc :: IO ()
someFunc =  do
  contentNumber10k <- readFile "Csrc/data/NumbersToSort10k.txt"
  let numbersToSort  = map readInt . words $ contentNumber10k
  defaultMain [
      bench "quicksort 10000" $ nf quicksort numbersToSort,
      bench "mergeSort 10000" $ nf mergeSort numbersToSort,
      bench "Linear Regression 10000 steps" $ nf (regress [(1::Double)..10]) [(11::Double)..20]
    ]


readInt :: String -> Int
readInt = read
{'fraction_non_alphanumeric': 0.11352885525070956, 'fraction_numerical': 0.05487228003784295, 'mean_word_length': 4.038095238095238, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6757449', 'n_tokens_mistral': 392, 'n_tokens_neox': 340, 'n_words': 98}