incubator-nuvem-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r1094178 - in /incubator/nuvem/trunk/nuvem-parallel/nuvem: bsearch.py bzprofile.py flkalbum.py gimages.py gmap.py picalbum.py ysearch.py
Date Sun, 17 Apr 2011 18:18:32 GMT
Author: jsdelfino
Date: Sun Apr 17 18:18:31 2011
New Revision: 1094178

URL: http://svn.apache.org/viewvc?rev=1094178&view=rev
Log:
Add a few search components.

Added:
    incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py
    incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py
    incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py
      - copied, changed from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py
    incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py
    incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py
      - copied, changed from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py
    incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py
      - copied, changed from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py
Modified:
    incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py

Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py?rev=1094178&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py (added)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py Sun Apr 17 18:18:31 2011
@@ -0,0 +1,20 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#    
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+def get(r, q, s):
+    return s.get((("'q", q.get(r)), ("'format", 'rss')))
+

Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py?rev=1094178&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py (added)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py Sun Apr 17 18:18:31 2011
@@ -0,0 +1,21 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#    
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+def get(r, bzid, bz):
+    bid = bzid.get(r)
+    return bz.get((bid, '@self', ("'alt", 'json')))
+

Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py (from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py)
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py&r1=1094177&r2=1094178&rev=1094178&view=diff
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py Sun Apr 17 18:18:31 2011
@@ -15,21 +15,7 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-import string
-
-def get(r, markers, s):
-
-    def ismarker(m):
-        from sys import stderr
-        print >> stderr, "####", m
-        return m[1] is not None
-
-    def marker(m):
-        # expecting (label, (color, loc))
-        label = m[0][1:]
-        color = m[1][0]
-        loc = string.join(map(str, m[1][1:3]), ',')
-        return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc))
-    
-    return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) +
tuple(map(marker, filter(ismarker, markers.get(r)))))
+def get(r, id, flk):
+    idv = id.get(r)
+    return flk.get((("'id", idv), ("'lang", 'en-us'), ("'format", 'json')))
 

Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py?rev=1094178&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py (added)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py Sun Apr 17 18:18:31 2011
@@ -0,0 +1,20 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#    
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+def get(r, q, s):
+    return s.get((("'v", '1.0'), ("'rsz", 8), ("'q", q.get(r))))
+

Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py?rev=1094178&r1=1094177&r2=1094178&view=diff
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py Sun Apr 17 18:18:31 2011
@@ -31,5 +31,6 @@ def get(r, markers, s):
         loc = string.join(map(str, m[1][1:3]), ',')
         return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc))
     
-    return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) +
tuple(map(marker, filter(ismarker, markers.get(r)))))
+    mv = markers.get(r)
+    return s.get((("'size", '320x320'), ("'maptype", 'roadmap'), ("'sensor", 'false')) +
tuple(map(marker, filter(ismarker, () if mv is None else mv))))
 

Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py (from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py)
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py&r1=1094177&r2=1094178&rev=1094178&view=diff
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py Sun Apr 17 18:18:31 2011
@@ -15,21 +15,7 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-import string
-
-def get(r, markers, s):
-
-    def ismarker(m):
-        from sys import stderr
-        print >> stderr, "####", m
-        return m[1] is not None
-
-    def marker(m):
-        # expecting (label, (color, loc))
-        label = m[0][1:]
-        color = m[1][0]
-        loc = string.join(map(str, m[1][1:3]), ',')
-        return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc))
-    
-    return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) +
tuple(map(marker, filter(ismarker, markers.get(r)))))
+def get(r, id, pic):
+    idv = id.get(r)
+    return pic.get((idv, ("'kind", 'photo'), ("'max-results", 20)))
 

Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py (from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py)
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py&r1=1094177&r2=1094178&rev=1094178&view=diff
==============================================================================
--- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original)
+++ incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py Sun Apr 17 18:18:31 2011
@@ -15,21 +15,6 @@
 #  specific language governing permissions and limitations
 #  under the License.
 
-import string
-
-def get(r, markers, s):
-
-    def ismarker(m):
-        from sys import stderr
-        print >> stderr, "####", m
-        return m[1] is not None
-
-    def marker(m):
-        # expecting (label, (color, loc))
-        label = m[0][1:]
-        color = m[1][0]
-        loc = string.join(map(str, m[1][1:3]), ',')
-        return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc))
-    
-    return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) +
tuple(map(marker, filter(ismarker, markers.get(r)))))
+def get(r, q, s):
+    return s.get((("'appid", 'YahooDemo'), ("'query", q.get(r)), ("'output", 'json')))
 



Mime
View raw message