MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _sensing_unit_state

Function _sensing_unit_state

webapp_modern.py:1608–1621  ·  view source on GitHub ↗

Return (installed, active) for the bundled sensing service.

()

Source from the content-addressed store, hash-verified

1606 return False
1607
1608
1609def _gf_std(arr):
1610 n = len(arr)
1611 if n < 2:
1612 return 0.0
1613 m = sum(arr) / n
1614 return math.sqrt(sum((x - m) ** 2 for x in arr) / n)
1615
1616
1617def _gf_convex_hull(pts):
1618 """Andrew's monotone chain. pts=[{'x','y','id'}] -> ordered ring."""
1619 p = sorted(pts, key=lambda q: (q['x'], q['y']))
1620 if len(p) < 3:
1621 return p
1622 def cross(o, a, b):
1623 return (a['x']-o['x'])*(b['y']-o['y']) - (a['y']-o['y'])*(b['x']-o['x'])
1624 lower = []

Callers 2

sensing_statusFunction · 0.85
sensing_install_logFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected