predictionio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject [25/55] [abbrv] incubator-predictionio-site git commit: Based on apache/incubator-predictionio#8fa95bf5a76f2c345a1b6ede3cb2ae5a3cf2c528
Date Fri, 09 Sep 2016 22:13:22 GMT
http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c44f6d9e/templates/similarproduct/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/similarproduct/quickstart/index.html.gz b/templates/similarproduct/quickstart/index.html.gz
index e2c19c1..af7e2ed 100644
Binary files a/templates/similarproduct/quickstart/index.html.gz and b/templates/similarproduct/quickstart/index.html.gz
differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c44f6d9e/templates/vanilla/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/vanilla/dase/index.html.gz b/templates/vanilla/dase/index.html.gz
index 803127a..1ce562c 100644
Binary files a/templates/vanilla/dase/index.html.gz and b/templates/vanilla/dase/index.html.gz
differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c44f6d9e/templates/vanilla/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/vanilla/quickstart/index.html b/templates/vanilla/quickstart/index.html
index 38598bc..cf63aa6 100644
--- a/templates/vanilla/quickstart/index.html
+++ b/templates/vanilla/quickstart/index.html
@@ -54,17 +54,17 @@ Your system is all ready to go.
 </pre></td></tr></tbody></table> </div> <p>When
the engine is deployed successfully and running, you should see a console message similar
to the following:</p><div class="highlight shell"><table style="border-spacing:
0"><tbody><tr><td class="gutter gl" style="text-align: right"><pre
class="lineno">1
 2</pre></td><td class="code"><pre><span class="o">[</span>INFO]
<span class="o">[</span>HttpListener] Bound to /0.0.0.0:8000
 <span class="o">[</span>INFO] <span class="o">[</span>MasterActor]
Bind successful. Ready to serve.
-</pre></td></tr></tbody></table> </div> <p>Do not
kill the deployed engine process.</p><p>By default, the deployed engine binds
to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>.
You can visit that page in your web browser to check its status.</p><p><img
alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2
id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now,
You can try to retrieve predicted results. The engine accepts JSON query with the field &#39;q&#39;:
<code>{ &quot;q&quot; : &quot;foo&quot; }</code>. A prefix is
added to the query data and return as PredictedResult.</p><p>With the deployed
engine running, open another temrinal and run the following <code>curl</code>
command or use SDK to send the query:</p><div class="tabs"> <ul class="control">
<li data-lang="json"><a href="#tab-caf5ae36-6561-410f-933d-9f44a23bbce3">REST
API</a></li> <li data-lang="python"><a href="#tab-8001a3b7-0d8b-4d
 a7-956d-ecf1cbf1aa54">Python SDK</a></li> <li data-lang="php"><a
href="#tab-e4b1aced-8dba-4e63-b757-98c858b1c831">PHP SDK</a></li> <li data-lang="ruby"><a
href="#tab-3e7d925e-4c78-4d52-80f7-618986fe11b7">Ruby SDK</a></li> <li data-lang="java"><a
href="#tab-ae806418-a7e3-458c-a741-91573426cf8e">Java SDK</a></li> </ul>
<div data-tab="REST API" data-lang="json" id="tab-caf5ae36-6561-410f-933d-9f44a23bbce3">
<div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td></tr></tbody></table> </div> <p>Do not
kill the deployed engine process.</p><p>By default, the deployed engine binds
to <a href="http://localhost:8000"><a href="http://localhost:8000">http://localhost:8000</a></a>.
You can visit that page in your web browser to check its status.</p><p><img
alt="Engine Status" src="/images/engine-server-3246414b.png"/></p></p><h2
id='6.-use-the-engine' class='header-anchors'>6. Use the Engine</h2><p>Now,
You can try to retrieve predicted results. The engine accepts JSON query with the field &#39;q&#39;:
<code>{ &quot;q&quot; : &quot;foo&quot; }</code>. A prefix is
added to the query data and return as PredictedResult.</p><p>With the deployed
engine running, open another temrinal and run the following <code>curl</code>
command or use SDK to send the query:</p><div class="tabs"> <ul class="control">
<li data-lang="json"><a href="#tab-d9355fc7-7320-4a71-8a9f-3499162cb921">REST
API</a></li> <li data-lang="python"><a href="#tab-81387fb6-017b-41
 3b-bfa7-c784323793a1">Python SDK</a></li> <li data-lang="php"><a
