Skip to content

Instantly share code, notes, and snippets.

View photodude's full-sized avatar
😫
I may be extremely slow to respond.

Walt Sorensen photodude

😫
I may be extremely slow to respond.
View GitHub Profile
@photodude
photodude / convert.py
Last active January 15, 2022 23:52
std_deviation with warning
import numpy
import math
class valueConverter:
@staticmethod
def std_deviation(Values, format=True):
result = numpy.std(Values)
average = numpy.mean(Values)
for value in Values:
if not math.isclose(value, average, abs_tol=0.1): # individual numbers should differ by less than 0.1 from any other number
if format:
; This is a bad ini file
YES="wrong"
NO="wrong"
NULL="wrong"
FALSE="wrong"
GOOD="right"
ON="wrong"
OFF="wrong"
NONE="wrong"