This file contains 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
object CoffeePot extends App { | |
ComponentRegistry.coffeeWarmer.trigger | |
} | |
trait OnOffDevice { | |
def on: Unit | |
def off: Unit | |
} | |
trait SensorDevice { |
This file contains 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
#!/bin/bash | |
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed | |
# | |
# Description: A script to control GPU fan speed on headless (non-X) linux nodes | |
# Original Script by Axel Kohlmeyer <[email protected]> | |
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness | |
# | |
# Modified for newer drivers and removed old work-arounds |
This file contains 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
[Unit] | |
Description=nvidia smi epxorter | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/local/bin/nvidia-smi-exporter | |
[Install] | |
WantedBy=multi-user.target |
This file contains 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 java.time.{DayOfWeek, LocalDate} | |
object DateUtil { | |
@inline private def isWeekend(d: LocalDate): Boolean = { | |
d.getDayOfWeek == DayOfWeek.SATURDAY || d.getDayOfWeek == DayOfWeek.SUNDAY | |
} | |
def businessDayStream(from: LocalDate, to: LocalDate): Stream[LocalDate] = { | |
Stream.iterate(from)(_.plusDays(1)).filterNot(isWeekend).takeWhile(_.isBefore(to)) |
OlderNewer