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 <ESP8266WiFi.h> | |
| #include <Wire.h> | |
| const int MPU_addr = 0x68; // I2C address of the MPU-6050 | |
| int16_t AcX, AcY, AcZ, Tmp, GyX, GyY, GyZ; | |
| float ax = 0, ay = 0, az = 0, gx = 0, gy = 0, gz = 0; | |
| boolean fall = false; // stores if a fall has occurred | |
| boolean trigger1 = false; // stores if first trigger (lower threshold) has occurred | |
| boolean trigger2 = false; // stores if second trigger (upper threshold) has occurred | |
| boolean trigger3 = false; // stores if third trigger (orientation change) has occurred | |
| byte trigger1count = 0; // stores the counts past since trigger 1 was set true |
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 ping = require("ping"); | |
| for (let i = 1; i < 256; i++) { | |
| let host = `172.23.156.${i}`; | |
| ping.sys.probe(host, function (isAlive) { | |
| isAlive ? console.log(`host ${host} is alive`) : ""; | |
| }); | |
| } |
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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.8.0; | |
| /** | |
| * @title Storage | |
| * @dev Store & retrieve value in a variable | |
| */ | |
| contract Storage { |
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
| bytecode2opcode(bytecode): | |
| # Decompile bytecode | |
| opl = mythril.disassembler.asm.disassemble(bytearray.fromhex(bytes)) | |
| # Append opcodes | |
| opcode = '' | |
| for op in opl: | |
| opcode += op['opcode'] + ' ' | |
| # Remove useless whitespace |
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
| Performance Metrics for SMOTETomek LSTM models. | |
| ************************************************************ | |
| Error Label 1 | |
| ************************************************************ | |
| Total Positive Samples: 335 | |
| Total Negative Samples: 5883 | |
| Accuracy: 0.983757 | |
| Precision: 0.875000 | |
| Recall: 0.814925 | |
| F1 score: 0.843895 |
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 split_label_binarizer(data_frame): | |
| # Change 'label' to whatever naming used in the original DataFrame. | |
| cl = [] | |
| for index in data_frame.index: | |
| temp = data_frame['label'][index] | |
| temp = [int(i) for i in temp] | |
| cl.append(temp) | |
| data_frame['lca'] = cl | |
| return data_frame |
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
| { | |
| "Raw": "MIIClDCCAjugAwIBAgIUBYm/l7U+6lmN5Ej47oGc7L1w/9UwCgYIKoZIzj0EAwIweTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHDAaBgNVBAoTE2NpdGl6ZW4udmVoaWNsZS5jb20xHzAdBgNVBAMTFmNhLmNpdGl6ZW4udmVoaWNsZS5jb20wHhcNMjAwNzIxMTYwNTAwWhcNMjEwNzIxMTYxMDAwWjBCMTAwDQYDVQQLEwZjbGllbnQwCwYDVQQLEwRvcmcxMBIGA1UECxMLZGVwYXJ0bWVudDExDjAMBgNVBAMTBXVzZXIxMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqczToVyMOxcJw0fgZ2vL0j+2XzXCHMHhCLg70Lgllm5+QYoQCnZnLacN0cXE4+AuJG0kbbYgdsij+CkYd28BSqOB1zCB1DAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUgKl6P1KVEl3yJzgPVl5nfXDZL4IwKwYDVR0jBCQwIoAg+thpkSvHPfKxRWqcDpkR8m800rA7DLHgHDVjN8Wuu+YwaAYIKgMEBQYHCAEEXHsiYXR0cnMiOnsiaGYuQWZmaWxpYXRpb24iOiJvcmcxLmRlcGFydG1lbnQxIiwiaGYuRW5yb2xsbWVudElEIjoidXNlcjEiLCJoZi5UeXBlIjoiY2xpZW50In19MAoGCCqGSM49BAMCA0cAMEQCICOL0Fx3jTB8Sl9+lBCfL16eWpavKVsyptMEpG4IQ51lAiBltV6WVhR3xhWsEDTqq+UP/Fs9ERwx7QZS6LiMv6lTOg==", | |
| "RawTBSCertificate": "MIICO6ADAgECAhQFib+XtT7qWY3kSPjugZzsvXD/1TAKBggqhkjOPQQDAjB5MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Blockchain Explorer</title> | |
| <!-- Bootstrap --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
| <!-- Styles --> |
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
| public static void Main(string[] args) | |
| { | |
| Double CPUtprt = 0; | |
| System.Management.ManagementObjectSearcher mos = new System.Management.ManagementObjectSearcher(@"root\WMI", "Select * From MSAcpi_ThermalZoneTemperature"); | |
| foreach (System.Management.ManagementObject mo in mos.Get()) | |
| { | |
| CPUtprt = Convert.ToDouble(Convert.ToDouble(mo.GetPropertyValue("CurrentTemperature").ToString()) - 2732) / 10; | |
| Console.WriteLine("CPU temp : " + CPUtprt.ToString() + " °C"); | |
| } | |
| Console.ReadKey(); |