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
<Window x:Class="WpfApp1.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
Title="MainWindow" Height="450" Width="800"> | |
<Window.Resources> | |
<Style TargetType="ComboBox"> | |
<Setter Property="Template"> |
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
var text = "some text"; | |
final snackBar = SnackBar( | |
content: Text("Snack: $text"), | |
action: SnackBarAction( | |
label: 'Undo', | |
onPressed: () { | |
// Some code to undo the change! | |
}, | |
), | |
); |
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
GlobalKey<ScaffoldState> scaffoldKey = new GlobalKey(); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
key: scaffoldKey, | |
... | |
scaffoldKey.currentState.showSnackBar(SnackBar(content: Text("some text"))); |
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
# Based on https://www.coursera.org/learn/introduction-tensorflow/home/welcome | |
# Course 1 - Part 4 - Lesson 2 - Notebook | |
#https://github.com/zalandoresearch/fashion-mnist | |
import tensorflow as tf | |
from tensorflow import keras | |
mnist = keras.datasets.fashion_mnist | |
(training_images, training_labels), (test_images, test_labels) = mnist.load_data() | |
import matplotlib.pyplot as plt |
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 tensorflow as tf | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from tensorflow import keras | |
mnist = keras.datasets.mnist | |
(training_images, training_labels), (test_images, test_labels) = mnist.load_data() | |
#plt.imshow(test_images[0]) | |
class FitCallback(tf.keras.callbacks.Callback): |
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
//In the test class | |
import com.amazonaws.services.lambda.runtime.Context; | |
import com.amazonaws.services.lambda.runtime.LambdaLogger; | |
import org.junit.runner.RunWith; | |
import org.mockito.junit.MockitoJUnitRunner; | |
import org.mockito.Mock; | |
import org.junit.Before; | |
import org.junit.Test; | |
import static org.mockito.Mockito.when; | |
import static org.mockito.Mockito.doAnswer; |
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_value": "some text", | |
"int_value": "123", | |
"float_value":"12.345", | |
"bool_value": "true", | |
"date_value": "2019-05-10T10:20:35.000+0", | |
"array_value": [1,2,3,4,5], | |
"object_value": { | |
"int_field": "789", | |
"string_field": "object's text" |
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
/* | |
https://github.com/FasterXML/jackson | |
Grade.build | |
dependencies { | |
compile group:'com.fasterxml.jackson', name:'jackson-bom', version: '2.9.8' | |
} | |
Input: | |
{ "first_name" : "John", "last_name" : "Smith" } | |
{ "first_name" : "John" } |
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
dependencies { | |
testCompile group: 'junit', name: 'junit', version: '4.12' | |
compile group: 'com.amazon.alexa', name: 'ask-sdk', version:'2.17.2' | |
compile group: 'com.amazonaws', name: 'aws-lambda-java-log4j2', version:'1.1.0' | |
} | |
jar { | |
from { | |
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | |
} | |
} |
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
"events": { | |
"publications": [ | |
{ "eventName": "AMAZON.OrderStatus.Updated" }, | |
{ "eventName": "AMAZON.MediaContent.Available" } | |
], | |
"endpoint": { | |
"uri": "YOUR-AWS-LAMBDA-FUNCTION-ARN" | |
} | |
} |
OlderNewer