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
package edu.sjsu.watsh.algos; | |
import java.util.ArrayList; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; | |
/** | |
* Implement LRU cache using linked hash map. | |
* |
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
for i in 1 2 3; do | |
docker-machine create \ | |
-d virtualbox \ | |
swarm-$i | |
done | |
eval $(docker-machine env swarm-1) | |
docker swarm init \ | |
--advertise-addr $(docker-machine ip swarm-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
package edu.sjsu.amigo.mp.kafka; | |
import com.fasterxml.jackson.annotation.JsonProperty; | |
import lombok.Data; | |
/** | |
* The intent object returned from the wit.ai service. | |
* | |
* { | |
"msg_id" : "5e89f3d9-93d1-4dfa-b128-73fda21974b3", |
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
# Use this base image for JDK 8 | |
# You can even use this image to set up maven and build from source the fat jar | |
# that you will execute below. | |
# See this for setting up maven - https://runnable.com/docker/java/dockerize-your-java-application | |
FROM sjsucohort6/oracle-java:8 | |
MAINTAINER Watsh Rajneesh <watsh.rajneesh@sjsu.edu> | |
WORKDIR /slackbot |
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
package edu.sjsu.amigo.http.client; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.mashape.unirest.http.HttpResponse; | |
import com.mashape.unirest.http.JsonNode; | |
import com.mashape.unirest.http.ObjectMapper; | |
import com.mashape.unirest.http.Unirest; | |
import com.mashape.unirest.http.exceptions.UnirestException; | |
import com.mashape.unirest.request.GetRequest; |
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
package edu.sjsu.amigo.cp.docker; | |
import com.spotify.docker.client.DefaultDockerClient; | |
import com.spotify.docker.client.DockerClient; | |
import com.spotify.docker.client.LogStream; | |
import com.spotify.docker.client.exceptions.DockerException; | |
import com.spotify.docker.client.messages.ContainerConfig; | |
import com.spotify.docker.client.messages.ContainerCreation; | |
import com.spotify.docker.client.messages.RegistryAuth; | |
import edu.sjsu.amigo.cp.api.CommandExecutionException; |
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
/* | |
* Copyright (c) 2017 San Jose State University. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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
package edu.sjsu.amigo.mp.kafka; | |
import org.apache.kafka.clients.producer.KafkaProducer; | |
import org.apache.kafka.clients.producer.Producer; | |
import org.apache.kafka.clients.producer.ProducerConfig; | |
import org.apache.kafka.clients.producer.ProducerRecord; | |
import java.io.Closeable; | |
import java.util.Properties; |
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
package edu.sjsu.amigo.slackbot; | |
import com.ullink.slack.simpleslackapi.SlackChannel; | |
import com.ullink.slack.simpleslackapi.SlackSession; | |
import com.ullink.slack.simpleslackapi.SlackUser; | |
import com.ullink.slack.simpleslackapi.events.SlackMessagePosted; | |
import com.ullink.slack.simpleslackapi.impl.SlackSessionFactory; | |
import com.ullink.slack.simpleslackapi.listeners.SlackMessagePostedListener; | |
import edu.sjsu.amigo.mp.kafka.Message; | |
import edu.sjsu.amigo.mp.kafka.MessageProducer; |
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
Verifying that "rwatsh.id" is my Blockstack ID. https://onename.com/rwatsh |
NewerOlder