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
var Cylon = require('cylon'); | |
var config = require('./config.json'); | |
/** | |
* This Robot is subscribed key_tap_gesture topic and will toggle on and off. It will send its state as a message | |
* to the light_state topic | |
*/ | |
Cylon.robot({ | |
connections: { |
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
"use strict"; | |
var Cylon = require('cylon'); | |
/** | |
* This robot sends messages to the hand_motion and key_tap_gesture channel using the leap motion | |
*/ | |
Cylon.robot({ | |
connections: { |
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
/** | |
* This is a simple MQTT server with a Redis Backend | |
*/ | |
var mosca = require('mosca'); | |
var config = { | |
type: 'redis', | |
redis: require('redis'), | |
db: 12, | |
port: 6379, |
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
thin,cell phone,6000 | |
normal,tablet,1500 | |
mini,tablet,5500 | |
ultra thin,cell phone,5000 | |
very thin,cell phone,6000 | |
big,tablet,2500 | |
bendable,cell phone,3000 | |
foldable,cell phone,3000 | |
pro,tablet,4500 | |
pro2,tablet,6500 |
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
data<- read.csv('FoodData.csv') | |
pop <- read.csv('census.csv') | |
library(dplyr) | |
library(ggplot2) | |
library(ggstance) | |
library(ggalt) | |
library(scales) | |
library(grid) |
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
import java.net.InetAddress | |
import java.util.Properties | |
import com.typesafe.config.ConfigFactory | |
import org.apache.spark.{SparkConf, SparkContext} | |
import org.apache.spark.sql._ | |
import org.apache.spark.sql.functions.lit | |
import org.apache.spark.sql.functions.udf | |
import org.apache.spark.sql.types.StringType |
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
version := "1.0" | |
libraryDependencies ++= Seq( | |
"org.apache.spark" %% "spark-core" % "1.6.0", | |
"org.apache.spark" %% "spark-sql" % "1.6.0", | |
"org.apache.spark" %% "spark-mllib" % "1.6.0", | |
"com.databricks" %% "spark-csv" % "1.3.0", | |
"mysql" % "mysql-connector-java" % "5.1.12", | |
"org.scalactic" %% "scalactic" % "2.2.6", | |
"org.scalatest" %% "scalatest" % "2.2.6" % "test", |
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
## For data sources I used API's from other scripts not included here. | |
library(dplyr) | |
library(ggplot2) | |
library(ggstance) | |
library(ggalt) | |
library(scales) | |
library(grid) | |
library(RColorBrewer) | |
library(extrafont) |
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
var Beanworker = require('fivebeans').worker; | |
// Create a class to handle the work load | |
class IndexHandler { | |
constructor(){ | |
this.type = "j_type"; // Specify the type of job for this class to work on | |
} | |
// Define the work to perform and pass back a success | |
work(payload, callback){ | |
console.log(payload); |
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
var fivebeans = require('fivebeans'); | |
var client = new fivebeans.client('localhost', 11300); | |
var job1 = { | |
type: 'j_type', | |
payload: { | |
name: 'Nolan Ryan', | |
sign: 'Leo' | |
} |