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
#!/usr/bin/env python3 | |
import gradio as gr | |
import whisper | |
from datetime import datetime | |
last_model_name = "small" | |
model = whisper.load_model(last_model_name) | |
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
// 0.8822016520425677 | |
std::string _create_random() | |
{ | |
static default_random_engine random; | |
uniform_real_distribution<double> dis(0.0, 1.0); | |
uniform_int_distribution<int> dis2(100000000, 999999999); | |
return fmt::format("{}{}", dis(random), dis2(random)); | |
} |
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
// 百度开灯问题 | |
void light() { | |
vector<bool> vec(100, true); | |
for (int i=1; i<101; ++i) { | |
for (int j=0; j<vec.size(); j=j+i+1) { | |
vec[j] = !vec[j]; | |
} | |
} |
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
string pHashValue(Mat &src) { | |
// gray | |
assert(src.channels() == 1); | |
string hash(64, '\0'); | |
Mat img, dst; | |
resize(src, img, Size(32, 32)); | |
img = Mat_<double>(img); |