This experiment is an evolution of the previous one. The links are shown as outcoming links (red) and incoming links (blue). Moreover, the size of the nodes describes the number of entities for a certain DBpedia Class.
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
| <div id="state" /> | |
| <script type="text/javascript" src="https://app.yax.io/yax.min.js"></script> | |
| <script type="text/javascript"> | |
| // pass your api key | |
| var talk = new Talk("9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", function() { | |
| talk.connect(); | |
| }, function(state) { | |
| $("#state").html(state); | |
| }); |
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
| ##################################################################### | |
| # STEP 1: INSTALL REQUIRED PACKAGES AND CONNECT TO ALL LIBRARIES | |
| ##################################################################### | |
| library("NLP") | |
| library("tm") | |
| library("RCurl") | |
| library("slam") |
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
| def update(td: TaggingDistribution, ad: AlignmentDistribution) = { | |
| /* | |
| * Setup: Create an empty set of records | |
| */ | |
| var TPrime = List[Record]() | |
| for (i <- 0 until _T.size) { | |
| val r = new Record(i, _schema) | |
| r.setThetaRewrite(_T(i).thetaRewrite) | |
| TPrime = TPrime :+ r | |
| } |
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 https://www.facebook.com/photo.php?fbid=10207696314588414&set=p.10207696314588414&type=3&theater | |
| import booleans.BooleanTerm | |
| import functions._ | |
| import vectors.{VectorTerm, VectorScalarApp} | |
| /** | |
| * @author Teino Boswell | |
| */ |
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
| Apache Maven 3.0.4 (r1232337; 2012-01-17 00:44:56-0800) | |
| Maven home: /usr/local/apache-maven/apache-maven-3.0.4 | |
| Java version: 1.6.0_32, vendor: Sun Microsystems Inc. | |
| Java home: /usr/java/jdk1.6.0_32/jre | |
| Default locale: en_US, platform encoding: UTF-8 | |
| OS name: "linux", version: "2.6.32-220.el6.x86_64", arch: "amd64", family: "unix" | |
| [INFO] Error stacktraces are turned on. | |
| [DEBUG] Reading global settings from /usr/local/apache-maven/apache-maven-3.0.4/conf/settings.xml | |
| [DEBUG] Reading user settings from /home/cloudera/.m2/settings.xml | |
| [DEBUG] Using local repository at /home/cloudera/.m2/repository |
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
| #Ubuntu | |
| 0. [Set up ssh keys](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2) | |
| cat ~/.ssh/vedyakov.robodrom.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" | |
| 0. Install base utils | |
| sudo apt-get install gcc g++ git make |
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
| ComputeService compute = ContextBuilder.newBuilder("aws-ec2") | |
| .credentials("identity", "credential") | |
| .buildView(ComputeServiceContext.class) | |
| .getComputeService(); | |
| Template template = compute.templateBuilder() | |
| .osFamily(OsFamily.UBUNTU) | |
| .minRam(2048) | |
| .options(inboundPorts(22, 80)) | |
| .build(); |
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
| sealed trait Formula[A] | |
| case class Var[A](a: A) extends Formula[A] | |
| case class Not[A](fm: Formula[A]) extends Formula[A] | |
| case class And[A](left: Formula[A], right: Formula[A]) extends Formula[A] | |
| case class Or[A](left: Formula[A], right: Formula[A]) extends Formula[A] | |
| type DNFSTREAM[A] = Stream[List[Formula[A]]] | |
| def distribute[A](left: DNFSTREAM[A], right: DNFSTREAM[A]): DNFSTREAM[A] = | |
| for (leftTerm <- left; rightTerm <- right) yield leftTerm ++ rightTerm |
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 socket | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| host = socket.gethostname() | |
| port = 4560 | |
| # Binds the server to address and port. | |
| s.bind((host, port)) | |
| # Listens for a max of 5 clients. |