This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // brain of the whole thing. hard work is done here | |
| const mapNumber = (number, in_min, in_max, out_min, out_max) => { | |
| var rangeCalculation = (number - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
| return Math.round(rangeCalculation); | |
| }; | |
| // Create an empty array to store the messages | |
| var messages = []; | |
| // Loop through the rooms in msg.lightControl because we know only rooms and devices are children of lightcontrol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import subprocess | |
| from typing import List | |
| def get_conda_envs() -> List[str]: | |
| """ | |
| Get a list of conda environments and return their names. | |
| """ | |
| # Execute the `conda env list` command and capture its output |