Skip to content

Instantly share code, notes, and snippets.

View maxwang967's full-sized avatar
🎯
Focusing

maxwang967 maxwang967

🎯
Focusing
  • The Institute of Computing Technology of the Chinese Academy of Sciences
  • Beijing, China
  • 12:34 (UTC +08:00)
View GitHub Profile
# -*- coding: utf-8 -*-
# @Time : 2019/12/31 5:16 PM
# @Author : morningstarwang
# @FileName: graph_convolution.py
# @Blog: wangchenxing.com
from tensorflow.keras import layers
import tensorflow as tf
class GraphConvolutionLayer(layers.Layer):
@maxwang967
maxwang967 / user_home_page.dart
Created March 20, 2020 02:01
user_home_page
import 'package:campus_benefit_app/ui/icons/FineritIcons.dart';
import 'package:campus_benefit_app/ui/icons/finerit_color.dart';
import 'package:campus_benefit_app/ui/icons/icons_route3.dart';
import 'package:campus_benefit_app/ui/icons/icons_route4.dart';
import 'package:campus_benefit_app/ui/pages/course/course_home_page.dart';
import 'package:flutter/material.dart';
class UserHomePage extends StatefulWidget {
@override
import numpy as np
from keras import backend as K
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.preprocessing.image import ImageDataGenerator
from sklearn.metrics import classification_report, confusion_matrix
#Start
train_data_path = 'F://data//Train'
@maxwang967
maxwang967 / main.dart
Created December 15, 2018 13:58
Dart Tutorials Functional Programing
String scream(int length) => "A${'a' * length}h!";
main(){
final values = [1, 2, 3, 5, 10, 50];
// for (var length in values){
// print(scream(length));
// }
values.skip(1).take(3).map(scream).forEach(print);
}
@maxwang967
maxwang967 / main.dart
Created December 15, 2018 13:47
Dart Tutorials Interface
import 'dart:math';
Shape shapeFactory(String type) {
if (type == 'circle') return Circle(2);
if (type == 'square') return Square(2);
throw 'Can\'t create $type';
}
abstract class Shape {
factory Shape(String type) {
@maxwang967
maxwang967 / main.dart
Created December 15, 2018 13:44
Dart Tutorials Factory
import 'dart:math';
Shape shapeFactory(String type) {
if (type == 'circle') return Circle(2);
if (type == 'square') return Square(2);
throw 'Can\'t create $type';
}
abstract class Shape {
factory Shape(String type) {
@maxwang967
maxwang967 / main.dart
Created December 15, 2018 13:36
Dart Tutorials Rectangle
import 'dart:math';
class Rectangle {
int width;
int height;
Point origin;
Rectangle({this.origin = const Point(0, 0), this.width = 0, this.height = 0});
@override
String toString() =>
@maxwang967
maxwang967 / main.dart
Last active December 15, 2018 13:46
Dart Tutorials Bicycle
class Bicycle{
int cadence;
int _speed = 0;
int gear;
Bicycle(this.cadence, this.gear);
int get speed => _speed;
@override
String toString() => 'Bicycle: $_speed mph';
void applyBrake(int decrement){