predictionio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject [1/6] incubator-predictionio-site git commit: Based on apache/incubator-predictionio#8fa95bf5a76f2c345a1b6ede3cb2ae5a3cf2c528
Date Mon, 29 Aug 2016 18:46:43 GMT
Repository: incubator-predictionio-site
Updated Branches:
  refs/heads/asf-site 56538ff01 -> 3c2bf89fa


http://git-wip-us.apache.org/repos/asf/incubator-predictionio-site/blob/3c2bf89f/templates/similarproduct/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/similarproduct/quickstart/index.html.gz b/templates/similarproduct/quickstart/index.html.gz
index da12b73..558c04f 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/3c2bf89f/templates/vanilla/dase/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/vanilla/dase/index.html.gz b/templates/vanilla/dase/index.html.gz
index 1d03d39..eba4854 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/3c2bf89f/templates/vanilla/quickstart/index.html
----------------------------------------------------------------------
diff --git a/templates/vanilla/quickstart/index.html b/templates/vanilla/quickstart/index.html
index dc38709..39da475 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-d5d1296c-898b-4b24-b061-9c98cf1770a3">REST
API</a></li> <li data-lang="python"><a href="#tab-aa1ecb3e-c4a6-46
 22-9a96-dd6815bd2e90">Python SDK</a></li> <li data-lang="php"><a
href="#tab-69157706-e384-4a36-b5c7-b8414e54e9ad">PHP SDK</a></li> <li data-lang="ruby"><a
href="#tab-b34538f4-ba86-413b-9ff5-441c2ee6981b">Ruby SDK</a></li> <li data-lang="java"><a
href="#tab-c1412e90-189c-4d2b-bf81-db96aef640a9">Java SDK</a></li> </ul>
<div data-tab="REST API" data-lang="json" id="tab-d5d1296c-898b-4b24-b061-9c98cf1770a3">
<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-943e4e31-89ab-4217-acfc-4270eac6a89e">REST
API</a></li> <li data-lang="python"><a href="#tab-da0c59a5-cda9-4f
 67-a8a0-5a80092cd8c3">Python SDK</a></li> <li data-lang="php"><a
href="#tab-12098c50-2eaa-4cec-bc32-40ecfad88e7d">PHP SDK</a></li> <li data-lang="ruby"><a
href="#tab-16a00c3f-49ec-4bea-a37d-7c03a5f8efa1">Ruby SDK</a></li> <li data-lang="java"><a
href="#tab-bb1e01f9-4bc6-4224-846a-358fbc8f77bd">Java SDK</a></li> </ul>
<div data-tab="REST API" data-lang="json" id="tab-943e4e31-89ab-4217-acfc-4270eac6a89e">
<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-aa1ecb3e-c4a6-4622-9a96-dd6815bd2e90">
<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-da0c59a5-cda9-4f67-a8a0-5a80092cd8c3">
<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-69157706-e384-4a36-b5c7-b8414e54e9ad">
<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-12098c50-2eaa-4cec-bc32-40ecfad88e7d">
<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-b34538f4-ba86-413b-9ff5-441c2ee6981b">
<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-16a00c3f-49ec-4bea-a37d-7c03a5f8efa1">
<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-c1412e90-189c-4d2b-bf81-db96aef640a9">
<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-bb1e01f9-4bc6-4224-846a-358fbc8f77bd">
<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/3c2bf89f/templates/vanilla/quickstart/index.html.gz
----------------------------------------------------------------------
diff --git a/templates/vanilla/quickstart/index.html.gz b/templates/vanilla/quickstart/index.html.gz
index aab6001..945212c 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/3c2bf89f/tryit/index.html.gz
----------------------------------------------------------------------
diff --git a/tryit/index.html.gz b/tryit/index.html.gz
index 5dfc2a9..a3d3099 100644
Binary files a/tryit/index.html.gz and b/tryit/index.html.gz differ


Mime
View raw message