Saturday, 2009-04-11

mattlCC Analytics?00:24
mattlsounds fun00:24
*** johndoigiii has quit IRC00:26
*** oshani has joined #cc00:32
*** nkinkade has left #cc01:11
*** dini has left #cc01:57
*** ankitg has joined #cc04:52
*** jorel314 has joined #cc04:52
jorel314hello.. i'm trying to compile a list of notable works whose copyrights were waived by its creator..04:59
jorel314here's the start of the list..
jorel314does anyone know any other works that I can add to the list?05:00
*** johndoigiii has joined #cc05:16
*** ankitg has quit IRC06:31
*** ankitg has joined #cc06:32
*** Bovinity has quit IRC07:03
haoyu_hi ankitg07:05
*** haoyu_ is now known as haoyu07:05
haoyuankitg, just got your mail07:06
ankitghi haoyu ... I was just leaving ...07:06
ankitghaoyu: great ... is it easy to get such a list into
haoyuyou see, the 'stats' is a dict of all juris07:07
haoyuso I think it can be done in two list comprehensions07:07
haoyulike juris_totals = [ for x in stats.values()]07:08
haoyuoh then sort juris_totals07:08
haoyuthen got the interval and break_points07:09
ankitgsounds good ...07:09
haoyuI suggest, instead of break_point1 break_point2 etc. just a list called breakpoints is better07:09
ankitgthe logic makes sense to you, right?07:10
haoyuall the things should be done in the map_world method07:10
ankitgthat's a minor detail, but sure.07:10
ankitgI was just laying out the logic for you07:10
ankitgnoted. Let me give it a whirl ...07:10
haoyuthough you even can move the logic into the XML template. but it should be a bit clear to done in python :)07:10
haoyufinally, for the two self.render call, and argument 'breakpoints = breakpoints'07:11
ankitgdoing it within a comment in the template although possible is not desirable ...07:11
haoyuthen the value will be passed into the template07:12
ankitgthat part I can just copy off of the other methods ;)07:12
ankitghaoyu: so this gets added under the map_world method:07:19
ankitg        juris_totals = [ for x in stats.values()].sort()07:19
ankitg        interval=len(juris_totals)/507:19
ankitg        breakpoints = [juris_totals[interval],juris_totals[interval*2],juris_totals[interval*3],juris_totals[interval*4],juris_totals[len(juris_totals)]]07:19
haoyufor the breakpoints, you can use list comprehension too07:20
haoyu[juris_totals[interval*(i+1)] for i in range(5)]07:20
haoyuis that better? :)07:20
haoyuthat is, don't repeat yourself :p07:21
ankitghaoyu: neater. We should do this more often ... gives me a chance to learn =)07:22
haoyuyes, it is powerful :)07:24
ankitghaoyu: Does this look about right:07:31
ankitg    def breakpoints_world(self):07:31
ankitg        yield self.render('breakpoints = breakpoints')07:31
ankitg        yield self.render(self._botns('breakpoints', BOTPAGE_MAP_BREAKPOINTS),07:31
ankitg                '', map_url = self._uploaded_url[XML_WORLDMAP_TOTAL])07:31
ankitg        return07:31
ankitgoops ... uploaded_url needs to be changed ...07:32
ankitgor not ... that's right ...07:32
ankitgshould work, or am I missing something?07:32
haoyuem? why you create a new method?07:32
haoyubreakpoints should be an argument for the worldmap xml you are rendering07:33
ankitgwhere should I append the lines instead?07:33
haoyujust in map_world(), the two 'page = self.render(XML_WORLDMAP_FREEDOM, XML_WORLDMAP_FREEDOM,07:34
haoyuadd breakpoints = breakpoints argument to the two self.render call07:34
ankitgah okie, got it ...07:35
ankitgI mis-understood the code initially ..07:35
*** tanjir has quit IRC07:41
ankitgokie, cool I am updating the template with entries like         <data>{{ breakpoints[1] }} - {{ breakpoints[2] }}</data> ... for the range ... I guess we'll be done with dynamic coloring if this works.07:41
haoyujust a remind - you should start from breakpoints[0] :)07:42
*** jorel314 has left #cc07:50
ankitgnoted ... having other problems at compile time though ...07:51
ankitgTemplateSyntaxError: unexpected end of template, expected 'block_end'.07:56
ankitg  File "template/worldmap_total.xml", line 65 ... line 65 is blank haven't even touched it07:56
haoyucheck if you have some mismatch {% %} or {{ }}?08:00
haoyuor mismatch of {% for ... %} and {% endfor %}, etc.08:01
ankitgah got it, it was commented out but in xml so the syntax coding showed it as a comment. working now =)08:02
haoyugreat :)08:02
ankitghaoyu: thanks a bunch ... now I can tweak the colors, add in the url linkbacks and we should be almost ready. Will only need to touch python again to add in legends for the maps. Thos should be fairly easy to do up static tables. =) ... I'll be leaving now, catch you later.08:06
haoyuankitg, okey, great. have you commited your work?08:13
*** ankitg has quit IRC08:21
*** robmyers has joined #cc08:24
*** oshani has quit IRC09:42
*** linuksamiko has joined #cc09:52
*** linuksamiko has quit IRC10:02
*** sama has joined #cc10:14
*** sama_ has joined #cc10:35
*** sama has quit IRC10:39
*** sama_ is now known as sama10:48
*** gouchi has joined #cc11:31
*** cristi has joined #cc13:27
*** oshani has joined #cc14:13
*** oshani has quit IRC14:25
*** cristi has quit IRC14:26
*** michaelkrnac has joined #cc14:55
*** michaelkrnac has quit IRC16:10
*** dini has joined #cc16:42
*** tanjir has joined #cc16:45
*** dini has left #cc16:47
*** kreynen has joined #cc17:49
*** mtc has joined #cc17:54
*** mtc has left #cc17:57
*** kittipat has joined #cc18:03
*** Bovinity has joined #cc18:22
*** kittipat has quit IRC18:29
*** robmyers has quit IRC19:50
*** kreynen has quit IRC20:12
*** kreynen has joined #cc20:18
*** Orango has quit IRC20:30
*** gouchi has quit IRC21:14
*** sama has quit IRC21:17
*** kreynen has quit IRC22:12
*** oshani has joined #cc23:29
*** nathany has joined #cc23:45

Generated by 2.6 by Marius Gedminas - find it at!