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 ( | |
| "context" | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| ctx := context.Background() |
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
| #include<cstdio> | |
| #include<cstring> | |
| #include<algorithm> | |
| #include<iostream> | |
| #include<queue> | |
| #include<cmath> | |
| #include<map> | |
| #include<stack> | |
| #include<set> | |
| #include<bitset> |
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
| def load_data(filename, max_features): | |
| with open(filename, "r") as file: | |
| lines = file.readlines() | |
| for line in lines: | |
| # 最后会有一个空格 | |
| features = line.split(" ")[1:-1] | |
| for feature in features: | |
| feature = feature.split(":")[0] |
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
| void | |
| cpu_util(double pcpu[3]) | |
| { | |
| static struct iperf_time last; | |
| static clock_t clast; | |
| static struct rusage rlast; | |
| struct iperf_time now, temp_time; | |
| clock_t ctemp; | |
| struct rusage rtemp; | |
| double timediff; |