href="#tab-e54e0f1a-ea88-42c2-ae80-14fe82029317">PHP SDK</a></li> <li data-lang="ruby"><a
href="#tab-f3ad2f92-0009-4942-a8be-92b343fb6f8c">Ruby SDK</a></li> <li data-lang="java"><a
href="#tab-672efa95-b5ae-4aab-9beb-7f66f389ef0e">Java SDK</a></li> </ul>
<div data-tab="REST API" data-lang="json" id="tab-d9355fc7-7320-4a71-8a9f-3499162cb921">
<div class="highlight shell"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="gp">$ </span>curl
-H <span class="s2">"Content-Type: application/json"</span> <span class="se">\</span>
 -d <span class="s1">'{ "q": "foo" }'</span> http://localhost:8000/queries.json
 
-</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="Python SDK" data-lang="python" id="tab-8001a3b7-0d8b-4da7-956d-ecf1cbf1aa54">
<div class="highlight python"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="Python SDK" data-lang="python" id="tab-81387fb6-017b-413b-bfa7-c784323793a1">
<div class="highlight python"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3</pre></td> <td class="code"><pre><span class="kn">import</span>
<span class="nn">predictionio</span>
 <span class="n">engine_client</span> <span class="o">=</span> <span
class="n">predictionio</span><span class="o">.</span><span class="n">EngineClient</span><span
class="p">(</span><span class="n">url</span><span class="o">=</span><span
class="s">"http://localhost:8000"</span><span class="p">)</span>
 <span class="k">print</span> <span class="n">engine_client</span><span
class="o">.</span><span class="n">send_query</span><span class="p">({</span>
<span class="s">"q"</span><span class="p">:</span> <span class="s">"foo"</span>
<span class="p">})</span>
-</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="PHP SDK" data-lang="php" id="tab-e4b1aced-8dba-4e63-b757-98c858b1c831">
<div class="highlight php"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="PHP SDK" data-lang="php" id="tab-e54e0f1a-ea88-42c2-ae80-14fe82029317">
<div class="highlight php"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -83,7 +83,7 @@ Your system is all ready to go.
 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$response</span><span
class="p">);</span>
 
 <span class="cp">?&gt;</span>
-</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="Ruby SDK" data-lang="ruby" id="tab-3e7d925e-4c78-4d52-80f7-618986fe11b7">
<div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="Ruby SDK" data-lang="ruby" id="tab-f3ad2f92-0009-4942-a8be-92b343fb6f8c">
<div class="highlight ruby"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4
@@ -96,7 +96,7 @@ Your system is all ready to go.
 <span class="n">response</span> <span class="o">=</span> <span
class="n">client</span><span class="p">.</span><span class="nf">send_query</span><span
class="p">(</span><span class="s1">'q'</span> <span class="o">=&gt;</span>
<span class="s1">'foo'</span><span class="p">)</span>
 
 <span class="nb">puts</span> <span class="n">response</span>
-</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="Java SDK" data-lang="java" id="tab-ae806418-a7e3-458c-a741-91573426cf8e">
<div class="highlight java"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
+</pre></td> </tr></tbody></table> </div> </div>
<div data-tab="Java SDK" data-lang="java" id="tab-672efa95-b5ae-4aab-9beb-7f66f389ef0e">
<div class="highlight java"> <table style="border-spacing: 0"><tbody><tr>
<td class="gutter gl" style="text-align: right"><pre class="lineno">1
 2
 3
 4

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c44f6d9e/templates/vanilla/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/vanilla/quickstart/index.html.gz b/templates/vanilla/quickstart/index.html.gz
index 6932105..983e322 100644
Binary files a/templates/vanilla/quickstart/index.html.gz and b/templates/vanilla/quickstart/index.html.gz
differ

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/c44f6d9e/tryit/index.html.gz
----------------------------------------------------------------------
diff --git a/tryit/index.html.gz b/tryit/index.html.gz
index eabe364..eebedad 100644
Binary files a/tryit/index.html.gz and b/tryit/index.html.gz differ


Mime
View raw message