Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: sitescripts/stats/common.py

Issue 11481051: Update stats processing (Closed)
Left Patch Set: Fixed review issues Created Aug. 27, 2013, 7:29 a.m.
Right Patch Set: Improved performance using memoization Created Aug. 29, 2013, 1:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « sitescripts/stats/bin/pagegenerator.py ('k') | sitescripts/stats/countrycodes.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus web scripts, 3 # This file is part of the Adblock Plus web scripts,
4 # Copyright (C) 2006-2013 Eyeo GmbH 4 # Copyright (C) 2006-2013 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
(...skipping 20 matching lines...) Expand all
31 This reconstructs a string encoded with filename_encode(). 31 This reconstructs a string encoded with filename_encode().
32 """ 32 """
33 return re.sub(r"-([0-9a-f]{4})", lambda match: unichr(int(match.group(1), 16)) , path) 33 return re.sub(r"-([0-9a-f]{4})", lambda match: unichr(int(match.group(1), 16)) , path)
34 34
35 basic_fields = [ 35 basic_fields = [
36 { 36 {
37 "name": "day", 37 "name": "day",
38 "title": "Days of month", 38 "title": "Days of month",
39 "coltitle": "Day", 39 "coltitle": "Day",
40 "showaverage": True, 40 "showaverage": True,
41 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): k), 41 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)),
42 }, 42 },
43 { 43 {
44 "name": "weekday", 44 "name": "weekday",
45 "title": "Days of week", 45 "title": "Days of week",
46 "coltitle": "Weekday", 46 "coltitle": "Weekday",
47 "showaverage": True, 47 "showaverage": True,
48 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): k), 48 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)),
49 "isspecial": lambda weekday: weekday == 5 or weekday == 6, 49 "isspecial": lambda weekday: weekday == 5 or weekday == 6,
50 }, 50 },
51 { 51 {
52 "name": "hour", 52 "name": "hour",
53 "title": "Hours of day", 53 "title": "Hours of day",
54 "coltitle": "Hour", 54 "coltitle": "Hour",
55 "showaverage": True, 55 "showaverage": True,
56 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)), 56 "sort": lambda obj: sorted(obj.items(), key=lambda (k,v): int(k)),
57 }, 57 },
58 { 58 {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 install_fields = [ 138 install_fields = [
139 { 139 {
140 "name": "installType", 140 "name": "installType",
141 "title": "Install types", 141 "title": "Install types",
142 "coltitle": "Install type", 142 "coltitle": "Install type",
143 }, 143 },
144 ] 144 ]
145 145
146 146
147 fields = basic_fields + downloader_fields + install_fields 147 fields = basic_fields + downloader_fields + install_fields
LEFTRIGHT

Powered by Google App Engine
This is Rietveld