1
2
3
4
begin
  data["body"] = content[1].split(/\W{2,}/)[0].strip()
rescue Exception => e
...

Ruby Exception Handling in Ruby

by Tafkas, March 19, 2010 23:38, 4 refactorings, tagged with ruby, exceptions

I have the following code w...

693a4661eaa71435ce5ebe61de64c5a4 Talk
1
2
3
4
def get_pos(rel_dates):
    """returns the positions of the dates closest to 25%, 50%, and 75%"""
    pos = [0] # first element
...

Python Return the indexes of speci...

by Tafkas, January 28, 2010 19:53, 5 refactorings, tagged with dates, python, relative position

The function takes an list ...

693a4661eaa71435ce5ebe61de64c5a4 Talk
1
2
3
4
def scale_dates(dates):
    rel_dates = []
    first_day = dates[0]
...

Python Scale data points with the ...

by Tafkas, January 22, 2010 12:55, 3 refactorings, tagged with python, date, timestamp

In order to print a chart t...

693a4661eaa71435ce5ebe61de64c5a4 Talk