You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by do...@apache.org on 2017/05/03 22:35:49 UTC

[3/5] incubator-predictionio-template-recommender git commit: modify print statement

modify print statement

Closes #12


Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-recommender/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-recommender/commit/1339f59a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-recommender/tree/1339f59a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-recommender/diff/1339f59a

Branch: refs/heads/develop
Commit: 1339f59aa159b43942fd7bed9d6b70adc5947628
Parents: 77afa84
Author: Shinsuke Sugaya <sh...@yahoo.co.jp>
Authored: Wed May 3 10:41:32 2017 -0700
Committer: Donald Szeto <ds...@salesforce.com>
Committed: Wed May 3 10:41:32 2017 -0700

----------------------------------------------------------------------
 data/import_eventserver.py | 6 +++---
 data/send_query.py         | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-recommender/blob/1339f59a/data/import_eventserver.py
----------------------------------------------------------------------
diff --git a/data/import_eventserver.py b/data/import_eventserver.py
index 0a1e109..2c92335 100644
--- a/data/import_eventserver.py
+++ b/data/import_eventserver.py
@@ -13,7 +13,7 @@ def import_events(client, file):
   f = open(file, 'r')
   random.seed(SEED)
   count = 0
-  print "Importing data..."
+  print("Importing data...")
   for line in f:
     data = line.rstrip('\r\n').split(RATE_ACTIONS_DELIMITER)
     # For demonstration purpose, randomly mix in some buy events
@@ -36,7 +36,7 @@ def import_events(client, file):
       )
     count += 1
   f.close()
-  print "%s events are imported." % count
+  print("%s events are imported." % count)
 
 if __name__ == '__main__':
   parser = argparse.ArgumentParser(
@@ -46,7 +46,7 @@ if __name__ == '__main__':
   parser.add_argument('--file', default="./data/sample_movielens_data.txt")
 
   args = parser.parse_args()
-  print args
+  print(args)
 
   client = predictionio.EventClient(
     access_key=args.access_key,

http://git-wip-us.apache.org/repos/asf/incubator-predictionio-template-recommender/blob/1339f59a/data/send_query.py
----------------------------------------------------------------------
diff --git a/data/send_query.py b/data/send_query.py
index 7eaf53e..3dafd6d 100644
--- a/data/send_query.py
+++ b/data/send_query.py
@@ -4,4 +4,4 @@ Send sample query to prediction engine
 
 import predictionio
 engine_client = predictionio.EngineClient(url="http://localhost:8000")
-print engine_client.send_query({"user": "1", "num": 4})
+print(engine_client.send_query({"user": "1", "num": 4}))