Mercurial Hosting > traffic-intelligence
comparison python/utils.py @ 745:3d0321abb564 dev
merged
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 10 Sep 2015 15:49:13 -0400 |
parents | fe71639f1ee7 |
children | 10dbab1e871d |
comparison
equal
deleted
inserted
replaced
744:ed6ff2ec0aeb | 745:3d0321abb564 |
---|---|
9 from scipy.spatial import distance | 9 from scipy.spatial import distance |
10 from numpy import zeros, array, exp, sum as npsum, int as npint, arange, cumsum, median, isnan, ones, convolve, dtype, isnan, NaN, mean, ma, isinf | 10 from numpy import zeros, array, exp, sum as npsum, int as npint, arange, cumsum, median, isnan, ones, convolve, dtype, isnan, NaN, mean, ma, isinf |
11 | 11 |
12 | 12 |
13 datetimeFormat = "%Y-%m-%d %H:%M:%S" | 13 datetimeFormat = "%Y-%m-%d %H:%M:%S" |
14 | |
15 ######################### | |
16 # Strings | |
17 ######################### | |
18 | |
19 def upperCaseFirstLetter(s): | |
20 words = s.split(' ') | |
21 lowerWords = [w[0].upper()+w[1:].lower() for w in words] | |
22 return ' '.join(lowerWords) | |
14 | 23 |
15 ######################### | 24 ######################### |
16 # Enumerations | 25 # Enumerations |
17 ######################### | 26 ######################### |
18 | 27 |