Skip to content

Instantly share code, notes, and snippets.

View eigenn's full-sized avatar

Dàvid Dòka eigenn

View GitHub Profile
@eigenn
eigenn / flickr_get_photos_in_set.py
Created July 15, 2013 16:03
get back all the photos in a given photo set from Flickr.
from google.appengine.api import urlfetch
from bs4 import BeautifulSoup
class FlickrPhoto(object):
"""
Construct the base url for flickr photo.
"""
base_url = 'http://farm%s.staticflickr.com/%s/%s_%s_%s.jpg'
@eigenn
eigenn / python_palindrome.py
Created July 10, 2013 20:36
Python finding palindromes
"""
Python palidrome finders.
3 methods for finding palindromes with python.
"""
def is_palindrome_v1(s):
if len(s) <= 1:
return True
else:
return s[0] == s[-1] and is_palindrome_v1(s[1:-1])