CELO_VALIDATOR_GROUP_ADDRESS=0456e7b4b6a7e25f167f4ebeb17b7268e36af4f8 CELO_VALIDATOR_ADDRESS=7059f5038a97cb70f37c73fadae11b83dca982a8
This file contains hidden or 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
require 'json' | |
class Minesweeper | |
def initialize(n, m, number_of_mines) | |
@n = n | |
@m = m | |
@number_of_mines = number_of_mines | |
@user_board = [] | |
@visible = [] |
This file contains hidden or 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 java.io.*; | |
import java.util.*; | |
/* | |
* To execute Java, please define "static void main" on a class | |
* named Solution. | |
* | |
* If you need more classes, simply define them inline. | |
*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Approximate q-learning\n", | |
"\n", | |
"In this notebook you will teach a __tensorflow__ neural network to do Q-learning." | |
] |
I hereby claim:
- I am nambrot on github.
- I am nambrot (https://keybase.io/nambrot) on keybase.
- I have a public key ASDfEQ9ohfu9htqGyMQjafRCaqXKvag1AeWymD3d81dOMwo
To claim this, I am signing this object:
This file contains hidden or 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
This is a list of links for my kindle |
This file contains hidden or 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
test |
This file contains hidden or 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
PCollection<KV<Integer, Iterable<Alert>>> sessionedAlerts = alerts | |
.apply(Window.remerge()) | |
.apply(Window.into(Sessions.withGapDuration(Duration.standardHours(1)))) | |
.apply(MapElements.via((Alert event) -> KV.of(event.userId, event)).withOutputType(new TypeDescriptor<KV<Integer, Alert>>() {})) | |
.apply(GroupByKey.create()); | |
PCollection<Alert> throttledAlerts = sessionedAlerts | |
.apply(FlatMapElements.via((KV<Integer, Iterable<Alert>> pair) -> { | |
ArrayList<Alert> acc = new ArrayList<>(); | |
FluentIterable |
This file contains hidden or 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
final TupleTag<BloodPressureEvent> bpTag = new TupleTag<>(); | |
final TupleTag<HeartRateEvent> hrTag = new TupleTag<>(); | |
PCollection<KV<Integer, CoGbkResult>> joined = | |
KeyedPCollectionTuple.of(bpTag, bpEvents) | |
.and(hrTag, hrEvents) | |
.apply(CoGroupByKey.create()); | |
PCollection<Alert> alerts = joined.apply(FlatMapElements.via((KV<Integer, CoGbkResult> pair) -> { | |
CoGbkResult result = pair.getValue(); | |
Boolean hasLowSystolic = FluentIterable.from(result.getAll(bpTag)).anyMatch((BloodPressureEvent event) -> event.systolic < 100); |