Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
function gnn (cases, wide, tall, population, iterations, error_fn, error_thresh) { | |
var inputs = cases[0][0].length; | |
var outputs = cases[0][1].length; | |
// declare net, provide input layer | |
var net = [new Array(inputs)]; | |
// create input neurons in input layer | |
for (var i = 0; i < inputs; i++) | |
net[0][i] = {output: 0} | |
// create hidden layers | |
for (var x = 0; x < wide; x++) { |
var Router = Ember.Router.extend({ | |
location: config.locationType, | |
init: function () { | |
this._super.apply(this, arguments); | |
// Listen for the first transition, and trigger the `setupMapOnFirstLoad` action when it's complete. | |
this.one('willTransition', function (transition) { | |
transition.then(function () { | |
// do something.. |
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'
The only information that aren't fetched are:
%B
: raw body (unwrapped subject and body)%GG
: raw verification message from GPG for a signed commitWAL-E needs to be installed on all machines, masters and slaves.
Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf
is:
archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.