Code for Keras plays catch blog post
python qlearn.py
- Generate figures
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.ArrayAdapter; | |
import android.widget.Button; | |
import android.widget.ListView; | |
public class TransitionThemeActivity extends AppCompatActivity implements View.OnClickListener { |
Code for Keras plays catch blog post
python qlearn.py
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
from keras import backend as K | |
from keras.engine.base_layer import Layer, InputSpec | |
from keras import activations | |
from keras.layers.convolutional import _Conv | |
import numpy as np | |
class TDNN(_Conv): | |
# Original TDNN | |
# A. Waibel, T. Hanazawa, G. Hinton, K. Shikano and K. J. Lang, | |
# "Phoneme recognition using time-delay neural networks," |
import 'package:flutter/foundation.dart'; | |
/// A class that can be used to derive a value based on data from another | |
/// Listenable or Listenables. | |
/// | |
/// The value will be recomputed when the provided [listenable] notifies the | |
/// listeners that values have changed. | |
/// | |
/// ### Simple Example | |
/// |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>HKAtrialFibrillationDetectionOnboardingCompleted</key> | |
<integer>1</integer> | |
<key>HKElectrocardiogramOnboardingCompleted</key> | |
<integer>3</integer> | |
</dict> | |
</plist> |
import 'dart:collection'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( |
import sys | |
import json | |
input_file = sys.argv[1] | |
output_file = sys.argv[2] | |
output_file = open(output_file, 'w') | |
def to_vcf_string(first_name, last_name, phone): | |
vcf_lines = [] |
import 'package:flutter/widgets.dart'; | |
typedef NotificationBuilderCallback<T extends Notification> = Widget Function( | |
BuildContext context, T? notification); | |
typedef NotificationCondition<T extends Notification> = bool Function( | |
T notification); | |
class NotificationConsumer<T extends Notification> extends StatefulWidget { | |
final NotificationBuilderCallback<T> builder; |