<commit_before>package ut

// Any takes a slice and a func. If the func ever returns true Any will
// return true
//
//      s := []int{1,2,3,4,5,6,7}
//      ut.Any(s, func(i interface{}) bool {
//          return i.(int) > 3
//      }) // true
//
func Any(s interface{}, f func(interface{}) bool) bool {
	for _, obj := range s.([]interface{}) {
		if f(obj) {
			return true
		}
	}
	return false
}

// Contains checks a slice to see if an object exists inside of it
//
//      s := []string{"hello","world"}
//      if ut.Contains(s, "hello") {
//  			print("yup it's there")
//      }
//
// Note the slice can be of any type
//
//     s := []interface{}{"hello","world", 1000}
//     if ut.Contains(s, 1000) {
//  	    print("yup it's there")
//     }
func Contains(s interface{}, o interface{}) bool {
	for _, obj := range s.([]interface{}) {
		if obj == o {
			return true
		}
	}
	return false
}

func Pluck(s []map[string]interface{}, str string) []interface{} {
	var returned []interface{}

	for _, mp := range s {
		o := mp[str]
		if o != nil {
			returned = append(returned, o)
		}
	}

	return returned
}

func SlicesEqual(a interface{}, b interface{}) bool {
	if len(a.([]interface{})) != len(b.([]interface{})) {
		return false
	}
	for i, v := range a.([]interface{}) {
		if v != b.([]interface{})[i] {
			return false
		}
	}
	return true
}
<commit_msg>updating<commit_after>package ut

// Any takes a slice and a func. If the func ever returns true Any will
// return true
//
//      s := []int{1,2,3,4,5,6,7}
//      ut.Any(s, func(i interface{}) bool {
//          return i.(int) > 3
//      }) // true
//
func Any(s interface{}, f func(interface{}) bool) bool {
	for _, obj := range s.([]interface{}) {
		if f(obj) {
			return true
		}
	}
	return false
}

// Contains checks a slice to see if an object exists inside of it. Note the
// slice can be of any type
//
//      s := []string{"hello","world"}
//      ut.Contains(s, "hello") // true
//      s = []interface{}{"hello","world", 1000}
//      if ut.Contains(s, 1000) // true
//
func Contains(s interface{}, o interface{}) bool {
	for _, obj := range s.([]interface{}) {
		if obj == o {
			return true
		}
	}
	return false
}

func Pluck(s []map[string]interface{}, str string) []interface{} {
	var returned []interface{}

	for _, mp := range s {
		o := mp[str]
		if o != nil {
			returned = append(returned, o)
		}
	}

	return returned
}

func SlicesEqual(a interface{}, b interface{}) bool {
	if len(a.([]interface{})) != len(b.([]interface{})) {
		return false
	}
	for i, v := range a.([]interface{}) {
		if v != b.([]interface{})[i] {
			return false
		}
	}
	return true
}

{'fraction_non_alphanumeric': 0.1942554799697657, 'fraction_numerical': 0.012093726379440665, 'mean_word_length': 2.572199730094467, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1380595', 'n_tokens_mistral': 987, 'n_tokens_neox': 925, 'n_words': 289}