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
#!/bin/bash | |
set -eu | |
wget -nc https://github.com/rapidsai/notebooks-extended/raw/master/utils/env-check.py | |
echo "Checking for GPU type:" | |
python env-check.py | |
if [ ! -f Miniconda3-4.5.4-Linux-x86_64.sh ]; then | |
echo "Removing conflicting packages, will replace with RAPIDS compatible versions" |
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
# Example training loop for fitting a line from 2 points | |
# A line is defined as a*x+b | |
# Want machine to learn what a and b are. | |
# Important thing to note is the overall structure of components | |
# 1. Batch of training data | |
# 1A: inputs used to generate predictions | |
x_values = tf.convert_to_tensor([0.0, 1.0]) | |
# 1B: desired outputs or 'labels' | |
y_values = tf.convert_to_tensor([0.0, 3.0]) |
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
# recall the training loop pattern | |
# 1. Batch of training data | |
# Batch of training data | |
x_values = tf.range(0,1,0.01) | |
# 1B: desired outputs or 'labels' | |
y_values = 3*x_values + 1 + tf.random_uniform(x_values.shape) | |
# 2. Model | |
# 2A: Variables that will be trained |
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
______________________________________ | |
user> ERROR: Unhandled REPL handler exception processing message {:file (ns cursive.repl.runtime | |
(:import [java.lang.reflect Method Field Constructor]) | |
(:require [clojure.reflect :as reflect] | |
[clojure.set :as set])) | |
(def mappings {:macro identity | |
:ns (comp name ns-name) | |
:name name | |
:arglists #(mapv str %) |
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
**Concerns | |
- Interactivity | |
-- Incremental extension or modification of running system | |
- Modularity | |
-- Pluggable serialization, storage, conveyance, scheduling, lifecycle hooks etc etc | |
**Spark Summary | |
- RDDs: represent a lazily-computed distributed dataset | |
-- each dataset is broken up into 'partitions' that individually sit at different machines | |
-- just a DAG with edges annotated to describe relationship between partitions of parent and partitions of child |
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
(defn foo [x] x]) |
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
WARNING: No such namespace: clojure.tools.nrepl.middleware.load-file, could not locate clojure/tools/nrepl/middleware/load_file.cljs at line 1 <cljs repl> | |
clojure.lang.ExceptionInfo: Unable to resolve var: file-contents in this context at line 1 <cljs repl> {:tag :cljs/analysis-error, :file "<cljs repl>", :line 1, :column 390} | |
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
(require '[clojure.data.fressian :as fress]) | |
(require '[clojure.java.io :as io]) | |
(import 'java.util.zip.GZIPInputStream) | |
(defn fress-seq* [reader] | |
(let [x (try (fress/read-object reader) (catch Exception e :eof))] | |
(if (= :eof x) | |
(do (.close reader) nil) | |
(cons x |
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
/*static*/ v8::Handle<v8::Value> Java::bufferFromDirect(const v8::Arguments& args) { | |
v8::HandleScope scope; | |
Java* self = node::ObjectWrap::Unwrap<Java>(args.This()); | |
v8::Handle<v8::Value> ensureJvmResults = self->ensureJvm(); | |
if(!ensureJvmResults->IsUndefined()) { | |
return v8::False(); | |
} |