Skip to content

Instantly share code, notes, and snippets.

@ruihe774
ruihe774 / power-plan-auto-switcher.rs
Created November 20, 2023 06:13
Automatically switch power plan
use std::char::decode_utf16;
use std::collections::BTreeSet;
use std::ffi::c_void;
use std::mem::{self, ManuallyDrop};
use std::sync::mpsc::{channel, Receiver, RecvTimeoutError, Sender};
use std::sync::OnceLock;
use std::thread;
use std::time::Duration;
use windows::core::{Error, Interface, Result, GUID};
@ruihe774
ruihe774 / myguesslang_convert.py
Last active March 1, 2024 18:48
Convert guesslang model to onnx
# %%
import tensorflow as tf
tf.config.set_visible_devices([], 'GPU')
# %%
model = tf.saved_model.load("model")
predict = model.signatures["predict"]
# %%
class HyperParameter: