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
# -*- 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): |
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
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 |
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
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' |
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 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); | |
} |
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
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) { |
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
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) { |
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
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() => |
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
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){ |