github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

koke / discovr

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 5
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Discover interesting flickr photos (**EXPERIMENTAL** - Help needed) — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added rpm dep 
koke (author)
Sun Jan 17 18:20:04 -0800 2010
commit  e001ef07d598cddd54cdcec5b07a687684302666
tree    6139730a170756ad57c4693a03a668e25912723c
parent  de017e75db7f892331066db9ab44d3a3fa45aae1
discovr /
name age
history
message
file .gitignore Sat Nov 07 06:42:14 -0800 2009 Initial rails project [koke]
file README.rdoc Sun Nov 08 12:26:54 -0800 2009 Update README with db instructions [koke]
file Rakefile Sat Nov 07 06:42:14 -0800 2009 Initial rails project [koke]
directory app/ Sun Jan 17 17:54:50 -0800 2010 Added GA code [koke]
directory config/ Sun Jan 17 18:20:04 -0800 2010 Added rpm dep [koke]
directory db/ Sun Jan 17 17:39:18 -0800 2010 Render recent/explore photos in the front page ... [koke]
directory doc/ Sat Nov 07 06:42:14 -0800 2009 Initial rails project [koke]
directory lib/ Sun Nov 08 10:23:22 -0800 2009 Restrict favorite downloading [koke]
directory log/ Sat Nov 07 06:42:14 -0800 2009 Initial rails project [koke]
directory public/ Sun Jan 17 18:04:55 -0800 2010 Add missing thumb icon [koke]
directory script/ Sat Nov 07 06:42:14 -0800 2009 Initial rails project [koke]
directory test/ Sun Jan 17 17:39:18 -0800 2010 Render recent/explore photos in the front page ... [koke]
README.rdoc

discovr

This is some experimental code to discover interesting flickr photos based on your favorites. The concept works but it takes way too much time and API requests to fetch and process data.

I’m releasing it to see if someone comes with a better idea, so sorry about dirty code. This is just the result of a weekend playing with flickr API.

Any improvement suggestions will be welcome

Where to look at

Where is the actual code? These files:

  • lib/flickr.rb (based in rubyforge.org/projects/flickr)
  • app/models/picture.rb
  • app/models/user.rb
  • app/controllers/discovr_controller.rb
  • app/views/discovr/index.html.erb

Try it

  1. Download it: git clone git://github.com/koke/discovr.git
  2. Edit config/initializers/flickr_api.rb and add your flickr API key and secret. You can get them at www.flickr.com/services/api/keys
  3. Create your database and edit config/database.yml accordingly.
  4. Run rake db:migrate to create the tables and views
  5. Launch the console and fetch data. This can take a while (~25 minutes for me)

    similar = User.lookup("koke").similar_pictures

  6. Launch your server (script/server) and visit localhost:3000/discovr. This can also take a while (~4 minutes first time, ~10s otherwise) and enjoy

License

Copyright © 2009 Jorge Bernal <koke@amedias.org>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server