mattl | CC Analytics? | 00:24 |
---|---|---|
mattl | sounds fun | 00:24 |
*** johndoigiii has quit IRC | 00:26 | |
*** oshani has joined #cc | 00:32 | |
*** nkinkade has left #cc | 01:11 | |
*** dini has left #cc | 01:57 | |
*** ankitg has joined #cc | 04:52 | |
*** jorel314 has joined #cc | 04:52 | |
jorel314 | hello.. i'm trying to compile a list of notable works whose copyrights were waived by its creator.. | 04:59 |
jorel314 | here's the start of the list.. http://setfree.dyndns.info/ | 04:59 |
jorel314 | does anyone know any other works that I can add to the list? | 05:00 |
*** johndoigiii has joined #cc | 05:16 | |
*** ankitg has quit IRC | 06:31 | |
*** ankitg has joined #cc | 06:32 | |
*** Bovinity has quit IRC | 07:03 | |
haoyu_ | hi ankitg | 07:05 |
*** haoyu_ is now known as haoyu | 07:05 | |
haoyu | ankitg, just got your mail | 07:06 |
ankitg | hi haoyu ... I was just leaving ... | 07:06 |
ankitg | haoyu: great ... is it easy to get such a list into views.py? | 07:06 |
haoyu | you see, the 'stats' is a dict of all juris | 07:07 |
haoyu | so I think it can be done in two list comprehensions | 07:07 |
haoyu | like juris_totals = [x.total for x in stats.values()] | 07:08 |
haoyu | oh then sort juris_totals | 07:08 |
haoyu | then got the interval and break_points | 07:09 |
ankitg | sounds good ... | 07:09 |
haoyu | I suggest, instead of break_point1 break_point2 etc. just a list called breakpoints is better | 07:09 |
ankitg | the logic makes sense to you, right? | 07:10 |
haoyu | all the things should be done in the map_world method | 07:10 |
haoyu | yes | 07:10 |
ankitg | that's a minor detail, but sure. | 07:10 |
ankitg | I was just laying out the logic for you | 07:10 |
ankitg | noted. Let me give it a whirl ... | 07:10 |
haoyu | though you even can move the logic into the XML template. but it should be a bit clear to done in python :) | 07:10 |
haoyu | finally, for the two self.render call, and argument 'breakpoints = breakpoints' | 07:11 |
ankitg | doing it within a comment in the template although possible is not desirable ... | 07:11 |
haoyu | then the value will be passed into the template | 07:12 |
ankitg | that part I can just copy off of the other methods ;) | 07:12 |
ankitg | haoyu: so this gets added under the map_world method: | 07:19 |
ankitg | juris_totals = [x.total for x in stats.values()].sort() | 07:19 |
ankitg | interval=len(juris_totals)/5 | 07: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 |
haoyu | for the breakpoints, you can use list comprehension too | 07:20 |
haoyu | [juris_totals[interval*(i+1)] for i in range(5)] | 07:20 |
haoyu | is that better? :) | 07:20 |
haoyu | that is, don't repeat yourself :p | 07:21 |
ankitg | haoyu: neater. We should do this more often ... gives me a chance to learn =) | 07:22 |
haoyu | yes, it is powerful :) | 07:24 |
ankitg | haoyu: 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.wiki', map_url = self._uploaded_url[XML_WORLDMAP_TOTAL]) | 07:31 |
ankitg | return | 07:31 |
ankitg | oops ... uploaded_url needs to be changed ... | 07:32 |
ankitg | or not ... that's right ... | 07:32 |
ankitg | should work, or am I missing something? | 07:32 |
haoyu | em? why you create a new method? | 07:32 |
haoyu | breakpoints should be an argument for the worldmap xml you are rendering | 07:33 |
ankitg | where should I append the lines instead? | 07:33 |
haoyu | just in map_world(), the two 'page = self.render(XML_WORLDMAP_FREEDOM, XML_WORLDMAP_FREEDOM, | 07:34 |
haoyu | ' | 07:34 |
haoyu | add breakpoints = breakpoints argument to the two self.render call | 07:34 |
ankitg | ah okie, got it ... | 07:35 |
ankitg | I mis-understood the code initially .. | 07:35 |
*** tanjir has quit IRC | 07:41 | |
ankitg | okie, 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 |
haoyu | just a remind - you should start from breakpoints[0] :) | 07:42 |
*** jorel314 has left #cc | 07:50 | |
ankitg | noted ... having other problems at compile time though ... | 07:51 |
haoyu | ah? | 07:52 |
ankitg | TemplateSyntaxError: 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 it | 07:56 |
haoyu | check if you have some mismatch {% %} or {{ }}? | 08:00 |
haoyu | or mismatch of {% for ... %} and {% endfor %}, etc. | 08:01 |
ankitg | ah got it, it was commented out but in xml so the syntax coding showed it as a comment. working now =) | 08:02 |
haoyu | great :) | 08:02 |
ankitg | haoyu: 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 |
haoyu | ankitg, okey, great. have you commited your work? | 08:13 |
*** ankitg has quit IRC | 08:21 | |
*** robmyers has joined #cc | 08:24 | |
*** oshani has quit IRC | 09:42 | |
*** linuksamiko has joined #cc | 09:52 | |
*** linuksamiko has quit IRC | 10:02 | |
*** sama has joined #cc | 10:14 | |
*** sama_ has joined #cc | 10:35 | |
*** sama has quit IRC | 10:39 | |
*** sama_ is now known as sama | 10:48 | |
*** gouchi has joined #cc | 11:31 | |
*** cristi has joined #cc | 13:27 | |
*** oshani has joined #cc | 14:13 | |
*** oshani has quit IRC | 14:25 | |
*** cristi has quit IRC | 14:26 | |
*** michaelkrnac has joined #cc | 14:55 | |
*** michaelkrnac has quit IRC | 16:10 | |
*** dini has joined #cc | 16:42 | |
*** tanjir has joined #cc | 16:45 | |
*** dini has left #cc | 16:47 | |
*** kreynen has joined #cc | 17:49 | |
*** mtc has joined #cc | 17:54 | |
*** mtc has left #cc | 17:57 | |
*** kittipat has joined #cc | 18:03 | |
*** Bovinity has joined #cc | 18:22 | |
*** kittipat has quit IRC | 18:29 | |
*** robmyers has quit IRC | 19:50 | |
*** kreynen has quit IRC | 20:12 | |
*** kreynen has joined #cc | 20:18 | |
*** Orango has quit IRC | 20:30 | |
*** gouchi has quit IRC | 21:14 | |
*** sama has quit IRC | 21:17 | |
*** kreynen has quit IRC | 22:12 | |
*** oshani has joined #cc | 23:29 | |
*** nathany has joined #cc | 23:45 |
Generated by irclog2html.py 2.6 by Marius Gedminas - find it at mg.pov.lt!