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
| #!/bin/sh | |
| # This script is designed to monitor and control the fan speed in a server based on the temperature of the SAS2308 component. | |
| # The script achieves this by using IPMI (Intelligent Platform Management Interface) commands and the mpsutil utility. | |
| # Key features of the script include: | |
| # Continuously monitoring the temperature of the SAS2308 component. | |
| # Calculating the desired fan speed percentage based on the formula "3.8 * SAS_temperature - 128." | |
| # Adjusting the zone 1 fan speed based on the calculated percentage. | |
| # Logging temperature and fan speed data to a file named "check.log" in the script directory. |
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
| #!/bin/sh | |
| # Define the name of the chart and its type | |
| fan_chart="Devices.fanspeed" | |
| chart_type="line" | |
| # Define the SSH connection details | |
| IPMI_USER="ADMIN" | |
| IPMI_PASS="you pass word" | |
| IPMI_HOST="192.168.0.121" |
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
| #!/bin/sh | |
| # Define the name of the chart and its type | |
| temperature_chart="Devices.temperature" | |
| chart_type="line" | |
| # Define the SSH connection details | |
| ssh_user="root" | |
| ssh_host="192.168.0.108" | |
| ssh_key="/var/log/netdata/.ssh/id_rsa" |
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
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os/exec" | |
| "sync" | |
| "github.com/k0kubun/pp" | |
| ) |
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
| var myConfObj = { | |
| iframeMouseOver : false | |
| } | |
| window.addEventListener('blur',function(){ | |
| if(myConfObj.iframeMouseOver){ | |
| console.log('Wow! Iframe Click!'); | |
| } | |
| }); | |
| document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){ |
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 pandas as pd | |
| from pyspark.sql import DataFrame as SparkDataFrame | |
| from typing import Optional | |
| def _map_to_pandas(rdds): | |
| """Converts each partition of the RDD to a Pandas DataFrame.""" | |
| return [pd.DataFrame(list(rdds))] | |
| def toPandas(df: SparkDataFrame, n_partitions: Optional[int] = None) -> pd.DataFrame: | |
| """ |