Skip to content

Instantly share code, notes, and snippets.

View nb312's full-sized avatar
🥦
make flutter tutotial

niebin nb312

🥦
make flutter tutotial
View GitHub Profile
@nb312
nb312 / gan_example.py
Last active May 5, 2023 00:42
GAN的一个简单 例子
import numpy as np
import keras
from keras.models import Sequential, Model
from keras.layers import Dense, Input, LeakyReLU, Dropout
from keras.optimizers import Adam
# 超参数设置
latent_dim = 100
img_shape = (28, 28, 1)
from tensorflow import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
# 加载数据集并预处理
(x_train, y_train), (x_test, y_test) = mnist.load_data()
try {
InitializeSdk();
string acessKey = "LTAI4FdgRS23ETv1LfqSsyVS";
string secret = "LNJGNlhmp9B7oE090cydWPuGGiczMQ";
string endpoint = "oss-cn-shanghai.aliyuncs.com";
string bucket = "room-20211208";
FString filePath = FPaths::ProjectContentDir();
string path(TCHAR_TO_UTF8(*filePath));
ClientConfiguration conf;
@nb312
nb312 / win32_proj.cpp
Last active February 11, 2021 04:01
win32_proj.cpp
// WindowsProject3.cpp : 定义应用程序的入口点。
//
#include "framework.h"
#include "WindowsProject3.h"
#define MAX_LOADSTRING 100
// 全局变量:
HINSTANCE hInst; // 当前实例
Widget _snackDuration() => SnackBar(
content: Text(
"You have a message!",
style: TextStyle(
color: TEXT_BLACK,
fontSize: 20,
),
textAlign: TextAlign.center,
),
backgroundColor: BLUE_LIGHT,
I/flutter ( 4202): I know you are testing the action in the SnackBar!
final bar = _snackAction();
_key.currentState.showSnackBar(bar);
Widget _snackAction() => SnackBar(
content: Text(
"Test the action in the SnackBar.",
style: TextStyle(
color: TEXT_BLACK,
fontSize: 20,
),
textAlign: TextAlign.center,
),
action: SnackBarAction(
SnackBarAction({
Key key,
this.textColor,
this.disabledTextColor,
@required this.label,
@required this.onPressed,
})
final SnackBarAction action;