Skip to content

Instantly share code, notes, and snippets.

View josep2's full-sized avatar
🎯
Focusing

Jowanza Joseph josep2

🎯
Focusing
View GitHub Profile
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: {
"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 is a simple MQTT server with a Redis Backend
*/
var mosca = require('mosca');
var config = {
type: 'redis',
redis: require('redis'),
db: 12,
port: 6379,
@josep2
josep2 / data.txt
Last active August 29, 2016 02:15
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
data<- read.csv('FoodData.csv')
pop <- read.csv('census.csv')
library(dplyr)
library(ggplot2)
library(ggstance)
library(ggalt)
library(scales)
library(grid)
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
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",
## 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)
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);
var fivebeans = require('fivebeans');
var client = new fivebeans.client('localhost', 11300);
var job1 = {
type: 'j_type',
payload: {
name: 'Nolan Ryan',
sign: 'Leo'
}