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 | |
# Main loop to continuously monitor the temperature | |
while true; do | |
clear | |
echo "Monitoring Coral PCIe Accelerators Temperature" | |
# Dynamically find all apex devices and read their temperatures | |
for device_path in /sys/class/apex/apex_*; do | |
if [ -f "$device_path/temp" ]; then |
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
<?php | |
error_reporting(E_ALL); | |
/* Data can be send to coroutines using `$coroutine->send($data)`. The sent data will then | |
* be the result of the `yield` expression. Thus it can be received using a code like | |
* `$data = yield;`. | |
*/ | |
/* What we're building in this script is a coroutine-based streaming XML parser. The PHP |