##Problem Samples
####Logging hello world How would you output the string "Hello world!" to the javascript console.
Answer:
console.log("Hello World!");
import numpy as np | |
def ptb_iterator(raw_data, batch_size, num_steps, steps_ahead=1): | |
"""Iterate on the raw PTB data. | |
This generates batch_size pointers into the raw PTB data, and allows | |
minibatch iteration along these pointers. | |
Args: | |
raw_data: one of the raw data outputs from ptb_raw_data. | |
batch_size: int, the batch size. | |
num_steps: int, the number of unrolls. |
"""adapted from https://github.com/OlavHN/bnlstm to store separate population statistics per state""" | |
import tensorflow as tf, numpy as np | |
RNNCell = tf.nn.rnn_cell.RNNCell | |
class BNLSTMCell(RNNCell): | |
'''Batch normalized LSTM as described in arxiv.org/abs/1603.09025''' | |
def __init__(self, num_units, is_training_tensor, max_bn_steps, initial_scale=0.1, activation=tf.tanh, decay=0.95): | |
""" | |
* max bn steps is the maximum number of steps for which to store separate population stats | |
""" |
Star Wars: Episode 1:The Phantom Menace | |
TITLE CARD : A long time ago in a galaxy far, far away.... | |
A vast sea of stars serves as the backdrop for the main title, followed by | |
a roll up, which crawls up into infinity. | |
EPISODE 1 THE PHANTOM MENACE | |
Turmoil has engulfed the Galactic Republic. The taxation of trade routes to |
#!/usr/bin/perl | |
# Program to filter Wikipedia XML dumps to "clean" text consisting only of lowercase | |
# letters (a-z, converted from A-Z), and spaces (never consecutive). | |
# All other characters are converted to spaces. Only text which normally appears | |
# in the web browser is displayed. Tables are removed. Image captions are | |
# preserved. Links are converted to normal text. Digits are spelled out. | |
# Written by Matt Mahoney, June 10, 2006. This program is released to the public domain. |
var assert = require('assert'); | |
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
function game() { | |
var board = [ |
##Problem Samples
####Logging hello world How would you output the string "Hello world!" to the javascript console.
Answer:
console.log("Hello World!");