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 cv2 | |
| import torch | |
| from torch import nn, optim | |
| from torch.utils.data import DataLoader | |
| from torchvision import transforms, datasets | |
| transform = transforms.Compose([ | |
| transforms.RandomRotation(10), # 随机旋转±10度 | |
| transforms.RandomAffine(0, translate=(0.1, 0.1)), # 随机平移10% | |
| transforms.ToTensor(), |
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
| // ==UserScript== | |
| // @name GLM Coding Rush - 智谱编程助手抢购脚本 | |
| // @namespace https://gist.github.com/LessUp | |
| // @version 1.1.0 | |
| // @description 智谱 GLM Coding 一键抢购脚本 — 自动解锁售罄按钮 / 高速重试引擎 / bizId 双重校验 / 错误弹窗自动恢复 / 支付弹窗保护 / 秒级定时触发 / 可拖拽浮动面板 | |
| // @author LessUp | |
| // @match *://www.bigmodel.cn/* | |
| // @match https://bigmodel.cn/glm-coding* | |
| // @run-at document-start | |
| // @grant none |
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 <stdio.h> | |
| #include <string.h> | |
| #include <string> | |
| using namespace std; | |
| const char *strtok_p(const char *p, const char delim, const char **pos) { | |
| // 分割结束 | |
| if (*p == '\0') { | |
| return nullptr; |
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 <string> | |
| #include <vector> | |
| #include <iostream> | |
| using namespace std; | |
| void split(const string &s, vector<string> &tokens, const string &delimiters = " ") { | |
| string::size_type lastPos = s.find_first_not_of(delimiters, 0); | |
| string::size_type pos = s.find_first_of(delimiters, lastPos); | |
| while (string::npos != pos || string::npos != lastPos) { |
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 <iostream> | |
| #include <filesystem> | |
| using namespace std; | |
| namespace fs = std::filesystem; | |
| int main() { | |
| std::cout << "Current working directory: " << fs::current_path() << '\n'; | |
| return 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
| #include <queue> | |
| #include <mutex> | |
| #include <condition_variable> | |
| using namespace std; | |
| class MyQueue { | |
| private: | |
| mutex mut; | |
| condition_variable cond; |