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
{ | |
"dependencies": { | |
"express": "4.x", | |
"express-session": "1.0.2", | |
"body-parser": "1.0.1", | |
"cookie-parser": "1.0.1", | |
"passport": "0.2.0", | |
"passport-oauth": "1.0.0", | |
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
// Licensed under the Apache License. See footer for details. | |
var express = require('express'); | |
var passport = require('passport'); | |
var app = express(); | |
var bodyParser = require('body-parser'); | |
app.use(bodyParser()); | |
var cookieParser = require('cookie-parser'); | |
app.use(cookieParser()); |
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
$ cf push ibm-sso-nodejs-sample -n ibm-sso-nodejs-$RANDOM -c 'node main.js' | |
Updating app ibm-sso-nodejs-sample in org <your org> / space dev as <your userid>... | |
OK | |
Creating route ibm-sso-nodejs-16133.ng.bluemix.net... | |
OK | |
Binding ibm-sso-nodejs-16133.ng.bluemix.net to ibm-sso-nodejs-sample... | |
OK |
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
sudo apt-get remove scala-library scala | |
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb | |
sudo dpkg -i scala-2.10.4.deb | |
sudo apt-get update | |
sudo apt-get install scala | |
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb | |
sudo dpkg -i sbt.deb | |
sudo apt-get update | |
sudo apt-get install sbt |
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
all: prereq build | |
prereq: | |
apt-get -y install git | |
apt-get -y install curl | |
apt-get -y install openjdk-7-jdk | |
apt-get -y install maven | |
git clone https://github.com/apache/spark.git | |
cd spark; git checkout tags/v1.0.1 | |
build: | |
export SPARK_HADOOP_VERSION=2.4.0 |
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
If you select people totally at random (no discrimination!) from the population of people with >130 IQ to work at Facebook and the sd for men in the general population is 11 IQ points instead of 10 for women, you'll wind up with a 70% male workforce at Facebook. | |
Similarly if men had a mean IQ of 101 instead of 99 for women, Facebook would have a 66% male workforce. | |
From R: | |
women <- pnorm(130, mean = 100, sd = 10, lower.tail = FALSE) | |
men <- pnorm(130, mean = 100, sd = 11, lower.tail = FALSE) | |
scaling <- 100/(women+men) | |
men * scaling | |
[1] 70.28561 | |
women * scaling | |
[1] 29.71439 |
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
CREATE TABLE "address" ("address" "text", "city" "text", "state" "text", "postalCode" "text", "country" "text", "lat" "float", "lon" "float"); |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.deeplearning4j</groupId> | |
<artifactId>dl4j-spark-cdh5-examples</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>dl4j-spark-cdh5-examples</name> |
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
package org.deeplearning4j.examples.feedforward.xor; | |
import org.deeplearning4j.eval.Evaluation; | |
import org.deeplearning4j.nn.api.Model; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.MultiLayerConfiguration; | |
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; | |
import org.deeplearning4j.nn.conf.Updater; | |
import org.deeplearning4j.nn.conf.distribution.NormalDistribution; | |
import org.deeplearning4j.nn.conf.distribution.UniformDistribution; |
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
package org.deeplearning4j.examples.feedforward.xor; | |
import org.deeplearning4j.eval.Evaluation; | |
import org.deeplearning4j.nn.api.OptimizationAlgorithm; | |
import org.deeplearning4j.nn.conf.MultiLayerConfiguration; | |
import org.deeplearning4j.nn.conf.NeuralNetConfiguration; | |
import org.deeplearning4j.nn.conf.Updater; | |
import org.deeplearning4j.nn.conf.layers.DenseLayer; | |
import org.deeplearning4j.nn.conf.layers.OutputLayer; | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; |
OlderNewer