Sunday, July 26, 2015

PyCon 2015 - List of all talks and videos

Github readme that has the list of all talks with their respective videos and recordings for each of them. No links to the courses, which are also available on YouTube.

PyCon 2015 - Hadoop with Python

Sunday, May 24, 2015

Eve - Python straight forward REST API

Eve is a library for Python that allows you to quickly create a REST API. As with most Python things, it makes it friendly and easy to create something, but the extensibility possibilities and capabilities is only limited by the Python ecosystem and your imagination on what to create.


Summary of Searching Methods in BeautifulSoup

Quick list of the various search mechanisms to find elements when using BeautifulSoup.

The key thing to remember is that you can use multiple parameters to find a specific element. For example, you can combine in a method the tag, class_ and id to identify univocally the exact element you want.

Another quick thing worth mentioning is that the text parameter can receive and match a list that will be used to finding occurrences, and that also permits the use of regular expressions, when given in the re.compile('\w+') form.
  • find(): find the first occurrence.
  • find('p'): find the first occurrence of a tag (in this case, the HTML tag "p").
  • find(text="sometext"): find the first occurrence of text.
  • find(attrs={'id':'value'}): find the first occurrence of attributes based on the attribute value.
  • find(class_='value'): find the first occurrence with the CSS class value.
  • find_all(): find all occurrences based on filter conditions.
  • find_parent(): find the first occurrence in parent tags.
  • find_parents(): find all occurrences in parent tags.
  • find_sibling(): find the first occurrence in sibling tags.
  • find_siblings(): find all occurrences in sibling tags.
  • find_next(): find the first occurrence of a tag parsed immediately after the current tag.
  • find_all_next(): find occurrences of all tags parsed immediately after the current tag.
  • find_previous(): find the first occurrence of a tag parsed immediately before the current tag.
  • find_all_previous(): find occurrences of all tags parsed immediately before the current tag.