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
from keras.layers.core import Layer | |
import keras.backend as K | |
if K.backend() == 'tensorflow': | |
import tensorflow as tf | |
def K_arange(start, stop=None, step=1, dtype='int32'): | |
result = tf.range(start, limit=stop, delta=step, name='arange') | |
if dtype != 'int32': | |
result = K.cast(result, dtype) | |
return result |
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
""" | |
AWS Batch wrapper for Luigi | |
From the AWS website: | |
AWS Batch enables you to run batch computing workloads on the AWS Cloud. | |
Batch computing is a common way for developers, scientists, and engineers | |
to access large amounts of compute resources, and AWS Batch removes the | |
undifferentiated heavy lifting of configuring and managing the required |
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
# Download Spark 1.4 from http://spark.apache.org/downloads.html | |
# | |
# Download the nyc flights dataset as a CSV from https://s3-us-west-2.amazonaws.com/sparkr-data/nycflights13.csv | |
# Launch SparkR using | |
# ./bin/sparkR --packages com.databricks:spark-csv_2.10:1.0.3 | |
# The SparkSQL context should already be created for you as sqlContext | |
sqlContext | |
# Java ref type org.apache.spark.sql.SQLContext id 1 |
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
// Simple IPython Notebook test | |
// Requires PhantomJS and CasperJS. | |
// To run: | |
// 1) Start a notebook server in an empty directory. | |
// 2) casperjs test_basic.js | |
var casper = require('casper').create({ | |
// verbose: true, | |
// logLevel: "debug" | |
}); |
NewerOlder