Fix: Ensure all skills are tracked as files, not submodules
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# HumanEval/4
|
||||
# Loki Mode Multi-Agent Solution
|
||||
# Attempts: 1
|
||||
# Passed: True
|
||||
|
||||
from typing import List
|
||||
|
||||
|
||||
def mean_absolute_deviation(numbers: List[float]) -> float:
|
||||
""" For a given list of input numbers, calculate Mean Absolute Deviation
|
||||
around the mean of this dataset.
|
||||
Mean Absolute Deviation is the average absolute difference between each
|
||||
element and a centerpoint (mean in this case):
|
||||
MAD = average | x - x_mean |
|
||||
>>> mean_absolute_deviation([1.0, 2.0, 3.0, 4.0])
|
||||
1.0
|
||||
"""
|
||||
if not numbers:
|
||||
return 0.0
|
||||
|
||||
mean = sum(numbers) / len(numbers)
|
||||
absolute_deviations = [abs(x - mean) for x in numbers]
|
||||
return sum(absolute_deviations) / len(absolute_deviations)
|
||||
Reference in New Issue
Block a user